Page 2 of 16 FirstFirst 123412 ... LastLast
Results 11 to 20 of 159
  1. #11
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: CSS buttons v2.x

    UPDATE
    I just uploaded version 2.34 to http://www.zen-cart.com/index.php?ma...roducts_id=272
    (So it will probably will be available soon)

    Changes compared to 2.33 are minor, only the css_button() function has changed (It looks for the existence of a class in $parameters now, and if found that class will over ride the css buttons class. And some cleanup is done.).

    To upgrade form 2.33 to 2.34 just replace the css_buttons.php function file.

    Tested on 1.3.6 (and 1.3.5)

  2. #12
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: CSS buttons v2.x

    Ok, this will *really* be the last version for a while

    There has been no change in functionality, just another small (but important?) cleanup that I should have done a long time ago.....

    Except for loading the sql and copying the files, the whole installation now is reduced to:
    Open includes/functions/html_output.php (do not forget to backup first!)

    a) find(1.3.6 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 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
    This should also make it more flexible, and even easier to upgrade if needed.
    Last edited by paulm; 25 Nov 2006 at 09:54 PM.

  3. #13
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: CSS buttons v2.x

    There will be some issues with some people with the SQL file you provided. I know cause I had issues, LOL. It depends on the version on the server, though I don't know what versions have the issue.

    ANYWAY, you need to change all lines that have this:
    'zen_cfg_select_option(array(\'true\', \'false\'),' );

    to this:
    'zen_cfg_select_option(array(''true'', ''false''),' );

    The backslash causes SQL syntax error for some.

  4. #14
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: CSS buttons v2.x

    Thanks for the feedback Jade,

    I must say I like syntax you propose better.

    Maybe it's related to the magic (or should I say evil? ;-) ) quotes settings? I think I will change it in the next version, and keep my fingers crossed ;-)

    :-)

  5. #15
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: CSS buttons v2.x

    2.50:
    1) Minor change to .sql installation file (2.4 version still included in extra folder)
    2) Minor change to CSS to prevent full table cell width for buttons within tables
    3) Finally added admin css buttons again :-) (see readme-admin for installation instructions)
    4) Small change to catalog/includes/functions/extra_functions/css_buttons.php for admin css buttons on/off switch
    Last edited by paulm; 27 Mar 2007 at 10:53 PM.

  6. #16
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: CSS buttons v2.x

    Hey Paul...

    I'm having an... umm... unusual side effect here after installing your contrib. I don't know if this is with your newest version only or not as I previously don't think I ever tested the order process with it. I'm sure this would have come up before... its very odd...

    When I have your contrib installed and operating... my orders are doubled. I can't imagine why! But if I'm at order 100 and I complete a test order, I'm now at #102 and the last order is duplicated in every way.

    It took me nearly 4 hours of testing to confirm its being caused by the css buttons. The problem goes away if either:

    1) I turn css-buttons off in the admin
    2) I leave css-buttons on, but revert to the stock 1.36 files (ie, remove your mod)


    Its extremely confusing... but I wonder if I contributed. Out of curiousity I put my independently-revised css-button hack back to use and I get the same problem!! It seems like it has to do with passing the $parameters on to the css_buttons.


    Anyway, it probably is an incompatibility with another one of my mods... so I figured I'd ask if you can check for sure and make certain you aren't having the same problem.

    Log in (as a customer)... place an order... see if you have one order or two.

    Thanks.

    - Steven

  7. #17
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: CSS buttons v2.x

    Hi Steven,

    that's weird indeed. I have installed the latest css buttons version (2.5) on both my live shop (1.3.6 but modified) and on a fresh 1.3.6 install. And I don't have this problem on either. To be sure I just did some testorders on the fresh 1.3.6 install. Also I never heard about problems like this before with the CSS buttons.

    Maybe you can try to comment out the $parameters hack I recently added to make the CSS buttons simulate image buttons (added to fix the GV edit button bug):
    Code:
        // bof hack to simulate image button (replace parameter by _x parameter)
        // needed for gv name="edit" button (other named buttons are name="btn_submit" and name="submit1" and ...??)
        if (strpos($parameters, 'name')!== false){
        // replace by regular expression
          $s=strpos($parameters, '"', strpos($parameters, 'name'))+1;
          $e=strpos($parameters, '"', $s);
          $name = substr($parameters, $s, $e-$s);
          // replaces values of both name and value ()
          //$parameters = str_replace($name, $name . '_x', $parameters);
          // replaces the value of name only
          $parameters = substr_replace($parameters, $name . '_x', $s, $e-$s);
        }
        // eof hack to simulate image button
    (in the includes/functions/extra_fuctions/css_buttons.php file)

  8. #18
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: CSS buttons v2.x

    Anyone else noticing padding differences in IE for the submit buttons?

    I've added just a tad of a top and bottom padding for the buttons, as I want them a little taller, but in IE, there is much more of a top padding than a bottom padding. I use this setting for padding: padding:0.2em 0.5em;.... yet even with the standard padding:0 0.5em;, there is still more top padding than bottom padding in IE. You can see what I mean here:
    http://www.zencart136.jadetrue.com/i...&products_id=2

    (look at the add to cart vs. tell a friend and write review)

  9. #19
    Join Date
    Nov 2005
    Location
    France - Limoges
    Posts
    101
    Plugin Contributions
    0

    Default Re: CSS buttons v2.x

    Hi, when inserting the following into phpmyadmin :
    Code:
    INSERT INTO edl_configuration( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function )
    VALUES (
    'Enable CSS buttons (catalog)', 'CSSBUTTONS_CATALOG_ENABLE', 'true', 'If true, CSS buttons for the catalog are enabled', @cssbuttonsid , 10, NULL , 'zen_cfg_select_option(array("true", "false"),'
    )
    I'm getting the following error :
    Code:
    MySQL a répondu:Documentation
    #1048 - Column 'configuration_group_id' cannot be null
    Problem seams to come from the fact that it is considering : @cssbuttonsid as being null.

    Any idea how to solve the problem.

    Cheers.

  10. #20
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: CSS buttons v2.x

    Quote Originally Posted by jettrue View Post
    Anyone else noticing padding differences in IE for the submit buttons?

    I've added just a tad of a top and bottom padding for the buttons, as I want them a little taller, but in IE, there is much more of a top padding than a bottom padding. I use this setting for padding: padding:0.2em 0.5em;....
    It's best to leave the top/bottom padding 0, and instead adjust the height and line-height (always giving both the same value!). It often helps to increase the font-size/height/line-height a little, at small sizes weird things can happen...


    @mat123slade: are you trying to add only that part of the total sql? If so, @cssbuttonsid indeed will have no value.

 

 
Page 2 of 16 FirstFirst 123412 ... LastLast

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 buttons not fully working for some buttons in my shopping_cart page
    By chasery in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 13 Apr 2010, 07:37 PM
  4. 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

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