I want in magento create link as it. From .phtml file. I am can't find method for did it
magento/index.php/quotes/index/create/id/1/
Try this:
Mage::getUrl('quotes/index/create', array('id'=>1));
Related
How can I add category path to products' urls inside xml sitemap? I have tried to modify the following 2 files but nothing has changed. Which files should I modify?
\design\frontend\base\default\template\catalog\seo\sitemap.phtml
\code\core\Mage\Catalog\controllers\Seo\SitemapController.php
Thanks!
You shouldn't modify any files, but in a standard Magento system the file that generates the site map whose behavior you should seek to change through Magento class rewrites or additional Magento code is located in the following class/method
#File: app/code/core/Mage/Sitemap/Model/Sitemap.php
public function generateXml()
{
//...
}
Is creating/adding new phtml is allowed in magento go? Please let me know as I am new to magento go.
No you can not add any phtml file in magento go, magento go has not access of any file structure.
Besides you can only change in your theme css or add js code in design configuration Miscellaneous Scripts option.
I want to change My wishlist text to "Wishlist" in top links in magento.
I tried in magentotest\app\design\frontend\default\magentotest\layout\wishlist.xml file
But I am not getting.
Copy the file app/code/core/Mage/Wishlist/Block/Links.php to app/code/local/Mage/Wishlist/Block/ and change the _createLabel() method as you need
you can aslo edit you local files
Mage_Whishlist.csv
Is there any a way to call Block method calls in CMS page?
What I am trying to do is. I have a hyperlink in my CMS Page and I want to retrieve the email address of the customer to pass it as a get variable which another website will use.
e.g. In CMS page I have
(someother website link)
<a href="www.xyz.com?email=<?php $getCutomer->getEmail();?>&&name=<?php $getCutomer->getName();?>
I know we can't add php in CMS pages or block. I have just shown you as an example what I want to achieve.
So is there any way using XML or anything else?
Please Advise. Thanks
Yes as MagePsycho said, you will need to create phtml file for calling block method or getting dynamic data.
In .phtml file, it's simple just call $this->getCustomerEmail() or whatever method you wrote to get customer email.
Why can't you simply include the .phtml file in CMS page or Static block as:
{{block type="core/template" template="path/to/your-custom-template.phtml"}}
and you can now use any php code in that .phtml file.
Cheers!
I want to create a module with simple .phtml template, that have to be included in the page "cart.phtml" and also in "noItems.phtml"
How can do that ?
Thanks a lot.
You can create a simple module as shown in this >> tutorial.. and once you finished the weblog example in the above link, you can take a look at this link >> to create and place a phtml file.
Balan