-
Posts
18 -
Joined
-
Last visited
Everything posted by Amir92
-
ajax AJAX Request to Custom Admin Module Controller
Amir92 replied to Deadpool's topic in Addons, modules and themes developers
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'); -
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]
-
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
-
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.
-
-deleted-
-
Prestashop Shipping Problem
Amir92 replied to Amir92's topic in Ecommerce x PrestaShop [ARCHIVE BOARD]
Thanks for reply Yes I am using same carrier- 3 replies
-
- shipping
- shipping configuration
- (and 3 more)
-
Prestashop Shipping Problem
Amir92 replied to Amir92's topic in Ecommerce x PrestaShop [ARCHIVE BOARD]
Anyone here to help?- 3 replies
-
- shipping
- shipping configuration
- (and 3 more)
-
Hi, I am configuring Shipping in Prestashop, having some problem in configuration. I have total 5 Product in my Shop. and having only two zone Europe and North America. 1) First Product have shipping charge 9$ (for Europe zone) and 4.9$ (for North America) and weight 2kg 2) Other four Product have shipping charge 19$ (for Europe) and 9.9$ (for North America) and weight as 1.5 kg , 1.5 kg, 1.6 kg and 1.6 kg respectively. Can you please help me in configuring Shipping, is this possible to configure in Prestashop?
- 3 replies
-
- shipping
- shipping configuration
- (and 3 more)
-
Hello, I am developing module, i want to add Category tree (having checkbox as in admin product category) instance more than one on single page. i successfully added category tree by using this code $helper = new Helper(); $category_tree = $helper->renderCategoryTree(null, array(), 'categoryBox'); I want two use this category tree more than one in a page, but its not showing all category only "Home" is showing. Can anyone help me resolving this problem?