Add shopping cart icon

  • Posts: 43
  • Thank you received: 3
12 years 2 months ago #66867

I would like the cart module to display a shopping cart icon, ideally above the 'the cart is empty' text and cart content (I am displaying the cart module in the header). I have found a couple of questions on this subject, but I'm afraid that I didn't entirely understand the answers! Apologies for my ignorance :blush: . Is it possible to give simple, step-by-step instructions for doing this?

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

  • Posts: 12953
  • Thank you received: 1778
12 years 2 months ago #66909

Hi sara,

You'll just have to edit the "cart" file of the "product" view of the front-end's template that you are currently using, and add the code that will display your "shopping cart icon" :

echo '<img src="YOUR SHOPPING CART ICON ADDRESS" alt="Shopping cart icon" width=50px lenght=50px/>';
after the code :
defined('_JEXEC') or die('Restricted access');
?>
<?php

Hope this will help you.

Last edit: 12 years 2 months ago by Mohamed Thelji.

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

  • Posts: 43
  • Thank you received: 3
12 years 2 months ago #66935

Yes, thank you very much Mohamed - that's clear enough even for me to understand. And thanks for responding so quickly. The support here is amazingly good!

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

  • Posts: 45
  • Thank you received: 1
12 years 1 week ago #77645

Hi :) where i must upload this icon "Shopping cart icon" ? I add the code, but icon do'not show in my cart module in frint end.....

Attachments:
Last edit: 12 years 1 week ago by djundi.

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

  • Posts: 13201
  • Thank you received: 2322
12 years 6 days ago #77653

Hi,

You can upload it in "media/com_hikashop/images".
And your code should be:

defined('_JEXEC') or die('Restricted access');
?>
<?php
echo '<img src="media/com_hikashop/images/yourImage.png" alt="Shopping cart icon" width=50px lenght=50px/>';
global $Itemid;

And change "yourImage.png" by your image name.

The following user(s) said Thank You: djundi, 41global

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

  • Posts: 45
  • Thank you received: 1
12 years 6 days ago #77672

Now thinks gona betther :) Thanks agin, for greather and faster support :)

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

  • Posts: 8
  • Thank you received: 0
11 years 4 months ago #111464

Hi guys,

this helped, but I now need to put the icon next to the priceline.
I would like to have th eicon on the same line as the basket and not above. And add some spacing nect to "proceed".

And how do I save this, so that next upgarde it doesn't change again?

Any help?

Thx :cheer:

Attachments:

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
11 years 4 months ago #111481

Can you give a link to that page so that we can analyze the CSS and HTML of that area ?

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

  • Posts: 8
  • Thank you received: 0
11 years 4 months ago #111534

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
11 years 4 months ago #111540

You can use that CSS in the frontend CSS file of HikaShop that you can edit via the Display tab of the configuration:
.hikashop_cart_module img{
float:left
}
.hikashop_cart{
float: left;
margin-top: 7px;
}

The following user(s) said Thank You: Jacoke, 41global

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

  • Posts: 8
  • Thank you received: 0
11 years 4 months ago #111984

Did solve it.

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

  • Posts: 48
  • Thank you received: 1
6 years 5 months ago #293858

Thanks so much for this nicolas. I would like to center the cart image and text. Is there a css trick to easily center both items. Currently both are aligned to left of screen. Thanks!

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

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
6 years 5 months ago #293870

Hello,

As the subject is very old, can you precise your HikaShop version and the context (with Url link) or at least screenshots.
Hard to advice you without this, I can give you this link in order to have Css references.

Regards

Last edit: 6 years 5 months ago by Philip.

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

Time to create page: 0.087 seconds
Powered by Kunena Forum