Skip to main content

if the item count is one, subject line should be: “You have an item in you shopping cart” 

if item count is more then one, subject line should be: “You have an items in you shopping cart” 

 

How do i did this?

Thanks! 

Alice 

Hey @AliceC 

Thank you so much for asking such a great question! Happy to help.

You can use event variables in your subject line to customize how your customers are seeing it! This is unique to each ecommerce platform and each account as to the event information being used it’s hard to tell you exactly what to use for syntax but an example for BigCommerce would be: {{ event.extra.line_items.0.quantity }} . The article I included goes over how to use and find the correct event variables you are looking for to use in your subject lines!

Hope this helps!


Thanks @stephen.trumble ! 

We use Shopify. Could you help me string the subject line together with the event variable in an IF statement?  

if the item count is one, subject line should be: “You have an item in you shopping cart” 

if item count is more then one, subject line should be: “You have an items in you shopping cart” 


For instance would it be this…?

 

{{ % if event.extra.line_items.0.quantity = 1 %}} You have an item in you shopping cart {% else %} You have items in you shopping cart {% endif %}

 

OR 

 

{% if items.quantity|floatformat:0 < 2 %} You have an item in you rshopping cart {% else %}You have items in your shopping cart {% endif %}

 

Sorry i’m only a novice. Any help would be greatly appreciated! 


I believe it would be like the first example you gave.  What happens you test it out with Preview? 


Waiting for preview results


@Mailbox Manny is most likely correct, the first example you you shared {{ % if event.extra.line_items.0.quantity = 1 %}} You have an item in you shopping cart {% else %} You have items in you shopping cart {% endif %}. Definitely preview the email to make sure it is correct. 

Thank you all for working together to find a solution and for being part of the Klaviyo Community!


@ayyub_here @Mailbox Manny 

No - “{{ % if event.extra.line_items.0.quantity = 1 %}} You have an item in you shopping cart {% else %} You have items in you shopping cart {% endif %}”  does not work hence i’m asking the question. 

Any one have any ideas?? 

 


Reply