Forums / Templates, Stylesheets, Page Layout / index.php?main_page=products_new

index.php?main_page=products_new

Views: 816

Results 1 to 5 of 5
18 Jun 2016, 2:28 PM
#1
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

index.php?main_page=products_new

Hi all.
I am having a strange problem that I can not pinpoint. (1.5.5 with italian traslation and mods for VAT and fiscal code)
In the page https://www.acqu atua.it/index.php?main_page=products_new you can see the button that should be css and in english say Add selected to Cart and instead is a gif button that says "aggiungi le selezioni al preventivo".
In all my site the buttons are css but in this template php calls a gif button.
I have, from the original 1.5.5a version:

  • uploaded the ful set of css files
  • uploaded the original tpl_products_new_default.php
  • cheked the define file that contains the css button definition and it is there.

but nothing changes.
Can some one point me in the right direction?
Thanks
ciao from Italy
enzo

18 Jun 2016, 2:49 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: index.php?main_page=products_new

@enzo, the submit-type buttons (which is what the add-selected-to-cart button is) display the button in CSS-mode only if the button's alt-text is 30 or fewer characters.

The alt-text associated with your button is "Aggiungi il prodotto selezionato al preventivo" (46 characters); that's why the button-image is being displayed. You will need to reduce the number of characters for that alt-text for the button to display in CSS-mode.

18 Jun 2016, 3:32 PM
#3
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: index.php?main_page=products_new

Dante Alighieri:

E poi che la sua mano a la mia pose
con lieto volto, ond' io mi confortai,
mi mise dentro a le segrete cose.

@lat9, I do not know if what above tells you something. However thank you!
I could have spent the rest of my life chasing this.
Just for the sake of it, where is this rule defined?
Ciao ciao

18 Jun 2016, 4:07 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: index.php?main_page=products_new

No problem, enzo, that "rule" is defined in the zen_image_submit function of /includes/functions/html_output.php:

  function zen_image_submit($image, $alt = '', $parameters = '', $sec_class = '') {
    global $template, $current_page_base, $zco_notifier;
    if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes' [B]&& strlen($alt)<30[/B]) return zenCssButton($image, $alt, 'submit', $sec_class, $parameters);
    $zco_notifier->notify('PAGE_OUTPUT_IMAGE_SUBMIT');

    $image_submit = '<input type="image" src="' . zen_output_string($template->get_template_dir($image, DIR_WS_TEMPLATE, $current_page_base, 'buttons/' . $_SESSION['language'] . '/') . $image) . '" alt="' . zen_output_string($alt) . '"';

    if (zen_not_null($alt)) $image_submit .= ' title=" ' . zen_output_string($alt) . ' "';

    if (zen_not_null($parameters)) $image_submit .= ' ' . $parameters;

    $image_submit .= ' />';

    return $image_submit;
  }
19 Jun 2016, 8:50 AM
#5
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: index.php?main_page=products_new

Thks again!
ciao