本文整理汇总了PHP中PayPal::l方法的典型用法代码示例。如果您正苦于以下问题:PHP PayPal::l方法的具体用法?PHP PayPal::l怎么用?PHP PayPal::l使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PayPal
的用法示例。
在下文中一共展示了PayPal::l方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
* 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 <contact@prestashop.com>
* @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;