Jump to content

[SOLVED] alternative for Product::getByReference() - because of deprecated


DavidSivo
 Share

Recommended Posts

In Prestashop 1.4 Product::getByReference() was deprecated. I need to update some old modules of mine that use it, but I can't find anything that I should be using to replace this function.

 

Any help would be greatly appreciated!

 

Thanks

Share this post


Link to post
Share on other sites

what you mean by no luck? error code? or what?

 

you changed code of your producT:getByReference call with proper variables? see differencies:

public static function getByReference($reference)

public static function searchByName($id_lang, $query)

Share this post


Link to post
Share on other sites

At first I herped then I derped.

 

I replaced all the functions and changed the options I was passing through, not realizing that actually I had named some of variables incorrectly. 

 

Thanks for the help Vekia, that actually has done the job just fine!

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More