Hello everyone
How do I make this change for the default theme
Opencart version 3.0.2.0
When the cursor is placed on the cart, the shopping cart appears without having to click
tooltip for cart
When the basket is empty it appears to be empty if I put the mouse on the shopping cart.
Thank you
How do I make this change for the default theme
Opencart version 3.0.2.0
When the cursor is placed on the cart, the shopping cart appears without having to click
tooltip for cart
When the basket is empty it appears to be empty if I put the mouse on the shopping cart.
Thank you
Attachments
image.jpg (129.21 KiB) Viewed 1753 times
It mostly looks like this by Default, wherever this Function exists:
And it looks like this, with a hard-coded ADD TO CART implanted in the TOOLTYP Line, added to this:
And it would look about like this, if a Language Variable $button_add_to_cart; would be defined/declared,
wich is unfortunately NOT the OC 2+ Default Case.
Good Luck!
Ernie
---
---
Code: Select all
<button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span></button>
Code: Select all
<button type="button" data-toggle="tooltip" title="ADD TO CART" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span></button>
wich is unfortunately NOT the OC 2+ Default Case.
Code: Select all
<button type="button" data-toggle="tooltip" title="<?php echo $button_add_to_cart; ?>" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span></button>
Ernie
---
---
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
I think he want drop down cart on hover not on click.
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
You want the cart to show on hover instead of click? If so, you can easily do this with CSS or JS.
JS below (untested)
Post in the Commercial Support if you want something more customized.
JS below (untested)
Code: Select all
<script>
// @credit to https://codepen.io/bsngr/pen/frDqh
$(function () {
$('#cart').hover(function () {
$(this).find('.dropdown-menu').stop(true, true).delay(100).fadeIn(150);
}, function () {
$(this).find('.dropdown-menu').stop(true, true).delay(100).fadeOut(150);
});
});
</script>
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
For the hover - I pasted the JS code above I just quickly tested that on a default OC 3.02 install and works fine. If you changed the #cart Element or are running a custom theme then you need to adapt accordingly.
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
Who is online
Users browsing this forum: dparakhiya, Semrush [Bot] and 448 guests