View Single Post
  #1  
Old 04-14-2014, 08:08 AM
 
Mark N Mark N is offline
 

Senior Member
  
Join Date: Sep 2011
Posts: 121
 

Default moveClassesInLists not working?

Ok, this is mostly a Tony question, but maybe some other developers can answer.

Trying to move a widget per the KB guide (http://kb.x-cart.com/display/XDD/Widgets+moving) and while the old method works:

PHP Code:
/**
     * Decorator run this method at the end of cache rebuild
     *
     * @return void
     */
    
public static function runBuildCacheHandler()
    {
        
parent::runBuildCacheHandler();
        \
XLite\Core\Layout::getInstance()->removeClassFromList(
             
'XLite\Module\XC\Upselling\View\ItemsList\UpsellingProducts',
             
'center.bottom',
             \
XLite\Model\ViewList::INTERFACE_CUSTOMER
        
);
         
        \
XLite\Core\Layout::getInstance()->addClassToList(
             
'XLite\Module\XC\Upselling\View\ItemsList\UpsellingProducts',
             
'product.details.common.product-attributes.attributes',
             array(
                 
'zone'   => \XLite\Model\ViewList::INTERFACE_CUSTOMER,
                 
'weight' => 200,
             )
        );
    } 

The new method does not:

PHP Code:
/**
     * 
     * @return array
     */
    
protected static function moveClassesInLists()
    {
        return array(
            
'XLite\Module\XC\Upselling\View\ItemsList\UpsellingProducts' => array(
                
'center.bottom',
                array(
'product.details.common.product-attributes.attributes', \XLite\Model\ViewList::INTERFACE_CUSTOMER200),
            ),
        );
    } 

The new method correctly removes it from the old section but doesn't add it to the new. Am I using the function incorrectly or is it a bug?
__________________
X-Cart Gold Plus 4.6.5
Mods - WebsiteCM Dynamic Product Tabs, Smack Digital CDSEO Pro, AlteredCart Smart Search, AlteredCart One Page Checkout, Cart Works Power Filter, Firetank Software Feed Manager
Reply With Quote