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

PROD Page's Availability Schema is Invalid and does not represent the variant too #71

Closed
steveosoule opened this issue Aug 24, 2019 · 0 comments · Fixed by #79
Closed
Assignees
Milestone

Comments

@steveosoule
Copy link

steveosoule commented Aug 24, 2019

The PROD page's availability schema output's &mvte:product:inv_short; as the content, but most (all) customers use client-friendly inventory messages that do not adhere to the schema's expected values of: Discontinued, InStock, InStoreOnly, LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, PreSale, or SoldOut.

Additionally, there are times where the l.settings:product:inv_active does not accurately reflect if the default variant's stock level. When a product has variants, it's best to use the l.settings:attributemachine:product:inv_level value.

Expected Behavior

The PROD page's meta[itemprop="availability"] tag should output valid https://schema.org/ItemAvailability values that also reflect the default variant's inventory level.

Current Behavior

Currently, it just outputs the inv_short, instead of mapping the inv_level to a valid schema value. Also, it does not account for the default variant's inventory level.

Attempted Fixes

Replace the PROD logic with something like this:

<mvt:if expr="l.settings:attributemachine:product:inv_level">
	<mvt:assign name="l.availability_inv_level" value="l.settings:attributemachine:product:inv_level" />
<mvt:else>
	<mvt:assign name="l.availability_inv_level" value="l.settings:product:inv_level" />
</mvt:if>

<mvt:if expr="l.availability_inv_level EQ 'low'">
	<meta itemprop="availability" content="LimitedAvailability" />
<mvt:elseif expr="l.availability_inv_level EQ 'out'">
	<meta itemprop="availability" content="OutOfStock" />
<mvt:else>
	<meta itemprop="availability" content="InStock" />
</mvt:if>

Steps to Reproduce (for bugs)

Invalid availability-schema content

  1. View this report: https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fssoule.mivamerchantdev.com%2Fstore%2Fsample-category%2Fmiva-test_master-product.html
  2. Click on the "Detected" Product record
  3. See the "availability" error

Missing & Misrepresented variant availability-schema

  1. View this report: https://search.google.com/structured-data/testing-tool/#url=https%3A%2F%2Fssoule.mivamerchantdev.com%2Fstore%2Fsample-category%2Fmiva-test-variant.html
  2. Click on the "Detected" Product card
  3. See the missing & invalid "availability". It should show as out-of-stock

Context

This creates issues/warnings in Google's Search Console & may cause issues with Google Shopping feeds & adwords campaigns.

Your Environment

  • Any default shadows install with inventory enabled on the master product or default variant.
@influxweb influxweb self-assigned this Aug 26, 2019
@influxweb influxweb added this to the v1.0.6 milestone Aug 26, 2019
influxweb added a commit that referenced this issue Oct 18, 2019
This maintenance release addresses all issues contained in the v1.0.6 milestone.
https://github.com/mivaecommerce/readytheme-shadows/milestone/7?closed=1

This closes #68, closes #69, closes #70, closes #71, closes #72, closes #73, closes #74, closes #75, closes #76, closes #77, and closes #78
@influxweb influxweb mentioned this issue Oct 18, 2019
influxweb added a commit that referenced this issue Oct 18, 2019
This maintenance release addresses all issues contained in the v1.0.6 milestone.
https://github.com/mivaecommerce/readytheme-shadows/milestone/7?closed=1

This closes #68, closes #69, closes #70, closes #71, closes #72, closes #73, closes #74, closes #75, closes #76, closes #77, and closes #78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants