<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Denver SEO Blog</title>
	
	<link>http://www.seodenver.com</link>
	<description>Websites designed and optimized for results.</description>
	<lastBuildDate>Tue, 17 Aug 2010 20:06:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/DenverSEO" /><feedburner:info uri="denverseo" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Fixing the Interspire Google Base Feed</title>
		<link>http://feedproxy.google.com/~r/DenverSEO/~3/XyOsi7JUkIU/</link>
		<comments>http://www.seodenver.com/fixing-interspire-google-base-feed/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 20:06:50 +0000</pubDate>
		<dc:creator>Zack Katz</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Interspire]]></category>
		<category><![CDATA[Google Base]]></category>
		<category><![CDATA[Google Base Feed]]></category>
		<category><![CDATA[Interspire Customization]]></category>
		<category><![CDATA[Interspire Development]]></category>
		<category><![CDATA[Interspire Mods]]></category>
		<category><![CDATA[Interspire Shopping Cart]]></category>

		<guid isPermaLink="false">http://www.seodenver.com/?p=1670</guid>
		<description><![CDATA[Google Base updates their guidelines faster than Interspire updates its Shopping&#160;Cart. Upon launching the new MakeUpMania.com website, I discovered that the XML feed that Interspire generates for Google Base is not properly structured. There were many hits and misses before making the modifications necessary to get the feed&#160;approved. Fixing the generated&#160;feed Below are fixes to [...]


Related posts:<ol><li><a href='http://www.seodenver.com/custom-rss-feed-in-wordpress/' rel='bookmark' title='Permanent Link: How to Create a Custom RSS Feed in WordPress in 12 Lines of&nbsp;Code'>How to Create a Custom RSS Feed in WordPress in 12 Lines of&nbsp;Code</a></li>
<li><a href='http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Preview Hidden Products in Interspire Shopping&nbsp;Cart'>Preview Hidden Products in Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/improve-interspire-shopping-cart-search/' rel='bookmark' title='Permanent Link: Improve Interspire Shopping Cart Search with Smart&nbsp;Redirections'>Improve Interspire Shopping Cart Search with Smart&nbsp;Redirections</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><h2>Google Base updates their guidelines faster than Interspire updates its Shopping&nbsp;Cart.</h2>
<p><img class="alignright size-full wp-image-1674" title="Feeding Google an Interspire products list" src="http://www.seodenver.com/wp-content/uploads/2010/08/feeding-google.jpg" alt="Google loves when we feed it products." width="300" height="237" />Upon launching the new <a  rel="nofollow" href="http://www.makeupmania.com">MakeUpMania.com</a> website, I discovered that the XML feed that Interspire generates for Google Base is not properly structured. There were many hits and misses before making the modifications necessary to get the feed&nbsp;approved.</p>
<h2>Fixing the generated&nbsp;feed</h2>
<p>Below are fixes to three issues that kept throwing errors on the Google Base side.<span&nbsp;id="more-1670"></span></p>
<h3>On months with more than 30 days, it causes an&nbsp;error.</h3>
<p>Google requires the <code>&lt;g:expiration_date&gt;</code> field to be fewer than 30 days in the future. Interspire&#8217;s PHP code generates a date one month in the future. Months can be longer than 30 days, thus a problem&nbsp;occurs.</p>
<p><strong>The fix:</strong><br />
In /store-root/admin/includes/classes/class.froogle.php, around line 87, find:<br />
<code>$expirationDate = isc_date("Y-m-d", strtotime('+1 month'));</code></p>
<p><strong>Replace with:</strong><br />
<code>$expirationDate = isc_date("Y-m-d", strtotime('+29 days'));</code></p>
<h3>Google only accepts unique products with&nbsp;descriptions.</h3>
<p>Interspire&#8217;s Google Base feed creates duplicates of the same product. Also, it exports all products, not just products with descriptions. Google requires product descriptions, and will disapprove a feed because of&nbsp;this.</p>
<p><strong>The fix:</strong><br />
In /store-root/admin/includes/classes/class.froogle.php, around line 72, find:</p>
<pre>WHERE
	p.prodvisible=1</pre>
<p><strong>Add below&nbsp;it:</strong></p>
<pre>	AND p.proddesc != ''
	GROUP BY p.productid</pre>
<p>This will only retrieve products with a description and will not show the same product&nbsp;twice.</p>
<h2>That should do&nbsp;it.</h2>
<p>Let me know if you are still encountering issues with your Interspire&nbsp;feed.</p>



<p>Related posts:<ol><li><a href='http://www.seodenver.com/custom-rss-feed-in-wordpress/' rel='bookmark' title='Permanent Link: How to Create a Custom RSS Feed in WordPress in 12 Lines of&nbsp;Code'>How to Create a Custom RSS Feed in WordPress in 12 Lines of&nbsp;Code</a></li>
<li><a href='http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Preview Hidden Products in Interspire Shopping&nbsp;Cart'>Preview Hidden Products in Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/improve-interspire-shopping-cart-search/' rel='bookmark' title='Permanent Link: Improve Interspire Shopping Cart Search with Smart&nbsp;Redirections'>Improve Interspire Shopping Cart Search with Smart&nbsp;Redirections</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DenverSEO?a=XyOsi7JUkIU:65ckGnqd6PQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=XyOsi7JUkIU:65ckGnqd6PQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=XyOsi7JUkIU:65ckGnqd6PQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=XyOsi7JUkIU:65ckGnqd6PQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=XyOsi7JUkIU:65ckGnqd6PQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=XyOsi7JUkIU:65ckGnqd6PQ:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DenverSEO/~4/XyOsi7JUkIU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seodenver.com/fixing-interspire-google-base-feed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.seodenver.com/fixing-interspire-google-base-feed/</feedburner:origLink></item>
		<item>
		<title>Interspire &amp; BigCommerce WordPress Plugin</title>
		<link>http://feedproxy.google.com/~r/DenverSEO/~3/s2MZfmbZfow/</link>
		<comments>http://www.seodenver.com/interspire-bigcommerce-wordpress/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 22:45:17 +0000</pubDate>
		<dc:creator>Zack Katz</dc:creator>
				<category><![CDATA[Interspire]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[BigCommerce]]></category>
		<category><![CDATA[Interspire Addon]]></category>
		<category><![CDATA[Interspire Plugin]]></category>
		<category><![CDATA[Interspire Shopping Cart]]></category>
		<category><![CDATA[Interspire WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WordPress Shopping Cart]]></category>

		<guid isPermaLink="false">http://www.seodenver.com/?p=1668</guid>
		<description><![CDATA[Integrate Interspire or BigCommerce with your WordPress&#160;website You want to spend your time writing the best content, not hunting for the link for the product you&#8217;re blogging about. This plugin is simple to set up, and powerful. If you use WordPress and Interspire or BigCommerce, it&#8217;s a must&#160;have. For for information, check out the plugin [...]


Related posts:<ol><li><a href='http://www.seodenver.com/seo-wordspinner/' rel='bookmark' title='Permanent Link: WordPress Content Spinner Plugin &#8211; SEO&nbsp;WordSpinner'>WordPress Content Spinner Plugin &#8211; SEO&nbsp;WordSpinner</a></li>
<li><a href='http://www.seodenver.com/mad-mimi/' rel='bookmark' title='Permanent Link: Mad Mimi Plugin for&nbsp;WordPress'>Mad Mimi Plugin for&nbsp;WordPress</a></li>
<li><a href='http://www.seodenver.com/incorporate-wordpress-with-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Incorporate WordPress with Interspire Shopping&nbsp;Cart'>Incorporate WordPress with Interspire Shopping&nbsp;Cart</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><h2>Integrate Interspire or BigCommerce with your WordPress&nbsp;website</h2>
<p>You want to spend your time writing the best content, not hunting for the link for the product you&#8217;re blogging about. This plugin is simple to set up, and powerful. If you use WordPress and Interspire or BigCommerce, it&#8217;s a must&nbsp;have.</p>
<p>For for information, check out the <strong><a  href="http://wordpress.org/extend/plugins/interspire-bigcommerce/">plugin information &amp; download page on WordPress.org</a><span&nbsp;id="more-1668"></span></strong></p>
<h3>Planned future&nbsp;updates:</h3>
<ul>
<li>Insert a product image (with an option to choose which&nbsp;size)</li>
<li>Improve shortcode by shortening&nbsp;length</li>
<li>Import product information into custom&nbsp;fields</li>
<li>Import all products into WordPress (as an Import module, using custom Post&nbsp;Types)</li>
<li>Integrate registration with the Interspire or BigCommerce APIs (add a new user as a&nbsp;customer)</li>
<li><strong>Leave a comment below for a requested&nbsp;feature!</strong></li>
</ul>
<h2>Questions? Requests? Comments?&nbsp;Bugs?</h2>
<p>Please leave your feedback below, and I&#8217;ll do my best to address any issues you have, and also to integrate any requests into the&nbsp;plugin.</p>
<p>Thanks, and&nbsp;enjoy!</p>


<p>Related posts:<ol><li><a href='http://www.seodenver.com/seo-wordspinner/' rel='bookmark' title='Permanent Link: WordPress Content Spinner Plugin &#8211; SEO&nbsp;WordSpinner'>WordPress Content Spinner Plugin &#8211; SEO&nbsp;WordSpinner</a></li>
<li><a href='http://www.seodenver.com/mad-mimi/' rel='bookmark' title='Permanent Link: Mad Mimi Plugin for&nbsp;WordPress'>Mad Mimi Plugin for&nbsp;WordPress</a></li>
<li><a href='http://www.seodenver.com/incorporate-wordpress-with-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Incorporate WordPress with Interspire Shopping&nbsp;Cart'>Incorporate WordPress with Interspire Shopping&nbsp;Cart</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DenverSEO?a=s2MZfmbZfow:KCzvr2lrJLc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=s2MZfmbZfow:KCzvr2lrJLc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=s2MZfmbZfow:KCzvr2lrJLc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=s2MZfmbZfow:KCzvr2lrJLc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=s2MZfmbZfow:KCzvr2lrJLc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=s2MZfmbZfow:KCzvr2lrJLc:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DenverSEO/~4/s2MZfmbZfow" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seodenver.com/interspire-bigcommerce-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.seodenver.com/interspire-bigcommerce-wordpress/</feedburner:origLink></item>
		<item>
		<title>Squidfingers.com Patterns – Download All the Patterns in One ZIP</title>
		<link>http://feedproxy.google.com/~r/DenverSEO/~3/eQjY6126EEk/</link>
		<comments>http://www.seodenver.com/squidfingers-zip-fil/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 18:30:21 +0000</pubDate>
		<dc:creator>Zack Katz</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[background images]]></category>
		<category><![CDATA[background patterns]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Patterns]]></category>
		<category><![CDATA[Squidfingers]]></category>

		<guid isPermaLink="false">http://www.seodenver.com/?p=1653</guid>
		<description><![CDATA[Download all the great patterns in one&#160;place. Squidfingers.com has the best source of free patterns out there, and has been used by thousands of web designers. Unfortunately, however, you have to download patterns one at a time. With 158 patterns, this can take a&#160;while. I have compiled all the Squidfingers.com patterns into one ZIP file. [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a  href="http://www.seodenver.com/squidfingers-zip-fil/" class="post_image_link" title="Permanent link to Squidfingers.com Patterns &#8211; Download All the Patterns in One&nbsp;ZIP"><img class="post_image alignnone" src="http://www.seodenver.com/wp-content/uploads/2010/06/Screen-shot-2010-06-26-at-12.27.07-PM-e1277576869679.jpg" width="500" height="100" alt="Squidfingers Patterns in one file" /></a>
</p><h2>Download all the great patterns in one&nbsp;place.</h2>
<p><a  rel="nofollow" href="http://www.squidfingers.com/">Squidfingers.com</a> has the best source of <a  rel="dofollow" href="http://www.squidfingers.com/patterns/">free patterns</a> out there, and has been used by thousands of web designers. Unfortunately, however, <strong>you have to download patterns one at a time</strong>. With 158 patterns, this can take a&nbsp;while.</p>
<p>I have compiled all the Squidfingers.com patterns into one ZIP file. Please&nbsp;remember</p>
<blockquote cite="http://www.squidfingers.com/patterns/"><p>Feel free to use any of these patterns on your own site. If you do decide use one, a credit link back to my site [<a  rel="nofollow" href="http://www.squidfingers.com/patterns/">http://www.squidfingers.com/patterns/</a>] is always greatly&nbsp;appreciated.</p></blockquote>
<p>Please continue to respect the terms of use for these patterns, and link to their site. It&#8217;s a great, free&nbsp;resource.</p>
Note: There is a file embedded within this post, please visit this post to download the file.


<p>No related posts.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DenverSEO?a=eQjY6126EEk:Np_q0WdaKCw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=eQjY6126EEk:Np_q0WdaKCw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=eQjY6126EEk:Np_q0WdaKCw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=eQjY6126EEk:Np_q0WdaKCw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=eQjY6126EEk:Np_q0WdaKCw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=eQjY6126EEk:Np_q0WdaKCw:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DenverSEO/~4/eQjY6126EEk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seodenver.com/squidfingers-zip-fil/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.seodenver.com/squidfingers-zip-fil/</feedburner:origLink></item>
		<item>
		<title>Preview Hidden Products in Interspire Shopping Cart</title>
		<link>http://feedproxy.google.com/~r/DenverSEO/~3/41dh2knjWwc/</link>
		<comments>http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 17:16:54 +0000</pubDate>
		<dc:creator>Zack Katz</dc:creator>
				<category><![CDATA[Interspire]]></category>
		<category><![CDATA[Edit Products]]></category>
		<category><![CDATA[Interspire Customization]]></category>
		<category><![CDATA[Interspire Development]]></category>
		<category><![CDATA[Interspire Mods]]></category>
		<category><![CDATA[Interspire Shopping Cart]]></category>
		<category><![CDATA[Interspire Shopping Cart Mod]]></category>

		<guid isPermaLink="false">http://www.seodenver.com/?p=1639</guid>
		<description><![CDATA[Interspire Shopping Cart admins need to preview products before they go&#160;live. Yep, we&#8217;re talking about Interspire once again today.&#160; The Interspire Shopping Cart doesn&#8217;t allow you to preview products that you are editing without making the product live in the store. This is plain silly; it&#8217;s vital for store owners to make sure their products [...]


Related posts:<ol><li><a href='http://www.seodenver.com/customers-also-bought-interspire-cart/' rel='bookmark' title='Permanent Link: Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart'>Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/interspire-shopping-cart-edit-product-link/' rel='bookmark' title='Permanent Link: How to Add an `Edit Product` Link for Interspire Shopping&nbsp;Cart'>How to Add an `Edit Product` Link for Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/improve-interspire-shopping-cart-search/' rel='bookmark' title='Permanent Link: Improve Interspire Shopping Cart Search with Smart&nbsp;Redirections'>Improve Interspire Shopping Cart Search with Smart&nbsp;Redirections</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a  href="http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/" class="post_image_link" title="Permanent link to Preview Hidden Products in Interspire Shopping&nbsp;Cart"><img class="post_image alignnone" src="http://www.seodenver.com/wp-content/uploads/2010/06/1137793_70886099-e1276535685647.jpg" width="500" height="328" alt="Preview Hidden Products in Interspire Shopping Cart" /></a>
</p><h3>Interspire Shopping Cart admins need to preview products before they go&nbsp;live.</h3>
<p>Yep, we&#8217;re talking about Interspire once again today.&nbsp;</p>
<p>The <a  rel="nofollow" href="http://www.interspire.com/240-2-3-1.html">Interspire Shopping Cart</a> doesn&#8217;t allow you to preview products that you are editing without making the product live in the store. This is plain silly; it&#8217;s vital for store owners to make sure their products pages look just as they expect when they make the product live in their store.  As it is currently (in Interspire 5.5.x), this is not&nbsp;possible.</p>
<p>All it takes is one minor change in code, and your world gets a lot easier.<span&nbsp;id="more-1639"></span></p>
<h3>Mod: Preview Products That are Not&nbsp;Visible</h3>
<p>Find the following code in <code>includes/classes/class.products.php</code> near line&nbsp;126:</p>
<pre>
$query = "
	SELECT p.*, FLOOR(prodratingtotal/prodnumratings) AS prodavgrating, pi.*, ".GetProdCustomerGroupPriceSQL().",
	(SELECT COUNT(fieldid) FROM [|PREFIX|]product_customfields WHERE fieldprodid=p.productid) AS numcustomfields,
	(SELECT COUNT(reviewid) FROM [|PREFIX|]reviews WHERE revstatus='1' AND revproductid=p.productid AND revstatus='1') AS numreviews,
	(SELECT brandname FROM [|PREFIX|]brands WHERE brandid=p.prodbrandid) AS prodbrandname,
	(SELECT COUNT(imageid) FROM [|PREFIX|]product_images WHERE imageprodid=p.productid) AS numimages,
	(SELECT COUNT(discountid) FROM [|PREFIX|]product_discounts WHERE discountprodid=p.productid) AS numbulkdiscounts
	FROM [|PREFIX|]products p
	LEFT JOIN [|PREFIX|]product_images pi ON (pi.imageisthumb=1 AND p.productid=pi.imageprodid)
	WHERE ".$productSQL." AND p.prodvisible='1'
";
</pre>
<p>Replace this code&nbsp;with:</p>
<pre>
$query = "
	SELECT p.*, FLOOR(prodratingtotal/prodnumratings) AS prodavgrating, pi.*, ".GetProdCustomerGroupPriceSQL().",
	(SELECT COUNT(fieldid) FROM [|PREFIX|]product_customfields WHERE fieldprodid=p.productid) AS numcustomfields,
	(SELECT COUNT(reviewid) FROM [|PREFIX|]reviews WHERE revstatus='1' AND revproductid=p.productid AND revstatus='1') AS numreviews,
	(SELECT brandname FROM [|PREFIX|]brands WHERE brandid=p.prodbrandid) AS prodbrandname,
	(SELECT COUNT(imageid) FROM [|PREFIX|]product_images WHERE imageprodid=p.productid) AS numimages,
	(SELECT COUNT(discountid) FROM [|PREFIX|]product_discounts WHERE discountprodid=p.productid) AS numbulkdiscounts
	FROM [|PREFIX|]products p
	LEFT JOIN [|PREFIX|]product_images pi ON (pi.imageisthumb=1 AND p.productid=pi.imageprodid)
	WHERE ".$productSQL."
";

	// Begin View Hidden Products Mod
	if(!isset($GLOBALS['ISC_CLASS_ADMIN_AUTH'])) { $GLOBALS['ISC_CLASS_ADMIN_AUTH'] = GetClass('ISC_ADMIN_AUTH'); }
	// If the user has product editing capability, they can see the product when it's not visible on live store.
	if(!$GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Edit_Products)) {
		$query .= " AND p.prodvisible='1'";
	}
	// End View Hidden Products Mod
</pre>
<h3>Now you can preview your&nbsp;products!</h3>
<p>Now, any user with the permission to edit products will be able to see products that are not visible to users in the&nbsp;store.</p>
<p>These types of small changes make the <a  rel="nofollow" href="http://www.interspire.com/240-2-3-1.html">Interspire Shopping Cart</a> an even better&nbsp;product.</p>
<p>Any other things you&#8217;d like to see made possible using Interspire Shopping&nbsp;Cart?</p>


<p>Related posts:<ol><li><a href='http://www.seodenver.com/customers-also-bought-interspire-cart/' rel='bookmark' title='Permanent Link: Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart'>Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/interspire-shopping-cart-edit-product-link/' rel='bookmark' title='Permanent Link: How to Add an `Edit Product` Link for Interspire Shopping&nbsp;Cart'>How to Add an `Edit Product` Link for Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/improve-interspire-shopping-cart-search/' rel='bookmark' title='Permanent Link: Improve Interspire Shopping Cart Search with Smart&nbsp;Redirections'>Improve Interspire Shopping Cart Search with Smart&nbsp;Redirections</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DenverSEO?a=41dh2knjWwc:_-VCtIBJZiA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=41dh2knjWwc:_-VCtIBJZiA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=41dh2knjWwc:_-VCtIBJZiA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=41dh2knjWwc:_-VCtIBJZiA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=41dh2knjWwc:_-VCtIBJZiA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=41dh2knjWwc:_-VCtIBJZiA:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DenverSEO/~4/41dh2knjWwc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/</feedburner:origLink></item>
		<item>
		<title>Add ‘Customers Also Purchased’ to the Cart Page on Interspire Shopping Cart</title>
		<link>http://feedproxy.google.com/~r/DenverSEO/~3/Nz7A_yg5kr8/</link>
		<comments>http://www.seodenver.com/customers-also-bought-interspire-cart/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 17:58:00 +0000</pubDate>
		<dc:creator>Zack Katz</dc:creator>
				<category><![CDATA[Interspire]]></category>
		<category><![CDATA[Interspire Customization]]></category>
		<category><![CDATA[Interspire Development]]></category>
		<category><![CDATA[Interspire Shopping Cart Mod]]></category>
		<category><![CDATA[Shopping Cart]]></category>
		<category><![CDATA[SideProductAlsoBought]]></category>

		<guid isPermaLink="false">http://www.seodenver.com/?p=1616</guid>
		<description><![CDATA[&#8220;Customers Also Purchased&#8221; should be on the cart page,&#160;right? The Interspire Shopping Cart has a &#8220;Customers Also Bought&#8221; feature, but for some reason, they didn&#8217;t think to make it functional on the cart page &#8212; one of the most useful (and obvious) places to have the feature. This modification will allow you to place the [...]


Related posts:<ol><li><a href='http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Preview Hidden Products in Interspire Shopping&nbsp;Cart'>Preview Hidden Products in Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/generate-css-body-classes-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Generate CSS Body Classes in Interspire Shopping&nbsp;Cart'>Generate CSS Body Classes in Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/interspire-shopping-cart-edit-product-link/' rel='bookmark' title='Permanent Link: How to Add an `Edit Product` Link for Interspire Shopping&nbsp;Cart'>How to Add an `Edit Product` Link for Interspire Shopping&nbsp;Cart</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p>
<h3>&#8220;Customers Also Purchased&#8221; should be on the cart page,&nbsp;right?</h3>
<p>The <a  rel="nofollow" href="http://www.interspire.com/240-2-3-1.html">Interspire Shopping Cart</a> has a &#8220;Customers Also Bought&#8221; feature, but for some reason, they didn&#8217;t think to make it functional on the cart page &#8212; one of the most useful (and obvious) places to have the feature. This modification will allow you to place the <code>SideProductAlsoBought</code> panel into your theme&#8217;s <code>cart.html</code> template, using the <code>%%Panel.SideProductAlsoBought%%</code> placeholder in the&nbsp;template.</p>
<h3>Goals of this&nbsp;mod</h3>
<ol>
<li>Keep the existing &#8220;Also Bought/Purchased&#8221; functionality working on product&nbsp;pages</li>
<li>Add &#8220;Also Bought/Purchased&#8221; functionality to the cart&nbsp;page</li>
<li>Give an option where it will only display &#8220;Also Bought&#8221; for the most recently added&nbsp;product</li>
</ol>
<p>With those goals in mind, I went about implementing a solution, which is below:<span&nbsp;id="more-1616"></span></p>
<h4>Find the following code in&nbsp;<code>/includes/display/SideProductAlsoBought.php</code>:</h4>
<pre>$query = "
	SELECT ordprodid
	FROM [|PREFIX|]order_products
	WHERE orderorderid IN (SELECT orderorderid FROM [|PREFIX|]order_products WHERE ordprodid='".$GLOBALS['ISC_CLASS_PRODUCT']-&gt;GetProductId()."') AND ordprodid != ".$GLOBALS['ISC_CLASS_PRODUCT']-&gt;GetProductId()."
	GROUP BY ordprodid
	ORDER BY COUNT(ordprodid) DESC
";</pre>
<h4>Add replace it with this&nbsp;code:</h4>
<pre>// Begin: Allow users also bought for recently added products
$OnlyRecentlyAdded = false; // make true to only show Also Bought for the product that was just added.

if(isset($GLOBALS['ISC_CLASS_CART'])) {
	if($OnlyRecentlyAdded &amp;&#038; isset($_REQUEST['suggest'])) {
		$cartProduct = $GLOBALS['ISC_CLASS_CART']-&gt;api-&gt;GetProductInCart($_REQUEST['suggest']);
		if(is_array($cartProduct)) {
			$this-&gt;newCartItem = $_REQUEST['suggest'];
			$productId = $cartProduct['product_id'];
		}

		$queryIds[0] = &quot; ordprodid='&quot;.$productId.&quot;'&quot;;
		$queryIds[1] = &quot; ordprodid !=&quot;.$productId;

	} else {
		$cartProducts = $GLOBALS['ISC_CLASS_CART']-&gt;api-&gt;GetProductsInCart();
		if(is_array($cartProducts)) {
			foreach($cartProducts as $product) {
				$i++;
				if(!in_array($product['product_id'], $productIds)) {
					$productIds[] = $product['product_id'];
					$queryIds[0] .= ' ordprodid=\''.$product['product_id'].'\'';
					$queryIds[1] .= ' ordprodid != '.$product['product_id'];
				}
				if(isset($cartProducts[$i]) &amp;&#038; !in_array($cartProducts[$i]['product_id'],$productIds)) {
					$queryIds[0] .= ' OR';
					$queryIds[1] .= ' AND';
				}
			}
		}
	}

} else {
	$queryIds[0] = &quot; ordprodid='&quot;.$GLOBALS['ISC_CLASS_PRODUCT']-&gt;GetProductId().&quot;'&quot;;
	$queryIds[1] = &quot; ordprodid !=&quot;.$GLOBALS['ISC_CLASS_PRODUCT']-&gt;GetProductId();
}

$query = &quot;
	SELECT ordprodid
	FROM [|PREFIX|]order_products
	WHERE orderorderid IN (SELECT orderorderid FROM [|PREFIX|]order_products WHERE&quot;.$queryIds[0].&quot;) AND&quot;.$queryIds[1].&quot;
	GROUP BY ordprodid
	ORDER BY COUNT(ordprodid) DESC
&quot;;
// End: Allow users also bought for recently added products</pre>
<p>This adds a little load time to the <code>cart.php</code> page, but it will help cross-sell&nbsp;products.</p>



<p>Related posts:<ol><li><a href='http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Preview Hidden Products in Interspire Shopping&nbsp;Cart'>Preview Hidden Products in Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/generate-css-body-classes-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Generate CSS Body Classes in Interspire Shopping&nbsp;Cart'>Generate CSS Body Classes in Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/interspire-shopping-cart-edit-product-link/' rel='bookmark' title='Permanent Link: How to Add an `Edit Product` Link for Interspire Shopping&nbsp;Cart'>How to Add an `Edit Product` Link for Interspire Shopping&nbsp;Cart</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DenverSEO?a=Nz7A_yg5kr8:zYPjMVP5V5Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=Nz7A_yg5kr8:zYPjMVP5V5Q:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=Nz7A_yg5kr8:zYPjMVP5V5Q:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=Nz7A_yg5kr8:zYPjMVP5V5Q:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=Nz7A_yg5kr8:zYPjMVP5V5Q:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=Nz7A_yg5kr8:zYPjMVP5V5Q:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DenverSEO/~4/Nz7A_yg5kr8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seodenver.com/customers-also-bought-interspire-cart/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.seodenver.com/customers-also-bought-interspire-cart/</feedburner:origLink></item>
		<item>
		<title>How to prevent your Google background image from fading in slowly.</title>
		<link>http://feedproxy.google.com/~r/DenverSEO/~3/CHizEN6YEcg/</link>
		<comments>http://www.seodenver.com/prevent-google-background-image-fading-slowly/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 17:29:58 +0000</pubDate>
		<dc:creator>Zack Katz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[load time]]></category>
		<category><![CDATA[User Stylesheets]]></category>

		<guid isPermaLink="false">http://www.seodenver.com/?p=1611</guid>
		<description><![CDATA[Google + slow loading = not worth having background&#160;images. In trying to keep their homepage as minimal as possible, in December Google switched to fading in the home page links only on an event: moving your mouse or tabbing out of the search box. This was fine when the home page was only white, as [...]


Related posts:<ol><li><a href='http://www.seodenver.com/googles-sprite-image-is-a-thing-of-beauty/' rel='bookmark' title='Permanent Link: Google&#039;s Sprite Image is a Thing of&nbsp;Beauty'>Google&#039;s Sprite Image is a Thing of&nbsp;Beauty</a></li>
<li><a href='http://www.seodenver.com/prevent-loading-wpdownloadmanagers-css-file/' rel='bookmark' title='Permanent Link: How to Prevent Loading WP-DownloadManager&#8217;s CSS&nbsp;File'>How to Prevent Loading WP-DownloadManager&#8217;s CSS&nbsp;File</a></li>
<li><a href='http://www.seodenver.com/seo-google-profiles-google-adds-nofollow-to-links/' rel='bookmark' title='Permanent Link: SEO Google Profiles &#8211; Google Adds NoFollow to&nbsp;Links'>SEO Google Profiles &#8211; Google Adds NoFollow to&nbsp;Links</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a  href="http://www.seodenver.com/prevent-google-background-image-fading-slowly/" class="post_image_link" title="Permanent link to How to prevent your Google background image from fading in&nbsp;slowly."><img class="post_image alignnone" src="http://www.seodenver.com/wp-content/uploads/2010/06/1281342_69909012-e1275931572733.jpg" width="500" height="216" alt="Google fade-in loads slowly. Real slowly." /></a>
</p><h3>Google + slow loading = not worth having background&nbsp;images.</h3>
<p>In trying to keep their homepage as minimal as possible, in December <a  rel="nofollow" href="http://googleblog.blogspot.com/2009/12/now-you-see-it-now-you-dont.html">Google switched to fading</a> in the home page links only on an event: moving your mouse or tabbing out of the search box. This was fine when the home page was only white, as it wasn&#8217;t taxing on computers to fade in on&nbsp;white.</p>
<p>Now that <a  rel="nofollow" href="http://googleblog.blogspot.com/2010/06/freeze-frame.html">Google allows for custom image backgrounds</a> (likely in response to how beautiful the <a  rel="nofollow" href="http://www.bing.com">Bing</a> backgrounds are), the fading in process can be tedious, even using blazing-fast Chrome. I can only imagine what users using Internet Explorer 6 are going through: fading in images takes a lot of work and&nbsp;time!</p>
<p>This was annoying me, so I made a quick modification to my <a  href="http://www.seodenver.com/seo-stylesheet/">SEO Stylesheet</a> (a Custom Stylesheet to display search results and no-follow nicely in Safari, IE and Firefox). This mod will make the image load solid, with no fading or resulting lag.<span&nbsp;id="more-1611"></span></p>
<h3>Add to your User Stylesheet CSS&nbsp;file:</h3>
<pre lang="css">#fpdi,#cpBackgroundImg &#123; opacity: 1.0!important; &#125;</pre>
<p>Once the image loads, it will be displayed as solid, and Google will be fast-loading&nbsp;again.</p>
<p>For more information on user stylesheets, check out the <a  href="http://www.seodenver.com/seo-stylesheet/">SEO Stylesheets&nbsp;post</a>.</p>
<h3>To prevent the home page links from being&nbsp;hidden&#8230;</h3>
<p>If you want to prevent the new &#8220;fade-in&#8221; look, use the following code in your user stylesheet&nbsp;instead:</p>
<pre>#ghead *, span#footer center#fctr, #fpdi,#cpBackgroundImg &#123; opacity: 1.0!important; &#125;</pre>
<h3>Updated</h3>
<p>I realized that when logged out and logged in, Google changes the ID of the background image. I&#8217;ve updated to code from <code>#cpBackgroundImg</code> to <code>#fpdi,#cpBackgroundImg</code> to reflect&nbsp;that.</p>


<p>Related posts:<ol><li><a href='http://www.seodenver.com/googles-sprite-image-is-a-thing-of-beauty/' rel='bookmark' title='Permanent Link: Google&#039;s Sprite Image is a Thing of&nbsp;Beauty'>Google&#039;s Sprite Image is a Thing of&nbsp;Beauty</a></li>
<li><a href='http://www.seodenver.com/prevent-loading-wpdownloadmanagers-css-file/' rel='bookmark' title='Permanent Link: How to Prevent Loading WP-DownloadManager&#8217;s CSS&nbsp;File'>How to Prevent Loading WP-DownloadManager&#8217;s CSS&nbsp;File</a></li>
<li><a href='http://www.seodenver.com/seo-google-profiles-google-adds-nofollow-to-links/' rel='bookmark' title='Permanent Link: SEO Google Profiles &#8211; Google Adds NoFollow to&nbsp;Links'>SEO Google Profiles &#8211; Google Adds NoFollow to&nbsp;Links</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DenverSEO?a=CHizEN6YEcg:X0bEGXGZt40:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=CHizEN6YEcg:X0bEGXGZt40:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=CHizEN6YEcg:X0bEGXGZt40:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=CHizEN6YEcg:X0bEGXGZt40:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=CHizEN6YEcg:X0bEGXGZt40:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=CHizEN6YEcg:X0bEGXGZt40:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DenverSEO/~4/CHizEN6YEcg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seodenver.com/prevent-google-background-image-fading-slowly/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.seodenver.com/prevent-google-background-image-fading-slowly/</feedburner:origLink></item>
		<item>
		<title>Generate CSS Body Classes in Interspire Shopping Cart</title>
		<link>http://feedproxy.google.com/~r/DenverSEO/~3/qGHdh8TlJpc/</link>
		<comments>http://www.seodenver.com/generate-css-body-classes-interspire-shopping-cart/#comments</comments>
		<pubDate>Thu, 20 May 2010 16:18:10 +0000</pubDate>
		<dc:creator>Zack Katz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Interspire]]></category>
		<category><![CDATA[body_class]]></category>
		<category><![CDATA[Interspire Customization]]></category>
		<category><![CDATA[Interspire Development]]></category>
		<category><![CDATA[Interspire Shopping Cart]]></category>
		<category><![CDATA[Interspire Shopping Cart Mod]]></category>

		<guid isPermaLink="false">http://www.seodenver.com/?p=1599</guid>
		<description><![CDATA[If you&#8217;re used to WordPress&#8217; body_class() function, this post for&#160;you. Working with WordPress, it&#8217;s easy to get accustomed to some of its nice features, like the body_class() function introduced in WP 2.8. When working with Interspire Shopping Cart, I wanted the same level of information added to the page&#8217;s &#60;body&#62; tag. Let&#8217;s do this in [...]


Related posts:<ol><li><a href='http://www.seodenver.com/customers-also-bought-interspire-cart/' rel='bookmark' title='Permanent Link: Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart'>Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/interspire-shopping-cart-edit-product-link/' rel='bookmark' title='Permanent Link: How to Add an `Edit Product` Link for Interspire Shopping&nbsp;Cart'>How to Add an `Edit Product` Link for Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Preview Hidden Products in Interspire Shopping&nbsp;Cart'>Preview Hidden Products in Interspire Shopping&nbsp;Cart</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a  href="http://www.seodenver.com/generate-css-body-classes-interspire-shopping-cart/" class="post_image_link" title="Permanent link to Generate CSS Body Classes in Interspire Shopping&nbsp;Cart"><img class="post_image alignnone" src="http://www.seodenver.com/wp-content/uploads/2010/05/63758_9746-e1274371823859.jpg" width="500" height="231" alt="Interspire CSS Body Class" /></a>
</p>
<h2>If you&#8217;re used to WordPress&#8217; <code>body_class()</code> function, this post for&nbsp;you.</h2>
<p>Working with WordPress, it&#8217;s easy to get accustomed to some of its nice features, like the <a  rel="nofollow" href="http://codex.wordpress.org/Template_Tags/body_class">body_class() function</a> introduced in WP 2.8. When working with <a  rel="nofollow" href="http://www.interspire.com/240-2-1-7.html">Interspire Shopping Cart</a>, I wanted the same level of information added to the page&#8217;s <code>&lt;body&gt;</code> tag.<span&nbsp;id="more-1599"></span></p>
<h2>Let&#8217;s do this in three&nbsp;stages:</h2>
<h3>1. Generate the body&nbsp;class</h3>
<p>Starting from Dave Beck&#8217;s great <a  rel="nofollow" href="http://www.shoppingcartstrategies.com/interspire/seo-index-module/">canonical link module</a>, I modified the code to create a list of classes based on what page is being viewed. This provides a lot of great&nbsp;information:</p>
<ul>
<li>Brand
<ul>
<li>Brand&nbsp;ID</li>
<li>Brand&nbsp;name</li>
</ul>
</li>
<li>Category
<ul>
<li>Category&nbsp;ID</li>
<li>Category&nbsp;Name</li>
</ul>
</li>
<li>Home</li>
<li>Page
<ul>
<li>Page&nbsp;ID</li>
<li>Page&nbsp;Name</li>
</ul>
</li>
<li>Sorted/Filtered/Paginated
<ul>
<li>Shop by&nbsp;Price</li>
<li>Tag</li>
<li>Sort&nbsp;type</li>
<li>Page&nbsp;number</li>
</ul>
</li>
<li>Checkout/Account
<ul>
<li>Cart</li>
<li>Gift&nbsp;Certificate</li>
<li>Login</li>
<li>Search</li>
<li>SSL</li>
<li>Wishlist</li>
</ul>
</li>
</ul>
<p>This is very helpful stuff for custom styling using&nbsp;CSS.</p>
<h4>Add to the bottom of the <code>/lib/general.php</code>&nbsp;file:</h4>
<pre lang="php">function BodyClass() {
	$bodyClass = array();

	if(isset($GLOBALS['ISC_CLASS_BRANDS'])) {
		$bodyClass[] = 'brand';
		$bodyClass[] = "brandID-".$GLOBALS['ISC_CLASS_BRANDS']-&gt;GetId();
		$bodyClass[] = "brandName-".$GLOBALS['ISC_CLASS_BRANDS']-&gt;GetBrandName();
	}

	if(isset($GLOBALS['ISC_CLASS_CATEGORY']) &amp;&amp; isset($GLOBALS['CatId'])) {
		$bodyClass[] = 'category';
		$bodyClass[] = "catID-{$GLOBALS['CatId']}";
		$bodyClass[] = "catName-".$GLOBALS['ISC_CLASS_CATEGORY']-&gt;GetName();
	}

	if(isset($GLOBALS['ISC_CLASS_INDEX'])) {
		$bodyClass[] = "home";
	}

	if(isset($GLOBALS['ISC_CLASS_PRODUCT']) &amp;&amp; $GLOBALS['ISC_CLASS_PRODUCT']-&gt;GetProductId() &gt; 0) {
		$bodyClass[] = 'product';
		$bodyClass[] = "productID-".$GLOBALS['ISC_CLASS_PRODUCT']-&gt;GetProductId();
		$bodyClass[] = "productName-".$GLOBALS['ISC_CLASS_PRODUCT']-&gt;GetProductName();
	}

	if(isset($GLOBALS['ISC_CLASS_PAGE']) &amp;&amp; !isset($GLOBALS['ISC_CLASS_INDEX']) &amp;&amp; $GLOBALS['ISC_CLASS_PAGE']-&gt;GetPageId() &gt; 0) {
		$bodyClass[] = 'page';
		$bodyClass[] = "pageID-".$GLOBALS['ISC_CLASS_PAGE']-&gt;GetPageId();
		$bodyClass[] = "pageName-".$GLOBALS['ISC_CLASS_PAGE']-&gt;GetPageTitle();
	}

	if(isset($GLOBALS['PriceMin']) &amp;&amp; isset($GLOBALS['PriceMax'])) {
		$bodyClass[] = 'price';
		$bodyClass[] = "shopByPrice";
	}

	if(isset($GLOBALS['ISC_CLASS_TAGS'])) {
		$bodyClass[] = 'tag';
		$bodyClass[] = "productTags";
	}

	if(isset($_REQUEST['page']) &amp;&amp; !empty($_REQUEST['page'])) {
		$bodyClass[] = 'paginated';
		$bodyClass[] = 'page'.(int)$_REQUEST['page'];
	}

	if(isset($_REQUEST['sort']) &amp;&amp; !empty($_REQUEST['sort'])) {
		$bodyClass[] = 'sort';
		$bodyClass[] = 'sort'.ucfirst($_REQUEST['sort']);
	}

	$current_url = $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];

		$noindex_url = str_replace("http://", "", $GLOBALS['ShopPathNormal'].'/cart.php');
		if($current_url == $noindex_url) {
			$bodyClass[] = "cart";
		}

		$noindex_url = str_replace("http://", "", $GLOBALS['ShopPathNormal'].'/giftcertificates.php');
		if($current_url == $noindex_url) {
			$bodyClass[] = "giftCertificates";
		}

		$noindex_url = str_replace("http://", "", $GLOBALS['ShopPathNormal'].'/login.php');
		if($current_url == $noindex_url) {
			$bodyClass[] = "login";
		}

		$noindex_url = str_replace("http://", "", $GLOBALS['ShopPathNormal'].'/search.php');
		$split_url = explode('?', $current_url);
		$split_url = $split_url[0];
		if($split_url == $noindex_url) {
			$bodyClass[] = "search";
		}

		$noindex_url = str_replace("http://", "", $GLOBALS['ShopPathNormal'].'/login.php?from=wishlist.php%3F');
		if($current_url == $noindex_url) {
			$bodyClass[] = "wishList";
		}

		if(($GLOBALS['ISC_CFG']["UseSSL"] &gt;= 1) &amp;&amp; ($_SERVER['HTTPS'] == 'on')) {
			$bodyClass[] = "ssl";
		}
	$i = 0;
	foreach($bodyClass as $class) {
		$class = preg_replace('/\%[0-9]{2}/', '', $class); //mixed pattern, mixed replacement, mixed subject [, int limit [, int &amp;count]])
		$class = str_replace(array('+','\'',' ','&lt;','&gt;','&amp;'),'', $class);
		$bodyClass[$i] = $class;
		$i++;
	}
	$bodyClass = implode(' ', $bodyClass);

	// WordPress integration
	if(function_exists('get_body_class')) {
		$wpBodyClass = get_body_class();
		$wpBodyClass = implode(' ', $wpBodyClass);
		$wpBodyClass = str_replace('home', '', $wpBodyClass);
		$wpBodyClass = trim($wpBodyClass);
		if(!empty($WPBodyClass)) {
			$bodyClass .= ' blog wordpress '.$wpBodyClass;
		}
	}

	return $bodyClass;
}</pre>
<h3>2. Generate the global variable&nbsp;`BodyClass`</h3>
<p>Since code placed in <code>general.php</code> is available to every script in the cart, we can use the result of the function in the script that generates the website&#8217;s <code>&lt;head&gt;</code>, <code>HTMLHead.php</code>. We&#8217;re going to create a global variable named <code>BodyClass</code>, and add it to our&nbsp;template.</p>
<h4>Add to the bottom of the <code>/includes/display/HTMLHead.php</code>&nbsp;file:</h4>
<pre>$GLOBALS['BodyClass'] = ' class="'.BodyClass().'"';</pre>
<h3>3. Add to your&nbsp;template</h3>
<p>Now the not-terribly-fun part: in every template file, find <code>&lt;body&gt;</code> and replace with <code>&lt;body%%GLOBAL_BodyClass%%&gt;</code> &#8212; you may need to go into the <code>__master</code> folder to do this, depending on your&nbsp;setup.</p>
<p>This will generate CSS classes like this: <code>&lt;body class="category catID-123 catName-Example"&gt;</code>, and will give you microscopic control over your template&#8217;s&nbsp;styling.</p>
<h2>How would you do&nbsp;it?</h2>
<p>Manually adding the `BodyClass` variable into each template is cumbersome, but the only other way to do it is to use ob_start() and process the page before it&#8217;s displayed to the browser, and that would add load time. Any other ideas on how to achieve&nbsp;this?</p>


<p>Related posts:<ol><li><a href='http://www.seodenver.com/customers-also-bought-interspire-cart/' rel='bookmark' title='Permanent Link: Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart'>Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/interspire-shopping-cart-edit-product-link/' rel='bookmark' title='Permanent Link: How to Add an `Edit Product` Link for Interspire Shopping&nbsp;Cart'>How to Add an `Edit Product` Link for Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Preview Hidden Products in Interspire Shopping&nbsp;Cart'>Preview Hidden Products in Interspire Shopping&nbsp;Cart</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DenverSEO?a=qGHdh8TlJpc:1pKyOw4EUHc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=qGHdh8TlJpc:1pKyOw4EUHc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=qGHdh8TlJpc:1pKyOw4EUHc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=qGHdh8TlJpc:1pKyOw4EUHc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=qGHdh8TlJpc:1pKyOw4EUHc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=qGHdh8TlJpc:1pKyOw4EUHc:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DenverSEO/~4/qGHdh8TlJpc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seodenver.com/generate-css-body-classes-interspire-shopping-cart/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.seodenver.com/generate-css-body-classes-interspire-shopping-cart/</feedburner:origLink></item>
		<item>
		<title>Improve Interspire Shopping Cart Search with Smart Redirections</title>
		<link>http://feedproxy.google.com/~r/DenverSEO/~3/bbwggdZ2ajE/</link>
		<comments>http://www.seodenver.com/improve-interspire-shopping-cart-search/#comments</comments>
		<pubDate>Fri, 07 May 2010 16:55:25 +0000</pubDate>
		<dc:creator>Zack Katz</dc:creator>
				<category><![CDATA[Interspire]]></category>
		<category><![CDATA[Interspire Customization]]></category>
		<category><![CDATA[Interspire Development]]></category>
		<category><![CDATA[Interspire Shopping Cart]]></category>
		<category><![CDATA[Interspire Shopping Cart Mod]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[Search Results]]></category>

		<guid isPermaLink="false">http://www.seodenver.com/?p=1581</guid>
		<description><![CDATA[Good search results are&#160;magical I am always impressed when a website&#8217;s search goes where I want and finds what I expect it to. When trying to find a specific product by SKU in Interspire, you will be presented with a search result that shows the product you&#8217;re looking for first. But this is not good [...]


Related posts:<ol><li><a href='http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Preview Hidden Products in Interspire Shopping&nbsp;Cart'>Preview Hidden Products in Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/customers-also-bought-interspire-cart/' rel='bookmark' title='Permanent Link: Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart'>Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/interspire-shopping-cart-brands-dropdown/' rel='bookmark' title='Permanent Link: Interspire Shopping Cart &#8212; Add a Brands Drop-Down&nbsp;Menu'>Interspire Shopping Cart &#8212; Add a Brands Drop-Down&nbsp;Menu</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p>
<h2>Good search results are&nbsp;magical</h2>
<p>I am always impressed when a website&#8217;s search goes where I want and finds what I expect it to. When trying to find a specific product by SKU in Interspire, you will be presented with a search result that shows the product you&#8217;re looking for first. But <strong>this is not good enough</strong>, as it adds an extra click in the&nbsp;process.</p>
<p>If your users are specific enough to type in an exact product name, brand name, product SKU or product ID, you better get them to the product they want, right away &#8212; they&#8217;re likely to buy!  I don&#8217;t want to show them a search results page, I want them to see the product or brand page itself.<span&nbsp;id="more-1581"></span></p>
<h3>If it&#8217;s a damn good match, send&#8217;em&nbsp;along!</h3>
<p>This script will redirect users if there&#8217;s a good reason&nbsp;to.</p>
<ul>
<li><strong>Products</strong>
<ul>
<li>Exact product name match&nbsp;(case-insensitive)</li>
<li>Exact product SKU&nbsp;match</li>
<li>Exact product ID&nbsp;match</li>
<li>&#8220;Good&#8217;nuf&#8221; product match: if there&#8217;s only one product result, and that result has a relevance score of 75 or&nbsp;above</li>
</ul>
</li>
<li><strong>Brands</strong>
<ul>
<li> Exact brand name match&nbsp;(case-insensitive)</li>
</ul>
</li>
</ul>
<h3>Installation of the Smart Search Redirection&nbsp;mod</h3>
<p>Open the <code>class.products.php</code>, found at <code>includes/classes/class.products.php</code>. Find the <code>searchForItems()</code> function (near line 1160), and <strong>above <code>return $products;</code></strong> at the end of the function, insert the following&nbsp;code:</p>
<pre lang="php">/*
 * Begin Smart Search Redirection mod
 */
$redirect = false;

// Product redirect
foreach($products as $row) {
	if(	trim(strtolower($searchQuery['search_query'])) == trim(strtolower($row['prodcode'])) ||  // Query = SKU
		trim(strtolower($searchQuery['search_query'])) == trim(strtolower($row['productid'])) || // Query = Product ID
		trim(strtolower($searchQuery['search_query'])) == trim(strtolower($row['prodname'])) || // Query = Product Name
		$row['score'] &gt; 75 &amp;&amp; sizeof($products) == 1 // Relevance is good, and there's only one product result
	) {
		$redirect = ProdLink($row["prodname"]);
	}
}

if(empty($redirect)) {
	// Generate list of brand names
	foreach($products as $p) { $brands[] = $p['prodbrandid']; }
	$brandQuery = '"'.implode('" OR brandid="', array_unique($brands)).'"'; // Group brands by ID, generate query string
	$query = sprintf("select brandname from [|PREFIX|]brands where brandid=$brandQuery", $p['prodbrandid']);
	$result = $GLOBALS['ISC_CLASS_DB']-&gt;Query($query);

	// Brand name match redirect
	while($brand = $GLOBALS['ISC_CLASS_DB']-&gt;Fetch($result)) {
		if(trim(strtolower($searchQuery['search_query'])) == trim(strtolower($brand['brandname'])) &amp;&amp; $redirect === false) {
			$redirect = BrandLink($brand["brandname"]);
		}
	}
}

// If there's a redirection found, do it up!
if(!empty($redirect)) {
	ob_end_clean();
	header("Location: $redirect");
	die();
}
/*
 * End Smart Search Redirection mod
 */</pre>
<h2>Ahh, nothing like better&nbsp;search!</h2>
<p>Now that your search is taking users where they want to go, your user satisfaction should go up, and hopefully your sales and conversion&nbsp;rate!</p>
<p>Let me know if you have improvements to this code, and what your experience has been with&nbsp;it.</p>


<p>Related posts:<ol><li><a href='http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Preview Hidden Products in Interspire Shopping&nbsp;Cart'>Preview Hidden Products in Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/customers-also-bought-interspire-cart/' rel='bookmark' title='Permanent Link: Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart'>Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/interspire-shopping-cart-brands-dropdown/' rel='bookmark' title='Permanent Link: Interspire Shopping Cart &#8212; Add a Brands Drop-Down&nbsp;Menu'>Interspire Shopping Cart &#8212; Add a Brands Drop-Down&nbsp;Menu</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DenverSEO?a=bbwggdZ2ajE:tIy8o94hF6U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=bbwggdZ2ajE:tIy8o94hF6U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=bbwggdZ2ajE:tIy8o94hF6U:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=bbwggdZ2ajE:tIy8o94hF6U:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=bbwggdZ2ajE:tIy8o94hF6U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=bbwggdZ2ajE:tIy8o94hF6U:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DenverSEO/~4/bbwggdZ2ajE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seodenver.com/improve-interspire-shopping-cart-search/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.seodenver.com/improve-interspire-shopping-cart-search/</feedburner:origLink></item>
		<item>
		<title>How to Add an `Edit Product` Link for Interspire Shopping Cart</title>
		<link>http://feedproxy.google.com/~r/DenverSEO/~3/A7KUOs72sqo/</link>
		<comments>http://www.seodenver.com/interspire-shopping-cart-edit-product-link/#comments</comments>
		<pubDate>Thu, 06 May 2010 19:54:13 +0000</pubDate>
		<dc:creator>Zack Katz</dc:creator>
				<category><![CDATA[Interspire]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Interspire Development]]></category>
		<category><![CDATA[Interspire Shopping Cart]]></category>
		<category><![CDATA[Interspire Shopping Cart Mod]]></category>

		<guid isPermaLink="false">http://www.seodenver.com/?p=1562</guid>
		<description><![CDATA[Why can&#8217;t I just click a link to edit the product I&#8217;m&#160;viewing? Interspire, I love ya, but the Interspire Shopping Cart has some silly omissions. Like a simple &#8220;Edit Product&#8221; link if you&#8217;re logged in as an administrator. Instead, you have to go to the backend, search for the product, then edit it&#8230;which takes a [...]


Related posts:<ol><li><a href='http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Preview Hidden Products in Interspire Shopping&nbsp;Cart'>Preview Hidden Products in Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/customers-also-bought-interspire-cart/' rel='bookmark' title='Permanent Link: Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart'>Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/improve-interspire-shopping-cart-search/' rel='bookmark' title='Permanent Link: Improve Interspire Shopping Cart Search with Smart&nbsp;Redirections'>Improve Interspire Shopping Cart Search with Smart&nbsp;Redirections</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p><a  rel="external" href="http://www.interspire.com/240-2-1-7.html" target="_blank"><img border="0" src="http://www.seodenver.com/wp-content/uploads/2010/05/Interspire.jpg" width="468"&nbsp;height="60"></a></p>
<h2>Why can&#8217;t I just click a link to edit the product I&#8217;m&nbsp;viewing?</h2>
<p>Interspire, I love ya, but the <a  rel="nofollow" href="http://www.interspire.com/240-2-3-1.html">Interspire Shopping Cart</a> has some silly omissions. Like a simple &#8220;Edit Product&#8221; link if you&#8217;re logged in as an administrator. Instead, you have to go to the backend, search for the product, then edit it&#8230;which takes a solid 20&nbsp;seconds.</p>
<p>Well, I got tired of that, so here&#8217;s a way to <strong>generate a proper Edit Product link</strong>.<span&nbsp;id="more-1562"></span></p>
<h2>Part 1: Generate the&nbsp;link</h2>
<p>In&nbsp;<code>includes/display/ProductDetails.php</code>:</p>
<p>Find <code>$this->SetProductVariations();</code>. Add this in a line below&nbsp;it:</p>
<pre lang="php">$this->SetEditProductLink();</pre>
<p>Add this following code just before the last, closing curly bracket in the file&nbsp;<code>}</code></p>
<pre lang="php">
/**
 * Create a link to allow users with permission to edit products from the products page
 */
public function SetEditProductLink()
{
	$GLOBALS['EditProductLink'] = '';
	if(!isset($GLOBALS['ISC_CLASS_ADMIN_AUTH'])) { $GLOBALS['ISC_CLASS_ADMIN_AUTH'] = GetClass('ISC_ADMIN_AUTH'); }
	if($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Edit_Products)) {
		$GLOBALS['EditProductLink'] = sprintf('&lt;a title=&quot;%3$s&quot; class=&quot;Action&quot; href=&quot;'.$GLOBALS['ShopPath'].'/admin/index.php?ToDo=editProduct&amp;productId=%2$d&quot;&gt;%1$s&lt;/a&gt;', 'Edit Product', $GLOBALS['ProductId'], &quot;Edit product &lsquo;{$GLOBALS['ProductName']}&rsquo;&quot;);
	}
}
</pre>
<h2>Part 2: Place the&nbsp;link</h2>
<p>Now the link will be generated in the global variable <code>EditProductLink</code> in your template&#8217;s ProductDetails&nbsp;panel.</p>
<ul>
<li>Go to your&nbsp;template</li>
<li>Find&nbsp;<code>Panels/ProductDetails.html</code></li>
<li>Add <code>%%GLOBAL_EditProductLink%%</code> to your template where you want the link. I like it after the add to cart button&nbsp;(<code>%%SNIPPET_ProductAddToCart%%</code>).</li>
<li>You&#8217;re all&nbsp;set!</li>
</ul>
<h3>Lots of time saved by&nbsp;all&#8230;</h3>
<p>Hopefully this helps save you some frustration while polishing your Interspire&nbsp;store.</p>



<p>Related posts:<ol><li><a href='http://www.seodenver.com/preview-hidden-products-in-interspire-shopping-cart/' rel='bookmark' title='Permanent Link: Preview Hidden Products in Interspire Shopping&nbsp;Cart'>Preview Hidden Products in Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/customers-also-bought-interspire-cart/' rel='bookmark' title='Permanent Link: Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart'>Add &#8216;Customers Also Purchased&#8217; to the Cart Page on Interspire Shopping&nbsp;Cart</a></li>
<li><a href='http://www.seodenver.com/improve-interspire-shopping-cart-search/' rel='bookmark' title='Permanent Link: Improve Interspire Shopping Cart Search with Smart&nbsp;Redirections'>Improve Interspire Shopping Cart Search with Smart&nbsp;Redirections</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DenverSEO?a=A7KUOs72sqo:zPBLjuEMRoY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=A7KUOs72sqo:zPBLjuEMRoY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=A7KUOs72sqo:zPBLjuEMRoY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=A7KUOs72sqo:zPBLjuEMRoY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=A7KUOs72sqo:zPBLjuEMRoY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=A7KUOs72sqo:zPBLjuEMRoY:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DenverSEO/~4/A7KUOs72sqo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seodenver.com/interspire-shopping-cart-edit-product-link/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.seodenver.com/interspire-shopping-cart-edit-product-link/</feedburner:origLink></item>
		<item>
		<title>Auto-Optimize WordPress Database without a Plugin</title>
		<link>http://feedproxy.google.com/~r/DenverSEO/~3/-PfbtB-y-H0/</link>
		<comments>http://www.seodenver.com/auto-optimize-wordpress-database/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 19:17:41 +0000</pubDate>
		<dc:creator>Zack Katz</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Functions.php]]></category>
		<category><![CDATA[load time]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Speed]]></category>
		<category><![CDATA[WordPress Development]]></category>
		<category><![CDATA[WordPress Functions]]></category>
		<category><![CDATA[WP-DBManager]]></category>

		<guid isPermaLink="false">http://www.seodenver.com/?p=1539</guid>
		<description><![CDATA[These horses are somehow not cool. Speeding up your blog&#160;is. I am working on a WordPress project that has a pretty heavy database, and I want to be able to auto-optimize the WordPress database. Even though they are integrating this functionality into WordPress 3.0, I want it now, and without having to use a plugin [...]


Related posts:<ol><li><a href='http://www.seodenver.com/how-to-tell-if-your-wordpress-widget-is-activated/' rel='bookmark' title='Permanent Link: How to tell if your WordPress Plugin or Widget is Activated in&nbsp;WordPress'>How to tell if your WordPress Plugin or Widget is Activated in&nbsp;WordPress</a></li>
<li><a href='http://www.seodenver.com/get-images-wordpress-functions/' rel='bookmark' title='Permanent Link: Get Adjacent Images &#8211; More WordPress&nbsp;Functions'>Get Adjacent Images &#8211; More WordPress&nbsp;Functions</a></li>
<li><a href='http://www.seodenver.com/mad-mimi/' rel='bookmark' title='Permanent Link: Mad Mimi Plugin for&nbsp;WordPress'>Mad Mimi Plugin for&nbsp;WordPress</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a  href="http://www.seodenver.com/auto-optimize-wordpress-database/" class="post_image_link" title="Permanent link to Auto-Optimize WordPress Database without a&nbsp;Plugin"><img class="post_image alignnone" src="http://www.seodenver.com/wp-content/uploads/2010/03/1245541_11014135-e1268334876986.jpg" width="500" height="132" alt="Improve the speed of your blog, just like these running horses are faster because they bleached their hair." /></a>
</p><h3>These horses are somehow not cool. Speeding up your blog&nbsp;is.</h3>
<p>I am working on a WordPress project that has a pretty heavy database, and I want to be able to auto-optimize the WordPress database. Even though they are <a  rel="nofollow" href="http://core.trac.wordpress.org/browser/trunk/wp-admin/maint/repair.php">integrating this functionality into WordPress 3.0</a>, I want it now, and without having to use a plugin (I have had some issues with <a  href="http://wordpress.org/extend/plugins/wp-dbmanager/">WP-DBManager</a> configuring properly on a few&nbsp;sites).</p>
<p>If you add the following code to your functions.php file, it will automatically optimize your WordPress database every 6 hours, keeping it squeaky clean.<span&nbsp;id="more-1539"></span></p>
<h2>Add to your theme&#8217;s&nbsp;functions.php</h2>
<pre lang="php">function kws_optimize_tables() {
	$debug = false;

	// Check to see if the lastOptimized option has been set (it's just a timestamp)
	$lastOptimized = get_option('lastOptimized');

	// If it's been longer than 1 week since it was last optimized, do it up!
	if(!$lastOptimized || $lastOptimized &lt; strtotime("-1 week", time())) { 

		// Update the lastOptimized option to the current time
		update_option('lastOptimized', time());

		// Do some MySQLing to optimize each table in the WordPress DB
		$query = 'SHOW TABLES FROM '. DB_NAME;
		$result = mysql_query($query);
		if (!$result &amp;&amp; $debug) {
			print('Invalid query: ' . mysql_error());
		}
		$num_rows = mysql_num_rows($result);
		if ($num_rows){
			 while ($row = mysql_fetch_row($result)){
		         $query = 'OPTIMIZE TABLE '.$row[0];
				 $result = mysql_query($query);
				 if (!$result &amp;&amp; $debug) {
				    print('Invalid query: ' . mysql_error());
				}
			}
		}
	}
}
add_action('init', 'kws_optimize_tables');</pre>
<p>Just wanted to share some quick code. If you want to change the frequency of the optimization, change &#8220;1 week&#8221; to whatever <a  rel="nofollow" href="http://php.net/manual/en/function.strtotime.php">PHP strtotime()</a> variable you want. Make sure to keep the minus sign in there&nbsp;though!</p>


<p>Related posts:<ol><li><a href='http://www.seodenver.com/how-to-tell-if-your-wordpress-widget-is-activated/' rel='bookmark' title='Permanent Link: How to tell if your WordPress Plugin or Widget is Activated in&nbsp;WordPress'>How to tell if your WordPress Plugin or Widget is Activated in&nbsp;WordPress</a></li>
<li><a href='http://www.seodenver.com/get-images-wordpress-functions/' rel='bookmark' title='Permanent Link: Get Adjacent Images &#8211; More WordPress&nbsp;Functions'>Get Adjacent Images &#8211; More WordPress&nbsp;Functions</a></li>
<li><a href='http://www.seodenver.com/mad-mimi/' rel='bookmark' title='Permanent Link: Mad Mimi Plugin for&nbsp;WordPress'>Mad Mimi Plugin for&nbsp;WordPress</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DenverSEO?a=-PfbtB-y-H0:lBKWtK02yq8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=-PfbtB-y-H0:lBKWtK02yq8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=-PfbtB-y-H0:lBKWtK02yq8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=-PfbtB-y-H0:lBKWtK02yq8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/DenverSEO?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DenverSEO?a=-PfbtB-y-H0:lBKWtK02yq8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DenverSEO?i=-PfbtB-y-H0:lBKWtK02yq8:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DenverSEO/~4/-PfbtB-y-H0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seodenver.com/auto-optimize-wordpress-database/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.seodenver.com/auto-optimize-wordpress-database/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 2.171 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-08-17 20:07:25 -->
