Jump to content

Getting an error of calling non static method statistically


beginner1

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...