Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Event/observer is used to work dynamically with Magento without altering the core code.
3
votes
Magento 1.9 : What event used before order placed and get shipping information for the order
You can use sales_order_place_before event before placing the order.
Also, for getting shipping description for the order, you can use below code in your observer.
$order = $observer->getEvent()->ge …
3
votes
Accepted
Magento 1.9: Print variable value in Mage::Log
Try below code in your observer, it'll work for you.
public function checkproductinorder($Observer)
{
$order = $Observer->getEvent()->getOrder();
$items = $order->getAllItems();
$skus = a …
1
vote
Accepted
Magento 2 how to check if customer changes his password?
You can check/compare customer's old password and updated password value by below code.
<?php
namespace Vendor\Magento\Observer;
use Magento\Framework\Event\ObserverInterface;
class CustomerLogin …
2
votes
Accepted
Magento 2 : Event when customer in backend is created and updated
You can use customer_register_success event for create account event in your custom module.
Also, below is the reference link for all the events list available in Magento 2.
https://www.rakeshjes …
2
votes
Magneto 2 How to call Helper function in observer file
For using common function, the best approach is to create a custom module and use Magento 2 Helper which gives you one of the best opportunities to override core files and pre-defined functions of the …
4
votes
Accepted
Magento2 : Product not saving set custom attribute using Observer
I've saved the custom attribute value to the product with the below code.
class FilterProduct implements ObserverInterface {
/**
* @var \Magento\ConfigurableProduct\Model\Product\Type\Confi …
3
votes
Magento 1.9.X: Add customer comment to order using observer
You can use the below code in your observer to add order comment:
$comment = "Comment to be added in the order";
$order->addStatusHistoryComment($comment)
->setIsVisibleOnFront(false)
…
1
vote
What event should I use for Customer delete observer in Magento 2.3?
You can use "customer_delete_after" event in Magento 2.3.
<event name="customer_delete_after">
<observer name="ddg_remove_contact" instance="Dotdigitalgroup\Email\Observer\Customer\RemoveContact …