Jump to content

Display similar-products(by name) of product that the page is deactivate


Recommended Posts

Hi community,

 

I have a function in one of my controller that return products by name. My function work well. She execute a sql query with the key word "%LIKE% and return all the similar product in a variable that i called "$contents". Now the problem is, how to call this function in a template (for exemple error.tpl). After i call the function, i want to extract from the url the name of the product and put this in the parametre of the function (Like this (returnproductbyname(t-shirt black).

 

Can someone tell me the syntax to do this ?

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...