Comment Textarea in Cart

Support for coding, modules or other software issues
Post Reply
yoolabs
Posts: 11
Joined: Thu Jun 06, 2013 12:37 am

Comment Textarea in Cart

Post by yoolabs » Wed Jun 12, 2013 1:56 am

Hi,
I need the comment textarea, in the cart.
Now, the comment field is in the first checkout step (after clicking checkout in the cart), but I need it one step earlier, when the client sees all products in the cart.
As now, the comment field content should be stored in the session, so, when the client click on Update in the cart, the content of the comment field should be repopulated.

I tried it to copy the code out of the checkout_shipping controller and template, with no success.
Do you have a hint for me?

Kind regards and thanks in advance!

User avatar
Brent
Site Admin
Posts: 4419
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: Comment Textarea in Cart

Post by Brent » Wed Jun 12, 2013 1:13 pm

It is a little different process to add the comment in the cart.
In shipping, when you select a method and add a comment, the shipping page form is posted back to shipping so the comment is a post variable which can then be added to the session.
There is no similar method used in the cart. The only time you would have a post back is when you are updating the cart, but that is not a requirement, so it is really not an option.
The only method I can think of would be to use a button to add the comment to the cart using javascript code to cause the comment to be added to the session similar to adding a product to the cart.

Post Reply