News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Add multiple items to cart in one click

Started by thewolf79, October 24, 2012, 12:46:22 PM

Previous topic - Next topic

thewolf79

Dear all,

Is it possible to add an 'Add To Cart' button to the Category View? I've searched a lot, and I've come across some solutions that were close, but not quite there yet.
I do not mean a per-product button, but a button that adds all products in current view with quantity larger than '0'. I'm not looking for a solution like "Product Builder" or the "Multi Product Express Order Form Content Plugin" as well, as these are not flexible enough (i.e. when I add a new product or remove a discontineud product I will need to change all forms manually).

I want my shoppers to be able to say "I want 1 bread, 5 drinks and 2 meat, now add all of these to the cart."

Basically, I want to change this: (link no longer working) http://www.leenmenken.com/vmfiles/Knipsel1.JPG
into a working version of this: (link no longer working) http://www.leenmenken.com/vmfiles/Knipsel2.JPG

Any help is much appreciated!

I use VM 2.0.12f with Joomla 2.5.7
I have average knowledge of HTML, CSS.
(I'm able to understand basic PHP and JS, however, writing from scratch is a challenge)

Kind regards

luizwbr

Hi @thewolf79, i made a plugin which to that.

Just look this plugin in post "VM - Custom, Multiple Products to Cart": http://forum.virtuemart.net/index.php?topic=107834.msg360564#msg360564

But if I had a way to do this natively, would be better.
http://virtuemartbrasil.com.br - Brazillian VirtueMart official Support Group
http://loja.weber.eti.br - Paid Plugins for Virtuemart Brasil
https://www.facebook.com/groups/virtuemartpro/ - Brazillian VirtueMart group on Facebook

thewolf79

Quote from: luizwbr on October 24, 2012, 12:54:35 PM
Hi @thewolf79, i made a plugin which to that.

Just look this plugin in post "VM - Custom, Multiple Products to Cart": http://forum.virtuemart.net/index.php?topic=107834.msg360564#msg360564

But if I had a way to do this natively, would be better.

Thank you luizwbr,

During my search I saw your solution as well. I understand you can make use of parent-child connections, however, my products do not have parent products.
For clarification, this is a part of my category tree. I don't see how I could use parent-child product relations in here.

Restaurant Chain X
|_Food
   |_Frozen
      |_Bread
         |_ product A
         |_ product B
         |_ ...
      |_Meat
         |_ product C
         |_ product D
         |_ ...
      |_...
   |_Chilled
      |_Vegetables
         |_ product E
         |_ ...
      |_...
   |_Ambient
      |_Drinks
         |_ product F
         |_ ...
      |_...
|_Non-Food
   |_Cleaning
      |_ product G
      |_ ...
   |_...

Or should I use the category name as a parent product?

Thanks again!

Kin regards

balai

Quote from: thewolf79 on October 24, 2012, 12:46:22 PM
I'm not looking for a solution like "Product Builder" or the "Multi Product Express Order Form Content Plugin" as well, as these are not flexible enough (i.e. when I add a new product or remove a discontineud product I will need to change all forms manually).

Im don't think that this happens with Product Builder.
It follows all the Virtuemart rules like the checkstock. Also connecting a group with a category,will display all the current products of that category (even the new).

thewolf79

Thank you balai,

But I'm stil not sure if Product Builder is what I need, but maybe I'm missing something here ...

Is it possible, with Product Builder, to select a certain category, and see all of its products in that category and subcategories, so I can build my order from that?
When I select 'Bread', for example, I want to able to order 6x White Bread  -AND-  4x Brown Bread.
I do not want to choose between White or Brown, so groups are no use to me.
Or do I need to make a non-editable group for each product then?

Thanks,

Kind regards

balai

QuoteOr do I need to make a non-editable group for each product then?
For your project i think that this is the case

thewolf79

Quote from: balai on October 24, 2012, 18:01:06 PM
For your project i think that this is the case

I assume that creating a group for each product is not done automatically when adding or uploading a new product?
In that case, unfortunately, Product Builder is not what I'm looking for. But thank you anyway!

Is there anyone with a better solution?
So far I've managed to create a custom category view that builds a single form in a table, with all products in that category, and each product with its own quantity box. Now I need the code to loop through each quantity box on that form and add the product and amount to the cart if amount > 0
I've read somewhere that you can use arrays to send multiple product id's and amounts to the cart, but my PHP and JS coding skills are insufficient for this ... Is there anyone who can point me in the right direction, or is this simply not possible?

marcelmarnix

How did you solve this?

I want to do the same for a takeaway.