News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Different discount for each product

Started by Joseph111, March 05, 2013, 08:45:27 AM

Previous topic - Next topic

Joseph111

I want to set a different discount for each product;
in this regard in the product sheet, I used the resale price - no calculation rule

in the  Browse page page(Components\com_virtuemart\views\category\templ\default.php)  I have inserted the code:

if ($this->product->prices['discountAmount'] > 0){
      echo "<span class='PricebasePriceWithTax'>".$this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $product->prices)."</span>";
         echo $this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);
               }else
               
               {
                  echo $this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);
                  }



but it does not work the first part of the IF statement

the condition : if ($this->product->prices['discountAmount'] > 0)   does not work


virtuemart always shows two prices stroke one and the other normal even when there is no discount!!


Joseph111


Milbo

Why do you not use teh override price option, which is exactly for that
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/