Make /account/orders url different than /account link

dartgift
New Member
2 0 0

Hello there,

 

I am working on customer account and it's been days that I am trying to figure out how to make the orders history url (/account/orders) different than /account url.

Or if it is not possible, then I want to create a new url called: /account/order-history and inject this code in that page:

 

<div class="six right account-table bottompad-section">

    <h3>{{ 'customer.orders.title' | t }}</h3>

    {% if customer.orders.size > 0 %}

    {% paginate customer.orders by 5 %}

    {% for order in customer.orders %}

    <div class="row summary{% if forloop.last %} last{% endif %}">

      <h4>{{ order.name | link_to: order.customer_url }}{% if order.cancelled %}: {{ 'customer.order.cancelled' | t }}{% endif %}</h4>

      <p class="capitalize"><small>{{ 'customer.orders.date' | t }}: {{ order.created_at | date: settings.month_day_year }}<span class="separator" aria-hidden="true"></span>{{ 'customer.orders.total' | t }}: {{ order.total_price | money }}<span class="separator" aria-hidden="true"></span>{{ 'customer.orders.payment_status' | t }}: <span><strong>{{ order.financial_status_label }}</strong></span><span class="separator" aria-hidden="true"></span>{{ 'customer.orders.fulfillment_status' | t }}: <span class="captitalize"><strong>{{ order.fulfillment_status_label }}</strong></span></small></p></div>

    {% endfor %}

    {% if paginate.pages > 1 %}

    <div class="pagination">

      <div>{%- render 'pagination' -%}</div>

    </div>

    {% endif %}

    {% endpaginate %}

    {% else %}

    <p>{{ 'customer.orders.none' | t }}</p>

    {% endif %}

   

  </div>   

 

Can someone help me please? I am really struggling to make these changes to my site.

Thank you in advance for your assistance.

 

Meriem

0 Likes