Open tescz opened 2 years ago
Tohle by bylo třeba přidat také pro V3 verzi balíčku. Tahle "ochrana" by měla jít globálně vypnout v účtu MallPartner.
Why is this still not merged? This exception happens all the time.
vendor/mallgroup/mpapi-client/src/Article/ArticleClient.php
public function updateProduct(ProductRequest $product): void
{
$this->sendJson('PUT', sprintf(self::PRODUCT_DETAIL, $product->getId()), $product->getArrayForApi());
}
public function updateProductWithForceToken(ProductRequest $product, string $forceToken): void
{
$appendUrlWithForceToken = '?force_token=' . $forceToken;
$this->sendJson('PUT', sprintf(self::PRODUCT_DETAIL, $product->getId()) . $appendUrlWithForceToken, $product->getArrayForApi());
}
public function deleteProduct(string $productId): void
{
$this->sendJson('DELETE', sprintf(self::PRODUCT_DETAIL, $productId));
}
In a try-catch, get the force token, and use updateProductWithForceToken
to update the product.
This is still not fixed.
Zdravím,
pokud dobře chápu, zatím není možné přes tohoto API klienta změnit cenu produktu o více jak 30%. Musí se totiž zasílat
force_token
, ovšem jak v příkladech, tak v kódu jsem nenašel, jak je tohle možné provést. Nebo mýlím se?https://mpapi-docs.mallgroup.com/#/Products