Jump to content

Issue information

  • #004224

  • Fixed


Issue Confirmations

  • Yes (0)No (0)
Photo

variant values

Posted by ilib on 21 June 2013 - 02:29 PM

product feature variant value 0 (zero) will not be saved

changed status to: Confirmed

in function fn_update_product_feature
line 4482:

foreach ($feature_data['variants'] as $k => $v) {
			    if (empty($v['variant'])) {
				    continue;
			    }
			    $v['feature_id'] = $feature_id;

replace with

foreach ($feature_data['variants'] as $k => $v) {
			    if (empty($v['variant']) && !is_numeric($v['variant'])) {
				    continue;
			    }
			    $v['feature_id'] = $feature_id;



and

in function fn_add_feature_variant
    if (empty($variant['variant'])) {
	    return false;
    }

replace with

    if (empty($variant['variant']) && !is_numeric($variant['variant'])) {
	    return false;
    }

possibly somewhere else this condition should be checked. It works now for adding feature variants and update product


changed status to: Fixed