CMXX - Checkout and Placeorder
This commit is contained in:
@@ -43,6 +43,19 @@ if (isset($post_content['product']) && $post_content['product'] != '' && isset($
|
||||
$options_weight = 0;
|
||||
$options = $result['selected_items'];
|
||||
|
||||
//------------------------------------------
|
||||
// ADD Product categories
|
||||
//------------------------------------------
|
||||
$cat_products = ioAPIv2('/v2/products_categories/status=1&product_id='.$product_ID,'',$clientsecret);
|
||||
$cat_products = json_decode($cat_products,true);
|
||||
|
||||
$cat_input = '';
|
||||
foreach($cat_products as $cat_product_id){
|
||||
$cat_input .= $cat_product_id['rowID'].',';
|
||||
}
|
||||
$categories = substr($cat_input,0,-1);
|
||||
|
||||
|
||||
$products_validated = [
|
||||
'id' => $product_in_cart['rowID'],
|
||||
'meta' =>
|
||||
@@ -50,6 +63,7 @@ if (isset($post_content['product']) && $post_content['product'] != '' && isset($
|
||||
"img" => $product_in_cart['full_path'],
|
||||
"name" => $product_in_cart['productname'],
|
||||
"productcode" => $product_in_cart['productcode'],
|
||||
"category_ids" => $categories
|
||||
],
|
||||
'quantity' => $quantity,
|
||||
'options' => [$options],
|
||||
|
||||
Reference in New Issue
Block a user