VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: tsimpouri on November 08, 2018, 12:23:59 PM

Title: Base price without tax in discounted prices?
Post by: tsimpouri on November 08, 2018, 12:23:59 PM
Hello i want to ask something i have a wholesale site.
The prices in product catalog is without tax and the customer can see the tax in the cart.
The tax method is tax per product.
When i have a discount with override price to be taxed in some products, the price with the line through is the Base price with tax.
Is there anyway to get there the Base price without tax?

joomla 3.9.0
Virtuemart 3.4.2

Thanks
Title: Re: Base price without tax in discounted prices?
Post by: jenkinhill on November 08, 2018, 15:10:40 PM
SElect the proces you wish to display in VM Configuration/Prices  and ensure that you template will display those prices - if using a commercial template or overrides you may need to edit the sublayout at templates/[your Joomla template]/html/com_virtuemart/sublayouts/prices.php
Title: Re: Base price without tax in discounted prices?
Post by: tsimpouri on November 09, 2018, 09:22:22 AM
Hello the template is showing all the prices. But the with the line through is the Base price with tax.
The same is happening with  beez3 template.
The problem is that i dont get  Base price without tax in overrided price

The code on price.php for discounted price is the following


         <?php if(!empty($discount) && $priceType != 'basePriceWithTax' && $priceType != 'salesPriceWithDiscount') : ?>
            <?php if(VmConfig::get('basePriceWithTax', 0) && !empty($product->prices['basePriceWithTax']) && round($product->prices['basePriceWithTax'], $currency->_priceConfig['salesPrice'][1]) != $product->prices['salesPrice']) : ?>
               <div class="product-price-before-discount">
                  <?php echo $currency->createPriceDiv ('basePriceWithTax', '', $product->prices) ?>
               </div>
            <?php elseif(VmConfig::get('salesPriceWithDiscount', 0) && !empty($product->prices['salesPriceWithDiscount']) && round($product->prices['salesPriceWithDiscount'], $currency->_priceConfig['salesPrice'][1]) != $product->prices['salesPrice']) : ?>
               <div class="product-price-before-discount">
                  <?php echo $currency->createPriceDiv ('salesPriceWithDiscount', '', $product->prices) ?>
               </div>
            <?php endif; ?>
         <?php elseif(!empty($discount) && $priceType == 'basePriceWithTax' && VmConfig::get('salesPriceWithDiscount', 0) && !empty($product->prices['salesPriceWithDiscount']) && round($product->prices['salesPriceWithDiscount'], $currency->_priceConfig['salesPrice'][1]) != $product->prices['salesPrice']) : ?>
            <div class="product-price-before-discount">
               <?php echo $currency->createPriceDiv ('salesPriceWithDiscount', '', $product->prices) ?>
            </div>
         <?php endif; ?>


Thanks
Title: Re: Base price without tax in discounted prices?
Post by: tsimpouri on November 13, 2018, 09:14:21 AM
I think that is must be a solution for this can anyone help me?

Thanks
Title: Re: Base price without tax in discounted prices?
Post by: GJC Web Design on November 13, 2018, 10:55:42 AM
see jenks very clever zero tax tip here:  http://forum.virtuemart.net/index.php?topic=141447.msg498288#msg498288