Pay Now button of My Orders display.
- brainforge
-
Topic Author
- Offline
However there are 2 serious problems with the drop-down box,
Looking again at the paypal plugin, for example, found a couple of further issues (which I suppose could be irrelevant in amyn cases, but would be good to see fixed in the generic versions).
(a) It lists all payment methods defined in the payment table, including those which are disabled in the administration screen.
(b) It does not call the payment method onPaymentDisplay() function with the result that it displays all payment methods including those which are not valid in the context of the current order.
(c) Looking at the paypal onPaymentDisplay() function it does not check the enabled[/] flag.
This seems to be a generic problem of all the payment plug-ins.
The latest version of my own paypal plug-in onPaymentDisplay() function now looks like this (also showing call to my routine to check if paypal is compatible with selected shipping method):
Please Log in or Create an account to join the conversation.
c/That is not needed for the display as the function is only triggered for the published plugins. However, since that function is called from the onPaymentSave when the payment is selected, it would indeed be wise to check it to avoid hacks where a user would try to use a payment method which is not published...The consequences are really small so it's not really a problem.
d/ There is no need to check the return of the onPaymentDisplay function. That function will set the usable rate in the $usable variable. If the variable is empty, that means that there is no result and that it's false. The behavior will be exactly the same with or without the if.
Please Log in or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
Could be placed in the header next to the Print and Cancel buttons.
That way all the information about the particular order is to hand.
For now I will turn off the Payment of orders not paid immediately feature.
(c) Best to put enabled check in for completeness.
(d) Agreed, but including the if makes the code more readable and might be safer in the long term if some extra functionality gets added into that function.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
Should function load() in types/plugins.php after line 69 do a check like this:
Could put the check in before line 67, but that would cause problems if a previously used payment method has since been disabled.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
For instance Moneybookers appears in my list, but are not using it, and may never.
Looks like if someone experiments with one of the payment methods (enabled it, changed config, disabled it) then it is always there.
If the payment method has never been touched then it does not appear.
Deleting the method from the payment table appears to solve the issue - but a less dangerous hide/display parameter would be preferred.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
Looks like the same hide/display feature would also be useful on the shipping methods.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
It is present during normal checkout.
Please Log in or Create an account to join the conversation.
Is that something you need ?
Please Log in or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
In the normal checkout process I could not see anywhere else to get these.
Please Log in or Create an account to join the conversation.
$shippingClass = hikashop::get('class.shipping');
$methods = $shippingClass->getMethods($order->cart);
$data = hikashop::import('hikashopshipping',$order->order_shipping_method);
$order->cart->shipping = $data->onShippingSave($order->cart,$methods,$order->order_shipping_id);
before the code:
ob_start();
$data = hikashop::import('hikashoppayment',$order->order_payment_method);
in the file components/com_hikashop/controllers/order.php
I didn't test so it might not work...
Please Log in or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
Please Log in or Create an account to join the conversation.