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

New Product View Code
 
Mootrealm
Sr. Member
 
Avatar
Total Posts:  150
Joined:  2007-09-14
San Francisco, CA
 

I have finally gotten around to converting my theme from 1.0 to 1.1.1. I know there is a newer version, but I upgraded my development copy to 1.1.1 awhile ago and just never got around to doing it. I am going to do another upgrade once I make all the needed changes from 1.1.1

The product view code changed significantly and I need someone to explain what a few sections are doing.

The first line is actually the original code from 1.0 and it used to get configurable.phtml which had everything in it. I made changes to this file to suit my need. Now that file only has in or out of stock and the price.

<?php echo $this->getChildHtml('product_type_data'?>

The following code I am confused by the most. First of all I am not entirely sure what tiered pricing is, or why it is depended upon whether or not I have product options.

In my case all it produces is the wishlist and compare links. I do have a size option on the product in question,so I am not sure why it did not product the qty field and add to cart button.

<?php if (!$this->hasOptions()):?>
                <?php 
echo $this->getChildHtml('tierprices'?>
                
<div class="add-to-holder">
                    
<?php if($_product->isSaleable()): ?>
                        <?php 
echo $this->getChildHtml('addtocart'?>
                        <?php 
if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
                            
<span class="add-or"><?php echo $this->__('OR'?></span>
                        
<?php endif; ?>
                    <?php 
endif; ?>
                    <?php 
echo $this->getChildHtml('addto'?>
                
</div>
            
<?php else:?>
                <?php 
echo $this->getChildHtml('addto'?>
            <?php 
endif; ?>

What is “other”

<?php echo $this->getChildHtml('other');?>

I am not sure what is going on here. What exactly is it getting? This code is producing my size dropdown, price, qty, and add to cart button.

<?php if ($this->hasOptions()):?>
                <?php 
echo $this->getChildChildHtml('container1'''truetrue?>
            <?php 
endif;?>

            <?php 
if ($this->hasOptions()):?>
                <?php 
echo $this->getChildChildHtml('container2'''truetrue?>
            <?php 
endif;?>

Ultimately what I need is Price, Wishlist, Dropdown options, Price, Add to Cart. Not necessarily in that order. I also need to add a help button.

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