krismb Posted February 16, 2014 Share Posted February 16, 2014 Hello I am writing a module that need to check if a ean13 exist or not. I am reading a csv file and if the ean13 does not exist I need to create it. Anyway : I created a new module and in my module I have a function like that public function product($a) { $txt = '<br/>'.$a[12]; $ean13 =$a[12]; if ( product::getIdByEan13($ean13)){ $txt .= ' update'; } else { $txt .= ' creation'; } return $txt; } But I have this [PrestaShop] Fatal error in module importcatalogue: Class 'product' not found How do I add product class ? Link to comment Share on other sites More sharing options...
vekia Posted February 16, 2014 Share Posted February 16, 2014 try to use Product instead of product and in addition, make sure that getIdByEan13 is a static function Link to comment Share on other sites More sharing options...
krismb Posted February 16, 2014 Author Share Posted February 16, 2014 Thank you it works with Product : I am feeling really a noob now. That is right that the name is Product.php with capital letter 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