function smartyfyStoreAttributes() { global $smarty; $errors = array(); $djlUtil = new DejalaUtils(); $storeAttrs = array(); $response = $djlUtil->getStoreAttributes($this->dejalaConfig, $storeAttrs); if (200 != $response['status']) { $errors[] = $this->l('An error occurred while getting store, please try again later or contact Dejala.com'); } else { $smarty->assign("account_balance", $storeAttrs['account_balance']); $smarty->assign("store_name", $storeAttrs['name']); // Check if account exists in production $responsePing = $djlUtil->ping($this->dejalaConfig, 'PROD'); if ('200' == $responsePing['status']) { $smarty->assign('isLiveReady', '1'); $smarty->assign('isLiveRequested', '0'); } else { $smarty->assign('isLiveReady', '0'); if (isset($storeAttrs['attributes']) && isset($storeAttrs['attributes']['request_live']) && $storeAttrs['attributes']['request_live'] == 'true') { $smarty->assign('isLiveRequested', '1'); } else { $smarty->assign('isLiveRequested', '0'); } } } return $errors; }