Importing coupons


  • Default avatar
    nicolas4    
     4 years ago
    0

    Hi Seyi,


    I want to import 500 coupons, made the file according to this page https://awodev.com/documentation/awocoupon-pro/imports and when I try to import, it says :


    ID : no coupon code specified (500 times).


    Was there any template change ? I have the lastest version of AwoCoupon for Joomla (v. 3.7.5).


    Here's the file (coupon codes has been modified for privacy) : https://docs.google.com/spreadsheets/d/14XWpNRzXejvR93bEH6SYTzRTjtMitM7q3kiOOYtDmvk/edit?usp=sharing


    Thanks for your help !

    Nicolas

  • Your avatar
    seyi    
     4 years ago
    0

    So the import syntax is really complicated and the documentation needs updating.

    To get an example of the syntax, go to awocoupon > coupons > import.  At the bottom is the section export section.  You can export specific coupon_id's.  Or if you want to export all your coupon leave the text field blank.

    Specifically for your error, it does see a coupon code in column B.  If you are adding, remember to leave the Id column blank or set to 0, otherwise it will try and update already existing coupons.
  • Default avatar
    nicolas4    
     4 years ago
    0

    Thanks. So what I understand is :


    1. Export an example file

    2. Make changes to this file, leaving the ID blank to create new coupons

    3. Import


    What about the PASSCODE column ? Should I leave it blank ?

    Thanks.

  • Your avatar
    seyi    
     4 years ago
    0

    Yes, you can leave passcode blank, it will be automatically generated.
  • Default avatar
    Datalynk    
     4 years ago
    0

    I have also tried to work with the documentation and the exported files as templates.

    2 Issues I have found...

    1. None of the assets are created (i.e. Include Vendor, Include User), this is also the issue when you use a template.

    2. Tags are stored in differently on import than they are when you manually create a coupon, and if you edit a coupon you created using import it does not populate the Tags field. So when you save, if you don't re-add the Tag it gets wiped out.

  • Your avatar
    seyi    
     4 years ago  last edited 4 years ago
    0

    There is definitely an issue with assets in general.  Here is a quick fix for it, in the file
    www/administrator/components/com_awocoupon/awocoupon/admin/class/class-awocoupon-admin-class-import.php, around line 217 is the commented code:
    <?php
                    
    //'asset' => ! empty( $params['asset'] ) ? json_decode( AC()->helper->json_encode( $params['asset'] ), true ) : array(),
    ?>

    Uncomment that code
    <?php
                    
    'asset' => ! empty( $params['asset'] ) ? json_decodeAC()->helper->json_encode$params['asset'] ), true ) : array(),
    ?>

  • Your avatar
    seyi    
     4 years ago
    0

    For the tags, it is a case of cache through ajax that is not getting updated. To fix, update the file:
    www/administrator/components/com_awocoupon/awocoupon/admin/view/coupon/edit.php, around line 71 is this
     jQuery.getJSON(
            base_url,


    Right before that add this:
     jQuery.ajaxSetup({ cache: false });
  • Default avatar
    Datalynk    
     4 years ago
    0

    As not wanting to do core hacks (especially as you have just released another update for AWO Pro that will wipe them out). Can I check where we are at with both solving issues with Assets and also Tags as of latest release. Assets are mentioned but no details.
  • Your avatar
    seyi    
     4 years ago
    0

    The update fixes this issue.