BxBaseModPaymentGridCarts.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup BasePayment Base classes for Payment like modules
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxBaseModPaymentGridCarts extends BxTemplGrid
  12. {
  13. protected $MODULE;
  14. protected $_oModule;
  15. protected $_oCart;
  16. protected $_sCurrencySign;
  17. public function __construct ($aOptions, $oTemplate = false)
  18. {
  19. parent::__construct ($aOptions, $oTemplate);
  20. $this->_oModule = BxDolModule::getInstance($this->MODULE);
  21. $this->_oCart = $this->_oModule->getObjectCart();
  22. $this->_sCurrencySign = $this->_oModule->_oConfig->getDefaultCurrencySign();
  23. $this->_sDefaultSortingOrder = 'DESC';
  24. $iClientId = bx_get('client_id');
  25. if($iClientId !== false)
  26. $this->_aQueryAppend['client_id'] = (int)$iClientId;
  27. $iSellerId = bx_get('seller_id');
  28. if($iSellerId !== false)
  29. $this->_aQueryAppend['seller_id'] = (int)$iSellerId;
  30. }
  31. public function addQueryParam($sKey, $sValue)
  32. {
  33. if(empty($sKey) || !isset($sValue))
  34. return;
  35. $this->_aQueryAppend[$sKey] = $sValue;
  36. }
  37. }
  38. /** @} */