Trying to create a “related products” section of a dynamic product details page, where a HubDB filter pulls other products based on the current products category column in the HubDB table.
{% for row in hubdb_table_rows(99999, "&categories__contains={{ dynamic_page_hubdb_row.attribute_8_name }}) %}
<div class="product-listing-grid">
<div class="product">
<img src="{{ row.image_1.url|replace('/hubfs/' + hub_id, '/hub/' + hub_id + '/hubfs') }}?width=279" width="279"> {{ row.hs_name }}
</div>
</div>
{% endfor %}
My problem is when trying to filter the rows to display only the rows that contain the same categories as the current page/product.
How can I filter based on that dynamic content?
Or do I have to go about it in another way?