Jump to content


Popular Content

Showing content with the highest reputation since 10/29/2019 in all areas

  1. 10 points
    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
  2. 4 points
    Estos dias han detectado un posible fallo en algunos ficheros que usan los modulos de Prestashop, tanto por desarrolladores externos como los propios de prestashop. La solución es eliminar los modulos que puedes estar afectados, por ahora el mas instalado el modulo de actualización, Han desarrollado un modulo el cual te dice la versión del PHP ademas de los modulos que usan estos ficheros Aqui el enlace de la pagina desarrollador Armando Salvador ayer público en su Youtube como hacerlo
  3. 4 points
    I suppose it has to do with the folder name generated by github. It needs to be pdrecaptcha. For simplicity, I have created ready zip file to upload and install: https://github.com/hamsn/pdrecaptcha/blob/with_customer_reg/pdrecaptcha.zip Download the file above and try it. Best regards.
  4. 4 points
    You can rename you whole /var/cache folder to /var/cache_old - Presta will regenerate it with next page call
  5. 3 points
    Hi, Today we had big attack to our websites Prestashop 1.5 version. Malware creates xsamxadoo.php file in the root of webshop. We already deleted all /phpunit files from the websites since January to avoid this attack but still somehow attackers were succesful. We are suspecting module explorerpro where is file action.php - see attachment which allows to adding files to our website Have anybody experience the same issue? We had this module in our website for a long time and never got attack through this module. action.php
  6. 3 points
    Hello everyone, I am learning creating Prestashop modules and I made this module in my free time. Feel free to use or share it. If you find any bugs or you think you have a good idea how to improve the module you can type it here. Also you can find instructions in attached PDF on how to use the module. Module attaches selected categories as a block in homepage. You can specify which categories you want to show and it shows the first 6 products in the category. For each category block you can specify accent color and upload a custom image. Important! Tested only on version Here are some marketing goodies I made Enjoy! mslt_cblocks.zip instructions.pdf
  7. 3 points
  8. 3 points
    Hola a todos, estoy haciendo unos módulos que trabajan con el webservice de Prestashop y me he dado cuenta que no utiliza todos los recursos y todas las classes que tiene el Prestashop, algo incomprensible, pero así es, faltan opciones para poder añadir o modificar datos. Adjunto el fichero webservice modificado, se debe copiar en /override/classes/webservice Se ha añadido la posibilidad de ver imágenes -> api/imagenes --> api/imagenes/#### (aqui la url no es correcta hay que usar el ID) Añadido ver información de imagen individual -> api/imagen/### Se ha dejado lo de image -> /api/images/products --> api/images/products/### --> api/images/products/###/#### ----> para leer la imagen y verla También se ha añadido 'order_discounts' --> Para usar los descuentos de los pedidos 'order_cart_rules' --> Para usar las reglas de descuentos de los pedidos Recordad después de subir el fichero, dar los permisos dentro de backoffice -> webservices -> vuestra API , saldrán nuevas opciones de activación WebserviceRequest.php
  9. 3 points
    * nGinx v1.16.1 * Linux CentOS 7 * PHP 7.2.27 (FastCGI FPM) After struggling to get the latest release ( up and running on nGinx I finally have it working. Both the admin and shop. Enjoy! Please comment when you have issues. I tested it quite a bit but nothing is perfect. server { # Port 80 IPv4/6 # listen 80; # listen [::]:80; # SSL Ipv4/6 listen 443 ssl; listen [::]:443 ssl; # Your SSL Certificates, don't forget to take a look at Certbot (https://certbot.eff.org) include /etc/nginx/ssl_params.conf; ssl_certificate "/your-certificate.pem"; ssl_certificate_key "/your-private-key.pem"; ssl_trusted_certificate "/certificate-chain.pem"; # [REQUIRED EDIT] Your domain name goes here server_name <your domain name>; error_log /var/log/nginx/prestashop.error_log; # [REQUIRED EDIT] Absolute path to your website root on the filesystem root /home/vhost/<your domain name>/shop; index index.php index.html; # to control the amount that can be uploaded. client_max_body_size 50M; # set admin folder name set $admin_dir /<admin_folder_name>; #Example: admin245tm20au location ~ /admin.*/(sell|api|common|_wdt|modules|improve|international|configure|addons|_profiler|product|combination|specific-price)/(.*)$ { try_files $uri $uri/ /index.php?q=$uri&$args $admin_dir/index.php$is_args$args; } # Cloudflare / Max CDN fix location ~* \.(eot|otf|ttf|woff|woff2)$ { add_header Access-Control-Allow-Origin *; } # Do not save logs for these location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { auth_basic off; allow all; log_not_found off; access_log off; } location / { # Redirect pretty urls to index.php try_files $uri $uri/ /index.php?$args; # Images rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$1$2$3.jpg last; rewrite ^/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last; rewrite ^/([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg last; rewrite ^/c/([0-9]+)(-[.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+.jpg$ /img/c/$1$2$3.jpg last; rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+.jpg$ /img/c/$1$2.jpg last; # AlphaImageLoader for IE and fancybox rewrite ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 last; # Web service API rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last; } # Allow access to the ACME Challenge for Let's Encrypt location ~ /\.well-known\/acme-challenge { allow all; } # Block all files with these extensions location ~ \.(md|tpl)$ { deny all; } # File security # .htaccess .DS_Store .htpasswd etc location ~ /\. { deny all; } # Source code directories location ~ ^/(app|bin|cache|classes|config|controllers|docs|localization|override|src|tests|tools|translations|travis-scripts|vendor|var)/ { deny all; } # Prevent exposing other sensitive files location ~ \.(yml|log|tpl|twig|sass)$ { deny all; } # Prevent injection of php files location /upload { location ~ \.php$ { deny all; } } location /img { add_header Cache-Control public; expires 1d; location ~ \.php$ { deny all; } } location ~ \.php$ { # Verify that the file exists, redirect to index if not try_files $fastcgi_script_name /index.php$uri&$args; fastcgi_index index.php; include fastcgi_params; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_pass unix://var/run/php-fpm/php-production.sock; } }
  10. 3 points
    Mahmut Bey'in yukarda bahsettiği seçenek,'te AnaDizin/pdf/invoice.tax-tab.tpl dosyasında 70-72. satır aralığındadır: <td class="center white"> {$line.rate} % </td>
  11. 3 points
    Le "urgent" sert à quoi ? Quelle est votre version Prestashop ? Quels sont les bugs ? Il n'est pas forcément nécessaire de changer de voiture quand on a un pneu crevé^^
  12. 3 points
    -> OK, je viens de trouver, ça fait parti des options bien planqué dans la configuration du module "formulaire de contact". Pas très logique de répartir les options sur la page SAV, sur la page Contact et sur la conf du module...
  13. 3 points
    Miałem to samo, w modułach znajdź "Customer Reassurance" - to jest to tylko nieprzetłumaczone
  14. 2 points
    This module allows BO administrators to login FO as a customer by clicking a simple button at AdminCustomer page. Adds a simple login button to customer pages at BO. The module never needs to change password of customer or any information of a customer. It is also quick and safe due to using own encryiption keys. Can be used for: Create orders on behalf of your customers (customers who requested help to ordering just like in live chat, or by phone) Redirecting customer by browsing same pagea step by step Check for errors or feedbacks froms customer quickly Update: Please follow https://github.com/rowanfuchs/PrestaShop-login-as-a-customer download up to date files. Thanks to @Rowan - 999 Games PrestaShop-login-as-a-customer-master.zip
  15. 2 points
    An open source community is more than just pull requests made by faceless strangers. In order to better understand the people who contribute time and skills to the PrestaShop project, we’re writing a series of interviews with contributors of all ranges. This week, meet Pululu Kinanga André, one of our great developers on GitHub! Hi Pululu! First, could you tell us a bit about yourself? I am Pululu and I come from Angola. I arrived in France in 2013 for my studies, after graduating in electronics and telecommunications. I have a degree in Management Information System (MIS), software development, and design. I am currently assisting the IT department of a digital agency in their migration and automation strategy. I am also interested in systems administrations (Unix), development, software design, and embedded systems. If I had to summarize myself in a few words, I would write that I am “a discreet lazy lazybones who works hard and an Eternal admirer of the complexity of simple things”. When and why did you get involved in contributing to the PrestaShop project? I started to be interested in the open source philosophy in 2014. I found it was an amazing way to be able to help and share my vision with the world! It is now a conviction that we can all help each other and, together, build powerful and sustainable solutions. And a few years later, I started to interact on StackOverflow. I had my first contact with the PrestaShop ecosystem in 2016, I was engaged in a work-study program at Alibabike, in La Rochelle. In 2017, I joined the agency123 as a developer and designer, and I made huge progress very quickly because PrestaShop is their area of expertise and their core business. What motivates you? In my opinion, the decision to migrate Prestashop to Symfony has divided the community. Many members and contributors were disappointed and discouraged. I believe most of them were afraid of not understanding the new system and therefore losing their expertise. As for me, it motivated me to contribute because it was a way of saying: guys, come back… this is no big deal, look, it’s very simple! I also wanted to learn and make progress, discuss with the authors of the solution, be credible, and reassure our +200 customers that I master the solution we offer with the agency. Finally, I think contributing is also a way to thank all of those who have contributed before and to help the software evolve. Do you have any advice for first-time PrestaShop contributors? You are not alone! PrestaShop has a rather large community and, likely, other users have already encountered the same problems as you. By contributing, you are helping to improve the solution, and this is an opportunity to share directly with the PrestaShop team. What’s the number one thing you’ve learnt by contributing to Open Source projects? I was not alone and there are many ways to look at it! Thank you Pululu, we hope to see more from you as PrestaShop evolves! :) View the full article
  16. 2 points
    Hola, Como ya saben, en la nueva actualización de Prestashop 1.7.6 cambio el registro de carpetas y el antiguo error que contenían las monedas en la posición del signo ($) y (CLP) se encuentra en otra posición. Por lo cual, para solucionar este problema (Bug,) debes ingresar en el siguiente directorio. /public_html/localization/CLDR/core/common/main/es.xml Deben buscar la siguiente linea de código. <currencyFormat type="standard"> <pattern>#,##0.00¤ </pattern> </currencyFormat> <currencyFormat type="accounting"> <pattern>#,##0.00¤ </pattern> Y dejarla así. ¤ <<<---esto es lo que hay que modificar (Solo la ubicación del símbolo) <currencyFormat type="standard"> <pattern>¤#,##0.00 </pattern> <currencyFormat type="accounting"> <pattern>¤#,##0.00 </pattern> Borrar cache y con eso debería funcionar. Saludos www.softcomerce.cl
  17. 2 points
    Siguiendo la misma línea de trabajo del módulo de trinkinho para PS 1.5 y 1.6, he adaptado el módulo original que trae PS ps_wirepayment (v2.0.4) y le he copiado el código de trinkinho (bankwire_discount) para que ofrezca también descuentos en 1.7.1 y 1.7.2 como ps_wirepaymentdiscount. La única modificación a su código que he hecho es aplicar el descuento en la validación SOLO a los artículos ANTES de aplicarle los impuestos. Es decir, en vez de aplicar el descuento al total del carro de la compra (Cart::BOTH) lo he aplicado sólo a los artículos sin impuestos ni gastos de envío y/o manipulación (Cart::ONLY_PRODUCTS). Adjunto el módulo. Si te gusta, dame un Like ps_wirepaymentdiscount.zip
  18. 2 points
    Bonjour, Attention ce plugin (au moins sur la version 4.4) expose au public les informations censées être envoyées à leur support dans le dossier /modules/amazon/support/… Les fichiers sont générés dès lors que l'on accède à la page "Information" du plugin.
  19. 2 points
    Ya te lo ha explicado @gusman126, pero por si no tienes claro el uso de los hooks, te lo intento explicar de otra forma: - Hay 2 tipos de hooks: de "display" y de "action". Los de display son para mostrar algo en un sitio determinado de la tienda. Por ejemplo, dentro de la ficha de producto, detrás del botón de compra. O en la página de inicio, detrás del banner principal. Hay muchos hooks que ya vienen creados por defecto, pero además se pueden añadir otros donde tú quieras (al final te explico cómo hacerlo). - Para que un hook funcione debes, primero, registrarlo en tu módulo. Esto se hace como te indica gus en la primera imagen que ha puesto ($this->registerHook('displayMyHook');). Luego, debes crear un método donde programes lo que necesites hacer y devuelvas un trozo de código HTML con lo que quieras que se muestre en el punto desde el que se ha llamado el hook (siguiendo el ejemplo, detrás del botón de compra en la ficha de producto). El HTML que devuelve el método lo puedes crear directamente usando PHP o puedes cargar una plantilla, que es como se suele hacer. Esto se muestra en la segunda imagen que te ha puesto gus. - Finalmente, si quieres que tu código se muestre en algún sitio que no tiene un hook específico, puedes añadir el tuyo propio. Para ello basta con que edites el archivo de la plantilla de tu tema correspondiente (por ejemplo /themes/nombre-de-tu-tema/templates/catalog/product.tpl), y lo añadas ahí, dentro de esa plantilla, en el punto donde quieras que aparezca el contenido que genera tu módulo. Por ejemplo: {hook h="displayMyHook"}. Si quieres que el hook solo sirva para tu módulo, puedes especificarlo así {hook h="displayMyHook" mod="nombre_de_mi_modulo"} Y adicionalmente, también puedes crear tu módulo como "widget", con lo cual no queda anclado a un sitio específico, sino que lo puedes ejecutar desde cualquier sitio de las plantillas, incluso repetirlo varias veces sin tener que programar varios hooks. Tienes más info sobre esto aquí: https://devdocs.prestashop.com/1.7/modules/concepts/widgets/
  20. 2 points
    You can save even more when you only backup the base product images (like 123.jpg). You can always regenerate all the derived image formats
  21. 2 points
    Hi its a cache related issue. A new version has been released some days ago : https://github.com/PrestaShopCorp/ps_mbo/releases/latest Please follow instructions given.
  22. 2 points
    C'est un soucis de CSS, l'image d'arrière plan est répéter horizontalement et verticalement. Donc votre taille d'image n'est pas en rapport avec la dimension de l'espace d'affichage. En gros si vous mettez un image rectangulaire dans un carré, le carré sne sera pas rempli et donc on verra la répétition de l'image. Ajustez tout cela dans la configuration du module ou par le design de votre template ou par le format de l'image utilisé.
  23. 2 points
    Is working at PS but I changed both files with this code, because an error occurred and a dot needed to be removed: CONCAT(LEFT(c.`firstname`, 10), \' \', c.`lastname`) AS `customer`,
  24. 2 points
    I'm working on a module to do this. Send me a private message if you want to (beta) test it on a test-instance of your shop
  25. 2 points
    Hola @Canet Durante mis más de 15 años dedicados a la programación, he pasado por hostings caros, malos, lentos... alguno de mejor servicio pero los precios se elevaban. Hasta que hace 3 años di con Nicalia El soporte es excelente, trato directo y personalizado. Los servidores son una auténtica maravilla. Tienen planes elastic que son económicos y para meter un Prestashop van de maravilla. Aquí el enlace.
  26. 2 points
    Nous non plus, nous n'avons rien modifié sur ton site... Cordialement
  27. 2 points
  28. 2 points
    Yes @El Patron this has gone long enough. I am locking this topic as I think it is not fair to talk about someone that can not replay and defend/explain. Moderators did try to contact him but with no luck, so do not what is happening to him. @vekia If you do get notification do let me know to unlock topic. For people that bought modules but did not get them, try to dispute payment if possible. For people that got modules but got issues, try to post in forums exact issue. There could be users that may me had similar issue or there are someone that could help with that specific issue. And there is a good practice to contact developers before buying a module/theme.
  29. 2 points
  30. 2 points
    Nothing out of the ordinary, in the most economical CPU: Intel Xeon E3-1245v5 - 4c/8t - 3.5GHz /3.9GHz. RAM: 64GB DDR4 2133MHz. Of course with SSD storage In a typical LAMP installation, as optimised as possible in terms of environmental variables. Better MariaDB and I would recommend CentOS as OS
  31. 2 points
  32. 2 points
  33. 2 points
    Bonjour, Il faut les mettre tous dans un dossier mère et zipper ce dossier .
  34. 2 points
  35. 2 points
    I have created/updated origional breadcump.tpl and added pages who i wanted to include. Page to include?/exclude you do update in the lines highligted working perfect in prestashop 1.6 versions. ps dont forget to backup your origional before copy past <!-- Breadcrumb --> {if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if} <div class="breadcrumb" {if $page_name == 'product' or $page_name == 'category' or $page_name == 'cms' or $page_name == 'new-products' or $page_name == 'best-sales' or $page_name == 'prices-drop' or $page_name == 'manufacturer' or $page_name == 'sitemap' or $page_name == 'content' or $page_name == 'stores' or $page_name == 'search'}itemscope itemtype="http://schema.org/BreadcrumbList"{/if}> <!-- <div class="container" > --> <!--<meta itemprop="name" content="{$meta_title|escape:'html':'UTF-8'}"/>--> <span {if $page_name == 'product' or $page_name == 'category' or $page_name == 'cms' or $page_name == 'new-products' or $page_name == 'best-sales' or $page_name == 'prices-drop' or $page_name == 'manufacturer' or $page_name == 'sitemap' or $page_name == 'content' or $page_name == 'stores' or $page_name == 'search'}itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem"{/if}><meta itemprop="position" content="1"><a class="home" itemprop="item" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{l s='Return to Home'}"><meta itemprop="name" content="{l s='Home'}" /><i class="icon-home"></i></a></span> {if isset($path) AND $path} <span class="navigation-pipe" {if isset($category) && isset($category->id_category) && $category->id_category == (int)Configuration::get('PS_ROOT_CATEGORY')} style="display:none;"{/if}>{$navigationPipe|escape:'html':'UTF-8'}</span> {if $page_name == 'product' or $page_name == 'category' or $page_name == 'cms' or $page_name == 'new-products' or $page_name == 'best-sales' or $page_name == 'prices-drop' or $page_name == 'manufacturer' or $page_name == 'sitemap' or $page_name == 'content' or $page_name == 'stores' or $page_name == 'search'} {if $path|strpos:'span' !== false} <span class="navigation_page" > {$path|@replace:'<a ': '<span > <span > <a itemprop="item" '|@replace:'data-gg="">': '> <span >'|@replace:'</a>': '</a></span></span>'}</span> {else} <span itemprop="itemListElement" class="item-breadcrumb" itemscope="" itemtype="http://schema.org/ListItem"><meta itemprop="position" content="1"><meta itemprop="item" content="{if isset($force_ssl) && $force_ssl}https://{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}{else}http://{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}{/if}" /><meta itemprop="name" content="{$path}" /><span class="item-breadalone">{$path}</span></span> {/if} {else} {if $path|strpos:'span' !== false} <span class="navigation_page" > {$path|@replace:'<a ': '<span > <span > <a '|@replace:'data-gg="">': '> <span >'|@replace:'</a>': '</a></span></span>'}</span> {else} <span class="item-breadalone">{$path}</span> {/if} {/if} {/if} </div>
  36. 2 points
    Il est "génial" ce patch avec une moitié du code qui ne sert à rien ! On cherche le type de fichier (par son extension), mais on ne le teste pas Et on stocke ce fichier tel quel. Si on passe la secure_key (qui par installation "in situ") est toujours la même, un hacker envoie un fichier hack.php directement dans le répertoire /views/img/layers/ et c'est la fête du slip. J'hallucine de voir comment après tout ce temps les développeurs sont incapable de prendre les problème de sécurité au sérieux. $path = dirname(__FILE__).'/views/img/layers/'; if ($_FILES['data_image']['name']) { $info = pathinfo($_FILES['data_image']['name']); // Is this a valid extension ? if (!in_array(strtolower($info['extension']),array('png', 'jpg', 'gif', 'jpeg')) { die(__LINE__); } // Is this a valid image ? if (!(@getimagesize($_FILES['data_image']['tmp_name'])) { die(__LINE__); } // Rename the file, keep only the extension $name = uniqid().'.'.$info['extension']; if (!file_exists($path.$name)) { move_uploaded_file($_FILES['data_image']['tmp_name'], $path.$name); } $data_image = $name; }
  37. 2 points
    Entonces en Internacional -> Países -> España -> Modificar, desmarca la opción "¿Necesita un número de identificación fiscal?"
  38. 2 points
    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 ); } }
  39. 2 points
    todas las traducciones como aqui lo indica es en el archivo que estan : $this->translator->trans('Free', array(), 'Shop.Theme.Checkout'), <<<---estara en el archivo ShopThemeCheckout.es-ES.xlf, esto sera en mi caso por que mi idioma es es-ES {server}/app/Resources/translations/es-ES/ShopThemeCheckout.es-ES.xlf <<<---- hay buscare la palabra Free en el apartado <source>Free</source> esto no se modifica sino <target state="translated">Gratis</target> y por ese mismo apartado hasta me dice donde pertenece esto <file original="src/Adapter/Presenter/Cart/CartPresenter.php" source-language="en" target-language="es-ES" datatype="plaintext"> lo correcto o lo ideal es no hacer la traduccion en este archivo (que si funcionan) si no pasar parte de este archivo a nuestras traducciones de tema {server}/themes/classic/translations/es-ES <<<---aqui es donde puedes poner las traducciones propias, ya que en una actualizacion o reinstalacion solo exportas tu tema completo y no se perdera nada....
  40. 2 points
    Hello, i have the same problem and a solution The keywords for the product exists at database , eg for product 23750 , exists 23750 keyword The temporaly solution for me is to change default category for the product to another category, then change back to correct category! Strange but it is working! ///edit Apr 17 2020 // It only needs to add product to another category and remove it again. no need to change product default category
  41. 2 points
    You can use the following hooks: <?php public function install() { if ( parent::install() && $this->registerHook('displayAdminOrder') && $this->registerHook('displayAdminOrderLeft') && $this->registerHook('displayAdminOrderRight') && $this->registerHook('dsplayAdminOrderTabOrder') && $this->registerHook('displayAdminOrderContentShip') && $this->registerHook('displayAdminOrderContentOrder') ) { return true; } $this->uninstall(); return false; } /** * displayAdminOrderContentShip */ public function hookDisplayAdminOrderContentShip($param) { return '<b>hookDisplayAdminOrderContentShip</b>'; } /** * @hook displayAdminOrderLeft */ public function hookDisplayAdminOrderLeft($param) { return '<b>hookDisplayAdminOrderLeft</b>'; } /** * displayAdminOrderRight */ public function hookDisplayAdminOrderRight($param) { return '<b>hookDisplayAdminOrderRight</b>'; } /** * @hook displayAdminOrder */ public function hookDisplayAdminOrder($param) { return '<b>hookDisplayAdminOrder</b>'; } /** * displayAdminOrderContentOrder */ public function hookDisplayAdminOrderContentOrder($param) { return '<b>hookDisplayAdminOrderContentOrder</b>'; } /** * displayAdminOrderTabOrder */ public function hookDisplayAdminOrderTabOrder($param) { return '<b>hookDisplayAdminOrderTabOrder</b>'; } $orderId = $param['id_order']; $cart = $param['cart']; Check the attached picture:
  42. 2 points
    Hey! Hopefully you are still gainfully employed. The value you seek is found here: /var/www/*prestashop_directory*/html/app/config/parameters.php The key you are looking for is: 'ps_cache_enable' You want to set the value to false, like this: 'ps_cache_enable' => false That should do it.
  43. 2 points
    In your themefolder/templates/catalog/_partials/miniatures/product.tpm just before the the "thumbnail-container" div closes {block name='product_miniature_item'} {if $product.quantity > 0} <span class="availability-list availability-list-in-stock">In Stock</span> {else} <span class="availability-list availability-list-out-of-stock">Out of Stock</span> {/if} {/block} And in themefolder/assests/css/custom.css file (for example) something like .availability-list{ padding: 4px; color:white; position: absolute; right:0; bottom:0; } .availability-list-in-stock{ background-color: green; } .availability-list-out-of-stock{ background-color red; } .thumbnail-container{ position: relative } That last one was just so that the text stays in the thumbnail, it may not be needed depending on your theme. Keep in mind that i did not test this code but it should about work.
  44. 2 points
    Hi, In April of 2017 I wrote a guide on my blog: http://victor-rodenas.com/2017/04/23/crear-pagina-php-en-prestashop-1-7/ specify for Prestashop 1.7 ((It is written in Spanish, but with google translator you can translate the guide) Check if the guide is still working. PD: As you can see in the guide for Prestashop 1.7 with respect to Prestashop 1.6 to create a basic page, no big difference My english is very bad. Sorry for my English
  45. 2 points
    Eh, community, this is my 4th question about prestashop API and I didn't get any answer but after long run I figured it out how to update order informations (and any other) through ajax/jquery/javascript. var api_url = 'https://yourdomain/api/'; var api_key = 'Y0uRG3n3r4T3D4P1K3Y'; // with permissions to put info. $.ajax({ url: api_url + 'orders/' + order_id, type: "GET", dataType: "xml", username: apiKey, password: "", processData: false, contentType: "xml", success: function (data) { // Here You can change or update desired fields $xml = $(data), $xml_shipping_number = $xml.find( "shipping_number" ); // what You want to change /* Add tracking number */ $xml_shipping_number.text("123456"); // your shipping number // now let's send this back to API $.ajax({ url: api_url + 'orders/' + order_id, type: "PUT", dataType: "xml", username: apiKey, password: "", data: data, processData: false, contentType: "xml", success: function () { console.log('Success! Added Shipping number') }, error: function (xhr, ajaxOptions, thrownError) { //Add these parameters to display the required response alert(xhr.status); alert(xhr.responseText); }, }); }, error: function (xhr, ajaxOptions, thrownError) { //Add these parameters to display the required response alert(xhr.status); alert(xhr.responseText); }, }); In my case I was editing shipping number but You can edit whatever You want. I am just leaving this here because probably a lot people are looking for these. BE Careful to keep those API keys to yourself and run your browser in cross-origin enabled by disabling web-security You can do it by running Chrome in Run -> chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security
  46. 2 points
    Pour ceux qui cherche pour une installation 1.7 : https://www.dropbox.com/s/uqxqj35hec9krys/pscleaner.zip
  47. 2 points
    if your country has zip code and you still want to keep it but just do not want it to be validated. then you may try to modify following line to remove red part in file /classes/Address.php 'postcode' => array('type' => self::TYPE_STRING, 'validate' => 'isPostCode', 'size' => 12),
  48. 2 points
    Shop Parameters > Traffic > SEO + URLs (first tab), edit "index" and you have the description meta tag there.
  • Create New...

Important Information

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