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
Comment #1
kevinsiji commentedPatch 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.
Comment #2
kevinsiji commentedComment #3
cutmedia commented+1 works for me
Comment #4
d.pagkratis commentedkevinsiji you solved the problem. Thank you.
Comment #5
d.pagkratis commentedComment #7
spidermanAs 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.
Comment #8
spidermanWhoops, small typo in my patch, fixed here.
Comment #9
spidermanComment #10
aramboyajyan commentedJust to confirm that #8 seems to be working for me. Thank you.
Comment #11
anybodyWasn't this committed to beta-4?
https://www.drupal.org/project/commerce_pricing_attributes/releases/7.x-...