Is adding input fields to checkout_confirmation appropriate?
I need some advice, as a new PHP/Zen Cart developer (but not a new developer in general). I have been asked by a client to add a checkbox which, when checked by the user, would indicate that their order should be held until all items can be shipped together. If this was going to be added to the checkout_shipping page, I don't think I'd have any issues. However, it needs to be added to the checkout_confirmation page.
The (first) problem I've run into is getting the value posted back to the server. Am I correct that the next stop after confirmation is dependent on the payment module? Is it possible that a payment module they install in the future might not even go back to their server first?
Just to see what would happen, I did the following:
- Update ipn_main_handler to store the value in the user's session before redirecting to PayPal.
- Update checkout_process to look in $_POST for the data. If it's not there, look in the user's session. If it's not their either, then it wasn't checked.
This seemed to work, but it really feels like an ugly, ugly hack. And somebody's going to have to remember to make sure any new payment modules they install are compatible. Would it be more appropriate to place this in one of the other checkout steps (e.g. shipping)?
By CAguy in forum General Questions
Last Post: 18 Apr 2011, 04:35 PM
By clarkeyi in forum General Questions
Last Post: 11 Mar 2009, 06:28 PM
By liah in forum Templates, Stylesheets, Page Layout
Last Post: 6 Oct 2006, 12:09 AM
Content and Graphics Copyright (c) 2003 - 2014 Zen Ventures, LLC - all rights reserved
Zen Cart® is a Registered Trademark of Zen Ventures, LLC