Customer Order History products

Shreyank
Excursionist
15 1 2

Hello,

   How can we show all the products customers have ordered in past on a page without repeat ?

0 Likes
Dirk
Shopify Staff
Shopify Staff
905 99 205

Hey, @Shreyank 

Great question, to ensure we are on the same page: Are you looking for a way to show visitors on your store the recent orders that have been placed on your store? As a sign of social proof? If that is the case, there is an app called Show Recent Orders by Sales Pop that can help boost sales with credible sales notifications for your visitors to see when a purchase has been made on the store. Feel free to check out a demo of the app here.

If there is anything else I can help you with, please let me know.

Dirk | 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
Shreyank
Excursionist
15 1 2

@Dirk  Thanks for the reply. However this is not the thing I am looking for. 

We are building a page where customer can see all of the items they have ordered in the past. So, it would be the page with the customers ordered products without repeat. 

By this we want them to see what they have ordered and make sure they can re order that products. I am just struggling with the logic to implement.however i cant seem to find one.

 

so far i have gone till below but it seems does not work:

{%capture filtered_items_array%}
           {%for order in customer.orders%}
             {%for line_item in order.line_items%}
                {{line_item.title}}|
             {%endfor%}
           {%endfor%}
        {%endcapture%}


        {%for order in customer.orders%}
         {%for line_item in order.line_items%}
            {%assign filtered_title = line_item.title | append: '|'%}

            {%if filtered_items_array contains filtered_title %}
                <p>{{line_item.title}}</p>
            {%endif%}

            {%assign filtered_items_array = filtered_items_array | remove: filtered_title %}
         {%endfor%}
        {%endfor%}

 

I tried this hack but could not seem to work fine. Do you have any suggestion on how i can achieve this ?

0 Likes
Dirk
Shopify Staff
Shopify Staff
905 99 205

Ah, ok makes sense! I'm not familiar with coding so I can't help there.

However, there are customer order management apps out there that allow your customers to effectively manage their orders from your site. This even allows them to create returns, exchange, or cancel requests, view order history, and reorder previous orders.

If there is anything else I can help you with, please let me know.

Dirk | 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