Problem/Motivation

While adding a product to cart, this error occurs. It repeats for the number option sets available in the product.

Notice: Undefined index: und in commerce_pricing_attributes_add_to_cart_submit() (line 985 of /var/www/p4less/sites/all/modules/commerce_pricing_attributes/commerce_pricing_attributes.module).

Proposed resolution

Variable $field is actually empty in the line 985.

Patch attached will just check if $field[$lang_code] isset. No side effects found. Product is added to cart with all selected options and with correct price calculation.

Comments

kevinsiji’s picture

Patch attached will just check if $field[$lang_code] isset. No side effects found. Product is added to cart with all selected options and with correct price calculation.

kevinsiji’s picture

Status: Active » Needs review
cutmedia’s picture

+1 works for me

d.pagkratis’s picture

Issue summary: View changes

kevinsiji you solved the problem. Thank you.

d.pagkratis’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

spiderman’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new2.3 KB

As far as I can tell, this hasn't been committed yet. Also, the patch above doesn't apply cleanly via drush make, so I've rerolled it against a proper git clone, attached.

spiderman’s picture

Whoops, small typo in my patch, fixed here.

spiderman’s picture

aramboyajyan’s picture

Just to confirm that #8 seems to be working for me. Thank you.

anybody’s picture