Author Topic: small hack in Featured products module  (Read 4032 times)

yae

  • Beginner
  • *
  • Posts: 38
small hack in Featured products module
« 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:
  • 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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10431
  • VirtueMart Version: 3+
Re: small hack in Featured products module
« Reply #1 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;?>


yae

  • Beginner
  • *
  • Posts: 38
Re: small hack in Featured products module
« Reply #2 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
Regards
Yae

:-)

yae

  • Beginner
  • *
  • Posts: 38
Re: small hack in Featured products module
« Reply #3 on: July 21, 2011, 11:27:03 am »
no professional to do this hack? :(
Regards
Yae

:-)

deepsingh

  • Beginner
  • *
  • Posts: 12
Re: small hack in Featured products module
« Reply #4 on: July 21, 2011, 13:53:45 pm »
I am Virtuemart expert having 5 yrs experience in Joomla. Contact on psnegi75@gmail.com.

911websiterepair

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 253
  • We Can Do It!!
    • Virtuemart Programming and Customization Help - C H E A P !!!
  • Skype Name: mjones1256
Re: small hack in Featured products module
« Reply #5 on: July 21, 2011, 16:47:30 pm »
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