Cart module icon display

  • Posts: 90
  • Thank you received: 5
  • Hikashop Business
4 years 6 months ago #311413

-- url of the page with the problem -- : www.norahlux.red

Hi,

I added :

if($this->cart_type == 'wishlist'){
echo '<i class="far fa-heart" style="font-size:24px;color:white"></i>';
}

if($this->cart_type == 'cart'){
echo '<i class="fas fa-shopping-basket" style="font-size:24px;color:white"></i>';
}
to view > product > cart and it produces the wanted outcome.

I have added some code to produce item numers in circles, and when a product is added to wishlist it works fine.
Now I have 2 issues still:
1 how can I make the circles only visible when items are added?
2 When i add items to cart, it will produce a second basket on top of the first one, what am i missing?
(3th question, can the icons become a link same as the items number link (to wishlist and basket?)

Code added to css:
.topbar-section >div .hikashop_cart_module{
    position: absolute;
    top: 1px;
    right: 60px;
    z-index : 0;   
}

.topbar-section >div .hikashop_wishlist_module{
    position: absolute;
    top: 1px;
    right: 110px;
    z-index : 0;   
}
.topbar-section >div .hikashop_cart{
    position: absolute;
    top: -10px;
    right: -10px;
    border:1px solid white;
    background-color:#fa8080;   
    height:18px;
    border-radius:50%;
    -moz-border-radius:50%;
    -webkit-border-radius:50%;
    width:18px;
    text-align: center;
    line-height: 1.1;
    z-index : 1;

Attachments:

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

  • Posts: 4509
  • Thank you received: 611
  • MODERATOR
4 years 6 months ago #311451

Hello,

"1 how can I make the circles only visible when items are added?"

On your website url, I can see that when there is no products, you have a little red circle, then to answer your question you have to add css command only on the cart quantity input, for this get the html class on the quantity :
- Point your element, click-right, select inspect (or inspector or inspector tool) , a new window will be display and that you will see html and can see class, here the quantity.

"2 When i add items to cart, it will produce a second basket on top of the first one, what am i missing?"

Are you sure that you don't add more than 2 times your cart icon ? I advice you to analyze your code because so far your condition seems good.

"3th question, can the icons become a link same as the items number link (to wishlist and basket?"

Sorry, but we don't understand your question, can you precise it, and use some concrete examples ?

Awaiting news from you.
Regards

Last edit: 4 years 6 months ago by Philip.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum