Hi,
I am having trouble adding a new product offer to an existing adgroup. I
used to do it like this but can't seem to get the code working with the new
API:
$adGroupCriterionService = $user->GetService('AdGroupCriterionService',
ADWORDS_VERSION);
$helper = new ProductPartitionHelper($adGroupId);
$root = $helper->createSubdivision();
if (is_array($ids)) { // Then there are options for the item and we need
to add them all
foreach ($ids AS $ident) {
$helper->createUnit($root, new ProductOfferId($ident), 500000);
}
} else {
// Ad Product Partion
$helper->createUnit($root, new ProductOfferId($id), 500000);
}
$helper->createUnit($root,new ProductOfferId(null));
$result = $adGroupCriterionService->mutate($helper->getOperations());
I can't seem to find that specific example in the docs either.
Any help would be appreciated.
Thanks
Dave
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/7d5fbfea-aeab-4983-9225-926843a09053%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.