How to show correct price on product page, when a campaign is active
Hey there
So I have a product that is hit by a campaign like this:
When I added it to the basket its all good, but when I get the price on the product page it is the original price. Is there a way to get the price with discounts on the page, or is there a way to get the campgains to check up against?
Prices on a product it never affected by campaigns as its pretty hard to write a prediction engine that will tell what will happen when a product is added to the order. So because of that we have not implemented anything like that. Do you have any idea how we could make something that works?
What we normally do is to have a property at the doc type where you can enter a discount percentage and then use that to calc the price for the product. I know the webshop owner then have to take care of the discount both in Tea Commerce marketing and for the frontend products :(
Just if anyone else wants to build something like this, please contact me i got a boilerplate solution for it. Working in my solution so you only have to handle offers and campaigns in one place.
How to show correct price on product page, when a campaign is active
Hey there
So I have a product that is hit by a campaign like this:
When I added it to the basket its all good, but when I get the price on the product page it is the original price. Is there a way to get the price with discounts on the page, or is there a way to get the campgains to check up against?
Hi Rasmus
Prices on a product it never affected by campaigns as its pretty hard to write a prediction engine that will tell what will happen when a product is added to the order. So because of that we have not implemented anything like that. Do you have any idea how we could make something that works?
What we normally do is to have a property at the doc type where you can enter a discount percentage and then use that to calc the price for the product. I know the webshop owner then have to take care of the discount both in Tea Commerce marketing and for the frontend products :(
Kind regards
Anders
Was thinking that it was something like this :)
Is there a way to get the campaigns easily? Then i can tinker something out so the customer only has to write the reduction ones.
TeaCommerce.Api.Marketing.Services.CampaignService.Instance.GetAll(storeId)
ARH there it was :) been looking around the namespace!
Just if anyone else wants to build something like this, please contact me i got a boilerplate solution for it. Working in my solution so you only have to handle offers and campaigns in one place.
Could you maybe do a pastebin or something like that and share with the lovely Umbraco community? :)
Something like this:
https://gist.github.com/rasmusfjord/7d217ae9f48d88ee6457a29270fa4699
It just focuses on simple product and category unitprice reductions(both percentage and amount).
THANKS! Your amazing!
is working on a reply...