Losing cart image at product niveau

  • Posts: 18
  • Thank you received: 3
4 years 3 weeks ago #316905

-- HikaShop version -- : HikaShop Starter 4.2.3
-- Joomla version -- : 3.9.16
-- PHP version -- : 7.3.14
-- Browser(s) name and version -- : 75.0b10 (64-bit) Developer

Hi All,

My first one and hopefully in the good forum topic...
I managed to get a cart image in my shop for the cart empty / 1 item and 2 or more items. Thanks to the forum..

But I now notice that if i go to the product view the image is lost? If I check its path with the developer tools its path stays the same.
I already tried to include a full path like:

X_ITEM_FOR_X="%s <img src='https//www.musicfromhell.nl/images/com_hikashop/upload/cart/cart-full-test.png'/>"
instead of:
X_ITEM_FOR_X="%s <img src='../images/com_hikashop/upload/cart/cart-full-test.png'/>"
But that did not do the trick..

Any one got this problem and already solved it, and would like to help me out

Added some screenshots so you can see the path stays the same.

Thanks for any help..

Appie

Attachments:

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
4 years 3 weeks ago #316911

Hi,

If you right click on the image link in your browser inspector and then open it on a new tab, you'll see that the URL becomes

https://www.musicfromhell.nl/en/satanz-shop-uk/images/com_hikashop/upload/cart/cart-full_optimized.png
As you can see, the problem is that en/satanz-shop-uk is added between the website main URL and the relative URL of your image.
The fact that the URL is changed in the img tag is probably because of the system SEF plugin where there is an option to modify the URLs on the fly.
Also, you might want to try to do your translation override like this:
X_ITEM_FOR_X="%s <img src='/images/com_hikashop/upload/cart/cart-full-test.png'/>"

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

  • Posts: 18
  • Thank you received: 3
4 years 3 weeks ago #316916

nicolas wrote: Hi,

Also, you might want to try to do your translation override like this:

X_ITEM_FOR_X="%s <img src='/images/com_hikashop/upload/cart/cart-full-test.png'/>"


Nicolas,

Thanks for the quick response!
I have removed the .. in front of my image link as you suggested and until now (need some more testing) all works as supposed to.
So thanks for that suggestion, I only put .. in front because on my testserver it wont work without the .. so my live server its some what different, good to know.

The SEF is just the standard Joomla SEF wil take a look at that if it stops working, but as I said untail now all is fine..

Thanks,

Appie

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

Time to create page: 0.056 seconds
Powered by Kunena Forum