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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 [BUG] - Some fix to do for the Product microdata #357

Open
maofree opened this issue Dec 11, 2023 · 6 comments
Open

馃悰 [BUG] - Some fix to do for the Product microdata #357

maofree opened this issue Dec 11, 2023 · 6 comments
Labels
bug Something isn't working is_themecore

Comments

@maofree
Copy link
Sponsor

maofree commented Dec 11, 2023

Description

Hi
now I've seen that it is necessary to do some fixes for the Product microdata

these are missing:
priceValidUntil
itemCondition

for priceValidUntil I used this solution
<meta itemprop="priceValidUntil" content="{"+1 year"|date_format:"%Y-%m-%d"}">

these are new requested microdata
hasMerchantReturnPolicy
shippingDetails

12
11

looking into StructuredDataProductPresenter.php I have seen that priceValidUntil and itemCondition have some condition

to priceValidUntil it is necessary to set my suggestion if not present a specific price because google needs that info
for itemCondition it should be https://schema.org/NewCondition if the first condition is not accepted

many websites are without the stock management active

for this moment I've fixed so

111

Node.js version

v16

php version

8.1

OS and it's version

linux

Browsers

Chrome

Required module/theme

theme

Reproduction steps

1. Look a product page from Google search console or from validator.schema.org

Logs

No response

@maofree maofree added the bug Something isn't working label Dec 11, 2023
@maofree
Copy link
Sponsor Author

maofree commented Dec 11, 2023

alerted also prestashop
PrestaShop/PrestaShop#34813

@Oksydan
Copy link
Owner

Oksydan commented Dec 12, 2023

Hi @maofree

thb it's not a valid solution.
priceValidUntil - should be filled only when needed. In our case for time limited promotions.
It's working properly via json+ld in is_themecore module https://github.com/Oksydan/is_themecore/blob/main/src/Core/StructuredData/Presenter/StructuredDataProductPresenter.php#L121-L123 I don't think we need to change anything.

I am closing this issue, thank you for your contribution.

@Oksydan Oksydan closed this as completed Dec 12, 2023
@Oksydan Oksydan added the wontfix This will not be worked on label Dec 12, 2023
@Oksydan
Copy link
Owner

Oksydan commented Dec 12, 2023

Actually I am going to reopen this 馃槃.
Yes, you are right about itemCondition. We will fix this in the next version.

hasMerchantReturnPolicy, shippingDetails - this is too specific to the store return policy and shipping methods, we would need a lot of configuration for this 馃.
ATM I do not plan to implement this.

@Oksydan Oksydan reopened this Dec 12, 2023
@Oksydan Oksydan added is_themecore and removed wontfix This will not be worked on labels Dec 12, 2023
@maofree
Copy link
Sponsor Author

maofree commented Dec 12, 2023

Hi @Oksydan
I know that priceValidUntil is joined to a specific price, but I don't trust Google and I have a doubt, why highlight warnings about a lack of data if this is limited only to timed offers? Maybe because schema.org is an "offer" and therefore expects an expiration date for the offer? When in doubt I prefer not to have warnings

@maofree
Copy link
Sponsor Author

maofree commented Dec 12, 2023

Hi
a guy have answered from prestashop topic with this example

<script type="application/ld+json">
{
  "@context": "https://schema.org/",
  "@type": "Product",
  "name": "Example Product",
  "hasMerchantReturnPolicy": {
    "@type": "MerchantReturnPolicy",
    "returnFees": "Customer pays",
    "returnPolicyCountry": "FR"
  },
  "shippingDetails": {
    "@type": "OfferShippingDetails",
    "shippingRate": {
      "@type": "MonetaryAmount",
      "value": "25.00",
      "currency": "EUR"
    },
    "shippingDestination": {
      "@type": "DefinedRegion",
      "addressCountry": "FR"
    }
  }
}
</script>

@Oksydan
Copy link
Owner

Oksydan commented Dec 12, 2023

Like I said it will required to create a lot of configuration. Like returnPolicy per product or per category, default and also per country. There is a lot of stuff we have to consider while implementing this structural data. It's optional field in product, so atm it's like the lowest priority task.

BTW, you can decorate this data with hooks. So you can create a module that implements a hook to populate this data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working is_themecore
Projects
Development

No branches or pull requests

2 participants