Forums / Templates, Stylesheets, Page Layout / Custom Shopping Cart Images - Transparent Gifs

Custom Shopping Cart Images - Transparent Gifs

Locked

Views: 3,205

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
24 Nov 2009, 9:42 PM
#1
wolfderby avatar

wolfderby

Zen Follower

Join Date:
Dec 2008
Location:
Pittsburgh, PA
Posts:
241
Plugin Contributions:
0

Custom Shopping Cart Images - Transparent Gifs

So far we've made our product images transparents gifs files however they tend are having interlacing or artifacting or something like that where the don't like quite as sharp as we'd like. Our product images have pixelated jagged edges.

I'd like to define a custom shopping cart image for the transparent gifs and then make all the other product images sharp white background jpeg files.

So in the shopping cart loads PRODUCTMODEL_cart.gif

and everywhere else loads normally.

1.3.8

24 Nov 2009, 10:30 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Custom Shopping Cart Images - Transparent Gifs

Why not make all jpeg's??

Zen-Venom Get Bitten

25 Nov 2009, 6:33 PM
#3
wolfderby avatar

wolfderby

Zen Follower

Join Date:
Dec 2008
Location:
Pittsburgh, PA
Posts:
241
Plugin Contributions:
0

Re: Custom Shopping Cart Images - Transparent Gifs

kobra:

Why not make all jpeg's??

Our shopping cart has 2 different gray scaled backgrounds and I don't want a white square around the product.

26 Nov 2009, 12:40 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Custom Shopping Cart Images - Transparent Gifs

Our shopping cart has 2 different gray scaled backgrounds and I don't want a white square around the product.

I'd like to define a custom shopping cart image for the transparent gifs and then make all the other product images sharp white background jpeg files.
The product info image probably has only one color background and is your use the default system this will be "yourimage_MED.jpg
You can matt these as a jpeg all with one background color

The system is defined here
https://www.zen-cart.com/tutorials/index.php?article=224

Zen-Venom Get Bitten

26 Nov 2009, 2:10 AM
#5
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: Custom Shopping Cart Images - Transparent Gifs

The best way to have an image look good over a complex (not-solid-color) background is to use a PNG w/alpha channel image. Sometimes called 24bit PNG.

There are a few gotchas though.

Some add-ons (like Fual Slim-Box) will break if given a png image.

I think IH2 is OK with them, but I'm not positive. You may need to test first if you use IH2.

The biggest pain is IE (of course). But this is not insurmountable. If you do use 24bit png, Google for the UnitPNGfix script and have it conditionally load in your header based on browser.

This works well in ZC to load it when needed:

<!--[if lt IE 7]>
        <script type="text/javascript" src="unitpngfix.js"></script>
<![endif]-->

This also lets you use a few png files in your design for things like nice shadow effects.

The last issue is that these png images will be a little larger than comparible jpeg files, but this is becomming less and less of an issue.