Jump to content

How to get a product 's reduction percentage / amount using it's id?


Recommended Posts

Hello, I'm trying to create a module which displays chosen products under their category's name on the home page.

 

I am stuck at getting the reduction percentage / amount due to a catalog price rule targeting the product's default category. I'm getting the reduction due to specific price rules using this

 

 SpecificPrice::getByProductId($tshirts[1]->id);

 

I've tried using this for getting the reduction due to a catalog price rule:

 

 GroupReduction::getGroupsReductionByCategoryId($tshirts[1]->id_category_default);

 

this has not worked. It returns an empty array even though a catalog price rule is targeting that category.

 

Help would be greatly appreciated!

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...