Widget integration with Magento 2

  • 86 Views
  • Last Post 23 January 2018
David posted this 22 January 2018

Hi,

We have recently started to integrated GFS Checkout into Magento 2 however we have come across an issue where within the Magento 2  framework it uses Knockout.js to render the checkout elements. We have the GFS widget working fine on a flat html page but when it is included in to a dynamically rendered knockout template the widget fails on a couple of fronts. Firstly as the widget contains inline js it will try to execute before the Knockout.js bindings have completed, meaning the `gfs-data` attributes are not available to it.

 

Secondly the Links to some of the images seem to point to the root of the website rather than the static folder which is used in Magento 2.

 

Can you advise if you have come across this before and if you have any suggestion on how to correct this?

 

Thanks

Simon.Wilson posted this 23 January 2018

Hi David,

 

Thank you for your query,

having reviewed this with the developers we have released a new version of the widgets on github the changes have added observers into the widget so taht when the page loads and then the gfs-data is changed it will refresh the widget and populate the details that are required,

 

in regards to the links this is being dealt with at the minute and another release will take place shortly to correct this, You will see this commited on github once the work has been completed,

 

alternativelly if you have any suggestions to the widget code please feel free to make a pull request and our Dev's will review and test the changes before commiting them.

Regards

Simon

Close