Liguid syntax error: Endif is not a valid delimiter

madsforsberg
Tourist
6 0 1

So I'm creating my email marketing. I use Klaviyo and then I paste that into my Shopify Notifications.

I'm not creating my third email and I get this error:

Skærmbillede 2019-07-15 kl. 11.39.54.png

I have never worked with code before, but after getting this I tried replacing all the "endif" with "endfor", which resultet in the same message, except then it told me there was an error with "endfor" and told me to use "endif...

Can anyone help?

 

I have the entire code, but I don't know what part to post cause I can't exceed 20,000 characters.

Does anyone know anything about this problem, or what part to post so you guys can see?

Replies 7 (7)

oscprofessional
Shopify Partner
15843 2371 3073

Hello 

You don't need to replace endfor with endif, you need to check that when you are pasting the code you might have missed if statement or else an extra endif must have been added to the file. 

With out code access can't check anything. 

If you give me an access I will let you know the error or the issue.

 

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing
madsforsberg
Tourist
6 0 1

Funny enough I figured out some of it, the code automatically inserted an endif instead of an endfor, so I just changes it.

However I have trouble with creating the code for the email in general. 

It's a order refund email and I can't seem to get the negative price inserted to indicate the refund both in the top and in the subtotal on the bottom, and I can't get the pictures in as well showing the negative price
Is there any way you can help me with that?

Kamillahilding
Visitor
1 0 0

 Hello Mads,

I have exactly the same problem as you. You say it automatically changed, I don't see how mine can do that - can you help?

 

facundo-milagro
Visitor
1 0 0

Did you find a way to fix it? I'm having the same problem with my shipping confirmation e-mail 

Clubhatz1
Visitor
1 0 0

Hello everyone, I have the same problem. The created code in Klaviyo cannot be inserted into Shopify. It's a mail for order confirmation. I will gladly provide the code. I would be very happy if someone could help me. Thanks a lot. Best regards

jonasgoddeeris
Excursionist
13 0 3

I fixed this by wrapping every text in its own WHEN IF ELSE statement. 

Very inefficient but it works.

I think this is error throws because of nesting too many statements in the big chunck of HTML?




FOR EXAMPLE

jonasgoddeeris_0-1611418870406.png

 

K13
Excursionist
22 0 3

Hello,

I'm having the same problem. Can you help?

 

Here's the error I'm getting:

Body html Liquid syntax error: 'endfor' is not a valid delimiter for if tags. use endif

Thanks,

Kristin