prestashop-1.7

Rendered view is not displaying in my back office in PS 1.7

风格不统一 提交于 2021-01-29 07:27:21
问题 I am trying to create a view in the back office tab that I created in the installation of my Module. My Module adds the tab like this: protected function _installTabs() { if(!$tabId = \Tab::getIdFromClassName('IezonPortfolio')) { $tab = new \Tab(); $tab->class_name = 'IezonPortfolio'; $tab->module = $this->name; $tab->id_parent = \Tab::getIdFromClassName('ShopParameters'); $tab->active = 1; foreach (Language::getLanguages(false) as $lang): $tab->name[(int) $lang['id_lang']] = 'My Portfolio';

Prestashop 1.7.6.2 ajax call backoffice module

女生的网名这么多〃 提交于 2021-01-29 05:22:00
问题 I have problem with ajax from select2 in prestashop 1.7. When I try writte something the calling is 200 but I got error "The Controller Psb2BAjaxModuleAdmin is missing or invalid." I create Controller for test in my module modules/psb2b/src/Controller/Psb2BAjaxModuleAdminController.php <?php namespace Scenario\PSB2B\Controller; use Symfony\Component\HttpFoundation\JsonResponse; use PrestaShopBundle\Controller\Admin\FrameworkBundleAdminController; class Psb2BAjaxModuleAdminController extends

Order States aphabetically in Prestashop 1.7

▼魔方 西西 提交于 2021-01-07 06:26:36
问题 Does anyone know how can you order alphabetically states when you are editing o creating a new customer address. Thank you in advance 回答1: I finally solved it by overriding the file State.php Just create a new file inside /overrides/classes/State.php and paste this code: <?php class State extends StateCore { /** * Get states by Country ID. * * @param int $idCountry Country ID * @param bool $active true if the state must be active * * @return array|false|mysqli_result|PDOStatement|resource

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 call tcpdf non-static method in tpl file

蓝咒 提交于 2020-06-17 14:03:08
问题 I have a problem generating Barcode in Delivery Slip template in Prestashop 1.7.6.x (or just 1.7) with the same template i was using in Prestashop 1.6 when i call the method via it give me error Using "$this when not in object context" this is the stack trace via Symfony debugger Symfony\Component\Debug\Exception\FatalThrowableError: Using $this when not in object context at vendor/tecnickcom/tcpdf/tcpdf.php:17060 at TCPDF::serializeTCPDFtagParameters(array('6856616461MA', 'C39', '70.2', '34

actionValidateCustomerAddressFormAfter triggers the hook before Prestashop's form validation

隐身守侯 提交于 2020-05-17 05:47:14
问题 In my Prestashop 1.7 Website, I have a front-end address edition form (allowing my customer to edit its postal addresses). I want to execute a hook after Prestashop has decided weither the data the user typed are correct or not ( e.g. postcode contains digits only). I thought it could be done by using: $this->registerHook('actionValidateCustomerAddressFormAfter'); in addition to: public function hookActionValidateCustomerAddressForm($data) { /* Here is the triggered hook */ } But the

actionValidateCustomerAddressFormAfter triggers the hook before Prestashop's form validation

旧街凉风 提交于 2020-05-17 05:46:52
问题 In my Prestashop 1.7 Website, I have a front-end address edition form (allowing my customer to edit its postal addresses). I want to execute a hook after Prestashop has decided weither the data the user typed are correct or not ( e.g. postcode contains digits only). I thought it could be done by using: $this->registerHook('actionValidateCustomerAddressFormAfter'); in addition to: public function hookActionValidateCustomerAddressForm($data) { /* Here is the triggered hook */ } But the

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