fixes to conflicts in config based settings #13

Merged
erwin merged 1 commits from erwin_branch into main 2024-02-16 11:21:46 +08:00
3 changed files with 4 additions and 3 deletions
Showing only changes of commit 431336cf14 - Show all commits

View File

@ -1,7 +1,8 @@
<?php
include "functions.php";
$productId = $_GET['id'];
$curl = curl_init();
$url = 'https://api.obanana.shop/api/v1/products/'.$productId;
$url = "https://".$_SESSION["data_endpoint"]."/api/v1/products/".$productId;
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt_array($curl, array(
//CURLOPT_URL => 'https://api.obanana.shop/api/v1/products/656717579624f6181c49cdda',

View File

@ -171,7 +171,7 @@ $products = productList();
if (isset($product['product_image']) && !empty($product['product_image'])) {
echo '<img src="' . $product['product_image'] . '" alt="Product Image" class="prod-img" >';
} else {
echo '<img src="assets/img/vendor/u1.jpg" class="prod-img rounded-circle" alt="Placeholder Image" >';
echo '<img src="admin/assets/img/vendor/u1.jpg" class="prod-img rounded-circle" alt="Placeholder Image" >';
}
?></td>
<td><span><?php echo $product['product_name']; ?></span></td>

View File

@ -485,7 +485,7 @@ $array = json_decode($result, true);
formData.append('category', 'product');
formData.append('image', resizedFile);
fetch('https://api.obanana.shop/api/v1/upload_image', {
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/upload_image', {
method: 'POST',
body: formData
})