VirtueMart Forum

VirtueMart General => Commercial Jobs => Topic started by: yae on July 19, 2011, 19:58:15 PM

Title: small hack in Featured products module
Post by: yae on July 19, 2011, 19:58:15 PM
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:

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


Title: Re: small hack in Featured products module
Post by: PRO on July 19, 2011, 20:16:53 PM
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;?>

Title: Re: small hack in Featured products module
Post by: yae on July 20, 2011, 12:05:00 PM
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
Title: Re: small hack in Featured products module
Post by: yae on July 21, 2011, 11:27:03 AM
no professional to do this hack? :(
Title: Re: small hack in Featured products module
Post by: deepsingh on July 21, 2011, 13:53:45 PM
I am Virtuemart expert having 5 yrs experience in Joomla. Contact on psnegi75@gmail.com.
Title: Re: small hack in Featured products module
Post by: 911websiterepair on July 21, 2011, 16:47:30 PM
911websiterepair.com      $150.00,   by the 6 hr service