osCmax v2.5 User Manual
Results 1 to 3 of 3

Add Multi Products advice

This is a discussion on Add Multi Products advice within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Has anyone installed a decent mod that would allow the addition of multiple products? I have looked through the oscommerce ...

      
  1. #1
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Question Add Multi Products advice

    Has anyone installed a decent mod that would allow the addition of multiple products?

    I have looked through the oscommerce contributions - master products looks way to complex to install safely; others add products at the product_listing level ... not product_info level

    What I am looking to do is to be able to add a product which is in effect a package of other products.

    Eg. Blue Aspen Table Set

    contains - tablecloth, 6 placemats, 6 napkins, 6 napkin rings, 1 breadbasket.

    I am trying to add the physical products to the basket so the end user can remove the actual underlying products if they do not want all of them - this should also avoid any conflicts with QTPro.

    This code looks very simple but effective ... but I didn't want to have to hard code the links and wanted the end client administrator to be able to link products together ... Bundled products looks the closest but again looks a bit overly complicated.

    Has anyone seen a mod that would do this and have installed in oscmax?

    Thanks,
    Last edited by pgmarshall; 09-01-2009 at 04:41 AM. Reason: typo
    pgmarshall
    _______________________________

  2. #2
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    indiana
    Posts
    640
    Blog Entries
    1
    Rep Power
    27


    Default Re: Add Multi Products advice

    any luck with this project pgmarshall?

  3. #3
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Smile Re: Add Multi Products advice

    Blackhawk,

    The code for the simple solution is remarkably short ...

    Code:
    <?
      require('includes/application_top.php');
    
    //  echo $products;
      $ids = explode(",", $products);
    
      if (is_array($ids)) {
    
      foreach ($ids as $id){
            $cart->add_cart($id, $cart->get_quantity((int)$id)+1);
      }
    
      }
      tep_redirect(tep_href_link('shopping_cart.php'));  
    ?>
    Although, a couple of thoughts ...

    1) It would be better to allow - product_id, quantity, product_id2, quantity2, etc. - but that should be a simple code change ...
    2) The redirect back to shopping_cart.php needs to adopt the switch as per the admin set up - should be simpe ...
    3) I was also thinking about how to create a product in the database with this link structure through admin ... this is what I am stuck on ...

    If you were willing to hard code the links then you only need steps 1 and 2 which are pretty easy ... not done them yet as I would ideally like to complete step 3 if possible.

    Regards,
    pgmarshall
    _______________________________

Similar Threads

  1. Add Multi Products Checkbox v1.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 10-22-2008, 08:51 PM
  2. Difficulty trying to integrate "Add Multi Products Revi
    By earth-friendly in forum osCmax v2 Customization/Mods
    Replies: 3
    Last Post: 08-11-2006, 10:20 AM
  3. Need expert advice!!!
    By kama_k in forum osCMax v1.7 General Mods Discussion
    Replies: 2
    Last Post: 11-22-2004, 03:43 AM
  4. Making site with 29 products, need free template and advice
    By shiner25 in forum osCommerce 2.2 Installation Help
    Replies: 1
    Last Post: 05-19-2004, 09:02 AM
  5. Advice Please ????????????????!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    By Jimbeau in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 11-20-2003, 08:12 AM

Bookmarks

Posting Permissions

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