order listing payment option on different statuses

  • Posts: 506
  • Thank you received: 21
  • Hikashop Business
9 years 8 months ago #164988

-- url of the page with the problem -- : www.giftprint.nl/giftprint.nl/index.php/...in/mijn-bestellingen
-- HikaShop version -- : hikashop_business_2.3.2_2014-07-19
-- Joomla version -- : 3.3
-- PHP version -- : 5.4.25-1
-- Browser(s) name and version -- : Chrome 36.0.1985.125

Hi,

When my customers want to pay afterwards, they can in the order listing. I made an adjustment in Hikashop 2.0 in the view listing, but that doesn't work anymore in this new version. I want my customers to be able to pay not only when te status is "Created", but also for other statuses.

In the former version I altered this line:

<?php if($row->order_status=='Confirmed'|| $row->order_status=='De order is in productie en in afwachting van uw betaling' && bccomp($row->order_full_price,0,5)>0){ ?>
<form action="<?php echo $orderUrl; ?>" method="post" name="adminForm_<?php echo $row->order_id; ?>">

but if I do the same in the new file it doesnt work as I get the message in the frontend: "This order can't be paid anymore".

I guess I have to alter this line:

echo $this->order_statuses->trans($row->order_status); ?></span>
<?php if(!empty($row->show_payment_button) && bccomp($row->order_full_price,0,5)>0){ ?>

What do I have to add here?

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

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #164993

Hi,

I think that just removing:

!empty($row->show_payment_button) &&
And adding your custom check instead should be sufficient.

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

  • Posts: 506
  • Thank you received: 21
  • Hikashop Business
9 years 8 months ago #165096

Hi Xavier,

Thanks for your quick reply. What your suggeting is just what I did. But then I get a message in the frontend when trying to pay: "The order xxxx cannot be paid anymore." Something is preventing the excecution of the payment.
See screenshot:



Michel.

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #165101

Hi,

There seems to be indeed and fortunately more checks for that.
The checks are based on the order status, if the status is a confirmed one, so we can no more pay.

So, why not create new order statuses ? This way, by default, they will not be recognized as confirmed one, and will allow to pay the order later. Could that be a good solution, or you really need to allow the payment on confirmed orders ?

The following user(s) said Thank You: MichaelTunnell

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

  • Posts: 506
  • Thank you received: 21
  • Hikashop Business
9 years 8 months ago #165232

Hi Xavier,

No, that would be fine. The problem is that the payment option is only shown when the status is "created". In all the other statuses the payment option is not available.

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
9 years 8 months ago #165312

Hi,

You would have to also remove the code:

$default_status = $config->get('order_created_status','created');
		if($order->order_status!=$default_status){
			$app =& JFactory::getApplication();
			$app->enqueueMessage('The order '.$order->order_number.' cannot be paid anymore.');
			parent::listing();
			return false;
		}
from components/com_hikashop/controllers/order.php if you want to allow other statuses that "created" for the display of the payment button.

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

Time to create page: 0.088 seconds
Powered by Kunena Forum