Logo

Import from CSV


To help you populate your database much more easily, you can use the Import CSV feature. With it, you can import data from the admin backend as a bulk upload, which will append the data to your existing database.

To access this page go to Components/Raffle Factory/Settings/Import/Export and click on Import CSV. There, you will find 2 fields which will allow you to upload a ".csv" file and an archive with images corresponding with the uploaded CSV respectively.



The ".csv" file needs to be written in a specific order and format to be eligible for upload and have no errors, since each value will be inserted in the database.
For the Raffle CSV file you will need the header on the first row to contain all the names of the fields and on the next rows, details and parameters regarding the raffles that will be added in those respective fields.
It is also very important that the information is separated by tab spacing.

The names of the fields found in database are defined by the "auction.php" file found on "components\com_rafflefactory\helpers".
You need to also define the column headers in the file.
To know exactly how the structure of the file must be, here is a list of the fields and how they need to be ordered on the .csv file:

Name Description Example
title Text which will be used as the name of the raffle LG Nexus 4
short_description Short descriptive text regarding the raffle which will be displayed on listings Comes with warranty from LG
description Larger descriptive text regarding the raffle which can also contain HTML and that will be displayed on the details page The phone is equipped with a 1.5 GHz quad-core Snapdragon S4 Pro processor, 2 GB of RAM, 8 or 16 GB of internal storage,[9] front facing 1.3 megapixel camera and an 8 megapixel rear camera and a micro-SIM card tray. The phone was launched with the new Android 4.2 operating system, titled (as was Android 4.1) "Jelly Bean"
user_id This is the ID shown next to the username in the userlist 612
reserve_price Reserve price set for the raffle 800
currency Currency used for the raffle price, use one that is available on the Currency Manager list (USD, EUR, AUD, etc.) EUR
auction_type Parameter regarding the type of the raffle: 1=Public ; 2=Private 1
start_date Date of when the raffle starts which is required to be filled in (Y-m-d H:i:s) 2013-05-15 15:00:00
end_date Date of when the raffle ends which is required to be filled in (Y-m-d H:i:s) 2014-03-09 15:00:00
category The ID of one of the available categories, you can see this on the address bar by editing the category from Manage Categories page 70
featured Parameter regarding the featured status of the raffle: 0=No ; 1=Yes 0
picture Name of the images representing the respective product nexus.jpg
approved Parameter regarding the approved status of the raffle: 0=No ; 1=Yes 1
tags Names of relevant tags related to the raffle, add them separated by comas nexus4,lg,google
ticket_price Price set for the tickets of that raffle 10
tickets_nr Number of the available tickets for that raffle 200
user_tickets_bought_limit Number representing the maximum amount of tickets an user can buy, add "0" for no limit 8
pictures Names of additional images, add them separated by comas if more than one nexusblack.jpg,nexuswhite.jpg


Be sure that the images names added on the .csv file match with the ones from the archive.

To help you even further to understand the structure of the CSV file, you can download raffle_import_sample.csv.

More information available on our forum at: http://thephpfactory.com/forum/raffle-factory/9170-import-csv-sample-file



(!) Documentation based on Raffle Factory version 3.5.1