0

I am trying to send & show custom shipping address on email template

here is the code

            $ship_country_id = "US";
            $ship_region_id = "CA";
            $ship_region = "12";
            $ship_street = "780 N. Yup Tea";
            $ship_city = "Los Angeles, California";
            $ship_postcode = "9001";

                $ship_firstName = $email_pickup_data['pickupName'];
                $ship_lastName = "";
                $ship_telephone   = $email_pickup_data['pickupPhone'];
                $sales_la_order_address_ship = array(
                    'region_id' => $ship_region_id,
                    'region' => $ship_region,
                    'postcode' => $ship_postcode,
                    'street' => $ship_street,
                    'city' => $ship_city,
                    'telephone' => $ship_telephone,
                    'country_id' => $ship_country_id,
                    'address_type' => 'shipping',
                    'firstname' => $ship_firstName,
                    'lastname' => $ship_lastName,
                    'middlename' => "",
                    'email' => "",
                    'fax' => "",
                    'status' => 0,
                    'pickupPhone' =>$email_pickup_data['pickupPhone']
                );  

            $transport['la_pickup_address'] = $sales_la_order_address_ship;
            $transportObject = new DataObject($transport);

But in email template when i use {{ var la_pickup_address }} it shows error

Any thoughts on this ? Thankyou

1 Answer 1

0

in variable $sales_la_order_address_ship set HTML output that you want to display in email instead of array.

1
  • Hello, can you update answer ? I am not much sure how magento default does that i need to do the same as default magento code. Any thoughts how it can be done ?
    – devhs
    Feb 24, 2021 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.