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
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.
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.
Who is online
Users browsing this forum: Amazon [Bot] and 3 guests