NameHero Posted September 22, 2017 Share Posted September 22, 2017 Hey guys, This seems pretty straight forward, but I can't find an answer. When a customer selects a package we automatically append a promotional code depending on the sale we're running. When they go to the configurable options page the prices don't reflect the discount, hence creating TONS of confusions and lots of pissed off emails. For example: https://www.dropbox.com/s/dqoejwh1if102tn/Screenshot%202017-09-22%2015.46.54.png?dl=0 You can see, we've added "Discounts Apply On Checkout" to try to clear it up, but it sure would be nice to show the discounted monthly rate here. Any help is much appreciated! I'm willing to pay if it takes something custom! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 23, 2017 Share Posted September 23, 2017 This seems pretty straight forward, but I can't find an answer. which means it's either a newbie question... or you've found one of WHMCS design black holes the rest of us take for granted... spoiler alert - this isn't a newbie question! When a customer selects a package we automatically append a promotional code depending on the sale we're running.When they go to the configurable options page the prices don't reflect the discount, hence creating TONS of confusions and lots of pissed off emails. For example: https://www.dropbox.com/s/dqoejwh1if102tn/Screenshot%202017-09-22%2015.46.54.png?dl=0 You can see, we've added "Discounts Apply On Checkout" to try to clear it up, but it sure would be nice to show the discounted monthly rate here. Any help is much appreciated! I'm willing to pay if it takes something custom! long story short - it's going to take something custom. for whatever reason, WHMCS decided to not make any promotional variables available at the product configuration stage of the cart process, or change existing values based on there being one... it's always been this way (or at least since I bought my first license in 2013)... there was hope it would change in v6... then v7... let's see if v8 fills that void. on the product configuration page, there are ways that you can find out if a promotion code has been added to the cart - but that is literally it... you don't know if it's valid for product(s) in the cart; you don't know what conditions it applies or requires - I can't think of any way, other than querying the database, to see if the entered promo code is valid, applicable and what effect it will have on pricing. that means you'll need an action hook... at the very least to query the db to validate the promo code - then additionally it either alters the pricing array to adjust for the discount, or it makes the variables available to the template and you modify the output in the template. 0 Quote Link to comment Share on other sites More sharing options...
NameHero Posted September 24, 2017 Author Share Posted September 24, 2017 which means it's either a newbie question... or you've found one of WHMCS design black holes the rest of us take for granted... spoiler alert - this isn't a newbie question! long story short - it's going to take something custom. for whatever reason, WHMCS decided to not make any promotional variables available at the product configuration stage of the cart process, or change existing values based on there being one... it's always been this way (or at least since I bought my first license in 2013)... there was hope it would change in v6... then v7... let's see if v8 fills that void. on the product configuration page, there are ways that you can find out if a promotion code has been added to the cart - but that is literally it... you don't know if it's valid for product(s) in the cart; you don't know what conditions it applies or requires - I can't think of any way, other than querying the database, to see if the entered promo code is valid, applicable and what effect it will have on pricing. that means you'll need an action hook... at the very least to query the db to validate the promo code - then additionally it either alters the pricing array to adjust for the discount, or it makes the variables available to the template and you modify the output in the template. Thanks for the response! This is what I kinda figured after spending hours, no days on this . We'll work on an action hook to query the DB and pray they decide to make this available in version 8! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.