Skip Navigation

[Resolved] View shows three duplicates of single product

This support ticket is created 4 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 0.36 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Tamelander 4 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#1467551

This is making me crazy. Today I added a new product category and added one product to the category. When I do my search the result shows the same product three times. How is this possible? It does not happen when I select any other taxonomy term in she search.

I click the new category checkbox and three duplicates are shown in the results.

I have a query filter
Select posts with taxonomy:
Product categories slug in all of those set by the URL parameter wpv-product_cat

This is the code from Search and pagination
[wpv-filter-start hide="false"]
<span style="margin-right: 20px; height:22px;">[wpv-filter-controls]<h3 style="display: inline-block;">SÖK SKIDA:</h3> <div style="margin:5px 0 15px 0;">[wpv-filter-search-box default_value="Sok efter produkt" class="search" style="background-color:#f4f4f4;"]</div></span> <span style="clear:both; margin-bottom: 10px; padding: 5px 0; display: inline-block;">[wpv-filter-submit name="Sök" output="bootstrap"] [wpv-filter-reset reset_label="Återställ" type="input" class="elementor-button.elementor-size-lg"]</span>
[wpv-control taxonomy="product_cat" url_param="wpv-product_cat" type="checkboxes" taxonomy_order="ASC" taxonomy_orderby="name" hide_empty="false"]
[/wpv-filter-controls]
[wpv-filter-end]

What is the link to your site?

hidden link

You can try with the last checkbox: "Turskida med stålkant".

#1468911

Hi,

Thank you for contacting us and I'd be happy to assist.

On the page that you shared, I checked the option "Turskida med stålkant", but it showed 3 different results.
( screenshot: hidden link )

It seems that you may have sorted this out after writing to us, but please let me know if this still needs some investigation.

regards,
Waqar

#1469041

The fix was to attach two more products to the category.

I suspect that the loop is to blame? If there is only one product as a result of the search will this code show three identical products?

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop wrap="3" pad="true">
[wpv-item index=1]
<div class="row ">
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>
[wpv-item index=other]
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>
[wpv-item index=3]
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>
</div>
[wpv-item index=pad]
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>
[wpv-item index=pad-last]
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>
</div>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

#1470491

Thanks for the update.

Yes, the content in your view's "Loop Editor" section needs some adjustment.

The content template for the loop shouldn't be called for the index=pad and index=pad-last entries:

Current:


[wpv-item index=pad]
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>
[wpv-item index=pad-last]
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>

Updated:


[wpv-item index=pad]
<div class="col-sm-4"></div>
[wpv-item index=pad-last]
<div class="col-sm-4"></div>

This should do the trick.

#1470543

My issue is resolved now. Thank you!