PDA

View Full Version : help setting up v3 please.


ljackson09
12-08-09, 02:38
Hi Guys,

just logged in to find out that v3 of the shop window api has been released :)

i have been waiting for this day as im sure many have,

i have some questions that i require some assistance with please.

1/i would like to specify a product category when searching for a particular item?

here is my current code
//AFFILIATE WINDOW PRICE FINDER
$searchcategory = "";
$storesArray = array(
1186,1109,380,1257,1418,1228,172,1672,1744,854,214 7,
1331,2258,1599,1487,1946,1322,323,2249,1598,1964,1 5,
547,1970,2344,2383,1221,782,65,2276,1472,1132,1184 ,
2038,2208,1311,1084,9,2124,1815,1916,1107,2026,199 5,
2383,782,65,1198,1132,65,782,1597,2041,2203,2038,2 124,
2433,2453,1995,1521,1916,686,2354,1472,1107,980,25 37,
2481,1559,483,1404,2547,2548,2549);
$stores = array('iMerchantId' => $storesArray);
$aParams = array("sQuery" => $Keywords, "iMerchantId" => $stores);
$oResponse=$oClient->call('getProductList', $aParams);

#basis of one per merchant
$onePerMerchant = array();

$x = 0;
if(count($oResponse->oProduct) <> 0){;

foreach($oResponse->oProduct as $oProduct){

if(!in_array($oProduct->iMerchantId,$onePerMerchant)
&& in_array($oProduct->iMerchantId,$storesArray))
{ #makes sure we dont already have a product from this merchant


# add merchantID to $onePerMerchant Array
$onePerMerchant[$x] = $oProduct->iMerchantId;

$merchantname = $oProduct->iMerchantId;
$merchant = "AW".$oProduct->iMerchantId;
$productPrice = number_format($oProduct->fPrice, 2, '.', '');
$PnP = number_format($oProduct->fDeliveryCost, 2, '.', '');
$totalPrice = number_format((($oProduct->fPrice)+($oProduct->fDeliveryCost)), 2, '.', '');
$link = $oProduct->sAwDeepLink;
//INSERT INTO DB
$getpricesSQL = "INSERT INTO comparison_results
(storeID,product_price,postage_price,total_price,l ink)
VALUES('$merchant',$productPrice,$PnP,$totalPrice,
'$link')";
$query = mysql_query($getpricesSQL)or die(mysql_error());

$x++;
}
}

}
else{}
//AFFILIATE WINDOW END


which searches for an item based on a string inputted and then it returns 1 item for each merchant that i am signed up to if there is a product that matches the criteria, however the current problm is that if im searching in dvds for "17 Again" im getting 17inch tvs and a few other odd products appear which i would like to remove by adding a search in category which i was told was being added for v3?

2/can i pull out a list of discount codes out of the api of all the stores i am signed up to? if so how ?

any help would be appreciated... :)

p.s how do i change to v3

many thanks
Luke

ljackson09
28-08-09, 21:59
hi all, im still struggling to intergrate to v3 :(

i have downloaded the new files from my loggin area,

but im not sure what to do next :(

can anyne please assist me?
please

Luke

GeorgeGaz
01-09-09, 10:03
Hi Luke,

Are you just trying to install a standard install out of the box?

If so, the setup is similar to that of v2 and the documentation is live within the affiliate account.

Regards

ljackson09
06-09-09, 18:02
Hi Mate, i have decided to stick with v2 for the time being, until i can justify moving to v3 :)

thanks
Luke

Amoochi
06-09-09, 22:12
Hi Mate, i have decided to stick with v2 for the time being, until i can justify moving to v3 :)

thanks
Luke

Why not just keep your current v2 version and set up a new domain for v3 to allow you to mess about and get used to it and the likes. That's the simple easy way to not interupt service or potential sales and the likes and at the same time, that way it doesn't matter if you screw things up to start with with v3. It's about learning the code for yourself, about getting used to the system, about knowning what does what, how the bits of code all work and about getting yourself confident with it all, without having to rely on others every time you get a bit stuck, it should be an enjoyable experience and nothing to be scared of. Hell, I remember a time when basic <tr> and <p> tags scared the hell out of me, but you overcome these things, like i'm currently trying to do with .htaccess after someone on here said some things which kinda hit a point with me, with me not knowing how it worked.

ljackson09
18-09-09, 23:31
yeah thats a good idea i will try that :)

thanks mate.

p.s yeah everything is very scary at the mo lots of scary tags and info argghhh lol.

i'll get there :)

Luke