Implementing the following code into my /modules/custom_template/attributes.php
Code:
if ($products_options->fields['quantity'] > 0) {
$products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
'text' => $products_options->fields['products_options_values_name'] .' [ '. TEXT_ATTRIBUTES_IN_STOCK . ' ]');
} else {
$products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
'text' => $products_options->fields['products_options_values_name'] .' [ '. TEXT_ATTRIBUTES_NOT_IN_STOCK . ' ]');
}
Will generate my custom TEXT_ATTRIBUTES_NOT_IN_STOCK message on ALL attributes so I guess I'm halfway there but since it's ignoring the if telling it to use the TEXT_ATTRIBUTES_IN_STOCK message I'm totally lost.
The in/out of stock messages of course changes if editing the "['quantity'] > 0)" part.
Anyone who understands why this happens?
Bookmarks