Bank transfer end

  • Posts: 1119
  • Thank you received: 114
7 years 6 months ago #267408

Hi,

I am looking for advise. We need to modify checkout bank transfer end page. I think the easiest way would be to create override of the banktransfer_end.php and add all our modifications there. However this would change order created email too.

Is there a way to modify that file and have different layout for email and checkout end?

Or we should do it via hikashop view override. As we have 4 payment methods it would require to add 4 if conditions....

I am looking for easiest solution.

Kind Regards

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

  • Posts: 82721
  • Thank you received: 13338
  • MODERATOR
7 years 6 months ago #267417

Hi,

For the emails, you can edit them via the menu System>Emails and add an "if" on $data->order_payment_id or $data->order_payment_method
www.hikashop.com/forum/4-how-to/76543-wh...nt-method.html#82369
For the end of the checkout, you can edit the file "end" of the view "checkout" and base your code on :
www.hikashop.com/forum/checkout/865128-d...kout-end.html#226549
to load the order data and use $order->order_payment_id and $order->order_payment_method for your "if" in your code.

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

  • Posts: 1119
  • Thank you received: 114
7 years 6 months ago #267459

Hi,

Thanks for replay. I think you have misunderstood a little bit my question. But anyway i get you point that we should modify end view file and add if condition for every payment method. It will require more work then modifyingpayment plugins ...end.php file.

Have a great Easter

Kind Regards

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

  • Posts: 1119
  • Thank you received: 114
7 years 6 months ago #267577

Hi,

I do have one more question.

I have added this to end view file to check how it works.

....  
echo '<br/>'.JText::sprintf('YOU_CAN_NOW_ACCESS_YOUR_ORDER_HERE', $url);
	
}elseif($this->order->order_payment_id == '15'){ ?>
	
	<div class="checkout_end_notice checkout-body">
    <?php echo $this->order->order_number; ?>
    </div>
	
<? } else {
	echo $this->html;
.......

It works fine for manual bank transfer payment plugin.
The question is how we can redirect to same page/url ( ..../checkout/confirm/cart_id-4576 ) with payment method like Paypal? I assume that the after_end view file is used with such payment methods?

Right now we have set return url to article in plugin config... If we remove it, it redirects to home page with thank you message.

Kind Regards

Last edit: 7 years 6 months ago by kyratn.

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

  • Posts: 82721
  • Thank you received: 13338
  • MODERATOR
7 years 6 months ago #267592

Hi,

That's right, you would have to add your code to after_end and remove the return URL of your payment method.

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

  • Posts: 1119
  • Thank you received: 114
7 years 6 months ago #268398

Hi,

I need another help here. I am trying to modify after_end view.

How can I have same url with cart_id? I could create hidden menu item and redirect it there but is there a way to have same page like end view does? ( www.mysite.com/checkout/confirm/cart_id-4576 )
Right now it redirects to home page and shows all details between modules...

Thank you

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

  • Posts: 82721
  • Thank you received: 13338
  • MODERATOR
7 years 6 months ago #268408

Hi,

That URL will only work if you have a cart with the id 4576 linked to your user and that you went through the checkout.
Otherwise, it will redirect you to the checkout or the URL when the cart is empty.
Unfortunately, I don't have enough context on what you're trying to do or why to be able to say more than that.

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

  • Posts: 1119
  • Thank you received: 114
7 years 6 months ago #268437

Hi,

I will try to be more clear.
Right now when you do checkout with manual bank transfer payment at thank you page end view use menu item which is created via joomla...however after_end view does not, it redirects to home page. I would like to have same behiviour with after_end.

I have done some thank you page and would like to have it for all payment methods. Only aome text would be different based on payment id....

I hope you see my point.

Thanks

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

  • Posts: 82721
  • Thank you received: 13338
  • MODERATOR
7 years 6 months ago #268444

Hi,

Then I don't see why you're talking about the confirm page ?
Why not just enter the URL of your custom thank you page in the "return URL" setting of your payment methods ?
If you need to get the payment method name of the order in your custom thank you page, you can use such PHP code:

<?php
$app = JFactory::getApplication();
$order_id = $app->getUserState('com_hikashop.order_id');
$orderClass = hikashop_get('class.order');
$order = $orderClass->get($order_id);
echo $order->order_payment_method;
?>

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

  • Posts: 1119
  • Thank you received: 114
7 years 6 months ago #268464

Hi,

Cause I don't want it be accessed later. With end view all is fine. If you try to access checkout menu item you will get cart empty message. Is there a way to have same behavior?

Thanks

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

  • Posts: 82721
  • Thank you received: 13338
  • MODERATOR
7 years 6 months ago #268519

Hi,

Sure, for example:
<?php
$app = JFactory::getApplication();
$order_id = $app->getUserState('com_hikashop.order_id');
if(empty($order_id))
$app->redirect('URL where you want to redirect when the order_id is not present');
?>

The following user(s) said Thank You: kyratn

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

Time to create page: 0.070 seconds
Powered by Kunena Forum