Registrations In Account Area
Last updated
Last updated
For logged in customer, its possible to show their registered products in the account area or anywhere that's suitable. This will required some knowledge of shop's theme and able to make changes to the theme's HTML.
Here are the steps for putting product registrations in account area:
Go to Shop Admin > Online Store > Themes
Select the Edit HTML/CSS on the top right corner
Locate the template registration should in (e.g customers/account.liquid - This is the same account page that shows order history)
Place the following code into the right place - Make sure it doesn't break the HTML, always good to place it after close tag
Now save the changes and check your changes in the frontend.
Note: the above code will display the default form - which is Product registration, however you can change the default form in the App settings > General > Default form
Alternatively you can uncomment (e.g remove the // in the // defaultFormSlug: 'product-registration' on above code and change product-registration to the form slug you want to display (the form slug can be found in the View on frontend in the Admin Form and it will open a new tab with url similar to apps/product-registration?form=product-registration, in here the product-registration is the form slug, if its different from, the slug will be different)
The registeredEntriesToShow from above is for if you only want certain forms to be shown in the registered entries, e.g when you have a lot of forms and only want to show registered entries for the specific form, like you have 10 forms and on the product-registration form you only want to show registered entries for product-registration from, then you can use the registeredEntriesToShow variable
The makeClaimUrlPrefix is for the normal form url, by default its at /apps/product-registration but if you changed the app proxy url in the app config, you will need to use the new one url
In the above code, there is a setting for different mode, this is used to control how the app behave and it have the following modes
normal - When in this mode, it will show the both the form and registered entries (will need to be logged in and have registered entries to be able to see it)
form - Only show the form part
registered - Only show the regsitered entries part
Ajust the mode in the above code for diferent effect e.g when its in the account area, you might only want the registered mode, so it won't show the form