magento 1.9 remove order specific in anchor tag urlRemove Specific Top LinksOnly allow order for specific post codes in a specific country?Fetch Customer Dashboard Order URLDestroy specific session data on complete orderMagento 1 print order from backendWant to remove a specific url from Magento sitemap.xml?Magento 1.9 remove time from order confirmationMagento : How do I Get All Orders of Specific Category of Logged in CustomerDelete order item after successfully save order Magento 21.9: remove specific meta tag from header
How can saying a song's name be a copyright violation?
Where does SFDX store details about scratch orgs?
What mechanic is there to disable a threat instead of killing it?
Emailing HOD to enhance faculty application
Forgetting the musical notes while performing in concert
Can I ask the recruiters in my resume to put the reason why I am rejected?
Can I use a neutral wire from another outlet to repair a broken neutral?
Anagram holiday
What is the intuition behind short exact sequences of groups; in particular, what is the intuition behind group extensions?
How can I make my BBEG immortal short of making them a Lich or Vampire?
If human space travel is limited by the G force vulnerability, is there a way to counter G forces?
Neighboring nodes in the network
What exploit are these user agents trying to use?
Why is Collection not simply treated as Collection<?>
A reference to a well-known characterization of scattered compact spaces
How do I write bicross product symbols in latex?
Is "remove commented out code" correct English?
1960's book about a plague that kills all white people
Does casting Light, or a similar spell, have any effect when the caster is swallowed by a monster?
How to show the equivalence between the regularized regression and their constraint formulas using KKT
Did Shadowfax go to Valinor?
Took a trip to a parallel universe, need help deciphering
How do conventional missiles fly?
Has there ever been an airliner design involving reducing generator load by installing solar panels?
magento 1.9 remove order specific in anchor tag url
Remove Specific Top LinksOnly allow order for specific post codes in a specific country?Fetch Customer Dashboard Order URLDestroy specific session data on complete orderMagento 1 print order from backendWant to remove a specific url from Magento sitemap.xml?Magento 1.9 remove time from order confirmationMagento : How do I Get All Orders of Specific Category of Logged in CustomerDelete order item after successfully save order Magento 21.9: remove specific meta tag from header
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to specific delete order in frontend
in
My Account-> Myorders
magento-1.9 orders
add a comment |
I want to specific delete order in frontend
in
My Account-> Myorders
magento-1.9 orders
You can delete it from Database.
– Dharmesh Hariyani
2 days ago
no i want to frontend by customer
– Rakesh Donga
2 days ago
Than you need to write custom controller action and delete code.
– Dharmesh Hariyani
2 days ago
You want to give delete order option to every customer ?
– Hassan Ali Shahzad
2 days ago
Yes every customer to given this option
– Rakesh Donga
2 days ago
add a comment |
I want to specific delete order in frontend
in
My Account-> Myorders
magento-1.9 orders
I want to specific delete order in frontend
in
My Account-> Myorders
magento-1.9 orders
magento-1.9 orders
edited 2 days ago
Rakesh Donga
asked 2 days ago
Rakesh DongaRakesh Donga
2,393316
2,393316
You can delete it from Database.
– Dharmesh Hariyani
2 days ago
no i want to frontend by customer
– Rakesh Donga
2 days ago
Than you need to write custom controller action and delete code.
– Dharmesh Hariyani
2 days ago
You want to give delete order option to every customer ?
– Hassan Ali Shahzad
2 days ago
Yes every customer to given this option
– Rakesh Donga
2 days ago
add a comment |
You can delete it from Database.
– Dharmesh Hariyani
2 days ago
no i want to frontend by customer
– Rakesh Donga
2 days ago
Than you need to write custom controller action and delete code.
– Dharmesh Hariyani
2 days ago
You want to give delete order option to every customer ?
– Hassan Ali Shahzad
2 days ago
Yes every customer to given this option
– Rakesh Donga
2 days ago
You can delete it from Database.
– Dharmesh Hariyani
2 days ago
You can delete it from Database.
– Dharmesh Hariyani
2 days ago
no i want to frontend by customer
– Rakesh Donga
2 days ago
no i want to frontend by customer
– Rakesh Donga
2 days ago
Than you need to write custom controller action and delete code.
– Dharmesh Hariyani
2 days ago
Than you need to write custom controller action and delete code.
– Dharmesh Hariyani
2 days ago
You want to give delete order option to every customer ?
– Hassan Ali Shahzad
2 days ago
You want to give delete order option to every customer ?
– Hassan Ali Shahzad
2 days ago
Yes every customer to given this option
– Rakesh Donga
2 days ago
Yes every customer to given this option
– Rakesh Donga
2 days ago
add a comment |
2 Answers
2
active
oldest
votes
I can give you hint how to complete this task say Levosoft is vendor & Customerdeleteorder is your custom module:
Add link in dashboard with following route:
/customerdeleteorder/order_id/21/customer_id/8
create basic file for module :
<?xml version="1.0"?>
<config>
<modules>
<Levosoft_Customerdeleteorder>
<active>true</active>
<codePool>local</codePool>
<version>1.0.0</version>
</Levosoft_Customerdeleteorder>
</modules>
</config>
Create front route for delete order in M1:
Levosoft_Customerdeleteorder/app/code/local/Levosoft/Customerdeleteorder/etc/config.xml
<?xml version="1.0"?>
<config>
<global>
</global>
<frontend>
<routers>
<levosoft_customerdeleteorder>
<use>standard</use>
<args>
<module>Levosoft_Customerdeleteorder</module>
<frontName>customerdeleteorder</frontName>
</args>
</levosoft_customerdeleteorder>
</routers>
</frontend>
</config>
Then you will create controller file in the following location to handle this request.
Levosoft_Customerdeleteorder/app/code/local/Levosoft/Customerdeleteorder/controllers/IndexController.php
<?php
class Levosoft_Customerdeleteorder_IndexController extends Mage_Core_Controller_Front_Action
public function indexAction()
$order_id = $this->getRequest()->getParam('order_id'); // create link in customer dashboard and pass this order id in this link
$order = Mage::getModel('sales/order')->load($order_id);
// here you can write your delete logic you can get delete order code easily
if (!$order->getId())
Mage::getSingleton('adminhtml/session')->addError($this->__('This order no longer exists.'));
$this->_redirect('*/*/');
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
return false;
$customer_id = $this->getRequest()->getParam('customer_id'); // also attach current customer id
// very important Now get customer session and match customer id with session id
if(same customer session exists)
// delete order
$order->delete();
Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Order was successfully deleted'));
else // non loged-in customer request to secure outside delete order via link
Mage::getSingleton('adminhtml/session')->addError($this->__('Invalid request from non loged in customer'));
$this->_redirect('*/*/');
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
return false;
}
Thanks for replay let me check
– Rakesh Donga
2 days ago
but how can i will use?(same customer session exists)
– Rakesh Donga
2 days ago
$customer = Mage::getSingleton('customer/session')->getCustomer(); echo $customer->getId(); echo $customer->getName();
– Hassan Ali Shahzad
2 days ago
yes but your order delete code is not working
– Rakesh Donga
2 days ago
its not my code its magento code & it will work no issue in it to work with. You have to check order loaded or not because in above code i was using wrong $id instead of $order_id
– Hassan Ali Shahzad
2 days ago
add a comment |
add code in config.xml file
<frontend>
<routers>
<extension>
<use>standard</use>
<args>
<module>Namespace_Extension</module>
<frontName>catalogue</frontName>
</args>
</extension>
</routers>
</frontend>
after order_id
pass in controller url
$delete = $this->getUrl('extension/index/index', array('order_id' => $_order->getIncrementId()));
after create controller and add below code
public function indexAction()
try
$order_id = $this->getRequest()->getParam('order_id');
$order=Mage::getModel('sales/order')->loadByIncrementId($order_id);
Mage::register('isSecureArea', true);
Mage::getModel('sales/order')->loadByIncrementId($order->getIncrementId())->delete();
Mage::getSingleton('customer/session')->addSuccess($this->__('Catalogue was successfully deleted'));
Mage::unregister('isSecureArea');
$this->_redirectReferer();
catch (Exception $e)
Mage::log("Order #" . $order_id . " could not be remvoved: " . $e->getMessage(), null, "order-delete.log");
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268286%2fmagento-1-9-remove-order-specific-in-anchor-tag-url%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I can give you hint how to complete this task say Levosoft is vendor & Customerdeleteorder is your custom module:
Add link in dashboard with following route:
/customerdeleteorder/order_id/21/customer_id/8
create basic file for module :
<?xml version="1.0"?>
<config>
<modules>
<Levosoft_Customerdeleteorder>
<active>true</active>
<codePool>local</codePool>
<version>1.0.0</version>
</Levosoft_Customerdeleteorder>
</modules>
</config>
Create front route for delete order in M1:
Levosoft_Customerdeleteorder/app/code/local/Levosoft/Customerdeleteorder/etc/config.xml
<?xml version="1.0"?>
<config>
<global>
</global>
<frontend>
<routers>
<levosoft_customerdeleteorder>
<use>standard</use>
<args>
<module>Levosoft_Customerdeleteorder</module>
<frontName>customerdeleteorder</frontName>
</args>
</levosoft_customerdeleteorder>
</routers>
</frontend>
</config>
Then you will create controller file in the following location to handle this request.
Levosoft_Customerdeleteorder/app/code/local/Levosoft/Customerdeleteorder/controllers/IndexController.php
<?php
class Levosoft_Customerdeleteorder_IndexController extends Mage_Core_Controller_Front_Action
public function indexAction()
$order_id = $this->getRequest()->getParam('order_id'); // create link in customer dashboard and pass this order id in this link
$order = Mage::getModel('sales/order')->load($order_id);
// here you can write your delete logic you can get delete order code easily
if (!$order->getId())
Mage::getSingleton('adminhtml/session')->addError($this->__('This order no longer exists.'));
$this->_redirect('*/*/');
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
return false;
$customer_id = $this->getRequest()->getParam('customer_id'); // also attach current customer id
// very important Now get customer session and match customer id with session id
if(same customer session exists)
// delete order
$order->delete();
Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Order was successfully deleted'));
else // non loged-in customer request to secure outside delete order via link
Mage::getSingleton('adminhtml/session')->addError($this->__('Invalid request from non loged in customer'));
$this->_redirect('*/*/');
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
return false;
}
Thanks for replay let me check
– Rakesh Donga
2 days ago
but how can i will use?(same customer session exists)
– Rakesh Donga
2 days ago
$customer = Mage::getSingleton('customer/session')->getCustomer(); echo $customer->getId(); echo $customer->getName();
– Hassan Ali Shahzad
2 days ago
yes but your order delete code is not working
– Rakesh Donga
2 days ago
its not my code its magento code & it will work no issue in it to work with. You have to check order loaded or not because in above code i was using wrong $id instead of $order_id
– Hassan Ali Shahzad
2 days ago
add a comment |
I can give you hint how to complete this task say Levosoft is vendor & Customerdeleteorder is your custom module:
Add link in dashboard with following route:
/customerdeleteorder/order_id/21/customer_id/8
create basic file for module :
<?xml version="1.0"?>
<config>
<modules>
<Levosoft_Customerdeleteorder>
<active>true</active>
<codePool>local</codePool>
<version>1.0.0</version>
</Levosoft_Customerdeleteorder>
</modules>
</config>
Create front route for delete order in M1:
Levosoft_Customerdeleteorder/app/code/local/Levosoft/Customerdeleteorder/etc/config.xml
<?xml version="1.0"?>
<config>
<global>
</global>
<frontend>
<routers>
<levosoft_customerdeleteorder>
<use>standard</use>
<args>
<module>Levosoft_Customerdeleteorder</module>
<frontName>customerdeleteorder</frontName>
</args>
</levosoft_customerdeleteorder>
</routers>
</frontend>
</config>
Then you will create controller file in the following location to handle this request.
Levosoft_Customerdeleteorder/app/code/local/Levosoft/Customerdeleteorder/controllers/IndexController.php
<?php
class Levosoft_Customerdeleteorder_IndexController extends Mage_Core_Controller_Front_Action
public function indexAction()
$order_id = $this->getRequest()->getParam('order_id'); // create link in customer dashboard and pass this order id in this link
$order = Mage::getModel('sales/order')->load($order_id);
// here you can write your delete logic you can get delete order code easily
if (!$order->getId())
Mage::getSingleton('adminhtml/session')->addError($this->__('This order no longer exists.'));
$this->_redirect('*/*/');
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
return false;
$customer_id = $this->getRequest()->getParam('customer_id'); // also attach current customer id
// very important Now get customer session and match customer id with session id
if(same customer session exists)
// delete order
$order->delete();
Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Order was successfully deleted'));
else // non loged-in customer request to secure outside delete order via link
Mage::getSingleton('adminhtml/session')->addError($this->__('Invalid request from non loged in customer'));
$this->_redirect('*/*/');
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
return false;
}
Thanks for replay let me check
– Rakesh Donga
2 days ago
but how can i will use?(same customer session exists)
– Rakesh Donga
2 days ago
$customer = Mage::getSingleton('customer/session')->getCustomer(); echo $customer->getId(); echo $customer->getName();
– Hassan Ali Shahzad
2 days ago
yes but your order delete code is not working
– Rakesh Donga
2 days ago
its not my code its magento code & it will work no issue in it to work with. You have to check order loaded or not because in above code i was using wrong $id instead of $order_id
– Hassan Ali Shahzad
2 days ago
add a comment |
I can give you hint how to complete this task say Levosoft is vendor & Customerdeleteorder is your custom module:
Add link in dashboard with following route:
/customerdeleteorder/order_id/21/customer_id/8
create basic file for module :
<?xml version="1.0"?>
<config>
<modules>
<Levosoft_Customerdeleteorder>
<active>true</active>
<codePool>local</codePool>
<version>1.0.0</version>
</Levosoft_Customerdeleteorder>
</modules>
</config>
Create front route for delete order in M1:
Levosoft_Customerdeleteorder/app/code/local/Levosoft/Customerdeleteorder/etc/config.xml
<?xml version="1.0"?>
<config>
<global>
</global>
<frontend>
<routers>
<levosoft_customerdeleteorder>
<use>standard</use>
<args>
<module>Levosoft_Customerdeleteorder</module>
<frontName>customerdeleteorder</frontName>
</args>
</levosoft_customerdeleteorder>
</routers>
</frontend>
</config>
Then you will create controller file in the following location to handle this request.
Levosoft_Customerdeleteorder/app/code/local/Levosoft/Customerdeleteorder/controllers/IndexController.php
<?php
class Levosoft_Customerdeleteorder_IndexController extends Mage_Core_Controller_Front_Action
public function indexAction()
$order_id = $this->getRequest()->getParam('order_id'); // create link in customer dashboard and pass this order id in this link
$order = Mage::getModel('sales/order')->load($order_id);
// here you can write your delete logic you can get delete order code easily
if (!$order->getId())
Mage::getSingleton('adminhtml/session')->addError($this->__('This order no longer exists.'));
$this->_redirect('*/*/');
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
return false;
$customer_id = $this->getRequest()->getParam('customer_id'); // also attach current customer id
// very important Now get customer session and match customer id with session id
if(same customer session exists)
// delete order
$order->delete();
Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Order was successfully deleted'));
else // non loged-in customer request to secure outside delete order via link
Mage::getSingleton('adminhtml/session')->addError($this->__('Invalid request from non loged in customer'));
$this->_redirect('*/*/');
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
return false;
}
I can give you hint how to complete this task say Levosoft is vendor & Customerdeleteorder is your custom module:
Add link in dashboard with following route:
/customerdeleteorder/order_id/21/customer_id/8
create basic file for module :
<?xml version="1.0"?>
<config>
<modules>
<Levosoft_Customerdeleteorder>
<active>true</active>
<codePool>local</codePool>
<version>1.0.0</version>
</Levosoft_Customerdeleteorder>
</modules>
</config>
Create front route for delete order in M1:
Levosoft_Customerdeleteorder/app/code/local/Levosoft/Customerdeleteorder/etc/config.xml
<?xml version="1.0"?>
<config>
<global>
</global>
<frontend>
<routers>
<levosoft_customerdeleteorder>
<use>standard</use>
<args>
<module>Levosoft_Customerdeleteorder</module>
<frontName>customerdeleteorder</frontName>
</args>
</levosoft_customerdeleteorder>
</routers>
</frontend>
</config>
Then you will create controller file in the following location to handle this request.
Levosoft_Customerdeleteorder/app/code/local/Levosoft/Customerdeleteorder/controllers/IndexController.php
<?php
class Levosoft_Customerdeleteorder_IndexController extends Mage_Core_Controller_Front_Action
public function indexAction()
$order_id = $this->getRequest()->getParam('order_id'); // create link in customer dashboard and pass this order id in this link
$order = Mage::getModel('sales/order')->load($order_id);
// here you can write your delete logic you can get delete order code easily
if (!$order->getId())
Mage::getSingleton('adminhtml/session')->addError($this->__('This order no longer exists.'));
$this->_redirect('*/*/');
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
return false;
$customer_id = $this->getRequest()->getParam('customer_id'); // also attach current customer id
// very important Now get customer session and match customer id with session id
if(same customer session exists)
// delete order
$order->delete();
Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Order was successfully deleted'));
else // non loged-in customer request to secure outside delete order via link
Mage::getSingleton('adminhtml/session')->addError($this->__('Invalid request from non loged in customer'));
$this->_redirect('*/*/');
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
return false;
}
edited 2 days ago
answered 2 days ago
Hassan Ali ShahzadHassan Ali Shahzad
655317
655317
Thanks for replay let me check
– Rakesh Donga
2 days ago
but how can i will use?(same customer session exists)
– Rakesh Donga
2 days ago
$customer = Mage::getSingleton('customer/session')->getCustomer(); echo $customer->getId(); echo $customer->getName();
– Hassan Ali Shahzad
2 days ago
yes but your order delete code is not working
– Rakesh Donga
2 days ago
its not my code its magento code & it will work no issue in it to work with. You have to check order loaded or not because in above code i was using wrong $id instead of $order_id
– Hassan Ali Shahzad
2 days ago
add a comment |
Thanks for replay let me check
– Rakesh Donga
2 days ago
but how can i will use?(same customer session exists)
– Rakesh Donga
2 days ago
$customer = Mage::getSingleton('customer/session')->getCustomer(); echo $customer->getId(); echo $customer->getName();
– Hassan Ali Shahzad
2 days ago
yes but your order delete code is not working
– Rakesh Donga
2 days ago
its not my code its magento code & it will work no issue in it to work with. You have to check order loaded or not because in above code i was using wrong $id instead of $order_id
– Hassan Ali Shahzad
2 days ago
Thanks for replay let me check
– Rakesh Donga
2 days ago
Thanks for replay let me check
– Rakesh Donga
2 days ago
but how can i will use?
(same customer session exists)
– Rakesh Donga
2 days ago
but how can i will use?
(same customer session exists)
– Rakesh Donga
2 days ago
$customer = Mage::getSingleton('customer/session')->getCustomer(); echo $customer->getId(); echo $customer->getName();
– Hassan Ali Shahzad
2 days ago
$customer = Mage::getSingleton('customer/session')->getCustomer(); echo $customer->getId(); echo $customer->getName();
– Hassan Ali Shahzad
2 days ago
yes but your order delete code is not working
– Rakesh Donga
2 days ago
yes but your order delete code is not working
– Rakesh Donga
2 days ago
its not my code its magento code & it will work no issue in it to work with. You have to check order loaded or not because in above code i was using wrong $id instead of $order_id
– Hassan Ali Shahzad
2 days ago
its not my code its magento code & it will work no issue in it to work with. You have to check order loaded or not because in above code i was using wrong $id instead of $order_id
– Hassan Ali Shahzad
2 days ago
add a comment |
add code in config.xml file
<frontend>
<routers>
<extension>
<use>standard</use>
<args>
<module>Namespace_Extension</module>
<frontName>catalogue</frontName>
</args>
</extension>
</routers>
</frontend>
after order_id
pass in controller url
$delete = $this->getUrl('extension/index/index', array('order_id' => $_order->getIncrementId()));
after create controller and add below code
public function indexAction()
try
$order_id = $this->getRequest()->getParam('order_id');
$order=Mage::getModel('sales/order')->loadByIncrementId($order_id);
Mage::register('isSecureArea', true);
Mage::getModel('sales/order')->loadByIncrementId($order->getIncrementId())->delete();
Mage::getSingleton('customer/session')->addSuccess($this->__('Catalogue was successfully deleted'));
Mage::unregister('isSecureArea');
$this->_redirectReferer();
catch (Exception $e)
Mage::log("Order #" . $order_id . " could not be remvoved: " . $e->getMessage(), null, "order-delete.log");
add a comment |
add code in config.xml file
<frontend>
<routers>
<extension>
<use>standard</use>
<args>
<module>Namespace_Extension</module>
<frontName>catalogue</frontName>
</args>
</extension>
</routers>
</frontend>
after order_id
pass in controller url
$delete = $this->getUrl('extension/index/index', array('order_id' => $_order->getIncrementId()));
after create controller and add below code
public function indexAction()
try
$order_id = $this->getRequest()->getParam('order_id');
$order=Mage::getModel('sales/order')->loadByIncrementId($order_id);
Mage::register('isSecureArea', true);
Mage::getModel('sales/order')->loadByIncrementId($order->getIncrementId())->delete();
Mage::getSingleton('customer/session')->addSuccess($this->__('Catalogue was successfully deleted'));
Mage::unregister('isSecureArea');
$this->_redirectReferer();
catch (Exception $e)
Mage::log("Order #" . $order_id . " could not be remvoved: " . $e->getMessage(), null, "order-delete.log");
add a comment |
add code in config.xml file
<frontend>
<routers>
<extension>
<use>standard</use>
<args>
<module>Namespace_Extension</module>
<frontName>catalogue</frontName>
</args>
</extension>
</routers>
</frontend>
after order_id
pass in controller url
$delete = $this->getUrl('extension/index/index', array('order_id' => $_order->getIncrementId()));
after create controller and add below code
public function indexAction()
try
$order_id = $this->getRequest()->getParam('order_id');
$order=Mage::getModel('sales/order')->loadByIncrementId($order_id);
Mage::register('isSecureArea', true);
Mage::getModel('sales/order')->loadByIncrementId($order->getIncrementId())->delete();
Mage::getSingleton('customer/session')->addSuccess($this->__('Catalogue was successfully deleted'));
Mage::unregister('isSecureArea');
$this->_redirectReferer();
catch (Exception $e)
Mage::log("Order #" . $order_id . " could not be remvoved: " . $e->getMessage(), null, "order-delete.log");
add code in config.xml file
<frontend>
<routers>
<extension>
<use>standard</use>
<args>
<module>Namespace_Extension</module>
<frontName>catalogue</frontName>
</args>
</extension>
</routers>
</frontend>
after order_id
pass in controller url
$delete = $this->getUrl('extension/index/index', array('order_id' => $_order->getIncrementId()));
after create controller and add below code
public function indexAction()
try
$order_id = $this->getRequest()->getParam('order_id');
$order=Mage::getModel('sales/order')->loadByIncrementId($order_id);
Mage::register('isSecureArea', true);
Mage::getModel('sales/order')->loadByIncrementId($order->getIncrementId())->delete();
Mage::getSingleton('customer/session')->addSuccess($this->__('Catalogue was successfully deleted'));
Mage::unregister('isSecureArea');
$this->_redirectReferer();
catch (Exception $e)
Mage::log("Order #" . $order_id . " could not be remvoved: " . $e->getMessage(), null, "order-delete.log");
answered 2 days ago
Rakesh DongaRakesh Donga
2,393316
2,393316
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268286%2fmagento-1-9-remove-order-specific-in-anchor-tag-url%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You can delete it from Database.
– Dharmesh Hariyani
2 days ago
no i want to frontend by customer
– Rakesh Donga
2 days ago
Than you need to write custom controller action and delete code.
– Dharmesh Hariyani
2 days ago
You want to give delete order option to every customer ?
– Hassan Ali Shahzad
2 days ago
Yes every customer to given this option
– Rakesh Donga
2 days ago