Adyen / adyen-salesforce-commerce-cloud

Salesforce Commerce Cloud (formerly Demandware)
MIT License
91 stars 76 forks source link

depedency on sitegenesis for SFRA cartridge #106

Closed jesper-renck closed 5 years ago

jesper-renck commented 5 years ago

There are many places in the code that is supposed to be SFRA compatible that is relying on sitegenesis

ie line 13 in adyen-salesforce-commerce-cloud\cartridges\int_adyen_overlay\cartridge\scripts\job\notifications.js

/*

/ API Includes / var Order = require('dw/order/Order'); var OrderMgr = require('dw/order/OrderMgr'); var Resource = require('dw/web/Resource'); var Status = require('dw/system/Status'); var Transaction = require('dw/system/Transaction'); var CustomObjectMgr = require('dw/object/CustomObjectMgr'); var logger = require('dw/system/Logger').getLogger('Adyen', 'adyen'); _var Email = require('app_storefrontcontrollers/cartridge/scripts/models/EmailModel');

This causes the following error when job is run;

Caused by: com.demandware.core.script.capi.ScriptingException: Error: Module "app_storefront_controllers/cartridge/scripts/models/EmailModel" not found. (int_adyen_overlay/cartridge/scripts/job/notifications.js#13) at com.demandware.core.script.capi.RhinoEvalScope.createScriptingException(RhinoEvalScope.java:619) at com.demandware.core.script.capi.RhinoEvalScope.getExport(RhinoEvalScope.java:598) at com.demandware.core.script.capi.EvalScope.getExport(EvalScope.java:193) at com.demandware.beehive.core.internal.scripting2.ExecutableScriptModuleProvider.doGetExecutableScriptModule(ExecutableScriptModuleProvider.java:316) at com.demandware.beehive.core.internal.scripting2.ExecutableScriptModuleProvider.getExecutableScriptModule(ExecutableScriptModuleProvider.java:278) ... 77 more

proposed solution

change cartridge path in installation guide or refactor code.

maassenbas commented 5 years ago

Hi @jesper-renck , Thanks for pointing this out. A fix is created in the following PR: https://github.com/Adyen/adyen-salesforce-commerce-cloud/pull/105 It is merged to the develop branch.

Please let me know if this solved your issue.

Kind regards, Bas Maassen