Post by troyveluz » Sat Jul 19, 2008 12:27 am

I'm not sure if this is the right lace to ask this question, if not, please let me know where.

I am attempting to add a textbox as one of the options for ordering products.
I have successfully implemented it on my test site ( http://www.veluzarwebdesign.com/shoptes ... oduct_id=8 )

The problem I am having is I can't seem to capture the information that is entered into the textbox.
I'm trying to follow the code and it led me to the add function of library/cart/cart.php.
Is this the correct file to update to capture the name & value of the textbox options?
Are there any other files I might need to update.

Thanks in advance,
Troy

==========================================================================
Veluzar Studios
Web Design and Development


New member

Posts

Joined
Thu Jul 17, 2008 1:45 am
Location - Frisco, TX USA

Post by bruce » Sat Jul 19, 2008 10:20 am

Hi Troy,

You are in the right place and have set yourself quite a task. Hopefully, the following will help you...

The add method of the cart object creates an array key that has, in the presence of options, the format
:.
eg:
    7:33.35

and uses that key to store the quantity in the array. This array is persisted as 'cart' in the user session and stored in the cart object as $this->data.

You might add another optional parameter to the add method and extend the key if you can find a way to make your text options unique in the database so that they have a unique id. After that, you will have to look at the areas in the code that use $this->data in the cart object (especially the constructor) or other code that uses the functions that return a reference to $this->data from the cart object.

Get yourself a copy of notepad++ to help you search in files. Its free and very good.

Finally, good luck.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm
Who is online

Users browsing this forum: No registered users and 5 guests