Jump to content

[Solved] Prestashop 1.6.0.5 Add to Cart button don't show on hover


dioniz

Recommended Posts

I have the same problem in Chrome. When i hover a product nothing happens, in IE and FireFox all works fine.
When i checked another computer (also Windows 8 & newest version of Chrome) it did work fine in Chrome.

I reinstalled the webshop, but same problem. When i open a beta 1.6 shop it does work.

Also, when i scale the size of the Chrome window, you can see add to cart on all products3525j85.jpg

Edited by folkifoon (see edit history)
Link to comment
Share on other sites

Next solution:

 

  1. Uninstall the cart module
  2. remove (delete) the cart module (also do a manual delete via FTP of that module folder)
  3. in Preferences > Performance > Select Force compilation and disable cache
  4. via FTP go to your cache folder: delete everything inside cache folder but do not delete index.php
  5. grab a new cart module (from a prestashop 1.6 installation) and upload to your prestashop store and install it

See if that works

 

regards.

Edited by majority (see edit history)
Link to comment
Share on other sites

Next solution:

 

  1. Uninstall the cart module
  2. remove (delete) the cart module (also do a manual delete via FTP of that module folder)
  3. in Preferences > Performance > Select Force compilation and disable cache
  4. via FTP go to your cache folder: delete everything inside cache folder but do not delete index.php
  5. grab a new cart module (from a prestashop 1.6 installation) and upload to your prestashop store and install it

See if that works

 

regards.

 

 

If it is a fresh install, if the above suggestion does not work. Just download the package again. We had extremely high traffic and download volume so I wouldn't be surprised if the download was just a bit corrupted due to the server pressure. 

Link to comment
Share on other sites

Thanks for trying Majority but i don't think this will work cause everything is fine in Chrome but not in FF.

 

I think it has something to do with this code in themes/default-bootstrap/js/global.js:

function blockHover(status)
{
	$(document).off('mouseenter').on('mouseenter', '.product_list.grid li.ajax_block_product .product-container', function(e){

		if ('ontouchstart' in document.documentElement)
			return;
		if ($('body').find('.container').width() == 1170)
		{
			var pcHeight = $(this).parent().outerHeight();
			var pcPHeight = $(this).parent().find('.button-container').outerHeight() + $(this).parent().find('.comments_note').outerHeight() + $(this).parent().find('.functional-buttons').outerHeight();
			$(this).parent().addClass('hovered');
			$(this).parent().css('height', pcHeight + pcPHeight).css('margin-bottom', pcPHeight * (-1));
		}
	});

	$(document).off('mouseleave').on('mouseleave', '.product_list.grid li.ajax_block_product .product-container', function(e){
		if ($('body').find('.container').width() == 1170)
			$(this).parent().removeClass('hovered').removeAttr('style');
	});
}
Link to comment
Share on other sites

Benjamin I downloaded twice and did fresh install both times and thing is working in all browsers but FF

Now I'm a bit worried, as my clients use a lot firefox,

I will test my new prestashop 1.6 installation store in a firefox browser, I will tell you the results

 

Regards

Link to comment
Share on other sites

Ok I've figure it out, so you need to clean your firefox cache and cookies

here how to clean: https://support.mozilla.org/pt-PT/kb/delete-cookies-remove-info-websites-stored

 

after that I have no more problems, all is working the same way as the other browsers

 

try that and if it works for you, please mark this topic as [sOLVED]

 

Best regards

Edited by majority (see edit history)
Link to comment
Share on other sites

I found a reason for problems in Firefox in mozillazine forum:

 

 

From version 26 of Firefox, even your desktop with a mouse is detected as a touch device when you check for "ontouchstart".

 

Solution for this is to run about:config , then filter w3c and you will get dom.w3c_touch_events.enabled;1

 

Change 1 to 0 , restart FF and everything will work.

Edited by dioniz (see edit history)
  • Like 1
Link to comment
Share on other sites

I found a reason for problems in Firefox in mozillazine forum:

 

 

Solution for this is to run about:config , then filter w3c and you will get dom.w3c_touch_events.enabled;1

 

