Production release

This commit is contained in:
“VeLiTi”
2025-08-12 15:04:56 +02:00
parent 580f835fff
commit 60a32a7ff9
33 changed files with 2030 additions and 5494 deletions

View File

@@ -40,6 +40,11 @@ $products = ioAPIv2('/v2/catalog/'.$url_input,'',$clientsecret);
$products = json_decode($products,true);
$total_products = count($products);
//SORT BY NAME
usort($products, function($a, $b) {
return strcmp($a['productname'], $b['productname']);
});
//INCLUDE THE HEADER
$view = template_header($products_text,'');
@@ -94,14 +99,14 @@ $view .= '</form>
<div class="product-grid">';
foreach ($products as $product){
// Ensure product price is a numeric value
$product_price = isset($product['price']) && $product['price'] > 0 ? floatval($product['price']) : 0.00;
//SHOW LARGE PICTURE
$view .= '
<div class="product-card">
<a href="'.url('index.php?page=product&rowID=' . ($product['url_slug'] ? ($product['url_slug'] ) : $product['rowID'])).'" id="'.$product['rowID'].'A" class="product">
<a href="'.url('index.php?page=product&rowID=' . ($product['url_slug'] ? ($product['url_slug'] ) : $product['rowID'])).(!empty($product['main_option_for_display']) ? '/'.$product['main_option_for_display']:'').'" id="'.$product['rowID'].'A" class="product">
<img src="'.img_url.$product['full_path'].'" id="'.$product['rowID'].'" width="" height="250" alt="'.(${$product['productname']} ?? $product['productname']).'">
</a>';
@@ -171,7 +176,7 @@ $view .= '</form>
if (isset($product_price)){
$view .= '<span class="products_price" id="'.$product['rowID'].'C">'.(($product_price != 0.00) ? currency_code.number_format($product_price,2) : '').'';
$view .= '<span class="products_price" id="'.$product['rowID'].'C">'.(($product_price != 0.00) ? '<span class="price-from">'.$price_from.' </span>'.currency_code.number_format($product_price,2) : '').'';
if (isset($product['rrp']) && $product['rrp'] > 0){
$view .= '<span class="products_rrp">'.currency_code.number_format($product['rrp'],2).'</span>';