Advertisement
Guest User

Untitled

a guest
Jan 21st, 2015
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.17 KB | None | 0 0
  1. ---------- themes/default-bootstrap/js/modules/blockcart/ajax-cart.js ----------
  2. index 282c324..e4fcf5b 100644
  3. @@ -576,8 +576,8 @@ var ajaxCart = {
  4.                     var productAttributeId = (this.hasAttributes ? parseInt(this.attributes) : 0);
  5.                     var content =  '<dt class="unvisible" data-id="cart_block_product_' + domIdProduct + '">';
  6.                     var name = $.trim($('<span />').html(this.name).text());
  7. -                   name = (name.length > 12 ? name.substring(0, 10) + '...' : name);
  8. -                   content += '<a class="cart-images" href="' + this.link + '" title="' + name + '"><img  src="' + this.image_cart + '" alt="' + this.name +'"></a>';
  9. +                   name = (name.length > 12 ? name.substring(0, 35) + '...' : name);
  10. +                   content += '<a class="cart-images" href="' + this.link + '" title="' + name + '"><img  src="' + (isSecure() ? this.image_cart : this.image_cart.replace('https', 'http')) + '" alt="' + this.name +'"></a>';
  11.                     content += '<div class="cart-info"><div class="product-name">' + '<span class="quantity-formated"><span class="quantity">' + this.quantity + '</span>&nbsp;x&nbsp;</span><a href="' + this.link + '" title="' + this.name + '" class="cart_block_product_name">' + name + '</a></div>';
  12.                     if (this.hasAttributes)
  13.                           content += '<div class="product-atributes"><a href="' + this.link + '" title="' + this.name + '">' + this.attributes + '</a></div>';
  14. @@ -702,7 +702,7 @@ var ajaxCart = {
  15.             $('#layer_cart_product_attributes').html(product.attributes);
  16.         $('#layer_cart_product_price').text(product.price);
  17.         $('#layer_cart_product_quantity').text(product.quantity);
  18. -       $('.layer_cart_img').html('<img class="layer_cart_img img-responsive" src="' + product.image + '" alt="' + product.name + '" title="' + product.name + '" />');
  19. +       $('.layer_cart_img').html('<img class="layer_cart_img img-responsive" src="' + (isSecure() ? product.image : product.image.replace('https', 'http')) + '" alt="' + product.name + '" title="' + product.name + '" />');
  20.  
  21.         var n = parseInt($(window).scrollTop()) + 'px';
  22.  
  23. @@ -815,6 +815,11 @@ var ajaxCart = {
  24.     }
  25.  };
  26.  
  27. +function isSecure()
  28. +{
  29. +   return location.protocol == 'https:';
  30. +}
  31. +
  32.  function HoverWatcher(selector)
  33.  {
  34.     this.hovering = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement