Requesting assistance with conditional statement for an email notification

Requesting assistance with conditional statement for an email notification

pickleball365
New Member
10 0 7

I am looking for some assistance with a conditional statement I am trying to make work in an email notification. The email is the "New gift card" notification. I have 3 gift cards on sale and would like to show the intended value, instead of the gift card's sale price. I acknowledge I am "breaking the rules" by showing gift cards on sale, but this time of year it helps with holiday promotions.

Below is the original and modified code. I thought this would work, but it's not. gift_card.initial_value is still coming through as the on sale price. Any help is appreciated. 

 

ORIGINAL

<td class="giftcard__balance">
  {{ gift_card.initial_value | money_with_currency }}
</td>

MODIFIED

    <td class="giftcard__balance">
      {% if gift_card.initial_value == 80.00 %}
        {{ 100 | money_with_currency }}
      {% elsif gift_card.initial_value == 63.75 %}
        {{ 75 | money_with_currency }}
      {% elsif gift_card.initial_value == 45.00 %}
        {{ 50 | money_with_currency }}
      {% else %}
        {{ gift_card.initial_value | money_with_currency }}
      {% endif %}
    </td>
Replies 5 (5)

KetanKumar
Shopify Partner
37282 3652 12088

@pickleball365 can you please share your store url please 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
pickleball365
New Member
10 0 7
KetanKumar
Shopify Partner
37282 3652 12088

@pickleball365 thanks for URL i will check and give you code

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

Guleria
Shopify Partner
3637 733 1023

Hello @pickleball365 ,

 

Try this one

<td class="giftcard__balance">
  {% assign initial_value_cents = gift_card.initial_value | times: 100 %}
  {% if initial_value_cents == 8000 %}
    {{ 100 | money_with_currency }}
  {% elsif initial_value_cents == 6375 %}
    {{ 75 | money_with_currency }}
  {% elsif initial_value_cents == 4500 %}
    {{ 50 | money_with_currency }}
  {% else %}
    {{ gift_card.initial_value | money_with_currency }}
  {% endif %}
</td>

 

If problem solved don't forget to Like it and Mark it as Solution!
And if you need help with customization/code part you can contact me for services

You can find the email in the signature below.

 

Thanks

- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com
- Try GEMPAGES a great page builder
- If you want to help me please PAYPAL
pickleball365
New Member
10 0 7

Hi @Guleria, thank you for posting. Unfortunately, I am getting the same result. The gift card value in the email is still coming through with the sale price.