You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to create a custom "rule" surcharge that extends the one in isotope_rules. I registered my class as the "rule" model type in config.php but when this line runs on the front end, TypeAgent throws an exception in the constructor because it can't find Isotope\Model\ProductCollectionSurcharge\Rule in the static $arrModelTypes array. I believe this would be easily solved if the code at this line used getClassForModelType method to see what class is set as the "rule" model type first.
I wanted to extend the Isotope\Model\ProductCollectionSurcharge\Rule methods to implement my own logic for specific product classes. I figured changing line 60 to this would work, and most likely not break anything down the line, or am I mistaken?
$strClass = static::getClassForModelType('rule');
$objSurcharge = new $strClass();
I was trying to create a custom "rule" surcharge that extends the one in isotope_rules. I registered my class as the "rule" model type in config.php but when this line runs on the front end, TypeAgent throws an exception in the constructor because it can't find Isotope\Model\ProductCollectionSurcharge\Rule in the static $arrModelTypes array. I believe this would be easily solved if the code at this line used getClassForModelType method to see what class is set as the "rule" model type first.
core/system/modules/isotope_rules/library/Isotope/Model/ProductCollectionSurcharge/Rule.php
Line 60 in 7f81e8b
The text was updated successfully, but these errors were encountered: