Example #1
0
				</div>
				<div class="right-down">
				<font color="#ff8c00"><?php 
                    echo yii::t('app', '口味要求');
                    ?>
</font>:<?php 
                    $productTasteIds = TasteClass::getOrderTaste($order['lid'], 2, $this->companyId);
                    if ($productTasteIds) {
                        foreach ($productTasteIds as $id) {
                            echo TasteClass::getTasteName($id) . ' ';
                        }
                    }
                    ?>
 <?php 
                    echo yii::t('app', '备注:');
                    echo TasteClass::getOrderTasteMemo($order['lid'], 2, $this->companyId);
                    ?>
				</div>
			</div>
			<div class="clear"></div>
		</div>
			<?php 
                }
                ?>
		<?php 
            }
            ?>
		<?php 
        }
        ?>
	<?php 
Example #2
0
/例 X <font color="#ff8c00"><?php 
                    echo $order['amount'];
                    ?>
例</font></div>
				</div>
				<div class="right-down">
				<font color="#ff8c00">口味要求</font>:<?php 
                    $productTasteIds = TasteClass::getOrderTaste($order['lid'], 2, $dpid);
                    if ($productTasteIds) {
                        foreach ($productTasteIds as $id) {
                            echo TasteClass::getTasteName($id) . ' ';
                        }
                    }
                    ?>
 备注:<?php 
                    echo TasteClass::getOrderTasteMemo($order['lid'], 2, $dpid);
                    ?>
				</div>
			</div>
			<div class="clear"></div>
		</div>
			<?php 
                }
                ?>
		<?php 
            }
            ?>
		<?php 
        }
        ?>
	<?php 
 public function actionProductTasteAll()
 {
     $lid = Yii::app()->request->getParam('lid', 0);
     $companyId = Yii::app()->request->getParam('companyId');
     $isall = Yii::app()->request->getParam('isall', '0');
     if ($isall == '1') {
         $tastegroups = TasteClass::getAllOrderTasteGroup($companyId, '1');
         $orderTastes = TasteClass::getOrderTaste($lid, '1', $companyId);
         $tasteMemo = TasteClass::getOrderTasteMemo($lid, '1', $companyId);
         $orderId = $lid;
     } else {
         $tastegroups = TasteClass::getProductTasteGroup($lid, $companyId);
         $orderTastes = TasteClass::getOrderTaste($lid, '2', $companyId);
         $tasteMemo = TasteClass::getOrderTasteMemo($lid, '2', $companyId);
     }
     $this->renderPartial('tastedetailall', array('tastegroups' => $tastegroups, 'orderTastes' => $orderTastes, 'tasteMemo' => $tasteMemo));
 }
Example #4
0
 public function actionGetTasteJson()
 {
     $tasteArr = array();
     $type = Yii::app()->request->getParam('type');
     $id = Yii::app()->request->getParam('id');
     if ($type == 1) {
         //全单口味
         $allOrderTastes = TasteClass::getAllOrderTaste($this->companyId, $type, $this->companyId);
     } elseif ($type == 2) {
         //产品口味
         $productId = Yii::app()->request->getParam('productId');
         $allOrderTastes = TasteClass::getProductTaste($productId, $this->companyId);
     }
     $tasteMemo = TasteClass::getOrderTasteMemo($id, $type, $this->companyId);
     $orderTastes = TasteClass::getOrderTaste($id, $type, $this->companyId);
     $tasteArr['taste'] = $allOrderTastes;
     foreach ($allOrderTastes as $key => $val) {
         if (in_array($val['lid'], $orderTastes)) {
             $tasteArr['taste'][$key]['has'] = 1;
         } else {
             $tasteArr['taste'][$key]['has'] = 0;
         }
     }
     $tasteArr['taste_memo'] = $tasteMemo;
     Yii::app()->end(json_encode($tasteArr));
 }