stefandoorn / sylius-google-tag-manager-enhanced-ecommerce-plugin

Enhanced Ecommerce implementation through Google Tag Manager for Sylius eCommerce Platform
MIT License
36 stars 20 forks source link

assets install directory #115

Closed dsbe-ak closed 2 years ago

dsbe-ak commented 3 years ago

For sylius 1.10 the assets are installed only in the following directories after calling bin/console sylius:theme:assets:install:

public/bundles/gtmplugin/prototype.events.js
public/bundles/syliusgtmenhancedecommerceplugin/gtm.enhancedEcommerce.cart.js
public/bundles/syliusgtmenhancedecommerceplugin/gtm.enhancedEcommerce.checkout.js
public/bundles/syliusgtmenhancedecommerceplugin/gtm.enhancedEcommerce.productClicks.js

But the asset files are loaded from the _themes directory:

public/_themes/{theme-name}/bundles/gtmplugin/prototype.events.js
public/_themes/{theme-name}/bundles/syliusgtmenhancedecommerceplugin/gtm.enhancedEcommerce.cart.js
public/_themes/{theme-name}/bundles/syliusgtmenhancedecommerceplugin/gtm.enhancedEcommerce.checkout.js
public/_themes/{theme-name}/bundles/syliusgtmenhancedecommerceplugin/gtm.enhancedEcommerce.productClicks.js

Unfortunately the _themes directory is missing (maybe caused by https://github.com/Sylius/SyliusThemeBundle/issues/91 ?)

Is there any way to fix this? Maybe by adding a fallback to the bundles directory, if the _themes directory does not exist? Or is this something that can only be fixed in the Sylius/SyliusThemeBundle?

Thanks!

stefandoorn commented 2 years ago

It seems to be related to https://github.com/Sylius/SyliusThemeBundle/issues/91 indeed. Would you be able to PR a fallback as you suggested? Would be great!

dsbe-ak commented 2 years ago

I now use the workaround described in comment https://github.com/Sylius/SyliusThemeBundle/issues/91#issuecomment-831148342 (but using ln -sf)

Still waiting for an official fix.