How to change the Image folder (Vendor) root name?

  • Posts: 43
  • Thank you received: 2
10 years 6 months ago #156340

-- HikaShop version -- : 2.3.0 / 1.4.0

Please advise if anywhere I can change the storage folder for uploaded product images (vendor or all)? Further, Can I also change the Folder label using other name (instead of HikaShop Images) for frontend display? Please see the attache pic FYI.

Thanks and regards,

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 6 months ago #156385

Hi,

"HikaShop Images" is a translated text.
You can override this translation in the HikaShop language manager.
The key for this translation is : HIKASHOP_IMAGE_ROOTDIR

About the storage folder, what do you want to change exactly ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 43
  • Thank you received: 2
10 years 6 months ago #156392

Hi Jerome,

Brilliant! Thanks and I will try soon.

Actually I would like to consolidate all image files to store into /image/hika_productimage/ (or somewhat similar to this). I just wonder anywhere I can change the storage folder? Thanks ahead.

Best regards,

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 6 months ago #156432

Hi,

I see what you want to do but it won't be possible unless you modify the HikaMarket core.
One of the HikaMarket rule is to separate the vendor data so they can't access or modify the data they don't own.
By sharing a single folder, every vendor would be able to access to the images of the other vendors. In the future, the gallery would allow the vendors to create sub folders, to rename, to upload, to remove, etc.
That are the two reason why vendors have their own upload folder for their images.
The same thing is done for the downloadable files (in the "upload safe" folder).

Removing this "separation / security" means modifying several core files for the upload, the gallery and the management of the files.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 43
  • Thank you received: 2
10 years 6 months ago #156464

Hi Jerome,

I am good for each vendor to have their own folder. I am only concerning the root / base of the folder. It's because I want to centralized media files into one location for backup concern. I hope we can configure the "base folder" in future without core hack ^_^

base folder = /image/hika_image
vendor 1 = image/hikaimage/vendor1
vendor 2 = image/hikaimage/vendor2
vendor 3 = image/hikaimage/vendor3

Thanks a lot~~

The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 6 months ago #156512

Hi,

It is now in my TODO list.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: drmad

Please Log in or Create an account to join the conversation.

  • Posts: 263
  • Thank you received: 11
10 years 4 months ago #162002

Here is my solution :

In my template fil show_block_files.php, I had this code :

if (substr($file->file_path,0, 6) == 'vendor') {
	$posii = stripos($file->file_path, '/') + 1;
	$namee = substr($file->file_path, $posii);
}else{
	$namee = $file->file_path;	
}

Like this, the files are uploaded in vendor1, vendor2, etc. folders, but it doesn't display « vendor/ » on the front end.

Last edit: 10 years 4 months ago by Jerome.
The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.076 seconds
Powered by Kunena Forum