custom columns in csv export


  • Default avatar
    mascot europ B.V.    
     13 years ago
    0

    I recently installed AwoCoupon Pro, and I was wondering if it is possible to change the export reports in Excel. I would like to recieve a csv file with the column like Name Adress Couponcode Product etc. Wich files do I have to edit to customize the export of the csv, and how do I get a column the proper column in that file?

    Thanks in Advance
  • Your avatar
    seyi    
     13 years ago
    0

    you would have to edit the report file itself. Lets say you are referring to the coupon list, then
    www/administrator/components/com_awocoupon/views/reports/tmpl/default_coupon_list.php

    You would then edit the $labels and $columns variables. This will affect both the report displayed on the screen and the data exported to csv.
  • Default avatar
    mascot europ B.V.    
     13 years ago
    0

    Thanks for the fast responds. But I'm new to virtuemart and I have some additional questions. I want to make an .csv export and add the name of the VM customers ID, first and last name, and his City and adress. The thing is I get thousands of coupon codes, but I dont know wich user is gonna use a specific code. Thats why I want the export to give me a column of coupon codes, a userID, user name, city and street. So wich labes and columns do I need to add to make this happen?
  • Your avatar
    seyi    
     13 years ago
    0

    you have to grab the data from the database by coding it into the model
    www/administrator/components/com_awocoupon/models/reports.php, there should be a coupon_list function. Then enter those names in the $column variable and a corresponding label in the $label variable.
  • Default avatar
    mascot europ B.V.    
     12 years ago
    0

    So I made a new export report, only it doesnt show up in the drop down menu, wich file do I have to edit to create another option in the dropdown menu?
  • Your avatar
    seyi    
     12 years ago
    0

    view/reports/tmpl/default_main.php