Page 1 of 2 12 LastLast
Results 1 to 10 of 159

Hybrid View

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

    Default CSS buttons v2.x

    This is a new support/discussion thread for the CSS buttons contribution version 2.x

    The current version is still in beta stage (=not very well tested), and I have got several ideas to improve it (little time though). But it should be quite an improvement as it is, compared to 0.x and 1.x versions (hopefully).

    Written for Zen Cart 1.3.5, expected to work on 1.3.0.x without modification.

    CSS buttons 2.0 notes:

    1) First version for Zen Cart v1.3.5 (probably works on 1.3.0.x too)
    2) Removed admin css-buttons (Sorry little time, should be easy to add though, maybe reading the oldreadme/1.05.txt helps, if you like you can uncomment outcommented sql lines for admin settings)
    3) Added css to enable automatic button width (replaces calculated width).
    4) Changed sizes from pixels to em's (improves usability!).
    5) Added feature to easily use both image and css buttons (since many people asked for this).

    Archived support thread 1.x versions: http://www.zen-cart.com/forum/showthread.php?t=19281

    Download v2: http://www.zen-cart.com/index.php?ma...roducts_id=272

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

    Default Re: CSS buttons v2.x

    There were some serious errors in the 2.0beta readme ( ). These have been corrected now (I hope ;-) ). Also some minor code/css edits were done.

    The new version 2.01 is tested quite extensively on 1.3.5.

    It's uploaded today, and will hopefully available for download soon (download link in first post).

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

    Default Re: CSS buttons v2.x

    I have a new version available that fixes a minor bug in the previous css-buttons mod, and also makes replacing one or more css-buttons by image buttons even easier. It should also fix de Zen Cart 1.3.5 gv edit bug. If anyone is willing to test it before I upload please let me know.

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

    Default Re: CSS buttons v2.x

    code suggestion...

    I never understood this in the original 1.35 release code, and I see you keep it:
    Code:
        $css_button = '<span class="' . $mouse_out_class . '" ' . $css_button_js . $style . ' >&nbsp;' . $text . '&nbsp;</span>'; // add $parameters ???
    Why not add the parameters? It hurts nothing, and in my case I'm writing a mod that requires the button have a proper id. I realize ids *can* be harmful if there are repeat buttons, but I can easily add it as a parameter if the code allows it. So for flexibility, I strongly suggest you change that line to:
    Code:
        $css_button = '<span class="' . $mouse_out_class . '" ' . $css_button_js . $style . $parameters . ' >&nbsp;' . $text . '&nbsp;</span>';
    unless there is some good reason not to.

    Otherwise, thank you for the contrib. I haven't used it enough to see any benefit over the stock cssButtons code, but it seems to work well enough!

    - Steven

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

    Default Re: CSS buttons v2.x

    Hi Steven,

    I think you are right. If I rember well I commented out the parameters because there were a few depricated HTML paramters being used at the time (long before 1.3.5), which would/could mess up the button layout.

    That it's still like this, is because I never got any complaints about it and that I was too lazy to check if it was safe already to add the paramters to the link buttons ;-)

    But I got a newer version ready anyway, and I will re-add the parameters before uploading it :-)

    I haven't used it enough to see any benefit over the stock cssButtons code
    The benefits compared to the Zen Cart css buttons are briefly described in point 3, 4 and 5 in the initial post of this thread. No inline styles needed anymore, no (hardcoded) width settings, and it's very easy to use image buttons for some of the buttons if you like (even better in the soon to be released version). Also a bug with the GV edit button should be fixed in the next version.

    Thnx for the feedback :-)

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

    Default Re: CSS buttons v2.x

    Attached version 2.31 to this post.

    1) Added $paramaters as suggested in this thread by Steven (also to the input buttons, $parameters was already re-added the the inputs a long time ago, but somehow where lost in a later version again ).

    2) Added fix for edit GV button bug (feedback on this would be nice, so if anyone uses Gift Vouchers .....).

    3) Changed the automatic image button loader
    Now the css buttons script only looks for image buttons in your custom template directory! With previous versions you had to remove buttons from template_default to take advantage of the automatic image button loader:

    with this version you can enable "Automaticly load image buttons if found" (in CSS Buttons admin) and put the button images in includes/templates/YOUR_TEMPLATE/buttons/english/, no need to remove any images form template_default anymore.
    (in which YOUR_TEMPLATE is the name of you custom template dir, and english is your language)

    4) Some minor code changes
    Last edited by paulm; 8 Nov 2006 at 03:17 PM.

  7. #7
    Join Date
    Oct 2006
    Posts
    2
    Plugin Contributions
    0

    Default Re: CSS buttons v2.x

    Hi

    I am trying to install the CSS buttons but am failing at Step 1.
    I copy and paste all the text in "cssbuttons.sql" into the "Sql Patch Tool"(SQL Query Executor), click on "Send", however I get the following error in Firefox

    "Not Acceptable
    An appropriate representation of the requested resource /sgp/admin/sqlpatch.php could not be found on this server."

    and I get this error in IE:

    "The resource cannot be displayed
    The resource you are looking for cannot be opened by your browser.

    --------------------------------------------------------------------------------

    Please try the following:

    Click the Back button to try another link.
    Click Search to look for information on the Internet.

    HTTP Error 406 - Not acceptable
    Internet Explorer"



    I have checked my installation and the file "/sgp/admin/sqlpatch.php" is definately on my server, so what am I doing wrong plz? Thank u in advance.

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

    Default Re: CSS buttons v2.x

    Hi dsepshun,

    I think it's a server configuration issue. Can you try to paste this:
    Code:
    SELECT *
    FROM products;
    and see if you get the same error?

    Another question: are you using a table prefix for your zen tables? (like zen_****) If not, you can easily load the sql using phpMyAdmin. If you do use a prefix however you would need to rename all tables accordingly.....

    But if it really is a server configuration issue, you better contact your hosting provider.

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

    Default Re: CSS buttons v2.x

    New fix for the GV button, the last one (in 2.31) unfortunately did not work (it only *seemed* to work on my testshop). Hopefully this time it does do the trick though (note that the fix is a hack, that works around a problem that probably should be fixed in the Zen core code instead).

    To upgrade from 2.31 you only need to replace:
    catalog\includes\functions\extra_functions\css_buttons.php
    no need te re&#239;nstall
    Last edited by paulm; 8 Nov 2006 at 03:17 PM.

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

    Default Re: CSS buttons v2.x

    Changes:
    1.) Tested on Zen Cart v1.3.6

    2.) Added the CSS for the /* css popups */

    (No code changes were needed for 1.3.6 compatibility)

    #####################

    Some advantages over the stock Zen CSS button are:

    1) Easy to replace single CSS buttons by image buttons (handy for the update cart for example)

    2) Includes fix for the gift certificate edit button
    (bug exist in 1.3.5 and 1.3.6, and maybe other 1.3.x.s versions)

    3) Better/easier button width control
    Last edited by paulm; 8 Nov 2006 at 03:17 PM.

 

 
Page 1 of 2 12 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