feat(cart): implement cart editing policies and update related functionality
This commit is contained in:
@@ -8,7 +8,6 @@ declare(strict_types=1);
|
||||
* Run from the backend root with:
|
||||
* php postman/generate-shopit-collection.php
|
||||
*/
|
||||
|
||||
$root = dirname(__DIR__);
|
||||
chdir($root);
|
||||
|
||||
@@ -38,7 +37,7 @@ function jsonBody(array $payload): array
|
||||
}
|
||||
|
||||
/** @param array<string, string> $fields
|
||||
* @return array<string, mixed>
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
function formDataBody(array $fields, array $fileFields = []): array
|
||||
{
|
||||
@@ -137,13 +136,13 @@ function bodyFor(string $method, string $uri): ?array
|
||||
'display_categories' => true,
|
||||
'display_seach_bar' => true,
|
||||
'display_cart' => true,
|
||||
'cart_editing_enabled' => true,
|
||||
'cart_editing_policy' => 'full',
|
||||
'website_type_code' => 'shopit',
|
||||
]);
|
||||
}
|
||||
|
||||
if (in_array($key, ['PUT api/tenants/{tenant}', 'PATCH api/tenants/{tenant}'], true)) {
|
||||
return jsonBody(['nombre' => 'Tenant Demo Actualizado', 'site_title' => 'ShopIt Demo', 'primary_color' => '#111827', 'cart_editing_enabled' => true]);
|
||||
return jsonBody(['nombre' => 'Tenant Demo Actualizado', 'site_title' => 'ShopIt Demo', 'primary_color' => '#111827', 'cart_editing_policy' => 'full']);
|
||||
}
|
||||
|
||||
if ($key === 'POST api/tenants/{tenant:codigo}/catalog-items') {
|
||||
|
||||
Reference in New Issue
Block a user