Shopping cart to not shows tax on shippingcosts
- nico.van.leeuwen
-
Topic Author
- Offline
Less
More
11 years 6 months ago #196245
by nico.van.leeuwen
Shopping cart to not shows tax on shippingcosts was created by nico.van.leeuwen
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.6.6
-- Browser(s) name and version -- : all
Hi,
I'm trying to change the display of the shippingcosts in the cart module. (view product_cart)
Now it shows products without tax but shippingcosts with tax.
I would like to have all the products and shippingcosts in the shopping cart without tax and apply tax only at the checkout.
Is this a setting I missed or should something be modified in the view ?
If so, any tips would be welcome.
Thanks,
Nico
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.6.6
-- Browser(s) name and version -- : all
Hi,
I'm trying to change the display of the shippingcosts in the cart module. (view product_cart)
Now it shows products without tax but shippingcosts with tax.
I would like to have all the products and shippingcosts in the shopping cart without tax and apply tax only at the checkout.
Is this a setting I missed or should something be modified in the view ?
If so, any tips would be welcome.
Thanks,
Nico
Please Log in or Create an account to join the conversation.
11 years 6 months ago #196254
by nicolas
Replied by nicolas on topic Shopping cart to not shows tax on shippingcosts
Hi,
In the HikaShop configuration page, there is a "show taxed prices" option that you can set to "no tax" and in that case the shipping costs will show without tax and the tax will only be added to the subtotal of the cart on the checkout.
In the HikaShop configuration page, there is a "show taxed prices" option that you can set to "no tax" and in that case the shipping costs will show without tax and the tax will only be added to the subtotal of the cart on the checkout.
Please Log in or Create an account to join the conversation.
10 years 9 months ago #224006
by rkuiper
Replied by rkuiper on topic Shopping cart to not shows tax on shippingcosts
Hi i am looking for something similar.
In the checkout cart view i want the products to be including tax, but the subtotal and shipping without tax.
Now i changed the subtotal already and thats showing with out tax.
If i change the option in the configuration it show everything without tax, so that's not what i want.
If i put the $this->params->set('price_with_tax',0); it will do the same.
Some threads are older and dont match up with the current code anymore.
Can you show how to change the code in the views / checkout / cart.php?
Thanks
In the checkout cart view i want the products to be including tax, but the subtotal and shipping without tax.
Now i changed the subtotal already and thats showing with out tax.
If i change the option in the configuration it show everything without tax, so that's not what i want.
If i put the $this->params->set('price_with_tax',0); it will do the same.
Some threads are older and dont match up with the current code anymore.
Can you show how to change the code in the views / checkout / cart.php?
Thanks
Please Log in or Create an account to join the conversation.
10 years 9 months ago #224016
by nicolas
Replied by nicolas on topic Shopping cart to not shows tax on shippingcosts
Hi,
Well, you're on the right track.
You can change the behavior of the system with the code:
$this->params->set('price_with_tax',0); //without tax
or:
$this->params->set('price_with_tax',1); //with tax
So simply add one or the other before the display of the price that you want to change in the checkout/cart view file.
You can change the behavior several times in the same view file so that's not a problem.
Well, you're on the right track.
You can change the behavior of the system with the code:
$this->params->set('price_with_tax',0); //without tax
or:
$this->params->set('price_with_tax',1); //with tax
So simply add one or the other before the display of the price that you want to change in the checkout/cart view file.
You can change the behavior several times in the same view file so that's not a problem.
Please Log in or Create an account to join the conversation.
10 years 9 months ago - 10 years 9 months ago #224050
by rkuiper
Replied by rkuiper on topic Shopping cart to not shows tax on shippingcosts
Hi,
I tried to change the code like you suggested, but that doesnt work for me. This is what i did.
I changed the !$this->params->get('price_with_tax',0) but didnt put the semi-colon behind it because of the placement in the if statement. Im not that good with php.
ps. I made another thread the other day because i lost this one. can you remove that tread.
hikashop.com/forum/product-category-disp...s-including-tax.html
I tried to change the code like you suggested, but that doesnt work for me. This is what i did.
Code:
<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',0) || !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>
I changed the !$this->params->get('price_with_tax',0) but didnt put the semi-colon behind it because of the placement in the if statement. Im not that good with php.
ps. I made another thread the other day because i lost this one. can you remove that tread.
hikashop.com/forum/product-category-disp...s-including-tax.html
Last edit: 10 years 9 months ago by rkuiper.
Please Log in or Create an account to join the conversation.
10 years 9 months ago #224074
by nicolas
Replied by nicolas on topic Shopping cart to not shows tax on shippingcosts
Rather than changing the condition of the if, you should do as I said and add the line:
$this->params->set('price_with_tax',0);
for example, before the line:
if(isset($this->value)) {
$this->params->set('price_with_tax',0);
for example, before the line:
if(isset($this->value)) {
The following user(s) said Thank You: rkuiper
Please Log in or Create an account to join the conversation.
10 years 9 months ago #224117
by rkuiper
Replied by rkuiper on topic Shopping cart to not shows tax on shippingcosts
Ok i see what you mean now. I miss read that before.
It works perfect. thank you
It works perfect. thank you
Please Log in or Create an account to join the conversation.
Time to create page: 0.178 seconds