If this is your first visit, check our documentation. To post, register or login.
Forums / Bug Reports / 155e (personal website issue) Virtual Product prevents payment modules from loading

155e (personal website issue) Virtual Product prevents payment modules from loading

Started by wolfderby on 19 May 2017, 8:29 PM · Views: 753

Results 1 to 4 of 4
19 May 2017, 8:29 PM
#1
wolfderby avatar

wolfderby

Zen Follower

Join Date:
Dec 2008
Location:
Pittsburgh, PA
Posts:
241
Plugin Contributions:
0

155e (personal website issue) Virtual Product prevents payment modules from loading

So to be clear this issue for whatever reason only seems to exist on my site? I tested it on a fresh install of 155e and could not replicated it. I've spent more hours than I care to admit trying to figure this out and can't.

Here are the scenarios that result in the attached screencap (payment module radio button's not loading)

Payment modules DO NOT load

...w/ $0.00 cart total (walk in shipping method) (loads "Free Order" w/o radio button by design)

...w/ virtual product alone (Don't get to choose shipping method; by design)

...w/ virtual product + any other products (any shipping method)

Payment modules DO load

...w/o virtual products in cart.

...w/ $0.00 cart total (+ $shipping ie ups shipping method)

...if I disable the paypal module I get the "Sorry we are not accepting payments from your region at this time"

There aren't zone restrictions on my payment modules (like cod or cash in-store or square in-store)... yes they're "installed." I removed and re-installed them in various sequences

I noticed the naviation section of the $_SESSION variable did not contain the products_id when I had a virtual product in the cart.

19 May 2017, 8:53 PM
#2
wolfderby avatar

wolfderby

Zen Follower

Join Date:
Dec 2008
Location:
Pittsburgh, PA
Posts:
241
Plugin Contributions:
0

Re: 155e (personal website issue) Virtual Product prevents payment modules from loading

I couldn't figure out how the

$selection = $payment_modules->selection();

... works in includes/templates/my_template/templates/tpl_checkout_payment_default.php ~ line 114

...I looked at includes/classes/payment.php

and noticed GLOBALS.

so when I print_r($GLOBALS)

it shows that within [payment_modules][paymentClass][enabled] is blank for the payment modules that don't show (paypal has a 1)

couldn't that pull the value from the configuration table as to whether it's "installed" in admin > modules > payment? (I have them showing "true")?

I brought this site up from latin1 1.3.9 to utf-8 perhaps it's not seeing the "true"?

19 May 2017, 9:17 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: 155e (personal website issue) Virtual Product prevents payment modules from loading

So, to further try to establish clarification, the issue is occurring on a "long-standing" store that has been upgraded to ZC 1.5.5e, but the issue is not replicable in a new store.

So, some things to consider if haven't already tried, and have tried, please identify.

Said, doesn't occur in a fresh install, if that is with just the default ZC product and not including importing and updating the existing store data, then suggest using the new vanilla fileset to import and update a test version to see if it happens again or not.

What if any recent logs files have been generated? It appears that the ZC history question has been answered, so another is how was the site/files upgraded? Were "old" files renamed instead of replaced or removed prior to the new files being inserted/stored?

The "blank" value is likely a result of a false which when echoed will be blank. How are the payment modules modified if in any way? How is the includes/modules/pages/checkout_payment directory and it's files different than a vanilla install?

The sessions data presented seems to imply/report the same thing that is being seen, only the enabled payment module(s) are displayed.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

19 May 2017, 9:28 PM
#4
wolfderby avatar

wolfderby

Zen Follower

Join Date:
Dec 2008
Location:
Pittsburgh, PA
Posts:
241
Plugin Contributions:
0

Re: 155e (personal website issue) Virtual Product prevents payment modules from loading

Found the answer...

I have a custom payment module:
includes/modules/payment/cash.php

commented this out:
// disable the module if the order only contains virtual products
/if ($this->enabled == true) {
if ($order->content_type != 'physical') {
$this->enabled = false;
}
}
/

Thanks for the good advice mc12345678, some good approaches I'll keep in the troubleshooting tackle box for next excuse I find to stare at code for hours on end.

classes and things w/ -> arrows still confuse me quite a bit, as far as finding where the code is.

I think typing this post out helped me as well!