Hi I'm creating an order from scracth (via ajax) and i'm trying to implement a virable discount.
But when i add a discount to the order it is not calculeted into the price
Why is that?
How are you adding the custom discount to the basket? Do you add it before running the order pipeline or as a task during the execution of order pipeline? As a part of order pipeline uCommerce resets all discounts before recalculating them to ensure that a basket has the newest discounts.
The BasketPipeline are executed and does calculate "everything from scratch" which basically modifies the OrderTotal. And that is the way to do it. All Discounts are removed and applied once again. You have to remove those specific tasks.
AFAIK i'm not using marketing foundation, as I don't want to specify the discounts before adding them. I just want to be able to enter an amount and have it discounted.
Or am I misunderstanding something?
Allright. Then you want to either use the backend to add discounts (for you POS app), or modify the basket pipeline so discounts aren't removed after you've added them. You can also refer the reply i sent you in the other topic that you've opened :)
That, unfortunately did not help at all.
How would i go about stopping the pipelines from removing the discount i suspect the checkout pipeline removes them as well?
Also I have another thing i would like to know. The Internal name on a product how do i edit that, it is now set as the initial SKU name, but changing the SKU does not change it
You can removed steps in the basket pipeline by changing the basket.config. You should find in the folder umbraco\ucommerce\pipelines\basket.config. I currently don't have a uCommerce installed. If I remember right, then you should be removing or outcomment the following line (Morten should be able to confirm that):
${Basket.ApplyAwards}
but this will disable discount being applied from Marketing Foundation. The Checkout pipeline will not remove any discounts from your order. Checkout pipeline is run when a basket is converted into an order. One of the things the pipeline does is setting the ordernumber.
1. I don't think this is possible by using uCommerce interface. I just took a spin through the page for editing products and it doesn't seem being possible.
2. On product catalog page there is a checkmark called "Show prices with VAT". If you're using the demo store the catalog name should be "Demo store".
Applying Discounts to order programmatically
Hi I'm creating an order from scracth (via ajax) and i'm trying to implement a virable discount. But when i add a discount to the order it is not calculeted into the price Why is that?
Hi Kenneth,
How are you adding the custom discount to the basket? Do you add it before running the order pipeline or as a task during the execution of order pipeline? As a part of order pipeline uCommerce resets all discounts before recalculating them to ensure that a basket has the newest discounts.
Best regards Martin
I'm adding it before Executing the Basket Pipeline
The BasketPipeline are executed and does calculate "everything from scratch" which basically modifies the OrderTotal. And that is the way to do it. All Discounts are removed and applied once again. You have to remove those specific tasks.
Are you using marketing foundation ?
Best regards
Morten
AFAIK i'm not using marketing foundation, as I don't want to specify the discounts before adding them. I just want to be able to enter an amount and have it discounted. Or am I misunderstanding something?
Allright. Then you want to either use the backend to add discounts (for you POS app), or modify the basket pipeline so discounts aren't removed after you've added them. You can also refer the reply i sent you in the other topic that you've opened :)
I'll give it a try tonight
That, unfortunately did not help at all. How would i go about stopping the pipelines from removing the discount i suspect the checkout pipeline removes them as well? Also I have another thing i would like to know. The Internal name on a product how do i edit that, it is now set as the initial SKU name, but changing the SKU does not change it
Hi Kenneth,
You can removed steps in the basket pipeline by changing the basket.config. You should find in the folder umbraco\ucommerce\pipelines\basket.config. I currently don't have a uCommerce installed. If I remember right, then you should be removing or outcomment the following line (Morten should be able to confirm that):
${Basket.ApplyAwards}
but this will disable discount being applied from Marketing Foundation. The Checkout pipeline will not remove any discounts from your order. Checkout pipeline is run when a basket is converted into an order. One of the things the pipeline does is setting the ordernumber.
Best regards Martin
Hi Again
I have a couple more questions.
1. I don't think this is possible by using uCommerce interface. I just took a spin through the page for editing products and it doesn't seem being possible.
2. On product catalog page there is a checkmark called "Show prices with VAT". If you're using the demo store the catalog name should be "Demo store".
Best regards Martin
is working on a reply...