Invalid argument supple


  • Default avatar
    johari    
     2 years ago
    0

    Hello,

    We are facing this issue under Asset column when view setting for coupon.

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


    Please help.
  • Your avatar
    seyi    
     2 years ago
    0

    Hello,

    Seems you might have a database error.

    Can you go to global configuration and turn on debug mode temporarily? Then try editing a coupon, do you see any errors? If not, try opening the details of a coupon by clicking the image icon on the coupon list. Any problems there?
  • Default avatar
    johari    
     2 years ago
    0

    Yes, have error when enable debug system. This appear when try to edit coupon.

    JDatabaseMySQL::query: 1271 - Illegal mix of collations for operation 'UNION' SQL=SELECT a.coupon_id,a.asset_id,c.product_name AS asset_name,a.order_by FROM oo_awocoupon_asset1 a JOIN oo_virtuemart_products b ON b.virtuemart_product_id=a.asset_id JOIN oo_virtuemart_products_en_gb c USING (virtuemart_product_id) WHERE a.asset_type="product" AND a.coupon_id IN (18) UNION SELECT a.coupon_id,a.asset_id,c.category_name AS asset_name,a.order_by FROM oo_awocoupon_asset1 a JOIN oo_virtuemart_categories b ON b.virtuemart_category_id=a.asset_id JOIN oo_virtuemart_categories_en_gb c USING (virtuemart_category_id) WHERE a.asset_type="category" AND a.coupon_id IN (18) UNION SELECT a.coupon_id,a.asset_id,c.mf_name AS asset_name,a.order_by FROM oo_awocoupon_asset1 a JOIN oo_virtuemart_manufacturers b ON b.virtuemart_manufacturer_id=a.asset_id JOIN oo_virtuemart_manufacturers_en_gb c USING (virtuemart_manufacturer_id) WHERE a.asset_type="manufacturer" AND a.coupon_id IN (18) UNION SELECT a.coupon_id,a.asset_id,c.vendor_store_name AS asset_name,a.order_by FROM oo_awocoupon_asset1 a JOIN oo_virtuemart_vendors b ON b.virtuemart_vendor_id=a.asset_id JOIN oo_virtuemart_vendors_en_gb c USING (virtuemart_vendor_id) WHERE a.asset_type="vendor" AND a.coupon_id IN (18) UNION SELECT a.coupon_id,a.asset_id,c.shipment_name AS asset_name,a.order_by FROM oo_awocoupon_asset1 a JOIN oo_virtuemart_shipmentmethods b ON b.virtuemart_shipmentmethod_id=a.asset_id JOIN oo_virtuemart_shipmentmethods_en_gb c USING (virtuemart_shipmentmethod_id) WHERE a.asset_type="shipping" AND a.coupon_id IN (18) UNION SELECT a.coupon_id,a.asset_id,b.coupon_code AS asset_name,a.order_by FROM oo_awocoupon_asset1 a JOIN oo_awocoupon b ON b.id=a.asset_id WHERE a.asset_type="coupon" AND a.coupon_id IN (18)

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

    Hello,

    Please try this fix:
    https://awodev.com/forum/awocoupon/help-section/error-showing-coupon-created-buy-one-get-one-half-price#comment-3883
  • Default avatar
    source@easy.cz    
     a year ago
    0

    Hi,

    Im installed awocoupo pro on the j1.5 and than I used awocoupon with select manufactur, I see with debug mode this error:

    JDatabaseMySQL::query: 1146 - Table 'velkoobchod_zelenazeme_cz.jos_awocoupon_vm1ids' doesn't exist SQL=SELECT a.coupon_id,a.asset_id,b.product_name AS asset_name,a.order_by FROM jos_awocoupon_asset1 a JOIN jos_vm_product b ON b.product_id=a.asset_id WHERE a.asset_type="product" AND a.coupon_id IN (2) UNION SELECT a.coupon_id,a.asset_id,b.category_name AS asset_name,a.order_by FROM jos_awocoupon_asset1 a JOIN jos_vm_category b ON b.category_id=a.asset_id WHERE a.asset_type="category" AND a.coupon_id IN (2) UNION SELECT a.coupon_id,a.asset_id,b.mf_name AS asset_name,a.order_by FROM jos_awocoupon_asset1 a JOIN jos_vm_manufacturer b ON b.manufacturer_id=a.asset_id WHERE a.asset_type="manufacturer" AND a.coupon_id IN (2) UNION SELECT a.coupon_id,a.asset_id,b.vendor_store_name AS asset_name,a.order_by FROM jos_awocoupon_asset1 a JOIN jos_vm_vendor b ON b.vendor_id=a.asset_id WHERE a.asset_type="vendor" AND a.coupon_id IN (2) UNION SELECT a.coupon_id,a.asset_id,b.coupon_code AS asset_name,a.order_by FROM jos_awocoupon_asset1 a JOIN jos_awocoupon b ON b.id=a.asset_id WHERE a.asset_type="coupon" AND a.coupon_id IN (2) UNION SELECT a.coupon_id,a.asset_id,CONCAT(b.field1," - ",b.field2) AS asset_name,a.order_by FROM jos_awocoupon_asset1 a JOIN jos_awocoupon_vm1ids b ON b.id=a.asset_id WHERE a.asset_type="shipping" AND a.coupon_id IN (2)


    So in file www.velkoobchod.zelenazeme.cz/administrator/components/com_awocoupon/helpers/estore/virtuemart1/helper.php

    I see this call in function getAwoItem, but I don't see table jos_awocoupon_vm1ids in my sql.

    Rudolf
  • Your avatar
    seyi    
     a year ago
    0

    Hello,

    In awocoupon, go to the 'installation check' page. And you should see at the very bottom "DATABASE TABLE TO CREATE ID's NEEDED". Install that, and it should install the database table.