Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Adding a less than condition

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Adding a less than condition

Tagged: coupon conditions, free content link, less than condition

  • This topic has 6 replies, 3 voices, and was last updated 14 years, 1 month ago by amin007.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • February 11, 2011 at 9:17 pm #2696
    jetsetpeasant
    Member

    Hi, definitely liking the product a lot so far, but was having a little difficulty with the coupon conditions. On my site, my users receive a coupon after they buy a product through an affiliate link so I want to give a 100% discount on products from my store up to a certain value. Right now the user has to select exactly $250 dollars for example if they have a $250 coupon. I was wondering if there is a way that I could add some code to make the condition less than or equal to the coupon amount. Thanks in advance!

    February 12, 2011 at 5:27 am #28951
    amin007
    Participant

    Yeah you should be able to tweak this. Which condition are you using 1 or 2?

    1) Total amount -> is equal to -> some amount

    2) SubTotal amount -> is equal to -> some amount

    February 16, 2011 at 12:53 am #28952
    jetsetpeasant
    Member

    I’ve been using total amount, #1

    February 16, 2011 at 4:12 am #28953
    amin007
    Participant

    Open the “eStore_discount_calc.php” file and search for the following:

    if ($total == $ret_coupon->value)

    Once you find it change it to the following:

    if ($total <= $ret_coupon->value)

    There will be two occurrences of the above so make sure to change them both.

    February 21, 2011 at 3:42 am #28954
    jetsetpeasant
    Member

    That worked great, thanks a lot for your help!

    April 3, 2011 at 3:13 am #28955
    Ravensteed
    Member

    So… This should work for my issue, to, I think…?

    I’d like the ability to create a “not equal to” coupon… So, a discount would be good for everything except one product or category.

    So, if could just change that condition to != right?

    Now… Can I -add- standard conditions that will show on the pull down, so I can still use each?

    April 4, 2011 at 12:23 am #28956
    amin007
    Participant

    Yes adding a “!=” will do what you are after but you need to read the code and find out which one is application to you. For example if you want to modify the following conditional coupons behavior:

    Item ID => Is equal to => A product ID

    Then you will have to modify the logic in the following function:

    function eStore_handle_item_id_discount($ret_coupon)

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