Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add coupon amount to order->info via ot_coupon class #4324

Merged
merged 1 commit into from Dec 31, 2021

Conversation

proseLA
Copy link
Sponsor Contributor

@proseLA proseLA commented May 9, 2021

No description provided.

@proseLA
Copy link
Sponsor Contributor Author

proseLA commented May 11, 2021

i'm hopeful that we can include the coupon amount somewhere in the order object. and specifically here in the info array.

we are already subtracting the amount from the order total, but not the subtotal. we are then potentially doing some tax calculations in the coupon class, that involve this amount.

it seems that we have all of these order total modules that potentially populate valuable info into the order->info array. in my troubleshooting for taxes and math correctly summing up, everything always comes back to this array.

adding it as an extra element here seems like low cost as opposed to forcing more database hits later for those stores that need this amount for their tax calculations and to ensure correct order totals.

@proseLA
Copy link
Sponsor Contributor Author

proseLA commented May 11, 2021

https://www.zen-cart.com/showthread.php?200407-Edit-Orders-v4-0-Support-Thread&p=1380563#post1380563

perhaps, it is time to rethink the order total module? it does nothing other than spit out what is in the order->info array. and needless to say it is very easy for the math to go wrong. why are we keeping a running total as opposed to recalculating the total provide by all of the active order_total modules? apologies if this is thread drift, but it seems related.

@drbyte drbyte changed the title add coupon amount to order->info class add coupon amount to order->info via ot_coupon class May 14, 2021
@scottcwilson scottcwilson merged commit 530ca87 into zencart:v158 Dec 31, 2021
@proseLA proseLA deleted the add-coupon-amount-to-order branch January 1, 2022 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants