VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: Mecmiklo on August 11, 2013, 23:50:32 PM

Title: Want article price in cart including tax
Post by: Mecmiklo on August 11, 2013, 23:50:32 PM
Hi,

I have a clean install of joomla 2.5.14 with vm 2.0.22 plus vm sampla data.
I am using the atomic template.

I have problems with getting the cart to show the article price with tax.
When in cart template (default_pricelist.php) i cant get the price (i think its 'COM_VIRTUEMART_CART_PRICE)  to show including the tax.

The total price is ok (with tax)

Example:

Name                   price        amount           total
handshovell        11.21          1                 13.56
handshovell        11.21          2                 27.12

But what i want is:

Name                   price        amount           total
handshovell        13.56          1                 13.56
handshovell        13.56          2                 27.12

Ive tried all different combinations in price configuration, didnt work.
There are no shopper group overrides.
i didnt change anything in the tax rules.

How can i get this to work?




[attachment cleanup by admin]
Title: Re: Want article price in cart including tax
Post by: Maxim Pishnyak on August 12, 2013, 14:11:47 PM
Did you hide tax columns? I think you could simply use commands that show tax on cart page to your benefit. Something like: price+tax.
Title: Re: Want article price in cart including tax
Post by: Mecmiklo on August 12, 2013, 15:31:20 PM
I think i need to make an override for the default_pricelist.php.
The price i need (salesprice with tax) is shown in the productdetails page of the website. Isnt it possible to take the variable that holds the salesprice there and use it in an override for default_pricelist.php?
And if so, which variable would that be?
Title: Re: Want article price in cart including tax
Post by: WebStuff on August 12, 2013, 18:42:07 PM
echo $this->currencyDisplay->createPriceDiv ('salesPrice', '', $this->cart->pricesUnformatted[$pkey], FALSE, FALSE, $prow->quantity);

If you want basePriceWithTax
Change echo $this->currencyDisplay->createPriceDiv ('basePriceVariant', '', $this->cart->pricesUnformatted[$pkey], FALSE);

to:
echo $this->currencyDisplay->createPriceDiv ('basePriceWithTax', '', $this->cart->pricesUnformatted[$pkey], FALSE);


Hope this helps.
Title: Re: Want article price in cart including tax
Post by: Mecmiklo on August 12, 2013, 22:48:48 PM
Yes :D
This is what i mean.

I choose to change echo $this->currencyDisplay->createPriceDiv ('basePriceVariant', '', $this->cart->pricesUnformatted[$pkey], FALSE);

into
echo $this->currencyDisplay->createPriceDiv ('salesPrice', '', $this->cart->pricesUnformatted[$pkey], FALSE);

instead of echo $this->currencyDisplay->createPriceDiv ('basePriceWithTax', '', $this->cart->pricesUnformatted[$pkey], FALSE);


Because the salesprice is always the price the customers have to pay. A discount would not be displayed with 'basepriceWithTax'.

Thnx for the help :)
Title: Re: Want article price in cart including tax
Post by: WebStuff on August 13, 2013, 15:55:50 PM
You're welcome.  :)