Jump to content
Sign in to follow this  
jlee

Order totals & Customer Discount v1.1

Recommended Posts

(posted first in installation / configuration... oops!)

 

I am using the contribution "customer_discount_v1.1" and osC.

 

I am getting the correct discount shown at checkout, but, it is merely displayed, not subtracted from the sub-total of the order.

 

How do I make it give the proper total?

 

I am guessing this is a result of the "sort order"?

 

Is there documentation that I can read dealing with the impact of the sort order? ...how to best use it?

 

I have searched and not found... What string should I use for search on this?

 

Thanks in advance!!

 

Jimmie Lee

Share this post


Link to post
Share on other sites

Maybe someone will overrule this response, as my understanding of the credit class is based on examining the code rather than actual usage (so that I could implement a report that uses the orders_total table, in which the components of the order total are stored).

 

The credit class (either a gift voucher or customer discount) is a pseudo-payment, deducted from the subtotal when the order total is calculated. I don't think it is supposed to reduce the subtotal amount itself, which remains the sum of the products cost. Isn't your (final) order total being calculated correctly? Namely, subtotal + shipping + tax - credit?

 

And, I believe the "sort order" is merely the display presentation sequence of the total elements, and does not determine the calculation.

Share this post


Link to post
Share on other sites

Fritz is in essence correct. The credit class modules do not adjust the sub-total, although it is perfectly possible to do this.

 

One correction which is important. The sort order also determines the processing order not just the display order. This is important.

 

If you have say the Gift Voucher displaying after the order total it will appear that the order total has not been adjusted. In fact it has, it's just that because the order total has been displayed before the GV routines run and update the total.


Trust me, I'm an Accountant.

Share this post


Link to post
Share on other sites

Fritz, upon looking at what I wrote, I see my brain was far ahead of my mouth... (read fingers) ...again. :(

 

The total is the problem, the discount is NOT being applied. It is only being reported.

 

I am quite interested in what Ian touched on with the sort order impacting more than the display. I would like to understand the mechanics of setting the sort order. Is it as simple as 1 = first, 2 = second, etc.?

 

A thought, it would be useful to save the discount amount and display the running total of "savings" to the customer as well as the "savings" on the current order. The ability to turn this on or off in the standard osC red/green light would be a plus. I think this could be thought of as a "Request for Contribution" or a suggestion to be considered by the core team perhaps.

 

What sort order do I need to make the "final" total show the discount applied?

 

As always, thanks in advance of your consideration and responses!

 

jLee

Share this post


Link to post
Share on other sites

Basically,

 

An order total modules are processed diaplayed starting with the lowest numbered sort order. so yes, 1 first 2 second. etc.

 

Note also that the sort order can also impact on other oder total modules other than credit class.

 

For example let's assume you charge tax on shipping. If you have tax as sort order 3 and shipping as sort order 4. It will appear at checkout as though the tax on shipping has not been added to the total tax value. In fact it has, only after the total tax was displayed.

 

Generally I usually renumber completely all order total modules sort order.

 

Sub-total = 100

low-order-fee = 200

shipping = 300

tax = 500

total = 900

 

Usually I would then put Gift Vouchers/Discount coupons between 500-900. Unless you have a need to recalculate tax. Then they would go between 300-500

 

HTH


Trust me, I'm an Accountant.

Share this post


Link to post
Share on other sites

Ian, an emphatic Thank you for your explanation and example. It did indeed help!

 

jLee

Share this post


Link to post
Share on other sites

Ian, an emphatic Thank you for your explanation and example. It did indeed help!

 

jLee

Share this post


Link to post
Share on other sites

i have installed the GV and discount coupon contributions

 

now, in testing, when i get to the payment page, if i leave the discount coupon field blank and go to the confirmation page, the discount is still being applied to the order

 

is that right????


Reading is beneficial - Searching is enlightening

find answers at wiki.oscommerce.com/top

Share this post


Link to post
Share on other sites

Jeff,

 

Sounds strange, the only way I can see this happenning is if you got to payment page and enter a coupon code, then leave checkout, and back to normal shop.

 

If you then return to checkout, the code you entered earlier will be remembered and shown on confirmation without having to re-enter code.


Trust me, I'm an Accountant.

Share this post


Link to post
Share on other sites

Ian,

 

that might be it... i didnt think about that it would remember the code being entered for the user and would remain active until checkout was completed.......


Reading is beneficial - Searching is enlightening

find answers at wiki.oscommerce.com/top

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×