automatic give coupon to new register member and buy X get coupon


  • Default avatar
    rago    
     4 years ago
    0

    Hi Sir,

    I need these two function:
    1. automatic give coupon to new register member, and send email to member
    2. buy X get coupon, and send email to member


    Information:
    AwoCoupon 2.1.2
    Joomla! 2.5.6
    VirtueMart 2.0.10


    could you tell me how to do these?


    Thanks for your help.


    Best regards,


    Chris.Hsu
    (PS: I use my boss(Rago Chen) account, so please don't confuse about my name)
  • Your avatar
    seyi    
     4 years ago
    0

    Hello Chris,

    For emaling coupons to new registered members, you would need AwoCoupon Email:
    http://awodev.com/products/joomla/aworewards

    For buy product x get coupon, you could use the gift certificate functionality and attach a coupon code to the product you want. Then when the customer purchases, an email is automatically sent to them.
  • Default avatar
    rago    
     4 years ago
    0

    Hi Seyi,

    Thanks for you answer.

    For new registered member,
    if I write a plugin by myself,
    can I automatically generate a new coupon in my plugin?


    For buy product x get coupon,
    after the order status change to Confirmed, I received the coupon,
    but if I hope I received the coupon when order status change to Shipped,
    can I do that ?


    Software Information:
    AwoCoupon Pro 2.1.3
    Joomla! 2.5.6
    VirtueMart 2.0.10


    Chris.Hsu
  • Your avatar
    seyi    
     4 years ago
    0

    Hello,

    I dont see any reason why you could not generate a new coupon in your plugin.

    For the second question, you can change the status in awocoupon->configuration->gift certificate tab.
  • Default avatar
    rago    
     4 years ago
    0

    Hi Seyi,


    For generate a new coupon,
    my question is how to generate a new coupon, I don't know how to generate.


    For the second question,
    thanks for your help, I found it. ^___^


    Best regards,

    Chris.Hsu
  • Your avatar
    seyi    
     4 years ago
    0

    HI Chris,

    You can look in models/coupon.php function generatecoupons to see how its done.
  • Default avatar
    rago    
     4 years ago
    0

    Hi Seyi,

    Thank you, I finished my task for generation coupon when new member register.
    But I have a question,

    function check() in administrator/components/com_awocoupon/tables/coupons.php
    after global $AWOCOUPON_lang;
    I found the value of $AWOCOUPON_lang is null,
    I need add these follow three lines before global $AWOCOUPON_lang;, then $AWOCOUPON_lang had value.
    require JPATH_ADMINISTRATOR . '/components/com_awocoupon/awocoupon.config.php';
    global $AWOCOUPON_lang;
    require JPATH_ADMINISTRATOR . '/components/com_awocoupon/awocoupon.config.php';


    But if use back-end administrator to generation coupon, no need these three lines.

    Did you have any idea why ?


    Best regards,

    Chris.Hsu
  • Your avatar
    seyi    
     4 years ago
    0

    I dont know how you are calling tables/coupons.php but it is probably defined before that function is called in the backend administrator, maybe in admin.awocoupon.php.