문제

Magento가 상품에 대한 상태를 설정하는 방법을 변경하기 위해 핵심을 확장하려고합니다.본질적으로 관리자가 제품의 상태를 비활성화 할 제품을 변경하려고하면 제품이 EPOS 시스템에서 재고가 있는지 확인하고 오류를 던지십시오.

제품 상태가 설정되고 해당 기능을 다시 작성하는 모델을 확장하려고했습니다.문제는 이것을 어디에서나 찾을 수 없습니다.magento_core_model_product에는 아무것도 없습니다.UpdateProductStatus라는 Mage_Catalog_Model_Product_Model_Product_Status의 함수를 발견했으나 이것은 올바르지 않습니다.

이 기능을 찾으려면 누구나 알아야 할 위치를 알고 있습니까?

도움이 되었습니까?

해결책

After a bit of research, I found that Magento generates all the getters and setters pragmatically, through extensive use of the __call() function, which is called when a function that isn't defined is called.

To modify functionality of a getter or setter, simply define the function you want to modify in your rewrite of the class, and this will be called before the __call(), essentially rewriting the default functionality, in a roundabout way.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top