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

Problem in custom module
 
nkdineshdct
Member
 
Avatar
Total Posts:  66
Joined:  2008-08-29
India
 

Hello all,

I have created a custom module named “PurchaseOrder”. It is same as that of sales_order. I want the same view layout of sales -order except some blocks.

I have copied the info.php and info.phtml and placed in my custom module. After that modified the code and it only display the account information and Order information, and the other block are remain null.

<!--PO Information-->
    <
div class="entry-edit">
        <
div class="entry-edit-head">
            <
h4 class="icon-head head-account"><?php echo Mage::helper('purchaseorder')->__('Order #'?></h4>
        </
div>
        <
div class="fieldset">
            <
div class="hor-scroll">
        <
table cellspacing="0" class="form-list">
            <
tr>
                <
td class="label"><label><?php echo $this->__('Order Date:'?></label></td>
                <
td><strong><?php echo $this->formatDate($this->htmlEscape(Mage::registry('purchaseorder_data')->getCreatedAt()), 'medium'true)?> </strong></td>

            </
tr>
            <
tr>
                <
td class="label"><label><?php echo $this->__('Order Status:'?></label></td>
                <
td><strong><?php echo $this->htmlEscape(Mage::registry('purchaseorder_data')->getstatus())?></strong></td>
            </
tr>
            <
tr>
                <
td class="label"><label><?php echo Mage::helper('sales')->__('Purchased From:'?></label></td>
                <
td><strong><?php echo $this->htmlEscape(Mage::registry('purchaseorder_data')->getStoreName()) ?></strong></td>
             </
tr>
             <
tr>
               <
td class="label"><label><?php echo $this->__('Placed from IP:'?></label></td>
               <
td><strong><?php echo $this->htmlEscape(Mage::registry('purchaseorder_data')->getRemoteIp())?></strong></td>
           </
tr>
          </
table>
        </
div>
       </
div>
    </
div>
</
div>

<
div class="box-right">
    <!--
Account Information-->
    <
div class="entry-edit">
        <
div class="entry-edit-head">
            <
h4 class="icon-head head-account"><?php echo Mage::helper('sales')->__('Account Information'?></h4>
        </
div>
        <
div class="fieldset">
            <
div class="hor-scroll">
        <
table cellspacing="0" class="form-list">
            <
tr>
                <
td class="label"><?php echo $this->__('Customer Name'?></td>
                <
td><strong><?php echo $this->htmlEscape(Mage::registry('purchaseorder_data')->getCustomerName()) ?> </strong></td>
            </
tr>
            <
tr>
                <
td class="label"><?php echo $this->__('Email'?></td>
                <
td><strong><?php echo $this->htmlEscape(Mage::registry('purchaseorder_data')->getCustomerEmail())?></strong></td>
            </
tr>
            
<?php if ($_groupName=$this->getCustomerGroupName()) : ?>
            
<tr>
                <
td class="label"><?php echo $this->__('Customer Group'?></td>
                <
td><strong><?php echo $_groupName ?></strong></td>
            </
tr>
            
<?php endif; ?>
        
</table>
       </
div>
        </
div>
    </
div>
</
div>
<
div class="clear"></div>

<
div class="box-left">
    <!--
Distributor Information-->
    <
div class="entry-edit">
        <
div class="entry-edit-head">
            <
h4 class="icon-head head-account"><?php echo Mage::helper('sales')->__('Distributor Account'?></h4>
        </
div>
        <
fieldset>
             
<?php echo $this->getBillingAddress()?>
        
</fieldset>
    </
div>
</
div>

<
div class="box-right">
    <!--
Shipping Information-->
    <
div class="entry-edit">
        <
div class="entry-edit-head">
            <
h4 class="icon-head head-shipping-address"><?php echo Mage::helper('sales')->__('Shipping Address'?></h4>
        </
div>
        <
fieldset>
            <
address><?php echo $this->getShippingAddress()?></address>
        </
fieldset>
    </
div>
</
div>
<
div class="clear"></div>

Used $this->htmlEscape(Mage::registry(’purchaseorder_data’)-> in order to make order and account block to work, i want to display the billing and shipping address, tried using $this->htmlEscape(Mage::registry(’purchaseorder_data’)-> in front of the function call in billing and shipping address, but no display.

For more code detail pls see the attached file.

pls help me, and point to me in right direction.
Thanks.

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