Need a payment for ZERO total amount (coupon)

  • Posts: 79
  • Thank you received: 0
9 years 1 week ago #220303

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5.23

Hi
I have coupons in my shop and because of that it is possible that the total price of an order is zero.
I need to display a message in the checkout step "payment", so I trying to setup a "payment" for zero total amount orders.

But, I can't catch them with a payment method.

I've tried limit maximum amount 0
I've tried limit minimum amount 0.1

But, the payment method is ignored.
I've tried to use the collectondelivery.

It is possible it is ignored because there is nothing to pay?
Is there a solution for this then?

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 1 week ago #220333

Hi,

When the total amount is 0, the payment methods selection is not displayed. The order is automatically created without any payment method when the customer clicks on the finish button.

In that case, you would have to modify the file "payment" of the view "checkout" via the menu Display>Views in order to add your custom text.

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

  • Posts: 79
  • Thank you received: 0
9 years 1 week ago #220550

Hello,
but this would affect all orders and not all my orders are zero.

I need a way to select a payment for the zero amount orders
or
can i use an if statement in the file "payment" of the view "checkout? If so, please show an example

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 1 week ago #220561

Hi,

Yes, you'll have to use an if statement.
It's really easy if you know a bit of PHP...
You can use such code for example at the end of the file:

else{ echo "my text for 0 total amount"; }

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

Time to create page: 0.056 seconds
Powered by Kunena Forum