parsing error when using coupon


  • Default avatar
    vdelidaki    
     4 years ago
    0

    Hi there,

    i'm running Joomla 2.5, Virtuemart 2.0.6 and AwoCoupon 2.x.

    All works ok with email sent, code generrated after buying a certificate but when i try to enter the code in basket i get
    Parse error: syntax error, unexpected ':' in /home/xxxx/public_html/xxx/administrator/components/com_awocoupon/helpers/estore/virtuemart/couponhandler.php on line 1227

    Any clues why?
    Happened before?
    I'm stuck here!

    Thanks
  • Your avatar
    seyi    
     4 years ago
    0

    Hello,

    That is in error, in the same file, same line, you will find this code
    <?php
        
    'coupon_id'=>count($usedcoupons)==? : '--multiple--',
    ?>


    change it to this
    <?php
        
    'coupon_id'=>count($usedcoupons)==key($usedcoupons) : '--multiple--',
    ?>


    That should fix the problem
  • Default avatar
    vdelidaki    
     4 years ago
    0

    That was absolutely correct!

    at least when i tried to give a wrong code to the cart.

    i will try a generated one and if i have issues i will repost!
    Thanks Seyi for the fast answer