Leaderboard
Popular Content
Showing content with the highest reputation on 03/16/2021 in all areas
-
I am having a weird issue where all but bank transfer options are disabled in Payments->Preferences->Carrier restrictions. If I enable any others (check the checkbox) and save it, it does not actually save the change. I get "Successful update." message at the top but no changes ever gets applied. All but bank transfer option for the very top/first shipping method is enabled which also happens to be the default shipping method. I have already updated to Latest 1.7.7.0 but issue persists. I use default theme with very few modules. I have revolut and paypal for payments enabled. What can be causing this critical issue?1 point
-
Hello @solsol69 j'espère que tu te porte bien ! Tu est bien modeste et clairement sans ta présence bienveillante, ce forum serait bien moins agréable.... Excellente soirée à toi (et @djamel aussi )1 point
-
I solved it by modifying this method directly // /src/Adapter/Module/AdminModuleDataProvider.php public function isAllowedAccess($action, $name = '') { if (Tools::isPHPCLI()) { return true; } if (in_array($action, ['install', 'upgrade'])) { return $this->employee->can('add', 'AdminModulessf'); } if ('uninstall' === $action) { return $this->employee->can('delete', 'AdminModulessf') && $this->moduleProvider->can('uninstall', $name); } // add this statement if (in_array($action, array('enable', 'disable', 'enable_mobile', 'disable_mobile', 'reset'))) { return $this->employee->isSuperAdmin(); } return $this->employee->can('edit', 'AdminModulessf') && $this->moduleProvider->can('configure', $name); } or like this public function isAllowedAccess($action, $name = '') { if (Tools::isPHPCLI()) { return true; } if (in_array($action, ['install', 'upgrade', 'enable', 'enable_mobile'])) { return $this->employee->can('add', 'AdminModulessf'); } if (in_array($action, ['uninstall', 'reset', 'disable', 'disable_mobile'])) { return $this->employee->can('delete', 'AdminModulessf') && $this->moduleProvider->can('uninstall', $name); } return $this->employee->can('edit', 'AdminModulessf') && $this->moduleProvider->can('configure', $name); }1 point
-
Quelque chose dans ce style ? A tester bien entendu... Fichier themes/ton_theme/pagination.tpl {if $p != 1} {assign var='p_previous' value=$p-1} <li id="pagination_previous{if isset($paginationId)}_{$paginationId}{/if}" class="pagination_previous"> <a{$no_follow_text} href="{$link->goPage($requestPage, $p_previous)}" rel="prev"> <i class="icon-chevron-left"></i> <b>{l s='Previous'}</b> </a> </li> {else} {if $pages_nb > 1 AND $p != $pages_nb} {assign var='p_next' value=$p+1} <li id="pagination_next{if isset($paginationId)}_{$paginationId}{/if}" class="pagination_next"> <a{$no_follow_text} href="{$link->goPage($requestPage, $p_next)}" rel="next"> <b>{l s='Next'}</b> <i class="icon-chevron-right"></i> </a> </li> {else}1 point
-
1 point
-
1 point
-
bonjour, vous pouvez toujours essayer, ça règle beaucoup de problèmes, et de toute façon pour d'autres problèmes à suivre, cela débloque bien des problèmes d'affichage. Pour moi c'était juste cela qui buggait. Bonne journée.1 point
-
Zapewne problemy z słabym szablonem sklepu ale bez sprawdzenia to można gdybać...1 point
-
Wydaje mi się, że problem jest na tyle mało dokładnie opisany, że bez obejrzenia tego sklepu się nie obejdzie1 point
-
Please start with emptying your cache by deleting the /var/cache directory. If that doesn't work copy lines 28-30 from another shop and save it.1 point
-
Make Checkboxes in Prestashop Using helpers I was working on a module and I noticed that there is a barrier to doing checkboxes in Prestashop using the helpers they provide. I did however, find some help through the watermark module created by Prestashop that uses checkboxes as directed by some on the Prestashop forum see it by clicking here -> https://www.prestashop.com/forums/topic/3516[spam-filter]show-helper-form-checkbox-checked/. Now it seemed quite complex and I believe this may become over cumbersome for those who do not develop regularly. so I decided to create this tutorial to help others in their developing endeavors. ***This tutorial assumes you already know how to create a form using the helpers and can add all the required information to build around the input array you see below. You can start by adding the check box input array below array( 'type' => 'checkbox', 'label' => $this->l('Options'), 'desc' => $this->l('Choose options to use during regeneration or generation of product references. The module processes like this-> (Reference will equal or be generated to be as follows with | separating each section of the custom inputs and the product based information.) Reference -> customidentifier|customsymbolpos1|(random number from 1-999)|customsymbolpos2|itemid|itemcategoryid|customsymbolpos3|itemsupplierid|customsymbolpos4|current reference only **NOT Supplier reference <---. Please leave custom fields blank if you want to not provide any custom identifiers or characters.'), 'name' => 'options', 'values' => array( 'query' => $this->getOptions(), 'id' => 'id_checkbox_options', 'name' => 'checkbox_options_name', 'expand' => array( 'print_total' => count($this->getOptions()), 'default' => 'show', 'show' => array('text' => $this->l('show'), 'icon' => 'plus-sign-alt'), 'hide' => array('text' => $this->l('hide'), 'icon' => 'minus-sign-alt') ), ), ), After that we need to create the query for the checkboxes available. public function getOptions() { $options = array ( array ( 'id_checkbox_options' => 0, 'checkbox_options_name' => 'Option 0'), array ( 'id_checkbox_options' => 1, 'checkbox_options_name' => 'Option 1'), array ( 'checkbox_options_options' => 2, 'checkbox_options_name' => 'Option 2'), array ( 'checkbox_options_options' => 3, 'checkbox_options_name' => 'Option 3'), array ( 'id_checkbox_options' => 4, 'checkbox_options_name' => 'option 4') ); return $options; } Now we get and save the information from checkboxes after posting or saving the form. private function _postProcess() { $output = ''; if (Tools::isSubmit('submitBtn')) { Configuration::updateValue('checkbox_text_demo', Tools::getValue('checkbox_text_demo')); $all_opts = $this->getOptions(); $checkbox_options = array(); foreach ($all_opts as $chbx_options) if (Tools::getValue('options_'.(int)$chbx_options['id_checkbox_options'])) $checkbox_options[] = $chbx_options['id_checkbox_options']; Configuration::updateValue('options', implode(',', $checkbox_options)); $output .= $this->displayConfirmation($this->l('Settings updated')); } } Lastly, we load the submitted information into checkboxes as we load the form along with other field variables. protected function getConfigFormValues() { $config_fields = array ( 'checkbox_text_demo' => Configuration::get('checkbox_text_demo'), // if you have other fields to fill this would fill text input field. ); //get all checkbox stuff all available $opts = $this->getOptions(); $id_checkbox_options = array(); foreach ($opts as $options) $id_checkbox_options[] = $options['id_checkbox_options']; //get checkbox stuff from $_POST $id_checkbox_options_post = array(); foreach ($id_checkbox_options as $opt_id) if (Tools::getValue('options_'.(int)$opt_id)) $id_checkbox_options_post['options_'.(int)$opt_id] = true; //get checkbox stuff from Configuration $id_checkbox_options_config = array(); if ($confs = Configuration::get('options')) $confs = explode(',', Configuration::get('options')); else $confs = array(); foreach ($confs as $conf) $id_checkbox_options_config['options_'.(int)$conf] = true; //return only common values and value from post if (Tools::isSubmit('submit_Btn')) $config_fields = array_merge($config_fields, array_intersect($id_checkbox_options_post, $id_checkbox_options_config)); else $config_fields = array_merge($config_fields, $id_checkbox_options_config); return $config_fields; } That's it!1 point
-
Debes hacer esto... dentro de public function __construct() { $this->controllers = array('form'); // nombre del controller.php en la carpeta "\controllers\front" el fichero controller.php aquí mi ejemplo <?php class totallimitcartformModuleFrontController extends ModuleFrontController { public function initContent() { parent::initContent(); $this->page_name = 'Form limit cart'; // page_name and body id $id_lang = $this->context->language->id; $this->display_column_left = false; $this->display_column_right = false; $id_lang = Configuration::get('PS_LANG_DEFAULT'); $this->setTemplate('module:totallimitcart/views/templates/front/form.tpl'); } } Para saber cual es la URL , recuerda que puedes cambiarla en preferencias url y seo. $url = Context::getContext()->link->getModuleLink('totallimitcart', 'form'); Personalmente prefiero comprobar al entrar en la configuración y poner la url bien, de esa manera tengo seguro que nadie la cambia $sql = "select id_meta from "._DB_PREFIX_."meta where page='module-totallimitcart-form'"; $id_meta = Db::getInstance()->getValue($sql); if($id_meta){ $sqlm = "update "._DB_PREFIX_."meta_lang set url_rewrite = 'total-form' where id_meta =".$id_meta.""; Db::getInstance()->execute($sqlm); } en la carpeta \views\templates\front {extends file=$layout} {block name='content'} <div class="card card-block col-md-12" > // AQUI TU DISEÑO </div> {/block}1 point
-
Hi Everyone here is a workaround 1.- Find the table prefix_carrier -> take note of the field id_reference of all your active carriers 2.- Find the tables prefix_module -> take note of the field id_module of all your active payment module 3.- Find the table prefix_module_carrier -> you will see that there are missing entries for your carrier id_reference with the payment id_module associated, create the missing one the row id_module is the id of the payment module that you have active the row id_reference is the id of the carrier that you want thar payment to be available. Still do not know what is causing these records to disappear but this solves the issue, have a good day :)1 point
-
I was recently faced with a similar issue and made a very janky modification to the ps_facetedsearch module to allow it to function on the search results page of a store I was working on for a client. Bare in mind, it's hella jank, but it seems to work just fine. I also enabled it to work on the "brands" pages. I'm sure it can be made to work in other places, but it's a very janky and involved set of mods that need to be made to work as required. Feel free to run through the files, I'm sure a simple diff will show where changes needed to be made to make it work ps_facetedsearch.zip1 point
-
The module "mailalerts" v3.7 is not compatible / does not work properly on Prestashop 1.7.5. There is a new module called "ps_emailalerts" that works fine on 1.7.5. I am attaching it here so you can just download and install it manually (and delete old version). If it still doesn't work do let us know. ps_emailalerts.zip1 point
-
hello i did it before as this way first add $this->registerHook('header') in public function install of ur module then add $this->context->controller->addJS($this->_path . 'views/js/ mymodcomments.js'); in public function hookHeader(). (for appear ur css or js in head) see blocktopmenu module for example.1 point
-
Hi @Segitterius - Probably that's not the right topic to ask help for I can feel you're frustrated, however can you elaborate for me in 1 phrase what your issue is, as I'm certain that there is always a solution. I'm doing this from too long, and would hate you see gone! Regards, Leo0 points