Updated to AWOcoupon ver 1.5.0 and most of the fields for Coupon not showing up in backend


  • Default avatar
    greg96    
     12 years ago
    0

    Have updated to ver 1.5.0 for joomla site ver 1.5.22. with virtuemart ver 1.1.7
    I go to backend to add new awocoupon and only fields showing up are showing only function type, customer, none and none.

    Have uninstalled component 2 twice and remove tables and reinstalled.
  • Your avatar
    seyi    
     12 years ago
    0

    Hello,

    It sounds like the old version of a script file is cached. Clear your browser cache and try it again.
  • Default avatar
    greg96    
     12 years ago
    0

    I did clear the cache and it was not that . Looking at the file of
    admin\views\coupon\tmpl\default.php found code of style="display:none;"
    throughout the default.php. After removing the style-"display:none;", it start working right.
    Now then I go back to edit coupon screen I am getting the following messages of
    Warning: Invalid argument supplied for foreach() in ..../administrator/components/com_awocoupon/helpers/awolibrary.php on line 149
    Warning: Invalid argument supplied for foreach() in ../administrator/components/com_awocoupon/helpers/awolibrary.php on line 149
    Warning: Invalid argument supplied for foreach() in .../administrator/components/com_awocoupon/views/coupon/tmpl/default.php on line 308
    and
    Warning: Invalid argument supplied for foreach() in ...../administrator/components/com_awocoupon/views/coupon/tmpl/default.php on line 373

    Thanks
  • Your avatar
    seyi    
     12 years ago
    0

    I must have misunderstood. What was the original problem? What did you remove the style display none from?
  • Default avatar
    greg96    
     12 years ago
    0

    Here is the part of the default.php code that I had to remove the style="display:none;" from
    located in \admin\views\coupon\tmpl

                <tr id="tr_function_type2" style="display:none;">
                    <td class="key" nowrap><label><?php echo JText::_'FUNCTION TYPE' ); ?> 2</label></td>
                    <td><?php echo $this->lists['function_type2']; ?></td>
                </tr>
                <tr id="tr_coupon_code" style="display:none;">
                    <td class="key" nowrap><label><?php echo JText::_'COUPON CODE' ); ?></label></td>
                    <td><input class="inputbox" type="text" name="coupon_code" size="30" maxlength="255" value="<?php echo $this->row->coupon_code?>" />
                        <button type="button" onclick="generate_code()"><?php echo JText::_'COM_AWOCOUPON_CP_GENERATE_CODE' ); ?></button>
                    </td>
                </tr>
                <tr id="tr_published" style="display:none;">
                    <td class="key" nowrap><label><?php echo JText::_'PUBLISHED' ); ?></label></td>
                    <td><?php echo $this->lists['published']; ?></td>
                </tr>
                <tr id="tr_parent_type" style="display:none;">
                    <td class="key" nowrap><label><?php
                        
    echo     JHTML::tooltip(JText::_('ALL THAT APPLY WARNING'), $this->def_lists['parent_type']['all'], 'tooltip.png'''''false).
                                
    ' '.
                                
    JText::_'PROCESS TYPE' ); ?></label></td>
                    <td><?php echo $this->lists['parent_type']; ?></td>
                </tr>

    After removing the display none code, then I was able to add a coupon in the backend Now when I go to edit the coupon I get the following
    Warning: Invalid argument supplied for foreach() in ..../administrator/components/com_awocoupon/helpers/awolibrary.php on line 149
    Warning: Invalid argument supplied for foreach() in ../administrator/components/com_awocoupon/helpers/awolibrary.php on line 149
    Warning: Invalid argument supplied for foreach() in .../administrator/components/com_awocoupon/views/coupon/tmpl/default.php on line 308
    and
    Warning: Invalid argument supplied for foreach() in ...../administrator/components/com_awocoupon/views/coupon/tmpl/default.php on line 373


    I am getting up on the front end screen checkout on the virtuemart
    t.php awocoupon

    which now I have to chase down to fix for the client
  • Your avatar
    seyi    
     12 years ago
    0

    Taking out the display none is not the correct fix. That field is initially hidden and works with javascript.

    First you select the function type, and then the function type 2 field appears, then you select the function type 2 and then the rest of the relevant fields appear. If you had to manually edit the code to force it to appear makes me wonder if you have problems with the configuration of the coupon code causing alot of your errors.

    I would turn on debug mode in global configuration and then refresh the new coupon screen to see if you have any mysql errors. The fact that you are receiving errors on 149 of awolibrary also indicates there is a database problem.
  • Default avatar
    greg96    
     12 years ago
    0


    Here is what I got from the debug. I have to leave it off for it is a live working site

    Error for editing coupon

    JDatabaseMySQL::query: 1271 - Illegal mix of collations for operation 'UNION' SQL=SELECT a.id,a.coupon_id,a.asset_id,b.product_name AS asset_name,a.asset_type 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.id,a.coupon_id,a.asset_id,b.category_name AS asset_name,a.asset_type 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.id,a.coupon_id,a.asset_id,b.mf_name AS asset_name,a.asset_type 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.id,a.coupon_id,a.asset_id,b.vendor_name AS asset_name,a.asset_type 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.id,a.coupon_id,a.asset_id,a.asset_id AS asset_name,a.asset_type FROM jos_awocoupon_asset1 a WHERE a.asset_type="shipping" AND a.coupon_id IN (2) UNION SELECT a.id,a.coupon_id,a.asset_id,b.coupon_code AS asset_name,a.asset_type 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)

    As I have explained before. I have remove this component completely and reinstalled it twice now and remove the awo tables before. The awo coupon is working for the one coupon
    , I just need to get it fixed for the editing of the coupons.

    Thanks
  • Your avatar
    seyi    
     12 years ago
    0

    This is a collation issue, read through this topic:
    https://awodev.com/forum/awocoupon/help-section/adminitration-error-history-uses-coupons

    You will need to go through your database and find where the character sets are different. Look at virtuemart_products.product_name, virtuemart_categories.category_name, virtuemart_manufacturers.manufacturer_name,virtuemart_vendor.vendor_name, and awocoupon.coupon_code. Those charsets should all match.
  • Default avatar
    am    
     12 years ago
    0

    I am having the same issue, and all this seems to complicated to do.

    It was working before the update, how can i downgrade without loosing my existing coupons?
  • Your avatar
    seyi    
     12 years ago
    0

    Are you positive it is the same issue? What errors are you receiving? Are you sure it is just not a caching issue?

    As far as downgrading, they only way is to uninstall awocoupon and install the version you want, in which case you would loose all your data. The only other way is to restore from backup, if you have one.
  • Default avatar
    am    
     12 years ago
    0

    Thanks for the quick reply!

    I should have tested it on a different browser before i came on here. I cleared my browser cache and everything seems to be working nromally

    Thanks for the help!