-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Availability in structured data for products that are not available to order #36124
base: develop
Are you sure you want to change the base?
Conversation
webeshop
commented
May 9, 2024
Questions | Answers |
---|---|
Branch? | 8.1.x |
Description? | If stock management is turned off and the product is not available for ordering, InStock availability is displayed in structured data. This pull request fixes this problem. |
Type? | bug fix |
Category? | FO |
BC breaks? | no |
Deprecations? | no |
How to test? | Stock management must be turned off, create a new product, turn off available_for_order and see what the structured data looks like |
Hi, thanks for this contribution! I found some issues with the Pull Request description:
Would you mind having a look at it? This will help us understand how interesting your contribution is, thank you very much! About linked issuesPlease consider opening an issue before submitting a Pull Request:
(Note: this is an automated message, but answering it will reach a real human) |
@@ -452,6 +452,9 @@ public function getSeoAvailability() | |||
// Availability for displaying discontinued products, if enabled | |||
if ($this->product['active'] != 1) { | |||
return 'https://schema.org/Discontinued'; | |||
// if it's not avaiblable for order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// if it's not avaiblable for order | |
// if it's not available for order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's a correct change, because available_for_order
is not related to stock.
Product can be in stock, but doesn't have to be available for order, it can be only for ordering by request or something.
Also, google can complain that the structured data on the website is not correct, if the export module does it a different way.
What is the use case specifically?
Here you can see the problem. It's a specific situation, but I've been dealing with this issue at a client store. The product cannot be ordered, but the availability is InStock. |
The second option is to hide "offers" structured data when the product cannot be ordered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello and thank you for your contribution 👍
Can you please create an issue so that this bug can be reproduced by the QA team, it will make it easier for QA teams and others to track this
Once the issue is created you can link it in the description table