adding a system message within AwoCoupon - need an update


  • Default avatar
    dsrpmedia    
     10 years ago
    0

    Hi I am trying to let my customers know that the code they are using requires a login. I found an old forum solution which looks like it would fit the bill - but apparently the awo code has changed since this solution was posted - see below

    ------------------------------------------------------------------------------------------------------------------------------

    For showing that a coupon has been accepted, you could try adding a system message within AwoCoupon in
    www/administrator/components/com_awocoupon/helpers/vm_coupon, around line 411 is this

    <?php
    if($this->finalize_coupon($master_output)) return true;
    ?>

    change it to something like this

    <?php
    if($this->finalize_coupon($master_output)) {
        
    JFactory::getApplication()->enqueueMessage('coupon accepted');
        return 
    true;
    }
    ?>

    -------------------------------------------------------------------------------------------------------------------------------------

    if you could let me know how to do this on the more recent version of awo (using version Version: 2.0.5 in joomla 2.5.11) it would be greatly appreciated
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    The file location is the same, but i dont think that solution would solve your problem. You should look in function return_false. The solution you posted is if the coupon is accepted. I assume you want to show a message if its not. You can use the joomla message system:
    <?php
    JFactory
    ::getApplication()->enqueueMessage('my error message','error');
    ?>

    Within function return_false.