23cents Posted January 17, 2005 Share Posted January 17, 2005 I have searched the forum but cant seem to find an answer to this feature question. A customer must order items in quantities of 6, this can be comprised of different products though. e.g 1 x Fluffy Toy 2 x Pair of Shoes 3 x Coffee Cup This would then be allowed to process, as the total amount of products ordered is 6 (or a multiple..if they had ordered 12, 24..etc). If instead they had ordered 7 the checkout cannot proceed. Is this possible with OSCommerce ? I am a PHP programmer but I don?t want to reinvent the wheel to provide this functionality. Link to comment Share on other sites More sharing options...
Guest Posted January 17, 2005 Share Posted January 17, 2005 Just wondering if you already have a look in the Contributions Section? Link to comment Share on other sites More sharing options...
23cents Posted January 17, 2005 Author Share Posted January 17, 2005 I have search through the contributions section but could not find any complete solution. If anyone knows of a solution that is similar I would greatly appreciate it. I would of thought these constraint requirements would of been common. Link to comment Share on other sites More sharing options...
Guest Posted January 17, 2005 Share Posted January 17, 2005 I've also been looking for you as well. Looks like someone will have to create one. It would be great if you can contribute this solution in the Contribution section as well. :thumbsup: Link to comment Share on other sites More sharing options...
23cents Posted January 17, 2005 Author Share Posted January 17, 2005 Thanks for your help. I have had a quick look at checkout_payment.php, that seems to be the obvious place in the checkout process to do the checking or adding of the constraint. Adding something like this.. if(count($cart->contents) < 6) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } 6 Being the minium order amount but it could be changed to a division where if it = 0 then redirect. The other inclusion is to only enforce this check on a particular product catagory. Finally the error needs to be parsed to the redirected page. Does this sound like its on the right track ? I have only been flicking through the code for 20minutes now. Link to comment Share on other sites More sharing options...
Guest Posted January 17, 2005 Share Posted January 17, 2005 How about adding contraints in the Let's See What We Have Here page (actually in index.php which contains 3 "different" pages). Or maybe in shopping_cart.php. It might me a good idea to let your customers know early rather than later in the checkout. (reducing the "shock" factor) But, of course, it's your choice. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.