Page 1 of 1
Need Help on Shopping Cart Function
Posted: Tue Aug 11, 2015 6:36 pm
by rtrtrt
Good Evening to all OpenCart Master,
I encounter a problem with my Shopping Cart, whenever i point my mouse to the shopping cart image and click, it will work correctly to show the product, but when i point my mouse away, the shopping cart close, it doesn't allow me to click "View Cart" OR "Check Out".
Any master here can please help me solve this problem, because it is very irradiating.
Untitled.jpg (27.89 KiB) Viewed 708 times
Untitled2.jpg (7.9 KiB) Viewed 708 times
Thanks & Best Regards
Re: Need Help on Shopping Cart Function
Posted: Thu Aug 13, 2015 7:29 pm
by rtrtrt
Any pro guru able to help me?
Re: Need Help on Shopping Cart Function
Posted: Fri Aug 14, 2015 7:32 pm
by soundzgood-nz
It's probably designed to work that way ... having the dropdown open all the time will, as you can see in your own screenshot, cover up corners of images etc.
Simon
Re: Need Help on Shopping Cart Function
Posted: Sat Aug 15, 2015 4:52 pm
by rtrtrt
Thanks for replying Simon.
Actually I was meaning that I don't have the chance to click the "View Cart" & "Checkout", it auto close it when my mouse move away from "Shopping Cart" Image. T_T
Here's my website:
www.hnbhoney.com
Thanks & Regards
Re: Need Help on Shopping Cart Function
Posted: Sat Aug 15, 2015 10:29 pm
by soundzgood-nz
Find /catalog/view/javascript/common.js and backup file.
Find this block in the file:
Code: Select all
/* Ajax Cart */
$('#cart > .heading a').live('click', function() {
$('#cart').addClass('active');
$('#cart').load('index.php?route=module/cart #cart > *');
$('#cart').live('mouseleave', function() {
$(this).removeClass('active');
});
});
Replace with:
Code: Select all
/* Ajax Cart */
$('#cart > .heading a').on('mouseenter', function() {
$('#cart').addClass('active');
$('#cart').load('index.php?route=module/cart #cart > *');
$('#cart').on('mouseleave', function() {
$(this).removeClass('active');
});
});
Simon
Re: Need Help on Shopping Cart Function
Posted: Thu Aug 20, 2015 1:53 pm
by rtrtrt
Thank You Simon for your kind help.
You have given me an inspiration, now my website are work perfectly on desktop and phone.
I final changed my code with
/* Ajax Cart */
$('#cart > .heading a').live('click', function() {
$('#cart').addClass('active');
$('#cart').load('index.php?route=module/cart #cart > *');
$('#cart').on('click', function() {
$(this).removeClass('active');
});
});
Thanks for your idea, and best regards to you. ^_^