Documentation

Products, collections and the cart

RedeemID can run a whole storefront from Shopify’s catalog: product and collection blocks, a cart, and pages for each product, collection and the cart. Everything renders on the server and works without JavaScript. Shopify stays the source of truth for prices, stock and checkout, and RedeemID stores no catalog of its own.

These blocks need a Storefront token, and the products must be published to the sales channel that issued it, usually Headless. See Connect Shopify.

Blocks

  • Shopify Product (redeemid/product) shows one product with its live price, an Option picker when it has variants, a quantity field, Add to cart and Buy now. Sold-out options are disabled.
  • Shopify Collection (redeemid/collection) shows one page of a collection as a grid, with prices, compare-at prices and sold-out state. Products with nothing to choose get Add to cart; the rest link to their product page. Next and Previous are plain links, so each page has its own URL.
  • Shopify Cart (redeemid/cart) shows the visitor’s cart with quantities, Remove, a discount code and Check out.
  • Shopify Cart Link (redeemid/cart-link) goes in a header: a link to the cart with the item count.

Product and collection blocks use the same five-minute cache as plan cards and carry no personal data, so they are safe in cached pages. The editor sidebar searches your catalog by title.

Storefront pages

Turned on by default under RedeemID → Settings → Storefront pages, RedeemID serves:

Page Default path
Product /products/{handle}/
Collection /collections/{handle}/
Cart /cart/

Each path can be changed in Settings, for example to /shop/p/ or /basket/, or from code with the redeemid_storefront_path filter. A path that a published WordPress page already uses is left alone, and a handle Shopify doesn’t have is a 404. Collection cards and cart lines link to the product page.

On a block theme the pages are templates you can edit under Appearance → Editor → Templates (Shopify product, Shopify collection, Shopify cart). A classic theme can override them with redeemid-product.php, redeemid-collection.php or redeemid-cart.php.

Each page has its own title, meta description, canonical link, Open Graph and Twitter tags, and Product structured data with one offer per variant. With Yoast SEO or Rank Math active, RedeemID hands them the title, description and canonical link and lets them print the tags. The cart page is noindex and never cached.

The cart

The cart is a Shopify Storefront cart held on the server.

  • Cookies. The browser holds only a random key in the HttpOnly redeemid_cart cookie, and the cart ID stays on the server under that key for 14 days. A readable redeemid_cart_count cookie holds the item count, so the cart link shows it on cached pages without a request.
  • No JavaScript. Every change is a form post. There is no nonce, because product forms sit in cached pages. Instead, requests the browser marks as cross-site are refused, and changes are limited to 30 a minute per visitor.
  • Signed-in checkout. At Check out, a linked customer is attached to the cart on the server, so checkout opens signed in and the purchase can unlock content. The customer token never reaches the browser.
  • Shared devices. A cart signed in that way is dropped at sign-out. Turn on Clear the cart on sign-out to drop every cart.

For page caches, only the cart page needs to bypass redeemid_cart, and it already sends Cache-Control: private. See Works with.

Staff shortcuts

Staff who can manage RedeemID get a Shopify menu in the admin bar. It links to the store’s products, collections, orders and customers in the Shopify admin, and on a product or collection page, to that item. The links open in a new tab.

Next to Shopify’s WordPress plugin

If Shopify’s own plugin is still active, RedeemID stands down on the paths it claims by default. See Moving off Shopify’s WordPress plugin for how the two share paths and how to switch.

RedeemID is still being built

RedeemID is a WordPress plugin that lets customers sign in with their Shopify account and opens your site to what that account holds. It is in early development, so parts of this site are unfinished and details will change.

It is coming soon. We are looking for sponsors and for the first stores and publishers to use it.

For more information, email vinny@vinnysgreen.com.

Get in touch