sackling Posted September 4, 2009 Share Posted September 4, 2009 I have my site setup in html outside of oscommerce and then I have "buy now" buttons for instance which link to sts template pages for the cart portions. Anyways I am making an order form and for certain products I need to add the quantity box. So all works well with my form if I chance includes/application_top from: $HTTP_POST_VARS['id']))+1 to $HTTP_POST_VARS['id']))+$quantity however all the other product pages I have that do not have quantity boxes do not work anymore obviously. Is there a way to have both and let oscommerce know that if there is no quantity entered it is just +1? Any help is greatly appreciated as always. Link to comment Share on other sites More sharing options...
♥ecartz Posted September 4, 2009 Share Posted September 4, 2009 In that code, you could try $HTTP_POST_VARS['id']))+(isset($quantity) ? $quantity : 1) Where are you setting $quantity? It might be better to write $HTTP_POST_VARS['id']))+(isset($HTTP_POST_VARS['quantity']) ? $HTTP_POST_VARS['quantity'] : 1) You could also add a hidden field for quantity on those pages that don't have a quantity box and set its value to 1. Always back up before making changes. Link to comment Share on other sites More sharing options...
sackling Posted September 8, 2009 Author Share Posted September 8, 2009 In that code, you could try $HTTP_POST_VARS['id']))+(isset($quantity) ? $quantity : 1) Where are you setting $quantity? It might be better to write $HTTP_POST_VARS['id']))+(isset($HTTP_POST_VARS['quantity']) ? $HTTP_POST_VARS['quantity'] : 1) You could also add a hidden field for quantity on those pages that don't have a quantity box and set its value to 1. Thank you so much the first one you posted worked perfectly! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.