Jump to content

elianto100

Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Activity
    Agency

elianto100's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I have just done on a web site (version 1.6.0.14) the security modification release on july 30 as suggested in this page https://gist.github.com/Shudrum/27fc534de69c96617280 After the modification, we have encontered an error when we try to send a message from an order details in the administration. When we try to send a messagge to a client we have this error: I have solved the problem replacing line 617 in AdminOrdersController.php $customer_thread->token = Tools::passwdGen(12); with $customer_thread->token = Tools::passwdGen(12,'RANDOM'); Questions: 1) Does any body else encotered the same problem? 2) Someone can confirm me that the solution I used is correct? Thank you in advance, Regards Stefano Oggioni
  2. Hi, the "country iso code" is differnt just for a single state, but is not unique for all for instance, in my db id_state | id_country | id_zone | name | iso_code 90 | 4 | 2 | Manitoba | MB 182 | 10 | 9 | Monza e della Brianza | MB 4 is US, 10 is Italy For instance, the customer "choose Italy" and "Monza Brianza", the function return the first "MB" found in iso_code field (Manitoba, 90) The shipping cost "Italy - Manitoba" are wrong and not set, so it's 0.
  3. Hi, same nightmare for me too, prestashop 1.4.8.2, paypal module v3.8.1 I have solved in this way. The problem is due to this tossic function in the class State.php public static function getIdByIso($iso_code) { return Db::getInstance()->getValue(' SELECT `id_state` FROM `'._DB_PREFIX_.'state` WHERE `iso_code` = \''.pSQL($iso_code).'\'' ); } It looks for the first value of iso_code, that is unique just for a country, not for all the countries. I have created in the class State.php a new function, in red what I have added public static function getIdByIso_new($iso_code, $id_country) { return Db::getInstance()->getValue(' SELECT `id_state` FROM `'._DB_PREFIX_.'state` WHERE `iso_code` = \''.pSQL($iso_code).'\' AND `id_country`='.$id_country ); } Then I modified the file payment.php of the paypal module I have just changed the function getIdByIso with getIdByIso_new, so changed this ... if (Country::containsStates($address->id_country)) $address->id_state = (int)State::getIdByIso($ppec->result['PAYMENTREQUEST_0_SHIPTOSTATE'], $address->id_country); ... into this if (Country::containsStates($address->id_country)) $address->id_state = (int)State::getIdByIso_new($ppec->result['PAYMENTREQUEST_0_SHIPTOSTATE'], $address->id_country); I hope it could be helpful for someone. Stefano
×
×
  • Create New...