#Is there a way to return the discount for product before applying it ?

8 messages · Page 1 of 1 (latest)

lost jacinth
#

I want to return the discount code to the FE ? how is it possible ?

feral mountain
#

We don't have a endpoint for it in the storefront api, you will need to create your own.

lost jacinth
#

so I need to create a new entity in the db that has the same structure as discount correct ?

#

yes ?

feral mountain
#

Why would you need that? You can just create a endpoint to retrieve a discount by code

#

You can just copy and paste the code from the existing admin endpoint to retrieve a discount

lost jacinth
#

ok deal