0

I'm using a shopping cart js plugin called simplecart. Im having trouble getting a tumb of the product image to appear with the product info in the cart.

This line gets the full sized image to appear in the cart

<img src='$file' class='item_thumb' alt='{$row['name']}' />

Does anyone know how to get a thumb to display in the cart instead?

GlenR
  • 95
  • 1
  • 2
  • 13

2 Answers2

0

There are height and width attributes available to use in <img></img> tags, but this will just scale the image to the size you specify in browser.

<img src='$file' class='item_thumb' height='20px' width='20px' alt='{$row['name']}' />

You may also consider adding constraints for height/width into the css of the 'item-thumb' class you are already using.

C1pher
  • 1,933
  • 6
  • 33
  • 52
  • Thats line is from my product.php file. Adding a height and width constratin it in that file. Adding the class item_thumb sends the image to cart.php. But i dont know how to constrain the image in that file. The plugin lacks decent examples and demos! – GlenR Dec 04 '13 at 21:33
0
<div class="shop-item-image">
<img src="image/bqt-item.png" class="item_thumb" thumb="image/bqt-item.png">
</div>

You need to add 'item_thumb' class to the image of a product and add attribute 'thumb' with value of an image source

MakeLoveNotWar
  • 956
  • 9
  • 25