anetteogjesper Posted March 7, 2010 Share Posted March 7, 2010 I am trying to install theis module, but I am having trouble: http://addons.oscommerce.com/info/2982 The trouble lies here: includes/modules/product_listing.php ######### LOOK FOR (around line 168) $lc_text = tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id='. $listing['products_id']), 'POST') . '<table cellSpacing="0" cellPadding="0" width="100%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=2 maxlength=2') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle') . '</td></tr></table></form>'; ######### REPLACE WITH: $lc_text = tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id='. $listing['products_id']), 'POST') . '<table cellSpacing="0" cellPadding="0" width="100%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', $listing['products_min_order_qty'], 'size=2 maxlength=3') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle') . '</td></tr></table></form>'; But my code looks like this: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $form = tep_draw_form ('cart_quantity', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_product', 'NONSSL'),'post',''); $buy_now_button = tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_IN_CART); $submit_product_quant = '<input type="text" name="cart_quantity" value="1" maxlength="2" size="2">'; $hidden = tep_draw_hidden_field ('products_id', $listing['products_id'],''); $endform = '</form>'; if (PRICES_LOGGED_IN == 'false') $buy_now_button_d = $buy_now_button; if ( (PRICES_LOGGED_IN == 'true') && (!tep_session_is_registered('customer_id'))) { $buy_now_button_d = '<a href="' . tep_href_link(FILENAME_LOGIN, '','SSL') . '"></a> '; } else { $buy_now_button_d = $hidden . $submit_product_quant . ' '. $buy_now_button; } $lc_text = $form . $buy_now_button_d . $endform; break; Quote Link to comment Share on other sites More sharing options...
anetteogjesper Posted March 9, 2010 Author Share Posted March 9, 2010 PLEASE HELP ME... :'( I am trying to install theis module, but I am having trouble: http://addons.oscommerce.com/info/2982 The trouble lies here: includes/modules/product_listing.php ######### LOOK FOR (around line 168) $lc_text = tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id='. $listing['products_id']), 'POST') . '<table cellSpacing="0" cellPadding="0" width="100%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=2 maxlength=2') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle') . '</td></tr></table></form>'; ######### REPLACE WITH: $lc_text = tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id='. $listing['products_id']), 'POST') . '<table cellSpacing="0" cellPadding="0" width="100%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', $listing['products_min_order_qty'], 'size=2 maxlength=3') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle') . '</td></tr></table></form>'; But my code looks like this: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $form = tep_draw_form ('cart_quantity', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_product', 'NONSSL'),'post',''); $buy_now_button = tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_IN_CART); $submit_product_quant = '<input type="text" name="cart_quantity" value="1" maxlength="2" size="2">'; $hidden = tep_draw_hidden_field ('products_id', $listing['products_id'],''); $endform = '</form>'; if (PRICES_LOGGED_IN == 'false') $buy_now_button_d = $buy_now_button; if ( (PRICES_LOGGED_IN == 'true') && (!tep_session_is_registered('customer_id'))) { $buy_now_button_d = '<a href="' . tep_href_link(FILENAME_LOGIN, '','SSL') . '"></a> '; } else { $buy_now_button_d = $hidden . $submit_product_quant . ' '. $buy_now_button; } $lc_text = $form . $buy_now_button_d . $endform; break; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.