Show the chosen date/time on the customer account's order page

You customer might have the ability to log in to their account on your store if you've chosen that option with Shopify. When logging in, your customers have access to their order history. If you've set up Buunto Date Picker to show on the product page then you've have nothing to change. The selected date/time should appear next to the orders items:

However by default, if you've chosen to display Buunto Date Picker on the cart page, then nothing will show on the customer account's order page.

When you're using the cart mode, the date / time information are stored on the order's attributes. To show the order attributes on the customer account's order page we'll need to add a code snippet in this page's template.

To do so:

  • go on your store's admin area;
  • then go on Online Store and click Customize;
  • then at the top right of the page click "...", then click Edit code;
  • then search for the file customers/order.liquid and open it

In the liquid template code look for the following line of code (it should be around line 12):

<p>{{ 'customer.order.date_html' | t: date: order_date }}</p>

Insert the following code snippet just under it that line.

{% assign tag_names = "Method,Delivery Date,Delivery Time,Pickup Date,Pickup Time" | split: "," %}
{% for tag_name in tag_names %}
  {% if order.attributes[tag_name] %}
    <strong>{{ tag_name }}:</strong> {{ order.attributes[tag_name] }}<br />
  {% endif %}
  {% if forloop.last %}
    <br />
  {% endif %}
{% endfor %}

Important: make sure to modify the first line to list all the possible attribute names you want to display. They need to be the exact same values that you've set in the admin.

The values are defined in "Messages":

  • Method tag label - Default value: Method
  • Order tag date label (if applicable, check the value for both "Local delivery" and "Store pickup") - Default value: Delivery Date / Pickup Date
  • Order tag time slot label (if applicable, check the value for both "Local delivery" and "Store pickup") - Default value: Delivery Time / Pickup Time

Make sure each tag labels are separated with a comma without any extra spaces. For example:

{% assign tag_names = "Method,Local Delivery Date,Time Slot,Store Pickup Date,Time Slot" | split: "," %}

If these values are not exactly the same as set in the admin the dates won't show up in the customer account's order page.

Once the set up is completed, the chosen date / time should appear on the order page:

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.