Jump to content


Popular Content

Showing content with the highest reputation since 12/22/2020 in all areas

  1. 2 points
    Why not? Distance between key words plays no role in the Prestashop search algorithm. And as all products have the same weight for those keywords the determining factor becomes the way they happen to be stored.
  2. 2 points
    Merhabalar değerli PrestaShop kullanıcıları, Sizlere bu konumuzda N11, Gittigidiyor, Amazon (TR), ePttAvm, Trendyol ve SanalPazar gibi aktif pazaryerlerine tüm ürünlerinizi entegre etmeyi teklif ediyoruz. Entegrasyon sürecinden kısaca bahsedecek olursak PrestaShop alt yapılı sitenizde oluşturacağımız XML'i API'ye bağlayarak tüm pazaryerlerine entegre etmekteyiz. Kısaca özellikleri: Sınırsız ürün gönderimi Pazaryerleri arasında ürün çekme-gönderme işlemi Sınırsız mağaza Sınırsız kargo, fiş ve fatura çıktı alma Kategori eşleştirme XML ve Excel ile ürün yükleme Tüm siparişler tek panelde toplanmaktadır. Sistemimizin tek paket halinde aylık ve yıllık ücretleri bulunmaktadır. Detaylar için PM isteyiniz.
  3. 1 point
    Load all your images with the product and reference in the combination file the position of the image (in the Image Position entry) of this combination. FE. prd.csv 12324;"Test product";"image1Red.jpg, image2Red.jpg, imageBlue1.jpg, imageBlue2.jpg" combinations.csv "Product ID";"Atribute Name";"Attribute Value";"Image Position" 12324; "color, size";"Red, S", "1, 2" 12324; "color, size";"Red, M", "1, 2" 12324; "color, size";"Red, L", "1, 2" 12324; "color, size";"Blue, S", "3, 4" 12324; "color, size";"Blue, M", "3, 4" 12324; "color, size";"Blue, L", "3, 4"
  4. 1 point
  5. 1 point
    Ich würde immer das Modul nutzen. Wenn da bereits Fehler passieren ist ein manuelles Upgrade noch gefährlicher. Besser wäre es den Fehlermeldungen vom 1.click modul auf den Grund zu gehen, welche sind denn dies?
  6. 1 point
  7. 1 point
    Hola @Antonio Zafra Estas acciones que comentas no suceden solas, algo se ha tenido que modificar durante los últimos días. Le recomiendo que revise los movimientos de la última semana: cambios desde el back-office, cambios en el hosting, etc. Saludos.
  8. 1 point
    That playing with the root sounded very dirty to me. Doing that kind of operations without understanding why it had become that way is always very risky. Unserialize is a very simple function that converts json into a nested array. So you can just look at position 279465 and you will find a clue. You could also try running the Prestools Integrity Checks. It might give some clues.
  9. 1 point
    This module has been reported to the PrestaShop security: it has not been updated for a long time and contains some security issues. For this reason, the zip file has been removed and this disclaimer has been added. The topic will stay available for archival purpose. its been a while since i didnt share a module, well try this one and hopefully you like it. at first i want to put this module as a comercial one, since my submision takes a lot of time to be approved, and after sometimes the prestateam declined this module, then i decided to go as a free modules. And hope that if people like this module then they maybe will donate some to support me.... now you can manipulate your server file and/or folder right from you shop back office. comes with alot of features to made your life easier when you try to manage your shop. edit theme, tweak and/or hack something, even making a new module. with this module you can create new file/folder, upload file, view/edit file, rename/copy/move/delete/backup file or folder and you can change permission of files/folders. some cool features on this module * using onscreen popup to made easier when you manipulate the file. * syntax highlight, line numbering and wordwrap when you go on edit mode. * recrusive copy/move/delete file/folder. * icon for 30 filetypes (.php, .css, .js, .tpl, .html, .htm, .jpg, .jpeg, .gif, .png, .pdf, .swf, .fla, .zip, .rar, .doc, .docx, .xls, .csv, .mdb, .ppt, .sql, .exe, .xml, .avi, .mpg, .mov, .divx, .wav, .mp3) * and many more.... still at early version so any bug and sugestion please share & discuss in here WARNING: this module is a thankyouware so say thank you is a must and send some donation is a hope
  10. 1 point
    Many Thanks to he solve it by changing Change : #products .products, .featured-products .products, .product-accessories .products, .product-miniature .products { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; to #products .products, .featured-products .products, .product-accessories .products, .product-miniature .products { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: start; -ms-flex-pack: start; justify-content: center; the issue is : justify-content: flex-start; change it to justify-content: center; many thanks
  11. 1 point
    Bonjour PP2607, Perso j’ai changé module car avec celui-là j’ai eu trop souci. J’ai pris lui de prestashop
  12. 1 point
    Tak, wygenerować później zdjęcia dla tego formatu i wyczyścić cache przeglądarki oraz pamięć podręczna w sklepie.
  13. 1 point
    Si vas a cambiar el TPV, mejor haz esto primero. Hay algunos TPVs que ya te ofrecen módulos para PrestaShop. Si no tienen módulo para conectar con PS, los archivos que te pasen serán diferentes y tendrás que volver a cambiar el script. Así que si estás pensando en cambiar, yo haría eso primero. Para usar el script, básicamente crea un archivo PHP con el siguiente contenido (este es solo para productos simples, sin combinaciones): loadProductsPost(); $import=new AdminImportController(); $import->productImport(); function loadProductsPost() { $_POST = array ( 'tab' => 'AdminImport', 'truncate'=>'0', // Eliminar todas las productos antes de importar 'forceIDs' => '0', // Si activas esta opción, los números ID de tus objetos importados se utilizarán tal cual. Si no la activas, se ignorarán los números de ID importados y, en su lugar, PrestaShop creará números de ID que se incrementarán automáticamente para todos los elementos importados. 'skip' => '0', // líneas a saltar del csv 'csv' => ARCHIVO_DESTINO, // nombre del archivo csv a importar 'convert' => '', 'regenerate' => '0', // 0: regenera miniaturas | 1: no regenera miniaturas 'entity' => '1', // Productos = 1 'iso_lang' => 'es', 'match_ref' => '1', // Si está activado, ¡la referencia del producto TIENE que ser única! 'separator' => DELIMITADOR_CAMPOS_CSV, // separador de campo 'multiple_value_separator' => ',', // separador de valor múltiple 'import' => '1', 'type_value' => array ( 0 => 'reference', 1 => 'name', 2 => 'category', 3 => 'id_tax_rules_group', 4 => 'ean13', 5 => 'available_for_order', 6 => 'online_only', 7 => 'show_price', 8 => 'condition', 9 => 'customizable', 10 => 'uploadable_files', 11 => 'text_fields', 12 => 'is_virtual', 13 => 'shop', 14 => 'manufacturer', 15 => 'date_add', 16 => 'active', 17 => 'image', 18 => 'image_alt', 19 => 'delete_existing_images', 20 => 'minimal_quantity', 21 => 'unity', 22 => 'unit_price_ratio', 23 => 'quantity', 24 => 'wholesale_price', 25 => 'price_tex', 26 => 'unit_price'), ); } En la función, es donde tendrás que hacer los ajustes necesarios para que funcione con tus archivos y los campos que le pasas. Yo envío esos campos, pero puedes borrar o añadir otros. Los valores a configurar tienen comentarios explicando para qué son. Si te lías con esto quizá sea mejor que hables con alguna programadora o programador que te lo personalice.
  14. 1 point
    A fast loading website is the goal of every shop owner, as a slow website can lead to a long list of issues, from disappointed customers who lose patience and abandon their cart, to an overloaded server that stops working, and search engines penalizing your site's ranking due to speed. After helping countless PrestaShop sites optimize and increase their speed, including adding timers around different parts of PrestaShop and analyzing what is taking long and why, we have decided to share our obvious and no-so-obvious findings, and help the entire PrestaShop community. Caching & CCC PrestaShop has several layers of caching, we'll start with the ones on the Performance page * Smarty (Template compilation) Should be set to "Recompile templates if the files have been updated" - This will make sure PrestaShop uses smarty cache at all times, and only recompiles a file if it was changed. * Cache (Caching type) Should be turned on, with File System selected. * CCC (Available on certain PS version) We recommend turning OFF Minify HTML and Compress inline JavaScript in HTML - We noticed PrestaShop was spending a long time (sometimes several seconds) when these features are enabled, which means that any benefit from the compression is more than negated by the slow speed. * Ciphering (Available on certain PS versions) We recommend selecting the "Use the custom BlowFish class" - We found that when the server load was high, saving a cookie on the client side with Mcrypt was taking up to several seconds (due to an issue with randomly encrypting the cookie). Switching to blowfish kept the cookie saving time to a few miliseconds. * Caching (Bottom of the performance page) We recommend turning OFF, as we have seen this feature cause more trouble than offer benefit, with module settings not being updated, and other unexpected behavior. * Install a server side caching system, such as OPCache, you would have to check with your hosting provider to see if it's available, and if they can activate it on your website (You may need to reset the cache after making changes to PHP files, in order for the changes to apply right away. Email * SMTP We highly recommend NOT using a 3rd party SMTP server, we have seen speeds of up to 3-5 seconds sending a single email using a 3rd party SMTP server. * PHP mail() We recommend using this option, however, even with this option selected, we noticed that some versions of PrestaShop had a slow send time (1-2 seconds) due to the Swift version that was installed. If you are using PS 1.5, or even an early version of PS 1.6, you may want to make sure sending emails is not taking a long time (Normal time should be around 0.2 seconds.) Modules / Customizations * Shipping / Tax If you are using any 3rd party modules or services, such as UPS, FedEx, TaxCloud or Avalara, PrestaShop will make API calls whenever a product is added to the cart, and even if they have proper caching in place to avoid making the same API request more than one time, it will still require an API for each new product added, and can take several seconds to do so. Whenever possible, use fixed shipping rates, and if you must use those 3rd party services, we recommend making changes to only calculate taxes and shipping when the customer gets to the checkout page. * Carousel If you are using a product carousel module or customization, or similar upsell / product recommendation that is reading product information to display it, make sure they are using a caching system to avoid doing identical calls to the database that return the same data, and take a long time to run. If you are not sure about their caching, ask the developer, or try to disable the module and compare page speed. Database * Analyze & Repair Databases can get corrupted at times, which will result in queries taking longer. It is recommended to periodically check and repair your database tables, this can be easily done from PHPMyAdmin, by selecting all the tables, and choosing the "Check" option at the bottom. If you see any tables with errors, select them and choose the "Repair" option. * Connections PrestaShop keeps visitor information for statistic purposes in 3 tables, and actively queries ps_connections before writing to it, which can take a long time if the tables gets really big, that in turn can lock up the database, and delay the time it takes for the page to load for all the visitors. We recommend backing up and clearing this table once a year, or sooner for sites with a large number of visitors (Try keeping the table size to less than 500,000 records). ReCaptcha * Google ReCaptcha We noticed a substantial slowdown in the time the front end page finishes loading (sometimes taking 5-7 seconds). We recommend restricting the ReCaptcha code to a specific page (like contact form) rather than enable it for all page loads (in case there's a newsletter signup form in the footer). Miscellaneous * Debug Profiling There could be other things that cause your website to be slow, and the best way to get more information and identify the culprit is by enabling the Debug_Profiling variable in /config/defines.inc.php (Change from "False" to "True". This will generate a report in the front end with exact timing of every part in PrestaShop, including every Database query. You will have to inspect the report and identify any parts that are slow. Keep in mind that this will show up for all visitors, so make sure you only change it for your IP address, unless you are working on a development environment. For the latest updates to the list, see https://www.presto-changeo.com/content/23-tips-on-how-to-speed-up-your-prestashop-website
  15. 1 point
    Doch auf jeden Fall, die ersten Hauptversionen haben immer einige Fehler, eigentlich sollte man vor den Produktiveinsatz ein paar Upgrades abwarten.
  16. 1 point
    Hallo Für unseren letzten Kunden haben wir verwendet: https://addons.prestashop.com/de/export-modules/50075-idealo-feed-exporter.html#overview Wir haben das Modul selbst modifiziert, nachdem wir es gekauft haben! Wir haben dieses Modul nach gefunden! https://help.prestalia.it/de/documentation/idealo/installation-3/ Ich hoffe, es hilft!
  17. 1 point
    Hi, I had two security checks running. One was done by my hosting provider --> everything ok The other was done by a prestashop module --> found two suspicious files, one was definitely a false alarm, but the second file seems strange according o the module developer But my hosting provider says, everything is fine. I deleted the weird looking file to see what will happen. The next day there is a similar file at the exact same spot in my public_html directory. I attached a partial screenshot. I changes all the passwords. What else can I do? I am not even sure if this is a malicious file or not. The file looks like this (changed the domain name for security reasons): mydomain.com_1609704539.php I am not a developer. Any help would be very appreciated. I am running prestashop
  18. 1 point
    Mi web de un momento a otro se cayo y sale este error //CODE MODULES PRESTEAMSHOP - PLEASE NOT REMOVE //-------------------------------------------------------------------------------------------------------- smartyRegisterFunction($smarty, "modifier", "escape", "escapePTS"); function escapePTS($string, $esc_type = "html", $char_set = null, $double_encode = true, $as_html = false) { $smarty_escape = SMARTY_PLUGINS_DIR."modifier.escape.php"; include_once $smarty_escape; if (!$as_html && is_callable("smarty_modifier_escape")) { $string = call_user_func("smarty_modifier_escape", $string, $esc_type, $char_set, $double_encode); } return $string; } //-------------------------------------------------------------------------------------------------------- No se a que se debe, por favor si alguien me ayuda! Prestashop
  19. 1 point
    Bonjour J'ai un probléme similaire je pense J'ai mis par exemple 10 photos dans ma page produit et attribué par exemple 3 déclinaisons mais lorsque j'assimile mes photos a mes déclinaisons, sur le site je ne vois plus que les photos de déclinaisons, il n'y a plus toutes les photos du départ (qui sont normalement en dessous de la photo et on peut les faire défiler), quelqu'un peut m'aider? Est ce un bug car avant je n'avais pas de souci, je suis sous Merci d'avance de vos réponses et votre aide
  20. 1 point
    Hi, the search fields are empty, because you are still in the "reorder mode" of the form. Please press the "save position" button, at the top of the "Position" column, and then all the filtering options will be available. Kind regards, Leo
  21. 1 point
    Hi Diho, regarding the file that automatically re-appeared next day, the recommended is to ask your hosting support about this, as it could easily happen that it is created by some server security scanner, like some malware scanner. Maybe this could be related to your script : https://support.comodo.com/index.php?/Knowledgebase/Article/View/1229/113/debug-for-malware-scanning Kind regards, Leo
  22. 1 point
    Prueba a quitar el quick view. Si no recuerdo mal, Warehouse tenía ese problema en las versiones móviles porque aparece el quick view en el primer click simulando a la acción mouse hover del ratón. Saludos.
  23. 1 point
    Hello, A new free module to offer Google's machine translation service in more than 100 languages on your PrestaShop store. Just install the module and automatically when a customer visits your site by speaking another language than the one selected on the site, a banner will display the choice of the translation. This system will never replace a real human translation with a site in several languages, but this may allow some visitors to have a better understanding of your products if the official translation of the site does not exist in their language. DOWNLOAD
  24. 1 point
    👍 http://www.htaccess-guide.com/ https://www.whoishostingthis.com/resources/htaccess/ https://httpd.apache.org/docs/current/mod/core.html
  25. 1 point
  26. 1 point
    Něco jsem ve tvém eshopu již dělal, nebo radil. Toto vypadá na nějaký clean URL modul nebo přepsaný Dispatcher.php Když mi pošleš přístupy (do soukromé zprávy), rád se na to podívám ... zdarma 😉 Daniel Tengler
  27. 1 point
    No lo se, tendrás que mirarlo en addons, no conozco todos los módulos existentes. Visita también páginas de desarrolladores, línea gráfica,4webs,knowband, etc
  28. 1 point
    Hola a tod@s. He actualizado una de mis tiendas con 1 click upgrade a al finalizar el mismo, impide que se inicie sesión en la administración de la tienda. Meto los datos de acceso y desaparecen los campos de email y contraseña sin arrojar ningún error, se queda en pantalla el logo de prestashop y ahí se queda. ¿Tiene alguien alguna solución a este Bug? Gracias.
  29. 1 point
    Bonjour, voici le lien pour contacter le support du module : https://addons.prestashop.com/contact-form.php?id_product=46347
  30. 1 point
    Hi guys, Since prestashop 1.5, virtual product combinations have been removed. Searching on the web, I have found a workaround for prestashop 1.5 and 1.6 but nothing for Prestashop 1.7.x . So here we are to make combinations working on virtual products on Prestashop 1.7.x: please note: paths with "adminXXXXXX" indicate your admin folder name that differs for each installation, so you will have different numbers and letters instead of X. This is not a module, follow the installation instructions: 1. in file adminXXXXXX\themes\default\js\bundle\product\form.js remove line 179: showVariationsSelector.hide(); replace line 182: showVariationsSelector.find('input[value="0"]').attr('checked', true); with: showVariationsSelector.show(); replace line 236: if ((showVariationsSelector.find('input:checked').val() === '1' || $('#accordion_combinations tr:not(#loading-attribute)').length > 0) && (typeProduct.val() === '1' || typeProduct.val() === '2')) { with: if ((showVariationsSelector.find('input:checked').val() === '1' || $('#accordion_combinations tr:not(#loading-attribute)').length > 0) && (typeProduct.val() === '1' /*|| typeProduct.val() === '2'*/)) { 2. in file adminXXXXXX\themes\default\js\bundle\product\product-combination.js remove line 94,95,96: if (combinationsList.length > 0) { productTypeSelector.prop('disabled', true); } remove line 206: productTypeSelector.prop('disabled', true); 3. create file adminXXXXXX\override\controllers\admin\AdminProductsController.php and write this into it: <?php class AdminProductsController extends AdminProductsControllerCore { } go to controllers\admin\AdminProductsController.php and copy the whole method processAdd(in my case from line 1707 to 1793) and paste it into line 4 of the previous file, the result will be something like this: <?php class AdminProductsController extends AdminProductsControllerCore { public function processAdd() { $this->checkProduct(); //some more code here..... return $this->object; } } last thing, replace this line: if (Configuration::get('PS_FORCE_ASM_NEW_PRODUCT') && Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $this->object->getType() != Product::PTYPE_VIRTUAL) { with: if (Configuration::get('PS_FORCE_ASM_NEW_PRODUCT') && Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') /*&& $this->object->getType() != Product::PTYPE_VIRTUAL*/) { 4. Clear the cache! Finish! Now you have working combinations for virtual products. If I helped you, feel free to offer me a coffe tested with Prestashop
  31. 1 point
    I hope at the end of next week. I am quite busy at the moment. And there is also order-edit that finally should get an upgrade so that it can handle discounts.
  32. 1 point
    Bonjour PierreVin, merci beaucoup pour l'information. Je testerai d'ici quelques semaines, mais pour l'instant je vais laisser ma boutique telle qu'elle est. Très bonne journée à vous, je vous tiendrai au courant.
  33. 1 point
    Pour couper court à tout paiement pour un code ici gratuit, la marche à suivre pour le correctif: Editer votre fichier classes/Link.php (avec un éditeur digne de ce nom) Chercher la fonction getBaseLink Ajoutez les 3 lignes suivantes des le début de la fonction: static $force_ssl = null; is_null($force_ssl) && ($force_ssl = (Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE'))); $force_ssl && ($ssl = $force_ssl); Le code devrait ressembler à la fin à ceci public function getBaseLink($id_shop = null, $ssl = null, $relative_protocol = false) { static $force_ssl = null; is_null($force_ssl) && ($force_ssl = (Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE'))); $force_ssl && ($ssl = $force_ssl); if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && $id_shop !== null) { $shop = new Shop($id_shop); } else { $shop = Context::getContext()->shop; } if ($relative_protocol) { $base = '//'.($ssl && $this->ssl_enable ? $shop->domain_ssl : $shop->domain); } else { $base = (($ssl && $this->ssl_enable) ? 'https://'.$shop->domain_ssl : 'http://'.$shop->domain); } return $base.$shop->getBaseURI(); } Si vous éprouvez des difficultés d'implantation, ne pas hésiter à me contacter par MP, je demanderai seulement une dizaine d'euro pour le faire (10€)
  34. 1 point
    Peut-on construire une maison à 2 étages sans rez-de-chaussée ?
  35. 1 point
    bonsoir, j'ai fini par regler le problème, je donne ma solution : dans ma base de données, il manquait 2 champs dans la table ps_tab : je les ai rajouté avec la commandes suivantes. alter table ps_tab add column `route_name` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL; alter table ps_tab add column `enabled` tinyint(1) NOT NULL; puis j'ai fait la commande suivant qui visiblement active les menus update ps_tab set enabled=1;
  36. 1 point
    Bonjour Luis, visiblement le problème vient de votre thème. Dans les templates de la page produit, il faut absolument qu'il y a une balise HTML ayant pour ID "product-details" et un attribut "data-product" contenant toutes les indications sur la déclinaisons en cours (donc ça se rafraichit dès qu'on change de déclinaison). Votre thème n'a semble t'il pas cette balise. Je vous invite à vérifier et à contacter le développeur du thème pour lui demander de corriger cela.
  37. 1 point
    Hello! So this will be quite long so please let me explain what I am trying to do: My objective is to add 2 columns to the employee table, "Budget_left" and "Date_Budget_Added". And then ultimately show these 2 in the EDIT PROFILE PAGE in the back office, with the budget showing the budget of that profile. I have already successfully modified the database which is done during the installation of my module. I have also overridden the Employee.php to add "Budget_Left" and "Date_Budget_Added" to the Employee class. What I now have to do, and where I am quite lost, is to have the correct output on the edit profile page whos templating is done with Symfomy, a framework I am just discovering. The output file seems to be: src/PrestaShopBundle/Resources/views/Admin/Configure/AdvancedParameters/Employee/Blocks/form.html.twig. And I have also successfully overriden this in my module (basically I've copied the whole code) and modifications work on it. However, my problem now is trying to access the data I need. My "Budget_left" and "Date_Budget_Added" in my database. I have var dumped the employeeForm variable however this object doesn't seem to have all the data that is in the employee table in the database. My question is have I done the correct steps to add the columns to the database? And if so, how can I access these datas from the .twig files? Thank you all soooo much in advance! I hope I was adequately clear about what I am trying to do!
  38. 1 point
  39. 1 point
    Para todos los amantes de Prestashop, os lanzamos un modulo gratuito para poder ver lo que nuestros visitantes hacen en nuestra tienda, y poder medir y analizar si tenemos algún problema de diseño Web, o problemas que afecten a las ventas finales. El modulo de Yandex metrica para Prestashop lo podéis descargar en https://www.digitaldot.es/yandex-metrica-gratis-para-prestashop/ Espero que os pueda ayudar para nosotros es imprescindible para medir y mejorar el CRO de una tienda Online
  40. 1 point
  41. 1 point
    Or create custom hook and add to product-add-to-cart.tpl Module: <?php if (!defined('_PS_VERSION_')) { exit; } class my_module extends Module { public function __construct() { $this->name = 'my_module'; $this->tab = 'other'; $this->version = ''; $this->author = ''; $this->author_email = ''; $this->author_website = ''; $this->bootstrap = true; parent::__construct(); $this->displayName = 'Add my text to product detail page'; $this->description = 'Module add my text to product page'; $this->confirmUninstall = 'Uninstall?'; $this->ps_versions_compliancy = array('min' => '1.7.0', 'max' => ''); $this->default_lang = (int)Configuration::get('PS_LANG_DEFAULT'); } public function uninstall() { $id_hook = Hook::getIdByName('displayMyProductActions'); $hook = new Hook($id_hook); $hook->delete(); if (Shop::isFeatureActive()) { Shop::setContext(Shop::CONTEXT_ALL); } if (!parent::uninstall()) { return false; } return true; } public function install() { if (Shop::isFeatureActive()) { Shop::setContext(Shop::CONTEXT_ALL); } if (!parent::install()) { return false; } if (!$id_hook = Hook::getIdByName('displayMyProductActions')) { $hook = new Hook(); $hook->name = 'displayMyProductActions'; $hook->title = 'My new hook'; $hook->description = 'This is a custom hook!'; $hook->position = 1; $hook->add(); // return true on success } $this->registerHook('displayMyProductActions'); return true; } public function hookDisplayMyProductActions($params) { $id_product = Tools::getValue('id_product'); $my_query = Db::getInstance()->getValue('SELECT my_value FROM'._DB_PREFIX_.'my_table WHERE id_product = '.$id_product); if ($my_query){ return '<span class="my-variable">'.$my_query.'</span>'; } else { return ''; } } } HOOK in product-add-to-cart.tpl: {hook h='displayMyProductActions' product=$product}
  42. 1 point
    Hello devs, todays quick tip from me is how to move products not available for order to the end of search results. I am working 1.6 but I think that is similiar to 1.7. I am not making overrides, I will just tell You how to set this up. I was annoyed that I have all not available for orders products at the end of categories but in search results thing was bit more complicated and lot of old products not available for order were somewhere at the begining. Solution to this is quite simple. In Search.php in override\classes\Search.php or classes\Search.php search for "public static function find" and in this try to find something like this: SELECT SUM(weight) FROM '._DB_PREFIX_.'search_word sw LEFT JOIN '._DB_PREFIX_.'search_index si ON sw.id_word = si.id_word WHERE sw.id_lang = '.(int)$id_lang.' AND sw.id_shop = '.$context->shop->id.' AND si.id_product = p.id_product AND ('.implode(' OR ', $score_array).') ) position'; and just simply replace the first line of it with this SELECT SUM(CASE WHEN p.available_for_order = 1 THEN weight ELSE 0 END) FROM '._DB_PREFIX_.'search_word sw LEFT JOIN '._DB_PREFIX_.'search_index si ON sw.id_word = si.id_word WHERE sw.id_lang = '.(int)$id_lang.' AND sw.id_shop = '.$context->shop->id.' AND si.id_product = p.id_product AND ('.implode(' OR ', $score_array).') ) position'; and now You will have all not available products in search results at then end. Now You know how to edit this as well to move products with stock_quantity <= 0 at the end. Try it to figure it out for yourself If You will figure out few more good ideas about it feel free to share it here. For more cool things about Prestashop Search engine go to ->
  43. 1 point
    Для 1.7.6 я вносил изменения в БД таблица ps_currency значение precision поставить 0
  44. 1 point
    Ok I find the solution: Change validate.php in /classes/ public static function isCustomerName($name) { $validityPattern = Tools::cleanNonUnicodeSupport( '/^0-9(?:[^!<>,;?=+()\/\\@#"°*`{}_^$%:¤\[\]|\.。]|[\.。](?:\s|$))*$/u' ); return preg_match($validityPattern, $name); } To public static function isCustomerName($name) { $validityPattern = Tools::cleanNonUnicodeSupport( '/^(?:[^!<>,;?=+()\/\\@#"°*`{}_^$%:¤\[\]|\.。]|[\.。](?:\s|$))*$/u' ); return preg_match($validityPattern, $name); } After: You must have change 2 files: in: src/Core/Domain/Customer/ValueObject/ There is 2 files : FirstName.php LastName.php change : private function assertLastNameIsValid($lastName) { $matchesLastNamePattern = preg_match('/^[^0-9!<>,;?=+()@#"°{}_$%:¤|]*$/u', stripslashes($lastName)); if (!$matchesLastNamePattern) { throw new CustomerConstraintException( sprintf('Customer last name %s is invalid', var_export($lastName, true)), CustomerConstraintException::INVALID_LAST_NAME ); } By: private function assertLastNameIsValid($lastName) { $matchesLastNamePattern = preg_match('/^[^!<>,;?=+()@#"°{}_$%:¤|]*$/u', stripslashes($lastName)); if (!$matchesLastNamePattern) { throw new CustomerConstraintException( sprintf('Customer last name %s is invalid', var_export($lastName, true)), CustomerConstraintException::INVALID_LAST_NAME ); } ( In fact remove characters you want, for me only 1-9) by the way , do the same with firstname: { $matchesFirstNamePattern = preg_match('/^[^0-9!<>,;?=+()@#"°{}_$%:¤|]*$/u', stripslashes($firstName)); if (!$matchesFirstNamePattern) { throw new CustomerConstraintException( sprintf('Customer first name %s is invalid', var_export($firstName, true)), CustomerConstraintException::INVALID_FIRST_NAME ); } } by { $matchesFirstNamePattern = preg_match('/^[^!<>,;?=+()@#"°{}_$%:¤|]*$/u', stripslashes($firstName)); if (!$matchesFirstNamePattern) { throw new CustomerConstraintException( sprintf('Customer first name %s is invalid', var_export($firstName, true)), CustomerConstraintException::INVALID_FIRST_NAME ); } }
  45. 1 point
    @Vidar Bjerkeland If you got an HTTP error 500, I would suggest that you enable the debugging mode to find the actual error message. There are 2 ways to enable debugging mode: The first method to enable debugging mode (if you are able to access the back office / admin page) 1) Log into the back office - > Go to Advanced Parameter -> Debug mode 2) Then enable the debug mode -> Yes 3) Save it The second method to enable debugging mode (if you are not able to access the back office / admin page) 1) Go to your root prestashop installation directory and edit this PS config file : /public_html/config/defines.inc.php 2) Using editor with a line number, at the line 29 you will see the following code: /* Debug only */ if (!defined('_PS_MODE_DEV_')) { define('_PS_MODE_DEV_', false); } change the false to true like below: /* Debug only */ if (!defined('_PS_MODE_DEV_')) { define('_PS_MODE_DEV_', true); } 3) Save it. After enabling the DEBUG Then, go back to the page that trigger the blank page or internal error 500. There must be some error messages that will appear and from there you can share the error message for us to help. Another important thing is, if your shop is not ready for live production, then do not enable the cache option at the back end because when u try to make some changes, it might break something like having blank page, cache files that conflicts with another module, etc. I think by default it is enabled. it is not recommend to enable cache setting if the shop is in development status or not ready for live production. Sometimes blank page problem can be problem with the server configuration like file permissions but the common problem in prestashop is due to the the PS cache that needs to be cleared or disabled. Let's say that you are not able to disable the cache option at the backoffice because of the blank page, then you have to manually disable it through mysql database. To disable the cache manually: 1) Go to your SQL database management like phpmyadmin, find the table that says something like PS_CONFIGURATION or *_CONFIGURATION 2) Find a field called PS_SMARTY_CACHE and put the value as 0 and PS_SMARTY_CLEAR_CACHE put the value as everytime 3) Save it and try reload the blank page.
  46. 1 point
    Ca dépend de chaque cas. Un module qui ne s'affiche pas c'est soit qu'il n'est pas configuré correctement, soit qu'il a des restrictions (Groupes, pays, clients, monnaie, etc...)
  47. 1 point
    Hy, Same error, but resolved by : https://stackoverflow.com/questions/43180563/err-too-many-redirects-in-backoffice-when-running-prestashop-in-docker
  48. 1 point
    O código dos Correios mudou novamente? Porque minha loja voltou a dar o problema de "não há transportadoras para esse CEP"
  49. 1 point
    Solved deleting browser cache with Control + F5
  50. 1 point
    Bonjour, Oui ce projet est tout à fait réalisable sous Prestashop, voir http://www.pizzaweb.ch (actuellement en cours de refonte). N'hésitez pas à me contacter en MP. Cordialement
  • Create New...

Important Information

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