當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PayPal::l方法代碼示例

本文整理匯總了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;
開發者ID:Evil1991,項目名稱:PrestaShop-1.4,代碼行數:31,代碼來源:ajax.php


注:本文中的PayPal::l方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。