Post by richardhall » Wed Mar 25, 2009 6:54 pm

After recently installing opencart and configuring it for using PayPal or a homemade payments module I've written, whenever I reach the payment information page as a customer I see the error message "Error: Payment method required!".

I've been searching through the code to try and work out whats missing and from where but as far as I can see its all in place. I've got 2 payment methods enabled and permissions have been set correctly in User Groups. Any urgent assistance really appreciated.

Newbie

Posts

Joined
Wed Mar 25, 2009 6:50 pm

Post by richardhall » Wed Mar 25, 2009 8:25 pm

Tracing through all the code to try and find the problem, I notice on line 48 of catalog/controller/checkout/payment.php that the $results array comes back empty after the following line:

Code: Select all

$results = $this->model_checkout_extension->getExtensions('payment');
Not sure why, dont think thats how it should be so looking further. Got a very tight deadline here so would really appreciate some community help. If I get this working I'll contribute a new payment module for Barclays.

-Richard

Newbie

Posts

Joined
Wed Mar 25, 2009 6:50 pm

Post by Daniel » Wed Mar 25, 2009 8:31 pm

check you have setup the activated a payment in the admin and make sure the geo zone is set to all.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by richardhall » Wed Mar 25, 2009 8:38 pm

If I run the SQL query it runs in /catalog/model/checkout/extension.php on line 4 outside of OpenCart then I get results for each payment method installed and enabled, and the returning array will hold the extension_id, type and key values for each record. Why do I get an empty array back from line 4? If the query is failing for some reason why don't I see an error message?

Line 4:

Code: Select all

$query = $this->db->query("SELECT * FROM extension WHERE `type` = '" . $this->db->escape($type) . "'");
I've tried it without the $this->db->escape function and still no rows returned.

Newbie

Posts

Joined
Wed Mar 25, 2009 6:50 pm

Post by richardhall » Wed Mar 25, 2009 8:41 pm

Changing geo zone options doesn't seem to affect this issue at all. Thanks for the suggestion though.

Newbie

Posts

Joined
Wed Mar 25, 2009 6:50 pm

Post by richardhall » Wed Mar 25, 2009 9:05 pm

After adding a simple logging mechanism to the MySQL class in /system/database/mysql.php it actually looks like the query is never being run - nor even the file being used perhaps?

So what actually happens between $results = $this->model_checkout_extension->getExtensions('payment'); being called in /catalog/controller/checkout/payment.php and the query never taking place?

Really getting confused here. Could really use the help of a developer who knows OpenCart inside out.

Thanks

Newbie

Posts

Joined
Wed Mar 25, 2009 6:50 pm

Post by Daniel » Thu Mar 26, 2009 8:59 am

Try reinstalling.

It works fine on my testing servers.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm
Who is online

Users browsing this forum: Baidu [Spider] and 19 guests