Merge pull request 'fixes to conflicts in config based settings' (#13) from erwin_branch into main

Reviewed-on: #13
This commit is contained in:
erwin 2024-02-16 11:21:46 +08:00
commit 5ad26fa20b
3 changed files with 4 additions and 3 deletions

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
})