<?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>bartman.co.uk &#187; prestashop functions</title>
	<atom:link href="http://bartman.co.uk/category/prestashop/prestashop-functions/feed/" rel="self" type="application/rss+xml" />
	<link>http://bartman.co.uk</link>
	<description>Blogging eBay, prestashop and ecommerce soloutions</description>
	<lastBuildDate>Thu, 01 Sep 2011 23:30:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>getOrderByCartId(intval($id_cart)) Prestashop Function</title>
		<link>http://bartman.co.uk/2010/07/getorderbycartidintvalid_cart-prestashop-function/</link>
		<comments>http://bartman.co.uk/2010/07/getorderbycartidintvalid_cart-prestashop-function/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 14:43:45 +0000</pubDate>
		<dc:creator>chris barton</dc:creator>
				<category><![CDATA[prestashop functions]]></category>

		<guid isPermaLink="false">http://bartman.co.uk/?p=63</guid>
		<description><![CDATA[the getorderByCart function simply returns the order_id when the input is a cart_id, located in /classes/order.php the function is as follows /** * Get an order by its cart id * * @param integer $id_cart Cart id * @return array Order details */ static public function getOrderByCartId($id_cart) { $result = Db::getInstance()-&#62;getRow(' SELECT `id_order` FROM `'._DB_PREFIX_.'orders` [...]]]></description>
			<content:encoded><![CDATA[<p>the getorderByCart function simply returns the order_id when the input is a cart_id, located in /classes/order.php the function is as follows</p>
<pre><code>/**
	 * Get an order by its cart id
	 *
	 * @param integer $id_cart Cart id
	 * @return array Order details
	 */
	static public function getOrderByCartId($id_cart)
    {
    	$result = Db::getInstance()-&gt;getRow('
        SELECT `id_order`
        FROM `'._DB_PREFIX_.'orders`
        WHERE `id_cart` = '.intval($id_cart));

		return isset($result['id_order']) ? $result['id_order'] : false;
    }</code></pre>
<p>example of use</p>
<p><code>$myid_order = Order::getOrderByCartId(intval($id_cart));</code></p>
]]></content:encoded>
			<wfw:commentRss>http://bartman.co.uk/2010/07/getorderbycartidintvalid_cart-prestashop-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

