Skip to content

Instantly share code, notes, and snippets.

@adardesign
Created March 14, 2013 16:50
Show Gist options
  • Save adardesign/5162968 to your computer and use it in GitHub Desktop.
Save adardesign/5162968 to your computer and use it in GitHub Desktop.
function RR.jsonCallback(){
//Process Placements provided in RR.data.JSON.placements
console.dir(RR.data.JSON.placements);
}
Example contents of RR.data.JSON:
{
"placements": [{
"message": "Frequently Bought Together",
"items": [{
"id": "EXAMPLE",
"name": "RR's Example Rec",
"brand": "$BRAND$",
"parentname": "$PARENTNAME$",
"linkURL": "http://integration.richrelevance.com/rrserver/click?a=0e21b9671a36a65a&vg=c081ae33-568b-415f-b979-374f0aa3921f&pti=1&pa=rr1&hpi=2924&stn=BuyTogether&rti=2&sgs=&u=0&uguid=a50bb96e-568b-415f-f297-194e9adfad16&channelId=WEB&s=0&pg=-1&p=EXAMPLE&ind=0&ct=%24ITEM_LINK_ID%24",
"imageURL": "http://media.richrelevance.com/rrserver/images/sampleimage.jpg",
"rating": "$RATING$",
"reviews": "$REVIEWS$",
"price": "9.99"
}, {
"id": "EXAMPLE",
"name": "RR's Example Rec",
"brand": "$BRAND$",
"parentname": "$PARENTNAME$",
"linkURL": "http://integration.richrelevance.com/rrserver/click?a=0e21b9671a36a65a&vg=c081ae33-568b-415f-b979-374f0aa3921f&pti=1&pa=rr1&hpi=2924&stn=BuyTogether&rti=2&sgs=&u=0&uguid=a50bb96e-568b-415f-f297-194e9adfad16&channelId=WEB&s=0&pg=-1&p=EXAMPLE&ind=1&ct=%24ITEM_LINK_ID%24",
"imageURL": "http://media.richrelevance.com/rrserver/images/sampleimage.jpg",
"rating": "$RATING$",
"reviews": "$REVIEWS$",
"price": "9.99"
}, {
"id": "EXAMPLE",
"name": "RR's Example Rec",
"brand": "$BRAND$",
"parentname": "$PARENTNAME$",
"linkURL": "http://integration.richrelevance.com/rrserver/click?a=0e21b9671a36a65a&vg=c081ae33-568b-415f-b979-374f0aa3921f&pti=1&pa=rr1&hpi=2924&stn=BuyTogether&rti=2&sgs=&u=0&uguid=a50bb96e-568b-415f-f297-194e9adfad16&channelId=WEB&s=0&pg=-1&p=EXAMPLE&ind=2&ct=%24ITEM_LINK_ID%24",
"imageURL": "http://media.richrelevance.com/rrserver/images/sampleimage.jpg",
"rating": "$RATING$",
"reviews": "$REVIEWS$",
"price": "9.99"
}, {
"id": "EXAMPLE",
"name": "RR's Example Rec",
"brand": "$BRAND$",
"parentname": "$PARENTNAME$",
"linkURL": "http://integration.richrelevance.com/rrserver/click?a=0e21b9671a36a65a&vg=c081ae33-568b-415f-b979-374f0aa3921f&pti=1&pa=rr1&hpi=2924&stn=BuyTogether&rti=2&sgs=&u=0&uguid=a50bb96e-568b-415f-f297-194e9adfad16&channelId=WEB&s=0&pg=-1&p=EXAMPLE&ind=3&ct=%24ITEM_LINK_ID%24",
"imageURL": "http://media.richrelevance.com/rrserver/images/sampleimage.jpg",
"rating": "$RATING$",
"reviews": "$REVIEWS$",
"price": "9.99"
}, {
"id": "EXAMPLE",
"name": "RR's Example Rec",
"brand": "$BRAND$",
"parentname": "$PARENTNAME$",
"linkURL": "http://integration.richrelevance.com/rrserver/click?a=0e21b9671a36a65a&vg=c081ae33-568b-415f-b979-374f0aa3921f&pti=1&pa=rr1&hpi=2924&stn=BuyTogether&rti=2&sgs=&u=0&uguid=a50bb96e-568b-415f-f297-194e9adfad16&channelId=WEB&s=0&pg=-1&p=EXAMPLE&ind=4&ct=%24ITEM_LINK_ID%24",
"imageURL": "http://media.richrelevance.com/rrserver/images/sampleimage.jpg",
"rating": "$RATING$",
"reviews": "$REVIEWS$",
"price": "9.99"
}],
"strategy": "BuyTogether",
"placement_name": ""
}, {
"message": "Frequently Bought Together",
"items": [{
"id": "EXAMPLE",
"name": "RR's Example Rec",
"brand": "$BRAND$",
"parentname": "$PARENTNAME$",
"linkURL": "http://integration.richrelevance.com/rrserver/click?a=0e21b9671a36a65a&vg=c081ae33-568b-415f-b979-374f0aa3921f&pti=1&pa=rr2&hpi=2924&stn=BuyTogether&rti=2&sgs=&u=0&uguid=a50bb96e-568b-415f-f297-194e9adfad16&channelId=WEB&s=0&pg=-1&p=EXAMPLE&ind=0&ct=%24ITEM_LINK_ID%24",
"imageURL": "http://media.richrelevance.com/rrserver/images/sampleimage.jpg",
"rating": "$RATING$",
"reviews": "$REVIEWS$",
"price": "9.99"
}, {
"id": "EXAMPLE",
"name": "RR's Example Rec",
"brand": "$BRAND$",
"parentname": "$PARENTNAME$",
"linkURL": "http://integration.richrelevance.com/rrserver/click?a=0e21b9671a36a65a&vg=c081ae33-568b-415f-b979-374f0aa3921f&pti=1&pa=rr2&hpi=2924&stn=BuyTogether&rti=2&sgs=&u=0&uguid=a50bb96e-568b-415f-f297-194e9adfad16&channelId=WEB&s=0&pg=-1&p=EXAMPLE&ind=1&ct=%24ITEM_LINK_ID%24",
"imageURL": "http://media.richrelevance.com/rrserver/images/sampleimage.jpg",
"rating": "$RATING$",
"reviews": "$REVIEWS$",
"price": "9.99"
}, {
"id": "EXAMPLE",
"name": "RR's Example Rec",
"brand": "$BRAND$",
"parentname": "$PARENTNAME$",
"linkURL": "http://integration.richrelevance.com/rrserver/click?a=0e21b9671a36a65a&vg=c081ae33-568b-415f-b979-374f0aa3921f&pti=1&pa=rr2&hpi=2924&stn=BuyTogether&rti=2&sgs=&u=0&uguid=a50bb96e-568b-415f-f297-194e9adfad16&channelId=WEB&s=0&pg=-1&p=EXAMPLE&ind=2&ct=%24ITEM_LINK_ID%24",
"imageURL": "http://media.richrelevance.com/rrserver/images/sampleimage.jpg",
"rating": "$RATING$",
"reviews": "$REVIEWS$",
"price": "9.99"
}, {
"id": "EXAMPLE",
"name": "RR's Example Rec",
"brand": "$BRAND$",
"parentname": "$PARENTNAME$",
"linkURL": "http://integration.richrelevance.com/rrserver/click?a=0e21b9671a36a65a&vg=c081ae33-568b-415f-b979-374f0aa3921f&pti=1&pa=rr2&hpi=2924&stn=BuyTogether&rti=2&sgs=&u=0&uguid=a50bb96e-568b-415f-f297-194e9adfad16&channelId=WEB&s=0&pg=-1&p=EXAMPLE&ind=3&ct=%24ITEM_LINK_ID%24",
"imageURL": "http://media.richrelevance.com/rrserver/images/sampleimage.jpg",
"rating": "$RATING$",
"reviews": "$REVIEWS$",
"price": "9.99"
}, {
"id": "EXAMPLE",
"name": "RR's Example Rec",
"brand": "$BRAND$",
"parentname": "$PARENTNAME$",
"linkURL": "http://integration.richrelevance.com/rrserver/click?a=0e21b9671a36a65a&vg=c081ae33-568b-415f-b979-374f0aa3921f&pti=1&pa=rr2&hpi=2924&stn=BuyTogether&rti=2&sgs=&u=0&uguid=a50bb96e-568b-415f-f297-194e9adfad16&channelId=WEB&s=0&pg=-1&p=EXAMPLE&ind=4&ct=%24ITEM_LINK_ID%24",
"imageURL": "http://media.richrelevance.com/rrserver/images/sampleimage.jpg",
"rating": "$RATING$",
"reviews": "$REVIEWS$",
"price": "9.99"
}],
"strategy": "BuyTogether",
"placement_name": ""
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment