Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Mixture of CSS and Image buttons

Mixture of CSS and Image buttons

Locked

Views: 959

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
9 Apr 2008, 3:03 PM
#1
pjb923 avatar

pjb923

Zen Follower

Join Date:
Jan 2005
Location:
NY
Posts:
135
Plugin Contributions:
0

Mixture of CSS and Image buttons

I have search and can't seem to find the answer to this.

I would like to use CSS buttons for just about everything, but have a few specialized buttons that I want to use images for. If I turn CSS buttons on, there doesn't seem to be a way to use images at all.

Can anyone offer any suggestions?

Thanks.

9 Apr 2008, 10:06 PM
#3
philibuster avatar

philibuster

New Zenner

Join Date:
Apr 2008
Posts:
3
Plugin Contributions:
0

Re: Mixture of CSS and Image buttons

This is the same issue I have been beating my head on today.

What I have found is a bizarre bug/feature whereby setting the image alt text in the includes/languages/english/custom/button_names.php file to longer than 30 characters causes the css buttons to revert to images.

More here:
http://www.zen-cart.com/forum/showthread.php?t=75168
http://www.zen-cart.com/forum/showthread.php?t=76024&highlight=zenCssButton

I have not completely explored the ramifications of exploiting this bug/feature. future upgrades may have issues. But for now I have had success changing specific buttons to images by adding spaces to the alt text so that it exceeds 30 characters.

example:

define('BUTTON_IN_CART_ALT', 'Add to Shopping Cart                    ');

Good luck

10 Apr 2008, 2:38 PM
#4
pjb923 avatar

pjb923

Zen Follower

Join Date:
Jan 2005
Location:
NY
Posts:
135
Plugin Contributions:
0

Re: Mixture of CSS and Image buttons

Thank you Paul. That mod is exacty what I was looking for. :clap:

I saw it in the downloads section, but it wasn't clear to me that it had the feature I was looking for. I guess it wouldn't have taken very long to download it and read the full description. :blush:

Philibuster, Interesting bug, but you may want to install this mod as well. It enables you to turn on CSS buttons, but any button images found in your template directory will automatically be used instead.