Shipping Estimater with Login-for-Price, for staff doing phone orders
I have a situation where login-for-price has been turned on; but the company staff needs the shipping esitmater to provide shipping estimates to customers on phone/email.
Problem is, when logged in, it just shows the shipping cost. To change it, you have to change the address of the logged in customer.
Is it possible to have a link with no sessions so that the estimater can work as non-logged in customers i.e., select country, state, zip and get the estimate for the items in cart?
Re: Shipping Estimater with Login-for-Price, for staff doing phone orders
That would require custom coding changes.
And to do that there would need to be some magic rule that says you want to bypass normal operation for "just certain users".
So, what's that magic rule to identify your "company staff"? Is there a list of "customer" IDs? or are they *always* logging in from just a single IP address?
Also, why are you still using v1.3.8?
Re: Shipping Estimater with Login-for-Price, for staff doing phone orders
DrByte, I appreciate your reply. I can hard code the use IDs for the system to know its staff. But could you please tell me how to hack the estimater so it doesnt know if someone is logged in? I am sure i will figure out a way to program this on your guidance.
Why using 1.3.8a: I just started working on this site, and it seems in past few years lots of developers have changed several core files. I am just afraid if i upgrade, several modules and functions will stop working. Plus client needs to agree too.
Re: Shipping Estimater with Login-for-Price, for staff doing phone orders
If you can do it by IP address, then I think it can probably be done with two edits and one admin setting change:
1. shipping_estimator.php - around line 65:
Code:
//if($cart->get_content_type() !== 'virtual') {
if ($_SESSION['customer_id'] && (!strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])) ) {
2. tpl_modules_shipping_estimator.php - around line 18:
Code:
if($_SESSION['cart']->count_contents()) {
if ($_SESSION['customer_id'] && (!strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])) ) {
?>
<h2><?php echo CART_SHIPPING_OPTIONS; ?></h2>
3. Admin->Configuration->Website Maintenance->Down For Maintenance (exclude this IP-Address)
To authorize those IP addresses, add them to this list, separated by spaces or commas.
If you wanted to use something other than IP addresses, then you would need to change the highlighted code to a different rule, such as the following:
&& (!in_array($_SESSION['customer_id'], array(1,2,3)))
... where 1,2,3 is a list of customer_id numbers that are your staff customer IDs (from the customers table).