Yoroi

Yoroi documentation

Yoroi is a Shopify theme for eyewear stores. Customers find frames by shape, color and fit size, see exact measurements, and choose lenses with the frame.

Version 1.0.1. Three presets are included: Yoroi (white), Kinari (off-white) and Sumi (black).

Install

  1. In your Shopify admin, go to Online Store > Themes and add Yoroi from the Theme Store.
  2. The theme is added as an unpublished theme. Select Customize to look through it with your own products.
  3. Work through First setup below, then select Publish.

To change the look later, go to Theme settings > Theme style in the theme editor and pick another preset. Changing the style replaces colors and some settings, but never your products or content.

First setup

Anything you have not set up is simply hidden. Nothing on the storefront breaks.

WhatWhereWhat it does
Product metafieldsSettings > Custom data > ProductsFrame measurements, fit size, specifications and worn photos. See Product metafields.
A page using the page.size-guide templateOnline Store > Pages, then Theme settings > Fit sizes > Size guide pageA size table built from your fit size settings, linked from every product.
A page using the page.contact templateOnline Store > PagesContact form.
Collections for each shape and color you sellProducts > CollectionsUsed by the Shop by shape and Shop by color sections. Smart collections with a metafield condition work well.
Main menu and footer menuOnline Store > NavigationThe header and footer. Menus can be three levels deep.

Product metafields

Yoroi reads product metafields in the eyewear namespace. Create the definitions you need under Settings > Custom data > Products > Add definition, using the namespace and key exactly as shown. Each one is optional: a product without the value simply does not show that line.

Namespace and keyTypeExampleShown in
eyewear.lens_widthInteger46Frame size diagram, size on product cards
eyewear.bridge_widthInteger22Frame size diagram, size on product cards
eyewear.temple_lengthInteger145Frame size diagram, size on product cards
eyewear.lens_heightInteger41Frame size diagram
eyewear.frame_widthInteger136Overall width. Decides the fit size (XS to XL)
eyewear.fit_labelSingle line textMSets the fit size by hand instead of the overall width
eyewear.sizeSingle line text46□22-145Can be used instead of the three widths above
eyewear.materialSingle line textHand-polished acetateSpecifications block
eyewear.weightInteger or decimal22Specifications block (grams)
eyewear.nose_padSingle line textAdjustable titanium padsSpecifications block
eyewear.originSingle line textSabae, JapanSpecifications block
eyewear.includedList of single line textHard case, Cleaning clothIncluded items block
eyewear.color_familyList of single line textBlack, TortoiseSmart collections and filters for Shop by color
eyewear.shapeList of single line textBostonSmart collections and filters by shape
eyewear.material_familyList of single line textAcetateSmart collections and filters by material
eyewear.returns_custom and eyewear.returns_textTrue or false, multi-line text—Replace the returns text for one product
eyewear.warranty_custom and eyewear.warranty_textTrue or false, multi-line text—Replace the warranty text for one product
eyewear.worn_photosList of files (images)—Worn photos (product) section
eyewear.worn_noteSingle line textMedium face width, wearing size MLine under the worn photos heading

For articles, an eyewear.products metafield (list of products) shows the frames mentioned in the article under it.

For shape, color_family and material_family, turn on Smart collections in the definition so you can build collections from them.

Theme settings

In the theme editor, select the gear icon to open theme settings.

GroupWhat you can set
TypographyBody and heading fonts from the Shopify font library. On Japanese pages, the device's Japanese fonts are used automatically after the chosen font.
LayoutPage width, page margin, corner radius, favicon.
ColorsBackground, text, tinted background, accent, photo background and footer colors. Each section can also use a tinted or inverted background.
Product cardsImage ratio, brand name, frame size, color thumbnails, which option names count as frame color, tidy product names, the “New” badge, review stars.
CartCart type (drawer or page), free shipping amount, order note, express checkout buttons in the drawer, suggested products.
Fit sizesThe overall widths that separate XS, S, M, L and XL, and the size guide page.
Try-onA button for trying a frame on at your shop.
Returns and warrantyWritten once and shown on every product. One product can use its own text through metafields.
OfferA line such as a second-pair discount, under the price and in the announcement bar. The discount itself is set up in Discounts.
Ask us (chat app and email)Links on the product page to a chat app (LINE, WhatsApp, Messenger and others) and email.
Social mediaAccount links for 12 networks, shown in the footer as icons or names.
Search and sharingImage used when a page is shared, and breadcrumbs.

Home page sections

SectionWhat it does
HeroA photo with a heading, text and up to two buttons. A separate photo can be set for phones.
SlideshowSeveral banner images.
Shop by shapeLine drawings of 15 frame shapes. Choose a collection for each shape you sell; shapes without a collection are hidden.
Shop by colorColor swatches, each linking to a collection you choose or to a filtered list.
Featured collectionA row that scrolls sideways, or a grid. Can show ranking numbers.
Featured productOne product with its photos, videos, options and buy buttons.
BrandsA photo, name, one line and the number of frames for each brand.
Image with textA photo and text, with optional rows such as prices.
Worn photosPhotos of people wearing frames, each linking to the frame.
Blog posts, Recently viewed, Reassurance row, Price list, Rich text, Collection list, Stockists, Custom Liquid—

Product page

Blocks can be added, removed and reordered in the editor.

BlockWhat it shows
TitleBrand and product name, review stars.
PricePrice, compare-at price, unit price, tax note, what the price includes.
Selection guideA short explanation above the options. Can be shown only when an option name contains a word you choose.
Color and lens optionsColors as photo tiles, other options as a list with the price difference. Available choices come first.
PrescriptionHow the customer sends their prescription: later, by sending current glasses, with a photo, by typing the numbers, or as last time. Shown only when a prescription lens is chosen.
Buy buttonsQuantity, purchase options (subscriptions), gift card recipient, express checkout, Shop Pay Installments, restock request.
Pickup availabilityWhether the selected variant can be picked up.
Goes well withComplementary products set in the Search & Discovery app.
ReassurancesUp to four lines of your own, plus returns and warranty from theme settings.
Frame sizeFit size, size diagram and a link to the size guide.
Specifications, Included itemsFrom product metafields.
Try-on, Ask us, Steps, Description, Details from description, Collapsible text, Custom Liquid, Apps—

For repairs and lens replacement, assign the product.service template to the product. It reads well without photos and shows the order steps.

Photos

Fit sizes

Yoroi sorts frames into five fit sizes by overall width (eyewear.frame_width). The defaults are:

SizeOverall width
XSup to 129 mm
S130 to 134 mm
M135 to 139 mm
L140 to 144 mm
XL145 mm and over

Change the limits in Theme settings > Fit sizes. The size guide page uses the same numbers. To set a size by hand, fill in eyewear.fit_label.

Filters and search

Editing code

Duplicate your theme before editing code. Go to Online Store > Themes, open the menu next to Yoroi and select Duplicate. Edit the copy, and publish it only after checking it.

Code changes are not covered by theme support, and they are not carried over when you update Yoroi. For custom work, we recommend hiring a Shopify Partner. Small style changes can go in Theme settings > Custom CSS without editing theme files.

Questions

The frame size diagram is not showing.

Check that the product has at least one of eyewear.lens_width, eyewear.bridge_width, eyewear.temple_length, eyewear.lens_height, eyewear.frame_width or eyewear.size, and that the Frame size block is on the product template.

A shape is missing from “Shop by shape”.

Shapes without a collection are hidden on the storefront. Choose a collection for the shape in the section, and make sure the collection has products.

All photos show, whatever color is selected.

Photos switch by color only when their alt text starts with # and the first word of the color name. See Photos.

The prescription choices do not appear.

They appear when the selected lens option contains one of the words in the Prescription block's setting (for example “Prescription”). Add your own wording there if your option names are different.

Express checkout or Shop Pay Installments buttons are missing.

These are shown by Shopify when the payment methods are turned on in Settings > Payments.

Can I use apps?

Yes. Product and featured product sections accept app blocks, and the Custom Liquid section and blocks can hold app code.

Support policy

Release notes

1.0.1

1.0.0