Integration
Shopware 6

Shopware 6

Manual Installation

Follow these steps to add custom JavaScript to your Shopware 6 shop:

  1. Log in to your Shopware Admin Panel

  2. Navigate to Configuration > Theme Manager

  3. Find your active theme and click on the gear icon to edit it

  4. In the theme editor, look for the Other or Advanced tab (depending on your specific theme)

  5. Find the External JavaScript section or field

  6. Make sure to include the proper <script> tags:

index.html
<!-- Load the mySHOEFITTER Script -->
<script src="https://js.myshoefitter.com/v1/script.js"></script>
 
<!-- Initialize mySHOEFITTER -->
<script type="application/javascript">
  myshoefitter.init({
    shopSystem: 'shopware'
  });
</script>
  1. Click Save to apply your changes

  2. Click "Recompile Theme" in the popup

  3. Visit your shop's frontend and verify that your JavaScript is working as expected


Alternative Installation (using a plugin)

  1. Log in to your Shopware admin panel

  2. Install the following plugin in your shop, by clicking the install button on the following page: https://store.shopware.com/en/dne5719820551438m/custom-javascript-css-manager-for-shopware-6.html (opens in a new tab)

  3. Select “Settings / System” and click on the “Plugin” icon.

  1. Locate your purchased/downloaded plugin in the list

  2. After successful installation, click the switch button to activate the plugin

  3. Go to Extensions -> Custom CSS/JS

  1. Click on "Add Cointainer" / "Container hinzufügen"
  1. Set "mySHOEFITTER" in the "Name" field and select sales channel.
  1. Now paste the following javascript code in the "Javascript" field:
mysf.js
document.addEventListener('DOMContentLoaded', function() {
  const script = document.createElement('script');
  script.src = 'https://js.myshoefitter.com/v1/script.js';
  script.async = true;
    
  script.onload = function() {
    myshoefitter.init({
      shopSystem: 'shopware'
    });
  };
    
  script.onerror = function() {
    console.error('Failed to load mySHOEFITTER script');
  };
    
  document.head.appendChild(script);
});
  1. Click the "Save and Compile"-Button

Now you should see the button on your product page. If not, please notify us, so a technican of our team can take a look.