Menu Content

Currencies Accepted


Shopping Cart

cart
Your Cart is currently empty.

How to Download A Product

For most of our products, including the free ones, you will need to go through checkout and place an order.

Read More

 

Find Us Elsewhere

Follow us on Twitter

Spiral Scripts on Facebook

rapidssl_ssl_certificate
2Checkout.com is a worldwide leader in payment services

Google ads

Home » Forum

Welcome, Guest

Show Discount Amount off RRP in feed
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Show Discount Amount off RRP in feed

Show Discount Amount off RRP in feed 6 months, 3 weeks ago #311

Hi, I'm trying to display the discount amount in the feed, rather then showing the total discounted price. I think I've found where the discount is calculated but I'm not sure how I should change this to just show the discount amount. Can anyone help?

 
if( $discount_info["has_discount"]) {
$undiscounted_price = $base_price;
switch( $discount_info["is_percent"] ) {
case 0:
// If we subtract discounts BEFORE tax
if( $this->params->get('discount_before_tax','yes') == 'yes' ) {
// and if our prices are shown with tax
if( $include_tax == 'yes') {
// then we add tax to the (untaxed) discount
$discount_info['amount'] += ($my_taxrate*$discount_info['amount']);
}
// but if our prices are shown without tax
// we just leave the (untaxed) discount amount as it is
 
}
// But, if we subtract discounts AFTER tax
// and if our prices are shown with tax
// we just leave the (untaxed) discount amount as it is
// but if prices are shown without tax
// we just leave the (untaxed) discount amount as it is
// even though this is not really a good combination of settings
 
$base_price -= $discount_info["amount"];
break;
case 1:
$base_price *= (100 - $discount_info["amount"])/100;
break;
}
}

Re: Show Discount Amount off RRP in feed 6 months, 3 weeks ago #312

I believe the following should do it - it will return the amound of the discount rather than the discounted price.

							$base_price = $discount_info["amount"];
break;
case 1:
$base_price *= $discount_info["amount"]/100;
break;
 
  • Page:
  • 1
Time to create page: 0.46 seconds
 
 

VirtueMart Featured Products Grid

Switch View

This module displays a short excerpt from articles in a selected category or section, or from a specified list of articles, with link and optional thumbnail image.

£14.00


This module can be used as a replacement for the Virtuemart featured products, top products, random products or recent products modules. It displays product images as a 3 Dimensional Flash slideshow.

£15.00


A Flash puzzle game for the Joomla! content management system. This would be suitable for a site aimed at children.

£12.00


This module displays a short excerpt from articles in a selected category or section, or from a specified list of articles, with link and optional thumbnail image.

£12.00