Sub-Divide Existing Product Parition

72 views
Skip to first unread message

aroxo...@gmail.com

unread,
Aug 28, 2014, 9:34:45 AM8/28/14
to adwor...@googlegroups.com
Hi,

i have following queries :

1. Sub-dividing Existing Product Partition 


This is the exact need , can i get the code on these steps ?

2. i can create product Paritions using Product offerId , but can;t able to do with product type

For example :  first child 

$helper = new ProductPartitionHelper($var_adgroup_id);

$root = $helper->createSubdivision();

$helper->createUnit($root, new ProductType('PRODUCT_TYPE_L1','radiators'),20000);
$helper->createUnit($root, new ProductType('PRODUCT_TYPE_L1','shower enclosures'),20000);

$helper->createUnit($root, new ProductType());

$result = $adGroupCriterionService->mutate($helper->getOperations());

-----------------------------------

3.  ' PRODUCT_TYPE_L1' -> For first child level product types/

if we use 2nd child -> then we have to use 'PRODUCT_TYPE_L2' ?

Please help me out

Thanks


Sérgio Gomes (Shopping API Team)

unread,
Aug 29, 2014, 5:53:10 AM8/29/14
to adwor...@googlegroups.com
Hi there,

To subdivide an existing partition, I'd actually recommend deleting the entire tree (by deleting the root node) and reuploading it, as it's going to be significantly easier from an implementation point of view. The only exception is if you can't upload your tree in one go, in which case you'll need a different approach.

Cheers,
Sérgio

---
Sérgio Gomes
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902

aroxo...@gmail.com

unread,
Aug 30, 2014, 8:46:38 AM8/30/14
to adwor...@googlegroups.com
Hi

Thanks for the Reply.

As you said, to remove complete product partition of adgroup and insert the list ( chain list - root and child levels ) in one go, its fine 

two more questions:

1. for example , if we have like this

          A
       /     \
     B      C
             /  \
            D   E

once removed all partition , then i will update following tree


          A
       /   |    \
     B   C   F

then, "C" will have the same  benchmark CTR,clicks, etc  as we have before remove ?


2. we have following 

-------------

helper->createUnit($root,new ProductType('PRODUCT_TYPE_L1','furniture'),900000);

$otherCondition = $helper->createSubdivision($root,new ProductType('PRODUCT_TYPE_L1','baths'),300000);

$helper->createUnit($otherCondition,new ProductType('PRODUCT_TYPE_L2','shower baths'),200000);

$otherCondition_1 = $helper->createSubdivision($otherCondition,new ProductType('PRODUCT_TYPE_L2','freestanding baths'),200000);

$helper->createUnit($otherCondition_1,new ProductBrand('mywork.com'),300000);

$helper->createUnit($otherCondition,new ProductType('PRODUCT_TYPE_L2'));

$helper->createUnit($root,new ProductType('PRODUCT_TYPE_L1'));

$helper->createUnit($otherCondition_1,new ProductBrand());

-------------
am trying to create these lines of code dynamically using a recursive Array in PHP , but its getting a bit sick

if you have you any idea, please drop it on this.

3. if i form the partition type dynamically , PRODUCT_TYPE_L1  ( 1,2, are dynamic ) - it not working and says "enumeration issue"

any idea on this?


Thanks


           
              



Reply all
Reply to author
Forward
0 new messages