You can add a "Request a return" button next to your customer's order (or call it whatever you'd like!), if they have an account with your store. This will automatically fill up the information in the order search, so your customers will be able to directly choose the items they want to return and the quantity.
To do this, a tiny bit of code is required, but we'll guide you every step of the way. We do recommend to have an understanding of how your Shopify theme is coded. Here is a helpful link if you'd like to learn a bit about HTML tables!
Please know you can use this snippet of code: <a href="/a/returns?order={{order.order_number}}&email={{customer.email}}"> Request a return </a>
in your Shopify confirmation emails, or anywhere else you'd like to add a link to your return portal. Note the email: email={{customer.email}}
, variable will be auto-filled in the portal if your customers have an account with your store which is why it was removed from the explanation below. You can also change the link's text Request a return
to what fits your business best!
Note that if you have a prefix or a suffix to your order numbers, you will need to "hard code" it before or after the {{order.order_number}}
variable.
Step 1: Customize your Shopify theme
Go under "Online Store" inside of the Shopify navigation bar, and click on "Customize my theme".

Step 2: Edit the code
Click on "More actions" on the upper left of your screen, and "Edit code".

Step 2a: To add the link in your customer's account page
Then, you can go to the page customers/account.liquid and add a snippet of code inside of the loop {% for order in customer.orders %}
:<td> <a href="/a/returns?order={{order.order_number}}"> Request a return </a> </td>
Note that you'll also have to add a header <th>   </th>
under <thead> <tr>
outside of the for loop, just above.
Remember that if you have a prefix or a suffix to your order numbers, you will need to "hard code" it before or after the {{order.order_number}} variable.

This will add the link here:

Step 2b: To add the link on your customer's order view page
You can also add a button directly to the order page, under customers/order.liquid, and add this snippet of code wherever works for your layout (if you do not know where to put it, we recommend copying the image below).
Remember that if you have a prefix or a suffix to your order numbers, you will need to "hard code" it before or after the {{order.order_number}} variable.
<a href="/a/returns?order={{order.order_number}}"> Request a return </a>

This will add a link somewhere on this page, depending on where you add it in the code:

Comments
1 comment
Hello! The pictures are broken and it is difficult to decipher where to place the code exactly without them. Inserted at random, the code creates a link that doesn't fit well into the format of the returns page. I want it to look like it does in the Return Magic Demo video, as a part of the order history grid/table.
Please sign in to leave a comment.