Observer
- With our customized observer, it is possible to override the existing class or implement new business logic:
<?php
namespace MyProject\Import\Product\Observers;
/**
* Observer that creates/updates the product's website relations.
*/
class ProductWebsiteObserver extends \TechDivision\Import\Product\Observers\ProductWebsiteObserver (1)
{
/**
* Process the observer's business logic.
*
* @return array The processed row
*/
protected function process() (2)
{
// custom code here
}
}
1 | Custom override Observer class extended by the original import observer \TechDivision\Import\Product\Observers\ProductWebsiteObserver |
2 | Process method to implement new business locic or override existing logic |