yakbuttertea Posted February 27, 2009 Share Posted February 27, 2009 Hi, After few hours of trying things around, I haven't found the syntax error... :( So, I repost this in case, my chances of answers might change... it would be fantastic... -----------------------------------------------------------------------Earlier post... I found this great contrib on adding a dropdown quantity box on the product info page. It works great! But, I tried to implement the code on the product_listing.php page after case 'PRODUCT_LIST_BUY_NOW': in $lc_text = ' I added: <?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo TEXT_PRODUCT_QUANTITY; ?></td> <td class="main"> <?php if ($product_info['products_quantity'] - $product_info['products_ordered'] == 0) { echo TEXT_PRODUCT_STOCK; if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available']));} } else { echo "<select size=\"1\" name=\"quantity\">"; for ($i=1; $i <= $product_info['products_quantity'] - $product_info['products_ordered']; $i++) { echo "<option>".$i."</option>"; } echo "</select>"; } ?> </td> </tr> </table> that's from [url="http://addons.oscommerce.com/info/5202"]http://addons.oscommerce.com/info/5202[/url] before <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a> '; that's the modified code from the original products_listing.php that's the modified code from the original products_listing.php Unfortunately, I have an error message stating: syntax error, unexpected T_STRING in /homepages/1/d186637377/htdocs/catalog/includes/modules/product_listing.php on line 157 (line with <?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?>) Any help would be appreciated. I'm trying to learn php SQL and OsCommerce put it's a whole new science... Thanks, Fred Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.