Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Setting order status based on zone

    I have a customer that wants to set a special order status for all orders with international shipping addresses. He wants this set when the order is placed. I thought I would just replicate the payment modules and set them to use an international zone. That works but if the payment method has a US address and the shipping is international then it breaks. Even if I were to modify the shipping module to set a status it would be changed by the payment modules. Anybody have any suggestions on how to attack this?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Setting order status based on zone

    Is there anything special about this particular order-status? Is it equivalent to "Pending" in its meaning? Or to something else?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Setting order status based on zone

    Same as pending. there's nothing special

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Setting order status based on zone

    Which payment module(s) are being used?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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.

  5. #5
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Setting order status based on zone

    Authorize.net aim
    moneyorder
    and paypal express

  6. #6
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Setting order status based on zone

    Um, all of those modules use "Pending" and "Processing" to mean specific things.

    What's the business problem you're trying to solve here?
    - Is it simply that you want to do additional vetting before approving the order?
    - Is there a reason why the standard "Pending" status wouldn't work for that?
    - (ie: Do you get zillions of in-country orders that get set to "Pending" status for some reason that would make it specifically necessary to distinguish them?)
    - Is it just that you want each module to specifically throw the order into "Pending" status even for fully-paid orders (which would otherwise normally be set to "Processing") if the shipping address is to a country that's not the same as your store's country?

    Do you handle any virtual products or downloadable items in this store?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Setting order status based on zone

    Adding this to the bottom of the update_status() method in each of those payment modules might work:
    Code:
        // CHECK IF SHIPPING ADDRESS IS OUTSIDE THE STORE'S COUNTRY, AND OVERRIDE ORDER-STATUS TO PENDING REGARDLESS OF DEFAULTS
        $sql = "select ab.entry_country_id, ab.entry_zone_id
                from " . TABLE_ADDRESS_BOOK . " ab
                where ab.customers_id = '" . (int)$_SESSION['customer_id'] . "'
                and ab.address_book_id = '" . (int)$_SESSION['sendto'] . "' LIMIT 1";
        $result = $db->Execute($sql);
        if ($result->RecordCount() > 0 && $result->fields['entry_country_id'] != STORE_COUNTRY) {   // or might use SHIPPING_ORIGIN_COUNTRY
          $this->order_status = 1;
        }
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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.

  8. #8
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Setting order status based on zone

    Quote Originally Posted by DrByte View Post
    Um, all of those modules use "Pending" and "Processing" to mean specific things.

    What's the business problem you're trying to solve here?
    - Is it simply that you want to do additional vetting before approving the order?
    - Is there a reason why the standard "Pending" status wouldn't work for that?
    - (ie: Do you get zillions of in-country orders that get set to "Pending" status for some reason that would make it specifically necessary to distinguish them?)
    - Is it just that you want each module to specifically throw the order into "Pending" status even for fully-paid orders (which would otherwise normally be set to "Processing") if the shipping address is to a country that's not the same as your store's country?

    Do you handle any virtual products or downloadable items in this store?
    Thanks Dr B,
    The business problem is that the client uses table rate shipping to calculate shipping charges. This usually works well for him but occasionally he gets an order to ship to an international address that costs him $30-50 over the charges calculated by the table rate. I have tried to get him to use live rates to calculate the charges and I've installed Conor's Advanced shipper module. This would require the client to invest time to identify products that had special shipping requirements. He has not been willing to spend the time to do that. What he wants is for all orders shipping to international addresses to go into a special status. I've created an order status "Review Shipping" for that purpose. His shipping department would review all orders in that status to compare the table rate to the actual shipping charges. If needed they would contact the customer to adjust the shipping charges. I know that he could just instruct his shipping department to do that for all international orders but for whatever reason that is not how he wants to handle it.

    I appreciate the code and will let you know if it works. Again thanks for the help.

  9. #9
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Setting order status based on zone

    I was able to add the code and it works correctly if the customer has a single address book entry. If the delivery address for the order is different than the entry in the address book it won't necessarily work. Is there any way to tie this to the delivery address or address book entry actually used?

  10. #10
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Setting order status based on zone

    $_SESSION['sendto'] is the ID of the address_book entry that the customer is using for the delivery address
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Setting A Default Order Status
    By MCS_Computers in forum General Questions
    Replies: 1
    Last Post: 21 Nov 2013, 07:40 PM
  2. Order Status Problem: 100% coupon is not setting desired status
    By LissaE in forum Managing Customers and Orders
    Replies: 4
    Last Post: 4 Apr 2011, 08:12 AM
  3. Setting different Order Status
    By Ren in forum PayPal Website Payments Pro support
    Replies: 2
    Last Post: 17 Jan 2008, 03:57 PM
  4. Order Status Setting
    By Picci in forum General Questions
    Replies: 1
    Last Post: 28 Dec 2006, 12:18 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR