shiyas Posted October 8, 2014 Share Posted October 8, 2014 Hi all Am creating a new module , Please excuse for my english Problem --- when i install new module i want to declare " public $custom_field; " in product.php , if i put it manually in classes/product.php then my module working fine , i want to declare it automatically while install , any idea ? or any different way ? Please help me Link to comment Share on other sites More sharing options...
vekia Posted October 9, 2014 Share Posted October 9, 2014 you have to create override of product class (in your module) http://doc.prestashop.com/display/PS15/Overriding+default+behaviors#Overridingdefaultbehaviors-Overridingaclass 1 Link to comment Share on other sites More sharing options...
shiyas Posted October 9, 2014 Author Share Posted October 9, 2014 Thankyou vekia , i tried your solution , Its working But a small problem , at the time of module installation me getting one error " Unable to install override: directory " , i think its becouse of existing root/override/classes/product.php , right ? , If i deleted this product.php then my module installed succesfully, any other way to do this without delete product.php from root/override/classes/product.php ? Thanks Link to comment Share on other sites More sharing options...
vekia Posted October 9, 2014 Share Posted October 9, 2014 by default this override doesnt exist there, so i bet that you created this override manually and it's bad in cases like your Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now