Magento Integration - export debtors  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Magento Integration - export debtors

Postby kyra » Tue May 23, 2017 12:01 pm

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?
kyra
I'm new here
I'm new here
 
Posts: 7
Joined: Wed Dec 21, 2016 10:59 am

Re: Magento Integration - export debtors  Topic is solved

Postby Mike.Sheen » Tue May 23, 2017 6:22 pm

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
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 20 guests

cron