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

Added GTIN and Condition to variant for structured data use #5

Open
wants to merge 1 commit into
base: 6060-structured-data-products
Choose a base branch
from

Conversation

rahulsingh321
Copy link

@rahulsingh321 rahulsingh321 commented Feb 2, 2025

Introduction of Structured Data for Item Condition and Global Trade Item Number ("GTIN").

Contained Information

  • Brief Introduction into structured data
  • Detailed Description of added fields including 3rd party support
  • Screenshots of Admin Interface
  • Example of API request to post / get / update an item with the fields

Introduction

This is the first in a series of PRs to implement full structured data support on Solidus.
Structured Data is the common standard to exchange product and content information via the frontend with search engines and marketing platforms and is defined by the schema.org organisation (through the founding companies Google, Microsoft, Yahoo and Yandex).

It has become the defacto standard to communicate with search engines and also many social networks (such as Facebook).

In this first PR following fields are tackled:

  • GTIN
  • ItemCondition

This scope of this PR is not to provide structured data on the frontend but merely to provide the information required to generate fully compliant structured data on frontend and feeds without 3rd party extensions or added fields.

GTIN (frequently also known as UPC / EAN in Europe)

Definition

A unique identifier for products usually given by either the manufacturer or the official distributor of a product. Frequently required to have stock listed with marketplaces. It's usually used to identify a product uniquely across multiple steps in the supply chain. While the GTIN is a unique identifier for a product entity it is in no mean a serial number (eg every iPhone of the same model and configuration sold in one country share the UPC, but not the serial number).
It's frequently used to match products in stock synchronizations or order APIs.

Support

Search Engines

Search Engine Supported
Google YES
Bing YES
Yahoo YES
Yandex YES
Baidoo Partial / Closed Beta Program

Marketplaces

Search Engine Supported
Amazon YES
Facebook YES
Ebay YES
Etsy No
Vinted No

Search Ads

Search Engine Supported
Google Shopping YES
Bing YES (mandatory if given by manufacturer)
Yahoo YES
Yandex YES
Baidoo Unknown

Item Condition

Definition

The item condition has found wide acceptance over the past years to annotate if a product is

  1. New
  2. Used
  3. Refurbished
  4. Damaged

While the origins where originally found in second hand marketplaces and the car industry, it became widely used with the emergence of the circular economy.

Support

Search Engines

Search Engine Supported
Google YES
Bing YES
Yahoo YES
Yandex YES
Baidoo Partial / Closed Beta Program

Marketplaces

Search Engine Supported
Amazon YES (in addition Collectable)
Facebook YES (in addition various usage grades)
Ebay YES (with various additional information)
Etsy No
Vinted YES (Free field)

Search Ads

Search Engine Supported
Google Shopping YES
Bing YES (optional)
Yahoo YES
Yandex YES
Baidoo No

Concerns: solidusio#6060

Screenshots Admin Backend

Product

Screenshot from 2025-02-02 21-50-59

Variant

Screenshot from 2025-02-02 21-50-41

APIs

Get Product

Screenshot-from-2025-02-02-22-33-10-02-02-2025_10_33_PM

Update Product

Screenshot-from-2025-02-02-23-02-24-02-02-2025_11_02_PM

Possible Improvements

  • Validate GTIN against current schemes (EAN 9, UPC, ...)

Copy link

@fthobe fthobe left a comment

Choose a reason for hiding this comment

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

Please take a look

backend/app/views/spree/admin/products/_form.html.erb Outdated Show resolved Hide resolved
core/app/models/spree/variant.rb Outdated Show resolved Hide resolved
@rahulsingh321 rahulsingh321 force-pushed the 6060-structured-data-products branch from bd12953 to 2136879 Compare February 2, 2025 17:38
@rahulsingh321 rahulsingh321 force-pushed the 6060-structured-data-products branch 3 times, most recently from d97fa5a to e04f42b Compare February 4, 2025 19:33
@rahulsingh321 rahulsingh321 force-pushed the 6060-structured-data-products branch from d6316bd to e04f42b Compare February 6, 2025 11:54
@rahulsingh321 rahulsingh321 force-pushed the 6060-structured-data-products branch from c8c9ae9 to e04f42b Compare February 6, 2025 11:55
@fthobe
Copy link

fthobe commented Feb 6, 2025

@rahulsingh321 please publish as draft till it's ready for review (tests pass)

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

Successfully merging this pull request may close these issues.

2 participants