blr044 Posted July 17, 2010 Posted July 17, 2010 What I am trying to, if it is possible, to display the QTY count on product_listing.php as I have on product_info.php. For example if count is 399, it would be displayed as (100+) or if something like 85, would be displayed as (85). So in other words, if more than 100 , would be 100+ and less the 100, would be actual count. Below is the actual line of code line-329 of includes/modules/product_listing.php: $product_text .= ' <tr><td width="80%" class="contbox">Qty:' . $product_contents['$products_quantity'] . '</td></tr>'; This is the first method I used and all I see is "QTY" not "QTY 399": $product_text .= ' <tr><td width="80%" class="contbox">Qty:' . $product_contents(($products_qty < 100) ? '(' . $products_qty 100> ')' : '(100+)') . '</td></tr>'; Then I tried this: $product_text .= ' <tr><td width="80%" class="contbox">Qty:' . $product_contents[(($products_qty < 100) ? '(' . $products_qty 100> : '(100+)')] . '</td></tr>'; But get this error message: Parse error: syntax error, unexpected T_LNUMBER in /hermes/xxx/xxxxx/xxxxxxxx/xxx/includes/modules/product_listing.php on line 330 If this isn't possible, ok. Appreciate any input into this. Thank you. Bennett
mirko007 Posted July 20, 2010 Posted July 20, 2010 What I am trying to, if it is possible, to display the QTY count on product_listing.php as I have on product_info.php. For example if count is 399, it would be displayed as (100+) or if something like 85, would be displayed as (85). So in other words, if more than 100 , would be 100+ and less the 100, would be actual count. Below is the actual line of code line-329 of includes/modules/product_listing.php: This is the first method I used and all I see is "QTY" not "QTY 399": $product_text .= ' <tr><td width="80%" class="contbox">Qty:' . $product_contents(($products_qty < 100) ? '(' . $products_qty 100> ')' : '(100+)') . '</td></tr>'; Then I tried this: $product_text .= ' <tr><td width="80%" class="contbox">Qty:' . $product_contents[(($products_qty < 100) ? '(' . $products_qty 100> : '(100+)')] . '</td></tr>'; But get this error message: If this isn't possible, ok. Appreciate any input into this. Thank you. Bennett First of all go to admin panel> configuration > product listing and make Display Product Quantity value > 0 to display it on your store
Recommended Posts
Archived
This topic is now archived and is closed to further replies.