Question

I am integrating a Magento website with our ERP system and I am having a problem with the address.

Although a customer enters address lines 1 and 2 in separate field in Magento, it seems to store both lines in 1 database fields.

This means when I am pulling the address out of Magento into our ERP software, it puts both lines in 1 field which exceeds the maximum character limit in the ERP software and fails.

Is it possible to get Magento to store address lines 1 and 2 in individual database fields?

Was it helpful?

Solution

Out of the box is not possible to store the address on 2 separate fields.
And I also don't recommend you to try to implement such a system. You can get in a lot of troubles. There are a lot of places where you need to do modifications.

What I suggest is to split the value for the street by \n (new line) and get only the part that you want.
This is how Magento stores the street name in the db. it merges the lines and separates them by 'new line'.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top