本文整理汇总了PHP中MarketplaceWebServiceProducts_Interface::getMatchingProductForId方法的典型用法代码示例。如果您正苦于以下问题:PHP MarketplaceWebServiceProducts_Interface::getMatchingProductForId方法的具体用法?PHP MarketplaceWebServiceProducts_Interface::getMatchingProductForId怎么用?PHP MarketplaceWebServiceProducts_Interface::getMatchingProductForId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MarketplaceWebServiceProducts_Interface
的用法示例。
在下文中一共展示了MarketplaceWebServiceProducts_Interface::getMatchingProductForId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: invokeGetMatchingProductForId
/**
* Get Matching Product For Id Action Sample
* GetMatchingProduct will return the details (attributes) for the
* given Identifier list. Identifer type can be one of [SKU|ASIN|UPC|EAN|ISBN|GTIN|JAN]
*
* @param MarketplaceWebServiceProducts_Interface $service instance of MarketplaceWebServiceProducts_Interface
* @param mixed $request MarketplaceWebServiceProducts_Model_GetMatchingProductForId or array of parameters
*/
function invokeGetMatchingProductForId(MarketplaceWebServiceProducts_Interface $service, $request)
{
try {
$response = $service->getMatchingProductForId($request);
echo "Service Response\n";
echo "=============================================================================\n";
echo " GetMatchingProductForIdResponse\n";
$getMatchingProductForIdResultList = $response->getGetMatchingProductForIdResult();
foreach ($getMatchingProductForIdResultList as $getMatchingProductForIdResult) {
echo " GetMatchingProductForIdResult\n";
if ($getMatchingProductForIdResult->isSetId()) {
echo " Id";
echo "\n";
echo " " . $getMatchingProductForIdResult->getId() . "\n";
}
if ($getMatchingProductForIdResult->isSetIdType()) {
echo " IdType";
echo "\n";
echo " " . $getMatchingProductForIdResult->getIdType() . "\n";
}
if ($getMatchingProductForIdResult->isSetStatus()) {
echo " status";
echo "\n";
echo " " . $getMatchingProductForIdResult->getStatus() . "\n";
}
if ($getMatchingProductForIdResult->isSetProducts()) {
echo " Products\n";
$products = $getMatchingProductForIdResult->getProducts();
$productList = $products->getProduct();
foreach ($productList as $product) {
echo " Product\n";
if ($product->isSetIdentifiers()) {
echo " Identifiers\n";
$identifiers = $product->getIdentifiers();
if ($identifiers->isSetMarketplaceASIN()) {
echo " MarketplaceASIN\n";
$marketplaceASIN = $identifiers->getMarketplaceASIN();
if ($marketplaceASIN->isSetMarketplaceId()) {
echo " MarketplaceId\n";
echo " " . $marketplaceASIN->getMarketplaceId() . "\n";
}
if ($marketplaceASIN->isSetASIN()) {
echo " ASIN\n";
echo " " . $marketplaceASIN->getASIN() . "\n";
}
}
if ($identifiers->isSetSKUIdentifier()) {
echo " SKUIdentifier\n";
$SKUIdentifier = $identifiers->getSKUIdentifier();
if ($SKUIdentifier->isSetMarketplaceId()) {
echo " MarketplaceId\n";
echo " " . $SKUIdentifier->getMarketplaceId() . "\n";
}
if ($SKUIdentifier->isSetSellerId()) {
echo " SellerId\n";
echo " " . $SKUIdentifier->getSellerId() . "\n";
}
if ($SKUIdentifier->isSetSellerSKU()) {
echo " SellerSKU\n";
echo " " . $SKUIdentifier->getSellerSKU() . "\n";
}
}
}
if ($product->isSetAttributeSets()) {
echo " AttributeSets\n";
$attributeSets = $product->getAttributeSets();
if ($attributeSets->isSetAny()) {
$nodeList = $attributeSets->getAny();
echo prettyPrint($nodeList);
}
}
if ($product->isSetRelationships()) {
echo " Relationships\n";
$relationships = $product->getRelationships();
if ($relationships->isSetAny()) {
$nodeList = $relationships->getAny();
echo prettyPrint($nodeList);
}
}
if ($product->isSetCompetitivePricing()) {
echo " CompetitivePricing\n";
$competitivePricing = $product->getCompetitivePricing();
if ($competitivePricing->isSetCompetitivePrices()) {
echo " CompetitivePrices\n";
$competitivePrices = $competitivePricing->getCompetitivePrices();
$competitivePriceList = $competitivePrices->getCompetitivePrice();
foreach ($competitivePriceList as $competitivePrice) {
echo " CompetitivePrice\n";
if ($competitivePrice->isSetCondition()) {
echo " condition";
echo "\n";
echo " " . $competitivePrice->getCondition() . "\n";
//.........这里部分代码省略.........