Hello,
After update virtumart 3.0.16 to virtuemart 3.4.3 the availability images are not showing on the productdetails page. The availability images are on the server components/com_virtuemart/assets/images/availability/
It wil only show the text. On the backend (configuration/shop) also in the frontend productdetails.
What can i do to fix it?
I use joomla 3.9 with virtuemart 3.4.3
I updatet on a staging server, not on my live webshop.
the images are handled in components\com_virtuemart\sublayouts\stockhandle.php
test with that file from 3.4.2 ( I think there were some changes in 3.4.3) or earlier
standard template? (but shouldn't matter)
Thanks for your info. This solution is not working. I have tried it. Do you have another sollution.
crystal ball says no....
example? the code rendered? the path of the image? the wrong path or just rendered text? etc etc etc
I have made screenshots. I have used the standaard vm 3.4.3 and the availability are in the /components/com_virtuemart/assets/images/availability/
There is nothing changed in the php's.
you need to find what that array is .. it seems to coming back not as an image path but an array
check thru the file components\com_virtuemart\sublayouts\stockhandle.php or your over ride of that if u have one to see what is being returned for $product->product_availability
I have looked in the stockhandle.php but i am not sure.This is the stockhandle.php<?php
$product = $viewData['product'];
// Availability
$stockhandle = VmConfig::get('stockhandle', 'none');
$product_available_date = substr($product->product_available_date,0,10);
$current_date = date("Y-m-d");
if (($product->product_in_stock - $product->product_ordered) < 1) {
if ($product_available_date != '0000-00-00' and $current_date < $product_available_date) {
?> <div class="availability">
<?php echo vmText::_('COM_VIRTUEMART_PRODUCT_AVAILABLE_DATE') .': '. JHtml::_('date', $product->product_available_date, vmText::_('DATE_FORMAT_LC4')); ?>
</div>
<?php
} else if ($stockhandle == 'risetime' and VmConfig::get('rised_availability') and empty($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' => 'availability')) : vmText::_(VmConfig::get('rised_availability')); ?>
</div>
<?php
} else if (!empty($product->product_availability)) {
?>
<div class="availability">
<?php echo (file_exists(JPATH_BASE . DS . VmConfig::get('assets_general_path') . 'images/availability/' . $product->product_availability)) ? JHtml::image(JURI::root() . VmConfig::get('assets_general_path') . 'images/availability/' . $product->product_availability, $product->product_availability, array('class' => 'availability')) : vmText::_($product->product_availability); ?>
</div>
<?php
}
}
else if ($product_available_date != '0000-00-00' and $current_date < $product_available_date) {
?> <div class="availability">
<?php echo vmText::_('COM_VIRTUEMART_PRODUCT_AVAILABLE_DATE') .': '. JHtml::_('date', $product->product_available_date, vmText::_('DATE_FORMAT_LC4')); ?>
</div>
<?php
}
?>
what EXACTLY is being rendered on the page where the images should appear?
The solution was a .htacces standard instal.
Perhaps the problem is a simple one. In your first screenshot you have a different file name than in the next screenshots.
I would disable the override of the stockhandle file and yes as Jörg mentioned the names are not the same.
The problem is solved. It was the .htaccess. I had a clean .htaccess put on my site and there are the availabilty images.
Thanks for your support