Pay Order Again

Hello all



I’ve got a customer with an open order which they would like to process payment for, but when they press the Pay Order button on their order details page, nothing happens.



Does anyone know why this button is not re-directing to PayPal?



Thanks… :confused:

This is part of the code in order_repay.tpl, so I’m wondering if maybe something in this is wrong?



{if $payment_method.params.button}
{$payment_method.params.button}
{else}
{include file="buttons/button.tpl" but_text=$lang.repay_order but_onclick="order_repay.submit();" but_type="input" action_but="action_"}
{/if}


[quote name=‘doddles’]This is part of the code in order_repay.tpl, so I’m wondering if maybe something in this is wrong?



{if $payment_method.params.button}
{$payment_method.params.button}
{else}
{include file="buttons/button.tpl" but_text=$lang.repay_order but_onclick="order_repay.submit();" but_type="input" action_but="action_"}
{/if}


[/QUOTE]

In order to fix this bug try to replace the following part of code:

```php
$order_payment_id = $payment_methods[0]['payment_id'];
```

with this one:

```php
$first = current($payment_methods);
$order_payment_id = $first['payment_id'];
```

in the "/include/customer/orders.php" file and replace the following part of code:

```php

// order_repay.set_onsubmit(fn_can_place_order);
//]]>
```

with this one:

```php

// function fn_check_agreement()
{$ldelim}
return true;
{$rdelim}
order_repay.set_onsubmit(fn_can_place_order);
//]]>
```

in the "/skins/[CUSTOMER_ACTIVE_SKIN]/customer/orders_pages/order_repay.tpl" file.

I just made these changes and it works a treat…



Many thanks :smiley:

[quote name=‘doddles’]I just made these changes and it works a treat…



Many thanks :D[/QUOTE]



Not at all. :wink: