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

small hack in Featured products module

Started by yae, July 19, 2011, 19:58:15 PM

Previous topic - Next topic

yae

Hi:

I am using "featured_products" (default module VM 1.1.9) to display special offers. When a product has discount I check it as "featured". This module is displayed in "Home" page. But i need too:


  • to display price before to discount and price after discount
  • to display small badge icon / image with discount text on image product

similar to this: http://www.virtuemart-extensions.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=15&category_id=1&option=com_virtuemart&Itemid=3
but this extension not runs in "featured products" module


Regards
Yae

:-)

PRO

featured products uses

productSnapshop.tpl.php to display the products.
That file ALSO, does random products, and related products.

You could open that file, and add this
$special = ps_product::get_field( $product_id, 'product_special');
UNDER THIS
$quantity_in_stock = ps_product::get_field( $product_id, 'product_in_stock');

THEN, use this in the file where you want the badge.
<?php if( $special ) : ?>
<div style="STYLE HERE">
HTML FOR BADGE HERE
</div>
<?php endif;?>


yae

but I need to display price before to apply discount too. But "$featured_products" not return price before to discount. How I can add it?

file: featuredproducts.tpl
Regards
Yae

:-)

yae

Regards
Yae

:-)

deepsingh

I am Virtuemart expert having 5 yrs experience in Joomla. Contact on psnegi75@gmail.com.

911websiterepair

911websiterepair.com      $150.00,   by the 6 hr service
joomla components, modules and extensions @ http://www.madeforjoomla.com
joomla development, customizations and repair speshitpillts, http://www.911websiterepair.com

Virtuemart 2.0 PayPalPro Module
Virtuemart 2.0 Fedex Shipping Module
Virtuemart 2.0 Express Order Module
Virtuemart 2.0 Authorize.net SIM payment module
http://www.virtuemartmailordermanager.com