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

Configurable Products in Wishlist
 
rottmanj
Jr. Member
 
Total Posts:  5
Joined:  2011-05-09
 

I am extending the wishlist so that configurable products can be configured from with in the wishlist. However I am having a bit of an issue getting the configurable view to display. Any help with this is greatly appreciated.

This is my modified wishlist layout

I have valiadated that the both $_product->isSaleable() and $this->hasOptions() are both true. However, $this->getChildChildHtml(’container2’) always comes up null/empty string.

This is the code that I am using with in my custom wishlist view.phtml

<?php if ($_product->isSaleable() && $this->hasOptions() && $this->getChildChildHtml('container2') ):?>
                            
<div class="paint-types" id="paint-types-<?php echo $_product->getId();?>">
                                <
strong><?php echo $this->__('Select paint type:');?></strong><br>
                                <
div class="options-container-big-<?php echo $_product->getId();?>">
                                    
<?php $configBlock = new Mage_Catalog_Block_Product_View_Type_Configurable();?>
                                    <?php $configBlock
->setProduct($_product);?>
                                    <?php $_attributes 
Mage::helper('core')->decorateArray($configBlock->getAllowAttributes());?>
                                    <?php 
if ($_product->isSaleable() && count($_attributes)):?>
                                        
<dl>
                                        
<?php foreach($_attributes as $_attribute): ?>
                                            
                                                
<dt><label class="required"><em>*</em><?php echo $_attribute->getLabel() ?></label></dt>
                                                <
dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>
                                                
                                                    <
div class="input-box">
                                                        <
select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select-<?php echo $_product->getId();?>">
                                                            <
option><?php echo $this->__('Choose an Option...'?></option>
                                                          </
select>
                                                      </
div>
                                                </
dd>
                                        
<?php endforeach; ?>
                                        
</dl>
                                        
                                        <
script type="text/javascript">
                                            var 
spConfig<?php echo $_product->getId();?> = new Product.QuickConfig(<?php echo $configBlock->getJsonConfig() ?>);
                                        
</script>
                                    <?php 
endif;?>
                                
</div>
                            </
div>
                        
<?php endif;?>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Suman Dahal
Jr. Member
 
Total Posts:  3
Joined:  2010-04-24
 

Hi Rottman,

How did you set up the wishlist on the product detail page? Are you able to share? We’ve been trying to do this for a client for a while as well.

Thanks in advance

 
Magento Community Magento Community
Magento Community
Magento Community
 
dilby
Member
 
Total Posts:  33
Joined:  2008-10-14
 

Ditto - need the solution tooo!

 
Magento Community Magento Community
Magento Community
Magento Community
 
rottmanj
Jr. Member
 
Total Posts:  5
Joined:  2011-05-09
 

This is a basic overview of what I ended up doing. If you need more details please feel free to pm me.

<div class=\\\"options-container-big-<?php echo $_product->getId();?>\\\">
                                            
<?php $configBlock = new Mage_Catalog_Block_Product_View_Type_Configurable();?>
                                            <?php $configBlock
->setProduct($_product);?>
                                            <?php $_attributes 
Mage::helper(\\\'core\\\')->decorateArray($configBlock->getAllowAttributes());?>
                                            <?php 
if ($_product->isSaleable() && count($_attributes)):?>
                                                
<dl>
                                                
<?php foreach($_attributes as $_attribute): ?>
                                                    
                                                        
<dt><label class=\\\"required\\\"><em>*</em><?php echo $_attribute->getLabel() ?></label></dt>
                                                        <
dd<?php if ($_attribute->decoratedIsLast){?> class=\\\"last\\\"<?php }?>>
                                                        
                                                            <
div class=\\\"input-box\\\">
                                                                <
select name=\\\"super_attribute[<?php echo $_attribute->getAttributeId() ?>]\\\" id=\\\"attribute<?php echo $_attribute->getAttributeId() ?>\\\" class=\\\"required-entry super-attribute-select-<?php echo $_product->getId();?>\\\">
                                                                    <
option><?php echo $this->__(\\\'Choose an Option...\\\'?></option>
                                                                  </
select>
                                                              </
div>
                                                        </
dd>
                                                
<?php endforeach; ?>
                                                
</dl>
                                                
                                                
                                            
<?php endif;?>
                                        
</div>
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top