Ken Wood Posted April 30, 2005 Share Posted April 30, 2005 Hello all, I have following problem: When I buy a product from the Product Listing page through the "Buy Now" button, everything is fine. But when I try to buy a product from the Product View* through the "Add to cart" button, the cart shows up but the product has not been added. I read a lot and did some tests: - no, I don`t think it is a problem withe globals. - no, I don`t use SSL - so that`s not it. Let me tell you what contribution I do use: - STS - Product Listing with attributes (!) - German requirements - Globals patch (but only in the online version - I don`t have it in my local version, where the problem is the same, so I assumed it has nothing to do with it). I did one test that gave me a hint: I replaced the applications_top file in the includes folder with the old one. Suddenly I was able to buy via Product-list/Buy Now but not anymore via the Product View*/Add to cart. Just the other way around. So I assume the problem lies within the application_top file, as modified by the Product listing with attributes contribution. I even thought about a workaround: replading all "Add to cart" buttons/functions with "Buy Now" buttons/functions. I don`t know if this would help, but I would try it - I just don`t know how to do it! It seems (at least in the german forum that I browsed high and low) that this is a problem that I`m not alone with. What did I do wrong? Mess up something while I installed the contrib? Anyway, I really need help so I came here because noobody was able to help me on the german forum. If you want to test a early version of the store go here: http://www.kunstgewerbe-muecke.de/ Thanks so much! Ken Wood * (how do you call that - you know: you go "into" the product to get more details - same place you land when you go to a product via one of the boxes - sorry, I`m no native speaker) Quote Link to comment Share on other sites More sharing options...
Ken Wood Posted May 2, 2005 Author Share Posted May 2, 2005 Am I really alone with this problem? Then what could I have done wrong? Please please help me... help me... Ken Quote Link to comment Share on other sites More sharing options...
Ken Wood Posted May 2, 2005 Author Share Posted May 2, 2005 Looking into the application_top.php: I guess this is the part that is responsible for the shopping within the non-list-display: // 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']))+($HTTP_POST_VARS['cart_quantity']), $HTTP_POST_VARS['id']); } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; case 'buy_now_form' : 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']))+($HTTP_POST_VARS['cart_quantity']), $HTTP_POST_VARS['id']); } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; As far as I can see there is no difference between the two. So I conclude that my idea of replacing the function "Add to cart" with "Buy Now" would not do a thing, right? Both cases actually utilize the "add_cart" function. But maybe they do it in the wrong way? Could the problem be that the difference between "add to cart" and "buy now" is the fact that one deals with quantity while the other simply always adds "1" and that this difference is not accounted for here? I mean, maybe it tries to pass on an quantity that is simply not requested, or a quantity is requested that is not passed on? Come on, that can`t be so hard - I mean, for me it is, but YOU know all this stuff, right? Please take a look... what`s wrong here? Thanks, Ken 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.