Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Purchased product is not available in secondary language shop pages #241

Closed
vrvrvrvrvr opened this issue Oct 14, 2017 · 15 comments
Closed

Comments

@vrvrvrvrvr
Copy link

Can you reproduce this issue on default Wordpress theme (eg Storefront)?

Yes

Can you reproduce this issue when all other plugins are disabled except WooCommerce, Polylang and Hyyan WooCommerce Polylang Integration?

Yes

What product versions and settings are you using when this issue occurs?

Wordpress: 4.8
WooCommerce: 3.1.1
Polylang: 2.1.6
Hyyan WooCommerce Polylang Integration: 1.0.3

Steps to Reproduce

I have system with two languages:
Main language and secondary language.

  1. Customer bought product in secondary language
  2. Stock management went for a product from 1 to -1
  3. I have changed stock quantity back to 1
  4. I was able to search for product by SKU in main language, but i was not able to find same product in secondary language pages
  5. I updated product in main and secondary pages and it is still available and accessible by direct link, but not searchable in search and not visible in shop catalog pages (categories, product tags). Product is published and visibility is set to “Catalog & Search“

Similar behaviour is if customer buy product in main language, but after returning stock quantity back from 0 to 1 resulted products to be searchable only in main language, but not secondary language, also categories and product pages, although product in secondary language page is not out of stock. Accessing product by direct link and switching to secondary language displays the product as available for a purchase and in stock.

I have all settings enabled (including sync) in language options.

What I Expected

Non out of stock products should be available in store on all language pages, including search.

@Jon007
Copy link
Contributor

Jon007 commented Oct 14, 2017

4,5. Searching is a separate issue and not treated by this plugin.
4. a plain woocommerce/storefront install does not include SKU field in search. maybe you included SKU in the text in one language?
5. check again that the product is fully published in the second language.. this does work on thousands of other installs so there must be something specific about your case

1,2,3 stock synchronisation on purchase is handled by the Settings, WooPoly, Features, Stock Sync, check this is on. (the Meta setting only affects admin pages).

@vrvrvrvrvr
Copy link
Author

vrvrvrvrvr commented Oct 15, 2017

You are right regarding searching. Searching is theme feature i am using.
1,2,3 was/is enabled and saved in settings.
You can take a look on this here link removed
Product is available only by direct link but not in category and product meta pages, search results..
Switching to storefront theme results in same behaviour.

Maybe you can advise how to troubleshoot further ?
Many thanks for your support

@Jon007
Copy link
Contributor

Jon007 commented Oct 15, 2017

The product is available in the category, for example from the link you have given:
http://www.parukas-pariki.lv/lv/p/paruka-gaisie-garie-vilnotie-blondie-mati/

This contains:
Artikuls: 234
Kategorija: Parūkas -> linked to http://www.parukas-pariki.lv/lv/pc/parukas/
Birkas: Blondie mati, Gaišie mati, Garie mati, Viļņotie mati

When you open http://www.parukas-pariki.lv/lv/pc/parukas/
you can clearly see the product is visible in its category.

It is also available in category in Russian.
The tag links Birkas also seem to work correctly and list the product.

I can't see any problem at all.

@Jon007 Jon007 closed this as completed Oct 15, 2017
@vrvrvrvrvr
Copy link
Author

vrvrvrvrvr commented Oct 15, 2017

When you open link removed
you can clearly see the product is visible in its category.

Product looks similar to SKU: 235 and have the same product title, but is not listed in shop categories and by metas.

@Jon007
Copy link
Contributor

Jon007 commented Oct 15, 2017

well, quite, it has the same product title, maybe woocommerce is not showing the duplicate titles.
Ultimately if you have just one product not showing up, it's something to do with that product.

When you wrote the issue initially, I understood you to mean that NO products were showing up in categories.

@vrvrvrvrvr
Copy link
Author

vrvrvrvrvr commented Oct 15, 2017

Nope. This happens with all previously purchased products which were out of stock and later stock quantity was changed back to be in stock (managed with stock management).
Same is for products with SKU 137, 164link removed
These products do not appear on shop pages anymore - for example here link removed

screen shot 2017-10-15 at 13 49 25

@Jon007
Copy link
Contributor

Jon007 commented Oct 15, 2017

in that case you have wooCommerce configured to hide out of stock items (Settings, Products, Inventory, Out of stock visibility - Hide out of stock items from the catalog), and these items are not properly back in stock.
For example quantity restored but Stock status still out of stock on the item / translated item.

@vrvrvrvrvr
Copy link
Author

vrvrvrvrvr commented Oct 15, 2017

You are right. By switching product to "Out of stock" and switching back to be "In stock" it appeared on shop pages for main language but not for secondary language, although stock status field in secondary language displays read only value "In stock" Example is here link removed

Is this known woo-poly synchronization bug ?
Many thanks for your support @Jon007 and all this effort spent for developing this plugin

@Jon007
Copy link
Contributor

Jon007 commented Oct 15, 2017

There's no known bug about this.
I don't use WooCommerce inventory management so I'm not quite clear what the behaviour/sequence is about adding inventory and returning items to stock.

Maybe when you add inventory to an out of stock item in the user interface, then WooCommerce changes it's stock status to back in stock automatically, but when the plugin synchronises the meta this doesn't happen? Or maybe you didn't set the status to back in stock?

Now we know what is happening, would you mind trying one more time, and open a new issue if there is a confirmed problem.

I mean, first confirm that you have turned on all the stock options:

  • woopoly, settings, Features
  • woopoly, settings, Metas
  1. Then sell and make the item out of stock.
  2. Then add inventory back to the 1st language version of the product and Save
  3. Then confirm status of the translations

@Jon007
Copy link
Contributor

Jon007 commented Oct 15, 2017

Oh, and do you have any caching tool like WP-SuperCache enabled?

If the translated product doesn't show up even though it is back in stock, then it could be you are seeing a cached page...

@Jon007
Copy link
Contributor

Jon007 commented Oct 15, 2017

since you say 'secondary language displays read only value "In stock"' then perhaps the synchronisation was successful ?

@vrvrvrvrvr
Copy link
Author

Checked below:

woopoly, settings, Features - **enabled**
woopoly, settings, Metas - **enabled**
Then sell and make the item out of stock.
Then add inventory back to the 1st language version of the product and Save
Then confirm status of the translations
  1. Sold product in main language
  2. Returned stock quantity back to 1
  3. Stock quantity and stock status "out of stock" changed to "in stock" for main and secondary language pages.
  4. Product appears only in shop main language

Updating product with woopoly, settings, features and metas enabled displays stock status correctly but seems that it is just display status and not real product stock status.

For example I have disabled stock sync features and put both product translations to be "Out of stock" and than put both to be "In stock". This did the trick - product appears on main and secondary language shop category, meta pages & search.

No, I am not using caching plugins. Using absolute minimum set of plugins.

@Jon007
Copy link
Contributor

Jon007 commented Oct 15, 2017

ok sure - can you just paste that into a new issue then?
Then there will be a clean open issue with the right problem identified.

@norbertoaquinos
Copy link

hi, where is the resolution of this problem?
best regards
N.A.

@Jon007
Copy link
Contributor

Jon007 commented Apr 12, 2018

it was reopened on #244 and closed by Hyyan as unable to reproduce and no response from user..
if you have reproducible case which is not the same as the other open issue #299,
then I recommend opening as new issue, being very clear about the versions used and the test case

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants