PDA

View Full Version : web offers? how many stores provide that info?


ljackson09
07-01-10, 16:07
Hi I Am trying to pullout all the web offers from an array of stores but i have run into a few problems

firstly do many stores provide this information?

secondly how do i check all the items from the stores so i can get all the offers?

here is my current code
<?php
$storeID = array(
9,15,65,157,172,282,323,380,483,547,550,686,782,85 4,896,911,980,
1052,1084,1107,1109,1132,1134,1152,1184,1186,1198, 1202,1221,1228,
1252,1256,1257,1270,1311,1322,1331,1344,1350,1402, 1404,1418,1472,
1487,1521,1559,1597,1598,1599,1672,1744,1815,1826, 1836,1916,1946,
1947,1964,1970,1971,1995,2026,2038,2041,2066,2117, 2124,2147,2203,2208,
2249,2258,2276,2344,2354,2383,2400,2424,2433,2453, 2481,2526,
2537,2547,2548,2549);
$merchantcolumns = array(sName,bWebOffer,bPreOrder);
$aParams = array("iMerchantId" => $storeID, "sColumnToReturn" => $merchantcolumns);
$oResponse= $oClient->call('getProductList', $aParams);
$x = 0;

foreach($oResponse->oProduct as $oProduct)
{
if($oProduct->bWebOffer== 1)
{
print $oProduct->sName;
}

$x++;
};

?>


if anyone could shed some light on this i'd really appreciate it :)

many thanks
Luke

Andy
08-01-10, 11:38
getProductList will return 10 products that have nothing to do with anything you ask of it, unless you add iCategoryId or (even better) sQuery.

BUT, no matter what category id or search query I add, every product's bWebOffer is empty

Looking in the wiki for bWebOffer (http://wiki.affiliatewindow.com/index.php/Product_PSAPI) it is defined as a "Web only offer" which, although quite ambiguous, may still explain why it wouldn't be used much.

Merchants who only trade online would not add "Web Only Offer" as this would cover every one of their products

Any merchant that trades online and has physical shops, would likely sell everything in their shop and online, OR would have products that are only available in shops.

Online only offers are quite rare and tend to be restricted to web only sales or web only codes, this effectively makes bWebOffer at the product level quite redundant.

ljackson09
08-01-10, 14:46
Hi Andy,

thanks for taking time to explain this, i know sites like currys offer web only offers on their site which are only available online and not in store, just thought more stores would offer the same?

is there anything else i can promote, i was planning on setting up a newsletter where useres can click the stores they want updates on but im not sure what updates to provide? thats why i wanted to use the web offers :)

any ideas?

many thanks
Luke

Andy
08-01-10, 16:00
Ah, thats the key isnt it!

There are the Hotpicks, but you wont cover every merchant with those either because theyre updated by the merchants themselves, and we all know they like a good lie in on a morning ;)

You could go for the discount codes, but you're cutting your commissions and again, not every merchant handles them.

Personally, I would go random as a backup. so, if you're doing a weekly newsletter, each week, for each merchant, have the api:
Get 10 hotpicks
if hotpicks==0
get a discount code
if discount code==0
fall back on 10 randomly generated products picked based on keywords you enter

andy

ljackson09
08-01-10, 16:52
hi mate

dont we all (like a lie in :D)

yeah your idea sound like a good plan of action :)
i will look into that further...

thanks for your advice mate!!!

Luke

ljackson09
08-01-10, 17:15
ok mate i have tried to get this to work but with no success :(

here is what i have tried
$storeID = array(
9,15,65,157,172,282,323,380,483,547,550,686,782,85 4,896,911,980,
1052,1084,1107,1109,1132,1134,1152,1184,1186,1198, 1202,1221,1228,
1252,1256,1257,1270,1311,1322,1331,1344,1350,1402, 1404,1418,1472,
1487,1521,1559,1597,1598,1599,1672,1744,1815,1826, 1836,1916,1946,
1947,1964,1970,1971,1995,2026,2038,2041,2066,2117, 2124,2147,2203,2208,
2249,2258,2276,2344,2354,2383,2400,2424,2433,2453, 2481,2526,
2537,2547,2548,2549);
foreach($storeID as $store)
{
$merchantcolumns = array(sName,bWebOffer,bPreOrder,bHotPick);
$aParams = array("iMerchantId" => $store, "sColumnToReturn" => $merchantcolumns, "iLimit" =>10);
$oResponse= $oClient->call('getProductList', $aParams);
#print_r($oResponse);
$x = 0;
$offers = array();
foreach($oResponse->oProduct as $oProduct)
{
if($oProduct->bHotPick == 1)
{
$offers[$oProduct->iMerchantId][$x] = $oProduct->sName;
}

$x++;
};
}


can you point me in the right direction please! atm nothing loads on my page just get a blank white page with nothing on it :(
thanks
Luke

Andy
08-01-10, 18:51
Post your whole code luke and Ill take a look.

Unless that is your whole code, in which case, you haven't added an output

ljackson09
08-01-10, 18:56
hi mate that is my whole code except i have a print_r underneath the code listed :)

but nothing works, the page fails to load with the above code not even my css styling, i have error reporting on and still nothing? whether its trying to process too much?

i tried it too with just 2 stores in the array but had the same output :(

cheers
Luke