markthedoc Posted February 28, 2017 Share Posted February 28, 2017 Hi When I upload an image as a logo on my store, the image file name is changed. This usually wouldn't be a problem but it's being changed to the name of what the store used to be called (we've recently changed server, store name, domain name and rebranded). So the image was called: my-logo.jpg But when I upload it it's being changed to: my-old-store-name-1488284549.jpg What I need to know is where it's pulling the old store name from so I can change it. I'm using Prestahop 1.6.0.9 Any help gratefully received! Link to comment Share on other sites More sharing options...
rocky Posted March 1, 2017 Share Posted March 1, 2017 I searched for the code that does this and found the following on lines 2667-2674 (in PrestaShop v1.6.1.11) of controllers/admin/AdminThemesController.php: $logo_name = Tools::link_rewrite(Context::getContext()->shop->name).'-' .$logo_prefix.'-'.(int)Configuration::get('PS_IMG_UPDATE_TIME').(int)$id_shop.$ext; if (Context::getContext()->shop->getContext() == Shop::CONTEXT_ALL || $id_shop == 0 || Shop::isFeatureActive() == false) { $logo_name = Tools::link_rewrite(Context::getContext()->shop->name).'-' .$logo_prefix.'-'.(int)Configuration::get('PS_IMG_UPDATE_TIME').$ext; } The code Context::getContext()->shop->name is always used to get the shop name. I suggest that you check the ps_shop table in your database using phpMyAdmin and make sure the old name of the shop isn't there. 1 Link to comment Share on other sites More sharing options...
markthedoc Posted March 9, 2017 Author Share Posted March 9, 2017 (edited) Yeah that was the issue. All fixed now. Thanks for your help. Edited March 9, 2017 by markthedoc (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now