Page 80 of 108 FirstFirst ... 3070787980818290 ... LastLast
Results 791 to 800 of 1072
  1. #791
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Responsive Classic (built in to Zen Cart v1.5.5) [Support Thread]

    Quote Originally Posted by earmsby View Post
    I would love to use font-awesome icons in place of some text on CSS buttons. I tried searching this thread and the whole forum but am having trouble finding any mention of this so apologies if this has been discussed somewhere.

    I thought maybe I could simply replace the button text in the language file with the html code for the FA icon, but when I tried that, for some reason, some kind of default looking image replaced my CSS button.

    Has anyone tried this successfully? Thanks for any advice or pointers!
    I do this on my site buttons.. if the css button is inside of a form you use one format and if its outside you use another format...CSS buttons are the alt tag and not the image..
    includes/languages/english/YOUR_TEMPLATE/button_names.php
    inside of forms would be..
    Code:
    define('BUTTON_UNSUBSCRIBE', ' Unsubscribe');
    define('BUTTON_UPDATE_ALT', ' Update');
    define('IMAGE_DELETE', ' Remove');
    define('BUTTON_WRITE_REVIEW_ALT', '  Write Review');
    define('BUTTON_CANCEL_REVIEW_ALT', '  Cancel');
    define('ICON_UPDATE_ALT', '  Update Cart');
    define('BUTTON_LOOKUP_ALT', ' Lookup');
    outside of forms..
    Code:
    define('BUTTON_CREATE_ACCOUNT_ALT', '<i class="fa fa-user-plus"></i>  Sign Up');
    define('BUTTON_LOG_OFF_ALT', '<i class="fa fa-star"></i>  Log Off');
    define('BUTTON_ADD_ADDRESS_ALT', '<i class="fa fa-pencil-square-o"></i>  Add Address');
    define('BUTTON_BACK_ALT', '<i class="fa fa-undo"></i> Back');
    define('BUTTON_BUY_NOW_ALT', '<i class="fa fa-star"></i>  Buy Now');
    define('BUTTON_CANCEL_ALT', '<i class="fa fa-star"></i>  Cancel');
    define('BUTTON_CHANGE_ADDRESS_ALT', '<i class="fa fa-star"></i>  Change Address');
    if the button is showing a default charter, then the wrong format was used.
    Dave
    Always forward thinking... Lost my mind!

  2. #792
    Join Date
    Dec 2010
    Posts
    28
    Plugin Contributions
    0

    Default Re: Responsive Classic (built in to Zen Cart v1.5.5) [Support Thread]

    Quote Originally Posted by earmsby View Post
    I would love to use font-awesome icons in place of some text on CSS buttons. I tried searching this thread and the whole forum but am having trouble finding any mention of this so apologies if this has been discussed somewhere.

    I thought maybe I could simply replace the button text in the language file with the html code for the FA icon, but when I tried that, for some reason, some kind of default looking image replaced my CSS button.

    Has anyone tried this successfully? Thanks for any advice or pointers!

    It may be because of html_output.php files.

    includes/functions/html_output.php line283

    Code:
        if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes' && strlen($alt)<30) return zenCssButton($image, $alt, 'submit', $sec_class, $parameters);
    I changed this 30 to 40 and it works.

  3. #793
    Join Date
    Oct 2006
    Location
    Worcester, MA
    Posts
    453
    Plugin Contributions
    0

    Default Re: Responsive Classic (built in to Zen Cart v1.5.5) [Support Thread]

    Quote Originally Posted by swguy View Post
    This is an interesting idea, but I'm not certain icons convey information as effectively as text labels. Perhaps "in addition to?"

    Also have you mapped the buttons to icons to see where the gaps are?
    Thanks for this. I take your point, but my feeling is that at this point, a button with a magnifying glass icon next to a field that says "search" is pretty much universally understood to mean "search" and takes up less space than the spelled out word (which is basically repeated as the placeholder text in the search field itself) in a mobile layout. For buttons that have more complex meanings, I wouldn't necessarily swap for FA icons.

    I'm not entirely sure what you meant by "Also have you mapped the buttons to icons to see where the gaps are?" Could you expand on that?

    Thanks!
    Ellie Armsby

  4. #794
    Join Date
    Oct 2006
    Location
    Worcester, MA
    Posts
    453
    Plugin Contributions
    0

    Default Re: Responsive Classic (built in to Zen Cart v1.5.5) [Support Thread]

    Thanks for this. I will give it a try.
    Ellie Armsby

  5. #795
    Join Date
    Oct 2006
    Location
    Worcester, MA
    Posts
    453
    Plugin Contributions
    0

    Default Re: Responsive Classic (built in to Zen Cart v1.5.5) [Support Thread]

    Quote Originally Posted by davewest View Post
    I do this on my site buttons.. if the css button is inside of a form you use one format and if its outside you use another format...CSS buttons are the alt tag and not the image..
    includes/languages/english/YOUR_TEMPLATE/button_names.php
    inside of forms would be..
    Code:
    define('BUTTON_UNSUBSCRIBE', '&#xf0e2; Unsubscribe');
    define('BUTTON_UPDATE_ALT', '&#xf021; Update');
    define('IMAGE_DELETE', '&#xf05e; Remove');
    define('BUTTON_WRITE_REVIEW_ALT', '&#xf063;  Write Review');
    define('BUTTON_CANCEL_REVIEW_ALT', '&#xf062;  Cancel');
    define('ICON_UPDATE_ALT', '&#xf021;  Update Cart');
    define('BUTTON_LOOKUP_ALT', '&#xf06e; Lookup');
    Thanks for this. I've given it a try and it sort of works. I tried doing this:
    PHP Code:
    define('BUTTON_SEARCH_ALT''&#xf002; Search Now'); 
    The button text says "search now" but the icon is just a square instead of a magnifying glass. The unicode for the icon I'm using is shown as f002 and I (perhaps mistakenly) thought I should add the "&#x" before that. Maybe the issue is that I'm including font-awesome library correctly in the header (although I do see FA icons in the mobile view).

    Will do a little more experimenting and see if I can figure it out.
    Ellie Armsby

  6. #796
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Responsive Classic (built in to Zen Cart v1.5.5) [Support Thread]

    Quote Originally Posted by earmsby View Post
    Thanks for this. I've given it a try and it sort of works. I tried doing this:
    PHP Code:
    define('BUTTON_SEARCH_ALT''&#xf002; Search Now'); 
    The button text says "search now" but the icon is just a square instead of a magnifying glass. The unicode for the icon I'm using is shown as f002 and I (perhaps mistakenly) thought I should add the "&#x" before that. Maybe the issue is that I'm including font-awesome library correctly in the header (although I do see FA icons in the mobile view).

    Will do a little more experimenting and see if I can figure it out.
    By bad... I assumed you understood the font.. &#xf002 is font awesome code and used instead of the html class
    Code:
    <i class="fa fa-search"></i>
    I would suggest downloading the font list to follow along. The font/icons can be sized to your needs, font awesome doc's as a note, the magnifying icon doesn't mean search to me... I use 5 different ones and none is for searching... all has to do with size.. which is how I use it.
    Dave
    Always forward thinking... Lost my mind!

  7. #797
    Join Date
    Dec 2010
    Posts
    28
    Plugin Contributions
    0

    Default Re: Responsive Classic (built in to Zen Cart v1.5.5) [Support Thread]

    Code:
    define('BUTTON_SEARCH_ALT', '&#xf002; Search Now');
    Try this CSS.
    Change the class name if you want to apply to other buttons.

    for Font Awesome 4
    Code:
    .button_search{font-family: "FontAwesome";}
    or

    Code:
    .button_search{font-family: "Font Awesome 5 Free";}

    https://fontawesome.com/how-to-use/o...seudo-elements

  8. #798
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Responsive Classic (built in to Zen Cart v1.5.5) [Support Thread]

    Quote Originally Posted by K1979 View Post
    Code:
    define('BUTTON_SEARCH_ALT', '&#xf002; Search Now');
    Try this CSS.
    Change the class name if you want to apply to other buttons.

    for Font Awesome 4
    Code:
    .button_search{font-family: "FontAwesome";}
    or

    Code:
    .button_search{font-family: "Font Awesome 5 Free";}
    OK... so, responsive classic is loading version 4.7.0 through CDN so font-family: "FontAwesome" would be correct. Version 5 has 4 font-family so locking yourself to the one may not workout. where as 4 only has the one. One thing I didn't ask, if this is a local install for development, and no local setup was done for font awesome, then font would not be available for testing. If the CDN is called or a local install, the font is available for use..
    Dave
    Always forward thinking... Lost my mind!

  9. #799
    Join Date
    Jun 2009
    Location
    Sparta, TN
    Posts
    158
    Plugin Contributions
    0

    Default Re: Responsive Classic (built in to Zen Cart v1.5.5) [Support Thread]

    Thank you!
    My store - closed 12/05/2023
    1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

  10. #800
    Join Date
    Oct 2006
    Location
    Worcester, MA
    Posts
    453
    Plugin Contributions
    0

    Default Re: Responsive Classic (built in to Zen Cart v1.5.5) [Support Thread]

    I'm back with another issue I'm trying to resolve. Lot's of things I like about this template but am finding customizing it to be surprisingly tricky due all the different stylesheets and ways that javascript changes elements. Anyway, on to my current question/problem:

    I'm working on resizing a few things in the heading of the product listing (on the desktop view only at this stage). The button for "Add Selected to Cart" was much too big and extended off to the right beyond the right edge of the containing div (note: it goes off the right right when the screen is narrowed a bit. It might not do that if you have a bigger screen resolution but I am on a fairly small sized laptop). It has a lot of padding that seemed a bit extreme to me (30px right and left). I was easily able to add a new css rule to my custom css to decrease that.

    But on hover, the button pops back up to the huge size. I can see that this is due to the css in stylesheet_css_buttons.css:

    Code:
    input.submit_button:hover {border:none !important;font-size: 1.2em;display: inline-block;margin:0;padding: 12px 30px 30px 30px !important;}
    input.cssButtonHover {border:none;cursor: pointer;border:none;font-size: 1.2em;display: inline-block;margin:0;padding: 12px 30px 30px 30px !important;}
    
    I don't want to completely change this across the board. I'd like to target just this particular button which is causing the problem. My understanding is that you can override an !important rule by creating another rule with !important and greater specificity. So I added a style:
    Code:
    input#submit1.cssButtonHover.button_add_selected.button_add_selectedHover{
        padding: 5px 5px; !important;
    }
    But when the page renders, my custom style is still overridden by the original rule in stylesheet_css_buttons.css. I've tried multiple different ways to target the button in the hover state and override the !important rule but nothing seems to work.

    I checked that my custom stylesheet loads later than stylesheet_css_buttons.css in the header and it appears to do so. Been banging my head on this for quite a while now.

    Here's a link to the page I'm describing: http://subitomusic.com/testing_estor...dex&cPath=1_13
    Ellie Armsby

 

 
Page 80 of 108 FirstFirst ... 3070787980818290 ... LastLast

Similar Threads

  1. v155 Support Thread - Responsive Color Changes for 155
    By dbltoe in forum Templates, Stylesheets, Page Layout
    Replies: 99
    Last Post: 1 Oct 2021, 12:31 PM
  2. v151 Tableau Responsive Theme - Support Thread
    By numinix in forum Addon Templates
    Replies: 622
    Last Post: 19 Apr 2020, 11:11 PM
  3. v155 Responsive Classic (built in to Zen Cart v1.5.5) [Support Thread]
    By picaflor-azul in forum Addon Templates
    Replies: 0
    Last Post: 17 Mar 2016, 12:30 AM
  4. v154 Order Steps Responsive [Support Thread]
    By davewest in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 5 Jul 2015, 06:11 PM
  5. Bentley Classic Template Support Thread
    By picaflor-azul in forum Addon Templates
    Replies: 173
    Last Post: 17 Sep 2013, 08:25 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