I made a product pricing rule as such

Event: Calculating the sell price of a product
Condition: User has role 'wholesaler'
Actions: Multiply the unit price by some amount

If I login as a user with role 'wholesaler' and attempt to add a product to the cart, a non-descriptive error occurs ("The website encountered an unexpected error. Please try again later. ")

The error appears to be with the rendering of the '...Added to your cart' confirmation popup.

My recent log messages shows -> 'Notice: Undefined index: discount_name in commerce_discount_usage_commerce_cart_product_add() (line 131....'

Disabling the Commerce Discount module resolves the issue, but the price shown on the '...Added to your cart' popup is incorrect (it's the original, not the discounted price). However, in my cart the correct (discounted) price is displayed.

Comments

bojanz’s picture

Assigned: Unassigned » bojanz
michfuer’s picture

Assigned: bojanz » Unassigned

With Commerce Discount module enabled the error appears to only be generated when under Actions -> 'Edit' (Multiply the unit price by some amount) -> Price Component Type: Value, is set to 'Discount'.

When Value is set to 'Base price' the error disappears.

recrit’s picture

I had the same issue. The error goes away after disabling the commerce_discount module and its submodules.
The problem is commerce_discount_usage_commerce_cart_product_add() and commerce_discount_usage_commerce_cart_product_remove() attempts to update usage for any discount.

bojanz’s picture

Project: Commerce Kickstart » Commerce Discount
Version: 7.x-2.0-alpha3 » 7.x-1.x-dev

Moving to the Commerce Discount issue queue.

Disabled the usage submodule for Kickstart RC1 since it needs major attention.

m.ioannidis’s picture

Why don't you give this a try...

bojanz’s picture