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

Need help to link to a new template <a href=”???”
 
abosalam
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2008-04-25
 

I am trying to link from account dashboard to another phtml page that I created.  The page name is subscriptios.phtml. I could not figure out how to write the href, <a href=”…”>. Magento uses Zend framework, but I could not find where the indexAction… and other Action functions are located. I understood that there are relations between customer.xml layout file, and the templates. So in the customer.xml file I added the following block

<customer_address_bookclub>
        <!-- 
Mage_Customer -->
        <
update handle="customer_account"/>
        <
reference name="content">
            <
block type="customer/address_edit" name="customer_address_subscriptions" template="customer/address/subscriptions.phtml"/>
        </
reference>
    </
customer_address_bookclub>
In the Edit.php located under Customer/Block/Address/Edit.php I added a function
public function getBookclubSubscriptionsUrl()
    
{
        
return $this->getUrl('customer/address/subscriptions', array('_secure'=>true));
    
}
I put the subscriptions.php file under /app/design/frontend/default/new_theme/template/customer/address/
Now from the dashboard.phtml located
/app/design/frontend/default/new_theme/template/customer/account/dashboard/
I am trying to use this function
<a href="<?php echo $this->getAddressSubscriptionsUrl() ?>">
It doesn’t work, I know that Magento overwrite the url but I need help to figure it out. The question is what should I do to link <a href=”some function” > to a new template phtml that I created. 
Any help is appreciated
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top