You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go to Backend -> Sales -> Orders. Click on any order then click on Edit links in "Billing Address" and "Shipping Address" sections.
Change any value in form by adding whitespaces start/end or both. After you click [Save Order Address] button these whitespaces still exist. This will create issues in Orders grid page when filtering a column like "Bill to Name" or "Ship to Name".
If you check this file /app/code/core/Mage/Sales/Resources/Orders.php a trim function was implemented to remove whitespaces when middle name is not filled up.
$concatAddress = new Zend_Db_Expr("TRIM(REPLACE($concatAddress,' ', ' '))");
Let's take as example First Name = John__ (2 whitespaces). $contactAddress will not have a right value if those 2 whitespaces are not removed before storing into the database. To avoid any issues with whitespaces we should trim all values in the form. I guess this is the only form where whitespaces are not removed in Magento.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
ORIGINAL POST FROM HERE #1479
Go to Backend -> Sales -> Orders. Click on any order then click on Edit links in "Billing Address" and "Shipping Address" sections.
Change any value in form by adding whitespaces start/end or both. After you click [Save Order Address] button these whitespaces still exist. This will create issues in Orders grid page when filtering a column like "Bill to Name" or "Ship to Name".
If you check this file /app/code/core/Mage/Sales/Resources/Orders.php a trim function was implemented to remove whitespaces when middle name is not filled up.
$concatAddress = new Zend_Db_Expr("TRIM(REPLACE($concatAddress,' ', ' '))");
Let's take as example First Name = John__ (2 whitespaces). $contactAddress will not have a right value if those 2 whitespaces are not removed before storing into the database. To avoid any issues with whitespaces we should trim all values in the form. I guess this is the only form where whitespaces are not removed in Magento.
Beta Was this translation helpful? Give feedback.
All reactions