News:

Support the VirtueMart project and become a member

Main Menu

Display availability image in product view

Started by idemsisvoje, January 07, 2012, 02:55:44 AM

Previous topic - Next topic

idemsisvoje

Hey, anyone knows how to display availability image in the product view?
I guess the following part of default.php located in components\com_virtuemart\views\productdetails\tmpl\ handles the availability thing, but I am not able to handle it.
Could you please point me to the right direction here?
Thanks.

<?php // Availability Image
/* TO DO add width and height to the image */
if (!empty($this->product->product_availability)) {
$stockhandle VmConfig::get('stockhandle','none');
if($stockhandle=='risetime' and ($this->product->product_in_stock $this->product->product_ordered)<1){
?>
<div class="availability">
<?php echo JHTML::image(JURI::root().VmConfig::get('assets_general_path').'images/availability/'.VmConfig::get('rised_availability','7d.gif'), VmConfig::get('rised_availability','7d.gif'), array('class' => 'availability')); ?>
</div>
<?php } else {
?>

<div class="availability">
<?php echo JHTML::image(JURI::root().VmConfig::get('assets_general_path').'images/availability/'.$this->product->product_availability$this->product->product_availability, array('class' => 'availability')); ?>
</div>
<?php }
}



PRO

difference in product page and category page is

$this->    on the product page means the product
$this-> on the category page means the category

if you notice in the code , I think category page uses

$produuct->     when talking about the product, so try that