Unknown column 'coupon_id_entered' in 'where clause'


  • Default avatar
    jan448    
     5 years ago
    0

    Hi there
    i've updated Joomla and AwoCoupons to the latest version

    Now the AwoCoupon backend is unusable, since there is a wheel that keeps spinning and i cannot enter or view the codes.

    And when a user try to use a coupon, a blank screen appears with the error:

    Unknown column 'coupon_id_entered' in 'where clause'

    How to solve?

    Thanks
  • Your avatar
    seyi    
     5 years ago
    0

    Please run the below queries on your database:

    ALTER TABLE #__awocoupon_history MODIFY coupon_id INT;
    ALTER TABLE #__awocoupon_history ADD COLUMN `coupon_code` varchar(255) AFTER coupon_id;
    ALTER TABLE #__awocoupon_history CHANGE coupon_entered_id coupon_id_entered INT;
    ALTER TABLE #__awocoupon_history ADD COLUMN `coupon_code_entered` varchar(255) AFTER coupon_id_entered;

    UPDATE #__awocoupon_history h, #__awocoupon c SET h.coupon_code=c.coupon_code WHERE c.id=h.coupon_id;
    UPDATE #__awocoupon_history h, #__awocoupon c SET h.coupon_code_entered=c.coupon_code WHERE c.id=h.coupon_id_entered;

    Where #__ is your database prefix.