Error: vmTable store insertObject


  • Default avatar
    allen1    
     3 months ago
    0

    I have an automatic discount configured that is resulting in an error I can't seem to resolve. I've even tried deleting and re-creating the discount from another auto discount coupon that works, and then creating the automatic coupon to apply it.


    My coupon was previously working prior to my update to J4.4.x.

  • Your avatar
    seyi    
     3 months ago
    0

    Hello,

    Not sure what is going on.  Think it would need direct debugging.  If you can send me a private message with temp admin/ftp access and instructions on exactly how to reproduce it, then I can look at it.
  • Your avatar
    seyi    
     3 months ago
    0

    Thanks for the access.  So the actual error is this:

    The column coupon_code in virtuemart by default is 32 characters.  In older versions of mysql/php, if the data is too long, it just truncates the data.  Not so with your current versions.  Since you gave temp ftp access, I went ahead and fixed it by running the query:

    ALTER TABLE #__virtuemart_orders MODIFY coupon_code TEXT DEFAULT NULL

    This increases the coupon_code field to up to 63,000nish characters I think.  So should not be a problem any more.

  • Default avatar
    allen1    
     3 months ago
    0

    So my coupon code was simply too long? Good to know for future versions of AWO ;-).
  • Default avatar
    allen1    
     3 months ago
    0

    I tested the store with the two products that jammed up previously. It works now.

    Should I shorten my coupon codes to ensure we won't run into this problem again if I update PHP again?
  • Your avatar
    seyi    
     3 months ago
    0

    Yes, that is all it was, your code was simply too long for the column in the database.  I have increased your database column to thousands of characters so there is no need to shorten your codes, this will survive all php/mysql upgrades.