You can embed a Return form on your website using our Online Returns Service. This makes it easy for your customers to print a return label from your website if they need to make a return.
Follow the instructions in this article to generate and configure the code needed to embed an nShift Ship return form on your website:
- Generating the script for your website
- Changing the language of the return form
- For developers: Notes about JQuery and CSS styling
Generating the script for your website
Go to returns.consignor.com to generate the code for your return form. This requires that you have the API key for Shipment Server and your Actor ID ready. You can acquire these from nShift Customer Service. (Please note that the return form does not work together with Cloud Print).
- Enter your API key and Actor ID in the fields and click NEXT STEP. (If you are generating a form for your testing environment, use the API key and Actor ID for the Shipment Server QA server. Make sure not to use test credentials on your website as the return labels will be invalid)
- You will now see a list of the products available on the entered Actor ID. Select one or more products that your customers should be able to use when returning goods to you. Select services and goodstypes if needed and click NEXT STEP. (Please note that reference fields are currently not supported so return products with mandatory reference fields cannot be used in the return form).
- Fill in your contact information, add an optional logo, and click Next step.
- Enter the domain that your form should work on. This must be the exact domain including subdomain(s). If the form is going to be embedded on shop.mydomain.com, please enter the whole domain and not just mydomain.com. Fill in the text to display on the return page and choose whether you want to include a field for "Reason for return" and to receive email notifications for each return label.
- Fill in information about how to hand in the return package, if you want this information to be shown on your return form.
- Check the checkbox Include a "Reason for return" field on the form if you want your form to be extended with an extra field where the customer can enter a reason for the return. If you check the checkbox Receive email notifications for each return label, you will receive an email for each label that is generated. The email is a copy of the email to the customer, and it will be sent to the address that you entered in your contact information (step 3). The email will contain the return reason if this field has been enabled on the form and the generated label attached as a PDF file. Click NEXT STEP to continue.
- The script will now be generated. This may take a few moments. Copy and paste the script to your website. This might be a job for your webmaster/ developer. You must be able to edit the source code of the page to embed the form. The server-side language of the page (i.e. PHP, .NET, Ruby, HTML only, or other) is not important, as the form script is pure javascript and will work in any type of page (since the form is generated client-side).
Changing the language of the return form
The form is currently available in the following languages:
- English (ENG)
- Danish (DAN)
- Norwegian (NOR)
- Swedish (SWE)
- Finnish (FIN)
- German (DEU)
To change the language, locate the following line in the script that you just copied to your own website:
<script src='http://returns.consignor.com/returnforms/script/ENG' type='text/javascript'></script>
Notice the "ENG" part in the src-attribute. Change this to one of the three-letter codes (i.e. “DAN”) that you see in the bullet list above. If you enter an invalid code, the language will default to English.
For developers: Notes about jQuery and CSS styling
The form script uses the jQuery javascript library. The use of this library is very widespread, and thus, in many cases, jQuery will already be loaded on your website.
Our form script will check whether or not jQuery is present, and if it is not, it will be loaded.
Additionally, our form script uses the jQuery.noConflict() method to remove jQuery from the "$" variable. Thus, jQuery functions will be called on "jQuery" and not on "$". This means that our form should work alongside other libraries using "$" as top-level variable (for instance Prototype or MooTools).
You may want to change the look of the return form - i.e. change the width, the font face, the background colors, or make other adjustments.
This can be done by adding CSS rules to the page after the default styles have been loaded. You can override the default CSS rules or add your own rules. Look for the place in the script that says:
<style type='text/css'>
/* Insert custom CSS here to change the form styles */
</style>
If you need to see the default CSS, you can find the stylesheet here: http://returns.consignor.com/css/returnform.css.
You can also inspect the form using Google Chrome’s inspector to see the default styles for each element.