error when saving a new coupon


  • Default avatar
    anthony64    
     10 years ago
    0

    install appeared to go well but error message when trying to save a new coupon:

    An error has occurred.

    1054 Unknown column 'id' in 'field list' SQL=INSERT INTO `ivvo_virtuemart_coupons` (`virtuemart_coupon_id`,`coupon_code`,`percent_or_total`,`coupon_type`,`coupon_value`,`coupon_start_date`,`coupon_expiry_date`,`coupon_value_valid`,`coupon_used`,`created_on`,`created_by`,`modified_on`,`modified_by`,`id`,`function_type`,`function_type2`) VALUES ('0','DOEG20','percent','gift','10','','','0','0','2014-11-13 01:10:12','1393','2014-11-13 01:10:12','1393','0','coupon','category')

    Your help is appreciated
    Anthony
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    Are you trying to save a coupon from admin->awocoupon->new coupon? Because AwoCoupon does not touch the #__virtuemart_coupons table which is where the coupon is. If this is from AwoCoupon, then you must have some customizations and would have to cntact the developer.
  • Default avatar
    anthony64    
     10 years ago
    0


    yes thats right, there are two coupons that were created in the VM default coupon, which I can see, if I open one and try to save or modify and save I get the message

    Error

    That coupon code already exists. Please try again

    But if I try to create a new coupon I get the error I said in the post?

    This is a clean install of awocoupon with no customization

    Many thanks
    Anthony
  • Your avatar
    seyi    
     10 years ago
    0

    The vm default coupons interface is located at this link:
    administrator/index.php?option=com_virtuemart&view=coupon

    AwoCoupon's interface is located here:
    administrator/index.php?otption=com_awocoupon&view=coupons

    AwoCoupon (in the backend) has a separate user experience from Virtuemart. Are you within AwoCoupon?
  • Default avatar
    anthony64    
     10 years ago
    0

    I am using VM 2.9.9.4 the vm default table in the database has nothing in it and seems to have put its data into the awo tables, so I uninstalled awocoupon to re install, but the tables are still in the database. Can I untinstall awo, then manually remove all the awo tables from the database, then reinstall? I have done nothing out of the ordinary, just installed the component in the usual way. I don't know if this has been caused my the fact that this site is a migration from JM 1.5 which was also running awocoupon?
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    Yes, if you are migrating, then this could be the problem . Do the tables for awocoupon all start with
    #__awocoupon_vm_ prefix?

    Yes, I think you can uninstall, delete all awocoupon tables then install again.

    And make sure you are installing AwoCoupon Pro 2.3.2 or greater as that is the first version to work with Virtuemart 2.9.
  • Default avatar
    anthony64    
     10 years ago
    0

    I was using the 2.0.15 free version, with a view to upgrade once I had tested, (I used the pro version before) but just testing. I have deleted the tables, but do I need the pro version?
  • Your avatar
    seyi    
     10 years ago
    0

    Nope, the latest free version should work also.
  • Default avatar
    anthony64    
     10 years ago
    0

    Ok so I have deleted all the old awo tables and reinstalled and got the same error, so now I have uninstalled, removed the tables again and renamed the standard vm coupon table to remove it from the equation and I get the following error when I try to install again

    An error has occurred.

    1146 Table 'sarahsco_coffeevm3.ivvo_virtuemart_coupons' doesn't exist SQL=INSERT INTO ivvo_awocoupon_vm (coupon_code,num_of_uses,coupon_value_type,coupon_value,discount_type,function_type,min_value,published,startdate,expiration) SELECT coupon_code,IF(coupon_type="gift",1,0),percent_or_total,coupon_value,"overall", IF(coupon_type="gift","giftcert","coupon"),coupon_value_valid,IF(published=1,1,-1), coupon_start_date,coupon_expiry_date FROM ivvo_virtuemart_coupons

    So I have put the vm coupon table back and reinstalled awo and it installs correctly but I am back with the original error

    An error has occurred.

    1054 Unknown column 'id' in 'field list' SQL=INSERT INTO `ivvo_virtuemart_coupons` (`virtuemart_coupon_id`,`coupon_code`,`percent_or_total`,`coupon_type`,`coupon_value`,`coupon_start_date`,`coupon_expiry_date`,`coupon_value_valid`,`coupon_used`,`created_on`,`created_by`,`modified_on`,`modified_by`,`id`,`function_type`,`function_type2`) VALUES ('0','New','percent','gift','50','','','0','0','2014-11-13 17:37:12','1393','2014-11-13 17:37:12','1393','0','coupon','category')


    Now though I have just 5 awo tables all with awocoupon_vm

    Any more ideas?
  • Default avatar
    anthony64    
     10 years ago
    0

    Pro version worked fine! Brillant! Free version I just could not make it work.