Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Posts
    80
    Plugin Contributions
    0

    Default How do I store a variable from the UPS module into the Orders table?

    I have a custom variable in the includes\modules\shipping\ups.php module called $shipping_methods_types that contains the available UPS methods (not the chosen method - the available methods). For example, it'll contain: 1DA,2DA,GND.

    I want to store that value in a field I've created called shipping_allowed in the orders table.

    It looks like the place to insert it is in includes\classes\order.php in the create function through $sql_data_array. I've been able to put in a dummy value in the field by adding this code: $sql_data_array[shipping_allowed] = 1;

    My problem is that I don't know how to pass the real value of $shipping_methods_types from the UPS module to the create function.

    Anyone have an idea of how I can do that? Thanks for any clues you may be able to pass onto me.

  2. #2
    Join Date
    Jun 2007
    Posts
    80
    Plugin Contributions
    0

    Default Re: How do I store a variable from the UPS module into the Orders table?

    I found a way by using a session variable:

    In ups.php:
    $_SESSION["shipping_method_types"] = $shipping_methods_types;

    In order.php:
    'shipping_allowed' => $_SESSION['shipping_method_types'],

 

 

Similar Threads

  1. How do install the UPS shipping module?
    By DaWorm33 in forum Addon Shipping Modules
    Replies: 16
    Last Post: 3 Aug 2014, 11:23 PM
  2. how can I remove the logo "Computer store the.." from the header and put my own.
    By fkalanda in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Jul 2013, 09:23 PM
  3. Can I set up the store to take orders from US orders only?
    By CueTable in forum Managing Customers and Orders
    Replies: 3
    Last Post: 28 May 2009, 07:03 AM
  4. How does the UPS module calculate shipping?
    By gemohler in forum Built-in Shipping and Payment Modules
    Replies: 11
    Last Post: 7 Mar 2009, 04:16 PM
  5. Replies: 0
    Last Post: 13 Feb 2008, 04:58 PM

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