In post 188 from http://www.zen-cart.com/forum/showth...=25987&page=19 is explained how to add stock quantities to attributes on the stock info page. I just want to have the text 'in stock' or 'out of stock' next to it.
Can somebody explain me how to implement this code:
Code:
if ($products_options->fields['quantity']) > 0) {
$products_options_details = $products_options->fields['products_options_values_name'] . ' [' . TEXT_ATTRIBUTES_IN_STOCK . ']';
} else {
$products_options_details = $products_options->fields['products_options_values_name'] . ' [' . TEXT_ATTRIBUTES_NOT_IN_STOCK . ']';
}
with this code for drop down menus
Code:
$products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
'text' => $products_options->fields['products_options_values_name'] .' [' . $products_options->fields['quantity'] . ' '. TEXT_ATTRIBUTES_PIECES . ']');
I just need an if command to have either
TEXT_ATTRIBUTES_IN_STOCK or TEXT_ATTRIBUTES_NOT_IN_STOCK when not in stock.
Thanks
Bookmarks