VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: panne003 on November 01, 2018, 20:10:07 PM

Title: No availability images show after update vm3.0.16 to vm3.4.3
Post by: panne003 on November 01, 2018, 20:10:07 PM
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.
Title: Re: No availability images show after update vm3.0.16 to vm3.4.3
Post by: GJC Web Design on November 01, 2018, 20:22:57 PM
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)
Title: Re: No availability images show after update vm3.0.16 to vm3.4.3
Post by: panne003 on November 01, 2018, 20:39:28 PM
Thanks for your info. This solution is not working. I have tried it. Do you have another sollution.
Title: Re: No availability images show after update vm3.0.16 to vm3.4.3
Post by: GJC Web Design on November 01, 2018, 20:43:11 PM
crystal ball says no....

example? the code rendered? the path of the image? the wrong path or just rendered text?  etc etc etc
Title: Re: No availability images show after update vm3.0.16 to vm3.4.3
Post by: panne003 on November 05, 2018, 15:02:16 PM
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.
Title: Re: No availability images show after update vm3.0.16 to vm3.4.3
Post by: GJC Web Design on November 05, 2018, 15:50:05 PM
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
Title: Re: No availability images show after update vm3.0.16 to vm3.4.3
Post by: panne003 on November 16, 2018, 19:49:27 PM
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_datevmText::_('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_datevmText::_('DATE_FORMAT_LC4')); ?>
    </div>
<?php
}
?>
Title: Re: No availability images show after update vm3.0.16 to vm3.4.3
Post by: GJC Web Design on November 16, 2018, 22:57:29 PM
what EXACTLY is being rendered on the page where the images should appear?
Title: Re: No availability images show after update vm3.0.16 to vm3.4.3
Post by: panne003 on April 18, 2019, 20:45:22 PM
The solution was a .htacces standard instal.
Title: Re: No availability images show after update vm3.0.16 to vm3.4.3
Post by: jjk on April 18, 2019, 22:44:16 PM
Perhaps the problem is a simple one. In your first screenshot you have a different file name than in the next screenshots.
Title: Re: No availability images show after update vm3.0.16 to vm3.4.3
Post by: Milbo on May 15, 2019, 19:28:32 PM
I would disable the override of the stockhandle file and yes as Jörg mentioned the names are not the same.
Title: Re: No availability images show after update vm3.0.16 to vm3.4.3
Post by: panne003 on June 17, 2019, 13:48:45 PM
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