[Resolved] possible solution for limit per user problem


  • Default avatar
    dsrpmedia    
     13 years ago
    0

    Hi,

    I love your coupon component, I `ve been looking for a long time for a solution which will allow me to limit coupon usage on a 'per user' basis.

    I only have one problem, and going through your forum I see it is quite common - when the limited use per user aspect is in play the coupon won `t work until after the login / registration page.

    I can see a lot of people being confused & upset when they get the 'coupon not found' message while trying to enter the coupon code in the cart.

    For now I have added a note to my english.php file expaining that the field should not be filled out until step 2 of the checkout process, but it would be ever so much better if the coupon field was not there at all until it is operational.

    I was thinking there may be some sort of conditional statement we could put into the relevent VM file which would prevent the coupon field from displaying until the customer is logged in

    I `ve used something like this in my template before for having specific actions occur on specific pages

    [
    <?php
     
    if (JRequest::getVar('view') == 'frontpage') { 
    ?>

    <?php
    do something e.gload coupon form
    ?>

    <?php
     
    } else { 
    ?>


    <?php
     
    do something else - e.gdon `t load coupon form
        
    ?>

    <?php
     

    ?>
    ]

    My php is extremely weak, I`m not sure of which page to put the statement in, which page to call for the view, or how to call in the coupon form - but if you knew how to do that it would be the pièce de résistance for this outstanding component

    Thanks again for your contribution
  • Your avatar
    seyi    
     13 years ago
    0

    None displaying of the coupon field until after registration can be accomplished through a virtuemart hack found here:
    https://awodev.com/forum/awocoupon/help-section/it-possible-have-code-used-set-number-times-without-users-lo#comment-46

    Another option, which will avoid hacking virtuemart, is to give the user a friendly error message. AwoCoupon Pro allows you to edit the error messages displayed to the user. So for this exact kind of error you can warn the user to log in first. See Awocoupon pro here:

    https://awodev.com/products/joomla/awocoupon