The repo for Purrform's main BigCommerce store.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add read more links for health conditions in Diet Builder and style adjustments

+35 -2
+28 -1
assets/js/theme/custom/diet-builder.js
··· 99 99 'A common hormonal disorder where the body cannot regulate blood sugar effectively. Most frequently seen in overweight, older, or inactive cats.', 100 100 recommended: 101 101 'All Purrform products are suitable — naturally high in protein and low in carbohydrates, helping to support stable blood glucose levels and healthy weight management.', 102 + readMoreUrl: 'https://www.purrform.co.uk/blog/feline-diabetes/', 102 103 }, 103 104 'Chin Acne': { 104 105 explanation: 105 106 'A skin condition characterised by blackheads, pimples, or inflamed sores on the chin and lips, often linked to overactive sebaceous glands, stress, allergies, or contact irritation.', 106 107 recommended: 107 108 'We recommend plain rabbit, turkey, or quail. These proteins are less likely to trigger food sensitivities. Chicken and beef are more commonly linked to feline food allergies.', 109 + readMoreUrl: 'https://www.purrform.co.uk/blog/chin-acne-in-cats/', 108 110 }, 109 111 'Inflammatory Bowel Disease (IBD)': { 110 112 explanation: ··· 117 119 'A gradual decline in kidney function, most commonly diagnosed in older cats. Early management can help slow progression and support overall kidney health.', 118 120 recommended: 119 121 'Choose products with low phosphorus levels, such as the venison pouches. Adding a couple of spoons of water to meals can further support kidney function.', 122 + readMoreUrl: 123 + 'https://www.purrform.co.uk/blog/benefits-of-raw-food-for-cats-in-relation-to-kidney-disease/', 120 124 }, 121 125 'Urinary Tract Conditions': { 122 126 explanation: ··· 129 133 'Includes conditions such as gingivitis, tooth decay, and oral pain, affecting a significant proportion of cats. If left unmanaged, it can impact overall health and wellbeing.', 130 134 recommended: 131 135 'We recommend the 5 Days Fresh range — this complete range does not contain bone and is suitable for cats with dental sensitivities or existing oral discomfort.', 136 + readMoreUrl: 137 + 'https://www.purrform.co.uk/blog/understanding-your-cats-teeth/', 132 138 }, 133 139 Hyperthyroidism: { 134 140 explanation: 135 141 'Caused by an overactive thyroid gland, commonly resulting in weight loss despite an increased appetite. Most frequently diagnosed in middle-aged to older cats.', 136 142 recommended: 137 143 'A low-iodine diet can help support thyroid management. Chicken and turkey are naturally low in iodine, with rabbit and beef also being suitable protein sources.', 144 + readMoreUrl: 'https://www.purrform.co.uk/blog/hyperthyroidism-in-cats/', 138 145 }, 139 146 Obesity: { 140 147 explanation: 141 148 'A growing health concern that increases the risk of diabetes, arthritis, and liver disease. Often linked to overfeeding and insufficient activity.', 142 149 recommended: 143 150 'Feeding lean, high-quality proteins can help promote healthy weight loss while maintaining muscle mass and supporting overall metabolic health.', 151 + readMoreUrl: 152 + 'https://www.purrform.co.uk/blog/just-what-is-the-raw-meat-diet-anyway/', 144 153 }, 145 154 }; 146 155 ··· 999 1008 1000 1009 const limitMsg = el( 1001 1010 'p', 1002 - { className: 'diet-builder-health__limit-msg diet-builder-inline-error' }, 1011 + { 1012 + className: 1013 + 'diet-builder-health__limit-msg diet-builder-inline-error', 1014 + }, 1003 1015 'You can select a maximum of 2 health conditions. Deselect one to choose another.', 1004 1016 ); 1005 1017 ··· 1125 1137 recommendedEl.append(recommendedLabel, info.recommended); 1126 1138 1127 1139 body.append(explanationEl, recommendedEl); 1140 + 1141 + if (info.readMoreUrl) { 1142 + const readMoreEl = el( 1143 + 'a', 1144 + { 1145 + className: 'diet-builder-health__info-read-more', 1146 + href: info.readMoreUrl, 1147 + target: '_blank', 1148 + rel: 'noopener noreferrer', 1149 + }, 1150 + 'Read our blog post about this', 1151 + ); 1152 + body.appendChild(readMoreEl); 1153 + } 1154 + 1128 1155 item.append(header, body); 1129 1156 infoSection.appendChild(item); 1130 1157 });
+6
assets/scss/custom/pages/_diet-builder.scss
··· 822 822 } 823 823 } 824 824 825 + .diet-builder-health__info-read-more { 826 + display: inline-block; 827 + margin-top: 8px; 828 + font-size: 14px; 829 + } 830 + 825 831 // ── Results step ───────────────────────────────────────────── 826 832 .diet-builder-results { 827 833 width: 99.4vw;
+1 -1
config.json
··· 1 1 { 2 - "name": "diet-builder - backend v6", 2 + "name": "diet-builder - blog links", 3 3 "version": "6.10.0", 4 4 "template_engine": "handlebars_v4", 5 5 "meta": {