|
|
@@ -31,6 +31,44 @@ class BxBasePaymentsServices extends BxDol
|
|
|
{
|
|
|
return BxDolPayments::getInstance()->getOrdersCount($sType);
|
|
|
}
|
|
|
+
|
|
|
+ public function serviceGetLiveUpdatesCart($aMenuItemParent, $aMenuItemChild, $iCount = 0)
|
|
|
+ {
|
|
|
+ $iCountNew = BxDolPayments::getInstance()->getCartItemsCount();
|
|
|
+ if($iCountNew <= $iCount)
|
|
|
+ return false;
|
|
|
+
|
|
|
+ return array(
|
|
|
+ 'count' => $iCountNew, // required
|
|
|
+ 'method' => 'bx_menu_show_live_update(oData)', // required
|
|
|
+ 'data' => array(
|
|
|
+ 'code' => BxDolTemplate::getInstance()->parseHtmlByName('menu_item_addon.html', array(
|
|
|
+ 'content' => '{count}'
|
|
|
+ )),
|
|
|
+ 'mi_parent' => $aMenuItemParent,
|
|
|
+ 'mi_child' => $aMenuItemChild
|
|
|
+ ), // optional, may have some additional data to be passed in JS method provided using 'method' param above.
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ public function serviceGetLiveUpdatesOrders($aMenuItemParent, $aMenuItemChild, $iCount = 0)
|
|
|
+ {
|
|
|
+ $iCountNew = BxDolPayments::getInstance()->getOrdersCount('new');
|
|
|
+ if($iCountNew <= $iCount)
|
|
|
+ return false;
|
|
|
+
|
|
|
+ return array(
|
|
|
+ 'count' => $iCountNew, // required
|
|
|
+ 'method' => 'bx_menu_show_live_update(oData)', // required
|
|
|
+ 'data' => array(
|
|
|
+ 'code' => BxDolTemplate::getInstance()->parseHtmlByName('menu_item_addon.html', array(
|
|
|
+ 'content' => '{count}'
|
|
|
+ )),
|
|
|
+ 'mi_parent' => $aMenuItemParent,
|
|
|
+ 'mi_child' => $aMenuItemChild
|
|
|
+ ), // optional, may have some additional data to be passed in JS method provided using 'method' param above.
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/** @} */
|