Duplicate column name 'count'


  • Default avatar
    sklep    
     6 years ago
    0

    Hi


    I have installed  Joomla 3.7.3

    VM 3.2.2

    I have PHP 7.0.12

    MySql 5.5.36

    and wanted to install com_awocoupon-PRO-2.5.8.1.zip

    I can't do it because of error Duplicate column name 'count'


    What should I do to fix it?


    Radek

  • Your avatar
    seyi    
     6 years ago
    0

    Hello,

    Are you upgrading?  Seems the database is out of sync with an older version of AwoCoupon?

    Might need to do a manual install to get the database back into sync.  What version are you updating from?
  • Default avatar
    sklep    
     6 years ago  last edited 6 years ago
    0

    Hello

    Yes, I wanted to upgrade from:

    AwoCoupon 2.5.5 pro  2017-01-30


    but after upgading joomla to 3.7.3 and VM 3.2.2 I can't install present version. There is the same problem.

  • Your avatar
    seyi    
     6 years ago
    0

    Here are instructions on manually upgrading:
    https://awodev.com/forum/awocoupon/help-section/duplicate-column-name-voucherfilenamelangid-sql-alter-table-when-upgrad#post9077

    If you prefer, I am happy to do it if you send me a private message with temp admin and ftp access.
  • Default avatar
    sklep    
     6 years ago
    0

    Hello


    I did as it was showed but in sql:

    1) My previous AWO Coupon version was 2.5.5 so I wanted only run "admin\helpers\install\upgrade\sql\2.5.6.sql"

    2) In SQL I put:


    ALTER TABLE #__awocoupon_asset1 ADD COLUMN `count` INT AFTER asset_id;

    ALTER TABLE #__awocoupon_asset2 ADD COLUMN `count` INT AFTER asset_id;

    ALTER TABLE #__awocoupon MODIFY function_type VARCHAR(255) NOT NULL DEFAULT 'coupon';

    UPDATE #__awocoupon SET function_type='buyxy' WHERE function_type='buy_x_get_y';


    3)

    I got error:

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE #__awocoupon_asset2 ADD COLUMN `count` INT AFTER asset_id; ALTER ' at line 2


    4) I noticed that in table #__awocoupon_asset2  I altready have column 'count' please take a look at the screen shot

    5) What to do?

    Radek

  • Your avatar
    seyi    
     6 years ago
    0

    Hello,

    Skip it since the column is already there and just run everything else.  If you receive more errors that it already exists, then do not worry.
  • Default avatar
    sklep    
     6 years ago  last edited 6 years ago
    0

    Hi


    I found some troubles.


    1) I'm using new OPC Rupostel: ver.: 2.0.337.1351.190417 from 19/04/17

    2) AWO Coupon 2.5.6 works properly

    3) AWO Coupon 2.5.8.1 doesn't work. I got "Internal Server Error" just after putting coupon code (error appeard in field with shipping details). I reinstalled to ver 2.5.6 and everything runs well.

    4) joomla 3.7.4,
    mysql: 5.5.36-log
    PHP: 7.0.12
    VM: 3.2.2

    Radek

  • Your avatar
    seyi    
     6 years ago
    0

    Hello,

    You can try this solution:
    https://www.rupostel.com/phpBB3/viewtopic.php?f=7&t=1550
  • Default avatar
    sklep    
     6 years ago  last edited 6 years ago
    0

    Unfortunatelly it doesn't work. I get error 500.

    There are 2 options when it works:

    - I can turn off OPC Rupostel

    - I can turn off plugin VMCoupon - AwoCoupon

    But it doesn't solve my problem.


    With older version of AWO Coupon it works

    Radek

  • Your avatar
    seyi    
     6 years ago
    0

    Are you using an older version of Rupostel or up to date?  By the way the above solution is now in the latest 2.5.8.2.
  • Default avatar
    sklep    
     6 years ago  last edited 6 years ago
    0

    Sorry Seyi


    I did mistake. I will test it again. maybe your last advice will work.


    radek


    I have installed AWO Coupon last version and it seems everything works perfectly.

    I have the latest version of OPC Rupostel


    Thank you

    radek


    No, it doesn't work.

    I can see discount in the basket (because of coupon 10%) but it doesn't appears in VM backend in order details.

    I installed again V 2.5.6 and there it works

    and what's more

    I managed to install V2.5.8.1 and it works (thankfully). I removed 1 line from 2.5.6.sql and replaced this file in installer file.

    According to last your advice I commented 1 line:

    if (version_compare($instance->vmversion, '2.9.8', '>=')) {

    //$cart->prepareCartData();

    $instance->vmcart = $cart;

    $instance->vmcartPrices = $cart->cartPrices;

    }


    So there is a problem 2.5.8.2

    Radek

  • Your avatar
    seyi    
     6 years ago
    0

    There is really no change between 2.5.8.1 and 2.5.8.2 except for that change.  So not sure why 2.5.8.2 is not working for you.
  • Default avatar
    sklep    
     6 years ago  last edited 6 years ago
    0

    Ok Seyi

    I will be testing it. Maybe it's a problem of cache or someting. I will clear cache, turn off JCH Optimize and check if everything works well.


    Radek


    I cleared cache and 2.5.8.1 with changes made as I mentioned above, seems to be working well. Sometimes I don't know why it's working and sometimes not. I will test 2.5.8.2 on my test website and if I find out something I will let you know.


    BTW

    The problem of long serwer answer for crons of Awo Coupon and Awo Rewards was solved by JCH Optimize. With this plugin the respond time was diminished from 4 s to 286ms so I think it's OK.


    Radek


    Hm I don't how to say but today in Javascript console I got error:

    Failed to load resource: the server responded with a status of 500 (Internal Server Error) https://www.e-dziewiarka.pl/index.php?option=com_awocoupon&task=cronjs&time=1501839662


    I reinstalled again to AwoCoupon 2.5.6  and Error disappeared. I think something doesn't work with cron in ver 2.5.8.1 on my serwer.

    Radek

  • Your avatar
    seyi    
     6 years ago
    0

    You could always disable cron in awocoupon->configuration->reminders tab.