

<?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>Mactimize &#187; Magento</title>
	<atom:link href="http://mactimize.com/category/magento/feed" rel="self" type="application/rss+xml" />
	<link>http://mactimize.com</link>
	<description>Magento &#124; Joomla! &#124; WordPress &#124; PHP</description>
	<lastBuildDate>Thu, 14 Jan 2010 17:03:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to delete orders from Magento backend sales figures</title>
		<link>http://mactimize.com/magento/how-to-delete-orders-from-magento-backend-sales-figures</link>
		<comments>http://mactimize.com/magento/how-to-delete-orders-from-magento-backend-sales-figures#comments</comments>
		<pubDate>Tue, 21 Jul 2009 00:46:46 +0000</pubDate>
		<dc:creator>Donald Gilbert</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://mactimize.com/?p=170</guid>
		<description><![CDATA[In the beginning of my Magento WebStore experience, I had many test orders that I would submit to test out features and tweaks that I had implemented into my web store. However, this was often done after the site had already gone live, and I couldn&#8217;t necessarily just empty my entire database file via phpMyAdmin, [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>In the beginning of my Magento WebStore experience, I had many test orders that I would submit to test out features and tweaks that I had implemented into my web store. However, this was often done after the site had already gone live, and I couldn&#8217;t necessarily just empty my entire database file via phpMyAdmin, otherwise I would lose all that data. So the question became &#8220;How can I remove these test orders from my sales figures, but not mess with the legitimate sales and data that I wanted to keep?&#8221; This is where a good knowledge of SQL comes in. <span id="more-170"></span>Most Magento users really don&#8217;t even take into account that everything is stored in a database and can be hand-edited via phpMyAdmin, but it is and can.</p>
<p>To remove an order, no matter what its status, all you need is access to be able to execute SQL querys (usually via phpMyAdmin) and some specific info about the order in question. Specifically, the order number is what you need the most (the more data the better &#8211; that way you can be SURE that you are removing the expected order.)</p>
<p>Once you have your order number, and you are connected to your Magento SQL Database, execute the following command to verify that that is the order that you want to delete. This should be clear, but in case it isn&#8217;t, you need to replace INSERT_ORDER_NUMBER_HERE with your order number.</p>
<pre class="brush: sql;">select * from `sales_order` where `increment_id` = INSERT_ORDER_NUMBER_HERE ; </pre>
<p>Check the output of that query, and make sure that the order number is indeed for the order you want to delete. Once verified, execute the following command. (Please note, SQL commands cannot just be &#8216;undone.&#8217; There are precautions you should take before you EVER do SQL querys on a live site database. Namely, backup your database files! More info on that coming soon.)</p>
<pre class="brush: sql;">delete from `sales_order` where `sales_order`.`increment_id`= INSERT_ORDER_NUMBER_HERE limit 1 ; </pre>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://mactimize.com/magento/how-to-delete-orders-from-magento-backend-sales-figures/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Change length of order numbers in Magento</title>
		<link>http://mactimize.com/magento/change-length-of-order-numbers-in-magento</link>
		<comments>http://mactimize.com/magento/change-length-of-order-numbers-in-magento#comments</comments>
		<pubDate>Tue, 14 Jul 2009 19:52:24 +0000</pubDate>
		<dc:creator>Donald Gilbert</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://mactimize.com/?p=157</guid>
		<description><![CDATA[So, I run a webstore using Magento which submits our orders to our warehouse for processing. However, our warehouse also takes orders from call ins and fax ins; and all this data needs to be aggregated into a single database. So far, we have been manually entering our data into POSIM (Point of Sale Inventory [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>So, I run a webstore using Magento which submits our orders to our warehouse for processing. However, our warehouse also takes orders from call ins and fax ins; and all this data needs to be aggregated into a single database. So far, we have been manually entering our data into POSIM (Point of Sale Inventory Maintenance) and been doing just fine with it.</p>
<p>However, one thing that the warehouse staff has been complaining about is the REALLY LONG order numbers that Magento generates that they need to enter into the database. Magento, by default, gives your orders a 9 digit order number &#8211; this is just a little overkill. (I don&#8217;t suspect doing 100,000,000 sales on my web store for quite some time, if ever!) So I, and the warehouse staff, thought it best to lower that order number from 9 digits long to 5 or 6 digits long. I tried a few different things, and this is what I ended up with after a little Google-fu.<span id="more-157"></span></p>
<p>1. Connect to your magento SQL database either via ssh or phpMyAdmin.</p>
<p>2. Run the following SQL query on the Magento database. Please note that the increment_pad_length should be your desired order number length, minus one, because Magento adds a padding number in the front. (So, if you want 10232 to be your starting spot, change the increment_pad_length to 4 instead of 5.)</p>
<pre class="brush: sql;"> update `eav_entity_type` set `increment_pad_length`=5 where `entity_type_code`='order' limit 1 ;
update `eav_entity_store` set `increment_last_id`='100111' where `entity_store_id`=1 limit 1 ;</pre>
<p>Please note, if you are doing this on a live installation and want to keep consistency in your order numbering, the last three digits of the increment_last_id should be the last three digits of your most recent order number!</p>
<p>3. Log in to the Magento Admin Panel and go to System-&gt;Cache Managment and clear all the caches.</p>
<p>4. Submit a new order and see the now shortened order number instead of the one a mile long!</p>
<p>ENJOY!</p>
<p>Oh yeah, for those of you who don&#8217;t have shell access or access to phpMyAdmin, you could potentially write up a PHP script to do this for you. By going that direction, all you would need to be able to do is FTP the php file to your server. But I won&#8217;t cover that right now (Soon though). If you need me to right away, let me know in the comments and I will write a quick post about it.</p>
<p>Links:</p>
<p><a href="http://www.magentocommerce.com/boards/viewthread/5893/" target="_blank">http://www.magentocommerce.com/boards/viewthread/5893/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mactimize.com/magento/change-length-of-order-numbers-in-magento/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Display Certain Content to Logged in Users and Other Content to Not Logged in Users in Magento</title>
		<link>http://mactimize.com/magento/display-certain-content-to-logged-in-users-and-other-content-to-not-logged-in-users-in-magento</link>
		<comments>http://mactimize.com/magento/display-certain-content-to-logged-in-users-and-other-content-to-not-logged-in-users-in-magento#comments</comments>
		<pubDate>Thu, 14 May 2009 15:57:17 +0000</pubDate>
		<dc:creator>Donald Gilbert</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://mactimize.com/?p=106</guid>
		<description><![CDATA[I have Googled and searched and wept and screamed, trying to figure out how to display content in two different ways &#8211; one way to a logged in user and a different way to a not logged in user. In theory, it is all very simple PHP scripting that would take care of it, and [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I have Googled and searched and wept and screamed, trying to figure out how to display content in two different ways &#8211; one way to a logged in user and a different way to a not logged in user. In theory, it is all very simple PHP scripting that would take care of it, and it really is &#8211; IF you know how to do it &#8211; which I did not.</p>
<p>In my case, I wanted to implement some code that would – through CSS, JS, and HTML – display a link in my Magento header for &#8220;Quick Log In.&#8221; The BASIC function of this was to get rid of the log in page and thus decrease HTML requests to my server. Also, it seemed a little pointless to load a separate page for logging in when the same functionality could be integrated right into EVERY OTHER Magento page. However, I only wanted this &#8220;Quick Log In&#8221; link to display to those who were not logged in &#8211; for (hopefully) obvious reasons. However, I had added another page to my site that allowed a logged in customer to add products to their cart by simply entering the SKU and the quantity. This is my &#8220;Quick Add To Cart&#8221; link. I wanted this link to display on the page to logged in users IN PLACE of the &#8220;Quick Log In&#8221; link. (See images below &#8211; top is logged in)</p>
<p>links</p>
<p>The big question became &#8211; HOW? Well, I am familiar with PHP, so I thought that it wouldn&#8217;t be too hard. I was a little mistaken, although in the end it really did turn out to be not too hard; it just took a little while to get there. Here&#8217;s the break down.</p>
<p>This is what I expected it to be, but of course, didn&#8217;t work.</p>
<pre class="brush: php;">&lt;?php if(Mage::getSingleton('customer/session')-&gt;isLoggedIn()) {

&lt;code here for logged in users&gt;

} else {

&lt;code here for NOT logged in users&gt;

}  ?&gt;</pre>
<p>Using the above code, I would always get an error saying something like &#8220;unexpected &#8216;&lt;&#8217; in /home/*******/public_html/magento/app/blah&#8230;blah&#8230;blah on line 61.&#8221; I couldn&#8217;t figure it out! Why in the world would it NOT expect code in there. Well, it just wouldn&#8217;t work, so I had to bust out a couple hours of Google-Fu. Answer below.</p>
<p>To get Magento to display code to logged in users and different code to not logged in users, implement the following code into your template where you need that functionality.</p>
<pre class="brush: php;">&lt;?php if(Mage::getSingleton('customer/session')-&gt;isLoggedIn()):    ?&gt;

&lt;place code for logged in users here - can be PHP, HTML, whatever - I used both&gt;

&lt;?php else: ?&gt;

&lt;place code for NOT logged in users here - can be PHP, HTML, whatever&gt;

&lt;?php endif; /*    if ($this-&gt;isCustomerLoggedIn()): */ ?&gt;</pre>
<p>That&#8217;s all there is to it. Nothing more, nothing less. Works like a charm &#8211; everytime. I am sure that this can be extended to display certain static content to one customer group and show other content to other customer groups. Using Magento PHP like getData() and getAttributeText() with this, you could customize unlimited amounts of blocks and code and whatnot. Remember, your page is about USER FUNCTIONALITY &#8211; give them what they want &#8211; but also give them what they need. Not everyone is going to need to know that users of a specific group get special pricing. Ok &#8211; I&#8217;m starting to brainstorm now instead of blog, so I gotta go.</p>
]]></content:encoded>
			<wfw:commentRss>http://mactimize.com/magento/display-certain-content-to-logged-in-users-and-other-content-to-not-logged-in-users-in-magento/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add a &#8220;Return to Store Front&#8221; link to Magento Admin Login Form</title>
		<link>http://mactimize.com/magento/add-a-return-to-store-front-link-to-magento-admin-login-form</link>
		<comments>http://mactimize.com/magento/add-a-return-to-store-front-link-to-magento-admin-login-form#comments</comments>
		<pubDate>Thu, 30 Apr 2009 03:49:34 +0000</pubDate>
		<dc:creator>Donald Gilbert</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Magento]]></category>

		<guid isPermaLink="false">http://mactimize.com/?p=95</guid>
		<description><![CDATA[So, I LOVE Magento. I was having a few issues with it at first, but I think that most of the kinks were worked out after switching from Siteground Web Hosting. (Don&#8217;t get me wrong, they are a great host, but they just didn&#8217;t have the whole Magento Store Front service up to par.) Anyways, [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>So, I LOVE Magento. I was having a few issues with it at first, but I think that most of the kinks were worked out after switching from Siteground Web Hosting. (Don&#8217;t get me wrong, they are a great host, but they just didn&#8217;t have the whole Magento Store Front service up to par.) Anyways, most of the issues that I have now are more aesthetic / template issues.</p>
<p>One thing that I have been wanting for a while, and just got around to doing 5 minutes ago is a &#8220;Return to Store Front&#8221; link on the Admin log in page. I mean, c&#8217;mon Magento team, that just makes sense. Well, they haven&#8217;t implemented it yet, but it is actually really easy to do. (I&#8217;m sure they have more important things to attend to.) Walkthrough below:</p>
<p>Open your favorite FTP client, and navigate to your magento site root. From there, go to app/design/adminhtml/default/default/template/. Download login.phtml, and make the following edits.</p>
<p>Near line 58, you will find the following code:</p>
<pre class="brush: php; first-line: 58;">
&lt;div&gt;
&lt;a href=&quot;&lt;?php echo Mage::helper('adminhtml')-&gt;getUrl('adminhtml/index/forgotpassword') ?&gt;&quot;&gt;&lt;?php echo Mage::helper('adminhtml')-&gt;__('Forgot your password?') ?&gt;&lt;/a&gt;
&lt;input type=&quot;submit&quot; value=&quot;&lt;?php echo Mage::helper('adminhtml')-&gt;__('Login') ?&gt;&quot; title=&quot;&lt;?php echo Mage::helper('adminhtml')-&gt;__('Log$
&lt;/div&gt;</pre>
<p>Add this line of code between line 59 and 60 on its own line.</p>
<pre class="brush: php; first-line: 60;">&lt;br /&gt;&lt;a href=&quot;&lt;?php echo $this-&gt;getBaseUrl('') ?&gt;&quot;&gt;&lt;?php echo ('Return to Store Front') ?&gt;&lt;/a&gt;</pre>
<p>Save the file, upload it, and your all set.</p>
<div id="attachment_96" class="wp-caption aligncenter" style="width: 519px">
	&lt;a rel=&#8221;attachment wp-att-96&#8243; href=&#8221;http://mactimize.com/?attachment_id=96&#8243;&gt;&lt;img title=&#8221;Admin Panel&#8221; src=&#8221;http://mactimize.com/blog/wp-content/uploads/2009/04/picture-1.png&#8221; alt=&#8221;Admin Panel Edits&#8221; width=&#8221;519&#8243; height=&#8221;207&#8243; /&gt;&lt;/a&gt;
	<p class="wp-caption-text">Admin Panel Edits</p>
</div>
<p>This is for the nerds, and probably goes without saying, but all this can also be completed via an SSH connection to your site as well. (Edited &#8211; May 3 &#8211; Modified code so that it became straight cut and paste and required no editing. [used php instead of html])</p>
]]></content:encoded>
			<wfw:commentRss>http://mactimize.com/magento/add-a-return-to-store-front-link-to-magento-admin-login-form/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show product SKU&#8217;s in Magento Frontend</title>
		<link>http://mactimize.com/magento/show-product-skus-in-magento-frontend</link>
		<comments>http://mactimize.com/magento/show-product-skus-in-magento-frontend#comments</comments>
		<pubDate>Sun, 19 Apr 2009 21:09:51 +0000</pubDate>
		<dc:creator>Donald Gilbert</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://mactimize.com/?p=87</guid>
		<description><![CDATA[ 
I have had many requests from customers of my web store (http://store.reformu.com) to be able to view the pruduct SKU on the frontend of the store, as many of them have a complete products catalog already, and most of the time order via SKU rather than names of products. Magento offers a way for [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><em> </em></p>
<p>I have had many requests from customers of my web store (<a href="http://store.reformu.com" target="_blank">http://store.reformu.com</a>) to be able to view the pruduct SKU on the frontend of the store, as many of them have a complete products catalog already, and most of the time order via SKU rather than names of products. Magento offers a way for this to happen, but it was not ideal for me, because it only showed the SKU on the actual product description page, instead of on the description page AND the regular navigation of the site pages.</p>
<p>Well, after some reading on <a href="http://magentoecommerce.com">http://magentoecommerce.com</a>, I have come up with a solution. Add the following line to the tail of your price.phtml, and it will display the SKU right after the price of the product, no matter what page it is on.</p>
<pre class="brush: php;">&lt;h5&gt;SKU: &lt;?php echo nl2br($_product-&gt;getSku()) ?&gt;&lt;/h5&gt;</pre>
<p>The price.phtml file is located (relative to your magento directory) in app/design/frontend/*template*/*view*/template/catalog/product/price.phtml . You can either download it via FTP and then edit and reupload, or refer to another post on here about opening .phtml files directly off your site right in dreamweaver. (I actually log in via SSH and use nano to edit most things like this.)</p>
<p>The reason I chose it to display in h5 is because that fit best size and color wise with my template. You can select any size, although I believe h5 is the best.</p>
<p>By the way &#8211; for the curious, to turn on SKU&#8217;s for product pages Magento&#8217;s way, log in to your Magento Admin panel. Navigate to Cataog-&gt;Attributes-&gt;Manage Atributes. Search for SKU in the attriute name field, and the select SKU to edit it. Near the bottom of that page is an option that says &#8220;Visible on Product View Page on Front-end.&#8221; Change that to &#8220;yes&#8221; and you are all set. However, as I stated before, the downside to this is that it displays the SKU on the product view page only.</p>
<p>Links:</p>
<p><a href="http://www.magentocommerce.com/boards/viewthread/6404/#t24042%20" target="_blank">http://www.magentocommerce.com/boards/viewthread/6404/#t24042 </a>&lt;&#8211;where I got the idea for what code to display.</p>
]]></content:encoded>
			<wfw:commentRss>http://mactimize.com/magento/show-product-skus-in-magento-frontend/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Set correct file and folder permissions for Magento (or any other site for that matter)</title>
		<link>http://mactimize.com/magento/set-correct-file-and-folder-permissions-for-magento-or-any-other-site-for-that-matter</link>
		<comments>http://mactimize.com/magento/set-correct-file-and-folder-permissions-for-magento-or-any-other-site-for-that-matter#comments</comments>
		<pubDate>Tue, 24 Feb 2009 05:41:06 +0000</pubDate>
		<dc:creator>Donald Gilbert</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[file permissions fix]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[shell exec]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://mactimize.com/?p=73</guid>
		<description><![CDATA[This post has been locked because it has been moved to my other site, http://mactimize.com. Please direct all comments there instead. Thanks! 
So, I was installing some extensions to my Magento store, and had some funny things happen. When I copied the API key from the magentoecommerce.com website for an extension and pasted it into [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><em>This post has been locked because it has been moved to my other site, <a href="http://mactimize.com/?p=73">http://mactimize.com</a>. Please direct all comments there instead. Thanks! </em></p>
<p>So, I was installing some extensions to my Magento store, and had some funny things happen. When I copied the API key from the magentoecommerce.com website for an extension and pasted it into Magento Connect Downloader, it not only installed the desired extension, but it also installed the latest updates to ALL my core files. It acted as though I had told it to install Mage_All_Latest or something! Well, I went to the frontend of my store, and wouldn&#8217;t you know it, everything was messed up. For whatever reason, whenever I do a Mage_All_Latest, my themes get messed up. It has something to do with PEAR and files permissions, cuz when I log into my sites file manager, all permissions for all files are set to 755.</p>
<p>This is not what they are supposed to be. All files are supposed to be set to 644 while directories are supposed to be 755. I thought that I was going to have to go in and manually change EVERY SINGLE FILES permissions to what they were meant to be. But, after some quick <a href="http://www.urbandictionary.com/define.php?term=google-fu&amp;defid=656209">Google-fu</a>, I came across these nifty little commands.</p>
<p>Here&#8217;s the easy way to change the permissions of all directories and files to the right ones:</p>
<p>For directories:</p>
<pre class="brush: bash;">
find . -type d -exec chmod 755 {} \;
</pre>
<p>For files:</p>
<pre class="brush: bash;">
find . -type f -exec chmod 644 {} \;
</pre>
<p>If you have shell access, you can execute the commands very easily. Just navigate to the top directory of the directories that need updated, and run the commands. If you are like many web site owners and don&#8217;t even know what shell access is, you can make a php document that runs a &#8220;shell exec&#8221; command, place it on your server, and navigate to it in your favorite web browser. Example:</p>
<p>I can FTP into my site. I want to update permissions for all the files in the http://my-domain.com/skins/ directory. So I create a file called exec.php and put it in my skins directory. The contents of this file should look like this.</p>
<p>For directories:</p>
<pre class="brush: php;">
&lt;?php
$output = shell_exec('find . -type d -exec chmod 755 {} \;');
echo &quot;&lt;pre&gt;$output&lt;/pre&gt;&quot;;
?&gt;
</pre>
<p>For files:</p>
<pre class="brush: php;">
&lt;?php
$output = shell_exec('find . -type f -exec chmod 644 {} \;');
echo &quot;&lt;pre&gt;$output&lt;/pre&gt;&quot;;
?&gt;
</pre>
<p>Once the file is on the site and in the skins directory, I would then navigate to http://my-domain.com/skins/exec.php. The output of the command would then appear in my browser, notifying me of all the changes that were made.</p>
<p>It&#8217;s as simple as that.</p>
<p>Edit: Magento has a page for this on their wiki. It also offers a few more fixes than you find here, although I have found that simply runnind what I have included here is enough. Here&#8217;s the link.</p>
<p><a href="http://www.magentocommerce.com/wiki/groups/227/resetting_file_permissions" target="_blank">http://www.magentocommerce.com/wiki/groups/227/resetting_file_permissions</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mactimize.com/magento/set-correct-file-and-folder-permissions-for-magento-or-any-other-site-for-that-matter/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Edit Magento&#8217;s .phtml files with Dreamweaver and FTP</title>
		<link>http://mactimize.com/magento/edit-magentos-phtml-files-with-dreamweaver-and-ftp</link>
		<comments>http://mactimize.com/magento/edit-magentos-phtml-files-with-dreamweaver-and-ftp#comments</comments>
		<pubDate>Tue, 27 Jan 2009 22:25:54 +0000</pubDate>
		<dc:creator>Donald Gilbert</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[Editing]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[phtml]]></category>

		<guid isPermaLink="false">http://mactimize.com/?p=49</guid>
		<description><![CDATA[I love Dreamweaver. I use it for all my offline html, php, css, xml, etc, etc editing. When I started working with Magento, I was having to download the files using my favorite FTP client (Cyberduck), open them in Dreamweaver, save and then re-upload the file. Well, that is no more.
I remembered that Dreamweaver supported [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I love Dreamweaver. I use it for all my offline html, php, css, xml, etc, etc editing. When I started working with Magento, I was having to download the files using my favorite FTP client <a href="http://cyberduck.ch/">(Cyberduck)</a>, open them in Dreamweaver, save and then re-upload the file. Well, that is no more.</p>
<p>I remembered that Dreamweaver supported FTP for downloading/editing directly with Dreamweaver itself. So I though to myself, &#8220;Self, don&#8217;t you think that you should be able to just download and edit directly in Dreamweaver?&#8221; I answered myself, &#8220;Well, yes!&#8221; So I set out to figure out how to do it. It really wasn&#8217;t all that hard, all you have to do is connect to the FTP server within Dreamweaver, navigate to the file you want to edit, double click, and your off and running, editing away.</p>
<p>That&#8217;s when it happened. I kept getting an error when I tried to open .phtml files using FTP and Dreamweaver. It kept giving me the following error when it tried to open them, &#8220;Can&#8217;t find a valid editor for this file extension.&#8221; Mind you, I could download the files using my FTP Client, and open them, but I couldn&#8217;t open them directly from the Dreamweaver FTP. So, after some research, I was finally able to get it to work. Here&#8217;s how to do it.</p>
<p>The error occurs because Dreamweaver does not &#8220;natively&#8221; support .phtml files. It does not realize that the .phtml file extension is very similar to a .php or .html file. So you need to update some files within the Dreamweaver application support. (For a full breakdown on how to do this, check out <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16410">this link</a> from Adobe.)</p>
<p>Navigate to:<br />
<em> Macintosh HD/Applications/Adobe Dreamweaver CS3/configuration/DocumentTypes/MMDocumentTypes.xml </em> and open it with TextEdit. What you are looking for here is <em></em>. Right after that is where you add .phtml. In the macfileextension area (and the winfileextension area, if you want to) add phtml. It should look like this after you add it.</p>
<p><a rel="attachment wp-att-51" href="http://mactimize.com/?attachment_id=51"><img class="aligncenter size-full wp-image-51" title="picture-11" src="http://mactimize.com/blog/wp-content/uploads/2009/01/picture-11.png" alt="picture-11" width="702" height="32" /></a></p>
<p>There is one other file that needs to be updated. It is located in <em>Macintosh HD/Users/[your user name]/Library/Application Support/Adobe/Dreamweaver 9/Configuration/Extensions.txt</em>. On the 2nd (or 3rd) line, the file references many HTML file types. It looks like this. HTM,HTML,HTA,HTC,XHTML:HTML Documents. It should be obvious as to what to do, just add ,PHTML to the end of the string, but before the :HTML Documents. (Be sure to include the comma and to put PHTML in all caps.)</p>
<p>Restart Dreamweaver, and you now have full support, including syntax highlighting, to be able to open .phtml directly from FTP into Dreamweaver.</p>
<p>Alternatively, you can download the files attached (below) and place them in their respective folders as outlined above. Just replace your existing files with these.</p>
<p>By the way, the reason I put this out instead of just referring back to the Magento site is because they explain how to make .phtml behave like .php files instead of .html.</p>
<p><em>Links:</em></p>
<p><a href="http://www.magentocommerce.com/wiki/how-to/working_with_phtml_and_dreamwearver">http://www.magentocommerce.com/wiki/how-to/working_with_phtml_and_dreamwearver</a></p>
<p><a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16410">http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16410</a></p>
<p><a href="http://cyberduck.ch/">http://cyberduck.ch/</a></p>
<p><em>Files:</em><br />
<a href="blog/attachments/files.zip">MMDocumentTypes.xml &amp; Extensions.txt</a><br />
<em>md5:86ce53961765ffd43e16127f5597cef6</em></p>
]]></content:encoded>
			<wfw:commentRss>http://mactimize.com/magento/edit-magentos-phtml-files-with-dreamweaver-and-ftp/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Magento Webstore</title>
		<link>http://mactimize.com/magento/magento-webstore</link>
		<comments>http://mactimize.com/magento/magento-webstore#comments</comments>
		<pubDate>Sun, 11 Jan 2009 19:54:41 +0000</pubDate>
		<dc:creator>Donald Gilbert</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[store]]></category>

		<guid isPermaLink="false">http://mactimize.com/?p=22</guid>
		<description><![CDATA[I am in the process of building an online store using the open source e commerce platform that is Magento. It is frustrating to say the least. I have had so many problems with the store that I can&#8217;t stand it. I am supposed to have a launch date of this Thursday, Jan. 15th. It [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I am in the process of building an online store using the open source e commerce platform that is Magento. It is frustrating to say the least. I have had so many problems with the store that I can&#8217;t stand it. I am supposed to have a launch date of this Thursday, Jan. 15th. It is going to happen, whether it takes a couple all nighters and some energy drinks to do it. Right now I am trying to import customers so that they can all log in on the launch date. I can&#8217;t wait to see what problems are going to arise over the next couple of days. </p>
]]></content:encoded>
			<wfw:commentRss>http://mactimize.com/magento/magento-webstore/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
