Jump to content

How to fetch the "code" from a cart rule?


mr_pablo

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...