Customise cart with included VAT prices

  • Posts: 190
  • Thank you received: 0
12 years 3 months ago #38735

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€ 50€
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€ 50€ (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.

  • Posts: 81662
  • Thank you received: 13092
  • MODERATOR
12 years 3 months ago #38914

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);

The following user(s) said Thank You: codewarrior, ALEXIAC

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

  • Posts: 190
  • Thank you received: 0
12 years 3 months ago #39002

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

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

  • Posts: 81662
  • Thank you received: 13092
  • MODERATOR
12 years 3 months ago #39089

Thank you for your feedback.

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

  • Posts: 190
  • Thank you received: 0
12 years 2 months ago #40026

Hi Nicolas,
I tried your suggestions in views checkout/cart.php in

              <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: 12 years 2 months ago by codewarrior.

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

  • Posts: 81662
  • Thank you received: 13092
  • MODERATOR
12 years 2 months ago #40224

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.

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

  • Posts: 190
  • Thank you received: 0
12 years 1 month ago #43957

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€ 50€

Thanks for your help.
Regards.

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

  • Posts: 81662
  • Thank you received: 13092
  • MODERATOR
12 years 1 month ago #44106

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);

The following user(s) said Thank You: codewarrior

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

  • Posts: 190
  • Thank you received: 0
12 years 4 weeks ago #46865

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€ 50€)
2) for products with no discount, display is 45€ 0€

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: 12 years 2 weeks ago by codewarrior.

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

  • Posts: 190
  • Thank you received: 0
12 years 2 weeks ago #48755

No idea, Nicolas ?
Thanks

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

  • Posts: 81662
  • Thank you received: 13092
  • MODERATOR
12 years 2 weeks ago #48789

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.

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

Time to create page: 0.073 seconds
Powered by Kunena Forum