If a product is disabled, we'll get a warning on the product display node:
Undefined index: product_id in commerce_stock_form_alter() (line 59 of /var/www/training.drupalcommerce.org/sites/all/modules/commerce_stock/commerce_stock.module).
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | if_a_product_is_disabled_1279740_3.patch | 990 bytes | guy_schneerson |
Comments
Comment #1
guy_schneerson commentedthanks @rfay for spotting this, easy to recreate and should be easy to fix
Comment #2
guy_schneerson commentednote to self
need to add to
commerce_stock_form_alter()
the following lines at the top of the function
// ccheck if product is disabled
if ( isset($form['submit']['#disabled']) && ($form['submit']['#disabled'] == 1) ) {
return;
}
will add as a patch later on this week (need to make sure it works with my previous patches not committed yet)
Comment #3
guy_schneerson commentedPatch
Comment #4
guy_schneerson commentedcommitted http://drupalcode.org/project/commerce_stock.git/commit/39ce7d3