<?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/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Magento Archives - My Silly Point of View</title>
	<atom:link href="https://mysillypointofview.com/tag/magento/feed/" rel="self" type="application/rss+xml" />
	<link>https://mysillypointofview.com</link>
	<description>it&#039;s my blog anyway</description>
	<lastBuildDate>Thu, 04 Feb 2021 02:03:19 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9.13</generator>
<site xmlns="com-wordpress:feed-additions:1">13951596</site>	<item>
		<title>Disabled module will be enabled by bin/magento setup:upgrade</title>
		<link>https://mysillypointofview.com/2021/02/04/disabled-module-will-be-enabled-by-bin-magento-setupupgrade/</link>
					<comments>https://mysillypointofview.com/2021/02/04/disabled-module-will-be-enabled-by-bin-magento-setupupgrade/#respond</comments>
		
		<dc:creator><![CDATA[Richard Feraro]]></dc:creator>
		<pubDate>Thu, 04 Feb 2021 10:03:13 +0000</pubDate>
				<category><![CDATA[Mobile Thoughts]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[magento2]]></category>
		<guid isPermaLink="false">https://mysillypointofview.com/?p=933</guid>

					<description><![CDATA[<p>Just so you know if you explicitly disabled a module using bin/magento module:disable, the next setup:upgrade will re-enable that again.</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2021/02/04/disabled-module-will-be-enabled-by-bin-magento-setupupgrade/">Disabled module will be enabled by bin/magento setup:upgrade</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Just so you know if you explicitly disabled a module using <code><strong>bin/magento module:disable</strong></code>, the next <code><strong>setup:upgrade</strong></code> will re-enable that again.</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2021/02/04/disabled-module-will-be-enabled-by-bin-magento-setupupgrade/">Disabled module will be enabled by bin/magento setup:upgrade</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mysillypointofview.com/2021/02/04/disabled-module-will-be-enabled-by-bin-magento-setupupgrade/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">933</post-id>	</item>
		<item>
		<title>How to pull custom product attribute using SOAP API in Magento</title>
		<link>https://mysillypointofview.com/2016/11/12/pull-custom-product-attribute-using-soap/</link>
					<comments>https://mysillypointofview.com/2016/11/12/pull-custom-product-attribute-using-soap/#respond</comments>
		
		<dc:creator><![CDATA[Richard Feraro]]></dc:creator>
		<pubDate>Sat, 12 Nov 2016 01:52:20 +0000</pubDate>
				<category><![CDATA[Feeling guru]]></category>
		<category><![CDATA[Techie Daw]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=895</guid>

					<description><![CDATA[<p>When extracting a product attribute data using SOAP, the usual approach is to create a standard class and identify the common fields in the attributes property as shown below: The above var_dump() would show the values of requested fields except the custom_attribute_code. The reason for this is because a custom product attribute is available in additional_attributes property [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2016/11/12/pull-custom-product-attribute-using-soap/">How to pull custom product attribute using SOAP API in Magento</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>When extracting a product attribute data using SOAP, the usual approach is to create a standard class and identify the common fields in the <strong>attributes</strong> property as shown below:</p>
<pre class="brush: plain; title: ; notranslate">$proxy = new SoapClient('http://your.magento.domain/api/v2_soap/?wsdl');
$sessionId = $proxy-&gt;login('username', 'password!');
$product = new stdclass();
$product-&gt;attributes = array(
     'description',
     'short_description',
     'price',
     'custom_attribute_code'
);
$data = $proxy-&gt;catalogProductInfo($sessionId, $sku, null, $product);
var_dump($data);</pre>
<p>The above var_dump() would show the values of requested fields except the <em>custom_attribute_code</em>. The reason for this is because a custom product attribute is available in <strong>additional_attributes</strong> property instead.</p>
<h3>Get custom product attribute:</h3>
<p>To get the value of <em>custom_attribute_code</em>, use the following code:</p>
<pre class="brush: plain; title: ; notranslate">$proxy = new SoapClient('http://your.magento.domain/api/v2_soap/?wsdl');
$sessionId = $proxy-&gt;login('username', 'password!');
$product = new stdClass();
$product-&gt;additional_attributes = array('custom_attribute_code');
$data = $proxy-&gt;catalogProductInfo($sessionId, $sku, null, $product);</pre>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2016/11/12/pull-custom-product-attribute-using-soap/">How to pull custom product attribute using SOAP API in Magento</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mysillypointofview.com/2016/11/12/pull-custom-product-attribute-using-soap/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">895</post-id>	</item>
		<item>
		<title>Keep line breaks, custom HTML attributes and remove initial paragraph tag in Magento Admin&#8217;s TinyMCE editor</title>
		<link>https://mysillypointofview.com/2016/11/04/keep-line-breaks-html-attributes-tinymce/</link>
					<comments>https://mysillypointofview.com/2016/11/04/keep-line-breaks-html-attributes-tinymce/#respond</comments>
		
		<dc:creator><![CDATA[Richard Feraro]]></dc:creator>
		<pubDate>Fri, 04 Nov 2016 00:46:25 +0000</pubDate>
				<category><![CDATA[Feeling guru]]></category>
		<category><![CDATA[Techie Daw]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=865</guid>

					<description><![CDATA[<p>One of my clients would like to add additional HTML attributes for SEO purposes as well as to keep line breaks after saving a CMS block or page in the Magento Admin. Solution: To do that, you must open the file js/mage/adminhtml/wysiwyg/tiny_mce/setup.js and locate the line below: Right after the code plugins : plugins, add [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2016/11/04/keep-line-breaks-html-attributes-tinymce/">Keep line breaks, custom HTML attributes and remove initial paragraph tag in Magento Admin&#8217;s TinyMCE editor</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>One of my clients would like to add additional HTML attributes for SEO purposes as well as to keep line breaks after saving a CMS block or page in the Magento Admin.</p>
<h3>Solution:</h3>
<p>To do that, you must open the file <em>js/mage/adminhtml/wysiwyg/tiny_mce/setup.js</em> and locate the line below:</p>
<pre class="brush: jscript; first-line: 96; title: setup.js; notranslate">var settings = {</pre>
<p>Right after the code <code>plugins : plugins,</code> add the lines <strong>highlighted in grey</strong>:</p>
<pre class="brush: jscript; first-line: 96; highlight: [101,102,103]; smart-tabs: true; tab-size: 4; title: setup.js; wrap-lines: true; notranslate">        var settings = {
            mode : (mode != undefined ? mode : 'none'),
            elements : this.id,
            theme : 'advanced',
            plugins : plugins,
            forced_root_block: false,
            extended_valid_elements: '+ul[*],+li[*],+p[*],+span[*],+div[*],+a[*]',
            remove_linebreaks : false,
            theme_advanced_buttons1 : magentoPlugins ...</pre>
<p>Save the file and clear your cache to apply the changes.</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2016/11/04/keep-line-breaks-html-attributes-tinymce/">Keep line breaks, custom HTML attributes and remove initial paragraph tag in Magento Admin&#8217;s TinyMCE editor</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mysillypointofview.com/2016/11/04/keep-line-breaks-html-attributes-tinymce/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">865</post-id>	</item>
		<item>
		<title>catalogProductCreate in Magento API returning SQL error for configurable product</title>
		<link>https://mysillypointofview.com/2016/11/02/catalogproductcreate-magento-api-configurable-error/</link>
					<comments>https://mysillypointofview.com/2016/11/02/catalogproductcreate-magento-api-configurable-error/#respond</comments>
		
		<dc:creator><![CDATA[Richard Feraro]]></dc:creator>
		<pubDate>Wed, 02 Nov 2016 00:00:08 +0000</pubDate>
				<category><![CDATA[Feeling guru]]></category>
		<category><![CDATA[Techie Daw]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=857</guid>

					<description><![CDATA[<p>It is common for companies with a huge product database to always have an ERP that manages their product updates. With an external service, it normally utilises the built-in Magento API. Calling the method catalogProductCreate using a SOAP service, one of the possible issues that may arise&#160;is the one below: catalogProductCreate Error: SQLSTATE23000: Integrity constraint [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2016/11/02/catalogproductcreate-magento-api-configurable-error/">catalogProductCreate in Magento API returning SQL error for configurable product</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>It is common for companies with a huge product database to always have an ERP that manages their product updates. With an external service, it normally utilises the built-in Magento API. Calling the method <strong>catalogProductCreate</strong> using a SOAP service, one of the possible issues that may arise&nbsp;is the one below:<span id="more-857"></span></p>
<h3>catalogProductCreate Error:</h3>
<p><code>SQLSTATE23000: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`db`.`catalog_product_super_link`, CONSTRAINT `FK_CAT_PRD_SPR_LNK_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE)</code></p>
<p>An empty <code>url_key</code>&nbsp;value causes the above issue. To fix it, make sure that the configurable product being created has a valid <code>url_key</code>. This is required for any product that is&nbsp;available on both catalog and search listings as shown below:</p>
<p><img loading="lazy" class="alignnone" src="https://i0.wp.com/mysillypointofview.richardferaro.com/wp-content/uploads/2016/11/soap-url_key.png?resize=468%2C101" alt="url_key field in catalogProductCreate SOAP request" width="468" height="101"  data-recalc-dims="1"></p>
<p>Do not forget that a <code>url_key</code> needs to be unique because this is used to generate the hyperlink of the product.</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2016/11/02/catalogproductcreate-magento-api-configurable-error/">catalogProductCreate in Magento API returning SQL error for configurable product</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mysillypointofview.com/2016/11/02/catalogproductcreate-magento-api-configurable-error/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">857</post-id>	</item>
		<item>
		<title>How to fix the Invalid Timezone error in Magento</title>
		<link>https://mysillypointofview.com/2014/04/10/how-to-fix-the-invalid-timezone-error-in-magento/</link>
					<comments>https://mysillypointofview.com/2014/04/10/how-to-fix-the-invalid-timezone-error-in-magento/#respond</comments>
		
		<dc:creator><![CDATA[Richard Feraro]]></dc:creator>
		<pubDate>Thu, 10 Apr 2014 18:12:49 +0000</pubDate>
				<category><![CDATA[Feeling guru]]></category>
		<category><![CDATA[Techie Daw]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=827</guid>

					<description><![CDATA[<p>I came across a persistent issue where the admin user is unable to save any configuration in the administration window and would only be greeted with the error below: Upon investigation, I noticed that the method _beforeSave() is being called multiple times regardless if the field is for timezone or not as shown in the [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2014/04/10/how-to-fix-the-invalid-timezone-error-in-magento/">How to fix the Invalid Timezone error in Magento</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I came across a persistent issue where the admin user is unable to save any configuration in the administration window and would only be greeted with the error below:</p>
<p><figure id="attachment_828" aria-describedby="caption-attachment-828" style="width: 315px" class="wp-caption aligncenter"><a href="https://i0.wp.com/mysillypointofview.richardferaro.com/wp-content/uploads/2014/04/invalid-timezone-error.png"><img data-attachment-id="828" data-permalink="https://mysillypointofview.com/2014/04/10/how-to-fix-the-invalid-timezone-error-in-magento/invalid-timezone-error/" data-orig-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2014/04/invalid-timezone-error.png?fit=315%2C50&amp;ssl=1" data-orig-size="315,50" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Invalid timezone error" data-image-description="" data-image-caption="&lt;p&gt;Invalid timezone error showing in the System &gt; Configuration window in Magento admin.&lt;/p&gt;
" data-medium-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2014/04/invalid-timezone-error.png?fit=300%2C47&amp;ssl=1" data-large-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2014/04/invalid-timezone-error.png?fit=315%2C50&amp;ssl=1" loading="lazy" class="size-full wp-image-828" src="https://i0.wp.com/mysillypointofview.richardferaro.com/wp-content/uploads/2014/04/invalid-timezone-error.png?resize=315%2C50" alt="Invalid timezone error" width="315" height="50" srcset="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2014/04/invalid-timezone-error.png?w=315&amp;ssl=1 315w, https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2014/04/invalid-timezone-error.png?resize=300%2C47&amp;ssl=1 300w" sizes="(max-width: 315px) 100vw, 315px" data-recalc-dims="1" /></a><figcaption id="caption-attachment-828" class="wp-caption-text">Invalid timezone error showing in the System &gt; Configuration window in Magento admin.</figcaption></figure></p>
<p><span id="more-827"></span>Upon investigation, I noticed that the method _beforeSave() is being called multiple times regardless if the field is for timezone or not as shown in the screenshot below:</p>
<p><figure id="attachment_829" aria-describedby="caption-attachment-829" style="width: 536px" class="wp-caption aligncenter"><a href="https://i0.wp.com/mysillypointofview.richardferaro.com/wp-content/uploads/2014/04/multiple-fields-being-validated.png" target="_blank"><img data-attachment-id="829" data-permalink="https://mysillypointofview.com/2014/04/10/how-to-fix-the-invalid-timezone-error-in-magento/multiple-fields-being-validated/" data-orig-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2014/04/multiple-fields-being-validated.png?fit=930%2C666&amp;ssl=1" data-orig-size="930,666" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Multiple fields being validated in the DateTimeZone::listIdentifiers($allWithBc) method." data-image-description="" data-image-caption="&lt;p&gt;Multiple fields being validated in the DateTimeZone::listIdentifiers($allWithBc) method.&lt;/p&gt;
" data-medium-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2014/04/multiple-fields-being-validated.png?fit=300%2C214&amp;ssl=1" data-large-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2014/04/multiple-fields-being-validated.png?fit=640%2C458&amp;ssl=1" loading="lazy" class=" wp-image-829    " src="https://i0.wp.com/mysillypointofview.richardferaro.com/wp-content/uploads/2014/04/multiple-fields-being-validated.png?resize=536%2C383" alt="Multiple fields being validated against the DateTimeZone::listIdentifiers($allWithBc) method." width="536" height="383" srcset="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2014/04/multiple-fields-being-validated.png?w=930&amp;ssl=1 930w, https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2014/04/multiple-fields-being-validated.png?resize=300%2C214&amp;ssl=1 300w" sizes="(max-width: 536px) 100vw, 536px" data-recalc-dims="1" /></a><figcaption id="caption-attachment-829" class="wp-caption-text">Multiple fields being validated against the DateTimeZone::listIdentifiers($allWithBc) method.</figcaption></figure></p>
<p><strong>The error occurs when the value of a non-timezone field is validated against the array result of the method DateTimeZone::listIdentifiers($allWithBc).</strong></p>
<p>To fix this, duplicate the core file:</p>
<p><code>app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale/Timezone.php</code></p>
<p>into this path (create the directory if it doesn&#8217;t exists)</p>
<p><code>app/code/local/Mage/Adminhtml/Model/System/Config/Backend/Locale/Timezone.php</code></p>
<p>Locate the method _beforeSave() and add the code below at the beginning:</p>
<pre class="brush: php; first-line: 47; title: ; notranslate">if($this-&gt;getField() !== 'timezone')
    return $this;</pre>
<p>The content of the method _beforeSave() should be similar to the one below (note this is for Magento CE 1.7.0.2 so adjust accordingly with the code changes)</p>
<pre class="brush: php; first-line: 45; title: ; notranslate">protected function _beforeSave()
{
    if($this-&gt;getField() !== 'timezone')
        return $this;

    $allWithBc = self::ALL_WITH_BC;
    if (defined('DateTimeZone::ALL_WITH_BC')) {
        $allWithBc = DateTimeZone::ALL_WITH_BC;
    }

    if (!in_array($this-&gt;getValue(), DateTimeZone::listIdentifiers($allWithBc))) {
        Mage::throwException(Mage::helper('adminhtml')-&gt;__('Invalid timezone'));
    }

    return $this;
}</pre>
<p>After that, you should now be able to save your configuration changes in the admin.</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2014/04/10/how-to-fix-the-invalid-timezone-error-in-magento/">How to fix the Invalid Timezone error in Magento</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mysillypointofview.com/2014/04/10/how-to-fix-the-invalid-timezone-error-in-magento/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">827</post-id>	</item>
		<item>
		<title>Fixing Fontis&#8217; Parse Error when using Direct Deposit</title>
		<link>https://mysillypointofview.com/2013/10/07/fixing-fontis-parse-error-using-direct-deposit/</link>
					<comments>https://mysillypointofview.com/2013/10/07/fixing-fontis-parse-error-using-direct-deposit/#comments</comments>
		
		<dc:creator><![CDATA[Richard Feraro]]></dc:creator>
		<pubDate>Mon, 07 Oct 2013 12:48:17 +0000</pubDate>
				<category><![CDATA[Feeling guru]]></category>
		<category><![CDATA[Techie Daw]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=818</guid>

					<description><![CDATA[<p>Is your checkout page failing whenever you enable Fontis&#8217; Direct Deposit payment option? Try checking your logs to see if there&#8217;s a similar error like the one below: Parse error: parse error in /app/design/frontend/base/default/template/fontis/australia/ payment/directdeposit/form.phtml on line 42 Some would ask you to check the file permission while others would tell that you need to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2013/10/07/fixing-fontis-parse-error-using-direct-deposit/">Fixing Fontis&#8217; Parse Error when using Direct Deposit</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Is your checkout page failing whenever you enable Fontis&#8217; Direct Deposit payment option? Try checking your logs to see if there&#8217;s a similar error like the one below:</p>
<p><strong>Parse error: parse error in /app/design/frontend/base/default/template/fontis/australia/ payment/directdeposit/form.phtml on line 42</strong></p>
<p><span id="more-818"></span>Some would ask you to check the file permission while others would tell that you need to turn off compilation. If you did all these already and still see the error, I would suggest for you to check if <code>short_open_tag</code> is enabled in your <code>php.ini</code> file. This setting enables the syntax <code>&lt;? ... ?&gt;</code> to work instead of typing <code>&lt;?php … ?&gt;</code>.</p>
<p>Upon checking the <code>form.phtml</code> file, the code in line 31 would show that it is using the <code>short_open_tag</code> (see code below) so you must change it from:</p>
<pre class="brush: php; first-line: 31; title: ; notranslate">&lt;?endif;?&gt;</pre>
<p>to this:</p>
<pre class="brush: php; first-line: 31; title: ; notranslate">&lt;?php endif;?&gt;</pre>
<p>Refresh your page to see the now working Direct Deposit block.</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2013/10/07/fixing-fontis-parse-error-using-direct-deposit/">Fixing Fontis&#8217; Parse Error when using Direct Deposit</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mysillypointofview.com/2013/10/07/fixing-fontis-parse-error-using-direct-deposit/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">818</post-id>	</item>
		<item>
		<title>How to change the number of columns in Magento catalog grid</title>
		<link>https://mysillypointofview.com/2013/01/31/how-to-change-catalog-column-number-in-magento/</link>
					<comments>https://mysillypointofview.com/2013/01/31/how-to-change-catalog-column-number-in-magento/#comments</comments>
		
		<dc:creator><![CDATA[Richard Feraro]]></dc:creator>
		<pubDate>Thu, 31 Jan 2013 17:45:18 +0000</pubDate>
				<category><![CDATA[Feeling guru]]></category>
		<category><![CDATA[Techie Daw]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=791</guid>

					<description><![CDATA[<p>The default Magento catalog grid is set to display 3 products per column. Most users alter the number of columns by modifying the file catalog/product/list.phtml. There&#8217;s actually a much cleaner approach to this task and you only need to modify an XML file. Open the catalog.xml file which can be found in the location below: [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2013/01/31/how-to-change-catalog-column-number-in-magento/">How to change the number of columns in Magento catalog grid</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The default Magento catalog grid is set to display 3 products per column. Most users alter the number of columns by modifying the file <code>catalog/product/list.phtml</code>. There&#8217;s actually a much cleaner approach to this task and you only need to modify an XML file.<br />
<span id="more-791"></span></p>
<p>Open the <code>catalog.xml</code> file which can be found in the location below:<br />
<code>/app/design/frontend/&lt;package-name&gt;/&lt;theme&gt;/layout/catalog.xml</code></p>
<p>Locate the line that declares the block for product listing similar to the one below:<br />
<code>&lt;block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml"&gt;</code></p>
<p>Immediately after the code above, add the XML node below:<br />
<code>&lt;action method="setColumnCount"&gt;&lt;columns&gt;4&lt;/columns&gt;&lt;/action&gt;</code></p>
<p>Save the file and clear the contents of your <code>var/cache</code> directory. Reload the catalog page to see the changes <img src="https://s.w.org/images/core/emoji/13.1.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><em>Note: You can also apply this to <code>catalogsearch.xml</code> or any layout XML file that uses the list.phtml</em></p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2013/01/31/how-to-change-catalog-column-number-in-magento/">How to change the number of columns in Magento catalog grid</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mysillypointofview.com/2013/01/31/how-to-change-catalog-column-number-in-magento/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">791</post-id>	</item>
		<item>
		<title>How to create a new Magento customer account from an external site?</title>
		<link>https://mysillypointofview.com/2011/02/22/create-new-magento-customer-from-external-site/</link>
					<comments>https://mysillypointofview.com/2011/02/22/create-new-magento-customer-from-external-site/#comments</comments>
		
		<dc:creator><![CDATA[Richard Feraro]]></dc:creator>
		<pubDate>Tue, 22 Feb 2011 00:00:08 +0000</pubDate>
				<category><![CDATA[Feeling guru]]></category>
		<category><![CDATA[Techie Daw]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=655</guid>

					<description><![CDATA[<p>I&#8217;ve been receiving a lot of inquiries on how to create a new customer record on the fly using Mage.php or using the plugin Mage Enabler for WordPress. So, to save you time and also to provide a thread for this specific topic, here&#8217;s how to accomplish it. First, include the file Mage.php from your [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2011/02/22/create-new-magento-customer-from-external-site/">How to create a new Magento customer account from an external site?</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve been receiving a lot of inquiries on how to create a new customer record on the fly using <code>Mage.php</code> or using the plugin <a href="http://wordpress.org/extend/plugins/mage-enabler/">Mage Enabler</a> for WordPress. So, to save you time and also to provide a thread for this specific topic, here&#8217;s how to accomplish it.</p>
<p><span id="more-655"></span>First, include the file <code>Mage.php</code> from your Magento installation to your PHP file. Doing this will enable you to connect to your shop using the Mage object.</p>
<p><strong>If you&#8217;re using Mage Enabler for WordPress, you may skip this part:</strong></p>
<pre class="brush: php; title: ; notranslate">&lt;?php
require_once (&quot;/your/magento/app/Mage.php&quot;);
umask(0);</pre>
<p>and here&#8217;s the rest of the code&#8230;</p>
<pre class="brush: php; first-line: 4; title: ; notranslate">// Customer Information
$firstname = &quot;John&quot;;
$lastname = &quot;Smith&quot;;
$email = &quot;johnsmith@localhost.local&quot;;
$password = &quot;myverysecretpassword&quot;;

// Website and Store details
$websiteId = Mage::app()-&gt;getWebsite()-&gt;getId();
$store = Mage::app()-&gt;getStore();

$customer = Mage::getModel(&quot;customer/customer&quot;);
$customer-&gt;website_id = $websiteId;
$customer-&gt;setStore($store);

try {
	// If new, save customer information
	$customer-&gt;firstname = $firstname;
	$customer-&gt;lastname = $lastname;
	$customer-&gt;email = $email;
	$customer-&gt;password_hash = md5($password);
	if($customer-&gt;save()){
		echo $customer-&gt;firstname.&quot; &quot;.$customer-&gt;lastname.&quot; information is saved!&quot;;
	}else{
		echo &quot;An error occured while saving customer&quot;;
	}
}catch(Exception $e){
	// If customer already exists, initiate login
	if(preg_match('/Customer email already exists/', $e)){
		$customer-&gt;loadByEmail($email);

		$session = Mage::getSingleton('customer/session');
		$session-&gt;login($email, $password);

		echo $session-&gt;isLoggedIn() ? $session-&gt;getCustomer()-&gt;getName().' is online!' : 'not logged in';
	}
}</pre>
<p>The above code tries to create a Magento customer account using the given parameters such as <code>$firstname</code>, <code>$lastname</code>, <code>$email</code> and <code>$password</code>. If the email doesn&#8217;t have a match in the database, the request proceeds. But if a match is found, it logs in the customer using the parameters <code>$email</code> and <code>$password</code> then checks if the customer is online or not logged in. There are actually more parameters that you can pass such as if you want to send confirmation message or not but these are the basic fields to help you get started.</p>
<p>I hope this will help you integrate the Magento registration to your external site <img src="https://s.w.org/images/core/emoji/13.1.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2011/02/22/create-new-magento-customer-from-external-site/">How to create a new Magento customer account from an external site?</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mysillypointofview.com/2011/02/22/create-new-magento-customer-from-external-site/feed/</wfw:commentRss>
			<slash:comments>31</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">655</post-id>	</item>
		<item>
		<title>How to pull the list of customers from Magento to an external site?</title>
		<link>https://mysillypointofview.com/2010/09/07/how-to-pull-the-list-of-customers-from-magento-to-an-external-site/</link>
					<comments>https://mysillypointofview.com/2010/09/07/how-to-pull-the-list-of-customers-from-magento-to-an-external-site/#comments</comments>
		
		<dc:creator><![CDATA[Richard Feraro]]></dc:creator>
		<pubDate>Tue, 07 Sep 2010 17:09:16 +0000</pubDate>
				<category><![CDATA[Feeling guru]]></category>
		<category><![CDATA[Techie Daw]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=565</guid>

					<description><![CDATA[<p>If you&#8217;re thinking of creating a page that will display your customer list from Magento to a different PHP-based application, you can use the script below to do so. First, let&#8217;s create a file called index.php and inside it, create function (I named it getCustomers()) that will extract an array of customer list and their [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2010/09/07/how-to-pull-the-list-of-customers-from-magento-to-an-external-site/">How to pull the list of customers from Magento to an external site?</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you&#8217;re thinking of creating a page that will display your customer list from Magento to a different PHP-based application, you can use the script below to do so.</p>
<p>First, let&#8217;s create a file called <code>index.php</code> and inside it, create function (I named it <strong>getCustomers()</strong>) that will extract an array of customer list and their information. The function should be able to access the <code>Mage.php</code> file of your Magento instance.</p>
<p><span id="more-565"></span></p>
<pre class="brush: php; title: ; notranslate">&lt;?php
function getCustomers() {
	/* Magento's Mage.php path
	 * Mage Enabler users may skip these lines
	 */
	require_once (&quot;../magento/app/Mage.php&quot;);
	umask(0);
	Mage::app(&quot;default&quot;);
	/* Magento's Mage.php path */

	/* Get customer model, run a query */
	$collection = Mage::getModel('customer/customer')
				  -&gt;getCollection()
				  -&gt;addAttributeToSelect('*');

	$result = array();
	foreach ($collection as $customer) {
		$result[] = $customer-&gt;toArray();
	}

	return $result;
}
?&gt;</pre>
<p>Once you&#8217;re done with the function, add the HTML tags needed to create the a page with a table for the customer information.</p>
<pre class="brush: xml; first-line: 24; title: ; notranslate">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Customers&lt;/title&gt;
&lt;style&gt;
table {
	border-collapse: collapse;
}
td {
	padding: 5px;
	border: 1px solid #000000;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;table&gt;
&lt;tr&gt;
	&lt;td&gt;ID&lt;/td&gt;
	&lt;td&gt;Lastname&lt;/td&gt;
	&lt;td&gt;Firstname&lt;/td&gt;
	&lt;td&gt;Email&lt;/td&gt;
	&lt;td&gt;Is Active?&lt;/td&gt;
	&lt;td&gt;Date Created&lt;/td&gt;
	&lt;td&gt;Date Updated&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>After line 47, press return/enter key and add the following script to loop through the array result of our <code>getCustomer()</code> function:</p>
<pre class="brush: php; first-line: 48; title: ; notranslate">&lt;?php
$result = getcustomers();
if(count($result) &gt; 0){
	foreach($result as $key =&gt; $value){
		echo &quot;&lt;tr&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;.$value['entity_id'].&quot;&lt;/td&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;.$value['lastname'].&quot;&lt;/td&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;.$value['firstname'].&quot;&lt;/td&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;.$value['email'].&quot;&lt;/td&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;;
			echo $value['is_active'] == 1 ? &quot;Yes&quot; : &quot;No&quot;;
			echo &quot;&lt;/td&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;.$value['created_at'].&quot;&lt;/td&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;.$value['updated_at'].&quot;&lt;/td&gt;&quot;;
		echo &quot;&lt;/tr&gt;&quot;;
	}
}else{
	echo &quot;&lt;tr&gt;&lt;td colspan=\&quot;7\&quot;&gt;No records found&lt;/td&gt;&lt;/tr&gt;&quot;;
}
?&gt;</pre>
<p>There are several available information within the array that you can also use. Here&#8217;s an example of a record result from our function:</p>
<pre class="brush: php; title: ; notranslate">[0] =&gt; Array
	(
		[entity_id] =&gt; 1
		[entity_type_id] =&gt; 1
		[attribute_set_id] =&gt; 0
		[website_id] =&gt; 1
		[email] =&gt; john.doe@example.com
		[group_id] =&gt; 1
		[increment_id] =&gt; 000000001
		[store_id] =&gt; 1
		[created_at] =&gt; 2007-08-30 23:23:13
		[updated_at] =&gt; 2008-08-08 12:28:24
		[is_active] =&gt; 1
		[firstname] =&gt; John
		[lastname] =&gt; Doe
		[password_hash] =&gt; 2049484a4020ed15d0e4238db22977d5:eg
		[prefix] =&gt;
		[middlename] =&gt;
		[suffix] =&gt;
		[taxvat] =&gt;
		[default_billing] =&gt; 274
		[default_shipping] =&gt; 274
	)</pre>
<p>Save the file as <code>index.php</code> and access it through your browser. It should display a table similar to the one below:</p>
<p><figure id="attachment_574" aria-describedby="caption-attachment-574" style="width: 491px" class="wp-caption aligncenter"><a href="https://i0.wp.com/mysillypointofview.richardferaro.com/wp-content/uploads/2010/09/Customers_list.png"><img data-attachment-id="574" data-permalink="https://mysillypointofview.com/2010/09/07/how-to-pull-the-list-of-customers-from-magento-to-an-external-site/customers_list/" data-orig-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/09/Customers_list.png?fit=756%2C410&amp;ssl=1" data-orig-size="756,410" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Customers_list" data-image-description="" data-image-caption="&lt;p&gt;Sample table of customers from Magento&lt;/p&gt;
" data-medium-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/09/Customers_list.png?fit=300%2C162&amp;ssl=1" data-large-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/09/Customers_list.png?fit=640%2C347&amp;ssl=1" loading="lazy" class="size-full wp-image-574   " title="Customers_list" src="https://i0.wp.com/mysillypointofview.richardferaro.com/wp-content/uploads/2010/09/Customers_list.png?resize=491%2C266" alt="Sample table of customers from Magento" width="491" height="266" srcset="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/09/Customers_list.png?w=756&amp;ssl=1 756w, https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/09/Customers_list.png?resize=300%2C162&amp;ssl=1 300w" sizes="(max-width: 491px) 100vw, 491px" data-recalc-dims="1" /></a><figcaption id="caption-attachment-574" class="wp-caption-text">Sample table of customers from Magento</figcaption></figure></p>
<p>Here&#8217;s the <code>index.php</code> for your reference:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
function getcustomers() {
	/* Magento's Mage.php path 
	 * Mage Enabler users may skip these lines
	 */
	require_once (&quot;../magento/app/Mage.php&quot;);
	umask(0);
	Mage::app(&quot;default&quot;);
	/* Magento's Mage.php path */
	
	/* Get customer model, run a query */
	$collection = Mage::getModel('customer/customer')
				  -&gt;getCollection()
				  -&gt;addAttributeToSelect('*');
	
	$result = array();
	foreach ($collection as $customer) {
		$result[] = $customer-&gt;toArray();
	}
	
	return $result;
}
?&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Customers&lt;/title&gt;
&lt;style&gt;
table {
	border-collapse: collapse;
}
td {
	padding: 5px;
	border: 1px solid #000000;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;table&gt;
&lt;tr&gt;
	&lt;td&gt;ID&lt;/td&gt;
	&lt;td&gt;Lastname&lt;/td&gt;
	&lt;td&gt;Firstname&lt;/td&gt;
	&lt;td&gt;Email&lt;/td&gt;
	&lt;td&gt;Is Active?&lt;/td&gt;
	&lt;td&gt;Date Created&lt;/td&gt;
	&lt;td&gt;Date Updated&lt;/td&gt;
&lt;/tr&gt;
&lt;?php
$result = getcustomers();
if(count($result) &gt; 0){
	foreach($result as $key =&gt; $value){
		echo &quot;&lt;tr&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;.$value['entity_id'].&quot;&lt;/td&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;.$value['lastname'].&quot;&lt;/td&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;.$value['firstname'].&quot;&lt;/td&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;.$value['email'].&quot;&lt;/td&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;;
			echo $value['is_active'] == 1 ? &quot;Yes&quot; : &quot;No&quot;;
			echo &quot;&lt;/td&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;.$value['created_at'].&quot;&lt;/td&gt;&quot;;
			echo &quot;&lt;td&gt;&quot;.$value['updated_at'].&quot;&lt;/td&gt;&quot;;
		echo &quot;&lt;/tr&gt;&quot;;
	}
}else{
	echo &quot;&lt;tr&gt;&lt;td colspan=\&quot;7\&quot;&gt;No records found&lt;/td&gt;&lt;/tr&gt;&quot;;
}
?&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2010/09/07/how-to-pull-the-list-of-customers-from-magento-to-an-external-site/">How to pull the list of customers from Magento to an external site?</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mysillypointofview.com/2010/09/07/how-to-pull-the-list-of-customers-from-magento-to-an-external-site/feed/</wfw:commentRss>
			<slash:comments>24</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">565</post-id>	</item>
		<item>
		<title>How to add Magento blocks, CSS and Javascript to an external site</title>
		<link>https://mysillypointofview.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/</link>
					<comments>https://mysillypointofview.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/#comments</comments>
		
		<dc:creator><![CDATA[Richard Feraro]]></dc:creator>
		<pubDate>Sat, 03 Jul 2010 00:01:40 +0000</pubDate>
				<category><![CDATA[Feeling guru]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=535</guid>

					<description><![CDATA[<p>You might have a Magento based website running online and wanted to extend parts of it (also known as blocks, which may include some css and js in the code) to an external site which may either be a blog, another CMS or any other PHP based web application. If you have been following my [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/">How to add Magento blocks, CSS and Javascript to an external site</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>You might have a Magento based website running online and wanted to extend parts of it (also known as blocks, which may include some css and js in the code) to an external site which may either be a blog, another CMS or any other PHP based web application. If you have been following my previous posts, you will know that by adding the Mage.php file of your Magento instance to your application, you can actually pull the needed HTML blocks at any time. The only problem is that most of the examples available online asks you to use the <strong>getChildHtml(&#8216;your-block-here&#8217;)</strong> in which most the time frustrates you because of its complexity and limited resources of how you can actually use it. You may not know that most of the secured casino websites like <a href="https://www.daisyslots.com">Daisy slots</a> used Magento blocks.</p>
<p>There are other ways of doing it. Oddly enough, some are pretty simple and straight forward.<br />
<span id="more-535"></span><br />
We will use a single HTML file which will serve as our &#8216;external&#8217; site. The source code of our <strong>index.php</strong> is shown below:</p>
<pre><pre class="brush: xml; title: ; notranslate">&amp;amp;amp;amp;lt;html&amp;amp;amp;amp;gt;
  &amp;amp;amp;amp;lt;head&amp;amp;amp;amp;gt;
    &amp;amp;amp;amp;lt;script type=&quot;text/javascript&quot;&amp;amp;amp;amp;gt;
      WebFontConfig = {
        google: { families: [ 'Josefin Sans Std Light', 'Lobster' ] }
      };
      (function() {
        var wf = document.createElement('script');
        wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
            '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
        wf.type = 'text/javascript';
        wf.async = 'true';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(wf, s);
      })();
    &amp;amp;amp;amp;lt;/script&amp;amp;amp;amp;gt;
    &amp;amp;amp;amp;lt;style type=&quot;text/css&quot;&amp;amp;amp;amp;gt;
      .wf-active p.text {
        font-family: 'Calibri', serif;
		font-size: 16px;
		text-align: justify;
		color:#666666;
		border: 1px solid #CCCCCC;
		-moz-border-radius: 20px;
		-webkit-border-radius: 20px;
		padding: 20px
      }

	  .wf-active h2 {
	  	font-family: 'Lobster', serif;
        font-size: 20px;
		color: #666666
      }

      .wf-active h1 {
        font-family: 'Lobster', serif;
        font-size: 45px;
		color: #006699;
		margin-bottom: 10px;
      }

	  div.body {
	  	max-width: 850px;
		margin: auto;
		background-color: #FFFFFF;
		padding: 30px 50px 0px 50px;
		text-align: left;
		height: 60%;
	  }

	  p.bugs {
	  	font: 12px/1.55 Arial,Helvetica,sans-serif;
		text-align: center;
	  }

	  p.otherdata {
	  	font-family: 'Calibri', serif;
		font-size: 15px;
		color: #999999;
		margin-bottom: 20px
	  }

	  .otherdata strong {
	  	color: #000000
	  }
    &amp;amp;amp;amp;lt;/style&amp;amp;amp;amp;gt;
  &amp;amp;amp;amp;lt;/head&amp;amp;amp;amp;gt;
  &amp;amp;amp;amp;lt;body&amp;amp;amp;amp;gt;
  	&amp;amp;amp;amp;lt;div class=&quot;body&quot;&amp;amp;amp;amp;gt;
		&amp;amp;amp;amp;lt;h1&amp;amp;amp;amp;gt;How to add Magento blocks, CSS and Javascript to an external site&amp;amp;amp;amp;lt;/h1&amp;amp;amp;amp;gt;
		&amp;amp;amp;amp;lt;p class=&quot;otherdata&quot;&amp;amp;amp;amp;gt;Written by &amp;amp;amp;amp;lt;strong&amp;amp;amp;amp;gt;Richard Feraro&amp;amp;amp;amp;lt;/strong&amp;amp;amp;amp;gt; | Posted on &amp;amp;amp;amp;lt;strong&amp;amp;amp;amp;gt;July 2, 2010&amp;amp;amp;amp;lt;/strong&amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;/p&amp;amp;amp;amp;gt;
		&amp;amp;amp;amp;lt;p class=&quot;text&quot;&amp;amp;amp;amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis a quam massa. Nullam eget erat metus. Sed vel justo enim. Proin rhoncus laoreet bibendum. Nullam eget est nisi. In eget sem in erat sodales bibendum. Morbi gravida augue sed felis tincidunt a congue dui placerat. Aliquam purus risus, mollis sed ullamcorper non, viverra eu odio. Suspendisse nibh nisi, suscipit at viverra eu, convallis ac odio. Morbi nec sapien eros. Suspendisse nec nulla erat, ac porttitor neque. Integer felis dolor, sollicitudin sed semper et, imperdiet nec turpis. Proin blandit luctus egestas. &amp;amp;amp;amp;lt;/p&amp;amp;amp;amp;gt;
	&amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;gt;
  &amp;amp;amp;amp;lt;/body&amp;amp;amp;amp;gt;
&amp;amp;amp;amp;lt;/html&amp;amp;amp;amp;gt;</pre>
<p>The code above shall produce a page like the one in the screenshot below.</p>
<p><figure id="attachment_538" aria-describedby="caption-attachment-538" style="width: 477px" class="wp-caption aligncenter"><a href="https://i0.wp.com/mysillypointofview.richardferaro.com/wp-content/uploads/2010/07/sample_external_site.png"><img data-attachment-id="538" data-permalink="https://mysillypointofview.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/sample_external_site/" data-orig-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/07/sample_external_site.png?fit=942%2C472&amp;ssl=1" data-orig-size="942,472" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Sample External Page" data-image-description="" data-image-caption="&lt;p&gt;Our Sample External Page&lt;/p&gt;
" data-medium-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/07/sample_external_site.png?fit=300%2C150&amp;ssl=1" data-large-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/07/sample_external_site.png?fit=640%2C321&amp;ssl=1" loading="lazy" class="size-full wp-image-538     " title="Sample External Page" src="https://i0.wp.com/mysillypointofview.richardferaro.com/wp-content/uploads/2010/07/sample_external_site.png?resize=477%2C239" alt="" width="477" height="239" srcset="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/07/sample_external_site.png?w=942&amp;ssl=1 942w, https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/07/sample_external_site.png?resize=300%2C150&amp;ssl=1 300w" sizes="(max-width: 477px) 100vw, 477px" data-recalc-dims="1" /></a><figcaption id="caption-attachment-538" class="wp-caption-text">Our Sample External Page</figcaption></figure></p>
<p>We&#8217;ll start editing at the beginning of the file by adding a <code>require_once()</code> for our <code>Mage.php</code> file.</p>
<pre><pre class="brush: php; title: ; notranslate">// Your Magento Mage.php
// Mage Enabler WordPress plugin users may
// skip these lines
require_once (&quot;/your/magento/app/Mage.php&quot;);
umask(0);
Mage::app(&quot;default&quot;);</pre>
<p>Proceed with adding the <code>if(class_exists('Mage')){...}</code> which encloses our Magento scripts to prevent the site from breaking if in case the Mage object failed to be instantiated. Check the inline comments for more details.</p>
<pre><pre class="brush: php; title: ; notranslate">// Make sure to execute this block of code
// only if Mage object is present
if(class_exists('Mage')){
	// Instantiate session and generate needed cookie
	Mage::getSingleton('core/session', array('name' =&amp;amp;amp;amp;gt; 'frontend'));
	$Block = Mage::getSingleton('core/layout');

	// Start pulling the blocks
	$head = $Block-&amp;amp;amp;amp;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:
	// http://localhost/magento/skin/frontend/default/default/css/styles.css
	$head-&amp;amp;amp;amp;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:
	// http://localhost/magento/js/prototype/prototype.js
	$head-&amp;amp;amp;amp;gt;addJs('prototype/prototype.js');

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

	// And the footer's HTML as well
	$footer = $Block-&amp;amp;amp;amp;gt;createBlock('Page/Html_Footer');
	$footer-&amp;amp;amp;amp;gt;setTemplate('page/html/footer.phtml');
}</pre>
<p>That&#8217;s it. The codes above will generate the Magento session, the 3 blocks for CSS/JS (which uses the default skin of Magento and adds the Prototype JS file) and the HTML tags for the header and footer.</p>
<p>To use the blocks, insert the CSS/JS block right before the end tag of <code>&lt;/HEAD&gt;</code>:</p>
<pre><pre class="brush: php; title: ; notranslate">	&amp;amp;amp;amp;lt;?php
		// Display the needed tags for CSS and JS
		echo (class_exists('Mage')) ? $head-&amp;amp;amp;amp;gt;getCssJsHtml() : '' ;
	?&amp;amp;amp;amp;gt;
&amp;amp;amp;amp;lt;/head&amp;amp;amp;amp;gt;</pre>
<p>Proceed by adding the Magento header block right after the <code>&lt;BODY&gt;</code> tag but before the <code>&lt;DIV&gt;</code> tag.</p>
<pre><pre class="brush: php; title: ; notranslate">&amp;amp;amp;amp;lt;body&amp;amp;amp;amp;gt;
  	&amp;amp;amp;amp;lt;?php
		// Display the Header HTML
		echo (class_exists('Mage')) ? $header-&amp;amp;amp;amp;gt;toHTML() : '' ;
	?&amp;amp;amp;amp;gt;
  	&amp;amp;amp;amp;lt;div class=&quot;body&quot;&amp;amp;amp;amp;gt;</pre>
<p>Finally, add the Magento footer block right between the end tag of <code>&lt;/DIV&gt;</code> and <code>&lt;/BODY&gt;</code> tag</p>
<pre><pre class="brush: php; title: ; notranslate">	&amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;gt;
	&amp;amp;amp;amp;lt;?php
		// Display the Footer HTML
		echo (class_exists('Mage')) ? $footer-&amp;amp;amp;amp;gt;toHTML() : '' ;
	?&amp;amp;amp;amp;gt;
  &amp;amp;amp;amp;lt;/body&amp;amp;amp;amp;gt;</pre>
<p>It should display a page of our external site which now uses the header and footer of Magento. Check the source to see the additional tags generated.</p>
<p><figure id="attachment_544" aria-describedby="caption-attachment-544" style="width: 473px" class="wp-caption aligncenter"><a href="https://i0.wp.com/mysillypointofview.richardferaro.com/wp-content/uploads/2010/07/sample_external_site_with_magento_blocks.png"><img data-attachment-id="544" data-permalink="https://mysillypointofview.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/sample_external_site_with_magento_blocks/" data-orig-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/07/sample_external_site_with_magento_blocks.png?fit=1192%2C688&amp;ssl=1" data-orig-size="1192,688" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Our Sample External Page with Magento CSS, Prototype JS, Header and Footer" data-image-description="" data-image-caption="&lt;p&gt;Our Sample External Page with Magento CSS, Prototype JS, Header and Footer&lt;/p&gt;
" data-medium-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/07/sample_external_site_with_magento_blocks.png?fit=300%2C173&amp;ssl=1" data-large-file="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/07/sample_external_site_with_magento_blocks.png?fit=640%2C369&amp;ssl=1" loading="lazy" class="size-full wp-image-544    " title="Our Sample External Page with Magento CSS, Prototype JS, Header and Footer" src="https://i0.wp.com/mysillypointofview.richardferaro.com/wp-content/uploads/2010/07/sample_external_site_with_magento_blocks.png?resize=473%2C273" alt="" width="473" height="273" srcset="https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/07/sample_external_site_with_magento_blocks.png?w=1192&amp;ssl=1 1192w, https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/07/sample_external_site_with_magento_blocks.png?resize=300%2C173&amp;ssl=1 300w, https://i0.wp.com/mysillypointofview.com/wp-content/uploads/2010/07/sample_external_site_with_magento_blocks.png?resize=1024%2C591&amp;ssl=1 1024w" sizes="(max-width: 473px) 100vw, 473px" data-recalc-dims="1" /></a><figcaption id="caption-attachment-544" class="wp-caption-text">Our Sample External Page with Magento CSS, Prototype JS, Header and Footer</figcaption></figure></p>
<p>The full <strong>index.php</strong> can be found below:</p>
<pre><pre class="brush: php; title: ; notranslate">&amp;amp;amp;amp;lt;?php
// Your Magento Mage.php
// Mage Enabler WordPress plugin users may
// skip line numbers 5, 6 and 7
require_once (&quot;/your/magento/app/Mage.php&quot;);
umask(0);
Mage::app(&quot;default&quot;);

// Make sure to execute this block of code
// only if Mage object is present
if(class_exists('Mage')){
	// Instantiate session and generate needed cookie
	Mage::getSingleton('core/session', array('name' =&amp;amp;amp;amp;gt; 'frontend'));
	$Block = Mage::getSingleton('core/layout');

	// Start pulling the blocks
	$head = $Block-&amp;amp;amp;amp;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:
	// http://localhost/magento/skin/frontend/default/default/css/styles.css
	$head-&amp;amp;amp;amp;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:
	// http://localhost/magento/js/prototype/prototype.js
	$head-&amp;amp;amp;amp;gt;addJs('prototype/prototype.js');

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

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

?&amp;amp;amp;amp;gt;
&amp;amp;amp;amp;lt;html&amp;amp;amp;amp;gt;
  &amp;amp;amp;amp;lt;head&amp;amp;amp;amp;gt;
    &amp;amp;amp;amp;lt;script type=&quot;text/javascript&quot;&amp;amp;amp;amp;gt;
      WebFontConfig = {
        google: { families: [ 'Josefin Sans Std Light', 'Lobster' ] }
      };
      (function() {
        var wf = document.createElement('script');
        wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
            '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
        wf.type = 'text/javascript';
        wf.async = 'true';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(wf, s);
      })();
    &amp;amp;amp;amp;lt;/script&amp;amp;amp;amp;gt;
    &amp;amp;amp;amp;lt;style type=&quot;text/css&quot;&amp;amp;amp;amp;gt;
      .wf-active p.text {
        font-family: 'Calibri', serif;
		font-size: 16px;
		text-align: justify;
		color:#666666;
		border: 1px solid #CCCCCC;
		-moz-border-radius: 20px;
		-webkit-border-radius: 20px;
		padding: 20px
      }

	  .wf-active h2 {
	  	font-family: 'Lobster', serif;
        font-size: 20px;
		color: #666666
      }

      .wf-active h1 {
        font-family: 'Lobster', serif;
        font-size: 45px;
		color: #006699;
		margin-bottom: 10px;
      }

	  div.body {
	  	max-width: 850px;
		margin: auto;
		background-color: #FFFFFF;
		padding: 30px 50px 0px 50px;
		text-align: left;
		height: 60%;
	  }

	  p.bugs {
	  	font: 12px/1.55 Arial,Helvetica,sans-serif;
		text-align: center;
	  }

	  p.otherdata {
	  	font-family: 'Calibri', serif;
		font-size: 15px;
		color: #999999;
		margin-bottom: 20px
	  }

	  .otherdata strong {
	  	color: #000000
	  }
    &amp;amp;amp;amp;lt;/style&amp;amp;amp;amp;gt;
	&amp;amp;amp;amp;lt;?php
		// Display the needed tags for CSS and JS
		echo (class_exists('Mage')) ? $head-&amp;amp;amp;amp;gt;getCssJsHtml() : '' ;
	?&amp;amp;amp;amp;gt;
  &amp;amp;amp;amp;lt;/head&amp;amp;amp;amp;gt;
  &amp;amp;amp;amp;lt;body&amp;amp;amp;amp;gt;
  	&amp;amp;amp;amp;lt;?php
		// Display the Header HTML
		echo (class_exists('Mage')) ? $header-&amp;amp;amp;amp;gt;toHTML() : '' ;
	?&amp;amp;amp;amp;gt;
  	&amp;amp;amp;amp;lt;div class=&quot;body&quot;&amp;amp;amp;amp;gt;
		&amp;amp;amp;amp;lt;h1&amp;amp;amp;amp;gt;How to add Magento blocks, CSS and Javascript to an external site&amp;amp;amp;amp;lt;/h1&amp;amp;amp;amp;gt;
		&amp;amp;amp;amp;lt;p class=&quot;otherdata&quot;&amp;amp;amp;amp;gt;Written by &amp;amp;amp;amp;lt;strong&amp;amp;amp;amp;gt;Richard Feraro&amp;amp;amp;amp;lt;/strong&amp;amp;amp;amp;gt; | Posted on &amp;amp;amp;amp;lt;strong&amp;amp;amp;amp;gt;July 2, 2010&amp;amp;amp;amp;lt;/strong&amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;/p&amp;amp;amp;amp;gt;
		&amp;amp;amp;amp;lt;p class=&quot;text&quot;&amp;amp;amp;amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis a quam massa. Nullam eget erat metus. Sed vel justo enim. Proin rhoncus laoreet bibendum. Nullam eget est nisi. In eget sem in erat sodales bibendum. Morbi gravida augue sed felis tincidunt a congue dui placerat. Aliquam purus risus, mollis sed ullamcorper non, viverra eu odio. Suspendisse nibh nisi, suscipit at viverra eu, convallis ac odio. Morbi nec sapien eros. Suspendisse nec nulla erat, ac porttitor neque. Integer felis dolor, sollicitudin sed semper et, imperdiet nec turpis. Proin blandit luctus egestas. &amp;amp;amp;amp;lt;/p&amp;amp;amp;amp;gt;
	&amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;gt;
	&amp;amp;amp;amp;lt;?php
		// Display the Footer HTML
		echo (class_exists('Mage')) ? $footer-&amp;amp;amp;amp;gt;toHTML() : '' ;
	?&amp;amp;amp;amp;gt;
  &amp;amp;amp;amp;lt;/body&amp;amp;amp;amp;gt;
&amp;amp;amp;amp;lt;/html&amp;amp;amp;amp;gt;</pre>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/">How to add Magento blocks, CSS and Javascript to an external site</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mysillypointofview.com/2010/07/03/how-to-add-magento-blocks-css-and-javascript-to-an-external-site/feed/</wfw:commentRss>
			<slash:comments>91</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">535</post-id>	</item>
		<item>
		<title>How to add a product with custom options into Magento shopping cart from an external site?</title>
		<link>https://mysillypointofview.com/2010/06/04/add-a-product-with-custom-options-into-magento-cart-from-external-site/</link>
					<comments>https://mysillypointofview.com/2010/06/04/add-a-product-with-custom-options-into-magento-cart-from-external-site/#comments</comments>
		
		<dc:creator><![CDATA[Richard Feraro]]></dc:creator>
		<pubDate>Fri, 04 Jun 2010 17:49:57 +0000</pubDate>
				<category><![CDATA[Feeling guru]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">http://mysillypointofview.richardferaro.com/?p=521</guid>

					<description><![CDATA[<p>This is a follow up post to a previous article I wrote on how to add products into Magento but this time the script includes custom options (attributes) of the product. I used Magento version 1.4.0.1 in this example. Just copy the whole script and save it as index.php.</p>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2010/06/04/add-a-product-with-custom-options-into-magento-cart-from-external-site/">How to add a product with custom options into Magento shopping cart from an external site?</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This is a follow up post to a previous <a href="http://mysillypointofview.richardferaro.com/2009/04/27/how-to-add-a-product-into-magento-from-an-external-site/">article</a> I wrote on how to add products into Magento but this time the script includes custom options (attributes) of the product. I used Magento version 1.4.0.1 in this example. Just copy the whole script and save it as <strong>index.php</strong>.</p>
<p><span id="more-521"></span></p>
<pre class="brush: php; title: ; notranslate">&lt;?php
require_once (&quot;/var/www/your-magento-directory/app/Mage.php&quot;);
umask(0);

// Initialize Magento
Mage::app(&quot;default&quot;);

// You have two options here,
// &quot;frontend&quot; for frontend session or &quot;adminhtml&quot; for admin session
Mage::getSingleton(&quot;core/session&quot;, array(&quot;name&quot; =&gt; &quot;frontend&quot;));

// get the current Magento cart
$cart = Mage::getSingleton('checkout/cart');

if(isset($_POST['submit'])){

	// call the Magento catalog/product model
	$product = Mage::getModel('catalog/product')
					 // set the current store ID
					 -&gt;setStoreId(Mage::app()-&gt;getStore()-&gt;getId())
					 // load the product object
					 -&gt;load($_POST['product']);
	
	// start adding the product
	// format: addProduct(&lt;product id&gt;, array(
	//         'qty' =&gt; &lt;quantity&gt;, 
	//         'super_attribute' =&gt; array(&lt;attribute id&gt; =&gt; &lt;option id&gt;) 
	//     ) 
	// )
	$cart-&gt;addProduct($product, array( 
			'qty' =&gt; $_POST['qty'], 
			'super_attribute' =&gt; array( key($_POST['super_attribute']) =&gt; $_POST['super_attribute'][525] )
			)
		);
		
	// save the cart
	$cart-&gt;save();
	
	// very straightforward, set the cart as updated
	Mage::getSingleton('checkout/session')-&gt;setCartWasUpdated(true);
	
	// redirect to index.php
	header(&quot;Location: index.php&quot;);

}else{
?&gt;
&lt;html&gt;
&lt;head&gt;&lt;/head&gt;
&lt;body&gt;
&lt;div style=&quot;width: 400px; margin: auto&quot;&gt;
	&lt;h3&gt;Very Nice T-shirt&lt;/h3&gt;
	&lt;hr&gt;
	&lt;div style=&quot;width: 180px; margin:auto; line-height: 30px&quot;&gt;
		&lt;form action=&quot;index.php&quot; method=&quot;post&quot;&gt;	
			Size: 
			&lt;select name=&quot;super_attribute[525]&quot;&gt;
				&lt;option value=&quot;&quot;&gt;Choose an option...&lt;/option&gt;
				&lt;option value=&quot;100&quot;&gt;Small&lt;/option&gt;
				&lt;option value=&quot;99&quot;&gt;Medium&lt;/option&gt;
				&lt;option value=&quot;98&quot;&gt;Large&lt;/option&gt;
			&lt;/select&gt;&lt;br&gt;
			Quantity: &lt;input type=&quot;text&quot; name=&quot;qty&quot; size=&quot;1&quot; value=&quot;1&quot;&gt; 
			&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Add This&quot;&gt;
			&lt;input type=&quot;hidden&quot; name=&quot;product&quot; value=&quot;119&quot;&gt;
		&lt;/form&gt;
	&lt;/div&gt;
	&lt;hr&gt;
	&lt;strong&gt;&lt;?php echo &quot;Cart Qty: &quot;.$cart-&gt;getItemsQty();?&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;?php } ?&gt;</pre>
<p>The post <a rel="nofollow" href="https://mysillypointofview.com/2010/06/04/add-a-product-with-custom-options-into-magento-cart-from-external-site/">How to add a product with custom options into Magento shopping cart from an external site?</a> appeared first on <a rel="nofollow" href="https://mysillypointofview.com">My Silly Point of View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mysillypointofview.com/2010/06/04/add-a-product-with-custom-options-into-magento-cart-from-external-site/feed/</wfw:commentRss>
			<slash:comments>45</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">521</post-id>	</item>
	</channel>
</rss>
