3 replies [Last post]
ricardobaeta's picture
Offline
Joined: 06/23/2009
Juice: 24
Was this information Helpful?

Hello,

Does anyone knows how to change the images of the shopping cart from .gif to .png? What is the file that defines the link "http://www.site.com/sites/default/modules/ubercart/uc_cart/images/cart_empty.gif"? I want to have "cart_full.png" and "cart_empty.png" ...

Thanks in advance.

Ricardo

ricardobaeta's picture
Offline
Joined: 06/23/2009
Juice: 24
Got the solution!

Hi,

Just for anyone who as the same problem. Here's the solution.

The file that defines the image that is displayed is the "uc_cart.module" inside de "uc_cart" directory.

Line 237 -> $cart_image .= ($item_count) ? '/images/cart_full.gif' : '/images/cart_empty.gif';

change to:

Line 237 -> $cart_image .= ($item_count) ? '/images/cart_full.png' : '/images/cart_empty.png';

For me works fine.

Regards.

fivepoints's picture
Offline
Getting busy with the Ubercode.
Joined: 09/26/2007
Juice: 258
Re: Got the solution!

I think that's not the tight way. you can do it via css of your theme. now I dont remember the class you have to replace. just search into uc_cart.css for the images you want to replace.

fivepoints's picture
Offline
Getting busy with the Ubercode.
Joined: 09/26/2007
Juice: 258
Re: Re: Got the solution!

ok, I've found the classes. just add in your theme this code:

.cart-block-icon-full {
background: transparent url(path-to-your-image) no-repeat 5px 3px;
}

.cart-block-icon-empty {
background: transparent url(path-to-your-image) no-repeat 5px 3px;
}

.cart-block-title-bar .arrow-up {
background: transparent url(path-to-your-image) no-repeat center center;
}

.cart-block-title-bar .arrow-down {
background: transparent url(path-to-your-image) no-repeat center center;
}