Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2010
    Posts
    9
    Plugin Contributions
    0

    Default CSS buttons not fully working for some buttons in my shopping_cart page

    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

  2. #2
    Join Date
    Apr 2010
    Posts
    9
    Plugin Contributions
    0

    Default Re: CSS buttons not fully working for some buttons in my shopping_cart page

    Upon further searching, I have figured out where it is being created.

    html_output.php

    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;
      }
    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.

  3. #3
    Join Date
    Apr 2010
    Posts
    9
    Plugin Contributions
    0

    Default Re: CSS buttons not fully working for some buttons in my shopping_cart page

    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.

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: CSS buttons not fully working for some buttons in my shopping_cart page

    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.

  5. #5
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: CSS buttons not fully working for some buttons in my shopping_cart page

    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

  6. #6
    Join Date
    Apr 2010
    Posts
    9
    Plugin Contributions
    0

    Default Re: CSS buttons not fully working for some buttons in my shopping_cart page

    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...

    -=-=-=-=-=-=
    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
    Following this step and replacing those exact lines cause my shop not to load... Honestly I am lost at this point.

    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.

  7. #7
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: CSS buttons not fully working for some buttons in my shopping_cart page

    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

  8. #8
    Join Date
    Mar 2006
    Location
    Wolverhampton, UK
    Posts
    31
    Plugin Contributions
    0

    Default Re: CSS buttons not fully working for some buttons in my shopping_cart page

    Just to say, installed the CSS Buttons mod and works perfectly for me. Lot easier then trying sort out the buttons myself. :)

  9. #9
    Join Date
    Apr 2010
    Posts
    9
    Plugin Contributions
    0

    Default Re: CSS buttons not fully working for some buttons in my shopping_cart page

    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:
    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
    ?>
    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(BUTTON_IMAGE_UPDATE, BUTTON_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.

 

 

Similar Threads

  1. v151 Disable CSS buttons for some buttons and not others
    By longstockings in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 16 Nov 2013, 04:00 PM
  2. Help with using css buttons, "update cart' does not use the css buttons?
    By trinitypres in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 1 Jan 2011, 04:34 PM
  3. CSS default style for buttons works for some only
    By safeg in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 1 Dec 2010, 11:20 AM
  4. Some CSS buttons not rendering
    By phatkodi in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 21 Jul 2008, 04:48 AM
  5. Using CSS Buttons yet still see graphic buttons on some pages
    By newbie73 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 24 Jul 2007, 12:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR