Hi,
Currently, not possible. Thanks for addressing this issue.
This is one of the biggest missing part in all of our templates, and it is a critical one. We need to find a way to solve it. We didn't use the original VM cores for showing the availability icons, but instead we have used our own coding scheme to show those icons. (because VM core was coded to use GIF, but we needed to use PNG to increase the icon quality, because no matter what you do, you can't reach the PNG quality with GIF)
After we come up with a solution, we should better publish a tutorial about it though. Because again, we will have our own way.
But for now, you can use the Virtuemart Core functions to show the availability icons though, those will have multi-language support. To eliminate our template's code and get back to official Virtuemart scheme; open this PHP file:
/templates/flexible_lightmart/html/com_virtuemart/productdetails/default.php
and look for these lines and highlight them:
<?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=='none') {
$GifToPNG = substr($this->product->product_availability, 0, -3);
?>
<div class="availability">
<img src="<?php echo JURI::root().'templates/'.$template.'/html/com_virtuemart/assets/images/availability/'.$GifToPNG; ?>png" class="FlexibleavailabilityIMG" alt="" />
</div>
<?php }
if($stockhandle=='risetime' and ($this->product->product_in_stock - $this->product->product_ordered)<1){
$GifToPNG = substr(VmConfig::get('rised_availability'), 0, -3);
?>
<div class="availability">
<img src="<?php echo JURI::root().'templates/'.$template.'/html/com_virtuemart/assets/images/availability/'.$GifToPNG; ?>png" class="FlexibleavailabilityIMG" alt="" />
</div>
<?php }
if($stockhandle=='disableadd' and ($this->product->product_in_stock - $this->product->product_ordered)>=1){
$GifToPNG = substr($this->product->product_availability, 0, -3);
?>
<div class="availability">
<img src="<?php echo JURI::root().'templates/'.$template.'/html/com_virtuemart/assets/images/availability/'.$GifToPNG; ?>png" class="FlexibleavailabilityIMG" alt="" />
</div>
<?php }
if($stockhandle=='risetime' and ($this->product->product_in_stock - $this->product->product_ordered)>=1){
$GifToPNG = substr($this->product->product_availability, 0, -3);
?>
<div class="availability">
<img src="<?php echo JURI::root().'templates/'.$template.'/html/com_virtuemart/assets/images/availability/'.$GifToPNG; ?>png" class="FlexibleavailabilityIMG" alt="" />
</div>
<?php }
}
?>
replace them all with these below:
<?php
// Availability
$stockhandle = VmConfig::get('stockhandle', 'none');
$product_available_date = substr($this->product->product_available_date,0,10);
$current_date = date("Y-m-d");
if (($this->product->product_in_stock - $this->product->product_ordered) > 1) {
if ($product_available_date != '0000-00-00' and $current_date < $product_available_date) {
?> <div class="availability">
<?php echo JText::_('COM_VIRTUEMART_PRODUCT_AVAILABLE_DATE') .': '. JHTML::_('date', $this->product->product_available_date, JText::_('DATE_FORMAT_LC4')); ?>
</div>
<?php
} else if ($stockhandle == 'risetime' and VmConfig::get('rised_availability') and empty($this->product->product_availability)) {
?> <div class="availability">
<?php echo (file_exists(JPATH_BASE . DS . VmConfig::get('assets_general_path') . 'images/availability/' . VmConfig::get('rised_availability'))) ? 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' => 'availabilityImage')) : JText::_(VmConfig::get('rised_availability')); ?>
</div>
<?php
} else if (!empty($this->product->product_availability)) {
?>
<div class="availability">
<?php echo (file_exists(JPATH_BASE . DS . VmConfig::get('assets_general_path') . 'images/availability/' . $this->product->product_availability)) ? JHTML::image(JURI::root() . VmConfig::get('assets_general_path') . 'images/availability/' . $this->product->product_availability, $this->product->product_availability, array('class' => 'availabilityImage')) : JText::_($this->product->product_availability); ?>
</div>
<?php
}
}
else if ($product_available_date != '0000-00-00' and $current_date < $product_available_date) {
?> <div class="availability">
<?php echo JText::_('COM_VIRTUEMART_PRODUCT_AVAILABLE_DATE') .': '. JHTML::_('date', $this->product->product_available_date, JText::_('DATE_FORMAT_LC4')); ?>
</div>
<?php
}
?>
With these change, you will start showing icons in this path;
/components/com_virtuemart/assets/images/availability/
But be aware, you will start using the GIF-format icons, not PNG.
Regards.
Support & Development