<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to add Magento blocks, CSS and Javascript to an external site</title>
	<atom:link href="http://mysillypointofview.richardferaro.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/feed/" rel="self" type="application/rss+xml" />
	<link>http://mysillypointofview.richardferaro.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/</link>
	<description>it&#039;s my blog anyway</description>
	<lastBuildDate>Tue, 31 Jan 2012 09:43:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Mathew Beane</title>
		<link>http://mysillypointofview.richardferaro.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/#comment-8646</link>
		<dc:creator>Mathew Beane</dc:creator>
		<pubDate>Tue, 27 Sep 2011 18:36:29 +0000</pubDate>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=535#comment-8646</guid>
		<description>$magento_block = Mage::getSingleton(&#039;core/layout&#039;);
$block = $magento_block-&gt;createBlock(&#039;checkout/onepage&#039;);
$block-&gt;setTemplate(&#039;checkout/onepage.phtml&#039;);
echo $block-&gt;toHTML();

This is what I have had the most success with, but it does not pull in the other pieces yet.</description>
		<content:encoded><![CDATA[<p>$magento_block = Mage::getSingleton(&#8216;core/layout&#8217;);<br />
$block = $magento_block-&gt;createBlock(&#8216;checkout/onepage&#8217;);<br />
$block-&gt;setTemplate(&#8216;checkout/onepage.phtml&#8217;);<br />
echo $block-&gt;toHTML();</p>
<p>This is what I have had the most success with, but it does not pull in the other pieces yet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathew Beane</title>
		<link>http://mysillypointofview.richardferaro.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/#comment-8645</link>
		<dc:creator>Mathew Beane</dc:creator>
		<pubDate>Tue, 27 Sep 2011 18:06:40 +0000</pubDate>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=535#comment-8645</guid>
		<description>Yes, that brings in the base template(including the html header stuff that I dont want), without any of the bits and pieces. I supposed you have to go through and load each piece, and put it in the proper spot, but I was hoping there was an easier way.</description>
		<content:encoded><![CDATA[<p>Yes, that brings in the base template(including the html header stuff that I dont want), without any of the bits and pieces. I supposed you have to go through and load each piece, and put it in the proper spot, but I was hoping there was an easier way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Feraro</title>
		<link>http://mysillypointofview.richardferaro.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/#comment-8644</link>
		<dc:creator>Richard Feraro</dc:creator>
		<pubDate>Tue, 27 Sep 2011 17:59:46 +0000</pubDate>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=535#comment-8644</guid>
		<description>What have you done so far? Did you try using this:
&lt;code&gt;$checkout = Mage::getSingleton(‘checkout/type_onepage’);&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>What have you done so far? Did you try using this:<br />
<code>$checkout = Mage::getSingleton(‘checkout/type_onepage’);</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathew Beane</title>
		<link>http://mysillypointofview.richardferaro.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/#comment-8639</link>
		<dc:creator>Mathew Beane</dc:creator>
		<pubDate>Tue, 27 Sep 2011 16:21:39 +0000</pubDate>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=535#comment-8639</guid>
		<description>Have you had any luck implementing a checkout page, in wordpress? I would like to have a simple checkout, it would only ever have one product in it. 

I am able to pull in some of the one page checkout blocks, but i am wondering if there is an easier way to handle a checkout.

Thanks,
  Mathew</description>
		<content:encoded><![CDATA[<p>Have you had any luck implementing a checkout page, in wordpress? I would like to have a simple checkout, it would only ever have one product in it. </p>
<p>I am able to pull in some of the one page checkout blocks, but i am wondering if there is an easier way to handle a checkout.</p>
<p>Thanks,<br />
  Mathew</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Feraro</title>
		<link>http://mysillypointofview.richardferaro.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/#comment-8285</link>
		<dc:creator>Richard Feraro</dc:creator>
		<pubDate>Sat, 17 Sep 2011 00:01:23 +0000</pubDate>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=535#comment-8285</guid>
		<description>I haven&#039;t tried yet but it should be available upon setting of your store.</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t tried yet but it should be available upon setting of your store.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://mysillypointofview.richardferaro.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/#comment-8248</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Thu, 15 Sep 2011 21:59:03 +0000</pubDate>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=535#comment-8248</guid>
		<description>Thanks for the tutorial, have you successfully incorporated Magento translations with these externally loaded Mage resources?

I can get the header and footer externalized just fine, but I cannot seem to get it to work.

Thanks in advance,

Justin</description>
		<content:encoded><![CDATA[<p>Thanks for the tutorial, have you successfully incorporated Magento translations with these externally loaded Mage resources?</p>
<p>I can get the header and footer externalized just fine, but I cannot seem to get it to work.</p>
<p>Thanks in advance,</p>
<p>Justin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://mysillypointofview.richardferaro.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/#comment-7377</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 19 Aug 2011 00:54:19 +0000</pubDate>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=535#comment-7377</guid>
		<description>is it possible to add one product into a post</description>
		<content:encoded><![CDATA[<p>is it possible to add one product into a post</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nilesh Toshniwal</title>
		<link>http://mysillypointofview.richardferaro.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/#comment-5427</link>
		<dc:creator>Nilesh Toshniwal</dc:creator>
		<pubDate>Fri, 17 Jun 2011 14:19:29 +0000</pubDate>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=535#comment-5427</guid>
		<description>Hi Richard
Thx for nice post, but I am kinda hanged up actually if I try the code given you it doesn&#039;t load the theme I am using on magento while it just loads default theme, actually I am looking to show magento&#039;s header and footer in joomla template but for the time I am just trying to get it done in custom php file the code of the file is:

[php]
require_once &#039;../app/Mage.php&#039;;
umask(0);
Mage::app();
if(class_exists(&#039;Mage&#039;)){
	// Instantiate session and generate needed cookie
	Mage::getSingleton(&#039;core/session&#039;, array(&#039;name&#039; =&gt; &#039;frontend&#039;));
	$Block = Mage::getSingleton(&#039;core/layout&#039;);

	// Start pulling the blocks
	$head = $Block-&gt;createBlock(&#039;Page/Html_Head&#039;);
	// Add default css
	// Magento adds the default skin directory
	// &#039;skin/frontend/default/default&#039; before &#039;css/styles.css&#039;
	// making it look like the URL below:
	// http://localhost/magento/skin/frontend/default/default/css/styles.css
	$head-&gt;addCss(&#039;css/styles.css&#039;);
	// Add Prototype JS file
	// Note that it automatically adds the &#039;js&#039; directory at the beginning
	// making it look like the URL below:
	// http://localhost/magento/js/prototype/prototype.js
	$head-&gt;addJs(&#039;prototype/prototype.js&#039;);

	// Get the header&#039;s HTML
	$header = $Block-&gt;createBlock(&#039;Page/Html_Header&#039;);
	$header-&gt;setTemplate(&#039;page/html/header.phtml&#039;);

	// And the footer&#039;s HTML as well
	$footer = $Block-&gt;createBlock(&#039;Page/Html_Footer&#039;);
	$footer-&gt;setTemplate(&#039;page/html/footer.phtml&#039;);
}

	// Display the needed tags for CSS and JS
		echo (class_exists(&#039;Mage&#039;)) ? $head-&gt;getCssJsHtml() : &#039;&#039; ;


// Display the Header HTML
		echo (class_exists(&#039;Mage&#039;)) ? $header-&gt;toHTML() : &#039;&#039; ;
		
		echo (class_exists(&#039;Mage&#039;)) ? $footer-&gt;toHTML() : &#039;&#039; ;

[/php]</description>
		<content:encoded><![CDATA[<p>Hi Richard<br />
Thx for nice post, but I am kinda hanged up actually if I try the code given you it doesn&#8217;t load the theme I am using on magento while it just loads default theme, actually I am looking to show magento&#8217;s header and footer in joomla template but for the time I am just trying to get it done in custom php file the code of the file is:</p>
<pre class="brush: php; title: ; notranslate">
require_once '../app/Mage.php';
umask(0);
Mage::app();
if(class_exists('Mage')){
	// Instantiate session and generate needed cookie
	Mage::getSingleton('core/session', array('name' =&gt; 'frontend'));
	$Block = Mage::getSingleton('core/layout');

	// Start pulling the blocks
	$head = $Block-&gt;createBlock('Page/Html_Head');
	// Add default css
	// Magento adds the default skin directory
	// 'skin/frontend/default/default' before 'css/styles.css'
	// making it look like the URL below:
	// <a href="http://localhost/magento/skin/frontend/default/default/css/styles.css" rel="nofollow">http://localhost/magento/skin/frontend/default/default/css/styles.css</a>
	$head-&gt;addCss('css/styles.css');
	// Add Prototype JS file
	// Note that it automatically adds the 'js' directory at the beginning
	// making it look like the URL below:
	// <a href="http://localhost/magento/js/prototype/prototype.js" rel="nofollow">http://localhost/magento/js/prototype/prototype.js</a>
	$head-&gt;addJs('prototype/prototype.js');

	// Get the header's HTML
	$header = $Block-&gt;createBlock('Page/Html_Header');
	$header-&gt;setTemplate('page/html/header.phtml');

	// And the footer's HTML as well
	$footer = $Block-&gt;createBlock('Page/Html_Footer');
	$footer-&gt;setTemplate('page/html/footer.phtml');
}

	// Display the needed tags for CSS and JS
		echo (class_exists('Mage')) ? $head-&gt;getCssJsHtml() : '' ;

// Display the Header HTML
		echo (class_exists('Mage')) ? $header-&gt;toHTML() : '' ;

		echo (class_exists('Mage')) ? $footer-&gt;toHTML() : '' ;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: hamza khan</title>
		<link>http://mysillypointofview.richardferaro.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/#comment-5204</link>
		<dc:creator>hamza khan</dc:creator>
		<pubDate>Mon, 06 Jun 2011 14:45:53 +0000</pubDate>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=535#comment-5204</guid>
		<description>not able to see the toolbar i checked the option from admin but its not showing toolbar on frontend.
plz help.</description>
		<content:encoded><![CDATA[<p>not able to see the toolbar i checked the option from admin but its not showing toolbar on frontend.<br />
plz help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Feraro</title>
		<link>http://mysillypointofview.richardferaro.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/#comment-1462</link>
		<dc:creator>Richard Feraro</dc:creator>
		<pubDate>Wed, 01 Dec 2010 02:15:46 +0000</pubDate>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=535#comment-1462</guid>
		<description>Follow the code i posted to your comment where to place the code below:
[php]if(class_exists(&#039;Mage&#039;)){
    Mage::getSingleton(&#039;core/session&#039;, array(&#039;name&#039; =&gt; &#039;frontend&#039;));
}[/php]

Don&#039;t repeat that code anywhere else or you&#039;ll get header been sent error. 

Regarding your backend login error, check this &lt;a href=&quot;http://mysillypointofview.richardferaro.com/2010/03/24/how-to-fix-magentos-admin-login-failing-no-error-message-on-localhost/&quot; rel=&quot;nofollow&quot;&gt;post&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Follow the code i posted to your comment where to place the code below:</p>
<pre class="brush: php; title: ; notranslate">if(class_exists('Mage')){
    Mage::getSingleton('core/session', array('name' =&gt; 'frontend'));
}</pre>
<p>Don&#8217;t repeat that code anywhere else or you&#8217;ll get header been sent error. </p>
<p>Regarding your backend login error, check this <a href="http://mysillypointofview.richardferaro.com/2010/03/24/how-to-fix-magentos-admin-login-failing-no-error-message-on-localhost/" rel="nofollow">post</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Feraro</title>
		<link>http://mysillypointofview.richardferaro.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/#comment-1461</link>
		<dc:creator>Richard Feraro</dc:creator>
		<pubDate>Wed, 01 Dec 2010 02:12:14 +0000</pubDate>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=535#comment-1461</guid>
		<description>It happened because Mage object have not been instantiated. You should place the code below at the top of &lt;code&gt;index.php&lt;/code&gt; file, just before the &lt;code&gt;get_header()&lt;/code&gt; code:
[php]if(class_exists(&#039;Mage&#039;)){
    Mage::getSingleton(&#039;core/session&#039;, array(&#039;name&#039; =&gt; &#039;frontend&#039;));
}[/php]</description>
		<content:encoded><![CDATA[<p>It happened because Mage object have not been instantiated. You should place the code below at the top of <code>index.php</code> file, just before the <code>get_header()</code> code:</p>
<pre class="brush: php; title: ; notranslate">if(class_exists('Mage')){
    Mage::getSingleton('core/session', array('name' =&gt; 'frontend'));
}</pre>
]]></content:encoded>
	</item>
</channel>
</rss>

