Azhar Posted July 8, 2003 Share Posted July 8, 2003 I am modifying my setup of osCommerce heavily for it to suit my products, etc and would like to know how products are added to a users shopping cart in osCommerce. For example, in most packages, to insert something in the users cart they would have to click on a link, for example "addproducttocart.php?product_id=49". Although in osC, when I look at the source it shows the "In Cart" button on the product_info page as a form button, although with no form header, at least nothing I've spotted. So, for one of my scripts I require, for example, product 49 in the catalog to be inserted into the users cart without them having to click on an "Add to cart" button. How would I do this? Any help greatly appreciated. Link to comment Share on other sites More sharing options...
Guest Posted July 8, 2003 Share Posted July 8, 2003 All the shopping cart actions/functions can be found in catalog/includes/application_top.php... Link to comment Share on other sites More sharing options...
Azhar Posted July 8, 2003 Author Share Posted July 8, 2003 Right, ok but I still cannot figure out what code I will have to insert into my PHP file in order to allow a product ID (lets say $ddmcatalogid) to be added to the cart automatically. I have tried the code below although it does not work: $cart->cart->add_cart($ddmcatalogid, $cart->get_quantity($ddmcatalogid)+1); Any suggestions? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.