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

TOPIC: [SOLVED] Stock in product details

[SOLVED] Stock in product details 11 years 6 months ago #289

How i can insert the stock image in the product detail tab.

i copied the following code in the template but the stock does not appear.

<br/>
<?php // Stock info START
if (!VmConfig::get('use_as_catalog') and !(VmConfig::get('stockhandle','none')=='none') && (VmConfig::get ( 'display_stock', 1 )) ){?>
<!--if (!VmConfig::get('use_as_catalog') and !(VmConfig::get('stockhandle','none')=='none')){?> -->
<div class="paddingtop8">
<span class="stock-level" style="display:block; text-align:left;"><?php echo JText::_('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP') ?></span>
<span class="vmicon vm2-<?php echo $product->stock->stock_level ?>" title="<?php echo $product->stock->stock_tip ?>"></span>
</div>
<?php } // Stock info END?>
Last Edit: 11 years 6 months ago by Support.
The topic has been locked.

Stock in product details 11 years 6 months ago #298

Hi,

This PHP lines are for Category Browse page.For product details page, use this:
<br/>
<?php // Stock info START
if (!VmConfig::get('use_as_catalog') and !(VmConfig::get('stockhandle','none')=='none') && (VmConfig::get ( 'display_stock', 1 )) ){?>
<!--if (!VmConfig::get('use_as_catalog') and !(VmConfig::get('stockhandle','none')=='none')){?> -->
<div class="paddingtop8">
<span class="stock-level" style="display:block; text-align:left;"><?php echo JText::_('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP') ?></span>
<span class="vmicon vm2-<?php echo $this->product->stock->stock_level ?>" title="<?php echo $this->product->stock->stock_tip ?>"></span>
</div>
<?php } // Stock info END?>

Keep this in mind:
$this->product->stock->stock_level = when use it in product details page.
$product->stock->stock_level = when use it in category browse page.

Then make sure to enable the "Display stock level" option in the VM Configuration:

ScreenShot2012-09-17at12.17.11PM.png
The topic has been locked.

Stock in product details 11 years 6 months ago #315

I inserted this in the details tab

[code type=php-brief] <?php } // Stock info END?>
<br/>
<?php // Stock info START
if (!VmConfig::get('use_as_catalog') and !(VmConfig::get('stockhandle','none')=='none') && (VmConfig::get ( 'display_stock', 1 )) ){?>
<!--if (!VmConfig::get('use_as_catalog') and !(VmConfig::get('stockhandle','none')=='none')){?> -->
<div class="paddingtop8">
<span class="stock-level" style="display:block; text-align:left;"><?php echo JText::_('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP') ?></span>
<span class="vmicon vm2-<?php echo $this->product->stock->stock_level ?>" title="<?php echo $this->product->stock->stock_tip ?>"></span>
</div>
<?php } // Stock info END?>[/code]

but the stock image is not displayed.

The current stock level text if seen.

VER FICHA
The topic has been locked.

Stock in product details 11 years 6 months ago #337

As i said in the previous post, provide me your FTP and joomla admin account to This email address is being protected from spambots. You need JavaScript enabled to view it.
I will take a look at it too. Please also tell me again; what exactly are you looking for in terms of stock number. And where do you want it. I will do it for you.
The topic has been locked.
Time to create page: 0.097 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