Hi,
I am not sure if I can explain this well. But, what I am trying to do is this
1. Change the currency of a product via pricing rules
2. Add that product to the cart via a rule (Add a Product to the Cart) to create an order
3. Order checkout via rule
Now, the problem happens at the 3. After the "Checkout" rule ends running, the the product price is in default currency and not the changed currency. Any price change also does not reflect in the order.
If I don't Checkout the order via the rule or use Rules to keep the status of the order in checkout, I can see the changed prices and currency in Shopping carts (Orders).
So how do I fix this? Is this a bug?
Comments
Comment #1
rszrama commentedI doubt there's a bug here, but I'm having a hard time understanding what you mean by #3. When you're dealing with Rules, it's always best to export the rule and include it in your issue.
Comment #2
cursor commentedaRGH! No 3, was using a action element in rules - "Complete Checkout for an order".
Anyhow, figured out what was wrong. Looking at the documentation everywhere it was mentioned using Pricing Rules to set price / change currency for the product. That works and displays the correct price and if added to the cart by the user it works perfectly fine.
But, if you want to add products to the cart via rules action - "Add Product to cart", your rule also needs to have the rules action "Convert the currency" or "Set Price".
Thanks for the help. I did read through the code as well to check if there was a bug :)\
Comment #3
rszrama commentedNo worries. I'd actually completely forgotten we had an action to complete checkout for orders. : P
Comment #4
weddigen commentedHi there,
I am experiencing the same issue with the rules action "complete checkout for an order".
Unfortunately I did not really understand how the solution from cursors post works. I tried to set the price of my products on adding them to the cart and also before or after the "complete checkout for an order" action, but the resulting pending order still uses the unchanged base price of the product.
I searched through a couple of posts but with no luck.
What i want to do: I am working on a site with a special checkout process, that's why I am using rules to add products to the cart, change there price for current user and later complete checkout (with the rules action). As said, the changed sellprice is not used in the completed order.
Any help?
Thanks a lot!
Comment #5
rszrama commentedYour problem isn't related to the action in question. You just cannot set pricing directly like this because the shopping cart refresh will override it using the prices derived from the product pricing system. You can reference that elsewhere in the docs, but basically you just need to use the pricing system like normal even for these orders.