Re: [HACK] Login for price
Posted: Wed Oct 27, 2010 12:34 am
Great thanks.
Seems to be working beautifully
thanks for the great work 
Seems to be working beautifully


The customer community
http://www.shoppingcartcommunity.com/forum/
http://www.shoppingcartcommunity.com/forum/viewtopic.php?t=12
Code: Select all
if (gzte11(ISC_MEDIUMPRINT)) {
$existingCustomer = $this->customerEntity->get($customerId);
if (isId($existingCustomer['custformsessionid'])) {
$GLOBALS['ISC_CLASS_FORM']->saveFormSession(FORMFIELDS_FORM_ACCOUNT, true, $existingCustomer['custformsessionid']);
} else {
$formSessionId = $GLOBALS['ISC_CLASS_FORM']->saveFormSession(FORMFIELDS_FORM_ACCOUNT);
if (isId($formSessionId)) {
$StoreCustomer['custformsessionid'] = $formSessionId;
}
}
}
Code: Select all
################### HACK LOGIN FOR PRICE BOF #####################################
$GLOBALS['FirstName'] = isc_html_escape($StoreCustomer['custconfirstname']);
$GLOBALS['ISC_LANG']['ThanksForRegisteringEmailLogin'] = sprintf(GetLang('ThanksForRegisteringEmailLogin'), $GLOBALS['ShopPathSSL']."/account.php", $GLOBALS['ShopPathSSL']."/account.php", $GLOBALS['ShopPathSSL']."/account.php");
if ($StoreCustomer['custgroupid']) {
$store_name = GetConfig('StoreName');
$subject = GetLang('YourAccountIsVerifiedIntro');
$emailTemplate = FetchEmailTemplateParser();
$emailTemplate->SetTemplate("verified_account");
$message = $emailTemplate->ParseTemplate(true);
require_once(ISC_BASE_PATH . "/lib/email.php");
$obj_email = GetEmailClass();
$obj_email->Set('CharSet', GetConfig('CharacterSet'));
$obj_email->From(GetConfig('OrderEmail'), $store_name);
$obj_email->Set("Subject", $subject . $store_name);
$obj_email->AddBody("html", $message);
$obj_email->AddRecipient($StoreCustomer['custconemail'], "", "h");
$email_result = $obj_email->Send();
}
################## HACK LOGIN FOR PRICE EOF #####################################
Code: Select all
if (isId($row['prodvariationid']) || trim($row['prodconfigfields'])!='' || $row['prodeventdaterequired'] == 1) {
$GLOBALS['ProductURL'] = ProdLink($row['prodname']);
$GLOBALS['ProductAddText'] = GetLang('ProductChooseOptionLink');
} else {
$GLOBALS['ProductURL'] = CartLink($row['productid']);
if ($GLOBALS['ProductPreOrder']) {
$GLOBALS['ProductAddText'] = GetLang('ProductPreOrderCartLink');
} else {
$GLOBALS['ProductAddText'] = GetLang('ProductAddToCartLink');
}
}
Code: Select all
$customerClass = GetClass('ISC_CUSTOMER');
$groupId = 0;
$customer = $customerClass->GetCustomerInfo();
if(isset($customer['custgroupid'])) {
$groupId = $customer['custgroupid'];
}
if(!$customerClass->GetCustomerId()) {
$GLOBALS['HideActionAdd'] = 'none';
} elseif($customer['custgroupid'] == 0) {
$GLOBALS['HideActionAdd'] = 'none';
}
else {
if (isId($row['prodvariationid']) || trim($row['prodconfigfields'])!='' || $row['prodeventdaterequired'] == 1) {
$GLOBALS['ProductURL'] = ProdLink($row['prodname']);
$GLOBALS['ProductAddText'] = GetLang('ProductChooseOptionLink');
} else {
$GLOBALS['ProductURL'] = CartLink($row['productid']);
if ($GLOBALS['ProductPreOrder']) {
$GLOBALS['ProductAddText'] = GetLang('ProductPreOrderCartLink');
} else {
$GLOBALS['ProductAddText'] = GetLang('ProductAddToCartLink');
}
}
}