Applying discounts to product scope #1037
Replies: 3 comments
-
Hi @CWFranklin If the discount is site wide and applies to any product could you not just get the discount from the database? If the discount is for specific products, couldn't you just get all discounts that are restricted to that product? |
Beta Was this translation helpful? Give feedback.
-
Hey Alec. Yeah, getting it from the database was one of my considered options. While I figured it was unlikely that it would change, I was hoping to avoid duplicating the percentage discount logic. Much like the apply code checks against cart lines, I thought an applyToPurchasable function could check criteria against products. The extended code around the percentage calculations also check against customer group, etc. |
Beta Was this translation helpful? Give feedback.
-
would like to add on that this would be useful to show the discounts for the products for example as mentioned currently the discount manager only calculate for products in cart.
|
Beta Was this translation helpful? Give feedback.
-
I would like to be able to display globally applied discounts (like a sitewide sale) in any location that the product is displayed.
Currently the only way of applying a discount is via a cart. It would be good if the Discount Manager could also be used with some sort of
applyToProduct
function in order to display this information.I have considered utilising a software cart to apply the discount to products but this would be very taxing for a site with any sort of category page. I have also considered manually applying percentage discounts but this would mean duplicating some existing site code and it would not be updated along with any other fixes to the core site code.
Beta Was this translation helpful? Give feedback.
All reactions