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
Comment #1
bojanz commentedComment #2
michfuer commentedWith 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.
Comment #3
recrit commentedI 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.
Comment #4
bojanz commentedMoving to the Commerce Discount issue queue.
Disabled the usage submodule for Kickstart RC1 since it needs major attention.
Comment #5
m.ioannidis commentedWhy don't you give this a try...
Comment #6
bojanz commentedDuplicate of #1817394: Notice: Undefined index: discount_name in commerce_discount_remove_discount_components() (line 74 of ....