<modification>

	<id>Disallow PO Box Addresses</id>
	<version>1.0.0</version>
	<vqmver>1.2.3</vqmver>
	<author>Fido-X</author>

	<file name="catalog/controller/account/address.php">
		<operation>
			<search position="after" index="1"><![CDATA[
			$this->error['address_1'] = $this->language->get('error_address_1');
			]]></search>
			<add><![CDATA[
			} else {
				$post_office_box = '/^([pP]{1}(.*?)[oO]{1}(.*?))?([bB][oO]?[xX])(\s+)([0-9]+)/i';
				if ($this->request->post['address_1'] && preg_match($post_office_box, $this->request->post['address_1'])) {
		      		$this->error['address_1'] = $this->language->get('error_post_office_box');
				}
			]]></add>
		</operation>
	</file>

	<file name="catalog/controller/account/create.php">
		<operation>
			<search position="after" index="1"><![CDATA[
			$this->error['address_1'] = $this->language->get('error_address_1');
			]]></search>
			<add><![CDATA[
			} else {
				$post_office_box = '/^([pP]{1}(.*?)[oO]{1}(.*?))?([bB][oO]?[xX])(\s+)([0-9]+)/i';
				if ($this->request->post['address_1'] && preg_match($post_office_box, $this->request->post['address_1'])) {
		      		$this->error['address_1'] = $this->language->get('error_post_office_box');
				}
			]]></add>
		</operation>
	</file>

	<file name="catalog/controller/checkout/guest_step_1.php">
		<operation>
			<search position="after" index="1"><![CDATA[
			$this->error['address_1'] = $this->language->get('error_address_1');
			]]></search>
			<add><![CDATA[
			} else {
				$post_office_box = '/^([pP]{1}(.*?)[oO]{1}(.*?))?([bB][oO]?[xX])(\s+)([0-9]+)/i';
				if ($this->request->post['address_1'] && preg_match($post_office_box, $this->request->post['address_1'])) {
		      		$this->error['address_1'] = $this->language->get('error_post_office_box');
				}
			]]></add>
		</operation>
		<operation>
			<search position="after" index="1"><![CDATA[
			$this->error['shipping_address_1'] = $this->language->get('error_address_1');
			]]></search>
			<add><![CDATA[
			} else {
				$post_office_box = '/^([pP]{1}(.*?)[oO]{1}(.*?))?([bB][oO]?[xX])(\s+)([0-9]+)/i';
				if ($this->request->post['shipping_address_1'] && preg_match($post_office_box, $this->request->post['shipping_address_1'])) {
		      		$this->error['shipping_address_1'] = $this->language->get('error_post_office_box');
				}
			]]></add>
		</operation>
	</file>

	<file name="catalog/language/english/account/address.php">
		<operation>
			<search position="after" index="1"><![CDATA[
			// Error
			]]></search>
			<add><![CDATA[
			$_['error_post_office_box'] = 'Invalid address. Post Office box numbers are not allowed!';
			]]></add>
		</operation>
	</file>

	<file name="catalog/language/english/account/create.php">
		<operation>
			<search position="after" index="1"><![CDATA[
			// Error
			]]></search>
			<add><![CDATA[
			$_['error_post_office_box'] = 'Invalid address. Post Office box numbers are not allowed!';
			]]></add>
		</operation>
	</file>

	<file name="catalog/language/english/checkout/guest_step_1.php">
		<operation>
			<search position="after" index="1"><![CDATA[
			// Error
			]]></search>
			<add><![CDATA[
			$_['error_post_office_box'] = 'Invalid address. Post Office box numbers are not allowed!';
			]]></add>
		</operation>
	</file>

</modification>
