All Questions

Filter by
Sorted by
Tagged with
0
votes
2answers
22 views

Magento 2.3: How to get tracking info from an order in observer

We use ShipStation to send tracking information to Magento and I'm trying to retrieve the order shipping / tracking information once this is saved to the order. If I use ...
0
votes
0answers
27 views

How to create an event-observer that will help print a log when admin modifies some customer details?

I want to design an event and an observer that will print a separate log containing the details of the fields that was modified by the admin in admin panel (under all Customers -> edit). How can I ...
0
votes
1answer
27 views

Error when observer is executed after order is placed

I created a module in order to save order data to a custom table: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="...
0
votes
1answer
29 views

Creating event and observer for an action at backend of Magento 2 [duplicate]

How to create an custom event and observer for that event at backend in Magento2. For example I want to create an event that whenever an admin deletes a customer profile a separate log file is ...
0
votes
1answer
31 views

What are the three different kinds of Plugins available and their difference with observer in magento2?

I want to know the different kinds of plugins, their utilities and difference along with their difference with observer in magento2.
2
votes
2answers
34 views

Observer to fire on customer login Page Url (baseUrl.“customer/account/login”) magento 2

I want to fire observer on customer login Page url(baseUrl."customer/account/login") magento 2. I tried customer_login event but it's firing after customer login. etc/events.xml <?xml version="...
0
votes
0answers
19 views

Is controller_front_send_response_before the only event in Magento 2?

I realize this question sounds dumb, but I can't seem to get any other event to fire. What I'm trying to do is set up an observer to fire when the checkout is accessed. We have a few conditions that ...
0
votes
1answer
41 views

Magento2 : Which Magento Event for Update cart quantity only?

I have work on the task in which I need to handle quote item, here I have use two event checkout_cart_add_product_complete checkout_cart_update_item_complete here it work fine, But when I ...
0
votes
1answer
62 views

Trigger checkout validation only on change event

So I have these code to validate a generated field in the shipping address: VAT number The requireJs: app/code/VendorName/Checkout/view/frontend/requirejs-config.js var config = { config: { ...
1
vote
1answer
23 views

When I use “echo” in vendor methods - products not showing, but work fine without it

I got the next code: public function getProductCollection() { if (isset($this->_productCollections[$this->getCurrentCategory()->getId()])) { $collection = $this->...
0
votes
2answers
53 views

Magento 2 origData null in customer_save_before

I have created an observer on the customer_save_before event. Surprisingly $observer->getEvent()->getCustomer()->getOrigData() is null. Is my expectation wrong? This is also happening for ...
0
votes
2answers
35 views

Set the if condition to true in PHPUnit test case

I have an if condition inside an observer as follows public function execute(Observer $observer) { if ($observer->getData('status') == Status::REQUIRED) { //implementation ...
1
vote
0answers
17 views

checkout_cart_product_add_after fired only once for grouped product

I m observeing checkout_cart_product_add_after event to modify quote item. But it seems it fired only once no matter how many qty or item i have added from detail page. My goal is to change each ...
1
vote
0answers
23 views

How to debug checkout_cart_product_add_after event on exit

I am trying to exit point on observer for checkout_cart_product_add_after event. But it always refresh after item added to cart. Any way to print data when debug this event and not refresh the page. ...
0
votes
0answers
31 views

Send an email upon order status change

I'm trying to find a way to programtically send out an email, that doesn't depend on some front-end or admin behavior. Ideally, this email would be sent when the order status is changed to 'processing'...
0
votes
0answers
39 views

Magento 2 cookie not set when full cache enable

I have created one helper file that get, set and delete cookie. This helper file I called in observer to set cookie. The helper file called but cookie not set when full cache enabled. <?php ...
2
votes
1answer
53 views

How to call dispatch events specific for Mobile?

How to call dispatch event for REST API's only in mobile devices.
0
votes
1answer
41 views

checkout_onepage_controller_success_action event save entry in custom table on order success in magento2

i have created event and observer checkout_onepage_controller_success_action now I want to save data in the custom table of order success when order is placed event.xml <?xml version="1.0"?> &...
1
vote
3answers
124 views

Magento2: how to debug in sales_order_place_after event

registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Hafiz_Sms', __DIR__ ); etc/events....
0
votes
1answer
81 views

Set cookie in Observer Not working when full page Cache is enabled

I have to set category id in cookie when customer go to Category page and update cookie with category id when visit again using seperate module. I have created Observer and set cookie there but not ...
1
vote
1answer
58 views

Update custom data for customer

I'm trying to Create new customer attribute "last_login_at" to store customer last login date time. My requirement is to update "last_login_at" data for the customer after the customer logged in. I ...
6
votes
1answer
140 views

Save and display ui_component's custom field

I've added custom text box to source form using below code. <field name="delivery_time" formElement="input" sortOrder="70"> <settings> <dataType>text</...
0
votes
1answer
321 views

Magento 2: Get Order Info From Invoice

Using Magento 2.3, I'm trying to get a custom attribute from the order and save it to the invoice when the invoice is first created. I already have the custom attributes setup and saving to the ...
0
votes
1answer
131 views

Magento 2.3 - event when catalog price rules are applied

I am working in a module which extends catalogrule feature In this module, we apply some changes to price calculation process. Right now, it is working when a product is saved in admin. We have ...