Jump to content

rtvt

Members
  • Posts

    62
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

rtvt's Achievements

  1. I did it in php by checking Language::getLanguages , but it would be better if there will be some global variable like it was {languages} in ps1.6 to call in templates.
  2. thank you, but It's not solve the main problem: If you have only one language in shop - for example english. Then {$urls.base_url}{$iso_lang}example.html generates wrong link: shop.com/en/example.html while the real link with shop with one languge will be shop.com/example.html
  3. Hello, what is the best way to call {$urls.base_url} from .tpl but depend on language? So if there only one language it should return shop.com/ but if there is 2 or more langs - it should return iso of current lang shop.com/en/ for example.
  4. So I need to use gulp instead of webpack to work with browsersync? I have 12 seconds build time with webpack. Is there a way to go with 1 second for example?
  5. Moreover, I have 4 prestashops with 500 mb size on disk for every. But as I know this problem you described geenerate big cache folder and size grown until disk space will not end. I think I have some different problem, but I don't know what it is.
  6. Than you for your answer, But what if cache is important for me, because I need less loading speed? Also can you tell me it was cache for CSS or JS, or both?
  7. Hello, I have server in Digital Ocean, with few Prestashop low-middle traffic, very low products quantity. I have problem with my server, which falls down because of Prestashop, which overload apache. So I need to restart it everytime. My current configuration: 4gb/2cpu 40gb+ ssd apache mysql php standart configuration Maybe someone who have few real working prestashop without porblems, can advice how to configure my server, or maybe some specific settings / mods or something else? Relly need help, please. Regards
  8. Thank you for answer, but is there really no other way to solve it, not touching block layered? Something like put this variable to <input type="hidden" val="{$var}"> for example in the category.tpl, and then somehow grab this value to product-list.tpl. I can't come up with mechanism
  9. Hello, I have a module, which assign variable $settings.option. I use this var in product-list.tpl : {if isset($settings.option) && $settings.option== "5"} ... {/if} All works perfect, until I apply some layered navigation block filter. Products reloads by ajax, and my variable become undefined. Can someone help me to solve it? Regards
  10. Hi, can you please help me? I have module, where I asign few variables $settings = array( 'var1' => (Configuration::get('VAR1')), 'var2' => (Configuration::get('VAR2')); $this -> context -> smarty -> assign('vars', $settings); and then use it in tpl files like this: {$vars.var1} It works. And now the problem: I need to use some vars in the product-list.tpl, so after filter or sorting - vars become undefined, I think because of ajax content reload. Can you tell what code I should use to define these vars as cookies vars, and how to call it in product-list.tpl ? Thank you in advance.
  11. Hello, I need to add category link to quick search results. Default module modified to show product images. Now blocksearch.js part around it looks like this: var width_ac_results = $("#search_query_" + blocksearch_type).parent('form').width(); if (typeof ajaxsearch != 'undefined' && ajaxsearch && typeof blocksearch_type !== 'undefined' && blocksearch_type) { $("#search_query_" + blocksearch_type).autocomplete( search_url, { minChars: 3, max: 10, width: (width_ac_results > 0 ? width_ac_results : 500), selectFirst: false, scroll: false, dataType: "json", formatItem: function(data, i, max, value, term) { if(data.image!=null) return "<img src=\"" + baseDir + "img/p/" + data.image.split('').join('/')+"/" + data.image+ "-cart_default.jpg\" alt=\"" + value + "\" />" + value + "<span>" + data.cname + "</span>"; else return "<img src=\"" + baseDir + "img/p/none.gif\" alt=\"" + value + "\" />" + value;}, parse: function(data) { var mytab = new Array(); for (var i = 0; i < data.length; i++) mytab[mytab.length] = { data: data[i], value: data[i].pname }; return mytab; }, extraParams: { ajaxSearch: 1, id_lang: id_lang } } ) .result(function(event, data, formatted) { $('#search_query_' + blocksearch_type).val(data.pname); document.location.href = data.product_link; }); } So i need to add link to product category by click on "<span>" + data.cname + "</span>"; Can anybody help with it, please? Regards
  12. I'm interested too.. how to add a check if product already added in wishlist, so i can modify button appearance to 'added' condition.
×
×
  • Create New...