This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem:
The bestseller status is only assigned to only one language of the product (YITH WooCommerce Best Sellers Premium)

Solution:
Our compatibility team found a workaround. Please open the "wp-content/plugins/yith-woocommerce-best-sellers-premium/class.yith-wcbsl-frontend-premium.php" file and add this code snippet at line 376:

$product_id = apply_filters( 'wpml_object_id', $product_id, 'product', true, apply_filters('wpml_default_language', NULL ) );

This topic contains 9 replies, has 2 voices.

Last updated by vilnisZ 11 months, 4 weeks ago.

Assigned support staff: Diego Pereira.

Author Posts
October 10, 2018 at 4:38 pm #2805215

vilnisZ

But there is said that "YITH WOOCOMMERCE MULTI VENDOR" is 100% compatible. Then it's not compatible it's just unfinished. There must be some other people with this same problem.

If vendor wants to edit product he has to go back and forth in other languages and edit every each translation. That is not a good interface.

And other problem I found - when product goes "Bestseller" it is only for one translation.

October 10, 2018 at 4:51 pm #2805262

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

It seems to me that you have some doubts about the "YITH WOOCOMMERCE MULTI VENDOR" workflow, correct?

It's possible to reproduce the issue on a new clean install? If so, I can do some tests and see if there is a better workflow to use in this case.

I created a test website with a clean WordPress install with WPML enabled. You can access it through this link:
hidden link - Through this link you will be automatically logged in.

Please upload the "YITH WOOCOMMERCE MULTI VENDOR" to this test install and setup it the same way as in your website (using the same options). You can also install additional plugins if needed. Please note that we only need the plugin, some dummy content and the related functionality to reproduce the issue, you don't need to setup a entire website or clone your existing site.

Regards,
Diego

October 11, 2018 at 7:12 am #2806892

vilnisZ

So I setup the site and tried with a product. The issue is there.

You can see one product that is now bestseller if you go to link: hidden link

Add spanish and the bestseller is gone: hidden link

October 11, 2018 at 5:24 pm #2809304

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thanks for reproducing the issue. It seems related to the "YITH WooCommerce Best Sellers Premium" plugin (not the multi-vendor plugin). You can see that the issue is still there, even with the multi-vendor plugin disabled:
- hidden link
- hidden link

The "YITH WooCommerce Best Sellers Premium" is not at our list of compatible plugins: https://wpml.org/documentation/plugins-compatibility/?wpv_view_count=119945&dev=0&wpv-plugin-functionality=0&wpv_post_search=YITH+WooCommerce+Best+Sellers&wpv_filter_submit=Search

In what field / section is a product defined as a best seller? Could you describe the steps for defending a new product as a bestseller? I just need to do a few more tests before forwarding to our compatibility team.

Regards,
Diego

October 15, 2018 at 9:09 am #2816729

vilnisZ

This is what plugin support said:

Hi,
there is not a field set in the product to define it's a bestseller.
The best seller products are the highly sold products, so the plugin retrieves bestsellers from orders.
With WPML, the plugin get the best seller products from orders (in all languages); then it shows them in the current language.
So, the best sellers will be global (regardless to the language).

Best Regards
Francesco Leanza

October 15, 2018 at 7:19 pm #2818583

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thanks. I do not know if I understood correctly ... did they fixed the issue?

If not, Could you upload the latest version (1.1.4) on our test site (hidden link)? I will forward to our compatibility team.

Regards,
Diego

October 18, 2018 at 7:17 am #2826889

vilnisZ

I just installed the newest version. You can forward this now.

October 18, 2018 at 8:29 pm #2829584

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thanks. I have forwarded the details to our Themes and Plugins Compatibility Team and they will take a look at the issue and contact the author if needed. Please note that this process may take a while as it depends on how soon the author will reply to our efforts to contact him.

It would be great if you can also contact the author asking him to reply us. You could also refer them to our Go Global program so that we can help them make their product compatible with WPML: https://wpml.org/documentation/theme-compatibility/go-global-program/

This may help expedite the process.

Regards,
Diego

October 22, 2018 at 6:15 pm #2839409

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Our compatibility team found a workaround. Please open the "wp-content/plugins/yith-woocommerce-best-sellers-premium/class.yith-wcbsl-frontend-premium.php" file and add this code snippet at line 376:

$product_id = apply_filters( 'wpml_object_id', $product_id, 'product', true, apply_filters('wpml_default_language', NULL ) );

It worked on the test site: hidden link

We'll get in touch with the author to implement this fix in the plugin.

Regards,
Diego

October 23, 2018 at 4:45 am #2840724

vilnisZ

The plugin author just found the problem too and updated. Thanks for the help!