The availability is not showing on product page

Fashion and clothing responsive Joomla ecommerce template with full VirtueMart support and advanced store features.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Aug 26, 2014 7:58 am
Reply with quote
Report this post
Good morning
The availability image is not showing on products pages. Can you help with that?
My url is:
http://stratos-shop.gr/store/%CF%80%CF% ... 00w-detail
User avatar
Fresh Boarder

GK User
Tue Aug 26, 2014 8:58 am
Reply with quote
Report this post
SOLVED!!!
I have chosen the "Products Out of Stock are orderable, and the field 'Availability' below is displayed"

I face the same problem and i cannot fixed it, although i tried what you have said at the previous posts

First code from /components/com_virtuemart/views/productdetails/tmpl/default.php

Code: [Select]

<?php
// Availability Image
$stockhandle = VmConfig::get('stockhandle', 'none');
if (($this->product->product_in_stock - $this->product->product_ordered) < 1) {
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' => 'availability')) : 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' => 'availability')) : $this->product->product_availability; ?>
</div>
<?php
}
}
?>



Second code from /templates/theme310/html/com_virtuemart/productdetails/default.php

Code: [Select]

<?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
}
}
?>


If i copy/paste/overwrite the first code at the second one, then with some changes at < 1, > 1, > 0 and the number at the product status 0 or 100, then the 24h.gif it appears, but the whole product layout is being "damaged"

If i change at the second code the < 1, > 1, > 0 and the number at the product status 0 or 100, then no *.gif appears ever, and have no changes at the product layout.
User avatar
Fresh Boarder

teitbite
Wed Aug 27, 2014 8:54 pm
Reply with quote
Report this post
Hi

Thank You for shearing the solution with us.
User avatar
Moderator


cron