Layout - wc single - related product looper

Hello There,

i am trying to achieve a single product using the layout tool from pro.
I would like to use a looper provider that provides me with the “related product” that comes in woocommerce product. Is there any way to manage this ?

thank you very much

Hello @Thaelys,

Thanks for writing to us.

To display the related product of Woocommerce on a single product page you can use our element “Related Product”

woocsinjhe-Layouts-Pro

In case if you want to list the related product by using a looper, you can set the looper provider as "Query String " —>Set the query like this to get the product based on the current category.

 category_name={{dc:term:slug}}&post_type=product&posts_per_page=3&offset=0&ignore_sticky_posts=1&post__not_in%5B0%5D={{dc:post:id}}

Please feel free to change the posts_per_page value as per your design or the number of products that you want to display.

Hope it helps
Thanks

Hello,

Thank you for that quick answer, this was EXACTLY what i needed.

One more quick question (if i may) :slightly_smiling_face:

I would like to give the option to put filters (according to attributes or categories, or whatever), to my layout page. Of course there is the widget thing that i can already do and that is working more or less, but i would love to be able to customize those and to be able to design them ould be great.
In short :
Is there a way to create category/attributes button filters that would add stuff like “/?filter_xxx=” to the final url ?

Thank you again for all your work

Hi @Thaelys,

Glad that we are able to help you. You can add the link attribute of the Button element to add the specific parameter to the URL.

Screenshot-159-

Hope it helps.
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.