This topic has 19 replies, 2 voices, and was last updated 1 months ago ago by Luca Rossi
Hi
There seem to be an issue with the spotlight widget, showing the wrong number?
Amount of products on sale is not 4, its only 2. Plese check the video attahched, and feel free to test for yourself:
https://elmate.no/alle-produkter/
I think the root cause of this is the ability to subscribe and save on tea products. (the code was added by your customization service in the child theme)
I have added login credentials in the private area for quick troubleshooting.
Thanks!
Hi @Nicolo,
The sale count function is coming from the WooCommerce plugin not from our custom code: wc_get_product_ids_on_sale();
After taking a look closer at the code, we could see that WooCommerce also count the sale of variation products:
return $wpdb->get_results(
"
SELECT posts.ID as id, posts.post_parent as parent_id
FROM {$wpdb->posts} AS posts
INNER JOIN {$wpdb->wc_product_meta_lookup} AS lookup ON posts.ID = lookup.product_id
$outofstock_join
WHERE posts.post_type IN ( 'product', 'product_variation' )
AND posts.post_status = 'publish'
AND lookup.onsale = 1
$outofstock_where
AND posts.post_parent NOT IN (
SELECT ID FROM <code>$wpdb->posts</code> as posts
WHERE posts.post_type = 'product'
AND posts.post_parent = 0
AND posts.post_status != 'publish'
)
GROUP BY posts.ID
"
);
Please double check your variable products, it seems they’re on sale also.
Best Regards,
8Theme’s Team
Hi
Thanks for providing me the code for further inspection.
It makes sense that its coming from the variable products.
Note: There is a difference between the xstore sidebar filter widget and the xstore spotlight widget.
The sidebar is showing “2 products”
The spotlight is showing 4 products”
How can we make sure these are the same, and as you can see on the video we only want the parent product to be counted. (on screen you only see 2 product thumbnails after filtering down to “on sale”)
To sum up, a total of 2 products would be corrrect for both the sidebar and the spotlight.
How can this be fixed? Looking forward to hear from you!
Dear Nicolo,
We hope this message finds you well.
We would like to inform you that we have noticed a discrepancy in the count displayed under the Product Filter widget. As of now, there is no immediate fix available for this issue.
We have escalated this matter to our development team for further review and resolution. We will keep you updated on the progress and notify you once a solution has been implemented.
Thank you for your understanding and patience.
Best regards,
The 8Theme Team
Thanks for the notice.
Looking forward to hear from you once its fixed.
In the meantime i have a follow up question regarding the spotlight widget:
How do i activate the ajax feature added to the latest update?
Feel free to read the about the uprgade here:
https://8theme.upvoty.com/b/xstore/make-category-spotlight-ajaxrefresh-on-shop-page/
Dear Nicolo,
We hope this message finds you well. I am writing to inform you that the AJAX feature is currently operational exclusively within the categories section. It has not yet been implemented in the following three filters: All Products, New Arrivals, and Sale.
For a clearer demonstration, please view our video at the following link: [https://www.awesomescreenshot.com/video/31169754?key=50c9e49c59060e9bec3b4a61ff98e21f](https://www.awesomescreenshot.com/video/31169754?key=50c9e49c59060e9bec3b4a61ff98e21f).
Thank you for your attention to this matter.
Best regards,
The 8Theme Team
Aha, i see it, thanks for the video
How can i activate this for my shop page.
https://elmate.no/alle-produkter/
I see that my categories are still not working as in the video you provided.
Looking forward to hear from you.
P.S. for futher troubleshooting you have the login credentials in the first message of this forum page.
Hi @Nicolo,
Can you please check again on the category images?
It might be the cache issue.
Best regards,
The 8Theme Team
Hi again Luca
Thanks for your advice.
I cleared the cache with w3total plugin. And entered inkognito:
The attached videos are the result of both dekstop and mobile
Regards
Dear Nicolo,
We hope this message finds you well.
We would like to inform you that the Ajax filter is currently operational exclusively on the category images, as shown here: https://prnt.sc/le1DoBifvVRn.
To further enhance this feature, we kindly suggest that you consider submitting additional feature requests at the following link: https://8theme.upvoty.com/b/xstore/make-category-spotlight-ajaxrefresh-on-shop-page/.
Thank you for your attention to this matter. We look forward to your valuable feedback.
Best Regards,
The 8Theme Team
Hi Luca
I got that, fully understood.
Not alle products or sale, only the categories: “sett” “te” “utstyr”
Now lets inspect only the categories to see if they are fully working.
Please have a close look of the video:
Let me know if you see the errors – not filtering correctly
At the end of the video, it all of a sudden went from ajax to refreshing?
Looking forward to hearing from you
Dear Nicolo,
We hope this message finds you well. We kindly request that you review the URL stated when you clicked on each category image, as there appears to be an issue where all categories are combined when filtering the products. This functionality should mirror the product filter found on the left sidebar.
Thank you for your attention to this matter.
Best regards,
The 8Theme Team
We kindly request that you review the URL stated when you clicked on each category image, as there appears to be an issue where all categories are combined when filtering the products. This functionality should mirror the product filter found on the left sidebar.
– I agree with you 100%. And i confirm that the issue is present.
How do we fix this issue?
Thanks alot for your help so far
Hi @Nicolo,
We meant the category items will combine when you click on each category.
This is the logic of Spotlight Categories Element is working for now.
We don’t have any custom codes to make it work as separated yet.
Best regards,
The 8Theme Team
I see, will it stay like this?
Or are you working on it to filter separated?
And regarding the number issue, how is it going, what is the status?
Hi @Nicolo,
I see, will it stay like this?
Or are you working on it to filter separated?
We suggest you to add more comments to the feature request link so Jack can take a look on this.
And regarding the number issue, how is it going, what is the status?
Our development team is still working on it. Stay tuned.
Best regards,
The 8Theme Team
Dear @Nicolo,
Our development team has applied the hotfix of sale count product issue on your website.
Could you please double check again?
Thank you!
I just checked and it works great
We can close this thread now
I will add the comments from our thread to Jack, thanks for the advice!
Regards
If you need anything else please let us know.
The issue related to '‘Spotlight xstore widget showing the wrong number?’' has been successfully resolved, and the topic is now closed for further responses