Change in the path for the images stored

  • Posts: 634
  • Thank you received: 16
9 years 2 months ago #213784

-- 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.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
9 years 2 months ago #213792

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.

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: PeterChain

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

  • Posts: 634
  • Thank you received: 16
9 years 2 months ago #213818

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.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
9 years 2 months ago #213844

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.

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: 634
  • Thank you received: 16
9 years 2 months ago #213855

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.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
9 years 2 months ago #213906

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

if($vendor_id > 1)
	$options['sub_folder'] = 'vendor'.$vendor_id.DS;
By
$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.

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: 634
  • Thank you received: 16
9 years 2 months ago #214234

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?

Attachments:

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

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
9 years 2 months ago #214236

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.

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.

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: PeterChain

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

  • Posts: 634
  • Thank you received: 16
9 years 2 months ago #214266

Thank you for the SQL hint

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

  • Posts: 634
  • Thank you received: 16
9 years 2 months ago #214305

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.058 seconds
Powered by Kunena Forum