News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Show price with VAT by default but without VAT in cart for export deliveries

Started by lanthan, June 21, 2014, 13:59:02 PM

Previous topic - Next topic

lanthan

Hi,
I have searched the forum for hours but didn´t find a solution for my following problem. VM2.6.6, J2.5.22, PHP 5.31

I want to display by default the product price with my current VAT on product page and product detail page. If the goods will be exported (delivery country outside EU) no VAT should be calculated in the cart/invoice.

I have a VAT rule 19% for all EU countries (+%). The product price are set as net prices, see screenshot. Tax rule is set to default rule for both setting.

As long as the customer did not choose his delivey country in the cart the product price will be displayed as net price on the product page/ product detail page. If he choosed an EU country in the cart the price on the product page is displayed like I want. But I need this from default. Background is that most customers are from EU and they are used with prices including VAT and not calculating the VAT at the checkout.

If I change the VAT rule from default to the EU VAT rule then the price shows up correct but the cart does not work correct because the VAT is calculated even the delivery is outside the EU.

Probably I´m just blind to see the right way. Any ideas would be great. Probably setting the default country to an EU country?

Thanks

[attachment cleanup by admin]

GJC Web Design

have a look here and see if this works as you want it -

http://www.bombereyewear.eu/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=1170&virtuemart_category_id=3&Itemid=121&lang=en

if so will dig thru and see how I did it  (can't remember - but know displays with vat - but if you reg outside (Switz for example  - the vat is deduced in cart)
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

lanthan

This would be exactly what I want to, but it does not work on your reference either. The company is located in Swiss, so all deliveries outside Swiss should be without tax, but if I change the country for e.g. to Germany in the cart the tax is still included in the cart.

I set the default country to an EU country (by userfield menu and by editing database) but this did not help either, because the session for the cart is created with adding the first product. If the session would be created from the beginning once you open the site (for e.g. product site), it would work.

The questions is, how to open a session once (cart) when the website is opened?

GJC Web Design

The client want's it this way ... as for tax purposes his company is EU based ..

I just build em..  ;)

but do u say the functionality works (ignoring the above?)
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

lanthan

On your clients website the functionality works! I didn´t see that the tax is calculated for every country different. That would be the way I need. But I need zero for all countries outside the EU. Don´t understand why your client calculates the VAT the specific VAT, except he has a branch in every country and sends the good from the specific country. But that´s not my business anyway ;-)

A work around soultion could be the following (not programmed until now, because I have to have a look to the joomla session handler).

1. Checking on the index.php if virtuemart has set the [__vm][cart] session array.
2. If not, you have to set manually the [__vm][cart] session array with [BT] => Array
        (
            [virtuemart_country_id] => 81 (for e.g. for Germany)
        )
I don´t know if it is enough to just set the country id or if I have to set the whole array.

3. If session array is set the correct VAT will be displayed.

Then it works.

Probably the VM developers should add a vendor country field which would the base for the tax calculation on prices as long as the BT isn´t changed by a customer.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

lanthan

This could be interesting for B2B sales but at the moment I´m selling only B2C.

GJC Web Design

So - I set Bomber up as follows -- works for what the client wants..  :)





[attachment cleanup by admin]
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

lanthan

Thank you for your efforts. I will try your solution tomorrow and let you know if it works or not. I slighty think that the OPC I´m using is buggy :-(

Meanwhile I found an easy way. I just used the product override price on my productdetail page and category page and it works either (of course still disabled). But I would prefer your solution!

echo (str_replace(".", ",", round($this->product->product_override_price,2))).' '."€ "; (productdetail page)
and
echo (str_replace(".", ",", round($product->product_override_price,2))).' '."€ "; (category page)

Thanks again!

lanthan

@GJC
It didn´t work out with my shop but I think this is an OPC bug (3rd party solution). I contacted them. Thanks for your efforts!


lanthan

I am still using the price override solution see above.This works for me. But I would recommend this only if you have just a few products.

tunasashimi

Thanks for the quick reply

It seems that VM rather promotes their own solutions (B2B as mentioned),
This sucks really

For me, your solution is not what I am looking for (too many products)

I'm sure, a lot of Swiss Shop owners would be happy to buy a solution, if available

Still looking for a solution, thank you

lanthan

Well, the solution of them is more for B2B checking if a VAT is valid and so on and includes a solution for our problem. I think, the modul is still good, even they would improve VM. On the other hand I understand the VM developer to earn money because meanwhile VM is free and it got really good.

Look at my first written solution. If you can create a VM session once your shop is opend, it should work. I didn´t follow this idea, because I have only a few products. I will check, if I can do it within the next weeks, as my current solution works, but is costly. I will let you know.

slammy

Quote from: jenkinhill on June 22, 2014, 17:57:21 PM
Would this help?  http://extensions.virtuemart.net/vm-orders/eu-vat-id-checker-detail

This is exactly what you need for b2b within europe with valid vat-id and b2c within and without EU (like Swiss, san marino, liechtenstein ect.), we are using it. See also this thread: http://forum.virtuemart.net/index.php?topic=119917.msg413782#msg413782
regards jens