CMXX - Checkout and Placeorder

This commit is contained in:
“VeLiTi”
2025-02-17 19:01:04 +01:00
parent 2072250072
commit 3aaa6c6680
26 changed files with 3148 additions and 4 deletions

View File

@@ -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],