Questions about gift certificates


  • Default avatar
    aftertaf    
     6 years ago
    0

    Hi,


    Some questions i'd like to have cleared up if possible...


    1. When I generate new codes based on a gift certificate template, these codes will not be 'allocated' to someone if they buy a new gift certificate on the webshop (duh... but just want to be sure ;) )?
    2. When generating new codes in the same context as 1., the code generated doesn't match the Gift Certificate Code > Coupon Code > Prefix/suffix sections. Any way around that ?
    3. I'm generating new codes so that my wife can print out the code onto a physical card if she sells it in the physical shop - as there is no link between AwoCouponPro & POSForWebshops then we need to take manual action each time to log what has been bought...
      All I have to do is locate the purchased Coupon Code and manually set its end date to 1 year from date of sale ? (we want to have then valid 1 year from purchase...)


    Thanks for your time and your great product (that i'm still getting my head around ;) )

    David

  • Your avatar
    seyi    
     6 years ago
    0

    Hello,
    1. that is correct
    2. the configuration for gift certificates is really for gift certificates purchased.  But you can hack the code if you like.  In the file
    www/administrator/components/com_awocoupon/helpers/plgautogenerate.php, around line 44 is this:
    <?php
            
    if(empty($coupon_code)) $coupon_code awoLibrary::generate_coupon_code($estore);
    ?>


    Change it to this:
    <?php
            
    if(empty($coupon_code)) {
                if($crow->function_type=='giftcert'$coupon_code awoLibrary::generate_coupon_code($estore,'my_prefix','my_suffix');
                else $coupon_code awoLibrary::generate_coupon_code($estore);
            }
    ?>


    Where 'my_prefix' and 'my_suffix' are the actual prefix and suffix to use.

    3.  So the question is how to set the coupon code to be valid for 1 year after sale?  If so, then yes, you would manually set the end date if selling at a physical store.

  • Default avatar
    aftertaf    
     6 years ago  last edited 6 years ago
    0

    perfect all around ! thanks
    for point 2), would it be possible to make this a configuration option ?

    I try to avoid hacking core files as i'll lose it on upgrades..

    might be generally useful for others..

  • Your avatar
    seyi    
     6 years ago
    0

    Hello,

    That option is specifically for gift certificates generated when purchasing a gift certificate.  Would have to add a new configuration option for general automatic coupon generating.  Will add it to the list of things to look at.