<?php } else { ?> <!--套餐--> <?php // key是set_id $order 是该套餐对应产品的数组 $productSets = array(); foreach ($orderProduct as $k => $order) { $productSets[$order['set_id']][] = $order; } ?> <?php foreach ($productSets as $key => $productSet) { ?> <div class="order-category"><?php echo ProductSetClass::GetProductSetName($this->companyId, $key); ?> </div> <?php foreach ($productSet as $order) { ?> <div class="order-product"> <div class="order-product-left"><img src="<?php echo $order['main_picture']; ?> " /></div> <div class="order-product-right"> <div class="right-up"><?php echo $order['original_price']; ?> </div>
<?php } else { ?> <!--套餐--> <?php // key是set_id $order 是该套餐对应产品的数组 $productSets = array(); foreach ($orderProduct as $k => $order) { $productSets[$order['set_id']][] = $order; } ?> <?php foreach ($productSets as $key => $productSet) { ?> <div class="order-category"><?php echo ProductSetClass::GetProductSetName($key); ?> </div> <?php foreach ($productSet as $order) { ?> <div class="product"> <div class="product-up"> <!--original_price 表示套餐产品的名称--> <div class="product-up-left"><?php echo $order['original_price']; ?> </div> </div> <div class="product-middle select-taste" data-id="<?php echo $order['lid'];