PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

AJAX Cart giving jQuery error after change to layout

2 replies to this topic
#1
mark2

    PrestaShop Apprentice

  • Members
  • PipPip
  • 75 posts
Hi,

I am getting the following error when selecting the "add to cart" link from a category page using the AJAX Cart :

jQuery.transferHelper.css("width", z.start.wb + "px").css("height", z.start.hb + "px").css is not a function

This problem appears when a layout change is made. The specific change is:

There is a div block holding the product with class defined in global.css as:

.product_block {
float: left; /* This seems to break the AJAX cart ?*/
background: #d0d3d8 url('../img/block_category_item_bg.jpg') repeat-x;
border: solid 1px #d0d3d8;
padding: 6px;
height:130px;
margin-bottom:0.3em;
width: 550px;
}


The "float:left" has the effect of laying out the products horizontally. By commenting out this line the products are layed out vertically and the AJAX cart works.

Does anyone have any similar experiences or ideas as to what the problem may be ?

Regards,
Mark

#2
mark2

    PrestaShop Apprentice

  • Members
  • PipPip
  • 75 posts
I was able to work around the issue by using a table to do the layout. I guess it is a bug in the ifxtransfer.js extension to jQuery.

#3
podaraz

    PrestaShop Newbie

  • Members
  • Pip
  • 2 posts
remove float: left; from id="image-block"

BAD/WRONG
css
.detail-img {float: left;}
html




CORRECT
css
.detail-img {}
.detail-img-div {float: left;}
html