Zen Cart Logo
Forums / General Questions / css buttons and long texts

css buttons and long texts

Locked

Views: 790

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
17 Jul 2008, 4:17 PM
#1
yako avatar

yako

New Zenner

Join Date:
Dec 2006
Posts:
3
Plugin Contributions:
0

css buttons and long texts

Hi. I had a problem with css buttons not showing and being misteriously replaced by normal image buttons at some pages in my site... And depending on the language selected (for example, the button would show as a css button in English, but NOT in Spanish, French or German). :shocking:

I browsed the forums and didn't find anything (sorry if I missed the right thread), so I took a look at the zen-cart's files and finally figured out what the problem was. In includes/functions/html_output.php, there is a 30-character limit to the text of css buttons. So: if the button's label has more than 30 characters, the button will not display as a css button and will be changed by a normal image button. In order to prevent that, you have to locate includes/functions/html_output.php and edit the line "if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes' && strlen($alt)<30) return zenCssButton($image, $alt, 'submit', $sec_class /, $parameters = ''/ );" (changing "30" by a bigger value). With this, css buttons with long texts such as "Añadir productos seleccionados al carrito" will display correctly.

I hope that helps and sorry for my English!