Hello,

I am receiving this error when I add a discounted product to the cart and I was wondering if there is anything I can do to fix it.

Error

The website encountered an unexpected error. Please try again later.
Error message
Notice: Undefined index: discount_name in commerce_discount_usage_commerce_cart_product_add() (line 161 of ../profiles/commerce_kickstart/modules/contrib/commerce_discount/modules/commerce_discount_usage/commerce_discount_usage.module).
EntityMetadataWrapperException: Unknown data property commerce_discount_uses. in EntityStructureWrapper->getPropertyInfo() (line 339 of ../profiles/commerce_kickstart/modules/contrib/entity/includes/entity.wrapper.inc).

I am using commerce kickstart 7.x-2.4.

The product is added to the cart btw.

Regards,

Comments

AndyF’s picture

Category: bug » support
Priority: Major » Normal
Status: Active » Fixed

Please don't abuse the priority field. Kickstart 2.x seems to come bundled with Commerce Discount, so you should be using that and not this module (this module works with Commerce Coupon, which is the older alternative to Discount, and will be discontinued IIUC).

Thanks

AndyF’s picture

Status: Fixed » Closed (works as designed)
mellowtothemax’s picture

Thanks for the reply, apologies I was not aware of the rules regarding the priority field. I did look at the Commerce Discount initially but wasn't sure if it handles per product discounts. I would appreciate some further info/link to, on how to give discounts per product base using the Commerce Discount.

Regards,

AndyF’s picture

FYI there's a link to the priority definitions in the Create issue and Post new comment form.

I'm afraid I haven't used Discount myself so I can't help. Normally I'd suggest checking out the README.txt, but a quick check shows there isn't one yet. You could search/ask on the Commerce Q&A site, search/ask on Drupal Answers, or open a support request on Discount itself.

HTH

mellowtothemax’s picture

Thanks for the links, I will look into it.

Regards