Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] CCGV (trad)


Vger

Recommended Posts

HI Mogens,

 

I think the issue you raised here is a matter of presentation, which could be customised, not one that suggests osc may have any wrong logic in calculation. As a general application, osc could not possibly address all individual requirements but it does allow us to customise it to suit a lot of situations. I think we all understand this.

 

With regard to the comment you made below, I simply change the sort order of tax (vat), and it gives me this:

 

Sub-Total: ?11.75

Discount Coupons:10%: -?1.18

Royal Mail Recorded: ?2.88

Gift Vouchers: ?5.00

Total: ?8.46

VAT @17.5%: ?2.18

 

I could go further to make some changes in the relevant language files/admin to make it look like this (w/o touching any code):

 

Sub-Total(inc. vat): ?11.75

Discount Coupons:10%(inc. vat): -?1.18

Royal Mail Recorded (inc. vat): ?2.88

Gift Vouchers: ?5.00

Total to pay (inc. vat): ?8.46

Total VAT @17.5% charged for this order: ?2.18

 

Is that clear enough? Well, I have seen bills from big companies that, in my opinion, are designed not to let their customers understand easily, so that they simply give up examining the bill and just pay the total demanded. :)

 

Ken

 

Thanks Ken. But as customer I would simply not understand such a calculation. The Total is the same, but you cannot take a calculator and add/subtract from top to buttom. Then you end up with ?10.63 (assuming that you deduct the gift voucher of course). This is because the VAT amount is included in subamounts and also specified separately - a mess I would say. But hopefully you could explain the logic to the HMCE tax officer. This example would hold if you could throw the VAT below the Total line and call it for instance "VAT @ 17.5% included in above total": ?2.18 That would make sence, but I cannot get this kind of logic to be combined with Oscommerce :(

 

Mogens

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Thanks again Ken. I risk an eye and reply within this thread ;)

With these examples I completely agree that this is fully understandable, so it seems as if something is wrong with my installation as I cannot make my Oscommerce work this way. Will look into some twisting, or perhaps find out if some codechanges has been made to the order_totals modules within the past 3 years that could explain why my installation doesn't behave properly.

 

Regarding how to present things, I have the opinion that it should be as simple and straight forward as possible. Customers should not have to use hard thinking and calcutions to verify the correctness of the invoice. From subtotal to grandtotal it should be a simple calculation.

And I would certainly aim to do thing a whole lot better than the majority of large corporations :D

 

Mogens

Link to comment
Share on other sites

In my opinion this should be made in one of two ways:

1) The starting price is shown excl. VAT, and then all surcharges/discounts - also VAT - ending up in a total. But I can only achieve this by choosing False to "Display prices with tax", which then cripples my website completely and leads to angry customers when they are being presented with tax at checkout.

I may be missing the point but that is what many websites do - they either show the product price inclusive of tax/vat at the beginning or they simply add it on the end in the order totals.

 

Many customers of many websites have the same process, they all pay the tax/vat whether it's in the order total or at the beginning... they don't seem to get angry about this. The same applies to postage/shipping costs, there is no need for customers to get angry at the checkout because they have to pay shipping/postage costs.

 

As a matter of curiousity I hope you will update us on what path you have chosen to use in your shop.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

I could go further to make some changes in the relevant language files/admin to make it look like this (w/o touching any code):

 

Sub-Total(inc. vat): ?11.75

Discount Coupons:10%(inc. vat): -?1.18

Royal Mail Recorded (inc. vat): ?2.88

Gift Vouchers: ?5.00

Total to pay (inc. vat): ?8.46

Total VAT @17.5% charged for this order: ?2.18

Ken, I have made a comparison of all my files against the newest Oscommerce MS2.2 release, and cannot see anything in my installation that should cause it to behave different from standard. But please see the below example and the - in my opinion - incorrect outcome.

 

I have this setup of my order total modules:

 

Discount Coupons 740

Gift Vouchers 760

Shipping 2

Sub-Total 1

Tax 800

Total 900

(this is the order in which they appear in my admin screen)

 

And discount coupons are set up this way:

Include shipping: False

Include Tax: True

Re-calculate Tax: Standard

Tax Class: Taxable goods (10% in my test shop)

 

Using af discount coupon giving 10% on all goods and buying for 100.00? worth of goods leaves this result:

Sub-Total: 110.00? (this includes VAT)

Discount coupon 10%: -11.00? (must also include VAT)

VAT: 9.00?

Total: 98.00?

 

The coupon is correct (10% of 110?), and so is the VAT (10% of 100*0.90), but I do not understand on what basis ccgv grants the customer a further 1.00? discount. This simple example where a customer buys a product for 110.00? incl. VAT and gets a 10% discount could not lead to other results than 99.00?.

 

Mogens

Link to comment
Share on other sites

Morgens: sorry, I am not an accountant. But as a layman my common sense understanding is: 10% vat for 100EUR is 100 X 10% = 10EUR, not 9EUR. How come you got the 9EUR vat?

 

Ken

 

Ken, I have made a comparison of all my files against the newest Oscommerce MS2.2 release, and cannot see anything in my installation that should cause it to behave different from standard. But please see the below example and the - in my opinion - incorrect outcome.

 

I have this setup of my order total modules:

 

Discount Coupons 740

Gift Vouchers 760

Shipping 2

Sub-Total 1

Tax 800

Total 900

(this is the order in which they appear in my admin screen)

 

And discount coupons are set up this way:

Include shipping: False

Include Tax: True

Re-calculate Tax: Standard

Tax Class: Taxable goods (10% in my test shop)

 

Using af discount coupon giving 10% on all goods and buying for 100.00? worth of goods leaves this result:

Sub-Total: 110.00? (this includes VAT)

Discount coupon 10%: -11.00? (must also include VAT)

VAT: 9.00?

Total: 98.00?

 

The coupon is correct (10% of 110?), and so is the VAT (10% of 100*0.90), but I do not understand on what basis ccgv grants the customer a further 1.00? discount. This simple example where a customer buys a product for 110.00? incl. VAT and gets a 10% discount could not lead to other results than 99.00?.

 

Mogens

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

It's the way you have your Order Total module set up (incorrectly) that is causing the problem. What I think is happening is this:

 

It is taking 10% off 110 which leaves 99, then vat is being declared again as being 10% of the 10% e.g. 110 minus 11 = 99 divided by 10 divided by 10 (0.99 rounded up to 1), and so a further discount of 1 is being deducted from 99 leaving 98.

 

The settings you have for your Order Total module are not as recommended in CCGV(trad), nor are they as originally set up by the installation - and this is why you have this problem. If you use the recommended settings it will total up just fine.

 

Vger

Link to comment
Share on other sites

It's the way you have your Order Total module set up (incorrectly) that is causing the problem.

Vger

This surprises me I must admit, as I have tried to follow your instructions. But - maybe due to my ignorance - I do not understand how you can have different sort orders for Gift Vouchers (page 3 in your manual) and Discount Coupons (page 6). The only difference as far as I can see is that you have 740/760 as sort order under Gift Vouchers and 9/740 under Discount Coupons. With no modules in between in my installation, 740/760 must leave the same result as 9/740, or is there some kind of wizdom in these strange numbers? And how do these two descriptions interact?

 

If you claim there is an error in my Total Module setup I would very much appreciate a hint on where this error could be, as I simply cannot see what is going wrong. And I have tried numerous combinations of sort orders and changes in the parameters without getting anyway nearer to an - for me - understandable outcome.

 

Mogens

Link to comment
Share on other sites

Hi Mogens,

 

It is not just the sort order: each of the discount coupon and gv also has several settings, which may affect the cualculation. Here again is another example copied directly from the confirm order page for a test order(to match your example):

 

Sub-Total (inc vat @ 10%): ?110.00

Discount Coupons (inc vat @10%): -?11.00

Royal Mail Recorded: ?0.00

Total (inc vat @10%): ?99.00

Total VAT @10% charged for this order: ?10.00

 

 

The discount is 10% inc vat. I did not get ?9.00 for vat, but ?10, which I think is correct.

 

Ken

Edited by GemRock

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Try to set recalculate tax to 'none' instead of standard for the discount coupons. Gook luck!

 

Ken

Edited by GemRock

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Hi Mogens,

 

It is not just the sort order: each of the discount coupon and gv also has several settings, which may affect the cualculation. Here again is another example copied directly from the confirm order page for a test order(to match your example):

 

Sub-Total (inc vat @ 10%): ?110.00

Discount Coupons (inc vat @10%): -?11.00

Royal Mail Recorded: ?0.00

Total (inc vat @10%): ?99.00

Total VAT @10% charged for this order: ?10.00

The discount is 10% inc vat. I did not get ?9.00 for vat, but ?10, which I think is correct.

 

Ken

Hi Ken,

 

It puzzles me that you get another result than I do, but I do not agree that the VAT amount should be ?10.00. In my opinion granting the customer a discount of 10% on an item priced at ?100 ex. VAT, should result in that the customer has to pay 0.9 x (100 x 1.10) = ?99, which is also equal to your Total. But why should you pay ?10 to HMCE in this fictituos situation? If you alternatively had reduced the item price by 10%, then the customers would have seen a Sub-Total of ?99.00 incl VAT, and not had the discount coupon of course. In this situation the VAT would be calculated to ?9.00. Should you pay ?1.00 more to HMCE because of the technicality that this is expressed as a separate line on the invoice? Should this be correct I must say it ought to be relevant with a contribution where the discount is taken out of the item-price. I assume, without having digged deeper into the VAT laws, that if you can establish a clear relationship between the discount coupon and the products (belonging to certain tax classes), then in most countries the discount coupon would be VAT deductible with the tax rates applying to the goods.

 

But the above is partly commercial arguing, which has nothing to do with the ccgv (trad) program itself. However, what still bothers me, is that I cannot get ccgv (trad) to get the outcome I am after. And I am of course fully aware about all the subparameters under each order total module. And I have tried al possible and impossible combinations, as the underlying logic of how the modules and their respective parameters, interfere and end up in a correct tax calculation. So as Rhea based on my earlier mail is able to conclude that I have an incorrect Order Total Module setup, I hope she would tell me exactly where my incorrectness is.

 

Mogens

Link to comment
Share on other sites

Try to set recalculate tax to 'none' instead of standard for the discount coupons. Gook luck!

 

Ken

This gives me an identical result to yours. But, I do not want to pay an extra ?1.00 in VAT. However this seems to indicate that you at least have the same error in your installation as I do. ;)

Which parameters in ccgv (trad) that triggers a re-calculation of VAT and adding of ?1.00 further, is still a mystery to me.

 

Mogens

Link to comment
Share on other sites

Hi morgens

 

I did think about why you wanted the calculation to be shown that way and your post below confirms this. Well, again not an accountant myself, but my knowledge tells me that if you price an item at ?110 including vat @ 10%, then you are liable to pay hmce ?10 vat with no regard to what deals you may make with your customer. It is a matter of business decision: you either reduce the discount rate to increase your profit, or you pay ?1.00 more to the hmce as part of the discount and your cost. With the current version ccgv trad & osc I suppose you could not please your customer (visually seeing a bigger discount) and at the meantime please yourself (paying less vat to hmce). Does this make sense?

 

Ken

 

 

Hi Ken,

 

It puzzles me that you get another result than I do, but I do not agree that the VAT amount should be ?10.00. In my opinion granting the customer a discount of 10% on an item priced at ?100 ex. VAT, should result in that the customer has to pay 0.9 x (100 x 1.10) = ?99, which is also equal to your Total. But why should you pay ?10 to HMCE in this fictituos situation? If you alternatively had reduced the item price by 10%, then the customers would have seen a Sub-Total of ?99.00 incl VAT, and not had the discount coupon of course. In this situation the VAT would be calculated to ?9.00. Should you pay ?1.00 more to HMCE because of the technicality that this is expressed as a separate line on the invoice? Should this be correct I must say it ought to be relevant with a contribution where the discount is taken out of the item-price. I assume, without having digged deeper into the VAT laws, that if you can establish a clear relationship between the discount coupon and the products (belonging to certain tax classes), then in most countries the discount coupon would be VAT deductible with the tax rates applying to the goods.

 

But the above is partly commercial arguing, which has nothing to do with the ccgv (trad) program itself. However, what still bothers me, is that I cannot get ccgv (trad) to get the outcome I am after. And I am of course fully aware about all the subparameters under each order total module. And I have tried al possible and impossible combinations, as the underlying logic of how the modules and their respective parameters, interfere and end up in a correct tax calculation. So as Rhea based on my earlier mail is able to conclude that I have an incorrect Order Total Module setup, I hope she would tell me exactly where my incorrectness is.

 

Mogens

Edited by GemRock

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

As a matter of curiousity I hope you will update us on what path you have chosen to use in your shop.

My pleasure! It seems as if ccgv (trad) is not able to support the way I want it to treat tax (which I have now found out is supported by an EU verdict). Nomatter how I mingle with parameters I have not been able to get a logical output which satisfies my needs, and to get on I have decided for the following model:

 

1) I am still using "Display prices with tax" set to "True" in Configuration / My Store. This is to make sure that customers all over the shop see prices including tax.

2) I have this setup of my order total modules sort order:

Sub-total - Sort order = 1

Shipping - Sort order = 2

Discount Coupons - Sort order = 9

Gift Vouchers - Sort Order =740

Tax - Sort order = 800

Total - Sort Order = 900

3) I have these settings under Discount Coupons:

Include Tax: False

Re-Calculate Tax: Standard

Tax Class: Taxable goods (my defined class)

 

This will make the tax correct, but the discount coupon will be shown excl. tax. So regrettably I get exactly the kind of messy invoice I have tried to avoid, but this seems to be the only way forward. I can then as Ken suggested print "Discount Coup. 10% excl. tax" or something like this. Or alternatively I can manipulate the printed invoice to show things logically.

 

Mogens

Link to comment
Share on other sites

ccgv (trad) is not able to support the way I want it to treat tax
I have not been able to get a logical output which satisfies my needs

 

You are quite welcome to try and use something else which will satisfy your needs. CCGV(trad) is provided 'as is' - as it says in the Installation notes. If you want it to do something else then you are entitled to pay someone to recode it for you.

 

But as I am advised of all posts to this thread, so that I can offer support to those who need it with the installation of CCGV(trad), I would be pleased if you would discontinue your very large number of posts so that my Inbox will no longer be clogged up with them.

 

I would also ask Ken (GemRock) to stop responding, because that is doubling the number of posts which arrive in my Inbox.

 

Vger

Link to comment
Share on other sites

But as I am advised of all posts to this thread, so that I can offer support to those who need it with the installation of CCGV(trad), I would be pleased if you would discontinue your very large number of posts so that my Inbox will no longer be clogged up with them.

You seem to be of the opinion that all other people are stupid, and repeatedly tell that he or she has not read the instructions, has not understood what it is all about etc. I have replied to Ken as a PM on a subject because thsi in my opinion was out of line with the technicality that ccgv is supposed to handle. So despite that you have the opinion that I / we are not able to think ourselves, in certain areas we are.

 

I still do not understand the outcome of my installation as far as the print on the invoice is concerned. Actually I still had the hope that there could be an error, and this eror could be solved, but your answer clearly closes this hope. You seem to take the point of view that all users per definition has a full updated oscommerce, has follwed the install instruction without making one single error, in short that everyone has done all to perfection. In that case you could close down your thread - there would be no need for is.

 

In general people in here are very helpful, and also understands that we all are at various skill levels. I find your attitude hostile and unfriendly, and also would like to no longer receive any kind of replies from you.

 

Mogens

Link to comment
Share on other sites

Hey Rhea,

 

I just installed the latest version of the contribution and noticed that there's no "popup_coupon_help.php" file in:

 

/catalog/includes/languages/english/

 

while the file exists in the other two language directories included in the zip. Just thought I'd let you know for your next update.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

In general people in here are very helpful, and also understands that we all are at various skill levels. I find your attitude hostile and unfriendly, and also would like to no longer receive any kind of replies from you.

 

... then stop posting? :-"

 

 

---------

 

 

Change of scenery ... I've installed CCGV successfully ( !! yippee !! ) with only one snafu. The catalog/includes/boxes/information.php instructs to add this line:

 

'<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a>');// CCGV

 

Unfortunately, this code simply does not work. I get a parse error, unexpected ')' on line 27 (line quoted above).

 

I have tried messing around w/ the line, to no avail, it simply will not parse. If I comment it out, the rest of the contribution seems to run just fine.

 

Might I have an old version of this contribution, or where am I going wrong here? Ideas?

 

Thanks muchly,

 

:) Bailey

Edited by baileysemt123
Link to comment
Share on other sites

Bailey, note the change in the end of the line right above that one. You'll see that there's a comma instead of a semicolon.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

Yes, thanks, I haven't removed all of them - but they will be. Now that all Gift Vouchers are automatically queued this file is no longer required.

 

Vger

Hey Rhea,

 

I just installed the latest version of the contribution and noticed that there's no "popup_coupon_help.php" file in:

 

/catalog/includes/languages/english/

 

while the file exists in the other two language directories included in the zip. Just thought I'd let you know for your next update.

Link to comment
Share on other sites

Hi, I'll have to explain this a little better in the install file. Basically, if you use '</a>'); then this has to be the last entry in that list and the end of the previous entry needs to be changed to '</a><br>') .

 

I think it's better, when I next do an update, to advise people to place it in the middle of the list and make the end of the code read:

'</a><br>') .

 

Vger

 

... then stop posting? :-"

---------

Change of scenery ... I've installed CCGV successfully ( !! yippee !! ) with only one snafu. The catalog/includes/boxes/information.php instructs to add this line:

 

'<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a>');// CCGV

 

Unfortunately, this code simply does not work. I get a parse error, unexpected ')' on line 27 (line quoted above).

 

I have tried messing around w/ the line, to no avail, it simply will not parse. If I comment it out, the rest of the contribution seems to run just fine.

 

Might I have an old version of this contribution, or where am I going wrong here? Ideas?

 

Thanks muchly,

 

:) Bailey

Link to comment
Share on other sites

I installed CCGV recently (sweet work Vger) and because of it upgraded to PayPal IPN 1.3 and made the necessary mods. Unfortunately, something doesn't work with PayPal and I get this error when returning to checkout_process.php:

 

"Fatal error: Cannot redeclare class order_total in /home/virtual/site2/fst/var/www/html/includes/classes/order_total.php on line 13"

 

...which I found a fix for, but now I get:

 

"Fatal error: Cannot redeclare class ot_subtotal in /home/virtual/site2/fst/var/www/html/includes/modules/order_total/ot_subtotal.php on line 13"

 

I've searched and searched and finally asked about this in the PayPal support thread, but no one seems to know about this. I wouldn't even be asking in this thread but I removed Paypal 1.3 and reinstalled 1.1 and I still get the same error, which points me back to CCGV. Has anyone else here done the same process and gotten the same error?

Link to comment
Share on other sites

Hi Vger,

 

I fear I do have the same problem as Mlu !

 

I have now been spending more than 2 whole days trying to figure out whether I am too dumb to understand your instructions or whether there is a problem with CCGV (trad).

Though I must admit I do not understand how to handle "include tax in calculation".

If I am too dumb, I have to live with that though it would hit me hard.

 

Vger, I now would like to make you referee for Nala's brain v. CCGV (trad).

 

German tax laws require the net amount of the gift voucher to be deducted from the net amount of the purchased product before tax is being added.

 

To help me understand how tax is being calculated I did set my tax to 10%, the net value of the purchased product to ? 100 and the net value of the Gift voucher to ? 10.

I do not use Discount Coupons and left the settings as they were except for the changes in the sort order as per the User Guide for re-calculation of tax for Gift Vouchers.

 

reihenfolge.jpgreihenfolge1.jpg

 

I would expect a tax of ? 9,00 and a total of ? 99,00 yet what I get is:

 

checkout.jpg

 

I am at my wits' end....

 

 

exhausted greetings

Nala

Link to comment
Share on other sites

German tax laws require the net amount of the gift voucher to be deducted from the net amount of the purchased product before tax is being added.

I have never seen so many queries on CCGV(trad) about tax calculations.

 

What is that 16% figure in the checkout for? And if you you are supposed to calculate tax after the discount is applied why have you selected 'include tax in the calculation?

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

I have never seen so many queries on CCGV(trad) about tax calculations.

 

What is that 16% figure in the checkout for? And if you you are supposed to calculate tax after the discount is applied why have you selected 'include tax in the calculation?

 

I admit(ted) I do not quite understand the point of "include tax" but with trial and error that should not really matter. If I set that to "false" I get

 

summe_excl.jpg

 

16 % is the Tax in Germany, which is why I put that as text though for testing purpose I did set the amount to 10%.

 

Still confused greetings

Nala

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...