Created
April 8, 2024 23:21
-
-
Save notkurt/fd076b79ac276b03d0ad1acb9e3aa881 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% liquid | |
assign target_handle = block.settings.default_athlete | |
assign default_object = shop.metaobjects.tier_1_athletes[target_handle] | |
if cart.attributes._ATHLETES != blank | |
assign athlete_handles = cart.attributes._ATHLETES | split: ',' | |
for athlete_handle in athlete_handles | |
assign athlete_object = shop.metaobjects.tier_1_athletes[athlete_handle] | |
if athlete_object != blank | |
assign default_object = athlete_object | |
break | |
endif | |
endfor | |
endif | |
if request.design_mode and block.settings.default_athlete == blank | |
assign default_object = shop.metaobjects.tier_1_athletes['kim-ravaillion'] | |
endif | |
%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment