If you have a product with different attribute options and add the same product twice but with different options selected you get the same price for both items in the cart.
Steps to reproduce:
1. create a product
2. add 1 attribute to the product with 2 options each option having different price
3. Go on and add the product to cart with one of the option selected
4. Add the same product to cart with the other option selected

Result: both items in the cart will have the same price...

This happens because of the way this module caches price information in uc_discount_price_handler_alter function.

Comments

andreiashu’s picture

Title: UC discounts doesn't support product attributes » UC discounts doesn't support product price attributes

Changing title to better reflect the problem

Island Usurper’s picture

Status: Active » Closed (duplicate)

I believe this has already been fixed, but I don't know if there's a specific issue that says so. I just can't duplicate the problem. Make sure you've got the latest versions of both uc_discount and Ubercart. The dev version of Ubercart should be updated today, so use that one.

andreiashu’s picture

Status: Closed (duplicate) » Fixed

Indeed it is fixed in the latest update of uc_discount:

-    $cache = 'cart_prices';
+    $cache = 'cart_item:'. $node->nid .':'. serialize($item->data);

Thanks !

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.