beginner1 Posted December 26, 2017 Share Posted December 26, 2017 Hi everyone. I am am trying to call products function in the .tpl file but I get an error Runtime Notice: Non-static method ProductCore::getImages() should not be called statically. How can I resolve this? I have posted the statement of code that is causing this error. {assign var='productImgs' value=Product::getImages($product_id])} Link to comment Share on other sites More sharing options...
joseantgv Posted December 27, 2017 Share Posted December 27, 2017 16 hours ago, beginner1 said: Hi everyone. I am am trying to call products function in the .tpl file but I get an error Runtime Notice: Non-static method ProductCore::getImages() should not be called statically. How can I resolve this? I have posted the statement of code that is causing this error. {assign var='productImgs' value=Product::getImages($product_id])} I don't know where are you calling it, but if you have product object maybe you can do: {assign var='productImgs' value=$product->getImages($product_id])} Link to comment Share on other sites More sharing options...
beginner1 Posted December 27, 2017 Author Share Posted December 27, 2017 Just now, joseantgv said: I don't know where are you calling it, but if you have product object maybe you can do: {assign var='productImgs' value=$product->getImages($product_id])} I am simply calling it in the tpl file. 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