PHP notice

Undefined index: dropdown

/ext_disk1/html/mudics_shop/mudics_shop/mudics-shop/protected/views/store/buyPanel.php(858)

846 
847         foreach ($custom_field as $item) {
848             if(!empty($item['hint'])){
849                 echo "<i class='fa fa-info-circle'></i><span>{$item['hint']}</span>";
850             }
851             echo "<div class='input-group'>";
852             echo "<span class='input-group-addon'>{$item['label']}</span>";
853 
854             $prev_value = '';
855             if (isset($olddata[$item['label']])) {
856                 $prev_value = $olddata[$item['label']];
857             }
858             if ($item['dropdown']) {
859                 $data = [];
860                 $default = false;
861                 $list = explode("\r\n", json_decode($item['list']));
862                 foreach ($list as $value) {
863                     if(!$default) $default = $value;
864                     $data[$value] = $value;
865                 }
866                 echo CHtml::dropDownList('data' . $field_counter, $default, $data, array(
867                     'label' => $item['label'],
868                     'class' => 'form-control data_field',
869                     'id' => $field_counter
870                 ));

Stack Trace

#3
+
 /ext_disk1/html/mudics_shop/mudics_shop/mudics-shop/protected/components/Controller.php(322): CController->renderPartial("buyPanel", array("product" => Product, "options" => array(ProductOption, ProductOption, ProductOption), "custom_field" => array(array("label" => "必填欄位", "hint" => "可以隨便填", "encrypt" => false))), true, false)
317                 $this->view_partial = array_merge($this->view_partial, array($view));
318             else
319                 $this->view_partial = array($view);*/
320             $this->view_partial = $view;
321             if($return)
322                 return parent::renderPartial($view,$data,$return,$processOutput);
323             else
324                 echo parent::renderPartial($view,$data,$return,$processOutput);
325     }
326         
327         protected function beforeRender($view)
#4
+
 /ext_disk1/html/mudics_shop/mudics_shop/mudics-shop/protected/controllers/StoreController.php(2273): Controller->renderPartial("buyPanel", array("product" => Product, "options" => array(ProductOption, ProductOption, ProductOption), "custom_field" => array(array("label" => "必填欄位", "hint" => "可以隨便填", "encrypt" => false))), true)
2268 
2269         return $this->renderPartial('buyPanel', array(
2270             'product' => $product,
2271             'options' => $product->options,
2272             'custom_field' => $custom_field
2273         ), true);
2274     }
2275     
2276     public function parseProductOption($source, $content, $index, $limit, &$result)
2277     {
2278         if($limit == $index){
#5
+
 /var/www/theme/mudics_shop_theme/classic09/store/product.php(61): StoreController->getBuyWidget("242")
56             <div class="row">
57                 <div class="col-md-6">
58                     <h3><?php echo Mu::t('mudics', 'Product Description');?></h3>
59                     <div class="separator-2"></div>
60                     <?php echo $product->short_description;?>
61                     <?php echo $this->getBuyWidget($product->id);?>
62                 </div>
63                 <div class="col-md-6">
64                     <div class="owl-carousel content-slider-with-controls">
65 
66                     <?php
2024-03-29 06:59:52 Apache/2.2.15 (CentOS) Yii Framework/1.1.14
DB Profiling Summary Report (Query count: 71, Total query time: 0.28472s)
Procedure Count Total (s) Avg. (s) Min. (s) Max. (s)
UPDATE `missing_translation` SET `id`=:yp0, `timestamp`=:yp1, `controller`=:yp2, `action`=:yp3, `view`=:yp4, `language`=:yp5, `category`=:yp6, `message`=:yp7, `handled`=:yp8 WHERE `missing_translation`.`id`='2553'. Bound with :yp0='2553', :yp1='2016-06-28 14:15:28', :yp2='store', :yp3='product', :yp4='product', :yp5='zh_tw', :yp6='models/InStockNotificationForm', :yp7='Email', :yp8=0 3 0.09267 0.03089 0.02910 0.03420
INSERT INTO pcounter_users VALUES ("'44.204.204.14'", 1711666792) ON DUPLICATE KEY UPDATE user_time=1711666792 1 0.04748 0.04748 0.04748 0.04748
UPDATE `missing_translation` SET `id`=:yp0, `timestamp`=:yp1, `controller`=:yp2, `action`=:yp3, `view`=:yp4, `language`=:yp5, `category`=:yp6, `message`=:yp7, `handled`=:yp8 WHERE `missing_translation`.`id`='2551'. Bound with :yp0='2551', :yp1='2016-06-28 13:30:48', :yp2='store', :yp3='product', :yp4='product', :yp5='zh_tw', :yp6='views/store/buyPanel', :yp7='Email', :yp8=0 1 0.03211 0.03211 0.03211 0.03211
UPDATE `product` SET `visits`=`visits`+1 WHERE `product`.`id`=242 1 0.03051 0.03051 0.03051 0.03051
SELECT * FROM `missing_translation` `t` WHERE `t`.`action`=:yp0 AND `t`.`controller`=:yp1 AND `t`.`view`=:yp2 AND `t`.`language`=:yp3 AND `t`.`category`=:yp4 AND `t`.`message`=:yp5 LIMIT 1. Bound with :yp0='product', :yp1='store', :yp2='product', :yp3='zh_tw', :yp4='models/InStockNotificationForm', :yp5='Email' 3 0.01867 0.00622 0.00400 0.00928
SELECT * FROM `product_meta` `t` WHERE `t`.`product_id`=:yp0 AND `t`.`meta_key`=:yp1 LIMIT 1. Bound with :yp0='242', :yp1='limited_time_enabled' 12 0.00923 0.00077 0.00074 0.00080
SELECT * FROM `missing_translation` `t` WHERE `t`.`action`=:yp0 AND `t`.`controller`=:yp1 AND `t`.`view`=:yp2 AND `t`.`language`=:yp3 AND `t`.`category`=:yp4 AND `t`.`message`=:yp5 LIMIT 1. Bound with :yp0='product', :yp1='store', :yp2='product', :yp3='zh_tw', :yp4='views/store/buyPanel', :yp5='Email' 1 0.00911 0.00911 0.00911 0.00911
SELECT * FROM `product_meta` `t` WHERE ((t.meta_key LIKE :ycp0) OR (t.meta_key LIKE :ycp1)) AND (t.meta_value <= "1711666792" ) ORDER BY t.meta_value. Bound with :ycp0='%on\\_the\\_shelf\\_time%', :ycp1='%off\\_the\\_shelf\\_time%' 1 0.00311 0.00311 0.00311 0.00311
SELECT `product`.`id` AS `t1_c0`, `product`.`product_num` AS `t1_c1`, `product`.`title` AS `t1_c2`, `product`.`short_description` AS `t1_c3`, `product`.`description` AS `t1_c4`, `product`.`vweight` AS `t1_c5`, `product`.`list_price` AS `t1_c6`, `product`.`cost` AS `t1_c7`, `product`.`price` AS `t1_c8`, `product`.`d_order` AS `t1_c9`, `product`.`limited_quantity` AS `t1_c10`, `product`.`hidden` AS `t1_c11`, `product`.`verified` AS `t1_c12`, `product`.`promo_hot` AS `t1_c13`, `product`.`fake_sales` AS `t1_c14`, `product`.`sales` AS `t1_c15`, `product`.`visits` AS `t1_c16`, `product`.`create_time` AS `t1_c17`, `product`.`modify_time` AS `t1_c18` FROM `product` `product` WHERE (`product`.`id`=:ypl0). Bound with :ypl0='242' 3 0.00235 0.00078 0.00077 0.00082
SHOW FULL COLUMNS FROM `product` 1 0.00174 0.00174 0.00174 0.00174
SELECT * FROM `product_option_meta` `t` WHERE `t`.`option_id`=:yp0 AND `t`.`key`=:yp1 LIMIT 1. Bound with :yp0='415', :yp1='min_purchase_amount' 2 0.00173 0.00086 0.00085 0.00088
SELECT * FROM `product_meta` `t` WHERE `t`.`product_id`=:yp0 AND `t`.`meta_key`=:yp1 LIMIT 1. Bound with :yp0='242', :yp1='custom_fields' 2 0.00160 0.00080 0.00077 0.00083
SELECT `options`.`id` AS `t1_c0`, `options`.`product_id` AS `t1_c1`, `options`.`option_num` AS `t1_c2`, `options`.`name` AS `t1_c3`, `options`.`list_price` AS `t1_c4`, `options`.`cost` AS `t1_c5`, `options`.`price` AS `t1_c6`, `options`.`quantity` AS `t1_c7`, `options`.`modify_time` AS `t1_c8` FROM `product_option` `options` WHERE (`options`.`product_id`=:ypl0). Bound with :ypl0='242' 2 0.00157 0.00079 0.00078 0.00079
SHOW FULL COLUMNS FROM `product_option` 1 0.00149 0.00149 0.00149 0.00149
SELECT * FROM `product` `t` WHERE `t`.`id`=242 LIMIT 1 2 0.00148 0.00074 0.00073 0.00075
SHOW FULL COLUMNS FROM `missing_translation` 1 0.00145 0.00145 0.00145 0.00145
SHOW FULL COLUMNS FROM `category` 1 0.00143 0.00143 0.00143 0.00143
SHOW FULL COLUMNS FROM `wp_usermeta` 1 0.00142 0.00142 0.00142 0.00142
SHOW FULL COLUMNS FROM `product_option_meta` 1 0.00136 0.00136 0.00136 0.00136
SHOW FULL COLUMNS FROM `product_meta` 1 0.00130 0.00130 0.00130 0.00130
SHOW FULL COLUMNS FROM `category_meta` 1 0.00128 0.00128 0.00128 0.00128
SHOW FULL COLUMNS FROM `product_category_xref` 1 0.00124 0.00124 0.00124 0.00124
SELECT * FROM `category_meta` `t` WHERE `t`.`category_id`=:yp0 AND `t`.`key`=:yp1 LIMIT 1. Bound with :yp0='11', :yp1='exclusive' 1 0.00116 0.00116 0.00116 0.00116
DELETE FROM `session` WHERE expire<:expire. Bound with :expire=1711666792 1 0.00114 0.00114 0.00114 0.00114
SELECT * FROM `product_meta` `t` WHERE `t`.`product_id`=:yp0 AND `t`.`meta_key`=:yp1 LIMIT 1. Bound with :yp0='242', :yp1='seo_keywords' 1 0.00098 0.00098 0.00098 0.00098
SELECT * FROM `product_meta` `t` WHERE `t`.`product_id`=:yp0 AND `t`.`meta_key`=:yp1 LIMIT 1. Bound with :yp0='242', :yp1='seo_description' 1 0.00097 0.00097 0.00097 0.00097
SELECT * FROM `product_meta` `t` WHERE `t`.`product_id`=:yp0 AND `t`.`meta_key`=:yp1 LIMIT 1. Bound with :yp0='242', :yp1='seo_h2' 1 0.00094 0.00094 0.00094 0.00094
SELECT * FROM `product_meta` `t` WHERE `t`.`product_id`=:yp0 AND `t`.`meta_key`=:yp1 LIMIT 1. Bound with :yp0='242', :yp1='seo_h1' 1 0.00093 0.00093 0.00093 0.00093
SELECT * FROM `product_meta` `t` WHERE `t`.`product_id`=:yp0 AND `t`.`meta_key`=:yp1 LIMIT 1. Bound with :yp0='242', :yp1='seo_title' 1 0.00090 0.00090 0.00090 0.00090
SELECT * FROM `product_option_meta` `t` WHERE `t`.`option_id`=:yp0 AND `t`.`key`=:yp1 LIMIT 1. Bound with :yp0='416', :yp1='max_purchase_amount' 1 0.00090 0.00090 0.00090 0.00090
SELECT * FROM `product_option_meta` `t` WHERE `t`.`option_id`=:yp0 AND `t`.`key`=:yp1 LIMIT 1. Bound with :yp0='415', :yp1='max_purchase_amount' 1 0.00087 0.00087 0.00087 0.00087
SELECT * FROM `product_option_meta` `t` WHERE `t`.`option_id`=:yp0 AND `t`.`key`=:yp1 LIMIT 1. Bound with :yp0='417', :yp1='max_purchase_amount' 1 0.00085 0.00085 0.00085 0.00085
SELECT * FROM `product_option_meta` `t` WHERE `t`.`option_id`=:yp0 AND `t`.`key`=:yp1 LIMIT 1. Bound with :yp0='416', :yp1='min_purchase_amount' 1 0.00085 0.00085 0.00085 0.00085
SELECT * FROM `product_option_meta` `t` WHERE `t`.`option_id`=:yp0 AND `t`.`key`=:yp1 LIMIT 1. Bound with :yp0='417', :yp1='min_purchase_amount' 1 0.00085 0.00085 0.00085 0.00085
SELECT * FROM `product_meta` `t` WHERE `t`.`product_id`=:yp0 AND `t`.`meta_key`=:yp1 LIMIT 1. Bound with :yp0='242', :yp1='image_versions' 1 0.00085 0.00085 0.00085 0.00085
SELECT `categories`.`id` AS `t1_c0`, `categories`.`parent_id` AS `t1_c1`, `categories`.`name` AS `t1_c2`, `categories`.`slug` AS `t1_c3`, `categories`.`description` AS `t1_c4`, `categories`.`hidden` AS `t1_c5`, `categories`.`priority` AS `t1_c6`, `categories`.`deletable` AS `t1_c7` FROM `category` `categories` INNER JOIN `product_category_xref` `categories_categories` ON (`categories_categories`.`product_id`=:ypl0) AND (`categories`.`id`=`categories_categories`.`category_id`). Bound with :ypl0='242' 1 0.00079 0.00079 0.00079 0.00079
SELECT * FROM `product_meta` `t` WHERE `t`.`product_id`=:yp0 AND `t`.`meta_key`=:yp1 LIMIT 1. Bound with :yp0='242', :yp1='pricing_at' 1 0.00079 0.00079 0.00079 0.00079
SELECT `option_level`.`id` AS `t1_c0`, `option_level`.`product_id` AS `t1_c1`, `option_level`.`meta_key` AS `t1_c2`, `option_level`.`meta_value` AS `t1_c3` FROM `product_meta` `option_level` WHERE (meta_key='option_level') AND (meta_key='option_level') AND (`option_level`.`product_id`=:ypl0). Bound with :ypl0='242' 1 0.00078 0.00078 0.00078 0.00078
SELECT * FROM `category` `t` WHERE `t`.`id`=11 LIMIT 1 1 0.00069 0.00069 0.00069 0.00069
SELECT `data` FROM `session` WHERE expire>:expire AND id=:id. Bound with :expire=1711666792, :id='3od30aug1nkak0odjalclm62i1' 1 0.00054 0.00054 0.00054 0.00054
SHOW CREATE TABLE `product_option` 1 0.00052 0.00052 0.00052 0.00052
SHOW CREATE TABLE `product` 1 0.00052 0.00052 0.00052 0.00052
SELECT * FROM `wp_usermeta` `t` WHERE `t`.`user_id` IS NULL AND `t`.`meta_key`=:yp0 LIMIT 1. Bound with :yp0='reseller_code' 1 0.00051 0.00051 0.00051 0.00051
SHOW CREATE TABLE `product_category_xref` 1 0.00046 0.00046 0.00046 0.00046
SHOW CREATE TABLE `wp_usermeta` 1 0.00046 0.00046 0.00046 0.00046
SHOW CREATE TABLE `product_option_meta` 1 0.00044 0.00044 0.00044 0.00044
SHOW CREATE TABLE `product_meta` 1 0.00044 0.00044 0.00044 0.00044
SHOW CREATE TABLE `missing_translation` 1 0.00044 0.00044 0.00044 0.00044
SHOW CREATE TABLE `category` 1 0.00043 0.00043 0.00043 0.00043
SHOW CREATE TABLE `category_meta` 1 0.00041 0.00041 0.00041 0.00041