Adding the Product name to the account history page

Adding the Product name to the account history page

Riyshin
Shopify Partner
5 0 0

Hi there,

 

as the title says, I would like to add the product name to the history page, at the moment, customers who purchased many things will only see the order number, date, paid, etc. But not the product names, so they are forced to go into every order to see where their product is. I'm selling digital goods and I sometimes update them to the latest patch and I want to make it easy for them to find their digital products, so they can download it. I already tried messing around with the code and got close to it. But I'm stuck where it shows every detail of the product. Here is my current code (the red marked code is what I added):

 

chrome_jMdZyoE8AZ.png

 

 and here is what it shows on the history page (using the impulse theme):

 

Riyshin_0-1641899917998.png

 

P.S.: I don't know if it was needed to censor the ID or not. 😄

EDIT: Just noticed that this should have went to Shopify Design, but I don't see an option to delete or move this topic over there, apologize.

Replies 3 (3)

Riyshin
Shopify Partner
5 0 0

Update: I managed to do it, by taking the code from the customer/order page.

XeeEli
Shopify Partner
1 0 0

Can you guide me how you did it... I am also looking for same solution.

Riyshin
Shopify Partner
5 0 0

@XeeEli wrote:

Can you guide me how you did it... I am also looking for same solution.


I haven't done any coding edits in a long time, but here is my code, I also added the code and an image. The marked area on the image is what I added, maybe this is helpful.

 

            <tr>
                <th colspan="3">Preview</th>
                <th colspan="3">Name</th>
            </tr>
            	{% for line_item in order.line_items %}
                <tr>
                <td colspan="3"> {{ line_item.image | image_url: width: 200, height: 200 | image_tag: srcset: nil | link_to: order.customer_url }}</td>
                  <td colspan="3" data-label="{{ 'customer.order.product' | t }}"><h2>{{ line_item.title | link_to: order.customer_url }} </h2></td>

 


Riyshin_0-1659176934573.png

Edit: This is how it looks on the account page.

 

Riyshin_1-1659177171862.png