I installed vQmod to the root directory of my site in accordance with the simple instructions. I already knew the information I needed to get the job done (see the Part 1 post). The file is identified in blue below. The line in that file which is to be replaced is coloured red below. The replacement I want for that line is coloured green below. The rest of the code is as per the guidance on the vQmod site.
The only thing I wasn't clear on from the guidance was where to save the file I put the code below into. I decided to call the file add-email-to-order-notification.xml and I uploaded it to the vqmod/xml directory on my site. It seemed like a reasonable guess. It worked.
I went back to look at order.php to confirm. It still contains the line I'm replacing with the vQmod. So, when order.php gets replaced in my next upgrade, my site should continue to provide me with the customer's email. In effect, the vQmod self-documents my previous editing changes and executes them on the fly.
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>Add customer email address to new order notification</id>
<version>1.0</version>
<vqmver>2.5.1</vqmver>
<author>Onion Reporting Software Ltd</author>
<file name="catalog/model/checkout/order.php">
<operation info="Add customer email address to new order notification">
<search position="replace"><![CDATA[$text = $language->get('text_new_received') . "\n\n";
]]></search>
<add><![CDATA[$text = 'You have received an order from customer ' . $order_info['email'] . "\n\n";
]]></add>
</operation>
</file>
</modification>
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>Add customer email address to new order notification</id>
<version>1.0</version>
<vqmver>2.5.1</vqmver>
<author>Onion Reporting Software Ltd</author>
<file name="catalog/model/checkout/order.php">
<operation info="Add customer email address to new order notification">
<search position="replace"><![CDATA[$text = $language->get('text_new_received') . "\n\n";
]]></search>
<add><![CDATA[$text = 'You have received an order from customer ' . $order_info['email'] . "\n\n";
]]></add>
</operation>
</file>
</modification>
No comments:
Post a Comment