prestashop-1.6

little modification of the native search engine/form of ps 1.6

99封情书 提交于 2021-01-29 08:10:23
问题 This will be my first post here, I tried to look for faqs about the rules of this site but no clear answer for my doubts, so don't hesitate on telling me if i do smthing wrong or whatever about me: i'm working for some shops, on their websites, i got low-level programing exp, and i'm very familiarized with web developing I need some help about Prestashop programing, i'll quote what i posted on their forum (im getting no answers): PS: 1.6.1.14 default bootstrap Hi guys I'm trying to make an

listing products by Attributes prestashop

浪子不回头ぞ 提交于 2021-01-29 06:23:07
问题 I am new in the prestashop 1.6 development, I want to create a module that allows to list the products according to their different attributes example: we have jeans pants with two colors (black and blue) and two size (L, XL), the page displays four products (black L, black XL, blue L, blue XL), as shown in the picture listing example can you guide me to succeed this module 回答1: There's a paid module that's perfect to achieve this: https://addons.prestashop.com/en/combinaisons-customization

Prestashop Webservice api url redirection

邮差的信 提交于 2021-01-27 14:12:03
问题 I'm trying to run a simple webservice to get a XML list of customers but, when getting http://www.myshopurl.com/api/customers, PS redirects to frontpage. Mod_rewrite is on in apache (checked with phpinfo function). Think that .htaccess is well formed: # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www

Prestashop 1.7 add <br> special character tag in category name but invalid , how to split string in menu navigation nav?

允我心安 提交于 2020-07-23 06:33:22
问题 A lot of people are having a similar problem for adding a hashtag in the product name. I am trying to add a tag ( html line break ) in the category name . I have put "Category name" for example, it won't work. The character validation is there for security measures, it makes sense. So I have tried to overwrite the file "Validate.php" , as explained on another topic by redefining the isCatalogName function like so : <?php class Validate extends ValidateCore { public static function

Prestashop 1.7 add <br> special character tag in category name but invalid , how to split string in menu navigation nav?

孤者浪人 提交于 2020-07-23 06:31:18
问题 A lot of people are having a similar problem for adding a hashtag in the product name. I am trying to add a tag ( html line break ) in the category name . I have put "Category name" for example, it won't work. The character validation is there for security measures, it makes sense. So I have tried to overwrite the file "Validate.php" , as explained on another topic by redefining the isCatalogName function like so : <?php class Validate extends ValidateCore { public static function

Friendly URL problem in front module - Prestashop

扶醉桌前 提交于 2020-06-29 06:41:27
问题 I am building a front module for a website that is using 301 Moved Permanently option in SEO and URLs configuration. Wesbite uses Prestashop 1.6.1.9. In module, I am defining the route like this: public static $ModuleRoutes = array( 'module-aacategories-viewmapping-mapping' => array( 'controller' => 'viewmapping', 'rule' => 'mappings{/:tree}', 'keywords' => array( 'tree' => array('regexp' => '[/_a-zA-Z0-9-\pL]*', 'param' => 'tree'), ), 'params' => array( 'fc' => 'module', 'module' =>

How to get name of admin folder in prestashop?

可紊 提交于 2020-04-17 22:16:06
问题 $link= PS_ADMIN_DIR; $admin_folder = substr(strrchr($link, "\ "), 1); currently i am using this way to get folder name, But if there are any direct method or any constant please suggest me.. Thanks 回答1: For security reasons, admin folder name is not stored anywhere in your PrestaShop's files or database, so you have to do something like you do to find it. However, you should use _PS_ADMIN_DIR_ instead of PS_ADMIN_DIR as the second one is not defined directly by PrestaShop and could be

how to display in product-list the cover image and the second image of a product

蹲街弑〆低调 提交于 2020-02-08 06:59:20
问题 i'm new to prestashop 1.6 and like to display 2 images per product in the product-list.tpl. I see that getImageLink display the cover image. Is there a similar function with an argument corresponding to the column position ? thank you regards 回答1: Rather than writing function in Product.php simply get second image by adding +1 next to id_image src="{$link->getImageLink($product.link_rewrite, $product.id_image+1, 'home_default')|escape:'html':'UTF-8'}" 回答2: 1/ edit classes/Product.php and add

Prestashop 1.6 Override admin Controller not overriding

梦想与她 提交于 2020-02-06 17:46:42
问题 I'm trying to override the AdminCarriersControllerCore, specifically the postProcess method (so that it updates the carrier instead of deleting and creating a new one, because it breaks reference). To check that it get's overriden first i do: <?php class AdminCarriersController extends AdminCarriersControllerCore { public function __construct(){ die(var_dump('constructor')); } } I've put it in the following path modules/<my_module_name>/override/controllers/admin/AdminCarriersController.php

PrestaShop $link -> getProductLink($product) gives incorrect URL

泪湿孤枕 提交于 2020-01-24 13:01:45
问题 I'm generating my product links in custom ajax powered module with $link -> getProductLink($product) it's generating a URL like http://example.com/prestashop/2-blouse.html which is throwing an error saying [Debug] This page has moved Please use the following URL instead: http://example.com/prestashop/blouses/2-blouse.html How do I avoid the same Thanks P.S: I'm using prestashop 1.6 回答1: Set _PS_MODE_DEV_ to false in config/defines.inc.php . 回答2: In Preferences > SEO & URLs set disable