Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 07/16/2021 in all areas

  1. Compatible with version: Prestashop 1.7+ Tutorial last update: 22/07/2021 Special thanks to following contributor(s): @mfdenis, @Inter Svetainė, @seblyon, @Oelita A while ago i received the question on how to add products programmatically using a PHP file. After looking around in the Prestashop files and searching the worldwide-web i have come up with a working script. I decided to share this code with the Prestashop community. If you have any questions our improvements don't hesitate to ask or say them. The file we are creating can be easily run with a cron-job and is able to fetch data from a page using JSON trough an Ajax call. Lets get started! The first step is creating a new PHP file in your admin folder. Create a new PHP file in the folder yourstore/back-office/FILENAME.php. In our small tutorial we use the filename importmyproduct.php Setting up connection with the config file First we start to check if the global variable _PS_ADMIN_DIR_ is defined. After we check that _PS_ADMIN_DIR_ is defined we will make connection with the prestashop config.inc.php file. So on top of our page we will add following code. <?php // Check if _PS_ADMIN_DIR_ is defined if (!defined('_PS_ADMIN_DIR_')) { // if _PS_ADMIN_DIR_ is not defined, define. define('_PS_ADMIN_DIR_', getcwd()); } // Setup connection with config.inc.php (required for database connection, ...) include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); Adding access security and check if page is setup correctly. Since we do not want that our importmyproduct.php can be easily accessed by strangers we will add a security feature. We will also display our first echo to check if everything is working correctly. After we have setup our secure-key we can visit our PHP page by going to yourstore.com/yourbackoffice/importmyproduct.php?secure_key=yoursecuretoken $secure_key = 'ed3fa1ce558e1c2528cfbaa3f99403'; // Check if the client use the correct secure_key, url to use: www.yourstore.com/yourbackoffice/importmyproduct.php?secure_key=ed3fa1ce558e1c2528cfbaa3f99403 if(!Tools::getValue('secure_key') || Tools::getValue('secure_key') != $secure_key) { // If the secure_key is not set our not equal the php page will stop running. die('UNAUTHORIZED: We dont want you on this page!'); } echo 'Welcome, the secure_key you have used is correct. Now we can start adding product programmatically ... <br>'; Our product import function In this next step we will add our product import function which can be called later on to import a new product. function addProduct($ean13, $ref, $name, $qty, $text, $features, $price, $imgUrl, $catDef, $catAll) { $product = new Product(); // Create new product in prestashop $product->ean13 = $ean13; $product->reference = $ref; $product->name = createMultiLangField(utf8_encode($name)); $product->description = htmlspecialchars($text); $product->id_category_default = $catDef; $product->redirect_type = '301'; $product->price = number_format($price, 6, '.', ''); $product->minimal_quantity = 1; $product->show_price = 1; $product->on_sale = 0; $product->online_only = 0; $product->meta_description = ''; $product->link_rewrite = createMultiLangField(Tools::str2url($name)); // Contribution credits: mfdenis $product->add(); // Submit new product StockAvailable::setQuantity($product->id, null, $qty); // id_product, id_product_attribute, quantity $product->addToCategories($catAll); // After product is submitted insert all categories // Insert "feature name" and "feature value" if (is_array($features)) { foreach ($features as $feature) { $attributeName = $feature['name']; $attributeValue = $feature['value']; // 1. Check if 'feature name' exist already in database $FeatureNameId = Db::getInstance()->getValue('SELECT id_feature FROM ' . _DB_PREFIX_ . 'feature_lang WHERE name = "' . pSQL($attributeName) . '"'); // If 'feature name' does not exist, insert new. if (empty($FeatureNameId)) { Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'feature` (`id_feature`,`position`) VALUES (0, 0)'); $FeatureNameId = Db::getInstance()->Insert_ID(); // Get id of "feature name" for insert in product Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'feature_shop` (`id_feature`,`id_shop`) VALUES (' . $FeatureNameId . ', 1)'); Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'feature_lang` (`id_feature`,`id_lang`, `name`) VALUES (' . $FeatureNameId . ', ' . Context::getContext()->language->id . ', "' . pSQL($attributeName) . '")'); } // 1. Check if 'feature value name' exist already in database $FeatureValueId = Db::getInstance()->getValue('SELECT id_feature_value FROM ' . _DB_PREFIX_ . 'feature_value WHERE id_feature_value IN (SELECT id_feature_value FROM `' . _DB_PREFIX_ . 'feature_value_lang` WHERE value = "' . pSQL($attributeValue) . '") AND id_feature = ' . $FeatureNameId); // If 'feature value name' does not exist, insert new. if (empty($FeatureValueId)) { Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'feature_value` (`id_feature_value`,`id_feature`,`custom`) VALUES (0, ' . $FeatureNameId . ', 0)'); $FeatureValueId = Db::getInstance()->Insert_ID(); Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'feature_value_lang` (`id_feature_value`,`id_lang`,`value`) VALUES (' . $FeatureValueId . ', ' . Context::getContext()->language->id . ', "' . pSQL($attributeValue) . '")'); } Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'feature_product` (`id_feature`, `id_product`, `id_feature_value`) VALUES (' . $FeatureNameId . ', ' . $product->id . ', ' . $FeatureValueId . ')'); } } // add product image. $shops = Shop::getShops(true, null, true); $image = new Image(); $image->id_product = $product->id; $image->position = Image::getHighestPosition($product->id) + 1; $image->cover = true; if (($image->validateFields(false, true)) === true && ($image->validateFieldsLang(false, true)) === true && $image->add()) { $image->associateTo($shops); if (!uploadImage($product->id, $image->id, $imgUrl)) { $image->delete(); } } echo 'Product added successfully (ID: ' . $product->id . ')'; } We also will need a function to handle our image upload, add below following code: This function will insert the image into your store and assign it to your created product. function uploadImage($id_entity, $id_image = null, $imgUrl) { $tmpfile = tempnam(_PS_TMP_IMG_DIR_, 'ps_import'); $watermark_types = explode(',', Configuration::get('WATERMARK_TYPES')); $image_obj = new Image((int)$id_image); $path = $image_obj->getPathForCreation(); $imgUrl = str_replace(' ', '%20', trim($imgUrl)); // Evaluate the memory required to resize the image: if it's too big we can't resize it. if (!ImageManager::checkImageMemoryLimit($imgUrl)) { return false; } if (@copy($imgUrl, $tmpfile)) { ImageManager::resize($tmpfile, $path . '.jpg'); $images_types = ImageType::getImagesTypes('products'); foreach ($images_types as $image_type) { ImageManager::resize($tmpfile, $path . '-' . stripslashes($image_type['name']) . '.jpg', $image_type['width'], $image_type['height']); if (in_array($image_type['id_image_type'], $watermark_types)) { Hook::exec('actionWatermark', array('id_image' => $id_image, 'id_product' => $id_entity)); } } } else { unlink($tmpfile); return false; } unlink($tmpfile); return true; } Multi language support. As you can see in the above code we call the function createMultiLangField() This function make sure we add our product to all available languages on your store. Add the following function to your script. function createMultiLangField($field) { $res = array(); foreach (Language::getIDs(false) as $id_lang) { $res[$id_lang] = $field; } return $res; } The last step And after this all we come at our last step, adding our first programmatically created product. This can be done by calling our function addProduct and pass the necessary values. addProduct( '1234567891234', // Product EAN13 'Tutorial by Crezzur', // Product reference 'Crezzur', // Product name 5, // Product quantity 'Code by Crezzur (https://crezzur.com)', // Product description array( // Product features (array) array("name" => "Color", "value" => "Red"), array("name" => "Height", "value" => "200cm"), ), '999.95', // Product price 'https://crezzur.com/img/crezzur-logo-1544601440.jpg', // Product image 1, // Product default category array(1, 5) // All categorys for product (array) ); For the people that don't want to copy paste all the code we have created a file which contains all of the above the full code file can be found here : https://crezzur.com/en/modules/10-script-for-adding-prestashop-17-products-programmatically Using the code above will allow you to mass import products using a Ajax call (JSON) our using a CSV file. We do not add this code since the variables for each web service will be different. Generate Products Packs In PHP For those searching to import product packs with my code can find more information about this in the topic of @jmauclair A like and/or a thank you for my work is much appreciated
    2 points
  2. 2 points
  3. Today we are glad to release our new version 0.0.4. Since version 0.0.4 a new tab called PS Cleaner has been added. This tab allows you to quickly see which database tables are taking up large amounts of megabytes in your database. All the database tables shown can be emptied without harming your webshop. Most of these tables are used for keeping logs and statistics. That is why you can empty it on a regular basis without any problems.
    2 points
  4. Comme pour +/- tous les codes "saboté" par les namespace en 1.6, il suffit de passer par un code proxy pour éviter que l'eval() ne crashe. Renommer colissimo.php en colissimoModule.php Créer le proxy colissimo.php <?php /* Code proxy to avoid eval crash on namespace */ require_once(_PS_MODULE_DIR_.'colissimo/colissimoModule.php');
    2 points
  5. https://github.com/202-ecommerce/stripe_official/releases/download/2.3.1/v2.3.1-prod-stripe_official.zip
    2 points
  6. We have developed a new module which displays always the same final price, even when different VAT rates are applied. You can purchase it at 👉 https://store.idnovate.com/en/payment/1443-same-price-after-vat-applied-with-different-vat-rates.html 👈 For example, for this product: It will always display €100 as final price. This is the price displayed in Spain: France: Italy: And the information is displayed correctly in the invoice. Spain: France: Italy: If you want you can apply this configuration only for some products, customers, or even only for some countries. In this case the rest of the products/customers/countries will have the same behaviour than before. There's a demo available at 👉 https://store.idnovate.com/en/payment/1443-same-price-after-vat-applied-with-different-vat-rates.html 👈 💣 💣 SPECIAL OFFER: Until the end of this month, get an additional 50% discount introducing the code "VAT" in the checkout.
    2 points
  7. Uma vez que estou sempre a aconselhar a todos os utilizadores desta plantaforma que devem ter uma loja online de testes, vou mostrar como o devem fazer... Se conseguir seguir este tutorial com sucesso para criar uma loja onlinbe de testes, facilmente conseguirá utilza-lo para quando pretende mudar a sua loja do servidor local para o servidor online ou para mudar do servidor online A para o servidor online B, embora nestes casos existam passos diferentes e/ou adicionais. O Tutorial pressupõe que: esteja a utilizar uma versão do Prestashop1.5.x . tenha uma conta de alojamento em que o painel de controlo utilizado seja o Cpanel, que é o mais utilizado pelos serviços de alojamento. saiba utilizar minimamente o Cpanel, especialmente o : File Manager PhpMyadmin Mysql Wizard Nota: se estiver com uma versão inferior a 1.5.x pode tentar utilizar o tutorial tendo em conta que algumas indicações para os Menus no back-office da sua loja online serão diferentes e não precisa de editar a tabela ps_shop_url pois ela não existe nas versões mais antigas. Como proceder: utilizando o File Manager crie uma cópia da pasta actual da sua loja online, mas com um nome diferente. se a sua loja online actual estiver na raiz do public_html copie a pasta /public_html/ para a pasta /public_html/prestashop_clone/ . se a sua loja online actual estiver numa pasta do public_html copie a pasta /public_html/prestashop/ para a pasta /public_html/prestashop_clone/ . [*]entre no back-office da sua actual loja online Prestashop e desactive a mesma, ficando em modo de manutenção em Preferences > Maintenance. [*]no Cpanel, procure pela aplicação PhpMyadmin e seleccione a mesma. Agora que já se encontra dentro da aplicação, efectue um backup da base de dados da loja que quer copiar, seleccionando primeiro a base de dados a copiar na coluna do lado esquerdo e depois utilizando o export do PhpMyadmin. [*]ainda no Cpanel procure pelo Mysql Wizard e crie uma base de dados para nova loja de testes. [*]utilizando o File Manager edite o ficheiro settings.inc.php da nova loja que pode encontrar na pasta prestashop_clone/config/settings.inc.php e substitua os valores abaixo indicados pelos que acabou de criar com o Mysql Wizard. define('_DB_NAME_', 'nome-da-base-dados'); define('_DB_USER_', 'nome-do-utilizador'); define('_DB_PASSWD_', 'password'); define('_PS_DIRECTORY_', '/prestashop_clone/'); [*]importe a base de dados que exportou anteriormente, utilizando o import do PhpMyadmin. [*]ainda no PhpMyadmin edite a tabela ps_configuration e procure por volta do id_configuration 180 encontra PS_SHOP_DOMAIN e PS_SHOP_DOMAIN_SSL onde deve colocar em ambos o nome do seu dominio www.oseudominio.com . [*]Mais abaixo na mesma tabela procure por __PS_BASE_URI__ e coloque o nome da pasta/folder da sua loja /prestashop_clone/ ,não se esqueçendo das barras no inicio e fim. [*]Agora procure pela tabela ps_shop_url e edite a mesma substituindo domain e domain_ssl pelo seu dominio www.oseudominio.com e physical_uri pelo nome da pasta da sua loja /prestashop_clone/ . [*]Agora já pode aceder ao back-office da sua loja www.oseudominio.com/prestashop_clone/admin123 e deve ir á tab Preferences > Seo & Url's e na secção Set Shop Url deve confirmar se o dominio e a pasta da sua loja estão correctos e clicar em Save se estiverem correctos para obrigar o Prestashop a gerar um novo ficheiro .htaccess. [*]Para que o Google e os outros motores não indexem a sua loja online de testes e criem assim conteudo duplicado que irá prejudicar o seu ranking no SEO, proceda da seguinte forma: na raiz da pasta /public_html/prestashop_clone/ procure pelo ficheiro robots.txt ou crie o mesmo se ainda não existir, utilizando o File Manager edite-o e deixe-o apenas com o seguinte conteúdo: # By Exadra37 # Diz aos motores de busca que não deve indexar nenhuma pasta ou ficheiro User-agent: * Disallow: / edite também o ficheiro header.tpl que pode encontrar em /public_html/prestashop_clone/themes/nome-do-tema/header.tpl e por volta da linha 40 encontre: <meta name="robots" content="{if isset($nobots)}no{/if}index,{if isset($nofollow) && $nofollow}no{/if}follow" /> e substitua por <meta name="robots" content="noindex,nofollow" /> [*]Já pode aceder ao seu front-office em www.oseudominio.com/prestashop_clone Espero não me ter esquecido de nenhum passo, mas estejam á vontade para sugerir alterações ou passos adicionais Agora que já tem uma loja online para testes nunca altere nada na loja online de produção sem primeiro experimentar na loja online de testes.
    1 point
  8. 1 point
  9. @arsse I have attached the working child theme from my pc Thank you
    1 point
  10. Faites un override du frontController. Mettre du php dans un tpl c'est ne rien comprendre au modèle MVC...
    1 point
  11. Por ejemplo Apple vende al mismo precio en España que en Francia: Supongo que ellos tienen margen de sobra 😬🤑
    1 point
  12. Bonjour! Voici mon problème et croyez moi, ça fait des jours que je cherche, que je passe en peigne le net, sinon, je vous embêterais pas. J'aimerais intégrer en xhtml qq chose sur la page du produit, c a d la page où on voit chaque produit en grand et en détail (après avoir appuyer sur "voir le produit"), mais je n'arrive pas à trouver le fichier tpl correspondant. Logiquement, ce serait product.tpl, mais je ne vois pas les mêmes choses que je vois en inspectant la page en question avec firebug....Un vrai casse tête... Est-ce que quelqu'un pourrait m'aider , indiquer quel fichier je dois éditer? Merci infiniment!!
    1 point
  13. Ja, wenn du es in den Einstellungen so hinterlegt hast. Du kannst bei den Artikeln einzeln angeben ob der Artikel bestellt werden kann wenn kein Lager besteht oder eben nicht, aber auch global unter Artikel-Voreinstellungen.
    1 point
  14. I haven't tested it but I would assume that the function assignProductList() in /controllers/front/CategoryController.php might a good place to do this. You would then add at the beginning a line like if($this->orderBy == 'id_product") $this->orderWay = "DESC";
    1 point
  15. @AlexTed non dimenticare di contrassegnare il tuo post come soove e fare clic sul pulsante d'amore per mostrare il tuo amore
    1 point
  16. \modules\youmofulr\classes\ClientSqlQueries.php due funzioni che ho modificato public function getClient(int $clientId) { $sql = 'SELECT * FROM '._DB_PREFIX_.'clients as cl INNER JOIN `'._DB_PREFIX_.'customer` as cus ON cus.id_customer = cl.id WHERE cl.id = ' . pSQL($clientId) ; return Db::getInstance() ->executeS( $sql ); } public function getAll() { $sql = 'SELECT * FROM '._DB_PREFIX_.'clients as cl INNER JOIN `'._DB_PREFIX_.'customer` as cus ON cus.id_customer = cl.id '; return Db::getInstance() ->executeS( $sql ); } e yourmodule\views\templates\admin\show.tpl <p><strong>Name:</strong> {$client[0].firstname} </p> spero che ora tu sia in grado di risolvere i problemi grazie
    1 point
  17. @_luk Masz na myśli kategorie domyślną produktu i na tym chcesz bazować? Jeśli tak to kod powinien wyglądać w ten sposób: {if $page.page_name == 'product' && $product.id_category_default == '96'} Jeśli chcesz zobaczyć do jakich zmiennych masz dostęp na danej stronie to polecam poradnik: https://www.youtube.com/watch?v=RyZ-VuiCLuE
    1 point
  18. Suite à ce souci, j'ai changé d'hébergeur.. OVH vers o2 Switch vu les nombreux bons avis. Depuis plus aucun problème de lenteur... En front, ça n'a pas changé fondamentalement la vitesse mais en back, il n'a pas photo, je vous conseille.
    1 point
  19. Wstaw do szablonu {dump($product)} Cenę jednostkową netto możesz wyciągnąć z: ($product.price_without_reduction_without_tax} - cena jednostkowa netto bez rabatu albo ($product.price_with_reduction_without_tax} - cena jednostkowa netto z rabatem Wartość całkowitą netto uzyskasz mnożąc cenę jednostkową netto przez ilość. Wartości z symbolem waluty możesz wyświetlić za pomocą {Context::getContext()->currentLocale->formatPrice($product.price_with_reduction_without_tax, $currency.iso_code)}
    1 point
  20. Si vous souhaitez reporter des problème aux équipes de développement vous pouvez directement le faire sur le github du module https://github.com/PrestaShop/statsbestcustomers
    1 point
  21. Inmiddels opgelost met dank aan Crezzur Een wijziging in .htaccess bleek voldoende.
    1 point
  22. SOLVED The statuses seemed to have replicated when doing the migration Basically it entered several duplicate statuses on the end of the `soft_order_state_lang` 30 onwards were set to the wrong language Language changed i.e from 2 to 1 Everything works perfect now Thanks for all your help, Ive learnt a lot about sql etc today haha
    1 point
  23. Yes it is better to keep folder permission 755 and file permission 644.
    1 point
  24. @freds83 After debug your site, i found the issues is generated from the js. When their is less than 4 product image the slider arrow is hide. In that case you need to find the function serialScrollNbImagesDisplayed in product.js /themes/default-bootstrap/js/product.js to and check the value. Thank you
    1 point
  25. Dans votre product.js il manque l'initialisation du nombre d'image affichée (à ajuster à vos besoins) function serialScrollSetNbImages() { serialScrollNbImagesDisplayed = 4; if ($('#thumbs_list').outerWidth(true) < 194) serialScrollNbImagesDisplayed = 1; else if ($('#thumbs_list').outerWidth(true) < 294) serialScrollNbImagesDisplayed = 2; else if ($('#thumbs_list').outerWidth(true) < 392) serialScrollNbImagesDisplayed = 3; } Il manque également la variable global qui sera utilisée ainsi que le recalcul si resize var serialScrollNbImagesDisplayed; $(window).resize(function(){ serialScrollSetNbImages(); $('#thumbs_list').trigger('goto', 0); serialScrollFixLock('', '', '', '', 0); }); Dès que le plugin jquery est correctement initialisé, tout va mieux
    1 point
  26. Vous dites que le code est en place donc il doit s'afficher, si ce n’est pas le cas alors c'est qu'il y a autre chose invisible pour nous il faut donc plonger dans votre code, prendre le temps d'effectuer des test, analyser les résultat, espérer identifier le souci, mais tout cela demande pas mal de temps à moins que quelqu’un d'autre ait rencontré exactement le même souci que vous et passe lire votre demande.
    1 point
  27. Bonjour, Super ! Merci pour votre aide, ça fonctionne. A+
    1 point
  28. @adrian.sbalsa This is the standard naming convention -> Kirin-Kakeru-Kouri-Gochisousama-wa-Kikoenai-26P-BW-B5 ref : https://louisem.com/3596/how-to-name-images-seo Thank you
    1 point
  29. Bonjour, contactez le support du module car ce n'est pas un module natif à PrestaShop.
    1 point
  30. If it could be useful to someone by modifying the second part of the code (I highlighted in bold what I changed) I was able to solve the problem of the word "Available Available" (twice) under the product: {block name='product_availability'} <span id="product-availability"> {if $product.show_availability && $product.availability_message} {if $product.availability == 'available'} <i class="material-icons rtl-no-flip product-available">&#xE5CA;</i> {$product.availability_message} {elseif $product.availability == 'last_remaining_items'} <i class="material-icons product-last-items">&#xE002;</i> {$product.availability_message} {else} {if !$in_cart} <i class="material-icons product-unavailable">&#xE14B;</i> {$product.availability_message} {/if} {/if} {if !$in_cart} {$product.availability_message} {/if} {/if} </span> {/block} Greetings, Fabrizio.
    1 point
  31. Hello, yes its easily possible. You need to Enter in Backoffice Design->Position tab From there you can change the position of each module. Thanks
    1 point
  32. Je kan hier gebruik maken van de waarden die beschikbaar zijn in de $cart.products. Als je hier een dump op loopt {$cart.products|@var_dump} zie je dat er twee velden beschikbaar zijn namelijk weight_attribute en weight. Je kan deze dan gebruiken in bijvoorbeeld uwwinkel/themes/classic/templates/checkout/_partials/cart-summary.tpl waar je dan uw twee variabele kan toevoegen {block name='cart_summary_product_list'} <div class="collapse" id="cart-summary-product-list"> <ul class="media-list"> {foreach from=$cart.products item=product} <li id="Crezzur"> <b>weight_attribute:</b> {$product.weight_attribute} <br> <b>weight:</b> {$product.weight} </li> <li class="media">{include file='checkout/_partials/cart-summary-product-line.tpl' product=$product}</li> {/foreach} </ul> </div> {/block} zodat je deze weergaven kan zien:
    1 point
  33. You need to enable Intl extension on your server.
    1 point
  34. This module allows you to set a domain for every installed language. That means you can set a domain extension for each installed language. No multistore is needed! Have a unique domain for every language (or country) that you are selling your products. Once you set a domain for every language the module does the following: Removes the language in behind the url Adds a language selector in the front office Rewrites all the urls for the selected language No multistore for multiple urls Front office language selector redirects to corresponding url Upon changing language in front office, you keep your shopping cart Easier to have a domain for their preferred language After installation set the desired URL for each language you have installed. Even when you are using multistore you can set a domain for every language in every multistore. Prestashop's module: Language selector block does not function anymore. But this module has a language selector build in for front office. Download: languageperdomain.zip (Module is for Prestashop 1.7) Updates V1.0.5 - Cross domain issue fix for images and stylesheets / javascript Please consider donating and liking this post
    1 point
  35. This latest Version will not the solve the issue causing this problem. The problem is with the Default Classic Theme. For those who are having the same problem - Check the link below to find out the solution. https://www.h-hennes.fr/blog/2021/03/15/prestashop-ajouter-un-captcha-sur-linscription-a-la-newsletter/ Or, You can change the file /server_folder/themes/classic//modules/ps_emailsubscription/views/templates/hook/ps_emailsubscription.tpl {if $conditions} <p>{$conditions nofilter}</p> {/if} {if $msg} to {if $conditions} <p>{$conditions nofilter}</p> {/if} {hook h='displayNewsletterRegistration'} {if $msg} Just adding this {hook h='displayNewsletterRegistration'} code there in between. Then delete the "Prod" folder in root>ver>cache That's it. It should work now with the default theme. Thanks
    1 point
  36. Only small improvement, because there is 2x ImageManager::checkImageMemoryLimit That can speed up things a little bit 😉 I also deleted the commented code at the beginning. ImageManager.php
    1 point
  37. Thank you very much for your reply, I saw that the problem is from a module and I deleted the module. Thanks again.
    1 point
  38. Problème résolu. En faite je pouvais activer l'option mais malgré le message d'erreur, j'ai basculé de chez Ionos à PlanetHoster et je n'ai plus ce message d'erreur. Pour ce qui est des photos, le problème est aussi réglé (il y avait un mauvais paramétrage des URL)
    1 point
  39. Aha! For anyone else with this problem, I've been poking in the prestashop files and found they've defined a Modules path in Twig. So you can do return $this->get('twig')->render('@Modules/foo/views/assets-customers.twig',[ .... ]); and then put your twig file in modules/foo/views/
    1 point
  40. Hola a todos. Llegué hasta este hilo buscando una solución al mismo problema y me apena que luego de tanto tiempo no se haya registrado una solución. Sin embargo, como ya la encontré en otros sitios web en inglés, no quiero simplemente dar la espalda y dejar este hilo sin dejar al menos los enlaces que utilicé para dar con la solución. Antes que todo, quiero igualmente aclarar que el mensaje de error de Token no válido mencionado por Julian y que dio motivo para abrir este hilo, también me estaba ocurriendo a mí reiteradamente e intuyo fue originado (en mi caso) por 2 errores que estaba generando mi tienda PrestaShop 1.7. Para llegar conocer con mayor detalle el tipo de error, puse en modo debug mi tienda encontrando un tipo de error como este: Uncaught Exception: Unable to generate a URL for the named route "admin_link_block_list" as such route does not exist Para solucionar esto, como lo sugirió el sitio de la solución, eliminé el contenido de la carpeta "cache" que se encuentra en la siguiente ruta entrando por cPanel: ...[carpetadeinstalacióndetienda]/var/cache Además, en el archivo [sutienda].php.error.log que se encuentra dentro de la carpeta home/logs entrando mediante cPanel, encontré este error que se me repetía en varias líneas: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted Por lo que empecé a buscar soluciones, y en el otro sitio donde encontré la solución, se resolvió incrementando el memory_limit de 32M a 512M en el archivo php.ini (ni siquiera a 1024M o 1G como lo sugería el post de la solución. Y fue suficiente). Ya no me ha aparecido ningún error ni el mensaje del Token no válido (hasta ahora). Les dejo los enlaces que leí antes de tomar acción para solucionar ambos errores: - https://www.prestashop.com/forums/topic/949869-uncaught-exception-unable-to-generate-a-url-for-the-named-route-admin_link_block_list-as-such-route-does-not-exist/ - https://www.airpair.com/php/fatal-error-allowed-memory-size Disculpen si este texto no está bien estructurado y no se entienda bien, en todo caso creo que servirá a aquellos que lleguen a este hilo sin aún tener la solución a este tipo de errores. Saludos.
    1 point
  41. Trovo che la pagina dei risultati della ricerca su PS1.7 sia fatta veramente male. Sapete indicarmi qual'è il file da usare per poterla modificare? Ho trovato questo file (/themes/classic/templates/catalog/listing/search.tpl), però modificandolo non mi sembra che cambi qualcosa nella pagina dei risultati. Come prima cosa vorrei cambiare il titolo "Risultati ricerca" e mettere qualcosa di più esplicativo, del tipo: - Risultati ricerca per "PAROLA CERCATA" oppure Abbiamo trovato X risultati con "PAROLA CERCATA" Poi vorrei anche togliere il blocco con il campo ricerca "Ci scusiamo per l'inconveniente. Prova a fare nuovamente la ricerca" che è lo stesso mostrato quando una pagina non è stata trovata. Qualcuno mi può aiutare?
    1 point
  42. Aunque es una guía de inicios de 2017 (la que tengo en mi blog), posiblemente seguirá funcionando. https://victor-rodenas.com/migrar-tu-tienda-de-local-a-internet-bajo-prestashop-1-7/
    1 point
  43. Hola Javier Campos, Sin entrar en detalle de la consulta, te puedo adelantar que los campos mayor-menor y menor-mayor los tienes cruzados. WHERE o.date_upd < '2017-09-13' AND o.date_upd > '2017-09-15' Debería ser justo al contrario: WHERE o.date_upd > '2017-09-13' AND o.date_upd < '2017-09-15' El resto de la consulta no la he testeado, entiendo que estará bien. Si no te devuelve lo que esperas, me dices. Un saludo!
    1 point
  44. themes/xxx/order-payment.tpl ou themes/xxx/order-payment-advanced.tpl ou themes/xxx/order-payment-classic.tpl
    1 point
  45. Je vous fais un dernier retour pour vous informer que caaaaa yeeesstttt ca fonctionne J'ai fais une grosse pause, puis j'ai tous supprimer pour tout refaire de zéro. Je suspecte que le smarty devait être un peu dans les choux car j'ai refais exactement la même chose qu'au début après avoir tout nettoyé, supprimer et vidanger dans tous les sens. Mille merci vraiment pour m'avoir aidé tout au long de cette longue journée Afrawan
    1 point
  46. Check your database table ps_shop_url and if you use localhost domain | domain_ssl | physical_uri localhost | localhost /mywebsite_foldername/
    1 point
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More