2

I have created two custom module in magento and use sales_order_place_after event in both module.

For example first module is Custom_Guest(community) and second is Assel_Sms (local). sales_order_place_after event in Assel_Sms execute first and then Custom_Guest but I want to execute sales_order_place_after event of Assel_Sms after Custom_Guest event.

Custom_Guset.xml code is :

<?xml version="1.0"?>
<config>
 <modules>
 <Custom_Guest>
 <active>true</active>
 <codePool>community</codePool>
 <depends>
 <Assel_Sms />
 </depends>
 </Custom_Guest>
 </modules>
</config>

How to execute Assel_Sms plugin's event after Custom_Guest plugin's event execution?

Rohit Kundale
3,3921 gold badge22 silver badges28 bronze badges
asked Feb 27, 2016 at 11:40

2 Answers 2

4

In your Assel_Sms.xml add

<depends>
 <Custom_Guest />
</depends>

This mean that your Assel_Sms module configuration will be loaded after the Custom_Guest configuration.

answered Feb 27, 2016 at 14:28
2
  • The Assel_Sms.xml is the module configuration file in app/etc/modules? Commented Nov 27, 2017 at 15:40
  • Yes, app/etc/modules is the location Commented Nov 27, 2017 at 21:45
0

/etc/module.xml

<sequence > <Custom_Guest /> </sequence>

vendor_module.xml

<depends> <Custom_Guest/> </depends>

We can also use this, but question is which way is better.
answered Oct 21, 2024 at 5:12

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.