Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to add sub products for a main product? 
 
Sundara Pandian
Jr. Member
 
Total Posts:  16
Joined:  2008-11-06
 

Hi All,

How do i add a products with multiple sub products and each sub product should have quantity and “Add to Cart” option?
And also this sub products listing should have in product view page

For more clarification, i have attached an image. Kindly see this and tell me the possibilities.

Thanks,
Sundar

Image Attachments
sub-products.JPG
 
Magento Community Magento Community
Magento Community
Magento Community
 
valajbeg
Jr. Member
 
Total Posts:  23
Joined:  2009-11-04
 

I don’t know about this quantity field but this list of product is dead simple…

just change the template file

template/catalog/product/list.phtml and that is all.. you already have everything you need there..

 
Magento Community Magento Community
Magento Community
Magento Community
 
valajbeg
Jr. Member
 
Total Posts:  23
Joined:  2009-11-04
 

also try to see how it’s done in

template/catalog/product/view/addtocart.phtml

<?php $_product $this->getProduct() ?>

<?php 
if($_product->isSaleable()): ?>
    
<fieldset class="add-to-cart">
        <
legend><?php echo $this->__('Add Items to Cart'?></legend>
        
<?php if(!$_product->isGrouped()): ?>
        
<label for="qty"><?php echo $this->__('Qty'?>:</label>
        <
input type="text" class="input-text qty" name="qty" id="qty" maxlength="12" value="<?php echo $this->getMinimalQty($_product) ?>" />
        
<?php endif; ?>
        
<button type="button" class="button" onclick="productAddToCartForm.submit()"><span><span><span><?php echo $this->__('Add to Cart'?></span></span></span></button>
    </
fieldset>
<?php endif; ?>

i mean quantity thing

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mattse
Jr. Member
 
Total Posts:  9
Joined:  2009-08-05
Germany
 

Don’t you just want to create a grouped product?!

Have a look here:
http://www.magentocommerce.com/knowledge-base/entry/tutorial-creating-a-grouped-product

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top