Skip Navigation

[Resolved] Archive products listing is not proper

This support ticket is created 4 years, 11 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 1.35 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by Nigel 4 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#1242917

I am trying to: Using the "Toolset WooCommerce Views" plugin on the site and list the products for the category. We are using the WPML plugin for our multilingual website. We are trying to list the products of a particular category in 3 Languages (Hebrew, Russian and English). The number of products displayed in Hebrew and Russian is 9 whereas on English they are only 7. Number of products in the English language becomes 9 as soon as we disable "Toolset WooCommerce Views" plugin.

Link to a page where the issue can be seen:
Hebrew: hidden link
Russian: hidden link
English: hidden link

I expected to see: Same number of products in all 3 languages.

Instead, I got: Unequal number of products in languages.

#1243006

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

I took a quick look but I can't spot anything obvious.

Is it okay if I take a copy of your site to install locally? It will be easier for me to do some debugging there...

#1243381

Sure, please go ahead.

#1243534

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Unfortunately I can't make a site copy.

Your server is unable to run Duplicator (even to just backup the database), and your host bans All in One WP Migration, which normally works whenever Duplicator fails.

Is there any other way you can create an installable backup that I can use locally?

#1244541

Hi Nigel,

Won't it be possible for you to work on the Server itself? We have provided you all admin as well as FTP details.

We won't mind if you make any changes on that site since we already have a backup of that site.

Please move ahead and make changes on server itself.

Thanks

#1244603

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

I've spent quite a while digging into your site and I've found one general point (we, i.e. WooCommerce Views, excludes products from archives where the product_visibility includes terms such as "outofstock" when WooCommerce itself appears not to), but also some specific issues with your site that explain why English outofstock items are excluded but Russian and Hebrew are not.

I've passed all of these details on to my colleagues in second tier who are in a position to take a deeper look, and I'll let you know what they find.

#1247010

Hi Nigel,

Do we have any updates on this? This has now started affecting our sales on live site. This issue has now become very crucial and urgent for us. Please let us know about your findings so we can solve this issue.

Thanks

#1247033

Hi Nigel,

We did some debugging on our end and found the piece of code which is creating the issue. I will mention it here so you can have exact code to deal with and we can have the issue resolved quickly.

WooCommerce Views ( Version 2.7.9 )
File: wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php
Line number: 462
Code => add_action( 'wpv_action_apply_archive_query_settings', array( $this, 'wcviews_restore_wc_taxonomy_queries' ), 99, 3 );

We can see the products loading properly when we disable this code.

Please have a look into it.

Thanks

#1247056

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Vito

Checking the internal tickets that is the same code that my colleagues have identified as problematic, and they are in discussion with WPML about fixing the issue.

From my reading of it there may be an issue specific to your site that requires some steps including running a couple of queries to edit the DB tables directly, while there also appears to be a more general issue with the WPML WCML extension for which there are several reports but currently no fix.

I'm waiting for my colleague to test the proposals from WPML on the copy of your site to verify they work without side effects before sharing them with you, and hopefully I'll be able to communicate those to you soon.

#1247631

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Vito

I have some directions from WPML about fixing this which my colleague tested on the copy of your site and confirms that they work.

They require you to run some SQL queries, so you'll need database access with something like phpMyAdmin.

1. Set the WC product_visibility taxonomy to "Don't translate" in WPML > Settings

2. Assign the translated products to the original taxonomy with this SQL query:

UPDATE `wp_term_relationships` SET
`term_taxonomy_id` = '9'
WHERE `term_taxonomy_id` IN (1580,1581);

3. Remove the translated taxonomy:

DELETE FROM `wp_term_taxonomy`
WHERE `term_taxonomy_id` IN (1580,1581);

and

DELETE FROM `wp_terms`
WHERE `term_id` IN (1580,1581);

4. Delete icl_translations entries

DELETE FROM `wp_icl_translations`
WHERE `trid` IN (26,28);

Those steps will make the Hebrew, Russian and English translations all behave the same.

Whether the out of stock items are displayed or not depends on your settings. If you want to change their visibility go to WooCommerce > Settings > Products > Inventory and change the option "Hide out of stock items from the catalog"

Needless to say, you should have a current backup before attempting this.

Can you confirm if that fixes the problem?

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.