Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Location
    Toronto, Ontario, Canada
    Posts
    31
    Plugin Contributions
    0

    Default 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?

  2. #2
    Join Date
    Jan 2004
    Posts
    60,329
    Blog Entries
    4
    Plugin Contributions
    144

    Default 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?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.



  3. #3
    Join Date
    Feb 2008
    Location
    Toronto, Ontario, Canada
    Posts
    31
    Plugin Contributions
    0

    Default 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.

  4. #4
    Join Date
    Jan 2004
    Posts
    60,329
    Blog Entries
    4
    Plugin Contributions
    144

    Default 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).
    Last edited by DrByte; 25 Jun 2013 at 07:54 PM. Reason: added alternate approach based on customer id
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.



 

 

Similar Threads

  1. Admin enter orders - for orders by phone
    By swamyg1 in forum General Questions
    Replies: 3
    Last Post: 11 Feb 2009, 12:48 AM
  2. Custom Pricing for Phone Orders
    By jloosli in forum Managing Customers and Orders
    Replies: 1
    Last Post: 3 Oct 2008, 10:20 PM
  3. SUrcharge for Orders taken over the phone
    By stecrox in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 1 Apr 2008, 03:18 AM
  4. Orders placed with blank shipping/phone/email
    By kitkendall in forum General Questions
    Replies: 3
    Last Post: 18 Feb 2008, 06:12 AM
  5. Shipping "Phone us for price" option?
    By Ulysses in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 Jun 2007, 12:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •