VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: idor on May 02, 2020, 18:32:48 PM

Title: Baseprice with Tax, but without discounts in Cart table
Post by: idor on May 02, 2020, 18:32:48 PM
Hi,
In cart page, no matter if I check Baseprice with Tax, but without discounts, in the cart page, doesn´t appear in price/unit column.
The price shown is the final pice with disount and in seperate column the discount, which is confusing, because the user asumes there is a discount on the already discounted price..
I need to show the Sales Price with tax but without discounts* in the Price/unit column and the discount in the separate column as is.

*(it is the same with Baseprice with Tax, but without discounts, right?)

(All prices I need to include tax)
Title: Re: Baseprice with Tax, but without discounts in Cart table
Post by: GJC Web Design on May 02, 2020, 21:56:43 PM
VP templates have their own settings in the TEMPLATE for price display.. maybe that has something to do with it

what cart are u using?

Title: Re: Baseprice with Tax, but without discounts in Cart table
Post by: idor on May 03, 2020, 01:19:43 AM
Finally I had to modify html/com_virtuemart/cart/default_pricelist.php

around line 237 I replaced this
<?php if(VmConfig::get('checkout_show_origprice', 1) && $prow->prices['discountedPriceWithoutTax'] != $prow->prices['priceWithoutTax'])

with this

<?php if(VmConfig::get('checkout_show_origprice', 1) && $prow->prices['basePriceWithTax'] != $prow->prices['priceWithoutTax'])


And also around line 241 I replaced this

                  if($prow->prices['discountedPriceWithoutTax'])   
                     {   
                        echo $this->currencyDisplay->createPriceDiv('discountedPriceWithoutTax', '', $prow->prices, false, false);


with this


                  if($prow->prices['basePriceWithTax'])
                     {
                        echo $this->currencyDisplay->createPriceDiv('basePriceWithTax', '', $prow->prices, false, false);


I don´t know if this is the solution. I also contacted to the template support and waiting for their solution.

Thank you!
Title: Re: Baseprice with Tax, but without discounts in Cart table
Post by: idor on May 03, 2020, 10:32:05 AM
The cart is OK now, but the problem I have is in the order (website & email received).
Which is the file I have to change in order to show basepriceWithTax, instead of product_discountedPriceWithoutTax?
Title: Re: Baseprice with Tax, but without discounts in Cart table
Post by: idor on May 03, 2020, 23:28:55 PM
Hi GJC,
thank you for your reply,
Quote from: GJC Web Design on May 02, 2020, 21:56:43 PM
VP templates have their own settings in the TEMPLATE for price display.. maybe that has something to do with it

what cart are u using?

I had Final Sales Price selected. Now I changed it to "Base Price with tax but without discount" which would be OK for me because I am using a separate column for the discount.
No matter what, I always get the price without tax, in the order website & email.

I don´t understand to which price the VP setting is reffering. What I need to change is the column price/unit in order to include tax.