Zen Cart Logo
Forums / General Questions / order step 2->3 session variable info required

order step 2->3 session variable info required

Views: 1,122

Results 1 to 5 of 5
3 Mar 2011, 4:34 AM
#1
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

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

3 Mar 2011, 5:00 AM
#2
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

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.

3 Mar 2011, 8:45 AM
#3
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

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.

8 Mar 2011, 1:25 PM
#4
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

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=true2) 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.

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

9 Mar 2011, 10:49 PM
#5
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

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?