Awocoupon 1054 error


  • Default avatar
    antonia    
     7 years ago
    0

    Hi Seyi,


    I have a problem with Awocoupon. When I try to see the codes that has been send, I get this error message:


    1054 Unknown column 'user_email' in 'where clause' SQL=SELECT SQL_CALC_FOUND_ROWS c.id AS voucher_customer_id, c.codes, uv.first_name,uv.last_name, c.user_id, c.user_id AS _user_id, u.username, uv.email as user_email, ov.virtuemart_order_id AS order_id,ov.created_on AS cdate,CONCAT(ov.virtuemart_order_id," (",ov.order_number,")") AS order_number, u.username as _username, uv.first_name as _fname, uv.last_name as _lname,ov.created_on AS _created_on, GROUP_CONCAT(cc.code ORDER BY cc.code SEPARATOR ", ") as coupon_codes FROM #__awocoupon_voucher_customer c LEFT JOIN #__awocoupon_voucher_customer_code cc ON cc.voucher_customer_id=c.id LEFT JOIN #__users u ON u.id=c.user_id LEFT JOIN #__virtuemart_orders ov ON ov.virtuemart_order_id=c.order_id LEFT JOIN #__virtuemart_order_userinfos uv ON uv.virtuemart_order_id=c.order_id AND uv.address_type="BT" WHERE c.estore="virtuemart" AND LOWER(user_email) LIKE '%hallo%' GROUP BY c.id ORDER BY c.order_id desc LIMIT 0, 20


    How can I solve this?


    Thanks in advance,


    Kris

  • Your avatar
    seyi    
     7 years ago
    0

    Hello,

    Is this an older version of AwoCoupon?  I have checked the code and it should be working fine.  If it is older please upgrade and that should fix this.
  • Default avatar
    antonia    
     7 years ago
    0

    Hi Seyi,


    I see that I have to update to a newer version. But my auto-update is not working. How can I update?

    Greetings,

    Kris

  • Your avatar
    seyi    
     7 years ago
    0

    You can manually update by first downloading from your account here:
    https://awodev.com/me/files

    Then unzip it and install the com_awocoupon.zip file through joomla installer.
  • Default avatar
    georg0    
     7 years ago
    0

    Hi!

    same Awocoupon 1054 error here with latest Version 2.5.5, if I try to change delivery option. This is error message:

    Unknown column 'awocoupon_discount' in 'field list' SQL=UPDATE `#__hikashop_cart` SET `user_id`='2',`session_id`='a856bbd5a171831d03749a0755fbd260',`cart_modified`='1487074599',`cart_coupon`='nWhZvF6DdhR',`cart_type`='cart',`cart_current`='1',`cart_share`='nobody',`cart_name`='',`cart_params`='{}',`cart_currency_id`='1',`cart_payment_id`='1',`cart_shipping_ids`='5@0',`cart_billing_address_id`='1',`cart_shipping_address_ids`='1',`awocoupon_discount`='1' WHERE `cart_id`='26'
  • Your avatar
    seyi    
     7 years ago
    0

    Hello,

    In www/plugins/hikashop/awocoupon/awocoupon.php, around line 63 and 72 are this:
    <?php
                            
    if(!empty($rtn) && is_string($rtn) && $rtn!='reprocess'$cart->awocoupon_discount 1;
    ?>


    and
    <?php
                    
    else $cart->awocoupon_discount 1;
    ?>


    Can you delete the lines or comment them out?  Think that should fix this issue.
  • Default avatar
    georg0    
     7 years ago
    0

    Hello!

    The error is fixed, but the automatic discount don't work now.

  • Your avatar
    seyi    
     7 years ago
    0

    Hello,

    Yes, that would be a problem.  Ok, so the fix is update the same 2 lines above:
    In www/plugins/hikashop/awocoupon/awocoupon.php, around line 63 and 72 are this:

    <?php
                            
    if(!empty($rtn) && is_string($rtn) && $rtn!='reprocess'$cart->awocoupon_discount 1;
    ?>


    and
    <?php
                    
    else $cart->awocoupon_discount 1;
    ?>


    To these:
    <?php
                            
    if(!empty($rtn) && is_string($rtn) && $rtn!='reprocess'$cart->awocoupon_discount = array(1);
    ?>


    and
    <?php
                    
    else $cart->awocoupon_discount = array(1);
    ?>


    That should do it.


  • Default avatar
    georg0    
     7 years ago
    0

    Thanks !

    The problem is fixed. is there a bugfix in the line?

  • Your avatar
    seyi    
     7 years ago
    0

    Yes of course.