[Skip to main content](#vessel-content)

#   Pay Now button of My Orders display.

##

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 8 months ago [\#9383](#9383) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  *[Pay Now button of My Orders display.](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#9383 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")* was created by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")*

The new *Pay Now* feature in customer *My Orders* listing looks good.

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):
Code:

function onPaymentDisplay(&amp;$order,&amp;$methods,&amp;$usable_methods){ if (!$this-&gt;isShippingValid(@$order-&gt;shipping)) return false; if (empty($order-&gt;total)) return false; if (empty($methods)) return false; $found = false; foreach($methods as $method){ if($method-&gt;payment_type!='bf_paypal'){ continue; } if (!$method-&gt;enabled) { continue; } if(empty($order-&gt;total)){ continue; } if(!empty($method-&gt;payment_zone_namekey)){ $zoneClass=hikashop::get('class.zone'); $zones = $zoneClass-&gt;getOrderZones($order); if(!in_array($method-&gt;payment_zone_namekey,$zones)){ continue; } } $currencyClass = hikashop::get('class.currency'); $null=null; $currency_id = intval(@$order-&gt;total-&gt;prices[0]-&gt;price_currency_id); $currency = $currencyClass-&gt;getCurrencies($currency_id,$null); if(!empty($currency) &amp;&amp; !in_array(@$currency[$currency_id]-&gt;currency_code,$this-&gt;accepted_currencies)){ continue; } $usable_methods[$method-&gt;ordering]=$method; $found = true; } return $found; }

**(d) The paypal *onPaymentSave()* function does not check the value returned by the call to *onPaymentDisplay()***. My own version looks like this: Code:

function onPaymentSave(&amp;$cart,&amp;$rates,&amp;$payment_id){ $usable = array(); if ($this-&gt;onPaymentDisplay($cart,$rates,$usable)) { $payment_id = (int) $payment_id; foreach($usable as $usable_method){ if($usable_method-&gt;payment_id==$payment_id){ return $usable_method; } } } return false; }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86316
- Thank you received: 14276
-
-

15 years 8 months ago [\#9403](#9403) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Pay Now button of My Orders display.](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#9403 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

a and b/ Indeed, for now the onPaymentDisplay function is not triggered so everything is displayed. we'll have to look at that but that will mean that a LOT of data will have to be loaded as we will have to check the payment methods for each order and load the whole order data for each one...Over a few tens of orders, the system will probably just crash because of all the queries which have to be made for that.

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 8 months ago [\#9556](#9556) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Pay Now button of My Orders display.](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#9556 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

For (a) and (b) the *Pay Now* feature could be moved to the order display (shown when customer clicks order number).
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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86316
- Thank you received: 14276
-
-

15 years 8 months ago [\#9564](#9564) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Pay Now button of My Orders display.](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#9564 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

We released a new version of HikaShopw which loads the data and only display the payment methods it should.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 7 months ago [\#11181](#11181) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Disabled payment methods in Sales Admin Form](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#11181 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

Disabled payment methods also appear in the drop-down list of the Administration / Sales form.

Should function *load()* in *types/plugins.php* after line 69 do a check like this: Code:

else if (empty($method-&gt;enabled)) continue;

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86316
- Thank you received: 14276
-
-

15 years 7 months ago [\#11188](#11188) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Disabled payment methods in Sales Admin Form](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#11188 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

It's done on purpose. It allows you to change the payment method of an order after talking with the user so that he can pay with it without having to publish the payment method on the checkout.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 7 months ago [\#11189](#11189) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Disabled payment methods in Sales Admin Form](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#11189 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

Makes sense, but it is confusing.

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86316
- Thank you received: 14276
-
-

15 years 7 months ago [\#11193](#11193) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Disabled payment methods in Sales Admin Form](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#11193 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

We indeed have to improve the payment plugins options... There is a bug where two set of options get in the table and mess the display but we couldn't find the cause of the problem yet. Having the possibility to remove the hikashop options of the payment plugins should do that "hide/display" parameter and make it easier to solve the other problem.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 7 months ago [\#11196](#11196) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Disabled payment methods in Sales Admin Form](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#11196 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

Just had a quick play with a shipping method I am not using.
Looks like the same hide/display feature would also be useful on the shipping methods.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86316
- Thank you received: 14276
-
-

15 years 7 months ago [\#11198](#11198) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Disabled payment methods in Sales Admin Form](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#11198 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

Both payment and shipping handling have the same behaviour indeed.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 7 months ago [\#11260](#11260) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Shipping information missing](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#11260 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

When Pay Now button clicked in *My Orders* Shipping information *$order-&gt;cart-&gt;shipping* is missing in onAfterOrderConfirm() routine of payment plugin.

It is present during normal checkout.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86316
- Thank you received: 14276
-
-

15 years 7 months ago [\#11262](#11262) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Shipping information missing](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#11262 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

Yes, the $order-&gt;cart object is not generated in the same way. And since no payment plugin need to use the shipping object, we didn't put the code to load it.
Is that something you need ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 7 months ago [\#11263](#11263) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Shipping information missing](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#11263 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

In the payment plug-in I am using it to get:
Code:

$order-&gt;cart-&gt;shipping-&gt;shipping_name $order-&gt;cart-&gt;shipping-&gt;shipping_price_with_tax $order-&gt;cart-&gt;shipping-&gt;shipping_price

In the normal checkout process I could not see anywhere else to get these.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86316
- Thank you received: 14276
-
-

15 years 7 months ago [\#11293](#11293) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Shipping information missing](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#11293 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

What you could try is to add the code below:
$shippingClass = hikashop::get('class.shipping');
$methods = $shippingClass-&gt;getMethods($order-&gt;cart);
$data = hikashop::import('hikashopshipping',$order-&gt;order_shipping_method);
$order-&gt;cart-&gt;shipping = $data-&gt;onShippingSave($order-&gt;cart,$methods,$order-&gt;order_shipping_id);

before the code:
ob_start();
$data = hikashop::import('hikashoppayment',$order-&gt;order_payment_method);

in the file components/com_hikashop/controllers/order.php
I didn't test so it might not work...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 7 months ago [\#11309](#11309) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Shipping information missing](/forum/3-bug-report/9383-pay-now-button-of-my-orders-display#11309 "The new Pay Now feature in customer My Orders listing looks good.  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&#91;/&#93; 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):  (d) The paypal onPaymentSave() function does not check the value returned by the call to onPaymentDisplay(). My own version looks like this:")*

That works, thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MzgzLXBheS1ub3ctYnV0dG9uLW9mLW15LW9yZGVycy1kaXNwbGF5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.181 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
