added new form for store item

This commit is contained in:
franknstayn
2020-03-19 22:37:08 +08:00
parent e57209bc64
commit bca94e54cc
7 changed files with 176 additions and 4 deletions

View File

@@ -496,6 +496,36 @@ class TeamStoreController extends Controller {
}
}
}elseif($product_form == "number-jersey-shorts-form"){
$order_number = $post['order_number'];
$order_jersey_size = $post['order_jersey_size'];
$order_shorts_size = $post['order_shorts_size'];
foreach($order_number as $key => $val){
if($order_jersey_size[$key] == "none" || $order_shorts_size[$key] == "none"){
$final_price = $ProductPrice / 2;
}else{
$final_price = $ProductPrice;
}
$items[] = array(
'ProductId' => $product_id,
'StoreURL' => $store_url,
'StoreId' => $store_id,
'FormUsed' => $product_form,
'CartKey' => $cartKey,
'DesignCode' => $design_code,
'ProductURL' => $ProductURL,
'ProductName' => $product_name,
'Number' => $order_number[$key],
'JerseySize' => $order_jersey_size[$key],
'ShortsSize' => $order_shorts_size[$key],
'Price' => $final_price,
'Quantity' => 1
);
}
}
$i = $m->insertToCart($items);