if statement for order status

New Member
52 0 0

I am looking at adding a green tick to orders that have been marked as fulfilled, so for example {% if order.status == 'fulfilled' %} SHOW GREEN TICK {% endif %}

 

I am just not 100% sure on the markup, could someone help? Thanks. 

0 Likes
Shopify Partner
1156 133 204

If you can post the code for your order status page that would help.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
New Member
52 0 0

Hello, I don't have an order status page? But I have added the code from the page where I aim to add the code! Thanks.

 

<tr id="{{ line_item.key }}" class="responsive-table__row" >
                            <td data-label="{{ 'customer.order.product' | t }}">
                              {{ line_item.title | link_to: line_item.product.url }}
                              {% if line_item.fulfillment %}
                              <div class="note">
                                {%- assign created_at = line_item.fulfillment.created_at | date: format: 'month_day_year' -%}
                                {{ 'customer.order.fulfilled_at' | t: date: created_at }}
                                {% if line_item.fulfillment.tracking_number %}
                                <a href="{{ line_item.fulfillment.tracking_url }}">{{ line_item.fulfillment.tracking_company }} #{{ line_item.fulfillment.tracking_number}}</a>
                                {% endif %}
                              </div>
                              {% endif %}
                            </td>
                            <td data-label="{{ 'customer.order.sku' | t }}">{{ line_item.sku }}</td>
                            <td data-label="{{ 'customer.order.price' | t }}">{{ line_item.price | money }}</td>
                            <td data-label="{{ 'customer.order.quantity' | t }}">{{ line_item.quantity }}</td>
                            <td data-label="{{ 'customer.order.total' | t }}">{{ line_item.quantity | times: line_item.price | money }}</td>
                          </tr>
                          
                          
                          
                          <!-- I WANT TO ADD THE GREEN TICK HERE WHEN AN ORDER IS FULLFILLED AND A RED X IF THE ORDER IN=S MARKED AS UNFORFILLED OR CALCELLED -->
                          {% endfor %}
                        </tbody>
                        <tfoot>
                          <tr class="responsive-table__row">
                            <td colspan="4" class="small--hide">{{ 'customer.order.subtotal' | t }}</td>
                            <td data-label="{{ 'customer.order.subtotal' | t }}">{{ order.subtotal_price | money }}</td>
                          </tr>
0 Likes
Shopify Staff
Shopify Staff
607 40 85

Hey, there.

 

This is Dallas from the Shopify Social Care Team.

 

Just to clarify are you wanting this to show up on the internal side of your Store Admin on your Orders page?

 

There isn't a way for a green checkmark to be added or any code adjustments to be made to that page since the Store Admin code isn't able to be adjusted. However, the orders page does have a status section that shows what orders have been fulfilled and what ones haven't. Is there a particular reason why this wouldn't work for what you're wanting? 

2019-12-rak94-7fxo3

 

Please let me know if that doesn't answer your question and I will be happy to assist you further.

 

Best,

Dallas | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
New Member
52 0 0
Hi Dallas,

This is for the front end of my website, so when the customer places an order they can go and look to see whether the order is on it’s way etc. Thanks,
0 Likes
Shopify Staff
Shopify Staff
607 40 85

I see! Thank you so much for clarifying. 

 

So this would be for your customer account page then correct? Can you let me know what theme you are using? 

 

Best, 

Dallas | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
New Member
52 0 0
It would indeed. I am using a custom theme called EVA Modern but have included a snippet of code where I would like to add the tick etc.

Thanks,
0 Likes
Shopify Staff
Shopify Staff
607 40 85

I see! Thank you so much for clarifying. Since this is a third party theme I don't actually have access to that information of what you should put into the code. To ensure that the code is compatible with the theme I suggest that you reach out to the theme developer who would have a better understanding of the inner workings of the theme, it's backend code, and where it should be located. 

 

The other option would be to reach ou to the Shopify Experts who should be able to get this done for you. 

 

If you have any more questions please let me know! 

Dallas | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
New Member
52 0 0
Hello,

I have checked with the theme supplier and all is compatible. I am just looking for the correct terminology to use in the if statement to get certain HTML divs to show based on the fulfilment status of the item. Thanks.
0 Likes