Jump to content

elementChaosu

New Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by elementChaosu

  1. Ahoj, jo napadá, špatný název controlleru nebo třídy, hlavně velká/malá písmena, párkrát jsem s tim měl stejný problém.
  2. Hello, hookActionAdminCustomerListingFieldsModifier could be an answer. I'm not really sure whether in 1.7.6 is this hook for customer page, docs will say it for sure. But the principle is the same as Nishith Nesdiya's anwer here for product list: is the hook is not present, then this could be done by overriding adminCustomerController.php, adding all desired fields and callbacks into renderList function.
  3. Set media function is loading css and js files. So you should minimize them or refactor them into smaller size. In Admin > preferences > performance you shoud compress and cache js and css files, that ads some speed too.
  4. Hello, I don't know tutorial. But there must be some javascript action (ajax propably) which exchanges images. And this action reloads the whole content of image container and at the same time destroys previously loaded slick carousel. So the solution could be to set an event listener on that action (ajaxComplete eg.), that checks whether new content is loaded and fires function initising slick carousel on that container once again. Hope that helps.
  5. Ahoj, sice zřejmě pozdě, ale dotaz na mě vyskočil, tak kdyby náhodou. Rozšířil bych definici produktu o vlastnost třeba 'url_ean' a dřív než bych začal dopňovat nové, tak bych nad databází jednou pustil Mysql query ve smyslu: ean neni prázdný -> url_ean = 1. Pak bych udělal override funkce createUrl (tuším že by mohla být v dispatcher.php), tak aby ean přidával do url pouze k produktům, které mají url_ean = 1. Celé se to dá zabalit do modulu, anebo to lze udělat jako dva overridy, to je méně upsaný způsob.
  6. if this is an issue in in custom module controller try add this: $this->template = 'module:modulename/views/templates/front/view.tpl'; into controller constructor, and create empty view.tpl on that path. I think this is because when controller is initiated it needs some to have some value for this->template, because display() function in frontController throws exception, when var is empty
  7. Partly blind shot, but is your tpl rendered via controller, which implements widget interface? I run to this problem for this reason. You can send widget content into tpl as variable like this: $ModuleWithWidget = new ModuleWithWidget(); $this->context->smarty->assign([ 'myWidget' => $ModuleWithWidget->renderWidget(), ]); and then call $myWidget variable in tpl.
  8. In module's main php file check whether module class has the same name as constructor's $this->name and filename + directoryname.
  9. In 1.6, for multiple checkboxes in adminController, let's say I have this in renderForm() $this->fields_form['input'][] = [ 'type' => 'checkbox', 'name' => 'buttons[]', 'label' => $this->l('Checkboxes'), 'class' => 'chosen', 'multiple' => true, 'required' => true, 'values' => array( 'query' => $buttons, 'id' => 'id_button', 'name' => 'name' ), ]; According to this line in adminer/themes/default/template/helpers/form/form.tpl <input type="checkbox" name="{$id_checkbox}" id="{$id_checkbox}" ... {if isset($fields_value[$id_checkbox]) && $fields_value[$id_checkbox]} checked="checked"{/if} /> I'd have to send stored values from db in $checkboxes into Helper->fields_value, in my case like this: foreach ($checkboxes as $cb) { $this->fields_value['buttons[]_'.$cb] = true; } voilá, checkboxes are checked
  10. On 1.7.8 theme i've could not find out why the theme.js code don't show subcategories on ps_mainmenu as it has to, so I've made it work by adding this js which copies intended behaviour into theme/themename/assets/js/custom.js Worked so far 🙂 $(document).ready(function() { if (!$('.mobile').is(':visible')) { $('.top-menu li').each(function() { $(this).on('mouseover', function() { if (!$('.mobile').is(':visible')) { $(this).find('.js-sub-menu').show(); }; }) $(this).on('mouseout', function() { if (!$('.mobile').is(':visible')) { $(this).find('.js-sub-menu').hide(); }; }) }) } });
  11. In PS 1.7.7 user address, fields for address form are provided by function getFormat($id_country) in classes/addressformat.php. It reads fields list from database, tab ps_address_format. There you can add dni to desired position in list, which is defined there for each country. Then customer can edit his dni in customer area. B2B option did not worked for me in this situation. If no country is in parameter of function, the default value can be found in tab ps_configuration PS_COUNTRY_DEFAULT. Edit: in backoffice this can be editted in Menu >International > Location > Countries - in detail of your country, there is an option to edit form fields ( :
  12. Hi, module class name must be the same as the module name. If not, this throws 'Module is not a valid module name' error during installation.
×
×
  • Create New...