Skip to main content

Change in the path for the images stored

More
11 years 1 month ago #213784 by PeterChain
-- HikaShop version -- : 2.6.5
-- HikaMarket version -- : 1.6.5

Before the update to 1.6.5 my images uploaded with my vendor from frontend used to be stored in this route

http://mydomain/media/com_hikashop/upload/ my_product_image.jpg

and since the update they get stored here

http://mydomain/media/com_hikashop/upload/ my_product_image.jpg

This causes me problems with other self made solutions that retrieve images directly from the original path.

Is this new path just a new "handling policy" of your code? Shall I change this with some Configuration settings?

Thank you.

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

More
11 years 1 month ago #213792 by Jerome
Hi,

I'm sorry but you wrote twice the exact same path

http://mydomain/media/com_hikashop/upload/ my_product_image.jpg
http://mydomain/media/com_hikashop/upload/ my_product_image.jpg


Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: PeterChain

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

More
11 years 1 month ago #213818 by PeterChain
Woow! So ridiculous I am!

this is the real thing:

Before the update to 1.6.5 my images uploaded with my vendor from frontend used to be stored in this route

http://mydomain/media/com_hikashop/upload/vendor1/ my_product_image.jpg

and since the update they get stored here

http://mydomain/media/com_hikashop/upload/ my_product_image.jpg

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

More
11 years 1 month ago #213844 by Jerome
Hi,

Yes, the new path is for me the right one ; it was a bug fix.
With the multivendor version, we separate the folders the each vendor have his own folder and can't access to images of other vendors.
But for the main vendor or with HikaMarket front-end, the vendor is the manager of the entire store and should have access to all images.

Regards,

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

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

More
11 years 1 month ago #213855 by PeterChain
OK, I understand.

So now as I have maybe thousands of images inside vendor1, to make my own software compatible with both folders without having to reenter all vendor1 images to upload folder, can I use a symlink as an extention?

Wil it work or will it provide unexpected results in hikashop / hikamarket?

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

More
11 years 4 weeks ago #213906 by Jerome
Hi,

I'm not sure that HikaShop/HikaMarket will handle correctly symlinks.
If you really want all images in the same folder, I see two kind of solutions :
- Move all images (and thumbnails) in the "upload" folder and then update the "file" database table to replace "vendor1/" by "" (using a mass-action for example).
- Edit the HikaMarket "product" controller to replace the block
Code:
if($vendor_id > 1) $options['sub_folder'] = 'vendor'.$vendor_id.DS;
By
Code:
$options['sub_folder'] = 'vendor'.$vendor_id.DS;
In order to re-set the "vendor1" folder for new uploads.

Regards,

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

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

More
11 years 3 weeks ago #214234 by PeterChain
I see the replacing of the "file" database the cleanest and most definitive fix method for the next component updates.

Anyhow I don't see how in Mass Actions to change the "file" database.

When you say Mass Action you mean to use HikaShops MassAction system?

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

More
11 years 3 weeks ago #214236 by Jerome
Hi,

My bad, the product files are not handle by the mass action.
I'll create a feature request for Xavier.

So, in that case, a SQL query will be easier.
Code:
UPDATE #__hikashop_file SET file_path = REPLACE(file_path, 'vendor1/', '') WHERE file_path LIKE 'vendor1/%';

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: PeterChain

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

More
11 years 3 weeks ago #214266 by PeterChain
Thank you for the SQL hint

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

More
11 years 3 weeks ago #214305 by PeterChain
Fixed now thanks to your advise.

Thank you!

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

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