(Case Sensitive Coupon Code = No) throws an error.


  • Default avatar
    mohit3    
     10 years ago
    0

    Hi,

    When I set "Case Sensitive Coupon Code" to "No", and try to edit any "Parent" or "Shipping" coupon, it shows the following error in the "Shipping" or "Coupons" slider:

    Warning: Invalid argument supplied for foreach() in /public_html/portal/administrator/components/com_awocoupon/views/coupon/tmpl/default.php on line 336

    NOTE: I didn't make any customization to the code of AWO.

    MY ENVIRONMENT:
    -------------------------
    * AWO Coupon Pro: 2.2.1
    * Joomla! Version: Joomla! 2.5.9 Stable [ Ember ] 4-February-2013 14:00 GMT
    * PHP Version: 5.3.26
    * Web Server: Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
    * Database Version: MySQL 5.5.32-cll
    * Database Collation: utf8_general_ci
    * OnePage Checkhout: 2.0.193.280813
  • Default avatar
    mohit3    
     10 years ago
    0

    NOTE: I'm using Virtuemart 2.0.20b
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    This sounds like a database problem. Can you go to global configuration and turn on debug mode then try again? I suspect you willl see a mysql error.??
  • Default avatar
    mohit3    
     10 years ago
    0

    Here is the Debug error message(s):

    500 - An error has occurred.

    JDatabaseMySQLi::query: 1271 - Illegal mix of collations for operation 'UNION' SQL=SELECT a.coupon_id,a.asset_id,c.product_name AS asset_name FROM joomla2_awocoupon_asset1 a JOIN joomla2_virtuemart_products b ON b.virtuemart_product_id=a.asset_id JOIN joomla2_virtuemart_products_en_gb c USING (virtuemart_product_id) WHERE a.asset_type="product" AND a.coupon_id IN (107) UNION SELECT a.coupon_id,a.asset_id,c.category_name AS asset_name FROM joomla2_awocoupon_asset1 a JOIN joomla2_virtuemart_categories b ON b.virtuemart_category_id=a.asset_id JOIN joomla2_virtuemart_categories_en_gb c USING (virtuemart_category_id) WHERE a.asset_type="category" AND a.coupon_id IN (107) UNION SELECT a.coupon_id,a.asset_id,c.mf_name AS asset_name FROM joomla2_awocoupon_asset1 a JOIN joomla2_virtuemart_manufacturers b ON b.virtuemart_manufacturer_id=a.asset_id JOIN joomla2_virtuemart_manufacturers_en_gb c USING (virtuemart_manufacturer_id) WHERE a.asset_type="manufacturer" AND a.coupon_id IN (107) UNION SELECT a.coupon_id,a.asset_id,c.vendor_store_name AS asset_name FROM joomla2_awocoupon_asset1 a JOIN joomla2_virtuemart_vendors b ON b.virtuemart_vendor_id=a.asset_id JOIN joomla2_virtuemart_vendors_en_gb c USING (virtuemart_vendor_id) WHERE a.asset_type="vendor" AND a.coupon_id IN (107) UNION SELECT a.coupon_id,a.asset_id,c.shipment_name AS asset_name FROM joomla2_awocoupon_asset1 a JOIN joomla2_virtuemart_shipmentmethods b ON b.virtuemart_shipmentmethod_id=a.asset_id JOIN joomla2_virtuemart_shipmentmethods_en_gb c USING (virtuemart_shipmentmethod_id) WHERE a.asset_type="shipping" AND a.coupon_id IN (107) UNION SELECT a.coupon_id,a.asset_id,b.coupon_code AS asset_name FROM joomla2_awocoupon_asset1 a JOIN joomla2_awocoupon b ON b.id=a.asset_id WHERE a.asset_type="coupon" AND a.coupon_id IN (107)

    Call stack
    # Function Location
    1 JAdministrator->dispatch() /home/XXXX/public_html/portal/administrator/index.php:46
    2 JComponentHelper::renderComponent() /home/XXXX/public_html/portal/administrator/includes/application.php:153
    3 JComponentHelper::executeComponent() /home/XXXX/public_html/portal/libraries/joomla/application/component/helper.php:351
    4 require_once() /home/XXXX/public_html/portal/libraries/joomla/application/component/helper.php:383
    5 JController->execute() /home/XXXX/public_html/portal/administrator/components/com_awocoupon/awocoupon.php:45
    6 AwoCouponController->editcoupon() /home/XXXX/public_html/portal/libraries/joomla/application/component/controller.php:761
    7 JController->display() /home/XXXX/public_html/portal/administrator/components/com_awocoupon/controller.php:225
    8 AwoCouponViewCoupon->display() /home/XXXX/public_html/portal/libraries/joomla/application/component/controller.php:722
    9 JView->get() /home/XXXX/public_html/portal/administrator/components/com_awocoupon/views/coupon/view.html.php:86
    10 AwoCouponModelCoupon->getEntry() /home/XXXX/public_html/portal/libraries/joomla/application/component/view.php:386
    11 call_user_func() /home/XXXX/public_html/portal/administrator/components/com_awocoupon/models/coupon.php:91
    12 AwocouponVirtuemartHelper::getAwoItem()
    13 JDatabase->loadObjectList() /home/XXXX/public_html/portal/administrator/components/com_awocoupon/helpers/estore/virtuemart/helper.php:101
    14 JDatabaseMySQLi->execute() /home/XXXX/public_html/portal/libraries/joomla/database/database.php:1100
    15 JError::raiseError() /home/XXXX/public_html/portal/libraries/joomla/database/database/mysqli.php:396
    16 JError::raise() /home/XXXX/public_html/portal/libraries/joomla/error/error.php:251
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    Can you try this solution:
    https://awodev.com/forum/awocoupon/help-section/error-showing-coupon-created-buy-one-get-one-half-price#comment-3883

    If you are having problems with it, I would be happy to have a look at it if you can provide access.
  • Default avatar
    mohit3    
     10 years ago
    0

    Million thanks, Seyi. This has fixed the problem.

    Suggestion: Why don't you try (during the Installation process) to automatically detect the collation of the 'vm_product' table, and apply the same code on the AWO tables? I guess there is a high chance for many others to face the same problem when they use this feature.

    Thanks again and regards.