当前位置: 首页>>代码示例>>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;未经允许,请勿转载。