Change of getpayments() in v1.5.2

  • Posts: 290
  • Thank you received: 4
  • Hikashop Business
11 years 6 days ago #20236

In getPayments() of payment.php the else section below has been added to queue the no payments found message.

$app =& JFactory::getApplication();
$app->enqueueMessage('No payment methods found');

There are a couple of issues with this:

(a) getpayments() is getting called 3 times - not tracked down where each call is coming from with the result that I get 3 messages.

(b) In my payment plug-ins I have the following code
$user = hikashop::loadUser(true);
if (!$user) return false;
which was working OK, but now has the unfortunate effect of raising those error messages if the user is not logged in.

In the shop I am currently looking at I don't think this matters, but would have to check elsewhere as to why I originally put this condition in. Shall I remove the condition for now?

Please Log in or Create an account to join the conversation.

  • Posts: 75905
  • Thank you received: 11855
11 years 6 days ago #20248

a/ adding:
after the message will avoid having it several times. We'll add that to next release.

b/ the return false; has no effect on the display of the message. The message is only displayed when no payment methods are found, ie. when $usable_methods is empty.
Looking at your code, that check doesn't seem useful indeed.

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum