* to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <*****@*****.**> * @copyright 2007-2013 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'; include_once dirname(__FILE__) . '/../paypal.php'; // Ajax query $quantity = Tools::getValue('get_qty'); if ($quantity && $quantity > 0) { /* Ajax response */ $id_product = (int) Tools::getValue('id_product'); $id_product_attribute = (int) Tools::getValue('id_product_attribute'); $product_quantity = Product::getQuantity($id_product, $id_product_attribute); if ($product_quantity <= 0) { $paypal = new PayPal(); echo $paypal->l('This product is no longer in stock with those attributes but is available with others'); } else { echo $product_quantity; } } die;