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


PHP ShoppingCart::eraseExpired方法代碼示例

本文整理匯總了PHP中ShoppingCart::eraseExpired方法的典型用法代碼示例。如果您正苦於以下問題:PHP ShoppingCart::eraseExpired方法的具體用法?PHP ShoppingCart::eraseExpired怎麽用?PHP ShoppingCart::eraseExpired使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ShoppingCart的用法示例。


在下文中一共展示了ShoppingCart::eraseExpired方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: garbageCollect

 /**
  * Erases all carts and cart items that are older than CART_LIFE days and
  * have no customer_id assocaited with them.
  *
  * Called by legacySoapController when doing a document_flush(),
  * document_flush() is called by onsite when the user initiates a
  * "Reset Carts and Documents" from the Tools->eCommerce->Documents tab
  *
  * @return int The number of carts + items deleted by the
  * query
  */
 public static function garbageCollect()
 {
     return ShoppingCart::eraseExpired();
 }
開發者ID:uiDeveloper116,項目名稱:webstore,代碼行數:15,代碼來源:Cart.php

示例2: actionErasecarts

 /**
  * Erase carts that are over 30 days old, and don't have a customer_id
  * associated with them, then optimize the tables related to the shopping
  * cart experience.
  */
 public function actionErasecarts()
 {
     $numErased = ShoppingCart::eraseExpired();
     ShoppingCart::optimizeTables();
     Yii::app()->user->setFlash('success', Yii::t('admin', '{qty} old carts and cart items removed. {time}', array('{qty}' => $numErased, '{time}' => date("d F, Y  h:i:sa"))));
     $this->render("erasecarts");
 }
開發者ID:uiDeveloper116,項目名稱:webstore,代碼行數:12,代碼來源:SystemController.php


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