Change 1 to 0 , restart FF and everything will work.

Nice find!

 

FireFox is becoming messed up release after release, they refuse to change to webkit

why are people still using Firefox?

Link to comment
Share on other sites

For me Firefox works fine but this problem appears in Chrome

I removed chrome and reinstalled it, this didnt help. On my other computer it works fine in Chrome, so it looks like a local problem on my laptop....

 

 

I downloaded the prestashop package again and reinstalled the shop, still the same problem.

Should be something wrong in my Chrome, but reinsalling it doesnt help...maybe things are being left on pc after removing chrome, register for example.

Edited by folkifoon (see edit history)
Link to comment
Share on other sites

For me Firefox works fine but this problem appears in Chrome

 

I removed chrome and reinstalled it, this didnt help. On my other computer it works fine in Chrome, so it looks like a local problem on my laptop....

 

 

I downloaded the prestashop package again and reinstalled the shop, still the same problem.

 

Should be something wrong in my Chrome, but reinsalling it doesnt help...maybe things are being left on pc after removing chrome, register for example.

 

Clean your google chrome cache and cookies

Link to comment
Share on other sites

  • 2 weeks later...
if ('ontouchstart' in document.documentElement)
	{
		$('.shopping_cart > a:first').on('click', function(e){
			e.preventDefault();
		});

		$(document).on('touchstart', '#header .shopping_cart a:first', function(){
			if ($(this).next('.cart_block:visible').length)
				$("#header .cart_block").stop(true, true).slideUp(450);
			else
				$("#header .cart_block").stop(true, true).slideDown(450);
			e.preventDefault();
			e.stopPropagation();
		});
	}
	else
		$("#header .shopping_cart a:first").hover(
			function(){
				if (ajaxCart.nb_total_products > 0 || cart_qty > 0)
					$("#header .cart_block").stop(true, true).slideDown(450);
			},
			function(){
				setTimeout(function(){
					if (!shopping_cart.isHoveringOver() && !cart_block.isHoveringOver())
						$("#header .cart_block").stop(true, true).slideUp(450);
						
				}, 200);
			}
		);

if we remove

 

 

if ('ontouchstart' in document.documentElement)

{
$('.shopping_cart > a:first').on('click', function(e){
e.preventDefault();
});
 
$(document).on('touchstart', '#header .shopping_cart a:first', function(){
if ($(this).next('.cart_block:visible').length)
$("#header .cart_block").stop(true, true).slideUp(450);
else
$("#header .cart_block").stop(true, true).slideDown(450);
e.preventDefault();
e.stopPropagation();
});
}
else

 

Seems like newer version of chrome recognize 'ontouchstart'' so this part of code is used, but on mouse over do not behavior like touch

Link to comment
Share on other sites

On my other computer it does work well in Chrome, with same version....

 

What is your chrome and OS version?

 

My chrome version is  33.0.1750.154  and Windows 8.

I do not think it is related to browser, becouse code change fix it. I've did debug of this and it fails on

$(document).on('touchstart', '#header .shopping_cart a:first', function(){ 

And clearing all browser data, and prestashop cache not helping

Edited by marcinsz101 (see edit history)
Link to comment
Share on other sites

Thanks that helped, I've spend few hours on finding solution for that and for now there is not possible to make good touch detection. 

Your workaround is fine for me, but we can not force visitors to change browser config,

 

In fact this setting is fine on most computers, but aftern enablin some simulation in developer tool value is changed, and after finish simulation is stay on enabled touch.

 

Regards

Link to comment
Share on other sites

  • 6 months later...

Hi there Comunity Jedi, 

I wonder if  you can help, since you are the Jedi :-) 

I would like to modify the cart options in the checkout. At the moment the customer can choose items then at the checkout they can modify their basket/cart. I would like to have the possibility to modify the cart on the first popup cart screen.

Is that possible and if so how do I impliment that option?

Thank you VERY much for any advice. 

Kind regards

Len

to see what I mean here is the site www.rosieposy.fr

Link to comment
Share on other sites

×
×
  • Create New...