Jump to content

Amir92

Members
  • Posts

    18
  • Joined

  • Last visited

2 Followers

Profile Information

  • Activity
    Developer

Recent Profile Visitors

2,088,730 profile views

Amir92's Achievements

Newbie

Newbie (1/14)

7

Reputation

  1. This is very old post, but i have the solution, hope this help someone You'r solution is correct, to fix token issue, get token value like this: $token_foo = Tools::getAdminTokenLite('AdminFooBar');
  2. Can you on debugging and paste error here. Try to setup on localhost first
  3. Hey, you missed Product.php file which override getProductIdByDate() method Please copy override/classes/Product.php file. Try to replace all changes.
  4. Hey Jimmy, I am also not Englishman, sorry for my bad english -Try to clear cache and enable debugging from config/defince.inc.php and check the exact error. -no issue, just copy override files in same folder, if folder not exist create folder. -Can you tell me your shop url? by the way you may need to change line 7 Context::getContext()->controller->php_self = $query[3]; Ex: localhost/prestashop/en/prices-drop, then "price-drop" index is 3, so $query[3]
  5. Hey Alex, please check my above solution, and let me know if its working for you
  6. Thanks everyone for waiting too long for this solution . Finally, i found the solution to show filter: block layered navigation module(prestashop default module) on Discount page(price_drop).For now, this is working for discount page only, in future i will try to implement on other page too as new_products and best_sales as soon i get time, or if you guys support by Donation, i will try to make in urgent, and many more free solution Here is the working solution you can check: eddy(dot)com(dot)sa/en/prices-drop Note: I override most of the files. but you need to modify blocklayered module core file. There are two issue. I will try to fix these issue in next release. 1) Total number of product count not correct. 2) You need to define "price_drop" page indexing manually in blocklayererd-ajax.php Prestashop Supported Version: 1.6.1.10 (tested on this version) List of file changes: 1) override/controllers/front/PricesDropController.php 2) themes/[current-theme-name]/prices-drop.tpl 3) override/classes/Product.php 4) modules/blocklayered/blocklayered.php 5) modules/blocklayered/blocklayered-ajax.php - Update $query[x] index as per your store url for price_drop page. Ex: localhost/prestashop/en/prices-drop , then x = 3 6) themes/[current-theme-name]/js/modules/blocklayered/blocklayered.js File download link: https://drive.google.com/file/d/0By68mIirpO34LU04a1dSNklLd2s/view ( Can anyone tell me from where i can upload file in this thread? ) Just download and replace above files in you store, and update $query[x] index in blocklayered-ajax.php as mentioned above. Please let me know, if any issue
  7. Hey Alexandru Alexe, m here now sorry i was so busy, m going to write my solution now. meanwhile u can check working site: eddy(dot)com(dot)sa/en/prices-drop
  8. I got the solution, for Discount page (price-drops) is working great, i need to figure out for other page also. I will share solution here once other done.
  9. Hello, After reading different thread on How to add different logo for multiple languages, m trying to compile in single thread with complete answer. Hope this will help someone, like me Let assume, you want to add two different logo for English and French language, create two different logo with name logo-en.jpg & logo-fr.jpg Step1: Add two logo image in img folder Step2: Update Database: i) Open ps_configuration table, and search PS_LOGO in name column, copy id_configuration value. Only for Mobile: If you are using different logo for mobile then also copy id_configuration value for PS_LOGO_MOBILE ( by default, you will not find this value, as for web and mobile both are same, so no value in DB. You need to add above value if not available) ii) Open ps_configuration_lang table and add logo details for different language, Add two rows id_configuration = same as ps_configuration table column id_configuration, id_lang column = language id (Go to Localization>Languages and copy language id) value = image name as "logo-en.jpg , logo-fr.jpg" date_upd = leave as it is Your final insert query will look similar to: INSERT INTO `prestashop-db`.`ps_configuration_lang` (`id_configuration`, `id_lang`, `value`, `date_upd`) VALUES ('243', '1', 'logo-en.jpg', NULL); INSERT INTO `prestashop-db`.`ps_configuration_lang` (`id_configuration`, `id_lang`, `value`, `date_upd`) VALUES ('243', '2', 'logo-fr.png', NULL); Only for Mobile: Same query with id_configuration referring to ps_configuration table, PS_LOGO_MOBILE id_configuration column. Step3: Update Controller class to read logo value from ps_configuration_lang table. Open classes/controller/FrontController.php Update the lines i) Update displayRestrictedCountryPage() method: Line: 776: protected function displayRestrictedCountryPage() { header('HTTP/1.1 503 temporarily overloaded'); $this->context->smarty->assign(array( 'shop_name' => $this->context->shop->name, 'favicon_url' => _PS_IMG_.Configuration::get('PS_FAVICON'), //Update this line 'logo_url' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_LOGO')) change it to: protected function displayRestrictedCountryPage() { header('HTTP/1.1 503 temporarily overloaded'); $this->context->smarty->assign(array( 'shop_name' => $this->context->shop->name, 'favicon_url' => _PS_IMG_.Configuration::get('PS_FAVICON'), //Pass id_lang parameter in Configuration::get('PS_LOGO') //$this->context->cookie->id_lang 'logo_url' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_LOGO',$this->context->cookie->id_lang)) ii) Update initLogoAndFavicon() method: Line:1619 public function initLogoAndFavicon() { $mobile_device = $this->context->getMobileDevice(); if ($mobile_device && Configuration::get('PS_LOGO_MOBILE')) { //Update this line, if you are using different logo for mobile device $logo = $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_LOGO_MOBILE').'?'.Configuration::get('PS_IMG_UPDATE_TIME')); } else { //Update this line $logo = $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_LOGO')); } change it to: public function initLogoAndFavicon() { $mobile_device = $this->context->getMobileDevice(); if ($mobile_device && Configuration::get('PS_LOGO_MOBILE')) { //Pass id_lang parameter in Configuration::get('PS_LOGO') //$this->context->cookie->id_lang $logo = $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_LOGO_MOBILE',$this->context->cookie->id_lang)); } else { //Pass id_lang parameter in Configuration::get('PS_LOGO') //$this->context->cookie->id_lang $logo = $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_LOGO',$this->context->cookie->id_lang)); } Now, go to your browser, clear cache and refresh If any issue, please reply in this thread.
×
×
  • Create New...