Post by WellChuck » Fri Oct 27, 2017 9:58 pm

Hi

Some one know how i can remove customer shipping address from email, if shipping method Pickup? :choke:

Newbie

Posts

Joined
Fri Sep 29, 2017 7:54 pm

Post by grgr » Fri Oct 27, 2017 10:38 pm

Comment out/remove:

Code: Select all

        <?php if ($shipping_address) { ?>
        <td style="font-size: 12px;	border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: left; padding: 7px;"><?php echo $shipping_address; ?></td>
        <?php } ?>
from ../catalog/view/theme/default/template/mail/order.tpl

Image Image Image Image Image Image


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm

Post by WellChuck » Sun Oct 29, 2017 3:17 am

grgr wrote:
Fri Oct 27, 2017 10:38 pm
Comment out/remove:

Code: Select all

        <?php if ($shipping_address) { ?>
        <td style="font-size: 12px;	border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: left; padding: 7px;"><?php echo $shipping_address; ?></td>
        <?php } ?>
from ../catalog/view/theme/default/template/mail/order.tpl
nope... for guest's it's working, but not for customers =(

Newbie

Posts

Joined
Fri Sep 29, 2017 7:54 pm

Post by kestas » Sun Oct 29, 2017 4:58 am

Hi,
to remove shipping address when shipping method pickup in file catalog/model/checkout/order.php (line 510)

find:

Code: Select all

				$data['shipping_address'] = str_replace(array("\r\n", "\r", "\n"), '<br />', preg_replace(array("/\s\s+/", "/\r\r+/", "/\n\n+/"), '<br />', trim(str_replace($find, $replace, $format))));

and replace to:

Code: Select all

if (isset($this->session->data['shipping_method']['code']) && ($this->session->data['shipping_method']['code'] !== 'pickup.pickup')) {
				$data['shipping_address'] = str_replace(array("\r\n", "\r", "\n"), '<br />', preg_replace(array("/\s\s+/", "/\r\r+/", "/\n\n+/"), '<br />', trim(str_replace($find, $replace, $format))));
	} else {
			$data['shipping_address'] = '';
	}
this remove shipping address from invoices.

Good luck

Extensions you can find here


Active Member
Online

Posts

Joined
Tue Oct 12, 2010 2:23 am
Who is online

Users browsing this forum: No registered users and 12 guests