Thread: Discount

Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    red flag Discount

    [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!]

    When I have sales/discounts set up it displays as SOLD AT: 90.0%

    I need it to show the percentage
    SOLD AT: 10.0%

    So the 10% is the difference between 90% and 100%

    Which file do I edit to do this
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  2. #2
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    Default Re: Discount

    Basically I need the output to te the opposite way around. So I need it to show 10% instead of 90%

    I have looked in functions_prices.php and could now see how to do this.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  3. #3
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Discount

    Are you using the sale to sell the item at 90% of the original price or to purchase at 10% of the original price?

    The default operation is for the percent off to be provided such that if the item is being sold at 90% of the original value (a sale of 10%) then the result is to display 10% off. Further, that would mean that if the sale % off was entered as 90% then the display would be 90% off as the product would be offered at 10% of the price.

    One place/example of how to reverse the normal operation (which seems unusual to be an issue) is to modify:
    Code:
    $show_discount_amount = number_format(100 - (($display_sale_price / $display_normal_price) * 100),SHOW_SALE_DISCOUNT_DECIMALS);
    To be:
    Code:
    $show_discount_amount = number_format(/*100 - */(($display_sale_price / $display_normal_price) * 100),SHOW_SALE_DISCOUNT_DECIMALS);
    So in this one case (there are similar others within the file) if the normal price is say 100 and as a result of placing the sale price to 90% discount off of the base price, then the sale price would be 10, which in the revision would result in reporting: 10/100 * 100 which would provide 10% as the reported value.
    Previously it would report 90% as a result of the sold at price being 10 and the normal price being 100 that the result would be a 90% difference as calculated by: 100 - 10/100*100 = 100 - 10 = 90...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Discount/Checkout Question, one discount per order?
    By joyjoy in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 13 Dec 2010, 12:55 PM
  2. Set max discount for Group Discount + Discount + etc.
    By KEnik in forum Setting Up Specials and SaleMaker
    Replies: 0
    Last Post: 16 Jun 2010, 05:39 PM
  3. Replies: 18
    Last Post: 12 Mar 2010, 06:37 PM
  4. Replies: 0
    Last Post: 3 Apr 2008, 08:16 PM
  5. Ideas/Suggestions for Discount Coupon - How to give a credit and a discount
    By vegascoug in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 15 Nov 2007, 05:40 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