Pet profile and fit badges
Shoppers add up to four pets with the Add a pet button in the header. The form has three short steps:
- Species and name.
- Weight. When neck and size fit is on, also neck size and size.
- Birth month, activity level, and ingredients to avoid.
Profiles are saved in the shopper's browser only. Nothing is sent to your store or to an app, and no customer account is needed.
What changes with a pet
Headings that contain
[pet]show the pet's name, for example "Fresh food for [pet]". Without a profile, the fallback text from the section is shown, for example "your dog".Fit badges on product cards and product pages:
- "Good for Luna"
- "M fits Luna"
- "Contains chicken · Luna avoids it"
- "Not for Luna: weight"
Badges use words, not only color.
Collection pages get an "Only what fits Luna" switch and a "Best fit first" sort when you add the Pet filter block.
Sizes: on products with a size option, the matching size is preselected.
Product data
Create these product metafields in Settings → Custom data → Products. Use the namespace lilya.
| Key | Type | Meaning |
|---|---|---|
pet_species | List of single line text | dog, cat. Empty means every species. |
pet_age_min_months, pet_age_max_months | Integer | Age range in months |
pet_weight_min_kg, pet_weight_max_kg | Decimal | Weight range in kg |
pet_sizes | List of single line text | Sizes the product comes in: xs, s, m, l, xl |
pet_contains | List of single line text | Ingredients, for example chicken, grain. Use the same words as your "avoid" options. |
A product with none of these fields shows no badge, so you can add data gradually.
How a match is decided
- The species isn't in the list → Not for.
- The age or weight is outside the range → Not for.
- The product has sizes and none fits → Not for.
- The product contains something the pet avoids → Contains … avoids it.
- Otherwise → Good for, plus the fitting size when the product has sizes.
Size comes from weight when the shopper doesn't pick one. Change the weight thresholds in Theme settings → Pet profiles.