Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2007
    Posts
    23
    Plugin Contributions
    0

    Default Add multiple products with a link to shopping cart

    Is there a way to add multiple products to the Shopping Cart with just one link?

    For example, if I had a link or a banner that said something like, "Bundle these three products today" and it will add them to the cart without going one by one? Thanks.

  2. #2
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Add multiple products with a link to shopping cart

    A function like this does exist if you are posting data back using the POST method, but not for passing the products in the URL, however, anything is possible, but some things take a little work....

    With this problem, you would need to add some custom code to the includes/extra_cart_actions/ folder. In here, I would add a file which checks for a GET action of "add_multi_get_products".

    You will then need to go through and iterate through the product ids, and quantities, and use something like:

    Code:
              $_SESSION['cart']->add_cart($products_id, $_SESSION['cart']->get_quantity($_GET['products_id'])+$qty);
    You will need to include a little error trapping, for circumstances such as the customer is trying to order more than allowed etc.

    Absolute

 

 

Similar Threads

  1. v151 Add multiple products with attributes to cart with single click
    By mark777 in forum General Questions
    Replies: 1
    Last Post: 16 May 2013, 08:33 AM
  2. v139h Adding products with multiple attributes shopping cart
    By TAIHCM in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 22 Feb 2012, 08:20 PM
  3. How do I add multiple products with attributes to the cart at once?
    By DavidIIM in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 27 Jul 2010, 05:25 AM
  4. Replies: 1
    Last Post: 10 Sep 2009, 09:14 PM
  5. Add multiple products to cart (quick shopping)
    By vegascoug in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 2 Nov 2006, 06:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg