PHP notice

Undefined index: f_products_category1

/var/www/html/hai-o_rep_ie/protected/controllers/RepsiteController.php(502)

490             
491             if(!empty($color)){ //new add to show smaller size color image
492                 $side_images = $product_model->ImageByProductIDSide($main_id,$company_code,$type,$color);
493                 if(empty($side_images)){
494                      $side_images = $product_model->ImageByProductIDSide($product['id'],$company_code,$type,$color);
495                 }
496             }else{
497                 $side_images = $product_model->ImageByProductIDSide($product['id'],$company_code,$type,$color);
498             }
499             
500            
501 
502             $is_color_size_shoe = ($type == 'color_size' && !in_array($first_color['f_size'],array('NONE','FS')) && $product['f_products_category1'] == 'shoes');
503             $is_color_size_other = ($type == 'color_size' && !in_array($first_color['f_size'],array('NONE','FS')) && $product['f_products_category1'] != 'shoes');
504             $is_color_size_cup = ($type == 'color_size_cup' && $first_color['f_size'] != 'NONE');
505             $is_default = ($type == 'color_size' && in_array($first_color['f_size'],array('NONE','FS')) && $product['f_products_category1'] != 'shoes');
506             $is_normal = ($type == '');
507 
508             //xsell products
509             $query_xsell ="
510                         SELECT a.xsell_products_id FROM `toc_products_xsell` a
511                         LEFT JOIN toc_products p on p.products_id = a.xsell_products_id
512                         LEFT JOIN toc_products_price pp on pp.products_id = p.products_id
513                         WHERE a.products_id =:id AND p.products_status = 1 and pp.f_company_code=:company and pp.f_price_code =:pcode
514                         AND pp.f_date_from<= CURDATE() and ( pp.f_date_to>= CURDATE() OR pp.f_date_to is null ) AND

Stack Trace

#12
+
 /var/www/html/hai-o_rep_ie/index.php(20): CApplication->run()
15 defined('YII_DEBUG') or define('YII_DEBUG',true);
16 // specify how many levels of call stack should be shown in each log message
17 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
18 
19 require_once($yii);
20 Yii::createWebApplication($config)->run();
2024-03-29 00:30:50 Apache Yii Framework/1.1.14