Got what should be a pretty simple fix... lol
I have css buttons on, but it seems it misses a few in my shopping cart. I can't seem to locate a file that generates the input for that.
http://www.raoptics.com/shop/index.p...=shopping_cart
Got what should be a pretty simple fix... lol
I have css buttons on, but it seems it misses a few in my shopping cart. I can't seem to locate a file that generates the input for that.
http://www.raoptics.com/shop/index.p...=shopping_cart
Upon further searching, I have figured out where it is being created.
html_output.php
Is there a way to modify this so that the update button is replaced with a text version? I really could use some help here.Code:/* * The HTML form submit button wrapper function * Outputs a "submit" button in the selected language */ function zen_image_submit($image, $alt = '', $parameters = '', $sec_class = '') { global $template, $current_page_base, $zco_notifier; if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes' && strlen($alt)<30) 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; }
I don't understand how there is no input on this topic considering this is coming from a default set up.
I can't be the only person that has turned off the button images to style them in css and had the update cart button remain as a image.
You're not.
http://www.zen-cart.com/forum/showthread.php?t=44677
I think there are other threads, too.
That button remains an image when CSS buttons are selected, even in a stock Zencart installation.
Are you using the default CSS buttons, which comes as part of the default ZC package? Or are you using the more up-to-date mod called CSS Buttons, in the Free Software Add Ons (link top-left)?
If the latter, you should not have a graphic button there; it should be styled text, just like all the rest. (At least mine is, on both my sites, and I don't recall making any code edits to get it to behave that way.)
Rob
Ok, after reading your post regarding the css-buttons mod, I have attempted to install it but have an odd issues when editing the html_output.php...
Following this step and replacing those exact lines cause my shop not to load... Honestly I am lost at this point.-=-=-=-=-=-=
Step 3)
-=-=-=-=-=-=
Open includes/functions/html_output.php (do not forget to backup first!)
a) find(1.3.6/1.3.7 line 267):
if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes' && strlen($alt)<30) return zenCssButton($image, $alt, 'submit', $sec_class /*, $parameters = ''*/ );
replace by:
// bof css buttons (submit)
if (css_button_allowed($image) === TRUE) return css_button($image, $alt, 'submit', $parameters);
// eof css buttons
b) find (1.3.6/1.3.7 line 293 before edits):
if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') return zenCssButton($image, $alt, 'button', $sec_class, $parameters = '');
replace by:
// bof css buttons (button)
if (css_button_allowed($image) === TRUE) return css_button($image, $alt, 'button', $parameters);
// eof css buttons
Whats interesting is that the sql info is in, I have the the CSS Button menu under Configuration in the admin panel... The styles are going through, but when I replace that html_output.php file with what the directions for the mod says, it breaks the cart... I have been looking for an explanation to this, but cant seem to find why this does this or even an adjustment to fix it.
Last edited by chasery; 12 Apr 2010 at 10:42 PM.
I recall also having a problem with the html_output.php file when I did the mod install. Replacing the original unedited file got the site working again. I then very carefully edited the file as instructed and it worked the second time.
I believe that, the first time, I had copied and pasted text from the readme or the install instructions, and doing that brought in an invisible character -- probably a line end or odd CR form -- which caused a problem. My editor, BBEdit, has a Zap Gremlins function which is designed to kill such things. I ran that after editing the file. Whether it was my more careful second editing or the Zapping that cured the problem, it worked the second time around.
If you still can't get it working, PM me with your email address and I'll send you a copy of my html_output.php file.
Rob
Just to say, installed the CSS Buttons mod and works perfectly for me. Lot easier then trying sort out the buttons myself. :)
Well I just fixed the problem. Really it was just solved by modifying the tpl_shopping_cart_default.php slightly and using the over ride system.
Original around line 135:
Replace with:Code:<?php // show update cart button if (SHOW_SHOPPING_CART_UPDATE == 2 or SHOW_SHOPPING_CART_UPDATE == 3) { ?> <div class="buttonRow back"><?php echo zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT); ?></div> <?php } else { // don't show update button below cart ?>
Now I do not need the css button plugin that has seemed to cause other problems specifically for me.Code:<?php // show update cart button if (SHOW_SHOPPING_CART_UPDATE == 2 or SHOW_SHOPPING_CART_UPDATE == 3) { ?> <div class="buttonRow back"><?php echo zen_image_submit(BUTTON_IMAGE_UPDATE, BUTTON_UPDATE_ALT); ?></div> <?php } else { // don't show update button below cart ?>
Bookmarks