Skip to content

Instantly share code, notes, and snippets.

@svenvarkel
Created September 14, 2013 05:41
Show Gist options
  • Save svenvarkel/6559095 to your computer and use it in GitHub Desktop.
Save svenvarkel/6559095 to your computer and use it in GitHub Desktop.
My_Custom_Model_Product
class My_Custom_Model_Product extends Mage_Catalog_Model_Product{
use My_Custom_Trait_Extension_A_Model_Product, My_Custom_Trait_Extension_B_Model_Product;
public function doSomethingCustomerSpecific(){
//here we do smth customer specific
// AND now it's possible to use methods from traits -
// it means - from Extension_A and Extension_B Product models
$this->fixSomethingByProduct();
}
public function getSomethingFromSomewhere(){
//Call method from Extension_A_Model_Product
$this->transformProductDescription();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment