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

#   Payment of orders not paid immediately

##

- **[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 [\#11322](#11322) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  *[Payment of orders not paid immediately](/forum/2-general-talk-about-hikashop/11322-payment-of-orders-not-paid-immediately#11322 "It would be useful if shop owner could enable it for a specific order, but leave it disabled for the whole site.  I have set the checkout to return to the customer My Orders page once the order has been placed.  One difficulty I have noticed is that the customer can get back there before the paypal payment confirmation has been received. The order shows a status of created (that's OK), but the Pay now button is displayed. If the customer clicks that Paypal objects because it has seen then order no. before and the status of the order gets changed to cancelled.")* was created by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")*

It would be useful if shop owner could enable it for a specific order, but leave it disabled for the whole site.

I have set the checkout to return to the customer My Orders page once the order has been placed.

One difficulty I have noticed is that the customer can get back there before the paypal payment confirmation has been received. The order shows a status of created (that's OK), but the Pay now button is displayed. If the customer clicks that Paypal objects because it has seen then order no. before and the status of the order gets changed to cancelled.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzExMzIyLXBheW1lbnQtb2Ytb3JkZXJzLW5vdC1wYWlkLWltbWVkaWF0ZWx5P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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: 86322
- Thank you received: 14281
-
-

15 years 7 months ago [\#11330](#11330) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Payment of orders not paid immediately](/forum/2-general-talk-about-hikashop/11322-payment-of-orders-not-paid-immediately#11330 "It would be useful if shop owner could enable it for a specific order, but leave it disabled for the whole site.  I have set the checkout to return to the customer My Orders page once the order has been placed.  One difficulty I have noticed is that the customer can get back there before the paypal payment confirmation has been received. The order shows a status of created (that's OK), but the Pay now button is displayed. If the customer clicks that Paypal objects because it has seen then order no. before and the status of the order gets changed to cancelled.")*

I'm a bit reluctant to add a column in the order table (which already has a lot of columns) just for that.

What you could do is edit the listing file of the view order of the front end via the menu Display-&gt;Views and just add such code:
if(time()-$this-&gt;row-&gt;order_created&gt;900){
// pay now button code
}

900 means that the button won't be displayed if the order is less than 15 minutes old.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzExMzIyLXBheW1lbnQtb2Ytb3JkZXJzLW5vdC1wYWlkLWltbWVkaWF0ZWx5P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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 [\#11334](#11334) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Payment of orders not paid immediately](/forum/2-general-talk-about-hikashop/11322-payment-of-orders-not-paid-immediately#11334 "It would be useful if shop owner could enable it for a specific order, but leave it disabled for the whole site.  I have set the checkout to return to the customer My Orders page once the order has been placed.  One difficulty I have noticed is that the customer can get back there before the paypal payment confirmation has been received. The order shows a status of created (that's OK), but the Pay now button is displayed. If the customer clicks that Paypal objects because it has seen then order no. before and the status of the order gets changed to cancelled.")*

Good idea, will do something along those lines.
Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzExMzIyLXBheW1lbnQtb2Ytb3JkZXJzLW5vdC1wYWlkLWltbWVkaWF0ZWx5P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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 -  15 years 7 months ago [\#11562](#11562) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Payment of orders not paid immediately](/forum/2-general-talk-about-hikashop/11322-payment-of-orders-not-paid-immediately#11562 "It would be useful if shop owner could enable it for a specific order, but leave it disabled for the whole site.  I have set the checkout to return to the customer My Orders page once the order has been placed.  One difficulty I have noticed is that the customer can get back there before the paypal payment confirmation has been received. The order shows a status of created (that's OK), but the Pay now button is displayed. If the customer clicks that Paypal objects because it has seen then order no. before and the status of the order gets changed to cancelled.")*

Took this one stage further:

(a) Created an order status called '*unpaid*'.

(b) Added the following code to *listing.php*.
Code:

echo '&lt;span class="hikashop_order_listing_status"&gt;'; echo $this-&gt;order_statuses-&gt;trans(ucwords($row-&gt;order_status)); if ($row-&gt;order_status == 'unpaid' &amp;&amp; empty($row-&gt;show_payment_button)) { $row-&gt;show_payment_button = true; $pluginsPayment = hikashop::get('type.plugins'); $pluginsPayment-&gt;type='payment'; $this-&gt;assignRef('payment',$pluginsPayment); $config =&amp; hikashop::config(); $payment_change = $config-&gt;get('allow_payment_change',1); $this-&gt;assignRef('payment_change',$payment_change); } echo '&lt;/span&gt;';

(c) This gives the store owner the ability to change the payment method / order status and then customer is able to pay using the *Pay Now* button. E.G. If they chose pay on delivery, but then decided / were asked to pay in advance by Paypal - or there were other issues with the order which required negotiation.

(d) An interesting feature I spotted when adding the order status is that Hikashop supports a heirarchy of order statii. I.E. I created *unpaid* under *created* - are there plans to use this feature in the future - maybe possibilities of enhancing what I have just done even further.

Last edit: 15 years 7 months ago by [brainforge](/forum/user/423-brainforge "View brainforge's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzExMzIyLXBheW1lbnQtb2Ytb3JkZXJzLW5vdC1wYWlkLWltbWVkaWF0ZWx5P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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: 86322
- Thank you received: 14281
-
-

15 years 7 months ago [\#11581](#11581) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Payment of orders not paid immediately](/forum/2-general-talk-about-hikashop/11322-payment-of-orders-not-paid-immediately#11581 "It would be useful if shop owner could enable it for a specific order, but leave it disabled for the whole site.  I have set the checkout to return to the customer My Orders page once the order has been placed.  One difficulty I have noticed is that the customer can get back there before the paypal payment confirmation has been received. The order shows a status of created (that's OK), but the Pay now button is displayed. If the customer clicks that Paypal objects because it has seen then order no. before and the status of the order gets changed to cancelled.")*

Your post lead us to a nice idea: instead of adding an option in the orders, we could just add a new option in the config where you could set the order statuses for which the button can be displayed and not just use the option order_created_status.

We'll see if others need that in the future. For now, your work around is easy to add in the file listing of the view order of the front end via the menu Display-&gt;Views (I precise for other users who would like to do the same), so we'll wait for more feedbacks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzExMzIyLXBheW1lbnQtb2Ytb3JkZXJzLW5vdC1wYWlkLWltbWVkaWF0ZWx5P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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.135 seconds

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