My site is www.igofresh.com. Linux hosting and ZC 1.3.9g.
I am trying to make the comments field in checkout required before the customer can move on from step 1.
In checkout_shipping.php?
Many thanks in advance
My site is www.igofresh.com. Linux hosting and ZC 1.3.9g.
I am trying to make the comments field in checkout required before the customer can move on from step 1.
In checkout_shipping.php?
Many thanks in advance
History does not repeat itself but it [FONT="Century Gothic"][/FONT]does rhyme - Mark Twain
You could customize the file:
/includes/modules/pages/checkout_payment/header_php.php
Code:// $_SESSION['comments'] = ''; $comments = $_SESSION['comments']; if (trim($comments) == '') { $messageStack->add_session('checkout_shipping', 'Complete the comments', 'error'); zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); }
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Thanks for the reply.
That didn't work for me.
I may have problems because I have changed the comments from a simple comment box in checkout_shipping.php to a drop down with 3 choices. I noticed in payment_shipping.php the comment box is populated with the "select one" message from the drop down. even if nothing is selected in the previous page's comment box.
History does not repeat itself but it [FONT="Century Gothic"][/FONT]does rhyme - Mark Twain
Now it works.
I removed the text first option from the drop down so rather than saying '--chose an option--' it is just blank. This allows Ajeh's solution to work as intended.
The only potential problem I foresee in that in step 2 of checkout the customer may decide to change their mind and type to edit the delivery option they chose in the previous step.
Can the comment box or part or all of its contents be protected in page 2?
Just for those who go down this post in the future,
I added a drop down to replace the text input box in checkout comments. In my case, I needed to offer the customer 3 delivery time slots to choose from. I found that solution here:
http://www.zen-cart.com/forum/showthread.php?t=107227
The reason for using comments is that it loads onto the invoice and other order docs.
The last piece of the puzzle was to make certain the customer selected a delivery option and did not skip this step.
That is the solution posted here by Ajeh.
All together it works like a charm.
History does not repeat itself but it [FONT="Century Gothic"][/FONT]does rhyme - Mark Twain
I have now added some virtual products and get a redirect loop error message rather than going to step 1 of checkout.
Before implementing the comments field requirement as described above check out
http://www.zen-cart.com/forum/showthread.php?t=73695
I like this option better because it makes comments required by modifying checkout_confirmation/header_php.php not checkout_payment/header_php.php
If you have only virtual product(s) in the cart checkout_payment/header_php.php will try to reload
checkout_shipping which is skipped for virtual products!
Theres the loop!
History does not repeat itself but it [FONT="Century Gothic"][/FONT]does rhyme - Mark Twain
Thanks for the update on what worked for you on making comments required ...![]()
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!