Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Today
  3. Hi, Did you use another theme? if yes, you need to change the \themes\your-theme-name\templates\checkout\_partials\order-confirmation-table.tpl file, and set the "Template compilation" as my screenshot. Best regards.
  4. Yesterday
  5. Buenas, a ver si me pueden dar una mano con esto. Estoy intentando hacer algo totalmente basico pero por alguna razon me da dolor de cabeza. Php 8.1 PS8.2 Mediante API estoy intentando actualizar SOLO PRECIOS de productos mediante la busqueda por codigo de referencia. Hace todo perfecto, ya lo he desglozado completo. Trae el ID genero un GET del XML completo, quito los campos de solo lectura. Pero cuando voy a querer modificar el campo PRICE me devuelve que no lo encuentra, por ende no modifica nada en el PUT. Estoy seguro que es una gansada. <?php // Configuración de conexión $apiUrl = 'https://steelblue-mallard-865660.hostingersite.com/api/'; $apiKey = 'M21TET828765SFVGY65GXM1IM5NFX3VQ'; // Referencia del producto que queremos obtener $productReference = '7500435142557'; // Cambia este valor según el producto a buscar $price = '15230.00'; // Nuevo precio del producto /** * Realiza una llamada GET para obtener el ID del producto mediante su referencia. */ function getProductIdByReference($reference, $apiUrl, $apiKey) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $apiUrl . "products/?filter[reference]=$reference"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($ch, CURLOPT_USERPWD, $apiKey . ':'); $response = curl_exec($ch); curl_close($ch); // Validar la respuesta if (!$response || stripos($response, '<?xml') !== 0) { exit("Error: Respuesta no válida para obtener el ID del producto.\n$response"); } $xml = simplexml_load_string($response); if ($xml === false) { exit("Error al analizar el XML para obtener el ID del producto."); } return (int) $xml->products->product[0]['id']; } /** * Realiza una llamada GET para obtener los detalles completos de un producto mediante su ID. */ function getProductDetails($productId, $apiUrl, $apiKey) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $apiUrl . "products/$productId"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($ch, CURLOPT_USERPWD, $apiKey . ':'); $response = curl_exec($ch); curl_close($ch); // Validar la respuesta if (!$response || stripos($response, '<?xml') !== 0) { exit("Error: Respuesta no válida para obtener los detalles del producto.\n$response"); } $xml = simplexml_load_string($response); if ($xml === false) { exit("Error al analizar el XML de los detalles del producto."); } return $xml; } /** * Modifica el valor del campo <price> existente en el XML del producto. */ function updatePriceInXml($productDetails, $price) { // Verificar si el nodo <price> existe if (isset($productDetails->price)) { $productDetails->price[0] = "<![CDATA[$price]]>"; return $productDetails->asXML(); } exit("Error: El campo <price> no se encontró en el XML del producto."); } // Obtener el ID del producto por referencia $productId = getProductIdByReference($productReference, $apiUrl, $apiKey); if (!$productId) { exit("No se pudo obtener el ID del producto para la referencia $productReference."); } // Obtener los detalles completos del producto $productDetails = getProductDetails($productId, $apiUrl, $apiKey); if (!$productDetails) { exit("No se pudieron obtener los detalles del producto con ID $productId."); } // Eliminar campos de solo lectura unset($productDetails->position_in_category); unset($productDetails->manufacturer_name); unset($productDetails->quantity); // Modificar el campo <price> $updatedXml = updatePriceInXml($productDetails, $price); // Mostrar el XML final con el precio actualizado header('Content-Type: application/xml'); echo $updatedXml; ?> Lo he hecho aproposito lo mas "a prueba de tontos" posible para ver si me doy cuenta pero no. Espero puedan ayudarme
  6. As explained, you can use any extension you like, but no browser or search engine will read it. The only real information about the type of image to be displayed is the MIME type. Test your site with pagespeed and you won't get any errors on the image format, even if the extension is .jpg, if your image is in WebP. All CDNs that automatically transform images don't change the file extension at all, to avoid unnecessary processing and redirection errors, and yet it works perfectly. It's like DPI on images, it doesn't matter on the web.
  7. Hi, if the official documentation announces precise compatibilities, it's not a whim of the developers or a lack of time, just that we're certain of this data. Attempting to use other versions of PrestaShop means exposing yourself to problems, since they have not been tested and may, in some cases, cause your store to crash. PrestaShop version 9 will be compatible with more recent versions of PHP, which will oblige all third-party module developers to adapt their code to be compatible, which is absolutely not the case with PrestaShop 8. So, no, PrestaShop is neither PHP 8.2 nor 8.3 compatible, and even if you don't encounter any problems using it, there's nothing to prove that others won't have problems. So stick to the rules - you're under no obligation to switch to the latest versions of PHP. And those who talk to you about security risks, ask them to hack your site on an old PHP version and wait, because I'm saving you time, they'll never manage it.
  8. Hi, If you don't want to switch to the latest version of PrestaShop and keep your theme while benefiting from the latest PHP versions, you can take a look at PhenixSuite
  9. PhenixSuite est très tolérant PHP 5.6 à 8.3 Mysql 5.7 ou 8 MariaDB 10.0.5 => No limit.
  10. Hard to tell, if your shop is clean and has no core modifications, a 1 click upgrade may work, but it must be done as an upgrade to 1.6.1.24 version, I'm not sure if the upgrade module still allows for this.
  11. I am concerned 1 Click Upgrade might not work given this. What do you think?
  12. Old indeed. Not allowing the customers to register with weird characters in names was fixed years ago
  13. It is actually pretty old now that I look into it. Version 1.6.1.9 I also notice when I look at the auto upgrade checklist that the PHP is also needing upgrade
  14. En la versión móvil de mi página aparece tras los nuevos productos mostrados el botón "Todos Los Productos En Oferta" y debería de poner "Todas Las Novedades". Quisiera cualquier ayuda para poder cambiar dicho botón, he mirado en traducciones y no encuentro dónde está. Además dicho botón sólo aparece en la versión móvil, en la versión pc no sale y quería saber cómo puedo incluirlo en la web que además sea operativo como el de la versión móvil. La web es: www.tupuntohot.com Adjunto imagen de dicho botón.
  15. Quelles sont les exigences d'hébergement (PHP, Mysql, MariaDb) de PhenixSuite?
  16. Всем доброго времени суток! При знакомстве с новым движком, редактируя интернет-магазин, возникли трудности. На сайте есть Яндекс карта с метками магазинов, но я не могу её отредактировать или удалить, потому что не вижу. Карта в виде кода, полагаю, но вот не могу его найти. PrestaShop 1.7.5.2 Также, мне необходимо подключить интеграцию, так как были изменены реквизиты, но сайт с банком не в коннекте, как выяснилось. Мной был подключен модуль "оплата переводом", с указанием необходимых данных, но пока нет уверенности, что это именно то, что нужно. Прошу подсказать знающих!
  17. Hi, Installing a captcha on PrestaShop has become indispensable.
  18. Hello all, would someone recommend me how to update PaymentModule.php (I guess that should be the one, as far as I search over forums) to copy the message content into the note stored in the note cell of ps_order table? I guess it should be somewhere here ... if (!empty($message)) { $msg = new Message(); $message = strip_tags($message, '<br>'); if (Validate::isCleanHtml($message)) { if (self::DEBUG_MODE) { PrestaShopLogger::addLog('PaymentModule::validateOrder - Message is about to be added', 1, null, 'Cart', (int) $id_cart, true); } $msg->message = $message; $msg->id_cart = (int) $id_cart; $msg->id_customer = (int) ($order->id_customer); $msg->id_order = (int) $order->id; $msg->private = 1; $msg->add(); } }
  19. @PMShop, my original line is <?php if ($_smarty_tpl->tpl_vars['subtotals']->value['tax']['label'] !== null) {?> I have changed it to <?php if (isset($_smarty_tpl->tpl_vars['subtotals']->value['tax']) && $_smarty_tpl->tpl_vars['subtotals']->value['tax'] !== null && isset($_smarty_tpl->tpl_vars['subtotals']->value['tax']['label'])) { ?> Now the error is gone on the original checkout but I assume that it will return after I clean cache in the future or something like that. Unfortanately I still have 'TECHNICAL ERROR- Request Failed' errors in the SuperCheckout even with Debug being turned off. Do you know what might cause that problem? During upgrade I have also updated the original theme. @ST-THEMES, I have checked your solution first but I still had the problem on the original checkout after clearing cache. The solution I have mentioned above worked but the change was made in the var/cache file so I assume that the problem will return after clearing the cache in the future.
  20. What is your PrestaShop version? Invalid names should not be allowed to create a customer account in the first place.
  21. Wersje php jak najbardziej możesz zmienić na 8.1 jak to nie pomoże to prawdopodobnie był edytowany jakiś plik lub moduł stąd tylko treść -1 któa może pochodzić np. z jakiego printa.
  22. Thanks for your answer, do you know a module who provide these features?
  23. Hi, any chance to fix tax rule for shipping costs ? 0% VAT applies to products but not to shipping costs.
  24. Hi, Are you using any cache module or sever-side plugin to speed your site? try to disable them. Best regards.
  1. Load more activity
×
×
  • Create New...