WebsiteBaker Support (2.8.x) > Bakery Shop
Change media image folder name
sky writer:
How difficult is it to change the media/bakery image folder to something else, like media/products?
freeSbee:
Hi sky writer
You can use your favorite IDE to perform a search / replace on all Bakery files. The path is hard coded about 33 times. Search …
--- Code: ---MEDIA_DIRECTORY.'/bakery
--- End code ---
and replace by …
--- Code: ---MEDIA_DIRECTORY.'/products
--- End code ---
The main drawback of changing hard coded directory names is that you will have to redo it each time you upgrade.
Regards Christoph
sky writer:
Thank you Christoph.
jacobi22:
is it not a better solution, if you define the gallery folder name in the file modules/bakery/config.php maybe with
--- Code: ---<?php for colored code only, dont copy that line
// name of the bakery picture folder in media
$sBakeryImgFolder = 'products'; //no leading/trailing slash or backslash!! A simple directory name only!!
--- End code ---
and change
--- Code: ---MEDIA_DIRECTORY.'/bakery/
--- End code ---
to
--- Code: ---MEDIA_DIRECTORY.'/'.$sBakeryImgFolder.'/
--- End code ---
??
sky writer:
Jacobi,
I tried your idea, because I like the thought of being able to change this folder more easily. But the variable doesn't load in the admin (modify.php) or on the main products overview frontend page (maybe elsewhere, but I noticed these two for sure).
I took off your trailing forwardslash, because that caused the search and replace to miss some files.
replace:
--- Code: ---MEDIA_DIRECTORY.'/bakery
--- End code ---
with:
--- Code: ---MEDIA_DIRECTORY.'/'.$sBakeryImgFolder.'
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version