<?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>Stephan Miller &#187; datafeeds</title> <atom:link href="http://www.stephanmiller.com/tag/datafeeds/feed/" rel="self" type="application/rss+xml" /><link>http://www.stephanmiller.com</link> <description>Building Websites, Traffic, and Income</description> <lastBuildDate>Tue, 20 Sep 2011 13:59:15 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>Importing ShareASale Datafeeds into Drupal Part 2</title><link>http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-2/</link> <comments>http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-2/#comments</comments> <pubDate>Tue, 12 Jun 2007 16:02:49 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Affiliate Programs]]></category> <category><![CDATA[Drupal]]></category> <category><![CDATA[datafeeds]]></category> <category><![CDATA[shareasale]]></category><guid
isPermaLink="false">http://www.stephanmiller.com/2007/06/12/importing-shareasale-datefeeds-into-drupal-part-2/</guid> <description><![CDATA[<div
class="addthis_toolbox addthis_default_style" addthis:url='http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-2/' addthis:title='Importing ShareASale Datafeeds into Drupal Part 2 ' ><a
class="addthis_button_google_plusone" g:plusone:size="medium" ></a><a
class="addthis_counter addthis_pill_style"></a></div>Okay, there is an issue using Node Import to import ShareASale datafeeds. Either the datafeed itself or the import process makes characters like &#8220;&#38;&#8221; come up as character codes. I have had the same issue before with xml files, but now is not the time to investigate, just to fix the issue. My solution, though [...]<div
class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-2/' addthis:title='Importing ShareASale Datafeeds into Drupal Part 2' ><a
class="addthis_button_google +1"></a><a
class="addthis_button_facebook"></a><a
class="addthis_button_twitter"></a><a
class="addthis_button_stumbleupon"></a><a
class="addthis_button_email"></a><a
class="addthis_button_print"></a><a
class="addthis_button_preferred_1"></a><a
class="addthis_button_preferred_2"></a><a
class="addthis_button_preferred_3"></a><a
class="addthis_button_preferred_4"></a><a
class="addthis_button_preferred_5"></a><a
class="addthis_button_compact"></a></div>]]></description> <content:encoded><![CDATA[<div
class="addthis_toolbox addthis_default_style" addthis:url='http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-2/' addthis:title='Importing ShareASale Datafeeds into Drupal Part 2 ' ><a
class="addthis_button_google_plusone" g:plusone:size="medium" ></a><a
class="addthis_counter addthis_pill_style"></a></div><p>Okay, there is an issue using Node Import to import ShareASale datafeeds.</p><p>Either the datafeed itself or the import process makes characters like &#8220;&amp;&#8221; come up as character codes.  I have had the same issue before with xml files, but now is not the time to investigate, just to fix the issue.</p><p>My solution, though a little hacky, was to create a page in Drupal with the import format set to &#8220;php code&#8221; and then paste code to clean these characters.</p><p>The three tables to focus on are:</p><ul><li>term_data</li><li>node</li><li>node_revisions</li></ul><p>Here is the code:</p><p>&lt;?php<br
/> $deletes = array (<br
/> &#8220;&amp;&#8221;  =&gt; &#8220;&amp;&#8221;,<br
/> &#8220;&#8216;&#8221;  =&gt; &#8220;\&#8217;&#8221;,<br
/> &#8220;&gt;&#8221; =&gt; &#8220;&gt;&#8221;);<br
/> foreach($deletes as $remove=&gt;$replace){<br
/> $cleantagquery = &#8220;UPDATE {term_data} SET name=REPLACE(name,&#8217;$remove&#8217;,'$replace&#8217;)&#8221;;<br
/> db_query($cleantagquery);<br
/> $cleantitlequery = &#8220;UPDATE {node} SET title=REPLACE(title,&#8217;$remove&#8217;,'$replace&#8217;) WHERE type = &#8216;store&#8217;&#8221;;<br
/> db_query($cleantitlequery);<br
/> $cleanrevtitlequery = &#8220;UPDATE {node_revisions} SET title=REPLACE(title,&#8217;$remove&#8217;,'$replace&#8217;)&#8221;;<br
/> db_query($cleanrevtitlequery);<br
/> $cleanrevbodyquery = &#8220;UPDATE {node_revisions} SET body=REPLACE(body,&#8217;$remove&#8217;,'$replace&#8217;)&#8221;;<br
/> db_query($cleanrevbodyquery);<br
/> }<br
/> if(mysql_error()){<br
/> echo mysql_error();<br
/> }else{<br
/> echo &#8220;Done!&#8221;;<br
/> }</p><p>?&gt;</p><p>Of course, WordPress just changed the character entities back to the character, but you get the idea.</p><div
class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-2/' addthis:title='Importing ShareASale Datafeeds into Drupal Part 2' ><a
class="addthis_button_google +1"></a><a
class="addthis_button_facebook"></a><a
class="addthis_button_twitter"></a><a
class="addthis_button_stumbleupon"></a><a
class="addthis_button_email"></a><a
class="addthis_button_print"></a><a
class="addthis_button_preferred_1"></a><a
class="addthis_button_preferred_2"></a><a
class="addthis_button_preferred_3"></a><a
class="addthis_button_preferred_4"></a><a
class="addthis_button_preferred_5"></a><a
class="addthis_button_compact"></a></div>]]></content:encoded> <wfw:commentRss>http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-2/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Importing ShareASale Datafeeds into Drupal Part 1</title><link>http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-1/</link> <comments>http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-1/#comments</comments> <pubDate>Tue, 05 Jun 2007 03:11:49 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Affiliate Programs]]></category> <category><![CDATA[Drupal]]></category> <category><![CDATA[datafeeds]]></category> <category><![CDATA[firefox_extension]]></category> <category><![CDATA[iopus]]></category> <category><![CDATA[macro_express]]></category> <category><![CDATA[sharesale]]></category><guid
isPermaLink="false">http://www.stephanmiller.com/2007/06/05/importing-shareasale-datefeeds-into-drupal-part-1/</guid> <description><![CDATA[<div
class="addthis_toolbox addthis_default_style" addthis:url='http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-1/' addthis:title='Importing ShareASale Datafeeds into Drupal Part 1 ' ><a
class="addthis_button_google_plusone" g:plusone:size="medium" ></a><a
class="addthis_counter addthis_pill_style"></a></div>I finally cracked this code. Well, almost. I still have to create a template for the new nodes. I still have to clean up the taxonomy a little. Hopefully, I find a little tool for that, because yesterday I imported over 1000 products in less than five minutes. Using a highly underpriced piece of software [...]<div
class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-1/' addthis:title='Importing ShareASale Datafeeds into Drupal Part 1' ><a
class="addthis_button_google +1"></a><a
class="addthis_button_facebook"></a><a
class="addthis_button_twitter"></a><a
class="addthis_button_stumbleupon"></a><a
class="addthis_button_email"></a><a
class="addthis_button_print"></a><a
class="addthis_button_preferred_1"></a><a
class="addthis_button_preferred_2"></a><a
class="addthis_button_preferred_3"></a><a
class="addthis_button_preferred_4"></a><a
class="addthis_button_preferred_5"></a><a
class="addthis_button_compact"></a></div>]]></description> <content:encoded><![CDATA[<div
class="addthis_toolbox addthis_default_style" addthis:url='http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-1/' addthis:title='Importing ShareASale Datafeeds into Drupal Part 1 ' ><a
class="addthis_button_google_plusone" g:plusone:size="medium" ></a><a
class="addthis_counter addthis_pill_style"></a></div><p>I finally cracked this code. Well, almost. I still have to create a template for the new nodes. I still have to clean up the taxonomy a little. Hopefully, I find a little tool for that, because yesterday I imported over 1000 products in less than five minutes.</p><p>Using a highly underpriced piece of software called Macro Express, I wrote a script that downloads datafeeds from from the ShareaSale ftp site and then breaks them into uploadable sized chunks.</p><p>The Drupal part of the process is still manual though. I am playing with the iOpus iMacros Firefox extension, but haven&#8217;t quite got it down yet. It&#8217;s a great extension. I have used it for other internet macros before.</p><p>Necessary Drupal Extensions:</p><p>CCK</p><p>Content Templates</p><p>Node Import</p><p>I think that&#8217;s all for now. I will get more detailed on how to pull the whole thing off later, but if you&#8217;ve played with Drupal for a little while, you should be able to play with those modules and figure out how to do it before I get back to writing the second part of this post.</p><div
class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-1/' addthis:title='Importing ShareASale Datafeeds into Drupal Part 1' ><a
class="addthis_button_google +1"></a><a
class="addthis_button_facebook"></a><a
class="addthis_button_twitter"></a><a
class="addthis_button_stumbleupon"></a><a
class="addthis_button_email"></a><a
class="addthis_button_print"></a><a
class="addthis_button_preferred_1"></a><a
class="addthis_button_preferred_2"></a><a
class="addthis_button_preferred_3"></a><a
class="addthis_button_preferred_4"></a><a
class="addthis_button_preferred_5"></a><a
class="addthis_button_compact"></a></div>]]></content:encoded> <wfw:commentRss>http://www.stephanmiller.com/importing-shareasale-datefeeds-into-drupal-part-1/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 4/17 queries in 0.006 seconds using disk: basic
Object Caching 715/740 objects using disk: basic

Served from: www.stephanmiller.com @ 2012-02-13 16:44:20 -->
