Page 1 of 1

Magento Integration - export debtors

PostPosted: Tue May 23, 2017 12:01 pm
by kyra
Hi Mike,

Thanks for all your help with this so far.

One small issue remains with with the "Export JIWA Debtors" action in the Magento Integration Plugin.

When debtors are exported and created in Magento, they are created with website_id 0 (which means they can't login). Is there any way to set it to 1 by default?

Re: Magento Integration - export debtors  Topic is solved

PostPosted: Tue May 23, 2017 6:22 pm
by Mike.Sheen
kyra wrote:When debtors are exported and created in Magento, they are created with website_id 0 (which means they can't login). Is there any way to set it to 1 by default?


Inside the Magento Integration plugin, there is a method "CreateMagentoCustomers" - it's responsible for creating Magento customers.

Within that (about line 8,130) - the following lines appear:

Code: Select all
// customer does not exist, create in Magento
MagentoServiceReference.customerCustomerEntityToCreate customerEntityForCreate = new MagentoServiceReference.customerCustomerEntityToCreate();


You just need to set the store_id of the customerEntityForCreate variable after the above - i.e.:

Code: Select all
// customer does not exist, create in Magento
MagentoServiceReference.customerCustomerEntityToCreate customerEntityForCreate = new MagentoServiceReference.customerCustomerEntityToCreate();
customerEntityForCreate.store_id = 1;


Mike