Skip to content
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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

webeshop
Copy link
Contributor

@webeshop 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

@webeshop webeshop requested review from a team as code owners May 9, 2024 21:36
@prestonBot
Copy link
Collaborator

Hi, thanks for this contribution!

I found some issues with the Pull Request description:

  • Your pull request does not seem to fix any issue, consider creating one (see note below) and linking it by writing Fixes #1234.

Would you mind having a look at it? This will help us understand how interesting your contribution is, thank you very much!

About linked issues

Please consider opening an issue before submitting a Pull Request:

  • If it's a bug fix, it helps maintainers verify that the bug is effectively due to a defect in the code, and that it hasn't been fixed already.
  • It can help trigger a discussion about the best implementation path before a single line of code is written.
  • It may lead the Core Product team to mark that issue as a priority, further attracting the maintainers' attention.

(Note: this is an automated message, but answering it will reach a real human)

@prestonBot prestonBot added 8.1.x Branch Bug fix Type: Bug fix labels May 9, 2024
@webeshop webeshop marked this pull request as draft May 9, 2024 21:37
@webeshop webeshop changed the base branch from 8.1.x to develop May 9, 2024 21:37
@webeshop webeshop marked this pull request as ready for review May 9, 2024 21:38
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// if it's not avaiblable for order
// if it's not available for order

Copy link
Contributor

@Hlavtox Hlavtox left a 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?

@ps-jarvis ps-jarvis added the Waiting for author Status: action required, waiting for author feedback label May 10, 2024
@webeshop
Copy link
Contributor Author

Here you can see the problem.
https://www.web-eshop.cz/demo/prestashop8/home-accessories/19-customizable-mug.html

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.
Maybe it could be solved somehow better.

obrazek

@prestashop-issue-bot prestashop-issue-bot bot removed the Waiting for author Status: action required, waiting for author feedback label May 10, 2024
@webeshop
Copy link
Contributor Author

The second option is to hide "offers" structured data when the product cannot be ordered.

Copy link
Contributor

@matthieu-rolland matthieu-rolland left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.1.x Branch Bug fix Type: Bug fix
Projects
Status: Waiting for author
Development

Successfully merging this pull request may close these issues.

None yet

6 participants