patmanami Posted May 16, 2013 Share Posted May 16, 2013 Hey all, I ASAP need to have the capability to create a cart rule for a voucher that will add a product to the cart - I've created this rule, but the problem is that the current cart will not show the voucher entry box unless there are priced (or any) items in the cart. We've tried hacking the shopping-cart.tpl and have gotten the voucher box to show, but there are other issues with the code afterwards where it shows things like 'Your shopping cart contains: products'. After our edit to show the box, the voucher box will just submit and return to the page without actually doing the cart rule. (apparently nothing) If there is an easy configuration variable to show the voucher box in the cart when there are no priced items (or whatever the rule is), that would be fantastic. If that is possible, I'll regress back to the original version of the tpl and go from there. Thanks very much Patrick Link to comment Share on other sites More sharing options...
patmanami Posted May 16, 2013 Author Share Posted May 16, 2013 Any help on this quickly would be greatly appreciated.... Link to comment Share on other sites More sharing options...
patmanami Posted May 19, 2013 Author Share Posted May 19, 2013 So I'm assuming that no one is moderating the boards, or that this is impossible to do with PrestaShop. If that is the case, I'm going to have to implement an entirely new cart as this is a client requirement. Link to comment Share on other sites More sharing options...
patmanami Posted May 19, 2013 Author Share Posted May 19, 2013 I may have found my own solution for this. controllers/front/ParentOrderController.php Commenting out the following code in this file and changing to the second line will bypass the number of product count, and allow the coupon/voucher to be applied to the cart w/out products being in the cart. Combining that with commenting out the voucherAllowed code in the shopping-cart.tpl, allows vouchers to be used without products being in the cart. // if ($this->nbProducts) if ($this->nbProducts >= 0) If anyone has time to yay/nay this, I would appreciate it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now