event observer for the creation of new productsHow can I differentiate between product creation and saving existing products?Event Observer Module for UpsellHow to create an new observer on the event catalog_product_save_beforeHow to create/update bulk of products at a time programmaticallyevent-observer conflict: catalog_product_collection_load_beforeCollection items don't trigger product load event observers or backend models, but can they?Event Observer for specific storeSet custom price of product when adding to cart code not workingSimple Observer not firing on eventEvent observer not workingEvent for before invoice creation magento 2
Is it possible to do 50 km distance without any previous training?
Can I ask the recruiters in my resume to put the reason why I am rejected?
Doing something right before you need it - expression for this?
Modeling an IP Address
Intersection point of 2 lines defined by 2 points each
Add text to same line using sed
Replacing matching entries in one column of a file by another column from a different file
Approximately how much travel time was saved by the opening of the Suez Canal in 1869?
What is the word for reserving something for yourself before others do?
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
Why can't I see bouncing of a switch on an oscilloscope?
Has there ever been an airliner design involving reducing generator load by installing solar panels?
LWC SFDX source push error TypeError: LWC1009: decl.moveTo is not a function
What would happen to a modern skyscraper if it rains micro blackholes?
Is it legal for company to use my work email to pretend I still work there?
Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?
How much RAM could one put in a typical 80386 setup?
Do infinite dimensional systems make sense?
How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?
How to determine what difficulty is right for the game?
RSA: Danger of using p to create q
High voltage LED indicator 40-1000 VDC without additional power supply
strTok function (thread safe, supports empty tokens, doesn't change string)
Can a vampire attack twice with their claws using Multiattack?
event observer for the creation of new products
How can I differentiate between product creation and saving existing products?Event Observer Module for UpsellHow to create an new observer on the event catalog_product_save_beforeHow to create/update bulk of products at a time programmaticallyevent-observer conflict: catalog_product_collection_load_beforeCollection items don't trigger product load event observers or backend models, but can they?Event Observer for specific storeSet custom price of product when adding to cart code not workingSimple Observer not firing on eventEvent observer not workingEvent for before invoice creation magento 2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to run the observer only when the product is created and not when it is updated. I found this discussion: product-creation-and-saving-existing-products and I followed Tim Ramsey's advice.
So I put this in the config.xml
<global>
<models>
<wally_logproductupdate>
<class>Wally_LogProductUpdate_Model</class>
</wally_logproductupdate>
</models>
<events>
<catalog_product_save_before>
<observers>
<wally_logproductupdate>
<class>wally_logproductupdate/observer</class>
<method>beforeSave</method>
<type>singleton</type>
</wally_logproductupdate>
</observers>
</catalog_product_save_before>
</events>
</global>
and this in Observer.php:
class Wally_LogProductUpdate_Model_Observer
protected $isNew = false;
public function beforeSave($observer)
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->isNew = true;
public function afterSave($observer)
$product = $observer->getEvent()->getProduct();
if ($this->isNew)
$name = $product->getName();
$sku = $product->getSku();
$price = $product->getPrice();
Mage::log("[$name ($sku) $price] aggiornato", null, 'product-updates.log');
The problem is that the log file is not updated when a new product is created.
How can i solve?
magento-1.9 event-observer
|
show 3 more comments
I want to run the observer only when the product is created and not when it is updated. I found this discussion: product-creation-and-saving-existing-products and I followed Tim Ramsey's advice.
So I put this in the config.xml
<global>
<models>
<wally_logproductupdate>
<class>Wally_LogProductUpdate_Model</class>
</wally_logproductupdate>
</models>
<events>
<catalog_product_save_before>
<observers>
<wally_logproductupdate>
<class>wally_logproductupdate/observer</class>
<method>beforeSave</method>
<type>singleton</type>
</wally_logproductupdate>
</observers>
</catalog_product_save_before>
</events>
</global>
and this in Observer.php:
class Wally_LogProductUpdate_Model_Observer
protected $isNew = false;
public function beforeSave($observer)
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->isNew = true;
public function afterSave($observer)
$product = $observer->getEvent()->getProduct();
if ($this->isNew)
$name = $product->getName();
$sku = $product->getSku();
$price = $product->getPrice();
Mage::log("[$name ($sku) $price] aggiornato", null, 'product-updates.log');
The problem is that the log file is not updated when a new product is created.
How can i solve?
magento-1.9 event-observer
What is your magento version?
– Sohel Rana
yesterday
My magento version is 1.9.3.9
– Mastafis
yesterday
1
log file will not create becauseafterSave
function never called! you need to call$this->afterSave();
after checkisNew
.
– Pawan
yesterday
1
you need to pass$observer
as parameter like$this->afterSave($observer);
– Pawan
yesterday
1
you can also eliminate ` $this->isNew = true;` flag and direct call$this->afterSave($observer);
in if condition!
– Pawan
yesterday
|
show 3 more comments
I want to run the observer only when the product is created and not when it is updated. I found this discussion: product-creation-and-saving-existing-products and I followed Tim Ramsey's advice.
So I put this in the config.xml
<global>
<models>
<wally_logproductupdate>
<class>Wally_LogProductUpdate_Model</class>
</wally_logproductupdate>
</models>
<events>
<catalog_product_save_before>
<observers>
<wally_logproductupdate>
<class>wally_logproductupdate/observer</class>
<method>beforeSave</method>
<type>singleton</type>
</wally_logproductupdate>
</observers>
</catalog_product_save_before>
</events>
</global>
and this in Observer.php:
class Wally_LogProductUpdate_Model_Observer
protected $isNew = false;
public function beforeSave($observer)
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->isNew = true;
public function afterSave($observer)
$product = $observer->getEvent()->getProduct();
if ($this->isNew)
$name = $product->getName();
$sku = $product->getSku();
$price = $product->getPrice();
Mage::log("[$name ($sku) $price] aggiornato", null, 'product-updates.log');
The problem is that the log file is not updated when a new product is created.
How can i solve?
magento-1.9 event-observer
I want to run the observer only when the product is created and not when it is updated. I found this discussion: product-creation-and-saving-existing-products and I followed Tim Ramsey's advice.
So I put this in the config.xml
<global>
<models>
<wally_logproductupdate>
<class>Wally_LogProductUpdate_Model</class>
</wally_logproductupdate>
</models>
<events>
<catalog_product_save_before>
<observers>
<wally_logproductupdate>
<class>wally_logproductupdate/observer</class>
<method>beforeSave</method>
<type>singleton</type>
</wally_logproductupdate>
</observers>
</catalog_product_save_before>
</events>
</global>
and this in Observer.php:
class Wally_LogProductUpdate_Model_Observer
protected $isNew = false;
public function beforeSave($observer)
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->isNew = true;
public function afterSave($observer)
$product = $observer->getEvent()->getProduct();
if ($this->isNew)
$name = $product->getName();
$sku = $product->getSku();
$price = $product->getPrice();
Mage::log("[$name ($sku) $price] aggiornato", null, 'product-updates.log');
The problem is that the log file is not updated when a new product is created.
How can i solve?
magento-1.9 event-observer
magento-1.9 event-observer
edited 23 hours ago
Rakesh Donga
2,393316
2,393316
asked yesterday
MastafisMastafis
375
375
What is your magento version?
– Sohel Rana
yesterday
My magento version is 1.9.3.9
– Mastafis
yesterday
1
log file will not create becauseafterSave
function never called! you need to call$this->afterSave();
after checkisNew
.
– Pawan
yesterday
1
you need to pass$observer
as parameter like$this->afterSave($observer);
– Pawan
yesterday
1
you can also eliminate ` $this->isNew = true;` flag and direct call$this->afterSave($observer);
in if condition!
– Pawan
yesterday
|
show 3 more comments
What is your magento version?
– Sohel Rana
yesterday
My magento version is 1.9.3.9
– Mastafis
yesterday
1
log file will not create becauseafterSave
function never called! you need to call$this->afterSave();
after checkisNew
.
– Pawan
yesterday
1
you need to pass$observer
as parameter like$this->afterSave($observer);
– Pawan
yesterday
1
you can also eliminate ` $this->isNew = true;` flag and direct call$this->afterSave($observer);
in if condition!
– Pawan
yesterday
What is your magento version?
– Sohel Rana
yesterday
What is your magento version?
– Sohel Rana
yesterday
My magento version is 1.9.3.9
– Mastafis
yesterday
My magento version is 1.9.3.9
– Mastafis
yesterday
1
1
log file will not create because
afterSave
function never called! you need to call $this->afterSave();
after check isNew
.– Pawan
yesterday
log file will not create because
afterSave
function never called! you need to call $this->afterSave();
after check isNew
.– Pawan
yesterday
1
1
you need to pass
$observer
as parameter like $this->afterSave($observer);
– Pawan
yesterday
you need to pass
$observer
as parameter like $this->afterSave($observer);
– Pawan
yesterday
1
1
you can also eliminate ` $this->isNew = true;` flag and direct call
$this->afterSave($observer);
in if condition!– Pawan
yesterday
you can also eliminate ` $this->isNew = true;` flag and direct call
$this->afterSave($observer);
in if condition!– Pawan
yesterday
|
show 3 more comments
2 Answers
2
active
oldest
votes
Log file will not create because afterSave
function never called!
you need to call $this->afterSave($observer);
after check isNew
.
Like:
public function beforeSave($observer)
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->afterSave($observer);
Note: you can also eliminate $this->isNew = true;
flag and direct call $this->afterSave($observer);
in if condition!
add a comment |
Try the following:
app/code/local/SR/MagentoCommunity/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<SR_MagentoCommunity>
<version>0.0.0.2</version>
</SR_MagentoCommunity>
</modules>
<global>
<models>
<sr_magentocommunity>
<class>SR_MagentoCommunity_Model</class>
</sr_magentocommunity>
</models>
<events>
<catalog_product_save_before>
<observers>
<sr_catalog_product_save_before>
<class>sr_magentocommunity/observer</class>
<method>catalogProductSaveBefore</method>
<type>singleton</type>
</sr_catalog_product_save_before>
</observers>
</catalog_product_save_before>
<catalog_product_save_after>
<observers>
<sr_catalog_product_save_after>
<class>sr_magentocommunity/observer</class>
<method>catalogProductSaveAfter</method>
<type>singleton</type>
</sr_catalog_product_save_after>
</observers>
</catalog_product_save_after>
</events>
</global>
</config>
app/code/local/SR/MagentoCommunity/Model/Observer.php
<?php
class SR_MagentoCommunity_Model_Observer
protected $isNew = false;
/**
* @param Varien_Event_Observer $observer
* @return $this
*/
public function catalogProductSaveBefore(Varien_Event_Observer $observer)
/** @var Mage_Catalog_Model_Product $product */
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->isNew = true;
return $this;
/**
* @param Varien_Event_Observer $observer
* @return $this
*/
public function catalogProductSaveAfter(Varien_Event_Observer $observer)
/** @var Mage_Catalog_Model_Product $product */
$product = $observer->getEvent()->getProduct();
if ($this->isNew)
$name = $product->getName();
$sku = $product->getSku();
$price = $product->getPrice();
error_log("[$name ($sku) $price] aggiornato");
Mage::log("[$name ($sku) $price] aggiornato", null, 'product-updates.log');
return $this;
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%2f268827%2fevent-observer-for-the-creation-of-new-products%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
Log file will not create because afterSave
function never called!
you need to call $this->afterSave($observer);
after check isNew
.
Like:
public function beforeSave($observer)
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->afterSave($observer);
Note: you can also eliminate $this->isNew = true;
flag and direct call $this->afterSave($observer);
in if condition!
add a comment |
Log file will not create because afterSave
function never called!
you need to call $this->afterSave($observer);
after check isNew
.
Like:
public function beforeSave($observer)
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->afterSave($observer);
Note: you can also eliminate $this->isNew = true;
flag and direct call $this->afterSave($observer);
in if condition!
add a comment |
Log file will not create because afterSave
function never called!
you need to call $this->afterSave($observer);
after check isNew
.
Like:
public function beforeSave($observer)
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->afterSave($observer);
Note: you can also eliminate $this->isNew = true;
flag and direct call $this->afterSave($observer);
in if condition!
Log file will not create because afterSave
function never called!
you need to call $this->afterSave($observer);
after check isNew
.
Like:
public function beforeSave($observer)
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->afterSave($observer);
Note: you can also eliminate $this->isNew = true;
flag and direct call $this->afterSave($observer);
in if condition!
answered yesterday
PawanPawan
2,0312618
2,0312618
add a comment |
add a comment |
Try the following:
app/code/local/SR/MagentoCommunity/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<SR_MagentoCommunity>
<version>0.0.0.2</version>
</SR_MagentoCommunity>
</modules>
<global>
<models>
<sr_magentocommunity>
<class>SR_MagentoCommunity_Model</class>
</sr_magentocommunity>
</models>
<events>
<catalog_product_save_before>
<observers>
<sr_catalog_product_save_before>
<class>sr_magentocommunity/observer</class>
<method>catalogProductSaveBefore</method>
<type>singleton</type>
</sr_catalog_product_save_before>
</observers>
</catalog_product_save_before>
<catalog_product_save_after>
<observers>
<sr_catalog_product_save_after>
<class>sr_magentocommunity/observer</class>
<method>catalogProductSaveAfter</method>
<type>singleton</type>
</sr_catalog_product_save_after>
</observers>
</catalog_product_save_after>
</events>
</global>
</config>
app/code/local/SR/MagentoCommunity/Model/Observer.php
<?php
class SR_MagentoCommunity_Model_Observer
protected $isNew = false;
/**
* @param Varien_Event_Observer $observer
* @return $this
*/
public function catalogProductSaveBefore(Varien_Event_Observer $observer)
/** @var Mage_Catalog_Model_Product $product */
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->isNew = true;
return $this;
/**
* @param Varien_Event_Observer $observer
* @return $this
*/
public function catalogProductSaveAfter(Varien_Event_Observer $observer)
/** @var Mage_Catalog_Model_Product $product */
$product = $observer->getEvent()->getProduct();
if ($this->isNew)
$name = $product->getName();
$sku = $product->getSku();
$price = $product->getPrice();
error_log("[$name ($sku) $price] aggiornato");
Mage::log("[$name ($sku) $price] aggiornato", null, 'product-updates.log');
return $this;
add a comment |
Try the following:
app/code/local/SR/MagentoCommunity/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<SR_MagentoCommunity>
<version>0.0.0.2</version>
</SR_MagentoCommunity>
</modules>
<global>
<models>
<sr_magentocommunity>
<class>SR_MagentoCommunity_Model</class>
</sr_magentocommunity>
</models>
<events>
<catalog_product_save_before>
<observers>
<sr_catalog_product_save_before>
<class>sr_magentocommunity/observer</class>
<method>catalogProductSaveBefore</method>
<type>singleton</type>
</sr_catalog_product_save_before>
</observers>
</catalog_product_save_before>
<catalog_product_save_after>
<observers>
<sr_catalog_product_save_after>
<class>sr_magentocommunity/observer</class>
<method>catalogProductSaveAfter</method>
<type>singleton</type>
</sr_catalog_product_save_after>
</observers>
</catalog_product_save_after>
</events>
</global>
</config>
app/code/local/SR/MagentoCommunity/Model/Observer.php
<?php
class SR_MagentoCommunity_Model_Observer
protected $isNew = false;
/**
* @param Varien_Event_Observer $observer
* @return $this
*/
public function catalogProductSaveBefore(Varien_Event_Observer $observer)
/** @var Mage_Catalog_Model_Product $product */
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->isNew = true;
return $this;
/**
* @param Varien_Event_Observer $observer
* @return $this
*/
public function catalogProductSaveAfter(Varien_Event_Observer $observer)
/** @var Mage_Catalog_Model_Product $product */
$product = $observer->getEvent()->getProduct();
if ($this->isNew)
$name = $product->getName();
$sku = $product->getSku();
$price = $product->getPrice();
error_log("[$name ($sku) $price] aggiornato");
Mage::log("[$name ($sku) $price] aggiornato", null, 'product-updates.log');
return $this;
add a comment |
Try the following:
app/code/local/SR/MagentoCommunity/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<SR_MagentoCommunity>
<version>0.0.0.2</version>
</SR_MagentoCommunity>
</modules>
<global>
<models>
<sr_magentocommunity>
<class>SR_MagentoCommunity_Model</class>
</sr_magentocommunity>
</models>
<events>
<catalog_product_save_before>
<observers>
<sr_catalog_product_save_before>
<class>sr_magentocommunity/observer</class>
<method>catalogProductSaveBefore</method>
<type>singleton</type>
</sr_catalog_product_save_before>
</observers>
</catalog_product_save_before>
<catalog_product_save_after>
<observers>
<sr_catalog_product_save_after>
<class>sr_magentocommunity/observer</class>
<method>catalogProductSaveAfter</method>
<type>singleton</type>
</sr_catalog_product_save_after>
</observers>
</catalog_product_save_after>
</events>
</global>
</config>
app/code/local/SR/MagentoCommunity/Model/Observer.php
<?php
class SR_MagentoCommunity_Model_Observer
protected $isNew = false;
/**
* @param Varien_Event_Observer $observer
* @return $this
*/
public function catalogProductSaveBefore(Varien_Event_Observer $observer)
/** @var Mage_Catalog_Model_Product $product */
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->isNew = true;
return $this;
/**
* @param Varien_Event_Observer $observer
* @return $this
*/
public function catalogProductSaveAfter(Varien_Event_Observer $observer)
/** @var Mage_Catalog_Model_Product $product */
$product = $observer->getEvent()->getProduct();
if ($this->isNew)
$name = $product->getName();
$sku = $product->getSku();
$price = $product->getPrice();
error_log("[$name ($sku) $price] aggiornato");
Mage::log("[$name ($sku) $price] aggiornato", null, 'product-updates.log');
return $this;
Try the following:
app/code/local/SR/MagentoCommunity/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<SR_MagentoCommunity>
<version>0.0.0.2</version>
</SR_MagentoCommunity>
</modules>
<global>
<models>
<sr_magentocommunity>
<class>SR_MagentoCommunity_Model</class>
</sr_magentocommunity>
</models>
<events>
<catalog_product_save_before>
<observers>
<sr_catalog_product_save_before>
<class>sr_magentocommunity/observer</class>
<method>catalogProductSaveBefore</method>
<type>singleton</type>
</sr_catalog_product_save_before>
</observers>
</catalog_product_save_before>
<catalog_product_save_after>
<observers>
<sr_catalog_product_save_after>
<class>sr_magentocommunity/observer</class>
<method>catalogProductSaveAfter</method>
<type>singleton</type>
</sr_catalog_product_save_after>
</observers>
</catalog_product_save_after>
</events>
</global>
</config>
app/code/local/SR/MagentoCommunity/Model/Observer.php
<?php
class SR_MagentoCommunity_Model_Observer
protected $isNew = false;
/**
* @param Varien_Event_Observer $observer
* @return $this
*/
public function catalogProductSaveBefore(Varien_Event_Observer $observer)
/** @var Mage_Catalog_Model_Product $product */
$product = $observer->getEvent()->getProduct();
if ($product->isObjectNew())
$this->isNew = true;
return $this;
/**
* @param Varien_Event_Observer $observer
* @return $this
*/
public function catalogProductSaveAfter(Varien_Event_Observer $observer)
/** @var Mage_Catalog_Model_Product $product */
$product = $observer->getEvent()->getProduct();
if ($this->isNew)
$name = $product->getName();
$sku = $product->getSku();
$price = $product->getPrice();
error_log("[$name ($sku) $price] aggiornato");
Mage::log("[$name ($sku) $price] aggiornato", null, 'product-updates.log');
return $this;
answered yesterday
Sohel RanaSohel Rana
23.1k34461
23.1k34461
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%2f268827%2fevent-observer-for-the-creation-of-new-products%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
What is your magento version?
– Sohel Rana
yesterday
My magento version is 1.9.3.9
– Mastafis
yesterday
1
log file will not create because
afterSave
function never called! you need to call$this->afterSave();
after checkisNew
.– Pawan
yesterday
1
you need to pass
$observer
as parameter like$this->afterSave($observer);
– Pawan
yesterday
1
you can also eliminate ` $this->isNew = true;` flag and direct call
$this->afterSave($observer);
in if condition!– Pawan
yesterday