<?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>Web Programming Answers &#187; Zen Cart</title>
	<atom:link href="http://www.bogartcomputing.com/web-programming-answers/category/zen-cart/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bogartcomputing.com/web-programming-answers</link>
	<description>Joomla Programmer, PHP, Joomla, Zen-Cart, osCommerce, MySQL, CSS, XHTML, Ecommerce, Search Engine Marketing, Web Programming answers, often in their rawest form</description>
	<lastBuildDate>Sun, 20 Jun 2010 19:38:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Zen Cart UPS XML does not work with zones</title>
		<link>http://www.bogartcomputing.com/web-programming-answers/107/zen-cart-ups-xml-does-not-work-with-zones/</link>
		<comments>http://www.bogartcomputing.com/web-programming-answers/107/zen-cart-ups-xml-does-not-work-with-zones/#comments</comments>
		<pubDate>Mon, 02 Apr 2007 08:59:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Zen Cart]]></category>

		<guid isPermaLink="false">http://www.bogartcomputing.com/web-programming-answers/107/zen-cart-ups-xml-does-not-work-with-zones/</guid>
		<description><![CDATA[You&#8217;re here because you want to run UPS XML for Zen Cart with zones. It configures ok if you have no zones set, but as soon as you add a zone it displays the &#8220;unconfigured&#8221; yellow icon. The admin and the catalog both use the same code to determine if a UPS rate exists. The [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>You&#8217;re here because you want to run UPS XML for Zen Cart with zones. It configures ok if you have no zones set, but as soon as you add a zone it displays the &#8220;unconfigured&#8221; yellow icon.</p>
<p>The admin and the catalog both use the same code to determine if a UPS rate exists. The problem is, the admin doesn&#8217;t care about where that zone is, but the shipping checkout wants it to match the recipient&#8217;s zone. So by definition the admin can never be configured because it never matches an empty &#8220;order&#8221; zone, there&#8217;s no concept of an order on the admin end but the admin will not mark the UPS xml as &#8220;configured&#8221; until it matches this ghost zone.</p>
<p>It might configure ok in your store, but only if it&#8217;s set to &#8220;no zone,&#8221; which means it&#8217;ll show up for any destination whether you want it to or not. As soon as you try to add a zone it refuses to configure.</p>
<p>The fact is that whole paragraph of code was off, I wonder if people are using this module successfully. There&#8217;s NO WAY you could ever have configured it to do zones!</p>
<p>Change includes/modules/shipping/upsxml.php (upsxml.php,v 1.1.4 2004/12/19) right after the curl code setup to the following:</p>
<p>if (($this->enabled == true) &#038;&#038; ((int)MODULE_SHIPPING_UPSXML_RATES_ZONE > 0)) {<br />
$this->enabled=false;<br />
if (empty($order->delivery['country']['id'])) {<br />
$admin=true; }else{$admin=false;<br />
}<br />
/*<br />
$check = $db->Execute(&#8220;select zone_id from &#8221; . TABLE_ZONES_TO_GEO_ZONES . &#8221; where geo_zone_id = &#8216;&#8221; . MODULE_SHIPPING_UPSXML_RATES_ZONE . &#8220;&#8216; and zone_country_id = &#8216;&#8221; . $order->delivery['country']['id'] . &#8220;&#8216; order by zone_id&#8221;);<br />
*/<br />
if ($admin) {<br />
$sql = &#8220;select zone_id  from &#8221; . TABLE_ZONES_TO_GEO_ZONES . &#8221; where geo_zone_id = &#8216;&#8221; . MODULE_SHIPPING_UPSXML_RATES_ZONE.&#8221;&#8216;&#8221;;<br />
} else {<br />
$sql = &#8220;select zone_id  from &#8221; . TABLE_ZONES_TO_GEO_ZONES . &#8221; where zone_id=&#8217;&#8221;. $order->delivery['zone_id'] . &#8220;&#8216; and geo_zone_id = &#8216;&#8221; . MODULE_SHIPPING_UPSXML_RATES_ZONE . &#8220;&#8216;&#8221;;<br />
}</p>
<p>$check = $db->Execute($sql);<br />
if (!$check->EOF) {<br />
$this->enabled = true;<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bogartcomputing.com/web-programming-answers/107/zen-cart-ups-xml-does-not-work-with-zones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
