What's New
Viewing 12 posts - 1 through 12 (of 12 total)
Viewing 12 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic.
Tagged: css, js, Smart cache
Hi,
I found an issue with the Transformer’s theme related to CSS/JS theme files.
All Prestashop CSS/JS files compiled into two CSS and JS files.
But Transformer’s Customer theme CSS/JS files (from Custom tabs of THEME module) not minified when the “Smart cache for CSS/JS” options are enabled on Performance tab of Back-end.
This issue is very annoying for end-user who doesn’t know how to use Ctrl-F5 button on Desktop browser or completely clear cash on mobile browser. Most users are not technical people!
Every time when I modify “Custom CSS Code” or “Custom JAVASCRIPT Code” tab inside of THEME module the new changes are not refreshed on the client browser because the Transformer generates the same file name for CSS and JS:
https://xxx/modules/stthemeeditor/views/css/customer-s1.css”
https://xxx/modules/stthemeeditor/views/js/customer1.js
I would suggest to include these two files into the “CCC (Combine, Compress and Cache)” prestashop functionality to add the above file into compressed single CSS and JS files every time when administrator clicks the “Clean Cash” button:
https://xxx/themes/THEMENAME/assets/cache/theme-62a82e412.css
https://xxx/themes/THEMENAME/assets/cache/bottom-8c60b5411.js
Note: you could see that the compressed file names are changed every time when I pressed “Clean Cash” button.
But your two Customer CSS/JS files stays with the same name all the time.
OR
If it is hard to include these files into “CCC (Combine, Compress and Cache)” functionality, could you re-generate the above two CUSTOMER CSS/JS files name with some kind of random name values every time when the custom scripts were changed ?
SAMPLE:
“yobo” helped me with the following ticket: https://www.sunnytoo.com/forums/topic/product-discount-disappeared-from-product-sliders-and-category-page
I put “.product_middle_column .st_sticker_block{display:none;}” into Custom CSS sectiion , but the changes are not visible on clients browsers even after I pressed “Clear Cash” because the name of custom CSS file were not changed and Apache CSS expiration == 1 week. The end-user usually not technical people and do not know how to force CSS reload on their browsers. As a result, end-users would need to wait for 1 week to see the changes on their browsers.
I would appreciate the permanent fix in the next version of the Transformer them.
Regards,
Sergiy
Hi!
I think the same issue here. I have a short custom js code which works only when JS smart cache is off.
I had to do a modification, so updated my code and probably the new bundle with the same filename isn’t refreshed.
As I see, there was no template update since this topic.
Please fix it! Thank you.
Hi!
Sure. I added it to the custom.js file. /transformer/assets/js/custom.js
This is all: (It’s a part of a small trick.)
$(document).ready(function() {
if ($(“body”).attr(‘id’) == “checkout”){
if ($(“#checkout-delivery-step”).hasClass(“js-current-step”)){
$(“.delivery-option:eq(1) span input”).attr(‘checked’,true).trigger(“change”);
}
}
});
It does not work when JS smart cache is turned on.
You must be logged in to reply to this topic.