less than a minute read • Updated
Create A Customer Portal In Webstudio
Overview
With our drop-in customer portal feature, you can easily allow customers to view order history, manage their subscriptions, update billing/shipping info, and more.
Enable Customer Portal
1In the Foxy admin, go to Settings > Customer Portal.
2Under Allowed Origins, specify which domains you want to allow the customer portal to be installed on (be sure to include both staging and custom domains).
3Configure other options as needed.
Add Code Snippets
1In the Foxy admin, go to Settings > Website & Products.
2Copy snippet from the Foxy loader.js section.
3In Webstudio, go to your project.
5In the General section, copy/paste the Foxy loader snippet in the Custom Code field.
6Right after this snippet, copy/paste the snippet below:
<script type="module">
import 'https://cdn-js.foxy.io/elements@1/foxy-customer-portal.js';
const I18nElement = customElements.get('foxy-i18n');
const i18nBase = 'https://cdn-js.foxy.io/elements@1/translations';
I18nElement.onResourceFetch((ns, lang) => fetch(`${i18nBase}/${ns}/${lang}.json`));
</script>
Install Customer Portal
1In Webstudio, create a page for where you would like the customer portal displayed.
2In this new page, wherever you want the customer portal to load, add a HTML Embed element.
3Inside of the HTML Embed element, copy/paste the snippet below:
<foxy-customer-portal base="https://CHANGE.foxycart.com/s/customer/">
</foxy-customer-portal>
4Replace CHANGE with your Foxy store subdomain. If you're using a custom subdomain, replace the entire url.
5Publish changes and test.
Give Customers Access
To give customers access simply add a link to the customer portal page anywhere on your website. Only customers who created an account at checkout will be able to login. By default, customer accounts are enabled, but if you disabled them, you can enable them again in your Configuration Settings.
Style Customer Portal
The Foxy customer portal uses the Lumo Theme for styling and elements. You can quickly and easily make styling changes by following the instructions below:
Note
Only the Lumo Light Theme is currently supported. You can still make the needed changes to the Light Theme for a dark background.
1Load up the Lumo Theme Editor here.
2Make desired style changes.
3Click the download button.
4Copy the the displayed snippet.
5In your Customer Portal Page Settings, paste the copied HTML into the "Inside <head> tag" section.
Enable Single Sign On
Please follow the instructions below to keep logged in customers for the customer portal, logged in on the Foxy checkout as well.
Note
Single Sign On must be enabled for your customer portal setup. Please contact us to have this enabled.
1In Foxy, go to Advanced Settings here.
2In the "Store Secret" field, click "Show".
- If there is a single value in "Store Secret", copy it out to the computer's clipboard.
- If you see multiple name/value pairs, select the value between the quotes listed for "sso" and copy it.
3Go to the CyberChef website here.
4Replace "YOUR_SECRET_HERE" with the "Store Secret" you copied in Step 2.
6Create a blank page in Webstudio (the name and slug of the page can be anything).
7For the newly created page, go to Page Settings and copy/paste the snippet from here into the "Before </body> tag" section.
8Replace "FOXY_SUBDOMAIN" with your Foxy subdomain, like mystore.foxycart.com or secure.mystore.com (found in your Settings here).
9Replace "SECRET_OUTPUT" with the output value from Step 5.
11In Foxy, go to Advanced Settings here.
12Enable the "Single Sign On" option.
13Paste the url of the new page you created in Webstudio into the "Single Sign On URL" field.
15Test by logging into the customer portal, add a product to cart, and proceed to checkout. You should be logged in on the checkout page.
Extending Customer Portal
The customer portal can be extended with new functions and features. We'll be providing documentation on this soon. Please don't hesitate to contact us if there's something you're wanting to do in the customer portal.