| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace ModulesGarden\ProxmoxAddon\App\Helper;
- use ModulesGarden\ProxmoxAddon\Core\ModuleConstants;
- /**
- * Description of CartTotals
- *
- * @author Rafał Ossowski <rafal.os@modulesgarden.com>
- */
- class CartTotals
- {
- private $requreFiles = [
- 'cartfunctions',
- 'clientfunctions',
- 'domainfunctions',
- 'configoptionsfunctions',
- 'invoicefunctions',
- 'orderfunctions'
- ];
- public function __construct()
- {
- $fullPath = ModuleConstants::getFullPathWhmcs('includes');
- foreach ($this->requreFiles as $fileName)
- {
- ModuleConstants::requireFile($fullPath . DS . $fileName . ".php");
- }
- }
- public function getCartInfo()
- {
- $calcCartTotals = calcCartTotals();
- foreach ($calcCartTotals['addons'] as $key => &$addon)
- {
- $calcCartTotals['addons'][$key]['pricingtext'] = (string)$addon['pricingtext'];
- }
- return $calcCartTotals;
- }
- }
|