Re: Errors on site layout and add to cart issues

Hot WordPress Themes Support Forum WordPress Themes Cosmetics Errors on site layout and add to cart issues Re: Errors on site layout and add to cart issues

#1732
Ivan Milic
Participant

The error is caused because you don’t have shopping chart widget on page. If you want to keep it like that:

Open:

wp-content/themes/wp_hot_cosmetics/js/theme.js

this code:

Code:
jQuery(‘.shopping_cart’).mouseenter(function(){
if(!jQuery(this).find(‘li.empty’)[0]){
jQuery(‘.shopping_cart, .shopping_cart *’).stop(true,true);
var x = jQuery(‘.shopping_cart’).position().left + jQuery(‘.shopping_cart’).innerWidth();
var y = jQuery(‘.shopping_cart .widget_shopping_cart’).position().top;

jQuery(this).addClass(‘hover’);

jQuery(‘.shopping_cart .widget_shopping_cart’).css(‘background-color’,jQuery(‘.header_wrap’).css(‘background-color’));

jQuery(‘.shopping_cart .widget_shopping_cart’).css({
‘top’:String(y) + ‘px’,
‘left’:String(x – jQuery(‘.shopping_cart .widget_shopping_cart’).innerWidth()) + ‘px’
});
}
});

replace with: this:

Code:
jQuery(‘.shopping_cart’).mouseenter(function(){
if(!jQuery(this).find(‘li.empty’)[0]){
try{
jQuery(‘.shopping_cart, .shopping_cart *’).stop(true,true);
var x = jQuery(‘.shopping_cart’).position().left + jQuery(‘.shopping_cart’).innerWidth();
var y = jQuery(‘.shopping_cart .widget_shopping_cart’).position().top;

jQuery(this).addClass(‘hover’);

jQuery(‘.shopping_cart .widget_shopping_cart’).css(‘background-color’,jQuery(‘.header_wrap’).css(‘background-color’));

jQuery(‘.shopping_cart .widget_shopping_cart’).css({
‘top’:String(y) + ‘px’,
‘left’:String(x – jQuery(‘.shopping_cart .widget_shopping_cart’).innerWidth()) + ‘px’
});
} catch(e){}
}
});