-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hi,
I have been testing the SDK with a test Shoptet instance, and when I try to get product details, I get the following exception.
<?php
use Shoptet\Api\Sdk\Php\Sdk;
Sdk::setPartnerDomainUrl('https://dummy.myshoptet.com/');
Sdk::setHeader('Shoptet-Private-API-Token', 'dummy-token');
$product = Sdk::getProductDetail('d7282b43-d957-11e0-b04f-57a43310b768');
$product->getBody();
Trace
#0 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(128): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory->processValueObjectProperty('Shoptet\\Api\\Sdk...', NULL)
#1 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(83): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory->processNullValueProperty(Object(ReflectionMethod))
#2 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(50): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory->processProperty('actionPrice', NULL)
#3 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(37): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory->processEntity(Array)
#4 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityCollectionFactory.php(95): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory::createEntity('Shoptet\\Api\\Sdk...', Array)
#5 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityCollectionFactory.php(54): Shoptet\Api\Sdk\Php\Factory\Entity\EntityCollectionFactory->processEntityItems(Object(ReflectionMethod), Array, Object(ReflectionClass))
#6 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityCollectionFactory.php(37): Shoptet\Api\Sdk\Php\Factory\Entity\EntityCollectionFactory->processEntityCollection(Array)
#7 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(301): Shoptet\Api\Sdk\Php\Factory\Entity\EntityCollectionFactory::createEntityCollection('Shoptet\\Api\\Sdk...', Array)
#8 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(221): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory->processEntityCollectionProperty('Shoptet\\Api\\Sdk...', Array)
#9 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(88): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory->processArrayValueProperty(Object(ReflectionMethod), Array)
#10 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(50): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory->processProperty('variants', Array)
#11 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(37): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory->processEntity(Array)
#12 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(289): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory::createEntity('Shoptet\\Api\\Sdk...', Array)
#13 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(207): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory->processEntityProperty('Shoptet\\Api\\Sdk...', Array)
#14 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(88): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory->processArrayValueProperty(Object(ReflectionMethod), Array)
#15 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(50): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory->processProperty('data', Array)
#16 /var/www/html/vendor/shoptet/api-sdk-php/src/Factory/Entity/EntityFactory.php(37): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory->processEntity(Array)
#17 /var/www/html/vendor/shoptet/api-sdk-php/src/Response/EntityResponse.php(47): Shoptet\Api\Sdk\Php\Factory\Entity\EntityFactory::createEntity('Shoptet\\Api\\Sdk...', Array)
#18 /var/www/html/vendor/shoptet/api-sdk-php/src/Response/EntityResponse.php(27): Shoptet\Api\Sdk\Php\Response\EntityResponse->castBodyToEntity()
#19 /var/www/html/src/Controller/DebugController.php(26): Shoptet\Api\Sdk\Php\Response\EntityResponse->getBody()
Raw data of product
{"data":{"guid":"d7282b43-d957-11e0-b04f-57a43310b768","type":"product","adult":false,"visibility":"visible","creationTime":"2014-10-23T11:06:10+0200","changeTime":"2026-01-14T09:28:26+0100","shortDescription":"<p>Pohodl\u00ed a styl, to jsou ko\u017een\u00e9 sneakersy RunForSeven. Ide\u00e1ln\u00ed volba pro p\u00e1ny do m\u011bsta, na proch\u00e1zky a do pr\u00e1ce. Jednodu\u0161e v\u0161ude, kde chcete zanechat dojem.<\/p>","description":"<p>Pohodl\u00ed a styl, to jsou ko\u017een\u00e9 sneakersy RunForSeven. Ide\u00e1ln\u00ed volba pro p\u00e1ny do m\u011bsta, na proch\u00e1zky a do pr\u00e1ce. Jednodu\u0161e v\u0161ude, kde chcete zanechat dojem.<\/p>","metaDescription":null,"name":"P\u00e1nsk\u00e9 sneakersy RunForSeven","metaTitle":"","xmlFeedName":null,"additionalName":null,"internalNote":null,"allowIPlatba":true,"allowOnlinePayments":true,"sizeIdName":null,"voteCount":0,"voteAverageScore":"0.000","conditionGrade":null,"conditionDescription":null,"preauthorizationRequired":false,"indexName":"panske-sneakersy-runforseven","defaultCategory":{"guid":"3bc2e045-d7b5-11e0-9a5c-feab5ed617ed","name":"Boty","visible":true},"supplier":null,"brand":{"code":"runforseven","name":"RunForSeven"},"url":"https:\/\/754568.myshoptet.com\/panske-sneakersy-runforseven\/","atypicalBilling":false,"atypicalShipping":false,"isVariant":true,"variants":[{"code":"11\/38","ean":null,"stock":"0.000","unit":"ks","weight":"12.000","width":"0.0","height":"0.0","depth":"0.0","visible":true,"minStockSupply":null,"negativeStockAllowed":"yes-global","amountDecimalPlaces":0,"price":"350.00","includingVat":true,"vatRate":"0.00","currencyCode":"CZK","actionPrice":null,"commonPrice":"399.00","manufacturerCode":null,"pluCode":null,"isbn":null,"serialNo":null,"mpn":null,"heurekaCPC":null,"atypicalShipping":false,"atypicalBilling":false,"availability":{"id":-4,"name":"Objedn\u00e1no"},"availabilityWhenSoldOut":{"id":-1,"name":"Skladem"},"zboziCZ":{"maximalCPC":null,"maximalSearchCPC":null,"hidden":false},"prices":{"purchasePrice":{"price":"200.00","vatRate":"0.00","includingVat":true}},"url":"https:\/\/754568.myshoptet.com\/panske-sneakersy-runforseven\/?variantId=45"},{"code":"11\/39","ean":null,"stock":"0.000","unit":"ks","weight":"12.000","width":"0.0","height":"0.0","depth":"0.0","visible":true,"minStockSupply":null,"negativeStockAllowed":"yes-global","amountDecimalPlaces":0,"price":"350.00","includingVat":true,"vatRate":"0.00","currencyCode":"CZK","actionPrice":null,"commonPrice":"399.00","manufacturerCode":null,"pluCode":null,"isbn":null,"serialNo":null,"mpn":null,"heurekaCPC":null,"atypicalShipping":false,"atypicalBilling":false,"availability":{"id":-4,"name":"Objedn\u00e1no"},"availabilityWhenSoldOut":{"id":-1,"name":"Skladem"},"zboziCZ":{"maximalCPC":null,"maximalSearchCPC":null,"hidden":false},"prices":{"purchasePrice":{"price":"200.00","vatRate":"0.00","includingVat":true}},"url":"https:\/\/754568.myshoptet.com\/panske-sneakersy-runforseven\/?variantId=48"},{"code":"11\/40","ean":null,"stock":"0.000","unit":"ks","weight":"12.000","width":"0.0","height":"0.0","depth":"0.0","visible":true,"minStockSupply":null,"negativeStockAllowed":"yes-global","amountDecimalPlaces":0,"price":"350.00","includingVat":true,"vatRate":"0.00","currencyCode":"CZK","actionPrice":null,"commonPrice":"399.00","manufacturerCode":null,"pluCode":null,"isbn":null,"serialNo":null,"mpn":null,"heurekaCPC":null,"atypicalShipping":false,"atypicalBilling":false,"availability":{"id":-4,"name":"Objedn\u00e1no"},"availabilityWhenSoldOut":{"id":-1,"name":"Skladem"},"zboziCZ":{"maximalCPC":null,"maximalSearchCPC":null,"hidden":false},"prices":{"purchasePrice":{"price":"200.00","vatRate":"0.00","includingVat":true}},"url":"https:\/\/754568.myshoptet.com\/panske-sneakersy-runforseven\/?variantId=51"}]},"errors":null}
suchman