Current Specification


*【9/6】 it became unnecessary to input the "shipping address" when giving an e-gift to the purchaser.

As a result of the recent release, it is now possible to provide a more natural experience for gift purchasers by eliminating the need to input a shipping address when setting "e-gift shipping" in the AnyGift management dashboard.

However, when an e-gift is purchased with "e-gift shipping" set, two orders will be created in the order management dashboard due to internal specifications.

Please note that payment will only be processed for the order with the "e-gift payment" tag.

Slice_26_(4).png

As a result, if no action is taken, the purchase history on the purchaser's My Page will also display two orders.

It is possible to modify the theme so that only one order is displayed on the My Page. Here is how to do it.

Modifying the Liquid Theme


The following modification will make it so that only the order with the e-gift main order tag, which is the order where the payment was made, is displayed in the customer's account page, while hiding the order with the e-gift payment order tag.

In many themes, the template file that displays the order history in the customer's account page is called templates/customers/account.liquid. This is the file that needs to be edited.

(The instructions will be given using the default Dawn theme as an example, but the process should be similar for other themes as well.)

  1. In the templates/customers/account.liquid file, look for the code between {%- for order in customer.orders -%} and {%- endfor -%}, which is used to loop through the customer's orders and display them on the page.

    {%- for order in customer.orders -%}
      <tr role="row">
        <td
          id="RowOrder"
          role="cell"
          headers="ColumnOrder"
          data-label="{{ 'customer.orders.order_number' | t }}"
        >
          <a href="{{ order.customer_url }}" aria-label="{{ 'customer.orders.order_number_link' | t: number: order.name }}">
            {{ order.name }}
          </a>
        </td>
        <td headers="RowOrder ColumnDate" role="cell" data-label="{{ 'customer.orders.date' | t }}">
          {{ order.created_at | time_tag: format: 'date' }}
        </td>
        <td headers="RowOrder ColumnPayment" role="cell" data-label="{{ 'customer.orders.payment_status' | t }}">
          {{ order.financial_status_label }}
        </td>
        <td headers="RowOrder ColumnFulfillment" role="cell" data-label="{{ 'customer.orders.fulfillment_status' | t }}">
          {{ order.fulfillment_status_label }}
        </td>
        <td headers="RowOrder ColumnTotal" role="cell" data-label="{{ 'customer.orders.total' | t }}">
          {{ order.total_price | money_with_currency }}</td>
      </tr>
    {%- endfor -%}
    
  2. {%- for order in customer.orders -%} Add the following code directly below

    {%- assign duplicated_egift_order = order.attributes | where: "eギフト決済用注文" | size -%}
    {%- assign selectable_parent_egift_order = order.attributes | where: "選べるギフト親注文" | size -%}
    {%- assign selectable_child_egift_order = order.attributes | where: "選べるギフト子注文" | size -%}
    {%- assign multiple_shipping_parent_egift_order = order.attributes | where: "eギフト複数配送親注文" | size -%}
    {%- if duplicated_egift_order == 0 or selectable_parent_egift_order == 1 -%}
    {%- if selectable_child_egift_order == 0 -%}
    {%- if multiple_shipping_parent_egift_order == 0 -%}
    
  3. {%- endfor -%} add the following description just before.

    {%- endif -%}
    {%- endif -%}
    {%- endif -%}