$response, ‘http_code’ => $http_code, ‘error’ => $error];
}
// Custom category groups
$custom_categories = [
‘Sweets’ => [‘Sweets’, ‘Cookies’],
‘Savouries’ => [‘Savouries’, ‘Mixture’, ‘Chips’],
‘Murukku’ => [‘Murukku’],
‘Chikki’ => [‘Chikki’],
“90’s Special” => [“90s Special”],
‘Pickle’ => [‘Pickle’, ‘Ready Mix’, ‘Health Mix’],
‘Puppads’ => [‘Pappads’, ‘Vanthal’, ‘Podi’],
‘Combo’ => [‘Combo’]
];
// Fetch all WooCommerce categories
$cat_url = $base_url . “products/categories?per_page=100&consumer_key=$consumer_key&consumer_secret=$consumer_secret”;
$cat_result = fetch_from_api($cat_url);
$categories = [];
if ($cat_result[‘http_code’] == 200) {
$categories = json_decode($cat_result[‘response’], true);
} else {
echo “
Failed to fetch categories: ” . htmlspecialchars($cat_result[‘error’]) . “
“;
exit;
}
?>
$subcategories) {
$anchor_id = str_replace([‘ ‘, “‘”, ‘’’], ”, $group_name);
?>
; ?>” width=”100″ height=”100″>
</div>
<div style=) = htmlspecialchars($product['id']); ?>
|
= htmlspecialchars($product['name']); ?>
₹ = number_format(htmlspecialchars($product['regular_price'] ?? ''),2); ?>
₹ = number_format(htmlspecialchars($product['price'] ?? ''),2); ?>
₹ 0.00
|