Post by rtrtrt » Tue Aug 11, 2015 6:36 pm

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

Untitled.jpg (27.89 KiB) Viewed 695 times

Untitled2.jpg

Untitled2.jpg (7.9 KiB) Viewed 695 times

Thanks & Best Regards

Newbie

Posts

Joined
Fri Jun 19, 2015 3:59 pm

Post by rtrtrt » Thu Aug 13, 2015 7:29 pm

Any pro guru able to help me?

Newbie

Posts

Joined
Fri Jun 19, 2015 3:59 pm

Post by soundzgood-nz » Fri Aug 14, 2015 7:32 pm

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

User avatar
Active Member

Posts

Joined
Sat Oct 25, 2014 5:15 pm
Location - New Zealand

Post by rtrtrt » Sat Aug 15, 2015 4:52 pm

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

Newbie

Posts

Joined
Fri Jun 19, 2015 3:59 pm

Post by soundzgood-nz » Sat Aug 15, 2015 10:29 pm

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

User avatar
Active Member

Posts

Joined
Sat Oct 25, 2014 5:15 pm
Location - New Zealand

Post by rtrtrt » Thu Aug 20, 2015 1:53 pm

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. ^_^

Newbie

Posts

Joined
Fri Jun 19, 2015 3:59 pm
Who is online

Users browsing this forum: hxkurt and 195 guests