mr_pablo Posted November 5, 2014 Share Posted November 5, 2014 I have some voucher codes setup in the cart rules, and I need to be able to fetch the code a customer uses in an order. I understand getCartRules() will tell me any applied rules, but it only gives me a name, not the code (if the rule has a code) How can I get the actual code, seeing as getDiscounts() is now defunct. (which used to work perfectly btw!) Link to comment Share on other sites More sharing options...
vekia Posted November 5, 2014 Share Posted November 5, 2014 it returns also id of the discount, right? Link to comment Share on other sites More sharing options...
mr_pablo Posted November 5, 2014 Author Share Posted November 5, 2014 it returns also id of the discount, right? It's ok, I figured it out. I just did a query to find the cart rule using the ID. It is a shame getDiscounts() was binned, as that got all the details. Another thumbs-down for Prestashop Link to comment Share on other sites More sharing options...
Eolia Posted November 5, 2014 Share Posted November 5, 2014 See on the class: CartRule.php Link to comment Share on other sites More sharing options...
mr_pablo Posted November 5, 2014 Author Share Posted November 5, 2014 See on the class: CartRule.php Have you? If you have, you'd see there is not a single function for getting the rules used in an order. 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