- Posts: 190
- Thank you received: 0
Customise cart with included VAT prices
- codewarrior
-
Topic Author
- Offline
Less
More
14 years 7 months ago #38735
by codewarrior
Customise cart with included VAT prices was created by codewarrior
Hi,
I understood the principle of view customisation, but what happen if there are enhancements with updates ? You don't even see it !!! ???
My question is relating to the cart and VAT.
Let's say I'm in France with a 19.6% VAT.
In my catalogue, I have a product displayed at 50€ and discounted at 10%. It is displayed including VAT : 45€ [strike]50€[/strike]
When it's added to the cart, the customer see the product at 37.63€ because the cart is displayed without VAT.
It's quite confusing if you check your cart with prices.
Could it be an option in configuration to choose if you want with or without VAT in the cart ?
And how to display prices in the cart like 45€ [strike]50€[/strike] (like in the catalogue).
PS : this is probably a dummy question, but maybe you could provide a documentation page for programmers explaining all methods to display prices ?
Thanks. Regards.
I understood the principle of view customisation, but what happen if there are enhancements with updates ? You don't even see it !!! ???
My question is relating to the cart and VAT.
Let's say I'm in France with a 19.6% VAT.
In my catalogue, I have a product displayed at 50€ and discounted at 10%. It is displayed including VAT : 45€ [strike]50€[/strike]
When it's added to the cart, the customer see the product at 37.63€ because the cart is displayed without VAT.
It's quite confusing if you check your cart with prices.
Could it be an option in configuration to choose if you want with or without VAT in the cart ?
And how to display prices in the cart like 45€ [strike]50€[/strike] (like in the catalogue).
PS : this is probably a dummy question, but maybe you could provide a documentation page for programmers explaining all methods to display prices ?
Thanks. Regards.
Please Log in or Create an account to join the conversation.
14 years 7 months ago #38914
by nicolas
Replied by nicolas on topic Re: Customise cart with included VAT prices
Hi,
Indeed, you won't get the new features if you had customized the views where the new features are. It's however way better than just have you will store break each time you update because you had made changes a bit everywhere and you need to reapply them all.
With our system, your website doesn't break when you update and if you need a feature which is in one of the views you customized, you can always save your changes, delete the customization and then reapply you changes to the new version of the view.
There is an option in the cart module to display the prices with or without VAT. It is available in the hikashop options of the cart module.
For the cart display on the checkout, there is no option for that. You would have to do like that:
www.hikashop.com/en/forum/4-how-to/28960...-with-tax.html#28986
If you want to display the prices with the discount in the cart, you will have to edit the file "cart" of the view "checkout" and/or "product" via the menu Display->Views and add a line like that:
$this->params->set('show_discount',1);
It's the file "listing_price" of the same views which will display the prices based on that option and also "price_with_tax" so you can also change it if you want to display the prices with tax: $this->params->set('price_with_tax',1);
Indeed, you won't get the new features if you had customized the views where the new features are. It's however way better than just have you will store break each time you update because you had made changes a bit everywhere and you need to reapply them all.
With our system, your website doesn't break when you update and if you need a feature which is in one of the views you customized, you can always save your changes, delete the customization and then reapply you changes to the new version of the view.
There is an option in the cart module to display the prices with or without VAT. It is available in the hikashop options of the cart module.
For the cart display on the checkout, there is no option for that. You would have to do like that:
www.hikashop.com/en/forum/4-how-to/28960...-with-tax.html#28986
If you want to display the prices with the discount in the cart, you will have to edit the file "cart" of the view "checkout" and/or "product" via the menu Display->Views and add a line like that:
$this->params->set('show_discount',1);
It's the file "listing_price" of the same views which will display the prices based on that option and also "price_with_tax" so you can also change it if you want to display the prices with tax: $this->params->set('price_with_tax',1);
The following user(s) said Thank You: codewarrior, ALEXIAC
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
Less
More
- Posts: 190
- Thank you received: 0
14 years 7 months ago #39002
by codewarrior
Replied by codewarrior on topic Re: Customise cart with included VAT prices
Thanks Nicolas
It would be nice to have something in views to show if the original views are updated, even if you have customised it.
Then if you see a modification, you can try the new one.
Another idea, instead of the bin to delete the view, a switch between personalised and original or updated views.
Once again, congratulations for this great component.
Regards
It would be nice to have something in views to show if the original views are updated, even if you have customised it.
Then if you see a modification, you can try the new one.
Another idea, instead of the bin to delete the view, a switch between personalised and original or updated views.
Once again, congratulations for this great component.
Regards
Please Log in or Create an account to join the conversation.
14 years 7 months ago #39089
by nicolas
Replied by nicolas on topic Re: Customise cart with included VAT prices
Thank you for your feedback.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
Less
More
- Posts: 190
- Thank you received: 0
14 years 7 months ago - 14 years 7 months ago #40026
by codewarrior
Replied by codewarrior on topic Re: Customise cart with included VAT prices
Hi Nicolas,
I tried your suggestions in views checkout/cart.php in
$this->params->set('show_discount',1); displays the discount value ( ex : -10%)
$this->params->set('price_with_tax',1); displays the Price with Tax AFTER THE DISCOUNT
How to display the Price with Tax BEFORE THE DISCOUNT ?
(I don't understand the logic of the code)
Thanks a lot for your help.
Regards
PS : it would be nice to have a little developper documentation on that topic.
I tried your suggestions in views checkout/cart.php in
Code:
<td class="hikashop_cart_product_price_value">
<?php
$this->row=&$row;
$this->unit=true;
echo $this->loadTemplate();
?>
</td>
$this->params->set('show_discount',1); displays the discount value ( ex : -10%)
$this->params->set('price_with_tax',1); displays the Price with Tax AFTER THE DISCOUNT
How to display the Price with Tax BEFORE THE DISCOUNT ?
(I don't understand the logic of the code)
Thanks a lot for your help.
Regards
PS : it would be nice to have a little developper documentation on that topic.
Last edit: 14 years 7 months ago by codewarrior.
Please Log in or Create an account to join the conversation.
14 years 7 months ago #40224
by nicolas
Replied by nicolas on topic Re: Customise cart with included VAT prices
The simplest is to replace the call to that template file by just that:
echo $this->currencyHelper->format($row->prices[0]->price_value_without_discount_with_tax,$row->prices[0]->price_currency_id);
Otherwise, you would be able to achieve the display of the price with tax before discount but you would also have the price after discount next to it and there is no option to not have it.
echo $this->currencyHelper->format($row->prices[0]->price_value_without_discount_with_tax,$row->prices[0]->price_currency_id);
Otherwise, you would be able to achieve the display of the price with tax before discount but you would also have the price after discount next to it and there is no option to not have it.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
Less
More
- Posts: 190
- Thank you received: 0
14 years 6 months ago #43957
by codewarrior
Replied by codewarrior on topic Re: Customise cart with included VAT prices
Thanks Nicolas,
it works fine, but for the product, it is the total price VAT included (for all the quantity purchased)
I would like the unit price VAT included and before discount (like in the backend)
I'd like, whatever the quantity is : 45€ [strike]50€[/strike]
Thanks for your help.
Regards.
it works fine, but for the product, it is the total price VAT included (for all the quantity purchased)
I would like the unit price VAT included and before discount (like in the backend)
I'd like, whatever the quantity is : 45€ [strike]50€[/strike]
Thanks for your help.
Regards.
Please Log in or Create an account to join the conversation.
14 years 6 months ago #44106
by nicolas
Replied by nicolas on topic Re: Customise cart with included VAT prices
Then like that:
echo $this->currencyHelper->format($row->prices[0]->price_value_without_discount_with_tax/$row->cart_product_quantity,$row->prices[0]->price_currency_id);
echo $this->currencyHelper->format($row->prices[0]->price_value_without_discount_with_tax/$row->cart_product_quantity,$row->prices[0]->price_currency_id);
The following user(s) said Thank You: codewarrior
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
Less
More
- Posts: 190
- Thank you received: 0
14 years 5 months ago - 14 years 5 months ago #46865
by codewarrior
Replied by codewarrior on topic Re: Customise cart with included VAT prices
Now that I installed Essential version and have discounts on some products and not all, I have a new problem :
1) for products with discounts, display is ok (45€ [strike]50€[/strike])
2) for products with no discount, display is 45€ [strike]0€[/strike]
Of course, I could compare price to 0 and not display null price, but is there a flag or something clever showing that there is no discount ???
That would also avoid round pbs to 0 tests.
Thanks.
1) for products with discounts, display is ok (45€ [strike]50€[/strike])
2) for products with no discount, display is 45€ [strike]0€[/strike]
Of course, I could compare price to 0 and not display null price, but is there a flag or something clever showing that there is no discount ???
That would also avoid round pbs to 0 tests.
Thanks.
Last edit: 14 years 5 months ago by codewarrior.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
Less
More
- Posts: 190
- Thank you received: 0
14 years 5 months ago #48755
by codewarrior
Replied by codewarrior on topic Re: Customise cart with included VAT prices
No idea, Nicolas ?
Thanks
Thanks
Please Log in or Create an account to join the conversation.
14 years 5 months ago #48789
by nicolas
Replied by nicolas on topic Re: Customise cart with included VAT prices
If you look at the default view file, you will see that line:
if(!empty($this->row->discount)){
which tells the system whether there is a discount or not. So you can just do the same.
if(!empty($this->row->discount)){
which tells the system whether there is a discount or not. So you can just do the same.
Please Log in or Create an account to join the conversation.
Time to create page: 0.232 seconds