Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
448 views

I want to run an Event Observer once after my custom module is installed

Is there a way to run a function (to call an api) once after a module is installed? It could be during admin page load or in the install script. But i wish to run only once. Thanks
subhas's user avatar
  • 53
0 votes
2 answers
2k views

Observer for Admin while creating an order

Is it possible to have an observer while making an order in the admin panel? I'm trying to change the 'purchased from' depending on which customer group the customer is in. So if a customer is in ...
user2963379's user avatar
3 votes
1 answer
2k views

How to add default header and footer to a custom mail on magento 2.2

I have created a module where I send a custom mail. For this, I have a custom email template. Now what I want to do is to include the default header and footer that appears in all my Magento emails, ...
Alin Lupoiu's user avatar
  • 2,682
1 vote
2 answers
8k views

How to change the price in quote while adding product to cart?

I want to apply a custom price for the current order. I read that I should use sales_quote_add_item, But its looks like I am doing something wrong. I found some tutorials for magento1 but not for ...
Rahul Chaurasia's user avatar
0 votes
1 answer
2k views

Magento 2: Can we call one observer in another observer?

I already have 1 observer on checkout_cart_product_add_after . Before end of $this I woule like to call another observer which is located in different module magento\app\code\Custom\Module\Observer\...
Jackson's user avatar
  • 9,969
4 votes
1 answer
10k views

Magento 2: Check condition on Click of "Proceed to Checkout"

May be I need to create Event Observer. I would like to check Product's Type Condition & Display Message Accordingly on Shopping Cart Page. <event name="...
Jackson's user avatar
  • 9,969