Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 10/20/2019 in Posts

  1. 8 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
    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 1.7.6.7 Here are some marketing goodies I made Enjoy! mslt_cblocks.zip instructions.pdf
  6. 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
  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 (1.7.6.4) 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, 1.7.6.5'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. 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
  14. 2 points
    Social Media Sidebar by PrestaCraft Current module version: 1.3.1 PrestaShop compatible: 1.6 , 1.7 Displays fixed sidebar on the left side with social media buttons. Predefined social medias: Facebook, Google+, Twitter, YouTube, Flickr, Pinterest, Tumblr, Xing, Instagram, VK, Tumblr, WordPress, Spotify, Soundcloud, Whatsapp, LinkedIn Features Customize display (colors, monocolred mode etc.) You can set Your own display order and social medias You want to show Ability to add your own icons based on FontAwesome Ability to display this sidebar in the sticky footer position on mobile devices Ability to hide chosen icons on mobile devices Ability to hide this sidebar on mobile devices if you want to Mobile breakpoint is configurable and you can change it Responsive Ability to disable module on mobile devices to prevent content covering Friendly User Interface Screenshots Changelog: v1.3.1 - Changed install() and uninstall() functions to match current database table pattern - Ability to remove icons in the new tab v1.3.0 - Ability to add your own icons based on FontAwesome - Added new social medias: Whatsapp, LinkedIn - Added option to hide chosen icons on mobile devices - Added option to display this sidebar in the sticky footer position on mobile devices - Ability to set mobile breakpoint by yourself v1.2.0 - Added new social medias: Instagram, VK, Tumblr, WordPress, Spotify, Soundcloud - Added option to hide this sidebar on mobile devices - Added "version checker" tab where you can check now if your module version is current one v1.1.0 - Checked compatibility with PS 1.7 - Fontawesome is now always loaded - to make it work with each theme - PSR code refactor Download socialmediasidebar_1.3.1.zip IF YOU LIKE THIS MODULE, PLEASE DONATE AND SHARE ❤️
  15. 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 1.7.2.4 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
  16. 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.
  17. 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/
  18. 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
  19. 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.
  20. 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é.
  21. 2 points
    @Florent COTTAVOZ oszalejmy, dlaczego nie po polsku?
  22. 2 points
    Is working at PS 1.7.6.5 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`,
  23. 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
  24. 2 points
    Nous non plus, nous n'avons rien modifié sur ton site... Cordialement
  25. 2 points
    1ClickUpgrade non funziona per passare da 1.6 a 1.7, per utilizzarlo e' necessario prima aggiornare all'ultima versione del ramo 1.6, mi pare sia 1.6.1.24, poi si puo' passare da 1.6 a 1.7, il risultato pero' e' un sito non funzionante, che necessita di parecchi aggiustamenti. Per poter aggiornare con successo occorre usare un modulo come questo: https://addons.prestashop.com/en/data-migration-backup/8934-migrationpro-prestashop-upgrade-and-migrate-tool.html il modulo permette il trasferimento dei dati (prodotti, clienti, ordini, ecc) da una versione all'altra, poi si dovranno fare aggiustamenti sulle pagine CMS e sopratutto verificare la compatibilita' dei moduli, o meglio la disponibilita' di aggiornamenti per 1.7 dei moduli che si utilizzano, questo perche' i moduli della 1.6 non vengono importati e non e' detto che esistano per la versione 1.7
  26. 2 points
  27. 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.
  28. 2 points
  29. 2 points
    {yourServer}/themes/classic/templates/_partials/header.tpl
  30. 2 points
  31. 2 points
    Bonjour, Il faut les mettre tous dans un dossier mère et zipper ce dossier .
  32. 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>
  33. 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; }
  34. 2 points
    Miałem to samo, w modułach znajdź "Customer Reassurance" - to jest to tylko nieprzetłumaczone
  35. 2 points
    Entonces en Internacional -> Países -> España -> Modificar, desmarca la opción "¿Necesita un número de identificación fiscal?"
  36. 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 ); } }
  37. 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....
  38. 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
  39. 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:
  40. 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.
  41. 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
  42. 2 points
    Wow... If as much effort was put into helping people fix problems, as is put into arguing with and blaming frustrated users, this would be a pretty good cms. A real shame and in my opinion a missed opportunity. I first discovered PS about 7 years and and I was initially really impressed. How things have changed. After a many hours of troubleshooting the problem with not being able reorder products, I eventually discovered that the issue was solved after I unpublished and published the relevant category. Normally I would consider this type of issue a bug with the script, but as the person who replied to me said, this random problem is probably my fault, as I am the problem. Today I have a new problem which I guess is probably my fault too. The slider on the homepage has vanished during the night for no reason whatsoever. After spending over an hour troubleshooting, publishing, unpublishing, activating and deactivating anything I think may be connected to the issue, I finally managed to get the slider back. Not sure exactly how I fixed that, so I haven't even learned anything. This is so much fun! Fun like the time I superglued my tongue to a condemned meat lorry and I was dragged through the high street of Nettle Town. Next I need to regenerate the thumbnails for about 50 products to improve the terrible image quality. I wonder how this will turn out... So exciting! I think it's time to make a full backup.
  43. 2 points
    There is still people sharing their Prestashop modules FOR FREE and it's increasingly rare! Start by saying "thanks" and after you may ask your question in a kindly mode... that is courtesy and gratitude!! - Never install a module before trying it in a Prestashop test environment, this way you won't have bad surprise. - Perflex gave the solution for a responsive popup: in the main setting tab, open the source code and change the size in width="100%" height="auto" (for each language) - If you want to use a .png pic, in the customize style tab set popup color with only # The module doesn't have functions you dreamt about? --> buy a module on the addons shop and there you will have the right to complain. P.S. : I'm not a friend of Electriz, but I remember when Prestashop was really free (including modules). It's time to realise that nasty comments drove away programmers.
  44. 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
  45. 2 points
    Pour ceux qui cherche pour une installation 1.7 : https://www.dropbox.com/s/uqxqj35hec9krys/pscleaner.zip
  46. 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),
  47. 2 points
    Shop Parameters > Traffic > SEO + URLs (first tab), edit "index" and you have the description meta tag there.
  48. 2 points
    Here's a simple override that adds "Phone" and "Mobile" columns to the Customers > Addresses tab in the Back Office so you can filter by phone or mobile. Create override/controllers/admin/AdminAddressesController.php with the following: <?phpclass AdminAddressesController extends AdminAddressesControllerCore{ public function __construct() { parent::__construct(); $this->fields_list['phone'] = array('title' => $this->l('Phone'), 'filter_key' => 'a!phone'); $this->fields_list['phone_mobile'] = array('title' => $this->l('Mobile'), 'filter_key' => 'a!phone_mobile'); [spam-filter] Remember to go to the Advanced Parameters > Performance tab and click the "Clear cache" button after creating the file.
×
×
  • Create New...

Important Information

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