AwoTracker coupon code not found


  • Default avatar
    joost9    
     10 years ago
    0

    Hello, I installed the tracker.
    But when I try to check on a coupon code It tells me it can't find the coupon.
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    I need more details. Did you enter the coupon code and passcode correctly? Is the coupon code currently published, has it expired?
  • Default avatar
    joost9    
     10 years ago
    0

    Hello, even with a new code it doesnt work.
    You said commenting out the security line would work right?

    Or should I remove it in a different way?

    What I did is:
    com_awotracker/views/coupon/tmpl/default.php

    Commented out:
    <?php
     
    echo JText::_('COM_AWOTRACKER_SECRET_KEY'); 
    ?>
    *

    <?php
     
    echo @$this->coupon_row->passcode;
    ?>
    " />
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    Does it work with the original code, before any of your edits?
  • Default avatar
    joost9    
     10 years ago
    0

    how do I generate a secret key?
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    You cannot, it is automatically generated. To view the secret key, click the details link of the coupon.
  • Default avatar
    joost9    
     10 years ago
    0

    Ok, so I have it working with secret key,

    How do I leave the secret key out?

    So I can track without the secret key.
  • Your avatar
    seyi    
     10 years ago
    0

    Ok great.

    in www/components/com_awotracker/views/coupon/tmpl/default.php, delete this code
        <tr><td><b><?php echo JText::_('COM_AWOTRACKER_SECRET_KEY'); ?> <span style="color:red;">*</span></b></td>
            <td><input type="text" name="passcode" value="<?php echo @$this->coupon_row->passcode;?>" /></td>
        </tr>


    in www/components/com_aowtracker/models/coupon.php, around line 46, change
    <?php
            $this
    ->_db->setQuery('SELECT id FROM #__awocoupon WHERE estore="'.$this->estore.'" AND coupon_code="'.$this->_db->getEscaped(@$post->coupon_code).'" AND passcode="'.$this->_db->getEscaped(@$post->passcode).'" AND published IN (1,-1)');
    ?>


    to
    <?php
            $this
    ->_db->setQuery('SELECT id FROM #__awocoupon WHERE estore="'.$this->estore.'" AND coupon_code="'.$this->_db->getEscaped(@$post->coupon_code).'" AND published IN (1,-1)');
    ?>
  • Default avatar
    joost9    
     10 years ago
    0

    Thank you very much! This is solved now.

    I have another question:
    can we connect the user in any way to the coupon code? so, when a user is logged in, the coupond code is automaticly connected with the user?