public function preparePage() { $this->P = new \HaaseIT\HCSF\CorePage($this->serviceManager); $this->P->cb_pagetype = 'content'; if (CHelper::getUserData()) { $this->P->oPayload->cl_html = $this->serviceManager->get('textcats')->T("denied_default"); } else { $this->P->cb_customcontenttemplate = 'customer/register'; $aErr = []; if (isset($_POST["doRegister"]) && $_POST["doRegister"] == 'yes') { $aErr = CHelper::validateCustomerForm(HelperConfig::$lang, $aErr); if (count($aErr) == 0) { $sql = 'SELECT cust_email FROM customer WHERE cust_email = :email'; $sEmail = filter_var(trim(Tools::getFormfield("email")), FILTER_SANITIZE_EMAIL); /** @var \PDOStatement $hResult */ $hResult = $this->serviceManager->get('db')->prepare($sql); $hResult->bindValue(':email', $sEmail, \PDO::PARAM_STR); $hResult->execute(); $iRows = $hResult->rowCount(); if ($iRows == 0) { $sEmailVerificationcode = md5($_POST["email"] . time()); $aData = ['cust_email' => $sEmail, 'cust_corp' => filter_var(trim(Tools::getFormfield("corpname")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_name' => filter_var(trim(Tools::getFormfield("name")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_street' => filter_var(trim(Tools::getFormfield("street")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_zip' => filter_var(trim(Tools::getFormfield("zip")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_town' => filter_var(trim(Tools::getFormfield("town")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_phone' => filter_var(trim(Tools::getFormfield("phone")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_cellphone' => filter_var(trim(Tools::getFormfield("cellphone")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_fax' => filter_var(trim(Tools::getFormfield("fax")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_country' => filter_var(trim(Tools::getFormfield("country")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_password' => password_hash($_POST["pwd"], PASSWORD_DEFAULT), 'cust_tosaccepted' => isset($_POST["tos"]) && $_POST["tos"] == 'y' ? 'y' : 'n', 'cust_cancellationdisclaimeraccepted' => isset($_POST["cancellationdisclaimer"]) && $_POST["cancellationdisclaimer"] == 'y' ? 'y' : 'n', 'cust_emailverified' => 'n', 'cust_emailverificationcode' => $sEmailVerificationcode, 'cust_active' => HelperConfig::$customer["register_require_manual_activation"] ? 'n' : 'y', 'cust_registrationtimestamp' => time()]; $sql = \HaaseIT\DBTools::buildPSInsertQuery($aData, 'customer'); $hResult = $this->serviceManager->get('db')->prepare($sql); foreach ($aData as $sKey => $sValue) { $hResult->bindValue(':' . $sKey, $sValue, \PDO::PARAM_STR); } $hResult->execute(); CHelper::sendVerificationMail($sEmailVerificationcode, $sEmail, $this->serviceManager, true); $aPData["showsuccessmessage"] = true; } else { $aErr["emailalreadytaken"] = true; $this->P->cb_customdata["customerform"] = CHelper::buildCustomerForm(HelperConfig::$lang, 'register', $aErr); } } else { $this->P->cb_customdata["customerform"] = CHelper::buildCustomerForm(HelperConfig::$lang, 'register', $aErr); } } else { $this->P->cb_customdata["customerform"] = CHelper::buildCustomerForm(HelperConfig::$lang, 'register'); } if (isset($aPData) && count($aPData)) { $this->P->cb_customdata["register"] = $aPData; } } }
/** * @param $CUA * @param $twig * @return mixed */ private function handleCustomerAdmin($CUA, $twig) { $sType = 'all'; if (isset($_REQUEST["type"])) { if ($_REQUEST["type"] == 'active') { $sType = 'active'; } elseif ($_REQUEST["type"] == 'inactive') { $sType = 'inactive'; } } $return = ''; if (!isset($_GET["action"])) { $sql = 'SELECT ' . DB_ADDRESSFIELDS . ' FROM customer'; if ($sType == 'active') { $sql .= ' WHERE cust_active = \'y\''; } elseif ($sType == 'inactive') { $sql .= ' WHERE cust_active = \'n\''; } $sql .= ' ORDER BY cust_no ASC'; $hResult = $this->db->query($sql); if ($hResult->rowCount() != 0) { $aData = $hResult->fetchAll(); $return .= \HaaseIT\Tools::makeListtable($CUA, $aData, $twig); } else { $aInfo["nodatafound"] = true; } } elseif (isset($_GET["action"]) && $_GET["action"] == 'edit') { $iId = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT); $aErr = []; if (isset($_POST["doEdit"]) && $_POST["doEdit"] == 'yes') { $sCustno = filter_var(trim($_POST["custno"]), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW); if (strlen($sCustno) < HelperConfig::$customer["minimum_length_custno"]) { $aErr["custnoinvalid"] = true; } else { $sql = 'SELECT ' . DB_ADDRESSFIELDS . ' FROM customer WHERE cust_id != :id AND cust_no = :custno'; $hResult = $this->db->prepare($sql); $hResult->bindValue(':id', $iId); $hResult->bindValue(':custno', $sCustno); $hResult->execute(); $iRows = $hResult->rowCount(); if ($iRows == 1) { $aErr["custnoalreadytaken"] = true; } $sql = 'SELECT ' . DB_ADDRESSFIELDS . ' FROM customer WHERE cust_id != :id AND cust_email = :email'; $hResult = $this->db->prepare($sql); $hResult->bindValue(':id', $iId); $hResult->bindValue(':email', filter_input(INPUT_POST, 'email', FILTER_SANITIZE_EMAIL)); $hResult->execute(); $iRows = $hResult->rowCount(); if ($iRows == 1) { $aErr["emailalreadytaken"] = true; } $aErr = CHelper::validateCustomerForm(HelperConfig::$lang, $aErr, true); if (count($aErr) == 0) { $aData = ['cust_no' => $sCustno, 'cust_email' => trim(filter_input(INPUT_POST, 'email', FILTER_SANITIZE_EMAIL)), 'cust_corp' => trim(filter_input(INPUT_POST, 'corpname', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW)), 'cust_name' => trim(filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW)), 'cust_street' => trim(filter_input(INPUT_POST, 'street', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW)), 'cust_zip' => trim(filter_input(INPUT_POST, 'zip', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW)), 'cust_town' => trim(filter_input(INPUT_POST, 'town', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW)), 'cust_phone' => trim(filter_input(INPUT_POST, 'phone', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW)), 'cust_cellphone' => trim(filter_input(INPUT_POST, 'cellphone', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW)), 'cust_fax' => trim(filter_input(INPUT_POST, 'fax', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW)), 'cust_country' => trim(filter_input(INPUT_POST, 'country', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW)), 'cust_group' => trim(filter_input(INPUT_POST, 'custgroup', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW)), 'cust_emailverified' => isset($_POST["emailverified"]) && $_POST["emailverified"] == 'y' ? 'y' : 'n', 'cust_active' => isset($_POST["active"]) && $_POST["active"] == 'y' ? 'y' : 'n', 'cust_id' => $iId]; if (isset($_POST["pwd"]) && $_POST["pwd"] != '') { $aData['cust_password'] = password_hash($_POST["pwd"], PASSWORD_DEFAULT); $aInfo["passwordchanged"] = true; } $sql = \HaaseIT\DBTools::buildPSUpdateQuery($aData, 'customer', 'cust_id'); $hResult = $this->db->prepare($sql); foreach ($aData as $sKey => $sValue) { $hResult->bindValue(':' . $sKey, $sValue); } $hResult->execute(); $aInfo["changeswritten"] = true; } } } $sql = 'SELECT ' . DB_ADDRESSFIELDS . ' FROM customer WHERE cust_id = :id'; $hResult = $this->db->prepare($sql); $hResult->bindValue(':id', $iId); $hResult->execute(); if ($hResult->rowCount() == 1) { $aUser = $hResult->fetch(); $aPData["customerform"] = CHelper::buildCustomerForm(HelperConfig::$lang, 'admin', $aErr, $aUser); } else { $aInfo["nosuchuserfound"] = true; } } $aPData["customeradmin"]["text"] = $return; $aPData["customeradmin"]["type"] = $sType; if (isset($aInfo)) { $aPData["customeradmin"]["info"] = $aInfo; } return $aPData; }
public static function buildShoppingCartTable($aCart, $bReadonly = false, $sCustomergroup = '', $aErr = '', $iVATfull = '', $iVATreduced = '') { if ($iVATfull == '' && $iVATreduced == '') { $iVATfull = HelperConfig::$shop["vat"]["full"]; $iVATreduced = HelperConfig::$shop["vat"]["reduced"]; } $aSumme = self::calculateCartItems($aCart); $aData["shoppingcart"] = ['readonly' => $bReadonly, 'customergroup' => $sCustomergroup, 'cart' => $aCart, 'rebategroups' => HelperConfig::$shop["rebate_groups"], 'additionalcoststoitems' => self::addAdditionalCostsToItems($aSumme, $iVATfull, $iVATreduced), 'minimumorderamountnet' => HelperConfig::$shop["minimumorderamountnet"], 'reducedorderamountnet1' => HelperConfig::$shop["reducedorderamountnet1"], 'reducedorderamountnet2' => HelperConfig::$shop["reducedorderamountnet2"], 'reducedorderamountfee1' => HelperConfig::$shop["reducedorderamountfee1"], 'reducedorderamountfee2' => HelperConfig::$shop["reducedorderamountfee2"], 'minimumamountforfreeshipping' => HelperConfig::$shop["minimumamountforfreeshipping"]]; if (!$bReadonly) { $aCartpricesums = $aData["shoppingcart"]["additionalcoststoitems"]; $_SESSION["cartpricesums"] = $aCartpricesums; } if ($aData["shoppingcart"]["additionalcoststoitems"]["bMindesterreicht"] && !$bReadonly) { $aData["customerform"] = CHelper::buildCustomerForm(HelperConfig::$lang, 'shoppingcart', $aErr); } return $aData; }
/** * @param $CSA * @return array */ private function handleShopAdmin($CSA) { $aSData = []; $aData = []; if (!isset($_GET["action"])) { $bIgnoreStorno = false; $sql = 'SELECT * FROM orders WHERE '; if (!isset($_REQUEST["type"]) or $_REQUEST["type"] == 'openinwork') { $sql .= "(o_ordercompleted = 'n' OR o_ordercompleted = 'i') "; } elseif ($_REQUEST["type"] == 'closed') { $sql .= "o_ordercompleted = 'y' "; } elseif ($_REQUEST["type"] == 'open') { $sql .= "o_ordercompleted = 'n' "; } elseif ($_REQUEST["type"] == 'inwork') { $sql .= "o_ordercompleted = 'i' "; } elseif ($_REQUEST["type"] == 'storno') { $sql .= "o_ordercompleted = 's' "; } elseif ($_REQUEST["type"] == 'deleted') { $sql .= "o_ordercompleted = 'd' "; } elseif ($_REQUEST["type"] == 'all') { $sql .= "o_ordercompleted != 'd' "; $bIgnoreStorno = true; } else { die(HardcodedText::get('shopadmin_error_invalidrequest')); } $bFromTo = false; $sFrom = null; $sTo = null; if (isset($_REQUEST["type"]) && ($_REQUEST["type"] == 'deleted' or $_REQUEST["type"] == 'all' or $_REQUEST["type"] == 'closed')) { $sql .= "AND "; $sFrom = \filter_var($_REQUEST["fromyear"], FILTER_SANITIZE_NUMBER_INT) . '-' . Tools::dateAddLeadingZero(\filter_var($_REQUEST["frommonth"], FILTER_SANITIZE_NUMBER_INT)); $sFrom .= '-' . Tools::dateAddLeadingZero(\filter_var($_REQUEST["fromday"], FILTER_SANITIZE_NUMBER_INT)); $sTo = \filter_var($_REQUEST["toyear"], FILTER_SANITIZE_NUMBER_INT) . '-' . Tools::dateAddLeadingZero(\filter_var($_REQUEST["tomonth"], FILTER_SANITIZE_NUMBER_INT)); $sTo .= '-' . Tools::dateAddLeadingZero(\filter_var($_REQUEST["today"], FILTER_SANITIZE_NUMBER_INT)); $sql .= "o_orderdate >= :from "; $sql .= "AND o_orderdate <= :to "; $bFromTo = true; } $sql .= "ORDER BY o_ordertimestamp DESC"; $hResult = $this->db->prepare($sql); if ($bFromTo) { $hResult->bindValue(':from', $sFrom); $hResult->bindValue(':to', $sTo); } $hResult->execute(); if ($hResult->rowCount() != 0) { $i = 0; $j = 0; $k = 0; $fGesamtnetto = 0.0; while ($aRow = $hResult->fetch()) { if ($aRow["o_ordercompleted"] == 'y') { $sStatus = '<span style="color: green; font-weight: bold;">' . HardcodedText::get('shopadmin_orderstatus_completed') . '</span>'; } elseif ($aRow["o_ordercompleted"] == 'n') { $sStatus = '<span style="color: orange; font-weight: bold;">' . HardcodedText::get('shopadmin_orderstatus_open') . '</span>'; } elseif ($aRow["o_ordercompleted"] == 'i') { $sStatus = '<span style="color: orange;">' . HardcodedText::get('shopadmin_orderstatus_inwork') . '</span>'; } elseif ($aRow["o_ordercompleted"] == 's') { $sStatus = '<span style="color: red; font-weight: bold;">' . HardcodedText::get('shopadmin_orderstatus_canceled') . '</span>'; } elseif ($aRow["o_ordercompleted"] == 'd') { $sStatus = HardcodedText::get('shopadmin_orderstatus_deleted'); } else { $sStatus = ''; } if ($aRow["o_paymentcompleted"] == 'y') { $sZahlungsmethode = '<span style="color: green;">'; } else { $sZahlungsmethode = '<span style="color: red;">'; } $mZahlungsmethode = $this->serviceManager->get('textcats')->T("order_paymentmethod_" . $aRow["o_paymentmethod"], true); if ($mZahlungsmethode) { $sZahlungsmethode .= $mZahlungsmethode; } else { $sZahlungsmethode .= ucwords($aRow["o_paymentmethod"]); } $sZahlungsmethode .= '</span>'; if (trim($aRow["o_corpname"]) == '') { $sName = $aRow["o_name"]; } else { $sName = $aRow["o_corpname"]; } $aData[] = ['o_id' => $aRow["o_id"], 'o_account_no' => $aRow["o_custno"], 'o_email' => $aRow["o_email"], 'o_cust' => $sName . '<br>' . $aRow["o_zip"] . ' ' . $aRow["o_town"], 'o_authed' => $aRow["o_authed"], 'o_sumnettoall' => number_format($aRow["o_sumnettoall"], HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'], HelperConfig::$core['numberformat_thousands_seperator']) . ' ' . HelperConfig::$shop["waehrungssymbol"] . ($aRow["o_mindermenge"] != 0 && $aRow["o_mindermenge"] != '' ? '<br>+' . number_format($aRow["o_mindermenge"], HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'], HelperConfig::$core['numberformat_thousands_seperator']) . ' ' . HelperConfig::$shop["waehrungssymbol"] : ''), 'o_order_status' => $sStatus . (trim($aRow["o_lastedit_user"]) != '' ? '<br>' . $aRow["o_lastedit_user"] : ''), 'o_ordertime_number' => date(HelperConfig::$core['locale_format_date_time'], $aRow["o_ordertimestamp"]) . (trim($aRow["o_transaction_no"]) != '' ? '<br>' . $aRow["o_transaction_no"] : ''), 'o_order_host_payment' => $sZahlungsmethode . '<br>' . $aRow["o_srv_hostname"]]; if (!($aRow["o_ordercompleted"] == 's' && $bIgnoreStorno)) { $fGesamtnetto += $aRow["o_sumnettoall"]; $j++; } else { $k++; } $i++; } $aSData['listtable_orders'] = Tools::makeListtable($CSA["list_orders"], $aData, $this->serviceManager->get('twig')); $aSData['listtable_i'] = $i; $aSData['listtable_j'] = $j; $aSData['listtable_k'] = $k; $aSData['listtable_gesamtnetto'] = $fGesamtnetto; } else { $aSData['nomatchingordersfound'] = true; } } elseif (isset($_GET["action"]) && $_GET["action"] == 'edit') { $iId = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT); $sql = 'SELECT * FROM orders WHERE o_id = :id'; /** @var \PDOStatement $hResult */ $hResult = $this->db->prepare($sql); $hResult->bindValue(':id', $iId); $hResult->execute(); if ($hResult->rowCount() == 1) { $aSData["orderdata"] = $hResult->fetch(); $sql = 'SELECT * FROM orders_items WHERE oi_o_id = :id'; $hResult = $this->db->prepare($sql); $hResult->bindValue(':id', $iId); $hResult->execute(); $aItems = $hResult->fetchAll(); $aUserdata = ['cust_no' => $aSData["orderdata"]["o_custno"], 'cust_email' => $aSData["orderdata"]["o_email"], 'cust_corp' => $aSData["orderdata"]["o_corpname"], 'cust_name' => $aSData["orderdata"]["o_name"], 'cust_street' => $aSData["orderdata"]["o_street"], 'cust_zip' => $aSData["orderdata"]["o_zip"], 'cust_town' => $aSData["orderdata"]["o_town"], 'cust_phone' => $aSData["orderdata"]["o_phone"], 'cust_cellphone' => $aSData["orderdata"]["o_cellphone"], 'cust_fax' => $aSData["orderdata"]["o_fax"], 'cust_country' => $aSData["orderdata"]["o_country"], 'cust_group' => $aSData["orderdata"]["o_group"]]; $aSData["customerform"] = \HaaseIT\HCSF\Customer\Helper::buildCustomerForm(HelperConfig::$lang, 'shopadmin', '', $aUserdata); $aSData["orderdata"]["options_shippingservices"] = ['']; foreach (HelperConfig::$shop["shipping_services"] as $sValue) { $aSData["orderdata"]["options_shippingservices"][] = $sValue; } $aItemsCarttable = []; foreach ($aItems as $aValue) { $aPrice = ['netto_list' => $aValue["oi_price_netto_list"], 'netto_sale' => $aValue["oi_price_netto_sale"], 'netto_rebated' => $aValue["oi_price_netto_rebated"], 'netto_use' => $aValue["oi_price_netto_use"], 'brutto_use' => $aValue["oi_price_brutto_use"]]; //$aPrice = $oItem->calcPrice($aValue["oi_price_netto"], HelperConfig::$shop["vat"][$aValue["oi_vat_id"]], '', true); $aItemsCarttable[$aValue["oi_cartkey"]] = ['amount' => $aValue["oi_amount"], 'price' => $aPrice, 'vat' => $aValue["oi_vat"], 'rg' => $aValue["oi_rg"], 'rg_rebate' => $aValue["oi_rg_rebate"], 'name' => $aValue["oi_itemname"], 'img' => $aValue["oi_img"]]; } $aSData = array_merge(\HaaseIT\HCSF\Shop\Helper::buildShoppingCartTable($aItemsCarttable, true, $aSData["orderdata"]["o_group"], '', $aSData["orderdata"]["o_vatfull"], $aSData["orderdata"]["o_vatreduced"]), $aSData); } else { $aSData['ordernotfound'] = true; } } return $aSData; }
/** * */ public function preparePage() { $this->P = new \HaaseIT\HCSF\CorePage($this->serviceManager); $this->P->cb_pagetype = 'content'; if (!CHelper::getUserData()) { $this->P->oPayload->cl_html = $this->textcats->T("denied_notloggedin"); } else { $this->P->cb_customcontenttemplate = 'customer/customerhome'; $aPData["display_logingreeting"] = false; if (isset($_GET["login"]) && $_GET["login"]) { $aPData["display_logingreeting"] = true; } if (isset($_GET["editprofile"])) { $sErr = ''; if (isset($_POST["doEdit"]) && $_POST["doEdit"] == 'yes') { $sql = 'SELECT ' . DB_ADDRESSFIELDS . ' FROM customer WHERE cust_id != :id AND cust_email = :email'; $sEmail = filter_var(trim(Tools::getFormfield("email")), FILTER_SANITIZE_EMAIL); $hResult = $this->db->prepare($sql); $hResult->bindValue(':id', $_SESSION["user"]['cust_id'], \PDO::PARAM_INT); $hResult->bindValue(':email', $sEmail, \PDO::PARAM_STR); $hResult->execute(); $iRows = $hResult->rowCount(); if ($iRows == 1) { $sErr .= $this->textcats->T("userprofile_emailalreadyinuse") . '<br>'; } $sErr = CHelper::validateCustomerForm(HelperConfig::$lang, $sErr, true); if ($sErr == '') { if (HelperConfig::$customer["allow_edituserprofile"]) { $aData = ['cust_corp' => filter_var(trim(Tools::getFormfield("corpname")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_name' => filter_var(trim(Tools::getFormfield("name")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_street' => filter_var(trim(Tools::getFormfield("street")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_zip' => filter_var(trim(Tools::getFormfield("zip")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_town' => filter_var(trim(Tools::getFormfield("town")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_phone' => filter_var(trim(Tools::getFormfield("phone")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_cellphone' => filter_var(trim(Tools::getFormfield("cellphone")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_fax' => filter_var(trim(Tools::getFormfield("fax")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW), 'cust_country' => filter_var(trim(Tools::getFormfield("country")), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW)]; } if (isset($_POST["pwd"]) && $_POST["pwd"] != '') { $aData['cust_password'] = password_hash($_POST["pwd"], PASSWORD_DEFAULT); $aPData["infopasswordchanged"] = true; } $aData['cust_id'] = $_SESSION["user"]['cust_id']; if (count($aData) > 1) { $sql = \HaaseIT\DBTools::buildPSUpdateQuery($aData, 'customer', 'cust_id'); $hResult = $this->db->prepare($sql); foreach ($aData as $sKey => $sValue) { $hResult->bindValue(':' . $sKey, $sValue); } $hResult->execute(); $aPData["infochangessaved"] = true; } else { $aPData["infonothingchanged"] = true; } } } $this->P->cb_customdata["customerform"] = CHelper::buildCustomerForm(HelperConfig::$lang, 'editprofile', $sErr); //if (HelperConfig::$customer["allow_edituserprofile"]) $P["lang"]["cl_html"] .= '<br>'.$this->textcats->T("userprofile_infoeditemail"); // Future implementation } else { $this->P->cb_customdata["customerform"] = CHelper::buildCustomerForm(HelperConfig::$lang, 'userhome'); } $aPData["showprofilelinks"] = false; if (!isset($_GET["editprofile"])) { $aPData["showprofilelinks"] = true; } if (isset($aPData) && count($aPData)) { $this->P->cb_customdata["userhome"] = $aPData; } } }