PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Discount applied in total

  1. Hi,

    http://www.searchandperch.com/sportstrong/spring-league-registration/

    I'd like to be able to apply a $25 discount to the total when a user selects one of the additional SCORE clinics. I've looked at some of the tutorials on modifying the php to affect the total output, but frankly they confuse me. I don't even see a mention of where you change the code in said tutorials....custom_functions.php?

    Anyways, I'm wondering if there is an easier way to do this? Could I create a box that show the discount before the total? For example, if they chose the Spring league option plus a SCORE clinic, could it say something like the following:

    Discount: $25
    Total: $645

    I really appreciate the help in advance..thanks!

    Posted 12 years ago on Wednesday April 11, 2012 | Permalink
  2. Code customizations are typically always implemented in one of the following locations: Your themes functions.php file OR your own custom WordPress plugin that you create to house your code customizations and then install and activate it on your site.

    Your situation is unique. You can usually use an option to discount the price of a product simply by entering a negative dollar amount as that options price. Ex. -$25.00 instead of $25.00.

    However, your options increase the price while at the same time providing a discount. Which is rather unusual. Options impact the price of a Product positively or negatively. There is no way for a single option to impact the price of a Product BOTH positively AND negatively.

    Let me see if I understand this correctly....

    I'm assuming the option price for the Summer SCORE (8/6/12-8/21/12) clinic, which is $175.00, already takes into account the $25 discount on the Spring League? Otherwise the price of adding the clinic would be $200.00. Am I Correct?

    If that isn't the case, wouldn't knocking off $25 of each of the option prices have the same effect as discounting the the League fee $25? The options impact the price of the product, so if the option price is discounted $25 it's going to have the same impact as discounting the product price by $25 because they are going to be combined.

    Posted 12 years ago on Thursday April 12, 2012 | Permalink
  3. Thanks for your reply, Carl.

    The SCORE price doesn't reflect the $25 discount. In fact, I said exactly what you're saying to my client, but he wants it to be framed that the league is being discounted...not the SCORE clinic, although it results in the same total regardless.

    What I actually ended up doing was create a product field called "Discount" with a price of -$25. From there, I used conditional logic where the discount field shows anytime someone checks one of the SCORE clinic boxes. This in turn changed the total price the way I wanted it, while also making the discount salient to the user.

    I can't foresee any issues with this at the moment, but if you think there might be a better way to do it I'm all ears.

    Thanks again!

    Posted 12 years ago on Thursday April 12, 2012 | Permalink
  4. Nope, I don't see any issues with that. It should work just fine.

    Posted 12 years ago on Thursday April 12, 2012 | Permalink

This topic has been resolved and has been closed to new replies.