00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 class Mage_Adminhtml_Block_Customer_Edit_Tab_Carts extends Mage_Adminhtml_Block_Template
00032 {
00033
00034
00035
00036
00037
00038 protected function _prepareLayout()
00039 {
00040 $sharedWebsiteIds = Mage::registry('current_customer')->getSharedWebsiteIds();
00041 $isShared = count($sharedWebsiteIds) > 1;
00042 foreach ($sharedWebsiteIds as $websiteId) {
00043 $blockName = 'customer_cart_' . $websiteId;
00044 $block = $this->getLayout()->createBlock('adminhtml/customer_edit_tab_cart', $blockName, array('website_id' => $websiteId));
00045 if ($isShared) {
00046 $block->setWebsiteId($websiteId)
00047 ->setCartHeader($this->__('Shopping Cart from %s', Mage::app()->getWebsite($websiteId)->getName()))
00048 ;
00049 }
00050
00051 $this->setChild($blockName, $block);
00052 }
00053
00054 return parent::_prepareLayout();
00055 }
00056
00057
00058
00059
00060
00061
00062 protected function _toHtml()
00063 {
00064 return $this->getChildHtml();
00065 }
00066 }