View Single Post
  #31  
Old 12-04-2012, 10:17 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: X-Cart Mobile module released

Alter this script: skin/common_files/modules/Xcart_Mobile/customer/core.js line 145, block:

Code:
/** * Update thumbnails sizing (products list, cart, etc.) */ var current_em = Math.floor($('.product-thumbnail').width()); $(".product-thumbnail img").each(function(){ if (!$(this).hasClass('leveler')) { // Get on screen image var screenImage = $(this); // Create new offscreen image to test var theImage = new Image(); theImage.src = screenImage.attr("src"); var sizes = func_crop_dimensions (theImage.width, theImage.height, current_em, current_em); $(this).css({ width: sizes[0], height: sizes[1] }); } });

and replace the code above with this code:

Code:
/** * Update thumbnails sizing (products list, cart, etc.) */ var current_em = Math.floor(parseFloat($('.product-thumbnail').css('width'))); $(".product-thumbnail img").each(function(){ if (!$(this).hasClass('leveler')) { // Get on screen image var screenImage = $(this); // Create new offscreen image to test $('<img />').attr("src", screenImage.attr("src")).load(function(){ var sizes = func_crop_dimensions (this.width, this.height, current_em, current_em); screenImage.css({ width: sizes[0], height: sizes[1] }); }); } });

This should fix the missing images issue.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote