Adding VAT / TAX to products

silaswulff

Avatar: silaswulff

2009-01-24 12:43

Hi. I recently upgraded from QC v 1.x to 3.2, thereby loosing the functionality of the TaxAndDiscount plugin.

I need to add a 25% tax to my products, but the price of the products must be shown without this tax..

How can i do that?

//Swulff

» Quick.Cart v3.x

beholder

Avatar: beholder

2009-01-24 20:28

Hi,
paypal modules (free or paid) currently do not offer this functionality.
I offer VAT modifications for QC Free for a small fee, if you're interested contact me on
http://nlp.sk/antispam/

beholder

Avatar: beholder

2009-01-25 21:33

omg, I am sorry, I was thinking about paypal when writing this, I meant QC modules:

Quick Cart modules (free or paid) currently do not offer this functionality.

renu

No avatar

2009-02-01 20:47

Looks like your Danish like me (25% TAX)?

OK, i found something here:
http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=5663

Perhaps you will be able to find something usefull there.
Anyway, one has to find a way to make a "lossless upgrade" from 1.4 loaded -->> 3.xx and therefore the TAX issue is so very essential.

Give a hint if you find out howto..

cgan

Avatar: cgan

2009-03-14 08:21

How to display a line below Total cost which shows the VAT included like this:
Total cost: 100
VAT included: 20
VAT included will be 20 % of Total cost like example above: 0.2 * 100.
I want this both on orders_form.tpl and next step orders_print.tpl

cgan

beholder

Avatar: beholder

2009-03-15 16:11

currently not supported in any of the new QC versions, only my plugin allows that. BTW next thing you would tell me is that you will want this in customer's emails, etc.

cgan

Avatar: cgan

2009-03-15 18:47

beholder - alright, let me be more exact:
I have added this row in common.js in "function countCarrierPrice()".
gEBI( 'vatSummary' ).innerHTML = changePriceFormat(( +fOrderSummary + fDeliveryCost) * 0.2)
and added this in template/orders_form.tpl:
<tr class="summaryDelivery"><th colspan="3">
VAT 25 % included:
</th><td id="vatSummary"></td></tr> This will work so far but I also have added this in orders_print.tpl:
<tr class="summaryDelivery"><th colspan="3">
VAT 25 % included:
</th><td id="vatSummary"></td></tr>
And this will not work. The element with id=vatSummary will not be updated as in orders_form.tpl.
I must have missed something here. I need a hint how to make it to work here.

cgan

beholder

Avatar: beholder

2009-03-15 23:20

of cource it will not get updated. JavaScript will not touch the orders_print page, it's only used to calculate the sums on-the-fly on the orders_form page. You would need to change the underlying PHP code in order to display any variable on orders_print page. It's not as simple as it looks. I encourage you to look into the code further, if you can do the above in JS, you can do it in PHP too.

cgan

Avatar: cgan

2009-03-16 12:13

beholder - thanks for the hint. You made me think a little bit more. Now it works ok.

cgan

hcontrol

No avatar

2009-03-28 17:49

cgan

Could you please share your solution ? I need the same.

hcontrol

cgan

Avatar: cgan

2009-03-30 10:57

Alright. You'll have to edit core/common.js and core/orders.php and templates/orders_form.tpl and templates/orders_print.tpl.

In common.js find function countCarrierPrice() and this rows:
gEBI( 'carrierCost' ).innerHTML = changePriceFormat( fDeliveryCost );
gEBI( 'orderSummary' ).innerHTML = changePriceFormat( +fOrderSummary + fDeliveryCost );
Add this just below:
var VATPercent = 25; // specify here VAT upon ordinary price
gEBI( 'vatSummary' ).innerHTML = changePriceFormat(( +fOrderSummary + fDeliveryCost) * (1-(1/( 1 + VATPercent/100))));

In orders.php find this:
$aData['fProductsSummary'] = normalizePrice( $this->fProductsSummary );
$aData['sProductsSummary'] = displayPrice( $aData['fProductsSummary'] );
Add this just below:
$iVATPercent = 25; // specify here how much percent VAT opon ordinary price.
$aData['vatSummary'] = normalizePrice(($aData['fProductsSummary'] + $this->aOrders[$iId]['fPaymentCarrierPrice']) * (1-(1/( 1 + $iVATPercent/100))) );
$aData['VAT'] = 'VAT ' . $iVATPercent . ' % included';

Then in orders_form.tpl find <tr id="rulesAccept"> and add this just before:
<tr class="summaryDelivery">
<th colspan="3" >$aData[VAT]</th>
<td id="vatSummary">$aData[vatSummary]
</td></tr>

And last in orders_print.tpl find </tfoot> and add this just before:
<tr class="summaryDelivery">
<th colspan="3">$aData[VAT]</th>
<td id="vatSummary">$aData[vatSummary]
</td></tr>

Hope this will help you.

cgan

cachousam

Avatar: cachousam

2009-03-30 13:37

Great
It is works very fine
thanks

hcontrol

No avatar

2009-04-01 09:54

cgan,

thank you for your explanations. It works fine. I just have a question about checking out. After an order has been placed, i like to redirect (after a few seconds) to a special page. What's the best place to do so ?

Now i put in p.php:
$sOrder = $oTpl->tbHtml( 'orders_print.tpl', 'ORDER_PRINT' );
header("Location: http://www.myaffiliate.nl/affil/commission.php?price=3500&percent=15")

Your help will be appriciated.

NSN

povertyburns

No avatar

2009-12-19 05:53

cgan,

i need to have the Tax added to the price, not included in the price, can you or someone help me with this?

Help would be very much appreciated

rajoagri

Avatar: rajoagri

2010-07-25 14:35

Hello,
cgans solution works for me very well in QC3.5 ext. Now I just need to get the VAT into the emails send to clients and myself. I tried adding $aData[vatSummary] into orders_print.php in the Customer Order Body but it does not show the value? Any hints? Any help appreciated

Guido

Avatar: Guido

2011-09-27 19:32

Hi,

I still have the same question as rajoagri:

What do I have to add in orders_print.tpl to sent amount of tax/vat to admin en customer?

Guido

Guido

Avatar: Guido

2011-09-30 13:37

I found the answer in this topic: Displaying tax in customer e-mail order

Back to top
about us | contact