• Default avatar
    sklep    
     6 years ago  last edited 6 years ago
    0

    Hello Seyi

    Could you check?

    1) I have: AWO Coupon and AWO Rewards

    2) There is generated automatic coupon for 10% of order which exceeds particular value.

    3) I try to use such coupon

    4) When I have driver MySqli it works. With MySql (PDO) it doesn't work. After reloading site page (F5) I get MySql error: 0 - 00000, ,

    AWO Coupon 2.5.9

    AWO Rewards 2.3.4

    VM 3.2.2

    OPC Rupostel 2.0.341.100817

    System operacyjnyLinux e-dziewiarka.pl 2.6.32-042stab123.9 #1 SMP Thu Jun 29 13:01:59 MSK 2017 i686Wersja bazy danych5.5.36Metoda porównywania znaków w bazie danychutf8_general_ciMetoda porównywania znaków przy połączeniu z bazą danychutf8mb4_general_ciWersja PHP7.0.22Serwer WWWApache/2PHP działa nafpm-fcgiWersja Joomla!Joomla! 3.7.5 Stable [ Amani ] 14-August-2017 12:09 GMTWersja Platformy Joomla!Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMTKlient użytkownikaMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
  • Your avatar
    seyi    
     6 years ago
    0

    Hello,

    I tested this and it works for me, did not have any problems when I switched it to MySql (PDO).

  • Default avatar
    sklep    
     6 years ago  last edited 6 years ago
    0

    Hello Seyi


    The problem appears only in particular condition, when coupon for non-percentage discount is valid only for specific user.

    Coupon with percentage discount for specific VM customer group works well.

    I will send you account details for my test site to check it and coupon code which cause problems.


    Regards

    Radek

  • Your avatar
    seyi    
     6 years ago
    0

    Thanks for the access to the site.  It is now fixed.  In couponhandler.php, had to change:

    <?php
                    $num 
    $db->loadResult();
                    $num = (int)$db->loadResult() + count($coupons_inuse);
    ?>


    to
    <?php
                    $num 
    = (int)$db->loadResult();
                    $num += count($coupons_inuse);
    ?>


    Seems in mysql pdo, once you have called the result, "$db->loadResult()", you cannot do it again.
  • Default avatar
    sklep    
     6 years ago  last edited 6 years ago
    0

    Thank you Seyi


    I will test it on my live site.


    Radek


    Hello Seyi

    The problem disapeared in regular coupons but exists in specific situation:

    1) MySQL PDO

    2) Coupon generated from Awo Rewards as percentage of order (1% of each order) - BTW it doesn't work with 1% but works with 1,001% or more (Points: 1.001% Order Total no Shipping)

    3) Customer get generated coupon by email (Coupon payout -Request)

    4) Customer tries to put this coupon in next his order but it doesn't work. After reloading page there is a MySql error: 0 - 00000, ,

    5) It works with driver MySqli


    Radek

  • Your avatar
    seyi    
     6 years ago
    0

    Hi Redek,

    Not able to reproduce.  More info on the coupon generated?  If possible access to a site with the problem to debug directly.
  • Default avatar
    sklep    
     6 years ago  last edited 6 years ago
    0

    Ok Seyi.


     I'm working on Mysqli and it works.

    Now I'm going through very difficult time upgrading joomla to  3.8.1.


    After all I will give you all details


    Radek


    Hi Seyi


    All details I emailed you in private message.


    Coupon doesn't work and after reloading web page I get MySql error.


    Radek

  • Your avatar
    seyi    
     6 years ago
    0

    Thanks for the access.  The above answer fixed it:
    https://awodev.com/forum/other-applications/awo-product-show-virtuemart/mysql-pdo#post10381

    On the site you gave me access to it is using version 2.5.9.1, which does not have the fix.  The latest version 2.5.9.2 has it.
  • Default avatar
    sklep    
     6 years ago
    0

    Thank you Seyi.

    It works.


    Radek