0

I want to modify the price of the order, but I was unable to change that if the order status is either "Shopping cart" or "Checkout".

What I did is changed the order status to "Pending", then the price can be modify. After modifying the price, I changed back the order status to "Shopping cart", then the price becomes disabled again.

When I check my cart, the price is same as with the original price, so I looked at the order again and find out that the price has been changed back into its original price.

Why is this happening? I'm not familiar yet with commerce.

1 Answer 1

2

If I understand it correctly, a shopping cart refresh causes the recalculation of your line item price(s). For documentation on this topic, see sell price calculation on drupalcommerce.org and the referenced Prezi presentation on that page.

Maybe you can adjust the price calculation, by adding pricing rules that react on the event 'Calculating the sell price of a product' and use the action 'Set the unit price to a specific amount'.

Otherwise, you could implement one of the hooks provided by commerce_product_pricing.api.php.

2
  • Thank you so much Watergate! The documentations explained well :)
    – Maddie
    Commented May 6, 2015 at 2:58
  • @Watergate : looks like you're an expert in Drupal Commerce ... +1 ! Commented Jul 10, 2015 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.