News:

Support the VirtueMart project and become a member

Main Menu

Taxes and calculation rules

Started by lostmail, March 25, 2020, 19:59:08 PM

Previous topic - Next topic

lostmail

I created a calculation rule TAX before Bill.

It´s an amount which should be added ro shipping/packing in Addition to the standard shipping fee.

So far so good - it works.

But in the cart checkout page it is a little bit unlucky and not to understand for customers how it`s calculated.

In the fist colum (MWst) there should be the calculated tax amount for the rule. (19% from 6,90 EUR)
In the next colum "Preisnachlaß/Zuschlag" is the netto amount without tax (5,80) - or can be with tax....is not relevant here.
The last Colum "Betrag" should now be 6,90 EUR (5,80 + 19%)

Could you please check that and modify the calculation layout ?

Which file is responsible for the calculation and layout in the car checkout/order confirmation ?
So I´d try it myself to modify it..perhaps I can do it with my small php knowledge..
Joomla 3.x | VirtueMart 4.0.12 107771 | HORME3 PRO 1.9.6 / 2.0
VirtueMart 4.2.4 | Joomla 4.4.1 | PHP 8.1 | Vp_neoteric 1.3

lostmail

I Modified com_virtuemart/cart/defaultpricelist.php to have the 19% Tax show in the additional rules row:

Quoteforeach ($this->cart->cartData['DBTaxRulesBill'] as $rule) {
      ?>

      <tr class="sectiontableentry<?php echo $i ?> vm-cart-hide">
         <td colspan="4" class="text-right"><?php echo vmText::_($rule['calc_name']) ?></td>
         <?php if (VmConfig::get ('show_tax')) { ?>
         <td class="text-right priceCol"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff']/119*19, TRUE); ?></td>
         <?php } ?>
         <td class="text-right priceCol"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], TRUE); ?></td>
         <td class="text-right priceCol"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'], TRUE); ?></td>
      </tr>

The tax calculation for the rule is now hard coded in defaultpricelist.php - can you give me the correct PHP code for this line please ?
Hopefully it will be included in the next updates...(BETA/ALPHA) ?
Joomla 3.x | VirtueMart 4.0.12 107771 | HORME3 PRO 1.9.6 / 2.0
VirtueMart 4.2.4 | Joomla 4.4.1 | PHP 8.1 | Vp_neoteric 1.3

lostmail

 :(
Only Cart View is nice now but all other templates have to be modified, too where DBTaxRulesBill is active...
Joomla 3.x | VirtueMart 4.0.12 107771 | HORME3 PRO 1.9.6 / 2.0
VirtueMart 4.2.4 | Joomla 4.4.1 | PHP 8.1 | Vp_neoteric 1.3

Robert_ITMan

lostmail, how do things look when you remove your template overrides? To remove them, simply rename the folder: /templates/your-template/html/com_virtuemart > disable cache > refresh your pages and see how cart, emails, customer login orders look - this is assuming you are using template overrides... if not, start with that otherwise updating VM will overwrite your changes... and is likely your issue here.

Have you added your tax rule to your shipping configuration? If not, edit your Shipping Method(s), click on Configuration tab, select Tax

Looks to me like what you are asking for is normal ... and recent updates to VM have much improved how cart, emails, customer login orders look.

If you still need something specific, share a print screen or mock-up to let me know how you want it to look and I can likely help you with that - I have heavily modified how everything looks for my sites.
WEBSITES @ OURFINGERTIPS
manage > develop > market > repeat

Save a lot of time and money when focused on building a website that works with marketing efforts to get more leads and sales from visitors.

www.ourfingertips.com