mokx2280 Posted July 25, 2013 Posted July 25, 2013 When I try to click on the add to cart link for my products, it redirects me to my shopping cart but it doesn't add it. Also some of my products are displaying a product not found! message. I double checked and it exists in my admin pages and my index.php files work prefectly so I am not sure what is wrong.
Guest Posted July 25, 2013 Posted July 25, 2013 What is your osC version? At what page is this happening? p.s. Maybe you can post the link where is this happening.
mokx2280 Posted July 26, 2013 Author Posted July 26, 2013 My Oscommerce version is 2.3.3 and this is happening at my home page. My add to cart link looks something like this "http://healthoriginal.com/index.php?action=buy_now&products_id=348&osCsid=493c740ffd6294a8d6f5c40b4878bc94"
greasemonkey Posted July 26, 2013 Posted July 26, 2013 I would guess your buy it now problem is in includes/application_top.php Sorry...not sure about the product not found message... unless, is it possible, the product is just inactive (or out of stock and you have set up something to make inactive when out of stock)? You would have to provide more details and some of the other experts may be able help (of which I am not one....lol). For your add to cart issue, if it is stock 2.3.3, around line 311, it should look like this; if (DISPLAY_CART == 'true') { $goto = FILENAME_SHOPPING_CART; $parameters = array('action', 'cPath', 'products_id', 'pid'); } else { $goto = basename($PHP_SELF); if ($HTTP_GET_VARS['action'] == 'buy_now') { $parameters = array('action', 'pid', 'products_id'); } else { $parameters = array('action', 'pid'); } }
mokx2280 Posted July 29, 2013 Author Posted July 29, 2013 For my product not found messages, I think it is either because they were a limited time offer or I am out of stock? Not too sure about that right now. Also, for my add to cart issues, I checked for that code in my includes/application_top.php file and it is very similar so I am a bit confused about why it doesn't work. I uploaded it just in case I missed a stupid mistake that I should have fixed. application_top.php
mokx2280 Posted July 29, 2013 Author Posted July 29, 2013 I have all this working at http://healthrebuilder.com/ but I believe it uses 2.2MS2 oscommerce and is missing serveral new contributions. I compared the files between the two websites and I can't figure out why it isn't working.
Guest Posted July 29, 2013 Posted July 29, 2013 My Oscommerce version is 2.3.3 and this is happening at my home page. My add to cart link looks something like this "http://healthoriginal.com/index.php?action=buy_now&products_id=348&osCsid=493c740ffd6294a8d6f5c40b4878bc94" Hi, I had a similar problem and found it appeared when i selected not to be directed to the shopping cart when a customer added an item to their basket. Pretty sure it was something i had done or the template i used.
mokx2280 Posted July 31, 2013 Author Posted July 31, 2013 Does anyone have any idea what might be causing my problem with the buy now button?
greasemonkey Posted July 31, 2013 Posted July 31, 2013 Again, I'm assuming you have something going on in application_top... You mentioned previously it was 2.3.3... This looks like 2.2... Also, you have a bunch of addon's in here that could be causing an issue (again I'm no expert). Look around line 660... You have; // performed by the 'buy now' button in product listings and review page case 'buy_now' : if (isset($_GET['products_id'])) { /*if (tep_has_product_attributes($_GET['products_id'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['products_id'])); } else {*/ $cart->add_cart($_GET['products_id'], $cart->get_quantity($_GET['products_id'])+1); // Begin Change: Cart Cookie V1.3 include('includes/write_cart_to_cookie.php'); // End Change: Cart Cookie V1.3 //} } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; out of the box should look something like; // 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($goto, tep_get_all_get_params($parameters))); break; It's gonna require some trial and error on your part... or sign up for commercial help. I don't think anyone is going to dig through your file line by line... Good luck...
♥joli1811 Posted July 31, 2013 Posted July 31, 2013 Hi, yes agree looks like a 2.2 to me also that first of all as the includes/configure.php wrong Regards Joli To improve is to change; to be perfect is to change often.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.