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

my ‘topLeftLinks’ and ‘topRightLinks’ stop working in v.817240
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

I had the ‘topLinks’ seperated to ‘topLeftLinks’ and ‘topRightLinks’ in previous versions.
‘topLeftLinks’ = My Account | Login
‘topRightLinks’ = My Cart | My Wishlist | Checkout

And the ‘topLeftLinks’ stays outside the ‘header’ - it has always worked fine since the beta 2 (v.6x).  With the new preview version, I am getting this error:

Fatal errorCall to a member function addLink() on a non-object in /Applications/MAMP/htdocs/mag817/app/code/core/Mage/Checkout/Block/Links.php on line 42

I compared all files that are associated with ‘topLinks’ with the previous version and the difference I see is this file located in the Mage_Page_Block_Html_Toplinks: ‘Toplinks.php’ .

In the newest version, it shows this (start from line 89):

if (is_numeric($position)) {
            array_splice
($this->_toplinks$position0, array($toplinkInfo));
        
else {
            $this
->_toplinks[] $toplinkInfo;
        
}
        
return $this;
    
}

Whereas in the v.816100, it shows this (also start from line 89):

if (is_numeric($position)) {
            $toplinks 
= array();
            foreach (
$this->_toplinks as $i=>$link{
            
if ($position==$i{
                    $toplinks[] 
$toplinkInfo;
                
}
                $toplinks[] 
$link;
            
}
            $this
->_toplinks $toplinks;
        
else {
            $this
->_toplinks[] $toplinkInfo;
        
}
        
return $this;
    
}

I was the one who asked how to combining the ‘top.left.links and top.right.links’, but client wanted them be separated exactly like the example shown in the first beta release.

http://www.magentocommerce.com/boards/viewthread/1212/

Been spending over two hours trying to figure what did I do wrong, but I can’t find any except the above in the ‘Toplinks.php’

Please help!

Many thanks!

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