This article guides you through the connection process for Styla Frontend with Shopware. You will learn how to create a new sales channel, configure the Styla integration, and adjust email settings to sync products and categories, and make links in emails work correctly.
1. Create a new headless sales channel (or rename an existing one):
- Login into the Shopware backend.
- In the navigation menu, click the plus icon next to "Sales Channels".
- Or use an existing channel that's not currently being used
- Or use an existing channel that's not currently being used
- Choose the "Headless API-only" option
- Name the new channel "Styla"
- Or rename the existing one
- Enter the correct domain (preview or production domain) to the channel
- You should have gotten this domain from your Styla contact - the preview domain should be in this format: {front-name}.preview.styla.eu
- Configure the rest of the channel settings as desired
- Set the channel to active
- Note down the API key for this new sales channel to send to Styla later.
- Click Save.
- Open the product tab for this channel
- Assign the categories & products you want to see in your Styla Frontend.
2. Create a new integration:
- In the Shopware backend:
- Go to Settings > System > Integrations. (/admin#/sw/integration/index)
- Click the "Add integration" button.
- Name the new integration "Styla" and check the "Administrator" checkbox.
- Note down the Access Key ID and Secret Access Key to send to Styla.
- Do this before the next step, as you won't be able to access these keys again later
- Click "Save Integration".
3. Send the access details to Styla
- Send the follwing information to your contact at Styla:
- Channel API Key (From Step 1)
- Access Key ID (From Step 2)
- Secret Access Key (From Step 2)
- Your Shopware Store URL (the URL you use to access your Shopware storefront and admin panel)
- Styla will confirm when the Styla system is updated with these details.
4. (Optional) Update password reset email configuration in Shopware:
This step is only needed shortly before a go-live. Not needed for trials and tests, as long as password reset emails don't have to work.
- In the Shopware backend:
-
Go to Settings > Shop > Log-in & sign-up.
-
Select the Styla sales channel.
-
Scroll down to "Password recovery URL"
-
Change the URL to:
/forgot_password?token=%%RECOVERHASH%%
- Remove inheritance
5. (Optional) Update order confirmation email configuration in Shopware:
Unfortunately, it’s not possible to change email templates on a sales channel level. This means this needs to be adjusted after going live and it will break the order link for the original Shopware Frontend within the order confirmation email.
- Go to Settings > Shop > Email Templates.
-
Find the "Order confirmation" email template and edit it.
-
Change the following code in both the HTML and plain text versions:
{{ rawUrl('frontend.account.order.single.page', { 'deepLinkCode': order.deepLinkCode }, salesChannel.domains|first.url) }}
To:
{{ salesChannel.domains|first.url }}/account/orders?deepLinkCode={{ order.deepLinkCode }}
- Make sure to update both the plain text and HTML versions of the email template.
Conclusion
This concludes the connection of Styla and Shopware. Your contact at Styla will confirm once the connection is stable and data is synced. You will be able to see your Products and Categories in Styla Frontend.
Comments
0 comments
Article is closed for comments.