Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add multiple products to cart


bad3000

Recommended Posts

Hi

 

I am using the contrib :http://addons.oscommerce.com/info/4850 Add multiple products to cart

 

"Now you can create links, that will automatically add multiple products to shopping cart on-the-fly.

 

Just create a link, like: http://www.yourshop.com/buy_now.php?produc...1,id2,id3"

 

 

I was wondering if it would be possible to add products not by ID but by product_model

 

<?
 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'));


?>

 

Thank you for your help

Badou

Link to comment
Share on other sites

Not sure if it helps, but perhaps it is more something like this one that you need

http://addons.oscommerce.com/info/2292

Edited by bruyndoncx

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...