本文整理汇总了PHP中Enlight_Event_EventArgs::getDetails方法的典型用法代码示例。如果您正苦于以下问题:PHP Enlight_Event_EventArgs::getDetails方法的具体用法?PHP Enlight_Event_EventArgs::getDetails怎么用?PHP Enlight_Event_EventArgs::getDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Enlight_Event_EventArgs
的用法示例。
在下文中一共展示了Enlight_Event_EventArgs::getDetails方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: incrementTopSeller
/**
* Plugin event listener function which fired after a customer
* has ordered articles in the store front.
* This function is used to increment the sales count in the
* s_articles_top_seller table.
*
* @param Enlight_Event_EventArgs $arguments
* @return mixed
*/
public function incrementTopSeller(Enlight_Event_EventArgs $arguments)
{
if (Shopware()->Session()->Bot || !$this->isTopSellerActivated()) {
return $arguments->getReturn();
}
$details = $arguments->getDetails();
foreach ($details as $article) {
if ($article['mode'] != 0 || empty($article['articleID'])) {
continue;
}
$this->TopSeller()->incrementTopSeller($article['articleID'], $article['quantity']);
}
return $arguments->getReturn();
}
示例2: purchase
/**
* add purchase tracking
* @param Enlight_Event_EventArgs $arguments
* @return boolean
*/
public function purchase(Enlight_Event_EventArgs $arguments)
{
if ($this->Config()->get('boxalino_tracking_enabled')) {
$products = array();
foreach ($arguments->getDetails() as $detail) {
$products[] = array('product' => $detail['articleDetailId'], 'quantity' => $detail['quantity'], 'price' => $detail['priceNumeric']);
}
Shopware_Plugins_Frontend_Boxalino_EventReporter::reportPurchase($products, $arguments->getSubject()->sOrderNumber, $arguments->getSubject()->sAmount, Shopware()->Shop()->getCurrency());
}
return $arguments->getReturn();
}