Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,829
    Plugin Contributions
    31

    Default order step 2->3 session variable info required

    This is my bug but I need a pointer.

    I have set COD as a shipping option, as it implies extra complicated costs, calculated by Advanced Shipper.

    When selected, only the COD payment option is offered on the payment page as default: I disable the other methods if COD has been selected.

    This has worked fine during my testing a long time again but now I have found that when passing from step 2 to 3 Payment Information, I get an error message “Please select a payment method for your order.” If I refresh the page the error clears and I can proceed with the order.

    Can someone tell me what variable is not set at this point/what triggers this error message so I can track it?

    Thanks
    Steve

  2. #2
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: order step 2->3 session variable info required

    I recently had a problem with Advanced Shipper and Fast & Easy Checkout working together..........if you do have FEC installed, you might disable it and try checking out again.
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  3. #3
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,829
    Plugin Contributions
    31

    Default Re: order step 2->3 session variable info required

    if you do have FEC installed, you might disable it and try checking out again.
    No I don't have any checkout mods. I don't think Advanced Shipper is the problem, it'll be my hacks... it usually is.

  4. #4
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,829
    Plugin Contributions
    31

    Default Re: order step 2->3 session variable info required

    Well, I'm stuck.

    This is what I have done:

    1) when someone selects a cod shipping option, I check for this in
    includes\modules\pages\checkout_payment\header_php.php
    and set
    $cod_shipping=true
    2) in all the payment modules I disable them like this:

    I add the variable in the class constructor:

    // class constructor
    function moneyorder() {
    global $order,$cod_shipping;
    and then

    if (IS_ADMIN_FLAG === false && $cod_shipping==TRUE)
    {$this->enabled = false;}
    Both of which work ok.

    3) in COD I have
    if (IS_ADMIN_FLAG === false && $cod_shipping != TRUE)
    {$this->enabled = false;}
    So, when I get to step 2 of 3, only the cod option is shown.

    Attached is a screenshot at this point showing relevant variables.
    I try to proceed and it bounces me back with the error message "Please select a payment method for your order." - also attached.

    From what I can see, the conditions of the error message are not met.
    if ( ($_SESSION['payment'] == '' || !is_object($$_SESSION['payment']) ) && $credit_covers === FALSE) {
    $messageStack->add_session('checkout_payment', ERROR_NO_PAYMENT_MODULE_SELECTED, 'error');
    So what else do I need to look at?
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	step2-3 pre.gif 
Views:	52 
Size:	2.6 KB 
ID:	8966   Click image for larger version. 

Name:	step2-3 post.gif 
Views:	54 
Size:	4.4 KB 
ID:	8967  

  5. #5
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,829
    Plugin Contributions
    31

    Default Re: order step 2->3 session variable info required

    Can the knowledgeables perhaps comment that this simple approach seems ok or that there is a different method I should take?

 

 

Similar Threads

  1. v154 Naming a global variable the same as a SESSION, GET or POST variable
    By torvista in forum General Questions
    Replies: 5
    Last Post: 6 Dec 2015, 11:11 AM
  2. how to add a new session variable?
    By delia in forum General Questions
    Replies: 11
    Last Post: 13 Oct 2011, 02:51 PM
  3. Add a new session variable and save to order?
    By Cindy2010 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 19 Jan 2011, 09:54 AM
  4. Location/Initialize Session Variable
    By DLLong in forum General Questions
    Replies: 1
    Last Post: 9 Aug 2008, 01:11 AM
  5. Customer session variable
    By 4ecomm in forum Managing Customers and Orders
    Replies: 4
    Last Post: 12 Oct 2007, 05:36 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