Brip Brip - 2 months ago 31
PHP Question

Opencart 1.5.6 error | Notice: Undefined index: option_value

Some of my product pages keep showing me this message:


“Notice: Undefined index: option_value in
/home/paper/osconvites/vqmod/vqcache/vq2-catalog_model_catalog_product.php
on line 411Notice: Undefined index: option_value in
/home/paper/osconvites/vqmod/vqcache/vq2-catalog_model_catalog_product.php
on line 411Notice: Undefined index: option_value in
/home/paper/osconvites/vqmod/vqcache/vq2-catalog_model_catalog_product.php
on line 411”

Answer

Add this code in line no 406

if (!isset($product_option['option_value']) || $product_option['option_value'] == '' ) {
    $product_option['option_value'] = '';
}