![]() |
Discount calculation improvements
One of the big issues that I have had with the shop is that it didn't check secondary usergroups for discounts. Since members that donate to the site get a discount this is necessary on our board, and it has been necessary for me to write a fix for this issue. So to solve this problem I have written the following code - feel free to use it as you see fit. :)
In /includes/functions_uttstore.php: Find in function calculate_discounted_price: PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
This might be a better solution. Instead of all that, in includes/init.php, find:
PHP Code:
PHP Code:
|
I thought of doing that, but our site is a bit unique in that we make extensive use of secondary groups for members. For example, my account has the following group memberships:
Administrators: 0% discount Senior Members (been on the site for a long time): 5% discount Friends of ACF (people that donated money to the site): 10% discount Loyal member discount (registered on site for 365 days): 5% discount Since the members were complaining about not getting all of the discounts this was judged to be the best course of action, as opposed to telling them that the highest discount is the total discount. |
All times are GMT. The time now is 01:37 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|