Order based coupons

  • Posts: 203
  • Thank you received: 13
2 days 6 hours ago #367156

-- HikaShop version -- : 5.1.6
-- Joomla version -- : 5.3.0
-- PHP version -- : 8.2

Hi. i want to create an order based coupon.
whenever an order is paid, an specific coupon i want to generate to put into orders notify email with limited time (for example 7 days after paymanet)

i now this is a customization but i only need some tips on how to develop it

can it be done with mass actions ?

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

  • Posts: 83824
  • Thank you received: 13571
  • MODERATOR
2 days 3 hours ago #367159

Hi,

You could use AcyMailing for that. It has an integration with HikaShop to automatically generate user specific coupons and send an email to the user with the coupon code after an order:
docs.acymailing.com/addons/joomla-add-ons/hikashop
That would save you a lot of time.

One alternative would be to use HikaSerial which has a coupon generator plugin:
www.hikashop.com/support/documentation/1...ugins-coupongen.html
So you would add a serial pack with that coupon plugin configured to each product, and HikaSerial would then add a serial for each product of each order with the corresponding coupons generated. And the serials (coupon codes) would be included in the email sent to the customer after the payment.
However, it's less flexible than what you can do with AcyMailing, so it might not fit your purpose.

A final solution is to develop your own plugin. You would implement the onAfterOrderCreate or onAfterOrderUpdate event:
www.hikashop.com/support/documentation/6...l#onAfterOrderCreate
In there, you would check that you want to generate the coupon for the order being processed, generate the coupon with the save method of class.discount, and then trigger the sending of an email with the Joomla email API:
docs.joomla.org/Sending_email_from_extensions

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

Time to create page: 0.054 seconds
Powered by Kunena Forum