Manny
Manny

Reputation: 1

Magento 1.9.3.1: Default (incorrect) price showing for configurable products in cart after customer group change

I'm sitting with the problem described in the title.

Our site has different customer groups, but for the sake of simplicity I'm only going to use 2 example groups - Wholesale and Retail.

To replicate the issue I do the following:

  1. I start off with my customer belonging to the Retail group
  2. I login to frontend and add some items to cart and then logout
  3. I then change my customer group to Wholesale which has different prices
  4. When I login on the frontend again my items are still in the cart, so I checkout, but then configurable product items are now using the default price instead of the price for the new customer group that's been assigned to the customer.

Simple products are fine though.

Clicking the "Update Shopping Cart" button on the cart fixes the issue, but this isn't really a solution.

Is this a magento bug? Is there a fix?

Upvotes: 0

Views: 876

Answers (1)

Vladimir Samsonov
Vladimir Samsonov

Reputation: 1329

when products have been added to a cart, their data is copied into a quote. this is normal and is done to ensure transaction consistency.

The question is what action triggers customers group to change? If this is something that happens in frontend, then cart have to be made aware of that by

$cart = Mage::getModel('checkout/cart')->getQuote();
$cart->setTotalsCollectedFlag(false)->collectTotals(); 

Upvotes: 0

Related Questions