Magento - Text Input on Grouped Product - magento

I am trying to create a grouped product in Magento where the customer must choose the product and fill out a text field before adding the item to the cart. I know I can do this by simply creating one product and adding custom options, but the problem with that is that I need to be able to control the stock of each product configuration. I read that I can just use the custom options field for every individual item in the grouped product and as long as it isn't a required field it will work, but that does not work for me. Anyone have any ideas?
Thanks in advance!

I have been searching for this also, and the quickest solution appears to be this 3rd party module:
http://ecommerce.brimllc.com/catalog-enhancements/grouped-options.html
the module author provides background on how they did it here:
http://www.brimllc.com/2010/07/magento-associating-simple-products-with-required-options-to-a-grouped-product/

Related

make configurable product options independent on product view page --Magento

I am working on a Magento project and I need to know if there is a way to make a product's options independent to each other or unrequired. I need to use one of several at a time (I have 6 dropdowns).
I have tried add to cart by query string but all dropdown values were still required. I also tried to make all the options default, then modify the selected options in the observer, but I did not meet with success. See the screenshot below for more details.
Any help will be appreciated
Screenshot http://secure.justhost.com/~sharpwe1/img/imf.png
Configurable Products in Magneto are only parent products of Simple Products. Whatever you have as an attribute of a Configurable - a Simple Product has to be present for each. To do this out of the box in Magento, you should be looking into setting up a Simple Product with Custom Options.

Forward to configurable product when opening simple product

I have a Magento shop with 2 simple products
Great Red Cup
Great Blue Cup
and a configurable product
Great Cup
with those cups assigned.
The Red and Blue cups are visible in the search.
If the use clicks one of those simple products, the configurable product should be opened instead, but the right color should be preselected.
I am aware that a simple product can be assigned to multiple configurable products, so I would log an exception if two matching configurable products are found an just take the first one.
I think I have to catch the predispatch event of catalog/product/view and somehow replace the simple product by the configurable one.
How can I now pre-configure the right simple product one?
Is there an elegant solution for this?
I found a solution:
register observer on controller_action_predispatch_catalog_product_view
check if we have a simple product with a parent that is a configurable product
create a array that contains the configuration data of the simple product
pass this data to Mage::helper('catalog/product_view')->prepareAndRender() (third parameter)
stop dispatching by setting the FLAG_NO_DISPATCH on the front action
Full code is available in the Mestrona_ForwardToConfigurable module on github.
To preselect a simple product in a configurable product, the address of a simple product should look like this for example:
/mona-pullover-hoodlie.html#143=167&93=53
where
/mona-pullover-hoodlie.html - configurable product URL
143, 93 - attribute IDs
167, 53 - option IDs.
In order to change the URL of simple products, you can create a Plugin (Interceptor) for Magento\Catalog\Model\Product::getProductUrl(), where to generate the URL as in the example above.
Product selection using URL parameters from example above is already implemented in Magento out of the box.
I made VCT Simple Product URl module on Magento Marketplace that solves this problem with the choice of the first configurable product if there are several.
One idea would be to redirect to the configurable product if the simple products meets somes requirements :
have a new attribute "should_redirect_to_parent" to True (optionnal)
have at least a parent product (for that point, I let you follow the link of Alex)
ps: if you don't want to do a parent product lookup you could add a new attribute like "redirect_sku" or "redirect_product_id" in order to directly make a redirection on that product
For the redirection you should use the event catalog_controller_product_init_after and if the two previous conditions match you redirect the user to the configurable product.
ps: for performance optimisation, you could use instead the catalog_controller_product_init_before which would save an expansive and useless Product::load() but it requires that you build custom SQL queries to search for a parent product
Tell if you want some code examples

product customization with extra price in magento

I am using Magento for my online store. Now i need to add a extra feature, throught which, customer can choose a custom text that needs to be engraved on the product. This feature must be available for only few products, so i have added a yes/no dropdown custom attribute in the "manage product" section. If yes is chosen for a product, i need to show a text box in that product details page in the store frontend.
The customer can enter the custom text in the text box, which needs to be saved and shown in the order invoice. And a extra fixed charge needs to be added to the product price, when this feature is used by the customer.
Does any community module available for this feature in magento or Do i need to create a custom module to do this, if so please guide me in carrying this out.
Thanks in Advance.
This feature is already available.
Create a new product!
Open the Custom Options Tab
Add a custom option
Give your new option a title and select field as input type
Now the attributes for this new options get displayed
Add a fixed or percent price to it
Also you need a SKU for every new option so that the options are displayed in the order process (invoice etc)
Done
So if a customer fill in this field the additional price is added automatically.
I hope this helps further.
No need to add a yes/no box, just add an text field option to those specific products. Did i miss something obvious here?

Pulling Custom Option ID from Magento

We have a SOAP connection to magento that is working great - we're able to pull product info, skus, descriptions, etc. using the magento API. We've been able to successfully add products to the cart programmatically with custom options, and that works great. The problem is this:
When you create a custom option for a product, it is assigned a unique ID that has to be called in order to pass that option value to the cart. For example:
www.mysite.com/magento/checkout/cart/add?product=7&qty=1&options[OPTION ID]=robots
Assuming I have my custom option ID correct, this will add 1 product with the option "robots." Which is nice.
However, we have hundreds of products, and while they all use similar custom options, each option is given a unique ID. That means I need to be able to call the magento API and get custom options details (specifically the option ID) so that we can add them to the cart properly. I have been back and forth with Varien Support (Magento), but they are less than helpful, as usual. Now, I know I can find these options by using firebug in Firefox or Chrome, which I've done to test the "add to cart" script. However, that's not a proper solution. I need to be able to grab this data from magento based on product id.
Can this really be that hard? Shouldn't this be tied to the data for the product somehow? I've done a var_dump on the catalog_product.info and i see where it asks if there are options but doesn't provide any details on them. Thoughts?
Thanks in advance.
Do you need to get all options ids for specific products or just some particular? For the latter you can use this code:
$productEntity = Mage_Catalog_Model_Product::ENTITY;
$colorAttribute = Mage::getModel('eav/config')->getAttribute($productEntity, 'color');
$colorAttribute->getId();
For the first option code in this question might be useful How to get all super attribute options for a configurable item in Magento

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