Tricky conditions - can you help please?

  • Posts: 2143
  • Thank you received: 747
10 years 6 months ago #156245

-- url of the page with the problem -- : local
-- HikaShop version -- : 2.3.0 still, soon 2.3.1
-- Joomla version -- : 3.3

Struggling with tricky conditions, unable to get it set up no matter what configs and parameters I try. Perhaps you can master the challenge and tell me what and how to do?

Conditions:
While the checkout is straight-forward and simple, the following steps of order management are several. That's causing a few additional order statuses and is not a problem per se. But I seem to be too stupid to get the payment method(s) in line with this.
In short, the customer will pay at a later stage in the order process, and must until then not be bothered with the payment method details/terms.

What I've done:

  • Extended order statuses so the complete list goes like this:
    1. "created" = as usual, default upon checkout, and accordingly set as "Default order status". It's tentative at this point, not a firm purchase order, no payment to be made, yet.
    2. "confirmed" = as usual, to be triggered manually by admin in backend upon checking a few things to be able to proceed. It's only to tell customer that we are able to proceed. Still no payment to be made, as now customer is due to confirm final details on his side.
    3. "pending payment" = a new status, upon customer having confirmed details. As the name implies, we want him to pay now - in 99.99% of all cases by bank transfer. So, this is the point where we want to switch payment method (in the backend) to bank transfer, and customer to receive notification incl bank account details. These should ideally also be available from the order listing or view in the frontend under customer's account. Other than that, it's also set as "Invoice order status"
    4. It then continues with order statuses "paid" etc, where payment method details are irrelevant again, obviously.
  • Set "Payment of orders not paid immediately to "Yes".
  • Tried alternating settings for "Allow customers to change their payment method after checkout"...
  • Modded the COD payment method (because it's the classic "pay later" one), so it says "no payment yet", and used it as default in checkout by
    • hiding the bank transfer in checkout with "display: none;",
    • setting both "Auto select default..." and "Auto submit..." parameters under "Shipping & Payment" to "Yes".
  • Applied this "no payment yet" method to order status "created".

So far, so good. Trouble, and my struggling, really starts when trying to enable this 'switching to bank transfer' along with what's supposed to show along with it.

So, I set up bank transfer as another payment method, and applied it to order status "pending payment". As mentioned, I'm hiding it from checkout the simple way = per CSS.

Again, what I want to be able to do while the order is in status "confirmed" still with payment method "no payment yet" - and only then! - is to switch in the backend to payment "bank transfer", so the order status goes to "pending payment" (this works), the customer gets email notification (can be triggered = works) including bank account info (does not work/show), and the customer being able to click on order status or "pay now" in frontend order listing and see bank account info there as well (does not work at all).

How can I get this all to work, meaning to show? It works with "bank transfer" applied to core order statuses, at least to "created". What am I missing to do, or not to do? Can the above be realised at all with HikaShop's on-board features?

(I hope I was able to explain conditions and problems sufficiently. If you require other or more info, I'll happily provide.)

Many thanks for trying this shoe on yourself and telling me how I can make it fit... ;)


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
10 years 6 months ago #156259

Hi,

The bank account details of the bank transfer payment method are only added to the order creation notification email. That's why you don't see them in the notification email when you change the status.
You would have to get the code which handles that in the "preload" of the order creation notification email and copy/paste it to the preload of the order status notification email so that it displays in the order status notification when the status is correct and that the payment method is bank transfer. You can edit the emails via the menu System>Emails.

For the "pay now" button of the orders listing of the orders listing of the customers, it will only display if the status of the order is the "Default order status". The system cannot easily be overridden to handle another status than this one (usually, you want to display the button only if the order still has its initial status). You would have to edit both the pay function of the file components/com_hikashop/controllers/order.php and the listing function of the file components/com_hikashop/views/order/view.html.php in order to handle the status you want for the display of the button/bank transfer details.

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

  • Posts: 2143
  • Thank you received: 747
10 years 6 months ago #156310

Thank you again for a very sufficient answer, Nicolas. Do you ever sleep?

Ouch, it's not as simple as I was hoping, no wonder I didn't get it to work 'out of the box'. I'll see if I can move the code in between emails.

Though it'd require some more attention and manual action each time, I've also been thinking briefly about a custom field as a workaround, probably read-only, which could be displayed in the order view and mail once the good status is reached. Haven't been digging more into this, yet. Any one-line comment if it seems feasible to follow further?

Many thanks again.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
10 years 6 months ago #156329

In your case, I would simply have a Joomla article with the general payment information. Then, give a link to it on the orders listing all the time. And for the order status email, you could simply add it if the status is what you want with a simple line of code:

<?php if($data->order_status=='my_status') echo '<a href="http://mywebsite.com/my-article.html">bank transfer info</a>'

The following user(s) said Thank You: lousyfool

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

  • Posts: 2143
  • Thank you received: 747
10 years 6 months ago #156523

Good idea, thank you.

I'll fiddle with it later again, now in the middle of styling emails...


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

Time to create page: 0.061 seconds
Powered by Kunena Forum