We have two types of datafeeds available for our affiliates through Pepperjam. The first type you can find in the Pepperjam system. These are easy to use and can be easily formatted with the Pepperjam storebuilder. Carsten Cumbrowski has put together an excellent guide for how to use these datafeeds at http://www.cumbrowski.com/CarstenC/affiliatemarketing_datafeeds_pepperjamnetwork.asp.
For those who want something a bit more advanced, our dynamic datafeeds might be a good option. Our dynamic datafeeds make it easy for you to promote specific types of products from your website. Download some simple code, customize it for your site, and you’ll never have to worry about updating your datafeeds again. Our dynamic datafeeds are only available for affiliates partnered through Pepperjam, so if you’d like to use them, you’ll need to sign up for our programs on that network. Find out more at http://www.hayneedleaffiliates.com/pepperjam-overview/.
Directions
We have stored all of our datafeeds from 160+ stores in a MySQL table for your use. In order to connect to the MySQL database on our server and display products from our datafeeds, your website must be located on a server that is PHP, ASP, or CF enabled. For any page of your website that you want to place datafeed content on, you must paste the correct code into that page.
You will need to modify two lines of code initially.
- Change the table variable from the default “pj_adirondackchairs” to whatever store you want to pull data from (see complete list below).
- Change “AFFID” to your own unique affiliate id.
PHP Code:
<?php
$login = “hnaffili_hnaffil”;
$password = “feedme”;
$table = “pj_adirondackchairs“;
$aid = “AFFID“;
$database = “hnaffili_datafeeds”;
$connection = mysql_connect(“datafeed.hayneedleaffiliates.com”,”$login”,”$passwor d”)
or die (“Unable to connect.”);
mysql_select_db($database)
or die (“Unable to open database.”);
$sql = “SELECT * FROM $table order by category”;
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result))
{
extract($row);
echo “<table width=’100%’ border=’0′ cellspacing=’0′ cellpadding=’3′> \n”;
echo “<tr>\n”;
echo “<td valign=’top’>\n<a href=’$prefix$aid$link‘> <img src=’$image’ border=0> </a> \n <br> <b> Price: </b> $$price\n </td> \n”;
echo “<td valign=’top’>\n<a href=’$prefix$aid$link‘> \n<b> $product </b> </a> \n<br> $description\n <br> <b> Item: </b> <i> $sku </i> \n <b> Category: </b> <i> $category </i> <br> </td>\n”;
echo “</tr>\n”;
echo “</table>\n”;
echo “<hr size=’1′>\n”;
}
mysql_close($connection);
?>
- It is recommended that you first run the provided script to get a sense of the categories those products are broken down into.
- Decide how you want to categorize the products on your site, and then modify the SQL query to pull only the products you want for each page.
- Feel free to modify the layout of the table to suit your design tastes – the example above is just for introductory purposes – you’ll want to tweak it and make it your own (you will probably want to remove the category field, for example).
The more familiar you are with HTML, SQL, and at least one of the above languages, the more you can do with the script. The tables in the below right column should prove very helpful as well. If you are having problems, please contact us.
| SQL Statement | Description |
| select | choose, pick |
| * | all |
| order by | sort order |
| desc | in descending order |
| where | under the following conditions |
| = | equals |
| != | not equal to |
| and | both rules must be true |
| or | either rule must be true |
| not | not true |
| like | similar to |
| % | variable placeholder |
| limit x,y | limit results to y, begin at record x |
| SQL Name | PHP Value | Description |
| link | $link | Link to product |
| sku | $sku | Product SKU number |
| category | $category | Product Category |
| price | $price | Product price |
| product | $product | Product name |
| description | $description | Product description |
| image | $image | Link to image |
| $table | $table | Store to pull data from |
| $aid | Your unique affiliate ID | |
| best_seller | best_seller | Pulls the best selling products |
| Sample SQL Queries | |
| select* from $table where category like %chair% order by price desc | |
| select* from $table where category like %hammock% or product like ‘%hammock%’ order by price | |
| select* from $table where product not like %hammock% order by price | |
| select * from $tabe order by best_seller |
| Table Name | SKUs |
| pj_activitytableshop |
215 |
| pj_adirondackchairs |
460 |
| pj_adjustablebarstools |
40 |
| pj_affordablefutons |
475 |
| pj_allbraidedrugs |
900 |
| pj_allbriefcases |
320 |
| pj_allespressomachines |
145 |
| pj_alloutdoorbenches |
550 |
| pj_allrecyclingbins |
85 |
| pj_allsandboxes |
65 |
| pj_alltvstands |
620 |
| pj_allworkbenches |
125 |
| pj_aquariumsdirect |
225 |
| pj_babyswings |
55 |
| pj_backgammonplus |
180 |
| pj_badmintonsource |
205 |
| pj_bakersracks |
145 |
| pj_banquettables |
160 |
| pj_barstools |
1,090 |
| pj_basketballgoals |
215 |
| pj_bathroomlightingsource |
550 |
| pj_bathroomvanities |
650 |
| pj_beachchairs |
185 |
| pj_beanbags |
50 |
| pj_bedroomfurnituremart |
1,965 |
| pj_bedsidetables |
255 |
| pj_benches |
945 |
| pj_binoculars |
1,285 |
| pj_birdbaths |
360 |
| pj_birdcages |
340 |
| pj_bistrosets |
360 |
| pj_bocceballsets |
215 |
| pj_bookcasesgalore |
465 |
| pj_bouncesuperstore |
145 |
| pj_buyentertainmentcenters |
100 |
| pj_candelabras |
150 |
| pj_canopybed |
70 |
| pj_canopycenter |
270 |
| pj_carportsusa |
100 |
| pj_cartsandwagons |
200 |
| pj_cedarchests |
135 |
| pj_chaiselounges |
100 |
| pj_chandeliersource |
1,340 |
| pj_changingtablestore |
190 |
| pj_chesssets |
430 |
| pj_chickencoopsource |
60 |
| pj_childrenschairs |
600 |
| pj_childrensdesks |
320 |
| pj_childrenstablesandchairs |
740 |
| pj_chocolatefountains |
45 |
| pj_christeningshop |
245 |
| pj_christmaslights |
270 |
| pj_christmastreesgalore |
150 |
| pj_clockstyle |
650 |
| pj_closetorganizersource |
300 |
| pj_clothdiapers |
75 |
| pj_clotheslinesource |
195 |
| pj_clubchairs |
135 |
| pj_coatracks |
140 |
| pj_coffeemakers |
160 |
| pj_coffeetablesgalore |
1,065 |
| pj_compostbins |
190 |
| pj_computerarmoires |
445 |
| pj_computerdesks |
885 |
| pj_contemporaryrugs |
1,135 |
| pj_cornholeplus |
125 |
| pj_cradlesandbassinets |
275 |
| pj_cribs |
935 |
| pj_croquet |
160 |
| pj_cushionsgalore |
230 |
| pj_dartboards |
375 |
| pj_daybeds |
290 |
| pj_desklamps |
255 |
| pj_desksetshop |
275 |
| pj_diaperbags |
695 |
| pj_diningchairs |
505 |
| pj_diningtables |
1,945 |
| pj_directorschairs |
120 |
| pj_doghouses |
540 |
| pj_dogkennels |
425 |
| pj_dollhousesgalore |
270 |
| pj_doormatsource |
600 |
| pj_draftingtables |
180 |
| pj_dressers |
1,140 |
| pj_easelsource |
180 |
| pj_egardenbridges |
25 |
| pj_ekitchenislands |
225 |
| pj_electricfireplacesource |
165 |
| pj_endtables |
560 |
| pj_erockinghorses |
105 |
| pj_esoccergoals |
315 |
| pj_ewineracks |
475 |
| pj_exercisebikes |
45 |
| pj_filingcabinets |
345 |
| pj_firepits |
165 |
| pj_fireplacemantels |
200 |
| pj_fireplacescreens |
375 |
| pj_fireplacetoolsource |
200 |
| pj_floorlampsgalore |
245 |
| pj_fonduepots |
40 |
| pj_furnacefilters |
65 |
| pj_gardenstatueshop |
560 |
| pj_giftbaskets |
675 |
| pj_grandfatherclocks |
60 |
| pj_greathomebars |
225 |
| pj_greatpubtables |
545 |
| pj_greatrusticfurniture |
615 |
| pj_grillsdirect |
240 |
| pj_guncabinetsandsafes |
115 |
| pj_halltrees |
120 |
| pj_hammocks |
225 |
| pj_handtrucks |
375 |
| pj_hayneedle |
50,000 |
| pj_headboardsource |
375 |
| pj_hearthrugs |
295 |
| pj_highchairstore |
90 |
| pj_hometheaterseating |
45 |
| pj_hosereelsource |
85 |
| pj_ibattingcages |
160 |
| pj_idogbeds |
305 |
| pj_ilightingsource |
4,615 |
| pj_inflatabletrampolines |
230 |
| pj_inversiontables |
40 |
| pj_ipendantlighting |
655 |
| pj_ipetdoors |
70 |
| pj_ipilatesreformers |
45 |
| pj_ipitchingmachines |
155 |
| pj_iroomdividers |
315 |
| pj_itorches |
50 |
| pj_itoyboxes |
420 |
| pj_itoystorage |
290 |
| pj_jewelryarmoire |
125 |
| pj_jewelryboxes |
225 |
| pj_jukeboxes |
25 |
| pj_justbacklessbarstools |
170 |
| pj_justbathroomcabinets |
275 |
| pj_justbathroomfurniture |
590 |
| pj_justbookends |
240 |
| pj_justcounterstools |
215 |
| pj_justcuckooclocks |
100 |
| pj_justdoublestrollers |
25 |
| pj_justdowncomforters |
100 |
| pj_justfoosballtables |
140 |
| pj_justgreenhouses |
325 |
| pj_justkitchentablesandchairs |
775 |
| pj_justleatherbarstools |
225 |
| pj_justnightstands |
290 |
| pj_justnurserygliders |
260 |
| pj_justoutdoorbarstools |
110 |
| pj_juststoragebenches |
195 |
| pj_juststrollers |
130 |
| pj_justwoodbarstools |
270 |
| pj_kidsfurnituremart |
2,450 |
| pj_kidsrugshop |
955 |
| pj_ladderballplus |
120 |
| pj_lampsgalore |
90 |
| pj_landscapelightingshop |
305 |
| pj_lazysusans |
40 |
| pj_magazineracks |
315 |
| pj_medicinecabinetshop |
490 |
| pj_metaldetectors |
85 |
| pj_moccasins |
190 |
| pj_modelplanes |
650 |
| pj_modernfurniture |
1,430 |
| pj_moreofficefurniture |
1,010 |
| pj_musicboxes |
185 |
| pj_nutcrackers |
590 |
| pj_onlyarearugs |
3,165 |
| pj_onlygloves |
90 |
| pj_onlyoutdoorfountains |
240 |
| pj_onlyslippers |
370 |
| pj_operaglasses |
50 |
| pj_orientalrugs |
770 |
| pj_ottomans |
135 |
| pj_outdoorlightingplus |
1,895 |
| pj_outdoorrugshop |
505 |
| pj_patiofurnitureusa |
1,450 |
| pj_patioheaterstore |
40 |
| pj_patioumbrellas |
245 |
| pj_petcarriers |
420 |
| pj_picnictablesdirect |
270 |
| pj_pillowsuperstore |
310 |
| pj_plantstands |
345 |
| pj_playhouses |
135 |
| pj_playkitchens |
125 |
| pj_playpens |
75 |
| pj_poolfurniture |
1,085 |
| pj_pooltablelights |
300 |
| pj_pooltoysource |
175 |
| pj_porchswings |
380 |
| pj_potracksgalore |
215 |
| pj_potterywheelsandkilns |
40 |
| pj_pottingbenches |
350 |
| pj_quiltracks |
20 |
| pj_rabbitcagesource |
90 |
| pj_radarbusters |
115 |
| pj_rainbarrelsource |
140 |
| pj_reclinersplus |
240 |
| pj_reelmowersource |
115 |
| pj_ridingtoys |
160 |
| pj_rockingchairs |
415 |
| pj_rocktumblers |
110 |
| pj_rowingmachinesource |
20 |
| pj_servingtrays |
165 |
| pj_sewingtableshop |
100 |
| pj_shagrugshop |
170 |
| pj_showercurtainsgalore |
685 |
| pj_silkpalms |
505 |
| pj_simplyaccentchairs |
175 |
| pj_simplyarbors |
310 |
| pj_simplybeds |
1,440 |
| pj_simplybunkbeds |
250 |
| pj_simplyfountains |
375 |
| pj_simplyhangers |
70 |
| pj_simplykidsbeds |
575 |
| pj_simplyloftbeds |
365 |
| pj_simplymicroscopes |
50 |
| pj_simplymirrors |
520 |
| pj_simplyplanters |
715 |
| pj_simplyplatformbeds |
865 |
| pj_simplypondkits |
145 |
| pj_simplytrellises |
215 |
| pj_simplyvanities |
780 |
| pj_skitube |
220 |
| pj_sofatables |
225 |
| pj_solarlightstore |
200 |
| pj_spottingscopes |
515 |
| pj_swingsetsource |
190 |
| pj_swivelbarstoolstore |
245 |
| pj_tabletenniszone |
155 |
| pj_telescopes |
770 |
| pj_tiffanylampsgalore |
800 |
| pj_toddlerbeds |
1,010 |
| pj_toiletseatsource |
355 |
| pj_toolboxesdirect |
270 |
| pj_tracklightingsource |
360 |
| pj_trailerhitches |
1,685 |
| pj_trampolinesplus |
125 |
| pj_trundlebedsdirect |
700 |
| pj_tvtraysource |
60 |
| pj_videogamechairs |
215 |
| pj_volleyballheadquarters |
315 |
| pj_weatherinstruments |
300 |
| pj_wickerfurniture |
370 |
| pj_windchime |
360 |
| pj_winecoolers |
345 |
| pj_worldglobes |
230 |
| pj_wreathsgalore |
305 |
| pj_writingdesks |
235 |