Hi,
In order to refresh my client browser with the last styles, I want to change the name of the generated files when I merge them.
What... where that name is generated?
I merge the css with System > Configuration > Developer > Css Settings > Merge CSS Files to Yes.
It generate a css like 9128734598173458912.css, but it's always the same name, and I want to change it each time I merge the css even the content doesn't change.
Solved! Go to Solution.
Hello @leed
please check below file for same
Mage_Core_Model_Design_Package
You will find
Mage/Code/Model/Design/Package.php
There is one function
public function getMergedCssUrl($files) { .... $targetFilename = md5(implode(',', $files) . "|{$hostname}|{$port}") . '.css'; // you need to change $targetFilename = 'test'.md5(implode(',', $files) . "|{$hostname}|{$port}"). '.css'; .................... }
Hope it will help you.
If work then mark as solution.
Hello @leed
Please enable static sign on for that.
https://devdocs.magento.com/guides/v2.2/config-guide/cache/static-content-signing.html
Hope it will help you if will help you then mark as the solution or give kudos.
I need to do that in Magento 1.x
Hello @leed
please check below file for same
Mage_Core_Model_Design_Package
You will find
Mage/Code/Model/Design/Package.php
There is one function
public function getMergedCssUrl($files) { .... $targetFilename = md5(implode(',', $files) . "|{$hostname}|{$port}") . '.css'; // you need to change $targetFilename = 'test'.md5(implode(',', $files) . "|{$hostname}|{$port}"). '.css'; .................... }
Hope it will help you.
If work then mark as solution.
Perfect, thank you!!