Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Responsive Joomla Virtuemart Template - LightMart (SKU# FLEX-00012)

TOPIC: Image of availability when no stock

Image of availability when no stock 10 years 1 month ago #8947

Is there a way to put an image on the product details when a product is not stock?

In the same place are pictures of availability
The topic has been locked.

Image of availability when no stock 10 years 1 month ago #8960

Hi,

By default; If the product is "out of stock". The "Add to Cart" button will become "Notify" button. And no further action will happen in the product details page.

Custom coding is required to show "out of stock" icon/graphic in the product details page.
Normally, we don't provide free support for custom codings, but this is one is easy. So here it is:

open this PHP file:
/templates/flexible_lightmart/html/com_virtuemart/html/productdetails/default.php

And where ever you want to show the out of stock icon/graphic, include these lines:
<?php if (($this->product->product_in_stock - $this->product->product_ordered) < 1) { ?>
 
<img src="out_of_stock.png" /> 
 
<?php } ?>

(customize the <img> tag as you wish. It is an ordinary HTML)

Regards,
Support
Last Edit: 10 years 1 month ago by Support.
The topic has been locked.

Image of availability when no stock 10 years 1 month ago #8969

Attachment flexibleweb6.png not found


I want to put here,

I would greatly appreciate that explain how to do it, I've tried but I can not
Last Edit: 10 years 1 month ago by Miguel Manuel Rodriguez Roldan.
The topic has been locked.

Image of availability when no stock 10 years 1 month ago #8983

Hi,

Open this PHP file:
/templates/flexible_lightmart/html/com_virtuemart/productdetails/default.php

Find these 2 lines (around 587th):
<?php
		// Availability

and replace those lines with this:
<?php
		// Availability
 
if (($this->product->product_in_stock - $this->product->product_ordered) < 1) { ?>
    <div class="availability"> 
        <img src="out_of_stock.png" /> 
    </div> 
<?php }
The topic has been locked.

Image of availability when no stock 10 years 1 month ago #8986

Solved

many thanks
The topic has been locked.

Image of availability when no stock 10 years 1 month ago #8987

Sure, your welcome..

If you like LightMart and satisfied with the support you have received, please "write a review" on:
www.flexiblewebdesign.com/Joomla-Virtuemart-Templates/LightMart

Rate LightMart and write a couple of sentences to share your experience with the support team. It won't take more than 2 minutes from you but it is extremely important for us. Thanks in advance!


Regards,
Support
The topic has been locked.
Time to create page: 0.173 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo