Bundle Product add to cart as individual line items - magento

Is it possible to have a bundle product that when added to the cart adds each of the bundle items as individual line items.
I want to allow my customers to configure their product (let’s say it’s a computer) and then in the shopping cart, remove an item they don't want - or change their mind about - from that bundle. They might then choose to add a new item instead - or a bunch of other (non-bundle stuff, just normal shopping).
The idea being that they have a fast method of adding most of the stuff they want in this bundle, but they can then edit their cart to add something that wasn’t available as an option to them when configuring the bundle.
I don’t want to overload the user with too many options in the bundle product page.
I might have missed an option in Magento, but currently it adds all the bundle items into the caret as a single line item, making it uneditable in the way I want.
Any suggestions please?

This behavior in Magento is intentional, as you may not want to let a customer order a PC without a CPU or memory. In your case, this assumption appears not to be the case, but that remains the method for using bundled products.
There are a few options open to you to avoid this situation. Firstly, you could use some product type other than bundle, and actually add simple products to your cart rather than the bundled ones. This would allow customers to add options at will, but would not preserve any promotional pricing on the products, as Magento checks those prices/discounts on every page load, and would kick out any changes you set manually.
The other option would be to allow customers an easier path to changing the bundle product that they have chosen. When rendering the bundle product, you could render a little X button (or whatever you find appropriate), which would lead to an action you specify, whose job it is to change the bundle options, resave the cart item, and redirect the user back to the cart. This is probably the cleanest solution to the problem.
Hope that helps!
Thanks,
Joe

Related

magento increment bundle product quantity on options page

I am building an on-line store to sale sweets. I added sweets box as bundle products. Before buying sweet, customer has to select box first. each box will have limit on quantity. for example box 1 contains 4 sweets, box 2 contains 12 etc. After selecting box, on options page, suppose I selected box 1. I selected 4 sweets. now I want to buy few more sweets. so there is a need to have an Ajax call to increment box quantity.Please help me with this. Thanks in advance.
It is my advice that you find a different way. I think you are suggesting using ajax to change the product (to a different bundle) and then move the 4 sweets from the initial bundle to the new bundle. That is a very complicated thing to do. An full answer here would need many lines of code.
I suggest you allow the user to pick the sweets first, then ask them to pick a box - the box must be big enough so you might give your box products an attribute sweets_maximum and set that to 4 or 12 and use some logic to only display boxes that are big enough.
Then maybe the cost of the sweets is zero and the boxes non-zero (so you can apply the price for the box and not the sweets).
Alternatively, load the sweet_maximum and the bundle SKUs and all the sweets skus into one webpage and after the user selects the number of sweets, write code to pass back to Magento the correct SKUs to add to the cart ie 10 different sweets SKUs and the SKU for box 2.
Bundles are very complex. I don't think you want to be ajaxing them back and forth.
*EDIT following comment below
Then this (from my answer above) is my recomendation: do everything in the browser and then pass back to Magento only the box and sweets chosen - your Javascript would form the URL to the bundle controller with the appropriate product selections.
*Alternatively, load the sweet_maximum and the bundle SKUs and all the sweets skus into one webpage and after the user selects the number of sweets, write code to pass back to Magento the correct SKUs to add to the cart ie 10 different sweets SKUs and the SKU for box 2.*
If you really want to use ajax you are going to be jumping through a lot of hoops. Here is the psuedo code I would use. You can find the functions by using the defualt Magento theme and capturing the submission URLs from the bundle pages and the cart-updates and reading the code in the controller actions.
(server side)display the chosen bundle
(browser side)UI logic to decide when a different box is needed
NO, WAIT. Maybe we need more information; it is difficult to do a full code architecture in this forum.
//new psuedo code
Carry on as normal. Allow the user to pick any box and any number of sweets through out the entire shopping experience
Eventually the user will visit its cart.
As part of the cart display logic, count the total sweets and count the total box capacity. If box capacity < total sweets, prompt the user to choose a bigger box.
Why do I say this? I mean there is a lot of shopping scenarios to work out but if you are really doing these as bundles then the bundle is not in the cart until the user presses the add to cart button - that is why I say the browser should have the logic to change the box in the browser without ajaxing anything. Can a user buy sweets separately?
I don't know what to say. I am happy to help you but we are opening a can of worms as far as the logic is concerned and without a specific list of all shopping scenarios and all allowed buying logic I find it difficult to assist. But I think if you write down all the logic you will find the answer yourself. Don't be afraid to advise your client on different ways to do this.
The URL for adding a bundle to the cart is:
POST http://54.247.95.57/checkout/cart/add/product/13831/ HTTP/1.1
product=13831&related_product=&bundle_option%5B767%5D=3867&bundle_option_qty%5B767%5D=1&
The URL for removing a bundle is :
POST http://54.247.95.57/checkout/cart/updatePost/ HTTP/1.1
update_cart_action=update_qty&cart%5B48677%5D%5Bqty%5D=0
But I still say do it all in the browser.

what type of products should be used to achieve the below mentioned functionality in magento?

I want to implement the functionality in magento, the link of this is below :
http://ledflashingwatch.com/clocker-watch-illuminati-series/
when you click on strips, it changes strips image but when click on dial, it changes separately. And also add to cart will differentiate the product on these two values.
Can anyone advise me on how to proceed towards approaching this idea. And which type of products to use for this.
You can ask me questions if it's still not clear to you. And do tell me if it is not possible.
This feature is not available in Magento out of the box.
There are several possible approaches, but the user interface component will have to be custom built by you.
If you want the selected products to appear separately in the cart (like in the example you linked) choose simple products.
You could also use a grouped product with a custom interface.
If you want them to be added to the cart as a single product, but internally they are separate, use a configurable product. This is the option I personally would prefer.
You could also use a bundled product - It all depends what exactly you need.
I suggest first getting a good idea of the differences between the product types. Then study how they are reflected in the quote as quote items, i.e. visibility, parent and child items etc.
Once you know that, the implementation will be rather straight forward.
Build the UI. Build the request parameters for the add to cart call. Done.

Magento custom browse catalogue workflow

I'm evaluating Magento for a particular client of mine. They want to enforce a particular workflow for browsing the catalogue. They're a travel company which puts together custom holiday packages and want to make sure users enter things like the number of adults / children before selecting accommodation (as number of people will affect available accommodation and pricing).
Note that accommodation is just an example, there are several other different components to a holiday package. And they've given me a 7 step (mostly) linear workflow they want users to follow before we get to anything which might resemble a checkout process (and even then their concept of "checkout" is quite different to Magento's).
I'm thinking of storing accommodation (and each of the other package components) in separate product categories. Then I can restrict what users can see as they browse the catalogue based on what they've already added to their shopping cart.
My research indicates that Magento doesn't really do this kind of thing out of the box. Am I mistaken? Are there add-ons which would support this kind of thing?
If I was to go down this road, would I be redesigning (or indeed, replacing) a large chunk of Magento's catalogue browsing functionality?
Well there are several approaches that you can take to implement something like this; but all require that you do custom development work.
You could define your packages as simple products with attributes for each of the specific package options and use that to filter each package from the others, now you would need to create a new module that adds a route on the frontend that is going to be your multistep form that will get all the information once you have all the information you can get a collection of all the products(packages) that match those attributes.
Now the deal there is if that price changes depending on the options selected if that's the case then you might need configurable products or something custom to change the price of each package.
It's really hard to say without real specifications of what your client needs, but if the question is if it's possible with Magento then the answer is yes it all depends on your level of skill :)
Kind Regards
So I ended up going with Magento as a product base and extending it using some custom code (been a while since I've developed in a LAMP environment!)
I created a static block which is used as the root of the workflow. There are 8 steps in the workflow which get listed in an ordered list. Each item has two custom Magento widgets next to it, which are a) a little tick image displayed when you've completed the workflow stage and b) a link which displays when you're up to that stage, clicking the link takes you to an appropriate catalog page (eg: choose accommodation, hire car, confirm shopping cart, etc).
I disabled the normal top catalog navigation to encourage users to keep within the workflow. That is, the mouse over to see more catalog detail of the "holiday planner" is disabled (although you can just navigate to the correct urls if you know them, or are smart enough to use the SEO link at the bottom of the page!).
Everything in your holiday is added as cart products (which has the positive side effect of Magento will remember your holiday if you get part way through it).
There is a big state machine in a helper class to determine what stage of the workflow you're up to. This checks your cart to see if products with particular sku's or from a particular attribute set are added.
I also overrode many URLs and redirects (eg: after you add a product) to send the user back to the root holiday planner page. This added to the workflow as almost every action you did or product you add bounces you back to that workflow page (which always tells you what the next step is).

Using one stock for multiple items in Magento

Ok so what I want is to have multiple simple products draw from the same stock.
Scenario
I have a sinle nail file (Stock:500)
I have a box of nail files (50/box)
I want it so that if someone buys a box then it deducts from the 500 stock of the singles. Essentially what we do is if someone buys a box, then we ship them 50 of the single files in a box.
Any easy way to do this?
This isn't a native function of Magento, so there a few approaches you can take to emulate it:
Use an external stock management package to keep track of stock and modify Magento to use that. This will require more backend modification.
Attempt to fool Magento by using product bundles in clever ways. This will require more frontend modification
Develop or find a Bill of Materials plugin for Magento. I didn't see anything after a short search, so you may have to build it. Have that module check the constituent materials for a product before allowing it to be added to the cart.
Hope that helps!
Thanks,
Joe
Consider:
Create a template for the products that you wish to order this way. This template need only be the files you need to modify, by default it will find the missing files from your default theme;
In the template you can place some PHP to write out some extra javascript, of the prototype variety;
This frontend code hides the real quantity box, with prototype 'hide' for the relevant css id to make it a hidden form field;
The code shows its own quantity box, also an extra field for how many of the fifty packs are required;
An onchange event on these boxes gets the values of the boxes, does the required multiplication and addition, then updates the hidden 'real' quantity box with (boxes*50)+singles;
On submit the customer sees in the cart the total quantity of the product ordered - this will be total units, not broken down 'per box'. If this is a problem, you can put some words to explain that or modify your main template to handle this and present to the customer the boxes+singles breakdown;
Set your products to use the 'new theme' that has your template update code.
Test, test, test!
As mentioned by Joseph this cannot be done out of the box. The above workaround is only partial, however, so long as you make it clear to customers that they are buying 500 units instead of 500 boxes then you should have a reasonable solution.

Please specify the product's option(s) in Magento

Actually i am using Elias_configurablebundle plugin for the configurable product as associated of the Bundle Product and to display GRID* for the configurable associated products i am using magento mechanics grid. here i have merged both of the extensions it showing GRID on bundle view page but showing Please specify the product's option(s)* on click of the **Add To Cart.
Although everything is fine, no required field left to fill out, i have applied any single custom options for any of the product.
so here i want to remove this validation so then it will directly redirect to shopping cart page.
Thanks
Configurable products need to have their options chosen (say, color or size) in order to be added to the cart. Otherwise, there is no way to decide which simple product should be decremented from the inventory. So there is no way for you to "skip" selecting this information, other than hardcoding the selections for the configurable product.
If you do that, just use the simple products instead, and skip all the headache.
Thanks,
Joe
Another thing to check is that the options fields are actually inside the tags. Its fairly easy in Magento to move the option selects to a different column and not realize that you are moving them outside the add to cart form tags.
if the options are selected outside the form tags, then as far as the form is concerned no options have been selected.
Hope this helps someone down the road.

Resources