Jump to content

Checkout with seperate Taxes


Schnitzer

Recommended Posts

Hello fellows,
I need some help to modify my checkout, so it shows a nice tax breakdown at the end, similar to the one in the PDF module.

 

Here's the story:
My shop (Prestashop 1.5.4.1, German language) sells food and non-food products. Food-Products are taxed 7% VAT, Non-Food is at 19% VAT.
If my shopping cart contains products from both categories, it should display the total tax for each tax-group.

This means instead of just displaying
Total incl. VAT
Total excl. VAT
Total Tax,

I it also needs to to display these:
Total 7% VAT
Total 19% VAT


The funny thing is, that prestashop alread has a nice tax-breakdown. But only in the PDF module: /pdf/invoice.tax-tab.tpl

<!--  TAX DETAILS -->
	<table style="width: 100%">
		<tr>
			<td style="text-align: left; background-color: #CCC; color: #000; padding-left: 10px; font-weight: bold; width: 40%">{l s='Tax Detail' pdf='true'}</td>
			<td style="text-align: right; background-color: #CCC; color: #000; padding-left: 10px; font-weight: bold; width: 20%">{l s='Tax Rate' pdf='true'}</td>
			{if !$use_one_after_another_method}
				<td style="text-align: right; background-color: #CCC; color: #000; padding-left: 10px; font-weight: bold; width: 20%">{l s='Total Tax Excl' pdf='true'}</td>
			{/if}
			<td style="text-align: right; background-color: #CCC; color: #000; padding-left: 10px; font-weight: bold; width: 20%">{l s='Total Tax' pdf='true'}</td>
		</tr>

		{if isset($product_tax_breakdown)}
			{foreach $product_tax_breakdown as $rate => $product_tax_infos}
				<tr style="line-height:6px;background-color:{cycle values='#FFF,#EEE'};">
					<td style="width: 40%">{l s='Products' pdf='true'}</td>
					<td style="width: 20%; text-align: right;">{$rate} %</td>
					{if !$use_one_after_another_method}
						<td style="width: 20%; text-align: right;">
							{if isset($is_order_slip) && $is_order_slip}- {/if}{displayPrice currency=$order->id_currency price=$product_tax_infos.total_price_tax_excl}
						</td>
					{/if}
					<td style="width: 20%; text-align: right;">{if isset($is_order_slip) && $is_order_slip}- {/if}{displayPrice currency=$order->id_currency price=$product_tax_infos.total_amount}</td>
				</tr>
			{/foreach}
		{/if}

Here's what the PDF looks like:
post-670051-0-77772900-1381495842_thumb.png

So this is where you come in, bringing the tax breakdown into the checkout.

For more details just contact me, I'm happy to walk you through via Skype or email.

I'm looking forward to your response!

  • Like 1
Link to comment
Share on other sites

Hello fellows,

I need some help to modify my checkout, so it shows a nice tax breakdown at the end, similar to the one in the PDF module.

 

Here's the story:

My shop (Prestashop 1.5.4.1, German language) sells food and non-food products. Food-Products are taxed 7% VAT, Non-Food is at 19% VAT.

If my shopping cart contains products from both categories, it should display the total tax for each tax-group.

 

This means instead of just displaying

Total incl. VAT

Total excl. VAT

Total Tax,

 

I it also needs to to display these:

Total 7% VAT

Total 19% VAT

 

 

The funny thing is, that prestashop alread has a nice tax-breakdown. But only in the PDF module: /pdf/invoice.tax-tab.tpl

<!--  TAX DETAILS -->
	<table style="width: 100%">
		<tr>
			<td style="text-align: left; background-color: #CCC; color: #000; padding-left: 10px; font-weight: bold; width: 40%">{l s='Tax Detail' pdf='true'}</td>
			<td style="text-align: right; background-color: #CCC; color: #000; padding-left: 10px; font-weight: bold; width: 20%">{l s='Tax Rate' pdf='true'}</td>
			{if !$use_one_after_another_method}
				<td style="text-align: right; background-color: #CCC; color: #000; padding-left: 10px; font-weight: bold; width: 20%">{l s='Total Tax Excl' pdf='true'}</td>
			{/if}
			<td style="text-align: right; background-color: #CCC; color: #000; padding-left: 10px; font-weight: bold; width: 20%">{l s='Total Tax' pdf='true'}</td>
		</tr>

		{if isset($product_tax_breakdown)}
			{foreach $product_tax_breakdown as $rate => $product_tax_infos}
				<tr style="line-height:6px;background-color:{cycle values='#FFF,#EEE'};">
					<td style="width: 40%">{l s='Products' pdf='true'}</td>
					<td style="width: 20%; text-align: right;">{$rate} %</td>
					{if !$use_one_after_another_method}
						<td style="width: 20%; text-align: right;">
							{if isset($is_order_slip) && $is_order_slip}- {/if}{displayPrice currency=$order->id_currency price=$product_tax_infos.total_price_tax_excl}
						</td>
					{/if}
					<td style="width: 20%; text-align: right;">{if isset($is_order_slip) && $is_order_slip}- {/if}{displayPrice currency=$order->id_currency price=$product_tax_infos.total_amount}</td>
				</tr>
			{/foreach}
		{/if}

Here's what the PDF looks like:

attachicon.gifpdf-screenshot.png

So this is where you come in, bringing the tax breakdown into the checkout.

 

For more details just contact me, I'm happy to walk you through via Skype or email.

 

I'm looking forward to your response!

 

Are you seeking a module or a theme modification to display the detailed taxes charges?

 

 

Best Regards,

Vitor de Souza Support Team.

Link to comment
Share on other sites

  • 1 year later...

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
×
×
  • Create New...