Create page using JSON if-then else logic to prompt customer to create account

Create page using JSON if-then else logic to prompt customer to create account

mreynolds
Excursionist
37 0 5

Hello,

 

I'm using a Shopify template that uses JSON for the pages instead of .liquid extension. I'm trying to create a 'deals' page using a JSON if/then else logic (see attached csv) that prompts the customer to create an account to see the deals.  

 

Following a tutorial that creates this as a page.liquid file, I think I'm close but not sure about the last else statement. This JSON code validates in a JSON validator, but not in Shopify as a page. The errors I'm getting in Shopify are:

Unable to update the file
unknown key 'if'
unknown key 'then'
unknown key 'else'
missing required key 'sections'
missing required key 'order'

 

The page I'm trying to point them to with the last else statement is: https://www.allendesignsstudio.com/account/login

 

Can anyone tell me if I'm coding this correctly?

 

Thanks, Margie

Replies 0 (0)