I've created a script named customscript.php
in the /shell
dir.
This script extends Mage_Shell_Abstract
.
When I use getUrl()
inside this script, Magento adds customscript.php
in the URL.
If I do:
Mage::helper('adminhtml')->getUrl("adminhtml/sales_order/view", array('order_id' => 123));
I have:
http://mysite.com/customscript.php/admin/sales_order/view/order_id/123/key/{secret key}
How can I remove customscript.php
from the URL without using str_replace()
the result?
you can use '_type' param for getUrl() function as follows:
Mage::helper('adminhtml')->getUrl("adminhtml/sales_order/view", array(
'order_id' => 123,
'_type' => Mage_Core_Model_Store::URL_TYPE_WEB
));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With