mshop/price/taxflag set to 0, VAT not added to total
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Re: mshop/price/taxflag set to 0, VAT not added to total
If the service prices are modified after updating the services, the basket plugins may have been executed. For the "setServices" event, only two plugins register in the core:
- https://github.com/aimeos/aimeos-core/b ... Coupon.php
- https://github.com/aimeos/aimeos-core/b ... ipping.php
Can you post a screenshot of your basket plugin panel list?
- https://github.com/aimeos/aimeos-core/b ... Coupon.php
- https://github.com/aimeos/aimeos-core/b ... ipping.php
Can you post a screenshot of your basket plugin panel list?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: mshop/price/taxflag set to 0, VAT not added to total
Hello Sacha
Objects are references in PHP and if they are not cloned, modifying them also updates service objects in the basket immediately without setting them again. I think the problem you are facing is related to basket plugins and how they are called because setServices() activates the ServicesUpdate plugin which replaces the delivery service objects in your basket. This would normally activate AddVat again but due to the singleton that enforces a plugin to run only once, the VAT value isn't set to 0.00 again.
The solution might be to remove that line in modifyVat():
The product and service tax rates are updated nevertheless because the objects are references.
Can you give it a try?
Best regards,
Norbert
Objects are references in PHP and if they are not cloned, modifying them also updates service objects in the basket immediately without setting them again. I think the problem you are facing is related to basket plugins and how they are called because setServices() activates the ServicesUpdate plugin which replaces the delivery service objects in your basket. This would normally activate AddVat again but due to the singleton that enforces a plugin to run only once, the VAT value isn't set to 0.00 again.
The solution might be to remove that line in modifyVat():
Code: Select all
$basket->setProducts( $products )->setServices( $services )
Can you give it a try?
Best regards,
Norbert
Re: mshop/price/taxflag set to 0, VAT not added to total
Hello Sacha
Yes, it works like expected in our current test installation so it must be a minor difference in your setup that causes the problem and we need to find out why this happens to make the extension work unter any circumstances.
We give you a two hour support package for free for your help, just contact me privately.
Best regards,
Norbert
Yes, it works like expected in our current test installation so it must be a minor difference in your setup that causes the problem and we need to find out why this happens to make the extension work unter any circumstances.
We give you a two hour support package for free for your help, just contact me privately.
Best regards,
Norbert
Re: mshop/price/taxflag set to 0, VAT not added to total
Hello Sacha
Yes, that is related but we need a solution where it still works with the ServiceUpdate plugin enabled. Removing the line completely doesn't work because then, the basket prices isn't updated any more after it has been reset. Can you please try to use this instead?
Best regards,
Norbert
Yes, that is related but we need a solution where it still works with the ServiceUpdate plugin enabled. Removing the line completely doesn't work because then, the basket prices isn't updated any more after it has been reset. Can you please try to use this instead?
Code: Select all
return $basket->setModified();
Norbert