Hi, i`m new in joomla virtuemart. I use joomla 3.4.1 and VM 3.0.6.2
Please help me with the mail order confirm. I want to add in stock field in the order template mail. I try to add <div class="is-in-stock" > In Stock : <?php echo $this->product->product_in_stock - $this->product->product_ordered ?></div> but nothing :(
QuoteHi, i`m new in joomla virtuemart. I use joomla 3.4.1 and VM 3.0.6.2
why then use wildly out of date versions?
if u mean in an over ride to components\com_virtuemart\views\invoice\tmpl\mail_html_pricelist.php
there is no $this->product
you would probably need to do it in the loop and get the product details with
$model = VmModel::getModel('product');
$product = $model->getProductSingle($item->virtuemart_product_id,false);
and get the stock details there
No Joomla version before 3.9.10 is secure for use on a live website.
VirtueMart 3 versions before 3.2.14 are insecure and cannot be recommended for use on live sites.
Quote from: GJC Web Design on August 24, 2019, 10:10:21 AM
QuoteHi, i`m new in joomla virtuemart. I use joomla 3.4.1 and VM 3.0.6.2
why then use wildly out of date versions?
if u mean in an over ride to components\com_virtuemart\views\invoice\tmpl\mail_html_pricelist.php
there is no $this->product
you would probably need to do it in the loop and get the product details with
$model = VmModel::getModel('product');
$product = $model->getProductSingle($item->virtuemart_product_id,false);
and get the stock details there
Okay, can i use this in mail_html_vendor.php ?
I want to show in my email InStock quantity
mail_html_pricelist.php
in the loop
okay, if i understand right, first i need to do loop and get the product details in mail_html_pricelist.php with
$model = VmModel::getModel('product');
$product = $model->getProductSingle($item->virtuemart_product_id,false);
and than how to show it in email order confirm in this file mail_html_vendor.php
there is already the loop in mail_html_pricelist.php getting $item
you then find the stock there