Otaksone Posted October 10, 2019 Share Posted October 10, 2019 Hi, how i get get all product by specific tag? Link to comment Share on other sites More sharing options...
Razi Posted October 11, 2019 Share Posted October 11, 2019 hello you can use the method of class Tag like this first define the context and id_lang after that array of tags $tags_array = ['tag1', 'tag2', 'tag3']; if array then you need to make a foreach loop foreach($tags_array as $tag){ $tag_obj = new Tag(null, $tag, $id_lang); $products = $tag_obj->getProducts(); //... } Link to comment Share on other sites More sharing options...
Otaksone Posted October 25, 2019 Author Share Posted October 25, 2019 (edited) On 10/11/2019 at 8:56 AM, Razi said: hello you can use the method of class Tag like this first define the context and id_lang after that array of tags $tags_array = ['tag1', 'tag2', 'tag3']; if array then you need to make a foreach loop foreach($tags_array as $tag){ $tag_obj = new Tag(null, $tag, $id_lang); $products = $tag_obj->getProducts(); //... } HI, perfect work. I can get only name and id, i can get link product and image? Array ( [name] =Album Portafoto Orsacchiotto Rosa - Ottaviani [id_product] = 5 } Edited October 25, 2019 by Otaksone (see edit history) 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