Just an update...
I've pinpointed exactly where the loop of the drop down box is written.. was looking in the wrong place..
It's in ..
\includes\functions\html_output.php
Code being (around line 504);
[FONT="Courier New"] for ($i=0, $n=sizeof($values); $i<$n; $i++) {
$field .= ' <option value="' . zen_output_string($values[$i]['id']) . zen_output_string($values[$i]['qty']) . '"';
if ($default == $values[$i]['id']) {
$field .= ' selected="selected"';
}
$field .= '>' . zen_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>' . "\n";
}
$field .= '</select>' . "\n";[/FONT]
Now, I just need to add the if statement around it. The syntax will be;
[FONT="Courier New"] for ($i=0, $n=sizeof($values); $i<$n; $i++) {
if zen_output_string($values[$i]['QTY'] >= 1 {
$field .= ' <option value="' . zen_output_string($values[$i]['id']) . zen_output_string($values[$i]['qty']) . '"';
}
if ($default == $values[$i]['id']) {
$field .= ' selected="selected"';
}
$field .= '>' . zen_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>' . "\n";
}
$field .= '</select>' . "\n";[/FONT]
but I need to know how to call the stock qty variable for the particular attribute. The code [FONT="Courier New"]zen_output_string($values[$i]['QTY'][/FONT] is a placeholder and is NOT correct.
anyone can help here??
erko
Bookmarks