VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: cherokee on December 21, 2016, 09:58:06 AM

Title: Availibility condition, stock and manufacturer?
Post by: cherokee on December 21, 2016, 09:58:06 AM
Good morning
Sorry for my English (Google)
Is there a way to show the availability of a product depending on the stock and the manufacturer?
Example:
Stock <1 and manufacturer XXXX = image 1
Stock <1 and manufacturer YYYYY = image 2
Thank you
VirtueMart 3.0.16
Title: Re: Availibility condition, stock and manufacturer?
Post by: GJC Web Design on December 21, 2016, 21:59:22 PM
you would need to code this logic at the template level

IMHO all the info is there -- just depends on your code
Title: Re: Availibility condition, stock and manufacturer?
Post by: cherokee on December 22, 2016, 11:51:02 AM
Thank you.
Yes, using php language. I have no knowledge.
I know how to make the call of the stock, but it's not how to include the manufacturer.
a greeting
Title: Re: Availibility condition, stock and manufacturer?
Post by: cherokee on December 29, 2016, 12:06:55 PM
Hello.
I am unable.
Any idea to call a specific manufacturer?
Thank you.
a greeting
<?php
if (($product->product_in_stock $product->product_ordered) < 1) { 
     if (
$product->virtuemart_manufacturer_id=xx)  {
    
?>

   

    <div class="availability">
        <img src="IMAGE1.png" />
    </div>



<?php 
}
}
?>