Skip to content

Commit 23b2db0

Browse files
committed
Fixed product fetchCategories using wrong params
1 parent e678ef9 commit 23b2db0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

includes/classes/AmazonProductInfo.php

+6
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ private function resetSKUs(){
8484
unset($this->options[$op]);
8585
}
8686
}
87+
//remove Category-specific name
88+
unset($this->options['SellerSKU']);
8789
}
8890

8991
/**
@@ -125,6 +127,8 @@ private function resetASINs(){
125127
unset($this->options[$op]);
126128
}
127129
}
130+
//remove Category-specific name
131+
unset($this->options['ASIN']);
128132
}
129133

130134
/**
@@ -394,9 +398,11 @@ protected function prepareCategories(){
394398
if (array_key_exists('SellerSKUList.SellerSKU.1',$this->options)){
395399
$this->options['Action'] = 'GetProductCategoriesForSKU';
396400
$this->resetASINs();
401+
$this->options['SellerSKU'] = $this->options['SellerSKUList.SellerSKU.1'];
397402
} else if (array_key_exists('ASINList.ASIN.1',$this->options)){
398403
$this->options['Action'] = 'GetProductCategoriesForASIN';
399404
$this->resetSKUs();
405+
$this->options['ASIN'] = $this->options['ASINList.ASIN.1'];
400406
}
401407
}
402408

0 commit comments

Comments
 (0)