Madinson Posted December 10, 2004 Posted December 10, 2004 I need a little help: If I get the productlisting of the index.php there is the buy now- Button at the right site of each product which is listed. I want the "Buy now"-Button to get the linktarget to the checkout_shipping.php instead of the site shopping_cart.php. I want the user to choose JUST ONE product (to add just one product to the bascet) and redirect him directly to the Checkout shipping page. But I don't know which file generates the linktarget... At the adminmenue I can activate/daectivate the buy now-buttons. But I can't find the part where the link is generated........ just create...and sell..sell...sell.....
Guest Posted December 10, 2004 Posted December 10, 2004 In catalog/includes/application_top.php around line 370 (the "buy now" block of code) look for this: tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); Change it to this: tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, tep_get_all_get_params($parameters))); Thus the entire buy now block of code should look like this: // performed by the 'buy now' button in product listings and review page case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) { if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'])); } else { $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1); } } tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, tep_get_all_get_params($parameters))); break;
Madinson Posted December 10, 2004 Author Posted December 10, 2004 thx a lot chemo. That works. Great!!! thx a lot...I think I'll post it as a contribution...soon. just create...and sell..sell...sell.....
Guest Posted December 10, 2004 Posted December 10, 2004 Post it as a contribution? Why? It's only one line of code changed...actually, part of a line of code. Upload it as a contribution if you want...
Madinson Posted December 10, 2004 Author Posted December 10, 2004 Yep... I combined it with another contribution..called buy with one click. It works great because there is the complete functionallity of OSC but less steps... Is it as easy to change the generated link in product_info.php? There we have a button called "button_in_cart.gif"...if I click this I get the shopping_cart.php but I want this Button to get the linktarget to the checkout_shipping.php... just create...and sell..sell...sell.....
vinces Posted December 11, 2004 Posted December 11, 2004 It is a waste of server resources to make a very simple line change into a contrib. It is not needed. David Amherst
Madinson Posted December 13, 2004 Author Posted December 13, 2004 why don't you read the whole text????? I never said that I just want to change one line...and make a contribution .... ....so u could say sorry...because it means you think I'm totally stupid!! Thats what I say. Have a look at chemo...he gave me a helpful tip...u just write, why I really don't know. just create...and sell..sell...sell.....
Madinson Posted December 13, 2004 Author Posted December 13, 2004 Is it as easy to change the generated link in product_info.php??? There we have a button called "button_in_cart.gif"...if I click this I get the shopping_cart.php but I want this Button to get the linktarget to the checkout_shipping.php... just create...and sell..sell...sell.....
John Doswell Posted December 13, 2004 Posted December 13, 2004 well you have allready moded your case buy now succesfully!!! simple do the some you require with // customer adds a product from the products page case 'add_product' : greetz john
John Doswell Posted December 13, 2004 Posted December 13, 2004 before you ask ;-) // customer adds a product from the products page case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); } tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, tep_get_all_get_params($parameters))); break; greetz john
Madinson Posted December 13, 2004 Author Posted December 13, 2004 oops.. thx... I think I'm really a bit stupid...... ;-))))))))))))))))) just create...and sell..sell...sell.....
♥Vger Posted December 13, 2004 Posted December 13, 2004 thx a lot chemo. That works. Great!!! thx a lot...I think I'll post it as a contribution...soon. I for one object to someone posting someone else's fix as their own contribution. Vger
Recommended Posts
Archived
This topic is now archived and is closed to further replies.