-- HikaShop version -- : 6.3
-- Joomla version -- : 6.0.2
-- PHP version -- : 8.3
Hello dear support team,
We have developed a custom component for Joomla that allows our users to collect points.
We need to develop a payment gateway plugin so that users can use their accumulated points to pay for products in the store (HikaShop).
There are two main scenarios:
1. The user’s points are equal to or greater than the total amount of the shopping cart. In this case, the user does not need to make any bank payment.
2. The user’s points are less than the total amount of the shopping cart. In this case, an amount equal to the user’s available points should be deducted from the cart total, and the remaining balance should be paid through the bank payment gateway.
In the first scenario, we have no issues, because we can redirect the user to the after_end page in the onAfterOrderConfirm event and confirm the order in the onPaymentNotification function.
However, for the second scenario, we need your guidance on how we can, via a plugin, display an extra line (as a discount or any suitable label) before the total payment block shown to the user (similar to a coupon discount). This line should indicate that a certain amount has been deducted from the cart total based on the user’s points—for example: “An amount of X has been deducted from the cart total due to your points.”
I hope I have been able to clearly explain my requirement.
If possible, please provide assistance in the form of code examples, as I am also a programmer and have a reasonable level of familiarity with HikaShop.
Thank you very much.