Jump to content
Otaksone

Get all product by specific tag

Recommended Posts

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();
    
    //...
}

Share this post


Link to post
Share on other sites
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 by Otaksone (see edit history)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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