Jump to content

daveyrow

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • First Name
    Vla
  • Last Name
    Pe

Recent Profile Visitors

114 profile views

daveyrow's Achievements

Newbie

Newbie (1/14)

2

Reputation

1

Community Answers

  1. Hi , the file is located in /js/admin/products.js the end of file with added code looks like this this: please dont forget to ctrl+f5 the admin product page or remove browser cache to reload the loaded js file and report if trouble is gone thx) var tabs_manager = new ProductTabsManager(); tabs_manager.setTabs(product_tabs); $(document).ready(function() { // The manager schedules the onReady() methods of each tab to be called when the tab is loaded tabs_manager.init(); updateCurrentText(); $("#name_" + id_lang_default + ",#link_rewrite_" + id_lang_default) .on("change", function(e) { $(this).trigger("handleSaveButtons"); }); // bind that custom event $("#name_" + id_lang_default + ",#link_rewrite_" + id_lang_default) .on("handleSaveButtons", function(e) { handleSaveButtons() }); // Pressing enter in an input field should not submit the form $('#product_form').delegate('input', 'keypress', function(e) { var code = null; code = (e.keyCode ? e.keyCode : e.which); return (code == 13) ? false : true; }); $('#product_form').submit(function(e) { $('#selectedCarriers option').attr('selected', 'selected'); $('#selectAttachment1 option').attr('selected', 'selected'); return true; }); $(document).on('click','button[name="submitAddproduct"]',function(e) { e.preventDefault(); $('form#product_form').append('<input type="hidden" name="submitAddproduct" value="1" />'); $('form#product_form').submit(); }); $(document).on('click','button[name="submitAddproductAndStay"]',function(e) { e.preventDefault(); $('form#product_form').append('<input type="hidden" name="submitAddproductAndStay" value="1" />'); $('form#product_form').submit(); }); });
  2. Hi, yes, chrome in some versions doesn't send fields 'submitAddproduct' and 'submitAddproductAndStay' in http post request. So i added lines to /js/admin/products.js at the end of $(document).ready() : $(document).on('click','button[name="submitAddproduct"]',function(e) { e.preventDefault(); $('form#product_form').append('<input type="hidden" name="submitAddproduct" value="1" />'); $('form#product_form').submit(); }); $(document).on('click','button[name="submitAddproductAndStay"]',function(e) { e.preventDefault(); $('form#product_form').append('<input type="hidden" name="submitAddproductAndStay" value="1" />'); $('form#product_form').submit(); }); hope it will help somebody edit: i dont know, but maybe, chrome have problems with fact, that element with name 'submitAddproduct' is actually multiple times in that product form and does not have a value
  3. presta 1.6 Hi, we just found our problem, after some time i have to admit. The browsers itself can handle single cookies size of max. 4093 bytes. But this module stores cookie value "ga_cart" and store there serialized info about your cart. So, if your cart is big, prestashop starts to behave buggy, especially when custommer try to login or ajaxed one page cart. Custommers getting popups about parse errors and other not nice things. Bugs starts to appear because cookie limit per domain is exceeded and therefore cookies update about logged user and other doesnt work. EDIT: This issue occurs only if public function hookFooter() in ganalytics module script is not executed for any reason EDIT2: We found that source of this problem was more complicated. We had old version of Ganalytics module, at that time we also had one buggy Ovic Theme module, which was deleting hooks (lol), when any source (modules etc.) tried to register hook to DB, this buggy Ovic module simply immediately deleted that hook in couple lines of code later. Before we fixed this module, we updated ganalytics module, and when it tried to register hookFooter, it was deleted by that buggy module, so ganalytics hookFooter was never called and it never deleted its (big) cookie value. reference: While on the subject, if you want to support most browsers, then do not exceed 50 cookies per domain, and 4093 bytes per domain. That is, the size of all cookies should not exceed 4093 bytes. This means you can have 1 cookie of 4093 bytes, or 2 cookies of 2045 bytes, etc. source: http://stackoverflow.com/a/4604212 problematic: ganalytics.php $this->context->cookie->ga_cart = serialize($gacart);
  4. Hi, i fixed this by adding a short code to 'AdminAttributesGroupsController.php' in /controllers/admin/ public function setRedirectAfter($url) { $addUrl = ''; if(Tools::isSubmit('viewattribute_group') && Tools::getValue('id_attribute_group')) { $addUrl = '&viewattribute_group&id_attribute_group=' . Tools::getValue('id_attribute_group'); } $this->redirect_after = $url . $addUrl; } dont know if its correct or buggy for other things but yet it works well
  5. Hi, i fixed this by adding a short code to 'AdminAttributesGroupsController.php' in /controllers/admin/ public function setRedirectAfter($url) { $addUrl = ''; if(Tools::isSubmit('viewattribute_group') && Tools::getValue('id_attribute_group')) { $addUrl = '&viewattribute_group&id_attribute_group=' . Tools::getValue('id_attribute_group'); } $this->redirect_after = $url . $addUrl; } dont know if its correct or buggy for other things but yet it works well
  6. Maybe i found the problem. If you use ovic template or other, which allows you to move modules to diferrent hooks, like in ovic template builder. You maybe moved module to hook, which is not registered in the module (homeslider) install method. I moved my Homeslider to hook 'DISPLAYHOMETOPCOLUMN' , but its not registered in homeslider module, and it starts to disappear randomly. So register it in homeslider install method (/modules/homeslider/homeslider.php line:67) (i didnt find a way, how to add it via admin, if anyone knows, please correct me) /* Adds Module */ if (parent::install() && $this->registerHook('displayHeader') && $this->registerHook('displayTopColumn') && $this->registerHook('actionShopDataDuplication') && $this->registerHook('displayHomeTopColumn') // custom ) and reinstall the module homeslider (Image slider for your homepage). I hope it will help you.
  7. Hi, i'm using Prestashop 1.6.1.6, i have small problem. When i add too many attribute items to attribute group, and paging appears, it simply does not work, it always redirects me to AttributeGroup list, not Attribute Items list. Please, do you have any suggestion for this? Thanks a lot.
  8. Hello, is it possile to set attributes to inputs in defining array? Like: array( 'type' => 'text', 'label' => $this->l('Path:'), 'name' => 'path', 'col' => 4, 'class' => 'toggle_import_type toggle_item_xml', 'attribute' => array( 'readonly' => 'readonly', 'data-custom' => 'whatever' ) ) with result of <input name="path" readonly="readonly" data-custom="whatever" etc.... it would be cool if it can, btw its not dificult to customize the helper, i can contribute if more people would like this thing
  9. Unfortunatelly i have same problem, with template "Smile" nad $HOOK_HOME_TOP_COLUMN, where my banner randomly disapears. ill try to debug it but dont know if ill find anything
  10. Hi, im trying to create a module with submenu on left side. I have module controller in my module folder. I wish to be every subpage of that module (menu item) a separate controller which will be connected to module main controller , so code should be uncluttered and easy to modify. But i just cant find the best way how to do it. Should i create more separate modules with own controllers or is there pls another way?
×
×
  • Create New...