Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by seog

  1. This code load same image uncompressed... Tested in product.tpl If you get load product image with different codes/variables, it always will be uncompressed The issue I think is in htacces rewrite rule: RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] xxxxxx xxx xxx
  2. Sorry it dont work, I tried also others changes unsucessfully
  3. Hi [email protected] Thank you for your answer, Do you know say me what could be the right path for load only my original images without PS compression (uncompression) in product page ? The original code is src="{$img_prod_dir}{$lang_iso}-default-large_default.jpg" best regards
  4. Hi I had compressed with good software my all product images due to SEO purposes and the absurd image compression of Prestashop has worsened the quality of images and especially has multiplied by x 3 the size of all images How can I disable fully the .jpeg compression in Prestashop when I upload a csv?
  5. Hi I am testing about a issue in blockcart.tpl 1.6.1 (ajax_cart_quantity) because when I add a product and I return to index page, If I load index page from other browser then it show the shopping cart showing last products added of another browser/user cookies. This error only is in index because in categories or product page it shows right. When I leave the browser and go again to browser then the error is that shopping cart dont display "0" quantities because it add a "style=display:none" when this style was removed for me. I tried disabling express cache module, memcached module, disabling in server all nginx gzip caches and it continue with error only in index. I resume my code: <b>{l s='Panier' mod='blockcart'}</b> <span class="ajax_cart_quantity">{$cart_qties}</span> <span class="ajax_cart_product_txt{if $cart_qties != 1} unvisible{/if}">{l s='Produit' mod='blockcart'}</span> <span class="ajax_cart_product_txt_s{if $cart_qties < 2} unvisible{/if}">{l s='Produits' mod='blockcart'}</span> <span class="ajax_cart_total{if $cart_qties == 0} unvisible{/if}"> .... </span> <span class="ajax_cart_no_product" {if $cart_qties != 0}style="display:none"{/if}>{l s='Produit(s)' mod='blockcart'}</span> This error add the class "style=display:none" when I removed in <span class="ajax_cart_quantity">{$cart_qties}</span> I also tried add in <span class="ajax_cart_no_product" {if $cart_qties != 0}style="display:none"{/if}>{l s='0 Produit(s)' mod='blockcart'}</span> but it hide the "0" always when index was cached with 1 or more products added for other users. I want show when there are no products in cart "0 Produit(s)" instead of "(empty)" and it only works on the whole web less in index (when index was cached) NOTE: I have hooked blockcart in "DisplayNav" in first position and "blockuserinfo uninstalled" Blockart need to have installed blockuserinfo for fix this index error? Ajax-cart.js or blockart-json.tpl need changes? Htaccess default cache time expired rules issue? It is Blockcart 1.6.1 module issue? best regards PS
  6. Checking errors, I resume it: index.php (unsafe-inline) jquery-1.11.0.min.js help.js Frontoffice breaks fully
  7. Hi bellini13 Issue is that Prestashop backoffice load inline scripts from outside of your web (JS and CSS), then you cant stop hacks of javasript of bad users because your backoffice breaks if you add any of following security directives: Content-Security-Policy: default-src 'none'; script-src https://www.mywebiste.com (Global issue) Content-Security-Policy: default-src 'self'; (Global issue) Content-Security-Policy: default-src https:; (Mainly errors due to third party modules) Content-Security-Policy-Report-Only: default-src 'unsafe-inline' 'unsafe-eval' (Js inline prestashop issue) The solution could be add all links from where Prestashop is loaded in your backoffice including his addons cdn urls, etc I ask to some user if he knows about what directive could be compatible with prestashop Best regards
  8. No, I tested cloudflare cdn but I obtain more performarce without cdn. My website is without CDN Issue is prestashop unsafe inline javascript: http://forge.prestashop.com/browse/PSCFV-3047 For fix it, would be necessary to add all prestashop JS inline paths used in backoffice/frontoffice in default-src (where prestashop store it as cdns, tinymce urls etc) I understand that Prestashop should be know what Content-security-Policy would be compatible with backoffice and frontoffice NOTE: I have not any external js or css in my site, example: all my fonts not call to google fonts because I downloaded it and uploaded directly to my server (full local server)
  9. HI Because prestashop may have security holes in some of his modules (as sendtofriend that I suffered chinese spam), I added hardnest to my VPS with some security paths. If you try add "Content-Security-Policy" in your web then your JS crash your web in backoffice and frontoffice due to Prestashop unsafe inline Javascript or external JS loaded. Do you know when Prestashop fix it or do you know what urls/paths should be added in Content security policy for fix Prestashop Javascript issues? Example: Content-Security-Policy: default-src 'strict-dinaymic' http://cdn.prestashopJSpath; object-src 'none' Best regards
  10. Do you delete from mysql database? From prestashop backoffice you can not delete it, only can check or uncheck (enable or disable) If you deleted from mysql then download again full prestashop and choose only geo countries to upload from ftp
  11. Hello Due I need use other field how third reference I tried many options unsucesfully to can add more than 13 words in ean13 backoffice product tab, options such as: classes/Product.php 'ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 64), and: Phpmyadmin Changing in Mysql Database EAN13 VARCHAR Length to 64 in ps_product, ps_product_attribute and ps_stock and: classes/Validate.php public static function isEan13($ean13) { return !$ean13 || preg_match('/^[0-9]{0,64}$/', $ean13); } or: classes/Validate.php public static function isEan13($ean13) { return preg_match(Tools::cleanNonUnicodeSupport('/^[^<>;={}]*$/u'), $ean13); } Any suggestion??
  12. Hola gente Hace un tiempo tenia añadido un simple codigo para cargar los cdn mediaserver mediante un certificado SSL sin wildcard. El truco consistia en añadir el codigo "&& Tools::usingSecureMode() == false" en Classes/Tools.php El codigo funcionaba en Prestashop 1.5.x pero al intentar implementarlo en Prestashop no termina de funcionar ya que redirige la url del cdn a la url principal (como si no estarían configurados los mediaservers). Aporto abajo el override que había hecho para pegarlo en override/classes. **Si alguien sabe que falla en el código para que no funcione correctamente, se ruega aporte la solución, no entiendo porque dicho código funciona en Prestahop 1.5 y no en Prestashop 1.6 Saludos
  13. Hi I am setting mediaservers with ssl and I added the code "&& Tools::usingSecureMode() == false" in Tools.php according this post but dont work in PS because transform the cdn url in the main domain https://www.mysite.com/img/xxx.jpg If I disable ssl in all pages then url work right with subdomain http://cdn1.mysite.com/img/xxx.jpg I activated in plesk the cdn subdomains with all his dns and are redirected to https://www.mysite.com I attach my full override of tools.php with the hope that someone may know that it may be wrong best regards <?php class Tools extends ToolsCore { public static function getMediaServer($filename) { if (self::$_cache_nb_media_servers === null && defined('_MEDIA_SERVER_1_') && defined('_MEDIA_SERVER_2_') && defined('_MEDIA_SERVER_3_')) { if (_MEDIA_SERVER_1_ == '') { self::$_cache_nb_media_servers = 0; } elseif (_MEDIA_SERVER_2_ == '') { self::$_cache_nb_media_servers = 1; } elseif (_MEDIA_SERVER_3_ == '') { self::$_cache_nb_media_servers = 2; } else { self::$_cache_nb_media_servers = 3; } } if ($filename && self::$_cache_nb_media_servers && Tools::usingSecureMode() == false && ($id_media_server = (abs(crc32($filename)) % self::$_cache_nb_media_servers + 1))) { return constant('_MEDIA_SERVER_'.$id_media_server.'_'); } return Tools::usingSecureMode() ? Tools::getShopDomainSSL() : Tools::getShopDomain(); } }
  14. Do you can confirm me if this tuning for opcache is best option for PHP 7.0.18 and PS These modifications should be in /opt/plesk/php/7.0/etc/php.d/10-opcache.ini ? Best regards
  15. Thank you very much for your work. I download today your module but I can´t see supplier_reference for edit. I see in product-edit.php around line 1210 where you allow supplier reference if dont exist product reference "p.reference ".$inc." or p.supplier_reference" There are a way to can choose and edit p.supplier_reference ? best regards
  16. Hello @selectshop.at Module express cache v3.2 was installed. I havent php 5.6, i resume my software: PHP 7.0.18 OPcache Prestashop I have installed at the moment redis.ini in php 7. Do you suggest me Memcached or APCu instead of Redis ? Would be compatible have Redis and Memcached enabled? Best regards
  17. Hello I attach my current setting for request a suggestion about that cache could be more fastest: PHP 7.0.18 OPcache 7.0.18 Prestashop Adititonal Cache module installed Page size 512KB with 37 request Current Gtmetrix fully loaded time 3,4S Mysql Database weight 100MB (600 products) ¿Better in my case APCu, Memcached or Redis? Best regards
  18. About Order Reference I solved issue adding before than a.id_currency, the code a.`reference`, About Order total ammount yet I cant solve it, I tried the next codes: a.`total_paid_tax_incl`, a.`total_order`, a.`total_ammount`, ....
  19. Hello I tried many solutions that worked in previous PS versions as 1.5 etc but in last PS 1.6.13 I can not make it work without affecting others variables. I am trying shown Product reference and product quantity in Order List from Backoffice, for it the only two solutions that it worked are: AdminOrdersController.php Solution 1: $this->_select = ' (SELECT GROUP_CONCAT(so.product_quantity SEPARATOR "\ ") FROM `'._DB_PREFIX_.'order_detail` so WHERE so.id_order = a.id_order) as quant, (SELECT GROUP_CONCAT(so.product_reference SEPARATOR "\ ") FROM `'._DB_PREFIX_.'order_detail` so WHERE so.id_order = a.id_order) as products, $this->fields_list = array( 'products' => array( 'title' => $this->l('Supplier Reference'), 'align' => 'left', 'width' => 85 ), 'quant' => array( 'title' => $this->l('Quantity purchased'), 'align' => 'left', 'width' => 15 ), Solution 2: $this->_select = ' od.product_reference AS products, od.product_quantity AS quant, $this->_join = ' LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order` = a.`id_order`) $this->fields_list = array( 'products' => array( 'title' => $this->l('Supplier Reference'), 'align' => 'left', 'width' => 50 ), 'quant' => array( 'title' => $this->l('Quantity purchased'), 'align' => 'left', 'width' => 50 ), Both codes are working but... What are the issues?? 1. If I add code od.product_reference AS products then does not show the Order Reference (Is as that PS core confuse product reference with order reference showing in ord_ref "--") 2. If I add code od.product_quantity AS quant then does not show the Total Order ammount (Is as that PS core confuse product quantity with total order ammount showing I think the code a.`id_order is causing this problem Any suggestions please?
  20. Hello Thank you for module, I have installed v2.1.4 with friendly url without id and ssl. All url and routes are perfect but I cant to obtain IMG SSL route succesfully. In postformat.tpl I added without luck {$base_dir_ssl} in: <img itemprop="image" alt="{$post.meta_title|escape:'htmlall':'UTF-8'}" src="{$base_dir_ssl}{$smartbloglink->getImageLink($post.link_rewrite, $post.id_post, 'single-default')}" class="imageFeatured"> Do you know the correct path route for that my post image does not break my ssl? best regards
  21. Si despues de ponerlo en el orden deseado desde "posiciones de los modulos" se te sigue descuadrando entonces es tema de css, será o bien el width que toma de los col-sm-4 etc (prueba eliminandolos de la class "pull-right" del blockcart) o revisa los margin o padding de los div
  22. Hello I added in the right place the code in categorycontroller, within "public function assignProductList()": if (Module::isEnabled('favoriteproducts')) { include_once(_PS_ROOT_DIR_ . '/modules/favoriteproducts/FavoriteProduct.php'); foreach ($this->cat_products as &$cat_product) { $cat_product['isCustomerFavoriteProduct'] = (FavoriteProduct::isCustomerFavoriteProduct($this->context->customer->id, $cat_product['id_product']) ? 1 : 0); } } Now I have the issue that href link dont work because dont add product to favorites, it could be necessary to add a modified id="xxx" or other aditional rel="xxx" in product list: I have been trying to change without success next code: <li id="favoriteproducts_block_extra_add" class="add"> for: <li id="favoriteproducts_block_extra_add" class="add" rel="ajax_id_favoriteproduct_{$favoriteProduct.id_product}"> Any suggestion for can add favorite product from categories calling from the id or rel to favoriteproduct.js functions ?
  23. Para poner el carrito en hookDisplayNav lo tienes facil ya que no tendrás que tocar el blockart.php Debes ir a "Posiciones de los modulos" > Transplantar un modulo > Eliges "Bloque Carrito" y en el desplegable eliges "HookDisplayNav" Saludos
  24. Hello Due to design purposes, I want hide breadcrumb but I read in the past that it is bad for google rich snippets and SEO I look to find the least negative solution possible for SEO purposes in product page and I think in different options such as: 1.CSS options (The professional SEO say that display:none is very bad for SEO) --------------------- .breadcrumb { display:none} .breadcrumb { background:white} .breadcrumb { background-img: url (../img/img-for-hide-breadcrumb.png; position:absolute} 2.File options (If I comment varible then the page dont read breadrumb) -------------------- comment {*include file="$tpl_dir./breadcrumb.tpl"*} NOTE: I see that if I delete {include file="$tpl_dir./breadcrumb.tpl"} from header.tpl and I paste at bottom of product page then there are subcategories that are not displayed. Example: With breadcrumb in header are all the cats & subcats in product page: Home > Mainly Cat > Subcats > Product name With breadcrumb pasted in product page and deleted in header I see only: Home > Mainly Category > Product name Any suggestion about what is the better options? best regards
  • Create New...

Important Information

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