Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2010
    Posts
    48
    Plugin Contributions
    0

    help question Display the discount percentage on the sale badge

    [Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]

    hi, how can I do?
    zen cart Display the discount percentage on the sale badge
    thank you very much

  2. #2
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    586
    Plugin Contributions
    0

    Default Re: zen cart Display the discount percentage on the sale badge

    You can create a function ( if there is not one already in zencart)

    PHP Code:
    function tpl_display_discount_percentage($pID) {
        return  
    100 zen_round(zen_get_products_special_price($pIDtrue) / zen_get_products_base_price($pID) * 1000) . '%';
    }

    echo 
    tpl_display_discount_percentage($_GET['products_id']); 
    The badge... not sure what you referring to
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  3. #3
    Join Date
    Feb 2010
    Posts
    48
    Plugin Contributions
    0

    Default Re: zen cart Display the discount percentage on the sale badge

    Quote Originally Posted by mesnitu View Post
    You can create a function ( if there is not one already in zencart)

    PHP Code:
    function tpl_display_discount_percentage($pID) {
        return  
    100 zen_round(zen_get_products_special_price($pIDtrue) / zen_get_products_base_price($pID) * 1000) . '%';
    }

    echo 
    tpl_display_discount_percentage($_GET['products_id']); 
    The badge... not sure what you referring to
    I would like the discount percentage to be seen in the badge instead of the written sale
    as in the attached picture
    Name:  Cattura.JPG
Views: 19
Size:  19.2 KB

  4. #4
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    586
    Plugin Contributions
    0

    Default Re: zen cart Display the discount percentage on the sale badge

    Quote Originally Posted by echexxxxxxxx10 View Post
    I would like the discount percentage to be seen in the badge instead of the written sale
    as in the attached picture
    Name:  Cattura.JPG
Views: 19
Size:  19.2 KB
    That sale is the buy button ?
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  5. #5
    Join Date
    Feb 2010
    Posts
    48
    Plugin Contributions
    0

    Default Re: zen cart Display the discount percentage on the sale badge

    Quote Originally Posted by mesnitu View Post
    That sale is the buy button ?
    no it's not a button, it's just a bad impression for discounted products and new, it's not part of the basic version of zencart this?

    I bought a template, now I doubt that it is part of it.

    sorry for my English

  6. #6
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    586
    Plugin Contributions
    0

    Default Re: zen cart Display the discount percentage on the sale badge

    Yes that's from your template.
    You will need to find that badge in includes\templates\YOUR_TEMPLATE\templates\tpl_product_info_display.php
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  7. #7
    Join Date
    Feb 2010
    Posts
    48
    Plugin Contributions
    0

    Default Re: zen cart Display the discount percentage on the sale badge

    Quote Originally Posted by mesnitu View Post
    Yes that's from your template.
    You will need to find that badge in includes\templates\YOUR_TEMPLATE\templates\tpl_product_info_display.php
    thanks, now I check that file

 

 

Similar Threads

  1. v150 How can i order the special products index by it's discount percentage?
    By weber in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 27 Apr 2012, 01:26 PM
  2. Quantity Discount box only display percentage
    By Troll in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 24 Jan 2012, 06:57 PM
  3. Percentage Discount Not showing Text or Percentage off
    By milobloom in forum General Questions
    Replies: 13
    Last Post: 28 Jun 2010, 07:06 AM
  4. Replies: 4
    Last Post: 28 Apr 2008, 04:15 AM

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