I have the following blocks of code that I can't seem to to work correctly. The list sets and populates perfectly, but the switchee statement doesn't work. I konw that it has do do with parse order but I can't figure out what is going on. The debug value of for the switchee tag is this:
{exp:switchee variable="M00o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr" parse="inward"}
It seems as though switchee is running before stash is parsing list_count, is there any way to fix this?
{exp:stash:set_list name="buy_now_options" parse_depth="4" parse_tags="yes" trim="yes"}
{exp:channel:entries entry_id="{lv_site_buy_now}" status="open|closed" order_by="entry_id" sort="asc" limit="3"}
{stash:title}{title}{/stash:title}
{stash:item_entry_id}{entry_id}{/stash:item_entry_id}
{stash:url_title}{url_title}{/stash:url_title}
{stash:logo}{partner_logo:url}{/stash:logo}
{stash:base_url}{partner_base_purchase_url}{/stash:base_url}
{exp:stash:set_list:nested name="purchase_urls" context="{entry_id}" parse_tags="yes"}
{partner_retail_urls}
{stash:product}{partner_retail_urls:product:title}{/stash:product}
{stash:url}{partner_retail_urls:url}{/stash:url}
{/partner_retail_urls}
{/exp:stash:set_list:nested}
{/exp:channel:entries}
{/exp:stash:set_list}
{exp:stash:get_list name="buy_now_options" parse_tags="yes" parse_conditionals="yes"}
{exp:switchee variable="{exp:stash:list_count name='purchase_urls' context='{item_entry_id}'}" parse="inward" }
{case value="0"}
true
<li><a href="{base_url}" target="_blank"><img src="{logo}" alt="{title} Web Store" /></a></li>
{/case}
{case default="yes"}
false
<li><a href="{base_url}" data-reveal-id="{url_title}-modal"><img src="{logo}" alt="{title} Web Store" /></a></li>
{/case}
{/exp:switchee}
{/exp:stash:get_list}