Shipping after tax in the checkout ?

  • Posts: 64
  • Thank you received: 4
11 years 1 week ago #166648

-- HikaShop version -- : 2.3.2.
-- Joomla version -- : 3.3.3.
-- PHP version -- : 5.3.3.

My checkout looks like this:
Total 39,00 DKK
Shipping 44,00 DKK
Tax 7,80 DKK
Total 83,00 DKK

In Denmark you don't pay taxes for shipping.

How do i set shipping after tax in the checkout ?

Total 39,00 DKK
Tax 7,80 DKK
Shipping 44,00 DKK
Total 83,00 DKK


ertmania.dk - Elektronik-produkter - gaver til børn

Please Log in or Create an account to join the conversation.

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
11 years 1 week ago #166655

Hi,

You will have to override the view "checkout | cart" in order to move the "tr" which contains the display of the shipping, under the part which display the taxes.
www.hikashop.com/support/support/documen...ize-the-display.html

It start with "if(!empty($this->shipping)) {", ends just before "if(!empty($this->additional)) {" and the best is to move it just before "if(!empty($this->payment) && $this->payment->payment_price != 0) {".

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: ertmania

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 4
11 years 1 week ago #166738

That didn't go well.

I took:
<tr>
<?php echo $td; ?>
<td id="hikashop_checkout_cart_shipping_title" class="hikashop_cart_shipping_title hikashop_cart_title">
<?php echo JText::_('HIKASHOP_SHIPPING'); ?>
</td>
<td class="hikashop_cart_shipping_value" >
<span class="hikashop_checkout_cart_shipping">
<?php
if(isset($this->value)) {
echo $this->value;
} else {
$shipping_price = null;
foreach($this->shipping as $shipping) {
if(!isset($shipping->shipping_price) && isset($shipping->shipping_price_with_tax) ) {
$shipping->shipping_price = $shipping->shipping_price_with_tax;
}
if(isset($shipping->shipping_price)) {
if($shipping_price === null)
$shipping_price = 0.0;
if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax') || !isset($shipping->shipping_price_with_tax)) {
$shipping_price += $shipping->shipping_price;
} else {
$shipping_price += $shipping->shipping_price_with_tax;
}
}
}
if($shipping_price !== null) {
echo $this->currencyHelper->format($shipping_price, $this->full_total->prices[0]->price_currency_id);
}
}
?>
</span>
</td>
</tr>


And placed it just before "if(!empty($this->payment) && $this->payment->payment_price != 0) {"

Result: the template broke?
Have I misunderstood something?


ertmania.dk - Elektronik-produkter - gaver til børn

Please Log in or Create an account to join the conversation.

  • Posts: 84219
  • Thank you received: 13671
  • MODERATOR
11 years 1 week ago #166754

You're missing some of the code of the shipping part.
As Jerome said, it starts with: "if(!empty($this->shipping)) {", ends just before "if(!empty($this->additional)) {" so it's that code that you need to move:

if(!empty($this->shipping)) {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_shipping_title" class="hikashop_cart_shipping_title hikashop_cart_title">
						<?php echo JText::_('HIKASHOP_SHIPPING'); ?>
					</td>
					<td class="hikashop_cart_shipping_value" >
						<span class="hikashop_checkout_cart_shipping">
<?php
			if(isset($this->value)) {
				echo $this->value;
			} else {
				$shipping_price = null;
				foreach($this->shipping as $shipping) {
					if(!isset($shipping->shipping_price) && isset($shipping->shipping_price_with_tax) ) {
						$shipping->shipping_price = $shipping->shipping_price_with_tax;
						//$shipping->shipping_price_with_tax = 0.0;
					}
					if(isset($shipping->shipping_price)) {
						if($shipping_price === null)
							$shipping_price = 0.0;
						if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax') || !isset($shipping->shipping_price_with_tax)) {
							$shipping_price += $shipping->shipping_price;
						} else {
							$shipping_price += $shipping->shipping_price_with_tax;
						}
					}
				}
				if($shipping_price !== null) {
					echo $this->currencyHelper->format($shipping_price, $this->full_total->prices[0]->price_currency_id);
				}
			}
?>
						</span>
					</td>
				</tr>
<?php
		}

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 4
11 years 1 week ago #166843

I did it right this time, but it still don't change anything?


ertmania.dk - Elektronik-produkter - gaver til børn
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 84219
  • Thank you received: 13671
  • MODERATOR
11 years 1 week ago #166863

If you don't see the change it's either that the modification is not done correctly in the view file or that you made the change in the view file of another template than the one you're using on your frontend.

The following user(s) said Thank You: ertmania

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 4
11 years 6 days ago #166940

Yes. Wrong template. Now it work.

Thank you for your patience.


ertmania.dk - Elektronik-produkter - gaver til børn

Please Log in or Create an account to join the conversation.

Time to create page: 0.107 seconds
Powered by Kunena Forum