Overriding the onRelationManageCreate and onRelationManageUpdate function #1074
Replies: 3 comments
-
You probably just have to add your fields to the fillable property: oc-mall-plugin/models/Variant.php Line 97 in 02f50dd Try doing it manually and see if you data is stored (without any custom code in the controller methods). If it works, you can use the Model::extend hook to patch the fillable property from your own plugin. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the response. Adding it to fillable doesn't help. The Prices field is being saved in the products.php controller |
Beta Was this translation helpful? Give feedback.
-
You can also try to execute your custom code in the We do a check for something similar here: |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have a question regarding overriding the two functions. Under variants I've created four custom fields including a Discount Price field which works the same as the Price field. The problem is if I want it to work I have to override the onRelationManageCreate and onRelationManageUpdate function. Is there a way I can do that? I know I can manually change the code but every time I want to update the plugin my code overrides.
Any help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions