Jump to content

TypeError: pictureOffsetOriginal is null


Recommended Posts

hi all,

 

when click "add to cart" button in product list page its adds the product to cart but it ajax does not works.

 

when refresh the page the cart shows the product i added..

 

but the copy of product image does not move to cart and the cart does not reload by ajax....

 

TypeError: pictureOffsetOriginal is null.

 

 

thanks in advance...

Link to comment
Share on other sites

i am working in localhost so i unable to share link..

 

however i solved the problem but i cant understand.

 

the error code is.

 

<td class="tdheight">
<div id="p_list_addto_cart">
 
{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE}
 
{if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}
 
 
 
<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="/{$base_dir}cart.php?add&id;_product={$product.id_product|intval}&token;={$static_token}" >{l s='Add to cart'}</a>
 
{else}
 
<span class="exclusive">{l s='Add to cart'}</span>
 
{/if}
 
{/if}
 
 
<a  class="button" id="wishlist_button"   rel="ajax_id_product_{$product.id_product|intval}"  onclick="WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', '{$product.id_image|intval}', '', '1'); ">{l s='Wishlist' mod='blockwishlist'}</a>
</div>
 
</td>
 
and the actual code is,
 
<td class="tdheight">
 
 
{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE}
 
{if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}
 
 
 
<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="/{$base_dir}cart.php?add&id;_product={$product.id_product|intval}&token;={$static_token}" >{l s='Add to cart'}</a>
 
{else}
 
<span class="exclusive">{l s='Add to cart'}</span>
 
{/if}
 
{/if}
 
 
<a  class="button" id="wishlist_button"   rel="ajax_id_product_{$product.id_product|intval}"  onclick="WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', '{$product.id_image|intval}', '', '1'); ">{l s='Wishlist' mod='blockwishlist'}</a>
 
 
</td>
 
i added a div element inside td. if i romove it works fine. 
 
 
could you explain?
Edited by mohamedali (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...