* @copyright 2007-2014 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ include_once(dirname(__FILE__).'/../../../config/config.inc.php'); include_once(dirname(__FILE__).'/../../../init.php'); if ($id_cart = Tools::getValue('id_cart')) { $id_order = Db::getInstance()->getValue(' SELECT id_order FROM `'._DB_PREFIX_.'paypal_order` WHERE `id_order` = '.(int)Order::getOrderByCartId((int)$id_cart)); if ($id_order !== false) echo (int)$id_order; } die();