Hi, I'm not sure if anyone can help me figure out if I'm doing something wrong or if there is a bug here. Basically I'm playing around with the Customer_Insert and Customer_Update JSON API functions in our dev store and there seems to be an issue with updating address fields.
If I insert a Customer using Customer_Insert with BillAddress1 = "address1", BillAddress2 = "address2", and then go view the Customer in our Miva dev store, the addresses look fine, e.g:
Address: "address1"
Address2: "address2"
However, if I then update the address using Customer_Update, e.g. change "address1" to "address1UPDATED", then go view it in the store again, it looks like the address1 and address2 fields have both jumped into Address 1 for some reason, and it hasn't picked up on the updated address1 text. I can't upload an image here but it basically looks like this in the store:
Address: "address1 address2"
Address2: ""
Please see sample JSON below for the insert and update:
Insert JSON:
Update JSON:
If I insert a Customer using Customer_Insert with BillAddress1 = "address1", BillAddress2 = "address2", and then go view the Customer in our Miva dev store, the addresses look fine, e.g:
Address: "address1"
Address2: "address2"
However, if I then update the address using Customer_Update, e.g. change "address1" to "address1UPDATED", then go view it in the store again, it looks like the address1 and address2 fields have both jumped into Address 1 for some reason, and it hasn't picked up on the updated address1 text. I can't upload an image here but it basically looks like this in the store:
Address: "address1 address2"
Address2: ""
Please see sample JSON below for the insert and update:
Insert JSON:
Code:
{
"Store_Code":"xxxxx",
"Customer_Login":"xxxxxxx",
"Function":"Customer_Insert",
"Customer_PasswordEmail":"[email protected]",
"Customer_Password":"xxxxxxx",
"Customer_ShipResidential":true,
"Customer_ShipFirstName":"Test",
"Customer_ShipLastName":"Customer4",
"Customer_ShipEmail":"[email protected]",
"Customer_ShipCompany":null,
"Customer_ShipPhone":"",
"Customer_ShipFax":"",
"Customer_ShipAddress1":"address1",
"Customer_ShipAddress2":"address2 ",
"Customer_ShipCity":"Stephensport",
"Customer_ShipState":"KY",
"Customer_ShipZip":"40170",
"Customer_BillFirstName":"Test",
"Customer_BillLastName":"Customer4",
"Customer_BillEmail":"[email protected]",
"Customer_BillCompany":null,
"Customer_BillPhone":"",
"Customer_BillFax":"",
"Customer_BillAddress1":"address1",
"Customer_BillAddress2":"address2 ",
"Customer_BillCity":"Stephensport",
"Customer_BillState":"KY",
"Customer_BillZip":"40170",
"Customer_Tax_Exempt":false,
"Miva_Request_Timestamp":"1617979145"
}
Update JSON:
Code:
{
"Store_Code":"xxxxx",
"Customer_Login":"xxxxxxx",
"Function":"Customer_Update",
"Customer_PasswordEmail":"[email protected]",
"Customer_ShipResidential":true,
"Customer_ShipFirstName":"Test",
"Customer_ShipLastName":"Customer4",
"Customer_ShipEmail":"[email protected]",
"Customer_ShipCompany":null,
"Customer_ShipPhone":"",
"Customer_ShipFax":"",
"Customer_ShipAddress1":"address1UPDATED",
"Customer_ShipAddress2":"address2 ",
"Customer_ShipCity":"Stephensport",
"Customer_ShipState":"KY",
"Customer_ShipZip":"40170",
"Customer_BillFirstName":"Test",
"Customer_BillLastName":"Customer4",
"Customer_BillEmail":"[email protected]",
"Customer_BillCompany":null,
"Customer_BillPhone":"",
"Customer_BillFax":"",
"Customer_BillAddress1":"address1UPDATED",
"Customer_BillAddress2":"address2 ",
"Customer_BillCity":"Stephensport",
"Customer_BillState":"KY",
"Customer_BillZip":"40170",
"Customer_Tax_Exempt":false,
"Miva_Request_Timestamp":"1617979391"
}
Comment