Integration for 'Events Booking - Joomla Events Registration' by joomdonation


  • Default avatar
    necati    
     5 years ago
    0

    Hello,

    I'm using the AwoCoupon Pro to sell Gift certificates on a client's website.
    The website uses the events booking component from joomdonation and currently there are two coupon-systems:
    1. AwoCoupon for virtuemart
    2. events booking coupons

    Is there any way to integrate awocoupon into the events booking component?
    If not, how can I validate and unpublish awocoupon coupons in php, so I can build the integration by myself?

    Thanks in advance, any kind of assistance is highly appreciated.
  • Default avatar
    necati    
     5 years ago
    0

    Hello again,


    I've begun to implement support for awocoupon pro in the events booking component.

    The validation and redeeming functionalities (just the basics) already working nicely on the events booking-side without the need of customizing any awocoupon classes. This is pretty easy by overriding two events booking classes.


    Now I'm stuck at updating the model inside awocoupon.

    For example: I have an event that costs 150€ (vat included). How can I mark the coupon as used and / or decrement it's available balance?

    I've looked into the source and I think I've to create history records for the coupon.

    I haven't found a controller or helper class that makes this possible without being tied to the virtuemart-context (order-id and so on).


    Also, how I can check the left value of an coupon with just the coupon-code?


    Thank you very much in advance.

  • Your avatar
    seyi    
     5 years ago
    0

    Hello,

    To mark a coupon as used, yes you are right, you simply have to create a history record, as is done in
       class-awocoupon-library-discount.php
           AwoCoupon_Library_Discount::save_coupon_history

    Also, how I can check the left value of an coupon with just the coupon-code?
    If you are referring to gift certificate balance
        class-awocoupon-library-coupon.php
           AwoCoupon_Library_Coupon::get_giftcert_balance

  • Default avatar
    necati    
     5 years ago
    0

    Hello seyi,

    thank you very much for your assistance.
    I've managed to implement the basic features.

    Am I allowed to upload my customizations in a public github repository, so other people can use or enhance this integration?
    If required, I can let you see the modifications I made. No one of awocoupons classes are modified or will be inside the repository. Just my own implementation of `save_coupon_history` and the use of awocoupons classes.

  • Your avatar
    seyi    
     5 years ago  last edited 5 years ago
    0

    Hello,

    Its fine, you can upload your customizations to github.

    Free free to post the link here.
  • Default avatar
    necati    
     5 years ago
    0

    Hello Seyi,

    thank you for reviewing my request.
    I've made the repository public now: https://github.com/SphinxGraph/EventsBooking.AwoCoupon

    This customization includes a slightly different workflow when saving coupon history:
    Instead of notifying the 'manager'-user, this customization notifies the registrant about any left balance on the gift certificate.

    Feeback is highly appreciated.