VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: davidb34ni on March 08, 2012, 15:10:28 PM

Title: short code for discounted price anyone?
Post by: davidb34ni on March 08, 2012, 15:10:28 PM
anyone no what the sorted code for discounted price is in product details i.e i no this is $this->product->product_price ordinary price but what is field called for discounted
Title: Re: short code for discounted price anyone?
Post by: PRO on March 08, 2012, 19:49:06 PM
the price layout now has its own template

productdetails/tmpl/default_showprices.php
There quite a few "discounted prices" depending on your setup.
BUT: these are easy to read an understand

    echo $this->currency->createPriceDiv('variantModification', 'COM_VIRTUEMART_PRODUCT_VARIANT_MOD', $this->product->prices);
    echo $this->currency->createPriceDiv('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices);
    echo $this->currency->createPriceDiv('discountedPriceWithoutTax', 'COM_VIRTUEMART_PRODUCT_DISCOUNTED_PRICE', $this->product->prices);
    echo $this->currency->createPriceDiv('salesPriceWithDiscount', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT', $this->product->prices);
    echo $this->currency->createPriceDiv('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $this->product->prices);
    echo $this->currency->createPriceDiv('priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $this->product->prices);
    echo $this->currency->createPriceDiv('discountAmount', 'COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT', $this->product->prices);
    echo $this->currency->createPriceDiv('taxAmount', 'COM_VIRTUEMART_PRODUCT_TAX_AMOUNT', $this->product->prices);


So, you can try this one
<?php echo $this->currency->createPriceDiv('salesPriceWithDiscount', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT', $this->product->prices);?>
Title: Re: short code for discounted price anyone?
Post by: Krisse on March 22, 2012, 09:43:02 AM
Any idea how I can make it so the discount does not show at all on the Cart? I've not added any discounts to any of my products, their value is 0 (tried to clear the value too, didn't work). I'm using Joomla 2.5 (rocketheme zephyr) and Virtuemart 2.

If someone knows what file to modify and what the correct code for this is I'd appreciate it. Have tried solutions that I've found on this site but they are not working and / or for other versions..