Mike_Dean:
I cant find any instance in any file (using the dev toolkit in admin) that contains $qty_output, or $quantity_output ??
I have been playing around with this line in the tpl_product_info_display file
<?php echo (($flag_show_product_info_quantity == 1 and $products_quantity) ? '<li> : ' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
But no luck as yet...
From the code you provided, the variable you are looking to change is
"$products_quantity"
So, somewhere before this piece of code will be a piece that reads (in part)
$products_quantity = ..........
You add your code somewhere between these two pieces.
The final result looking something like:
$products_quantity = .......... (original code)
(added code)
if ($products_quantity == 8888) $products_quantity = 'Back-to-Back';
if ($products_quantity == 7777) $products_quantity = ' 7-10 Days'';
(original code)
<?php echo (($flag_show_product_info_quantity == 1 and $products_quantity) ? '<li> : ' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
caveat: If "$products_quantity" is used later in the file it may cause a problem because you have changed from a numeric to a string (it is 'sloppy' programming, but php does allow it).
Hmmmmm..... perhaps a better idea would be this:
Locate the code that reads////
$products_quantity = ..........
Immediately after this (at a convenient point) , add this new code:
$products_out = $products_quantity ;
if ($products_out == 8888) $products_out = 'Back-to-Back';
if ($products_out == 7777) $products_out = ' 7-10 Days'';
Then change:
<?php echo (($flag_show_product_info_quantity == 1 and $products_quantity) ? '<li> : ' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
So it reads:
<?php echo (($flag_show_product_info_quantity == 1 and $products_quantity) ? '<li> : ' . $products_out . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
That should do it (and is probably closer to what Glenn was thinking with his mockup).
This method doesn't mess with the $products_quantity field either - it just introduces a new variable ($products_out) based on the original $products_quantity variable, modifies the new variable if required, then outputs (via the 'echo' command) the new variable instead of the original.
Cheers
Rod