Skip to content

3.5.1: replace deprecated Shopify fields, and show product images - #20

Merged
mksd0398 merged 1 commit into
masterfrom
replace-deprecated-fields
Oct 10, 2026
Merged

mksd0398 merged 1 commit into
masterfrom
replace-deprecated-fields

Conversation

@mksd0398

Copy link
Copy Markdown
Owner

Summary

  • Four deprecated Shopify fields replaced in both templates. They still work in 2026-10, but a later API version will remove them.

    Deprecated Replacement
    Product.featuredImage featuredMedia
    Product.images media
    ShopPlan.displayName publicDisplayName
    Shop.billingAddress shopAddress

    GET /api/shop and GET /api/products/:id return the new names, and the Dashboard and Products pages read them. GET /api/products/search keeps its flat image field.

  • Product search cards now show images. The search route returns image as a URL; the page looked for image.src, so every card said "No image".

  • Images are requested at display size: 600 pixels for a card, 800 for the detail view. They were the originals, up to 3908 pixels wide.

Released as 3.5.1 when this merges.

Test plan

  • New template test, written first: a search result's image comes from its featured media, is null without media or without a preview, and is asked for at a reduced size.
  • npm run test:e2e: 58/58. Both templates build and pass their own 49 tests.
  • npm run check:graphql: all 6 queries valid against 2026-10, with no deprecated field left.
  • Real store: the template's route handlers, with Shopify not stubbed, run against a development store on 2026-10.
    • The shop route returns the plan name and country.
    • Search returns images for 9 of 10 products; the tenth really has no media and returns null.
    • The detail route returns its media list and alt text.
  • Both pages loaded in a browser on that real data: the Dashboard shows the plan and country; the Products cards and the detail view show images at 600 and 800 pixels.

🤖 Generated with Claude Code

The templates asked Shopify for Product.featuredImage, Product.images,
ShopPlan.displayName and Shop.billingAddress, all deprecated and due to be
removed in a later API version. They now use featuredMedia, media,
publicDisplayName and shopAddress. The Dashboard and Products pages read the
new names. npm run check:graphql reports no deprecated field.

Product search cards never showed an image: the search route returns the
image as a URL and the page looked for an object. The page reads it now.

Images are requested at the size they are shown, 600 pixels for a card and
800 for the detail view. They were the originals, up to 3908 pixels wide.

Checked by running the template's route handlers, unstubbed, against a real
development store on API 2026-10, and loading both pages on that data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mksd0398
mksd0398 merged commit 1f11057 into master Oct 10, 2026
1 check passed
@mksd0398
mksd0398 deleted the replace-deprecated-fields branch October 10, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant