[HACK] Login for price
-
- Posts: 4
- Joined: Tue Oct 12, 2010 9:17 am
- Location: England
Re: [HACK] Login for price
Great thanks.
Seems to be working beautifully thanks for the great work
Seems to be working beautifully thanks for the great work
Re: [HACK] Login for price
You're a legend Meules, well done mate, works like a charm.
Re: [HACK] Login for price
This is a small update to get the automatic email function to work in V6.
IN ADMIN/INCLUDES/CLASSES/CLASS.CUSTOMER.PHP AROUND LINE 2895 FIND
BEFORE ADD
Now the email function should work again, the rest of the steps stay the same.
IN ADMIN/INCLUDES/CLASSES/CLASS.CUSTOMER.PHP AROUND LINE 2895 FIND
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 #####################################
ISC v6
Re: [HACK] Login for price
Worked great!! thank you very much!! Really appreciated!
-
- Posts: 1
- Joined: Thu Jun 03, 2010 6:53 am
Re: [HACK] Login for price
Hello,
I have been using this module for a while for a client, and they love it. I have had a bit of a scan through the code and appreciate just how much work goes into a mod/hack like this.
I have discovered a bit of an issue with it and hope you can help me find where to fix it. If you search for a product, on the search results page the add to cart button is displaying, and in the theme that I am using, shows the quantity boxes as well.
If you add the products to the cart, then pricing is shown.
I can manually cut out the quantity boxes, but I cannot get rid of the add to cart button. Any ideas?
I have been using this module for a while for a client, and they love it. I have had a bit of a scan through the code and appreciate just how much work goes into a mod/hack like this.
I have discovered a bit of an issue with it and hope you can help me find where to fix it. If you search for a product, on the search results page the add to cart button is displaying, and in the theme that I am using, shows the quantity boxes as well.
If you add the products to the cart, then pricing is shown.
I can manually cut out the quantity boxes, but I cannot get rid of the add to cart button. Any ideas?
Re: [HACK] Login for price
Hi,
That's strange. I tested it on my site and it works on the search result pages. Have you included the step 3 of the instructions? Perhaps you have manually coded some sort of "add to cart" button? Whiich version are you on?
STEP 3:
We need to hide the "add to cart" button in all panels for people who are not logged in or are approved by the store owner.
in lib\templates\products_panel.php find around line 94:
Replace with
This code hides all the "add to cart" buttons on the category pages and search pages.
Let me know...
That's strange. I tested it on my site and it works on the search result pages. Have you included the step 3 of the instructions? Perhaps you have manually coded some sort of "add to cart" button? Whiich version are you on?
STEP 3:
We need to hide the "add to cart" button in all panels for people who are not logged in or are approved by the store owner.
in lib\templates\products_panel.php find around line 94:
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');
}
}
Replace with
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');
}
}
}
Let me know...
ISC v6
Re: [HACK] Login for price
The same thing happened to me. I use ISC 6.1.1, I did all the modifications but in search results and when viewing products in any category as a list (not as grid) it's still showing the Quantity Box and Add to cart button at the bottom of the list.
When viewing the products in category as grid it's working the way it's supposed to.
Any ideas?
Any help would be very appreciate.
Thank you.
When viewing the products in category as grid it's working the way it's supposed to.
Any ideas?
Any help would be very appreciate.
Thank you.
Re: [HACK] Login for price
I use default template from Interspire. I also tested a few other templates and it's just the same.
Thanks.
Thanks.
Re: [HACK] Login for price
Anyone ? Is this forum dead ?