Jump to content


  • Posts

  • Joined

  • Last visited

About antoniocici

  • Birthday 11/20/1985

Contact Methods

Profile Information

  • Location
  • Interests
    PHP Lover, Prestashop Addicted, also loving WP and SEO

Recent Profile Visitors

2,828,205 profile views

antoniocici's Achievements


Newbie (1/14)

  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges



  1. After reading a lot of forum topics and GitHub Issues marked as "solved", but solved only for older versions of Prestashop and, mainly, for older versions of the Faceted Search Module, I've found a solution, that works well form me. Since all the queries have been replaced by calls to Search Adapter Objects, I've modified the file: /modules/ps_facetedsearch/src/Product/Search.php at line 147, modifying the source code from this: case 'id_attribute_group': $operationsFilter = []; foreach ($filterValues as $attributeId => $filterValue) { $this->getSearchAdapter()->addOperationsFilter( 'with_attributes_' . $attributeId, [[['id_attribute', $filterValue]]] ); } break; to this: case 'id_attribute_group': $operationsFilter = []; foreach ($filterValues as $attributeId => $filterValue) { $this->getSearchAdapter()->addOperationsFilter( 'with_attributes_' . $attributeId, [[['id_attribute', $filterValue]]] ); } //modded by Antonio to hide Out of Stock combinations $operationsFilter = []; $operationsFilter[] = [ ['quantity', [0], '>'], ]; $this->getSearchAdapter()->addOperationsFilter( self::STOCK_MANAGEMENT_FILTER, $operationsFilter ); break; and finally it works!
  2. First of all, thank you for your useful suggestion. I've to add one more modification required to the code in order to allow to edit a customer from the BackOffice. To complete the solution proposed by @Nicolased we have to make the following change inside the file: /src/Core/ConstraintValidator/CustomerNameValidator.php at the line 40, change the constant as follow const PATTERN_NAME = '/^(?!\s*$)(?:[^!<>,;?=+()\/\\\\@#"°*`{}_^$%:¤\[\]|。]|[。\.](?:\s|$))*$/u'; Without this change, I can't edit and save a customer with numbers in firstname or lastname from the backoffice.
  3. Hi there, I think that this problem is only a bad behaviour of the browsers, in fact if you change the url after the login with the name of another controller, like for example 'controller=AdminOrder', everything works well. To solve this problem (without change everytime the url manually), I've created a .htaccess file inside my admin folder with the following lines: <IfModule mod_headers.c> Header set Cache-Control "no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires 0 </IfModule> Hope that this solution can be helpful to someone.
  4. Hi Kaiservikingo, we have experienced the same problem, and we have solved just by adding the following line to the configuration suggested by prestashop, just before the try_files line: rewrite '^/([a-z]{2})/(.*)' /index.php?isolang=$1&$args last; This line avoid the loops and redirect the page to the correct language, without disabling URL rewriting. So the full nginx configuration will be: rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last; rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$1$2.jpg last; rewrite ^/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$1$2$3.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.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.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.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.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.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.jpg last; rewrite ^/c/([0-9]+)(-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2.jpg last; rewrite ^/c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ /img/c/$1.jpg last; rewrite ^/([0-9]+)(-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2.jpg last; rewrite '^/js/(.*)' /js/$1 last; #prevent issues with /js folder rewrite '^/([a-z]{2})/(.*)' /index.php?isolang=$1&$args last; try_files $uri $uri/ /index.php?isolang=$1&$args; I hope that this configuration can help to solve your problem. Best regards. Antonio Cicirelli Ideacommerce.it
  5. Thanks to your suggestions, I've wrote down a couple of rows to update the country names for the english language. As suggested, I've picked the file country.xml inside the folder /install/langs/en/data . I've copied it into the admin folder and I've created, in the same folder, a file named tool.php, with the following lines: <?php define('_PS_ADMIN_DIR_', getcwd()); define('PS_ADMIN_DIR', _PS_ADMIN_DIR_); // Retro-compatibility include(PS_ADMIN_DIR.'/../config/config.inc.php'); $countries= simplexml_load_file(dirname(__FILE__).'/country.xml'); foreach ($countries as $row) DB::getInstance()->execute("UPDATE "._DB_PREFIX_."country_lang SET name = '".$row->name."' WHERE id_lang = 2 AND id_country = (SELECT c.id_country FROM "._DB_PREFIX_."country c WHERE c.iso_code = '".$row['id']."')"); echo 'done'; ?> In my case, the english language id was 2 (id_lang = 2), so you should change it with your own. The same code, with the right changes, can be used for almost every language table present into the install folder. I hope this code can be helpful to someone.
  6. Some months ago, I've experienced the same issue. I've solved it modifying the setCustomerAddress inside the /express_checkout/payment.php as follow: function setCustomerAddress($ppec, $customer, $id = null) { $address = new Address($id); $address->id_country = Country::getByIso($ppec->result['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE']); if ($id == null) $address->alias = 'Paypal_Address'; $address->lastname = $customer->lastname; $address->firstname = $customer->firstname; $address->address1 = $ppec->result['PAYMENTREQUEST_0_SHIPTOSTREET']; if (isset($ppec->result['PAYMENTREQUEST_0_SHIPTOSTREET2'])) $address->address2 = $ppec->result['PAYMENTREQUEST_0_SHIPTOSTREET2']; $address->city = $ppec->result['PAYMENTREQUEST_0_SHIPTOCITY']; //mod by IdeaCommerce if (Country::containsStates($address->id_country)){ $tmp_id_state = (int)State::getIdByIso($ppec->result['PAYMENTREQUEST_0_SHIPTOSTATE'], $address->id_country); if(!$tmp_id_state) $tmp_id_state = (int)State::getIdByName($ppec->result['PAYMENTREQUEST_0_SHIPTOSTATE'], $address->id_country); if($tmp_id_state > 0) $address->id_state = $tmp_id_state; } //end mod $address->postcode = $ppec->result['PAYMENTREQUEST_0_SHIPTOZIP']; if (isset($ppec->result['PAYMENTREQUEST_0_SHIPTOPHONENUM'])) $address->phone = $ppec->result['PAYMENTREQUEST_0_SHIPTOPHONENUM']; $address->id_customer = $customer->id; return $address; } I hope that it could be helpful for someone
  7. After reading your proposal, I've made some modifications to the makeMenu() function of the blocktopmenu module class as follow: case 'LNK': $link = MenuTopLinks::get((int)$id, (int)$id_lang, (int)$id_shop); if (count($link)) { if (!isset($link[0]['label']) || ($link[0]['label'] == '')) { $default_language = Configuration::get('PS_LANG_DEFAULT'); $link = MenuTopLinks::get($link[0]['id_linksmenutop'], $default_language, (int)Shop::getContextShopID()); } //start mod $current = explode('?', Tools::safeOutput(urldecode($_SERVER['REQUEST_URI']))); $selected = (Tools::HtmlEntitiesUTF8($link[0]['link']) == $current[0]) ? ' class="sfHover"' : ''; $this->_menu .= '<li'.$selected.'><a href="'.Tools::HtmlEntitiesUTF8($link[0]['link']).'"'.(($link[0]['new_window']) ? ' onclick="return !window.open(this.href);"': '').' title="'.Tools::safeOutput($link[0]['label']).'">'.Tools::safeOutput($link[0]['label']).'</a></li>'.PHP_EOL; // end mod } break; I've simply parsed the request uri contained into the $_SERVER var and compared it with the link saved into the menu. It works great and may be helpful for others.
  8. Purtroppo il servizio Catalogo Esprinet è un servizio extra a pagamento. Una volta pagato, Esprinet fornisce le credenziali per accedere via FTP ai file del listino. Il modulo effettua l'accesso via ftp ai server di esprinet, scarica i file del listino ed aggiorna il catalogo sul proprio shop Prestashop. Per chi fosse interessato alla versione per Prestashop 1.6 del modulo di Import Esprinet, potete trovarlo al seguente indirizzo: http://www.ideacommerce.it/shop/moduli-prestashop/modulo-import-esprinet-prestashop/
  9. Thank you very much joseantgv, it works great for me
  • Create New...

Important Information

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