Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2011
    Posts
    14
    Plugin Contributions
    0

    Default Case by case CSS button override. Possible?

    Hello all,

    I am using Zen Cart 1.3.9h.
    I enabled CSS buttons but for some particular cases I would prefer to have an image button.

    For example the "Send Gift Certificate" button is way to big for that small sidebox. So for that case, and maybe for some other buttons in the future, I would prefer to use an image.

    I modified the CSS code and it worked but I would like to know if there is a cleaner solution.

    Thanks

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

    Default Re: Case by case CSS button override. Possible?

    There is a CSS Buttons contribution which, IIRC, adds some functionality to the stock ZC's css buttons. In that contribution you can use image buttons mixed in with css buttons. I'm not sure if this will work with the stock css buttons, but here's their instructions for how to do it...

    To over ride a single CSS button by an image button:

    Copy the image button (from template_default, or created yourself) to:

    includes/YOUR_TEMPLATE/buttons/english/

    For example copy:
    includes/template_default/buttons/english/button_update_cart.gif
    to:
    includes/YOUR_TEMPLATE/buttons/english/button_update_cart.gif
    Rob

  3. #3
    Join Date
    Jun 2011
    Posts
    14
    Plugin Contributions
    0

    help question Re: Case by case CSS button override. Possible?

    thanks Rob,

    Where did you get that quote from? Is it in the doc for the CSS Buttons contrib ?

    It looks like the CSS Contrib was developed for an earlier version of Zen Cart, and I was hoping that that maybe they did include it in 1.3.9h

    Anyway, I just tried it in 1.3.9h (without the contrib) and it did not work. I copied the button in the
    includes/MY_TEMPLATE/button/English folder and it didn't do diddly.

    Anybody out there who implemented such a feature?

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

    Default Re: Case by case CSS button override. Possible?

    Yes, that was from the contrib's readme file. I suppose I'm not surprised that that trick didn't work without the contrib being installed.

    I just reviewed the CSS Buttons contrib support thread. It got hijacked by someone who was enthusiastically doing something else, so I couldn't follow it very well at all. But it looks like Paul Mathot, the person who modified the CSS Buttons contrib to bring it up to 1.3.8a level, is no longer working on it. A few questions asking if anyone had tried it on 1.3.9 were not answered yet.

    Rob

  5. #5
    Join Date
    Jun 2011
    Posts
    14
    Plugin Contributions
    0

    Default Re: Case by case CSS button override. Possible?

    Didn't install the CSS button add-on. Maybe later. In the mean time to make things work I just added a quick fix to html_output (line 295 or so)

    I changed:

    PHP Code:
    if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes'
        return 
    zenCssButton($image$alt'button'$sec_class$parameters ''); 
    to
    PHP Code:
    if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes'
        if ( !
    file_exists(DIR_WS_TEMPLATE 'buttons/' $_SESSION['language'] . '/' $image) )        
              return 
    zenCssButton($image$alt'button'$sec_class$parameters ''); 
    Now, just drop the image file of the specific button you would like to override in the includes/YOUR_TEMPLATE/buttons/english folder and you will have an image button instead of a CSS button.

 

 

Similar Threads

  1. Replies: 9
    Last Post: 19 Jul 2011, 06:27 AM
  2. Add a quantity per case/master case
    By Bigpehr in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 15 Dec 2010, 09:40 PM
  3. Case Quantities
    By jzeibert in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 24 Jun 2010, 02:30 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