<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Codelab Blog &#187; Magento</title>
	<atom:link href="http://blog.codelab.co.nz/tag/magento/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.codelab.co.nz</link>
	<description>Technical Articles and News from Codelab Ltd</description>
	<lastBuildDate>Tue, 17 Jan 2012 13:10:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Magento Fontis Paymate Module Fix for Not Passing Data Issue</title>
		<link>http://blog.codelab.co.nz/2011/12/28/magento-fontis-paymate-module-fix-for-not-passing-data-issue/</link>
		<comments>http://blog.codelab.co.nz/2011/12/28/magento-fontis-paymate-module-fix-for-not-passing-data-issue/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 03:56:29 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Magento]]></category>

		<guid isPermaLink="false">http://blog.codelab.co.nz/?p=370</guid>
		<description><![CDATA[I upgraded my magento from 1.4.0.1 to 1.6.1 and yes a lot of things broke especially the ability to pay using Paymate. I did some research and found a lot of people having the issue of non data being passed from Magento to Paymate to populate the fields like address, amount etc. Since there has [...]]]></description>
			<content:encoded><![CDATA[<p>I upgraded my magento from 1.4.0.1 to 1.6.1 and yes a lot of things broke especially the ability to pay using Paymate.<br />
I did some research and found a lot of people having the issue of non data being passed from Magento to Paymate to populate the fields like address, amount etc.   Since there has been no support at all? I decided to take matters into my own hands.</p>
<p>Here is the code from the file: /app/code/community/Fontis/Paymate/Model/Paymate.php<br />
replace this file with your original file Paymate.php.  As always I suggest that you back up everything!<br />
This worked for me.  Technically the issue was the code didn&#8217;t like getting the getQuote() from the checkout/session object.  Instead getting the getLastRealOrderId from checkout/session and loading a new model with the order id worked.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;?php<br />
/**<br />
&nbsp;* Fontis Paymate Extension<br />
&nbsp;*<br />
&nbsp;* NOTICE OF LICENSE<br />
&nbsp;*<br />
&nbsp;* This source file is subject to the Open Software License (OSL 3.0)<br />
&nbsp;* that is bundled with this package in the file LICENSE.txt.<br />
&nbsp;* It is also available through the world-wide-web at this URL:<br />
&nbsp;* http://opensource.org/licenses/osl-3.0.php<br />
&nbsp;* If you did not receive a copy of the license and are unable to<br />
&nbsp;* obtain it through the world-wide-web, please send an email<br />
&nbsp;* to license@magentocommerce.com so one can be sent to you a copy immediately.<br />
&nbsp;*<br />
&nbsp;* @category &nbsp; Fontis<br />
&nbsp;* @package &nbsp; &nbsp;Fontis_Paymate<br />
&nbsp;* @author &nbsp; &nbsp; Lloyd Hazlett<br />
&nbsp;* @author &nbsp; &nbsp; Chris Norton<br />
&nbsp;* @copyright &nbsp;Copyright (c) 2010 Fontis Pty. Ltd. (http://www.fontis.com.au)<br />
&nbsp;* @license &nbsp; &nbsp;http://opensource.org/licenses/osl-3.0.php &nbsp;Open Software License (OSL 3.0)<br />
&nbsp;*/<br />
<br />
/**<br />
&nbsp;* Paymate payment model<br />
&nbsp;*<br />
&nbsp;* @category &nbsp; Fontis<br />
&nbsp;* @package &nbsp; &nbsp;Fontis_Australia<br />
&nbsp;*/<br />
class Fontis_Paymate_Model_Paymate extends Mage_Payment_Model_Method_Abstract<br />
{<br />
&nbsp; &nbsp; const CGI_URL = 'https://www.paymate.com/PayMate/ExpressPayment';<br />
&nbsp; &nbsp; const CGI_URL_TEST = 'https://www.paymate.com/PayMate/TestExpressPayment';<br />
&nbsp; &nbsp; const REQUEST_AMOUNT_EDITABLE = 'N';<br />
<br />
&nbsp; &nbsp; protected $_code &nbsp;= 'paymate';<br />
&nbsp; &nbsp; protected $_formBlockType = 'fontis_paymate_block_form';<br />
&nbsp; &nbsp; protected $_allowCurrencyCode = array('AUD', 'EUR', 'GBP', 'NZD', 'USD');<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; protected $_isGateway &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = false;<br />
&nbsp; &nbsp; protected $_canAuthorize &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= false;<br />
&nbsp; &nbsp; protected $_canCapture &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= true;<br />
&nbsp; &nbsp; protected $_canCapturePartial &nbsp; &nbsp; &nbsp; = false;<br />
&nbsp; &nbsp; protected $_canRefund &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = false;<br />
&nbsp; &nbsp; protected $_canVoid &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = false;<br />
&nbsp; &nbsp; protected $_canUseInternal &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= false;<br />
&nbsp; &nbsp; protected $_canUseCheckout &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= true;<br />
&nbsp; &nbsp; protected $_canUseForMultishipping &nbsp;= false;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; /**<br />
&nbsp; &nbsp; &nbsp;* Assign data to info model instance<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;* @param &nbsp; mixed $data<br />
&nbsp; &nbsp; &nbsp;* @return &nbsp;Fontis_Australia_Model_Payment_Paymate<br />
&nbsp; &nbsp; &nbsp;*/<br />
&nbsp; &nbsp; public function assignData($data)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; $details = array();<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ($this-&gt;getUsername())<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $details['username'] = $this-&gt;getUsername();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (!empty($details)) <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;getInfoInstance()-&gt;setAdditionalData(serialize($details));<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $this;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public function getUsername()<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $this-&gt;getConfigData('username');<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; public function getUrl()<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; $url = $this-&gt;getConfigData('cgi_url');<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; if(!$url)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $url = self::CGI_URL_TEST;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; return $url;<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; /**<br />
&nbsp; &nbsp; &nbsp;* Get session namespace<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;* @return Fontis_Australia_Model_Payment_Paymate_Session<br />
&nbsp; &nbsp; &nbsp;*/<br />
&nbsp; &nbsp; public function getSession()<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return Mage::getSingleton('paymate/paymate_session');<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; /**<br />
&nbsp; &nbsp; &nbsp;* Get checkout session namespace<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;* @return Mage_Checkout_Model_Session<br />
&nbsp; &nbsp; &nbsp;*/<br />
&nbsp; &nbsp; public function getCheckout()<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return Mage::getSingleton('checkout/session');<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; /**<br />
&nbsp; &nbsp; &nbsp;* Get current quote<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;* @return Mage_Sales_Model_Quote<br />
&nbsp; &nbsp; &nbsp;*/<br />
&nbsp; &nbsp; public function getQuote()<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $this-&gt;getCheckout()-&gt;getQuote();<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public function getCheckoutFormFields()<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; $orderIncrementId = $this-&gt;getCheckout()-&gt;getLastRealOrderId();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $order = Mage::getModel('sales/order')-&gt;loadByIncrementId($orderIncrementId);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; $a = $order-&gt;getShippingAddress();<br />
&nbsp; &nbsp; &nbsp; &nbsp; $b = $order-&gt;getBillingAddress();<br />
&nbsp; &nbsp; &nbsp; &nbsp; $currency_code = $order-&gt;getCurrencyCode();<br />
&nbsp; &nbsp; &nbsp; &nbsp; //$cost = $order-&gt;getSubtotal() - $order-&gt;getDiscountAmount();<br />
&nbsp; &nbsp; &nbsp; &nbsp; $cost = $order-&gt;getGrandTotal();<br />
&nbsp; &nbsp; &nbsp; &nbsp; //$shipping = $order-&gt;getShippingAmount();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //$_shippingTax = $order-&gt;getShippingAddress()-&gt;getTaxAmount();<br />
&nbsp; &nbsp; &nbsp; &nbsp; //$_billingTax = $order-&gt;getBillingAddress()-&gt;getTaxAmount();<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; //$tax = sprintf('%.2f', $_shippingTax + $_billingTax);<br />
&nbsp; &nbsp; &nbsp; &nbsp; //$cost = sprintf('%.2f', $cost + $tax);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; $fields = array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'mid' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; $this-&gt;getUsername(),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'amt' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; sprintf('%.2f', $cost + $shipping),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'amt_editable'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; self::REQUEST_AMOUNT_EDITABLE,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'currency'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; $currency_code,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'ref' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; $orderIncrementId,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'pmt_sender_email'&nbsp; &nbsp; &nbsp; =&gt; $b-&gt;getEmail(),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'pmt_contact_firstname' =&gt; $b-&gt;getFirstname(),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'pmt_contact_surname' &nbsp; =&gt; $b-&gt;getLastname(),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'pmt_contact_phone' &nbsp; &nbsp; =&gt; $b-&gt;getTelephone(),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'pmt_country' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; $b-&gt;getCountry(),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'regindi_address1'&nbsp; &nbsp; &nbsp; =&gt; $b-&gt;getStreet(1),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'regindi_address2'&nbsp; &nbsp; &nbsp; =&gt; $b-&gt;getStreet(2),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'regindi_sub' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; $b-&gt;getCity(),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'regindi_state' &nbsp; &nbsp; &nbsp; &nbsp; =&gt; $b-&gt;getRegion(), &nbsp; &nbsp; // Returns full state name<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'regindi_pcode' &nbsp; &nbsp; &nbsp; &nbsp; =&gt; $b-&gt;getPostcode(),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'return'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; Mage::getUrl('paymate/paymate/complete'),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'popup' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; 'N',<br />
&nbsp; &nbsp; &nbsp; &nbsp; );<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Run through fields and replace any occurrences of &amp; with the word <br />
&nbsp; &nbsp; &nbsp; &nbsp; // 'and', as having an ampersand present will conflict with the HTTP<br />
&nbsp; &nbsp; &nbsp; &nbsp; // request.<br />
&nbsp; &nbsp; &nbsp; &nbsp; $filtered_fields = array();<br />
&nbsp; &nbsp; &nbsp; &nbsp; foreach ($fields as $k=&gt;$v) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $value = str_replace(&quot;&amp;&quot;,&quot;and&quot;,$v);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $filtered_fields[$k] = &nbsp;$value;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; return $filtered_fields;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public function createFormBlock($name)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; $block = $this-&gt;getLayout()-&gt;createBlock('paymate/paymate_form', $name)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt;setMethod('paymate')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt;setPayment($this-&gt;getPayment())<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt;setTemplate('fontis/paymate/form.phtml');<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $block;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; /*validate the currency code is avaialable to use for paypal or not*/<br />
&nbsp; &nbsp; public function validate()<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; parent::validate();<br />
&nbsp; &nbsp; &nbsp; &nbsp; $currency_code = $this-&gt;getQuote()-&gt;getBaseCurrencyCode();<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (!in_array($currency_code,$this-&gt;_allowCurrencyCode)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Mage::throwException(Mage::helper('paymate')-&gt;__('Selected currency code ('.$currency_code.') is not compatabile with Paymate'));<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $this;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public function onOrderValidate(Mage_Sales_Model_Order_Payment $payment)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp;return $this;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public function onInvoiceCreate(Mage_Sales_Model_Invoice_Payment $payment)<br />
&nbsp; &nbsp; {<br />
<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public function canCapture()<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return true;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public function getOrderPlaceRedirectUrl()<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return Mage::getUrl('paymate/paymate/redirect');<br />
&nbsp; &nbsp; }<br />
}</div></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.codelab.co.nz/2011/12/28/magento-fontis-paymate-module-fix-for-not-passing-data-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing Test orders from Magento</title>
		<link>http://blog.codelab.co.nz/2010/03/28/removing-test-orders-from-magento/</link>
		<comments>http://blog.codelab.co.nz/2010/03/28/removing-test-orders-from-magento/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 10:05:20 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.codelab.co.nz/?p=208</guid>
		<description><![CDATA[If you want to do this manually and not pay (via a extension) then use the following script on your database.   Please make sure you back up your database first, I take no responsibility for the overall result, this script worked for me on version 1.4.0.1: SET FOREIGN_KEY_CHECKS=0; TRUNCATE `sales_order`; TRUNCATE `sales_order_tax`; TRUNCATE `sales_order_datetime`; TRUNCATE [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to do this manually and not pay (via a extension) then use the following script on your database.   Please make sure you back up your database first, I take no responsibility for the overall result, this script worked for me on version 1.4.0.1:</p>
<pre>SET FOREIGN_KEY_CHECKS=0;
TRUNCATE `sales_order`;
TRUNCATE `sales_order_tax`;
TRUNCATE `sales_order_datetime`;
TRUNCATE `sales_order_decimal`;
TRUNCATE `sales_order_entity`;
TRUNCATE `sales_order_entity_datetime`;
TRUNCATE `sales_order_entity_decimal`;
TRUNCATE `sales_order_entity_int`;
TRUNCATE `sales_order_entity_text`;
TRUNCATE `sales_order_entity_varchar`;
TRUNCATE `sales_order_int`;
TRUNCATE `sales_order_text`;
TRUNCATE `sales_order_varchar`;
TRUNCATE `sales_flat_quote`;
TRUNCATE `sales_flat_quote_address`;
TRUNCATE `sales_flat_quote_address_item`;
TRUNCATE `sales_flat_quote_item`;
TRUNCATE `sales_flat_quote_item_option`;
TRUNCATE `sales_flat_order_item`;
TRUNCATE `sendfriend_log`;
TRUNCATE `tag`;
TRUNCATE `tag_relation`;
TRUNCATE `tag_summary`;
TRUNCATE `wishlist`;
TRUNCATE `log_quote`;
TRUNCATE `report_event`;
ALTER TABLE `sales_order` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_tax` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_datetime` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_decimal` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_datetime` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_decimal` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_int` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_text` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_varchar` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_int` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_text` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_varchar` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_address` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_address_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_item_option` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_item` AUTO_INCREMENT=1;
ALTER TABLE `sendfriend_log` AUTO_INCREMENT=1;
ALTER TABLE `tag` AUTO_INCREMENT=1;
ALTER TABLE `tag_relation` AUTO_INCREMENT=1;
ALTER TABLE `tag_summary` AUTO_INCREMENT=1;
ALTER TABLE `wishlist` AUTO_INCREMENT=1;
ALTER TABLE `log_quote` AUTO_INCREMENT=1;
ALTER TABLE `report_event` AUTO_INCREMENT=1;
TRUNCATE `customer_address_entity`;
TRUNCATE `customer_address_entity_datetime`;
TRUNCATE `customer_address_entity_decimal`;
TRUNCATE `customer_address_entity_int`;
TRUNCATE `customer_address_entity_text`;
TRUNCATE `customer_address_entity_varchar`;
TRUNCATE `customer_entity`;
TRUNCATE `customer_entity_datetime`;
TRUNCATE `customer_entity_decimal`;
TRUNCATE `customer_entity_int`;
TRUNCATE `customer_entity_text`;
TRUNCATE `customer_entity_varchar`;
TRUNCATE `log_customer`;
TRUNCATE `log_visitor`;
TRUNCATE `log_visitor_info`;
ALTER TABLE `customer_address_entity` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_datetime` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_decimal` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_int` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_text` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_varchar` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_datetime` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_decimal` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_int` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_text` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_varchar` AUTO_INCREMENT=1;
ALTER TABLE `log_customer` AUTO_INCREMENT=1;
ALTER TABLE `log_visitor` AUTO_INCREMENT=1;
ALTER TABLE `log_visitor_info` AUTO_INCREMENT=1;
TRUNCATE `eav_entity_store`;
ALTER TABLE  `eav_entity_store` AUTO_INCREMENT=1;
SET FOREIGN_KEY_CHECKS=1;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.codelab.co.nz/2010/03/28/removing-test-orders-from-magento/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Call to undefined method Mage_Admin_Model_Observer::actionPostDispatchAdmin()</title>
		<link>http://blog.codelab.co.nz/2010/03/20/call-to-undefined-method-mage_admin_model_observeractionpostdispatchadmin/</link>
		<comments>http://blog.codelab.co.nz/2010/03/20/call-to-undefined-method-mage_admin_model_observeractionpostdispatchadmin/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 11:07:21 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.codelab.co.nz/?p=204</guid>
		<description><![CDATA[I upgraded Magento to 1.4.0.0 to 1.4.0.1 and got the following error: Call to undefined method Mage_Admin_Model_Observer::actionPostDispatchAdmin() Everything inside /var/sessions/ and /var/cache and (if it exists) /app/code/core/Zend/Cache/ must be deleted.]]></description>
			<content:encoded><![CDATA[<p>I upgraded Magento to 1.4.0.0 to 1.4.0.1 and got the following error:</p>
<p>Call to undefined method Mage_Admin_Model_Observer::actionPostDispatchAdmin()</p>
<p>Everything inside /var/sessions/ and /var/cache and (if it exists) /app/code/core/Zend/Cache/ must be deleted.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codelab.co.nz/2010/03/20/call-to-undefined-method-mage_admin_model_observeractionpostdispatchadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>var _gaq undefined &#8211; Magento</title>
		<link>http://blog.codelab.co.nz/2010/03/01/var-_gaq-undefined-magento/</link>
		<comments>http://blog.codelab.co.nz/2010/03/01/var-_gaq-undefined-magento/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 08:21:15 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Magento]]></category>

		<guid isPermaLink="false">http://blog.codelab.co.nz/?p=197</guid>
		<description><![CDATA[I came across this javascript error when updating a instance of Magento to version 1.4 and Google Analytics &#8220;var _gaq is undefined&#8221; In the ga.php file located under /app/code/core/Mage/GoogleAnalytics/Block add the following line of code before _gaq.push javascript &#8220;var _gaq = _gaq &#124;&#124; [];&#8221; &#8211; about line 179 This will remove the error.   I still [...]]]></description>
			<content:encoded><![CDATA[<p>I came across this javascript error when updating a instance of Magento to version 1.4 and Google Analytics</p>
<p>&#8220;var _gaq is undefined&#8221;</p>
<p>In the ga.php file located under /app/code/core/Mage/GoogleAnalytics/Block add the following line of code before _gaq.push javascript</p>
<blockquote><p>&#8220;var _gaq = _gaq || [];&#8221; &#8211; about line 179</p></blockquote>
<p>This will remove the error.   I still need to test to see if visitor site numbers have been affected.</p>
<p><em><strong>References:</strong></em></p>
<p><a href="http://www.magentocommerce.com/boards/viewthread/68885/">http://www.magentocommerce.com/boards/viewthread/68885/</a></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">http://www.magentocommerce.com/boards/viewthread/68885/&#8221;</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.codelab.co.nz/2010/03/01/var-_gaq-undefined-magento/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>toolbar.phtml -&gt; Magento 1.4 error</title>
		<link>http://blog.codelab.co.nz/2010/02/21/toolbar-phtml-magento-1-4-error/</link>
		<comments>http://blog.codelab.co.nz/2010/02/21/toolbar-phtml-magento-1-4-error/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 09:36:57 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Magento]]></category>

		<guid isPermaLink="false">http://blog.codelab.co.nz/?p=191</guid>
		<description><![CDATA[Came across this error in toolbar.phtml for Magento 1.4: Warning: Invalid argument suppplied for foreach() line 51. Fix is available from here (this is only a fix, it doesn&#8217;t solve the problem &#8211; The paging is removed). References: http://www.sonassi.com/knowledge-base/magento-1-4-install-errors/]]></description>
			<content:encoded><![CDATA[<p>Came across this error in toolbar.phtml for Magento 1.4:</p>
<p>Warning: Invalid argument suppplied for foreach() line 51.</p>
<p>Fix is available from <a href="http://www.sonassi.com/knowledge-base/magento-1-4-install-errors/">here </a>(this is only a fix, it doesn&#8217;t solve the problem &#8211; The paging is removed).</p>
<p><em><strong>References:</strong></em></p>
<p><a href="http://www.sonassi.com/knowledge-base/magento-1-4-install-errors/">http://www.sonassi.com/knowledge-base/magento-1-4-install-errors/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codelab.co.nz/2010/02/21/toolbar-phtml-magento-1-4-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling Sales Order Notification in Magento</title>
		<link>http://blog.codelab.co.nz/2010/02/08/enabling-sales-order-notification-in-magento/</link>
		<comments>http://blog.codelab.co.nz/2010/02/08/enabling-sales-order-notification-in-magento/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 20:17:53 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Magento]]></category>

		<guid isPermaLink="false">http://blog.codelab.co.nz/?p=185</guid>
		<description><![CDATA[Very helpful post there that enables sales order notifications to the shop admin email address.  Dont&#8217;s use the Bcc option System Configuration -&#62; Sales menu, you have to send a copy of the email to another email address. References: http://nik.chankov.net/2009/10/28/adding-notification-when-new-order-arrives-magento/]]></description>
			<content:encoded><![CDATA[<p>Very helpful post there that enables sales order notifications to the shop admin email address.  Dont&#8217;s use the Bcc option System Configuration -&gt; Sales menu, you have to send a copy of the email to another email address.</p>
<p><em><strong>References:</strong></em></p>
<p><a href="http://nik.chankov.net/2009/10/28/adding-notification-when-new-order-arrives-magento/">http://nik.chankov.net/2009/10/28/adding-notification-when-new-order-arrives-magento/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codelab.co.nz/2010/02/08/enabling-sales-order-notification-in-magento/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bluehost wont allow gmail SMTP connections</title>
		<link>http://blog.codelab.co.nz/2010/01/12/bluehost-wont-allow-gmail-smtp-connections/</link>
		<comments>http://blog.codelab.co.nz/2010/01/12/bluehost-wont-allow-gmail-smtp-connections/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 11:24:44 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Magento]]></category>

		<guid isPermaLink="false">http://blog.codelab.co.nz/?p=166</guid>
		<description><![CDATA[According to bluehost, you cannot send emails through SMTP connections from web applications hosted on bluehost.   They only allow sending through their own SMTP servers. The problem I had was trying to send emails in Magento using GMAIL (Google Apps) using the code from this forum: http://www.magentocommerce.com/boards/viewthread/1073/ The work around is that I setup a [...]]]></description>
			<content:encoded><![CDATA[<p>According to bluehost, you cannot send emails through SMTP connections from web applications hosted on bluehost.   They only allow sending through their own SMTP servers.</p>
<p>The problem I had was trying to send emails in Magento using GMAIL (Google Apps) using the code from this forum:</p>
<p><a href="http://www.magentocommerce.com/boards/viewthread/1073/">http://www.magentocommerce.com/boards/viewthread/1073/</a></p>
<p>The work around is that I setup a email account in Bluehost the same as the email I use in Google Apps.  I then modified the code in Magento to send out using bluehost&#8217;s SMTP servers:</p>
<p>For example:</p>
<p><strong>Outgoing Mail Server: </strong> (SSL) boxnumber.bluehost.com<em> (server requires authentication)</em><br />
<strong>Supported Incoming Mail Protocols:</strong></p>
<ul>
<li>POP3: port 110</li>
<li>POP3S (SSL/TLS): port 995</li>
<li>IMAP: port 143</li>
<li>IMAPS (SSL/TLS): port 993</li>
</ul>
<p><strong>Supported Outgoing Mail Protocols:</strong></p>
<ul>
<li>SMTP: port 26</li>
<li>SMTPS (SSL/TLS): port 465</li>
</ul>
<p>And it works, it sends the email out to the customers with the right email address sent from bluehost&#8217;s local SMTP servers, so when customers reply to the email address it will arrive in my google apps mail box.</p>
<p><em><strong>References:</strong></em></p>
<p><a href="http://drupal.org/node/458044">http://drupal.org/node/458044</a></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
var gaJsHost = ((&#8220;https:&#8221; == document.location.protocol) ? &#8220;https://ssl.&#8221; : &#8220;http://www.&#8221;);<br />
document.write(unescape(&#8220;%3Cscript src=&#8217;&#8221; + gaJsHost + &#8220;google-analytics.com/ga.js&#8217; type=&#8217;text/javascript&#8217;%3E%3C/script%3E&#8221;));<br />
&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
try {<br />
var pageTracker = _gat._getTracker(&#8220;UA-4995672-4&#8243;);<br />
pageTracker._trackPageview();<br />
} catch(err) {}&lt;/script&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.codelab.co.nz/2010/01/12/bluehost-wont-allow-gmail-smtp-connections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

