From 6ac03a5604b806372bb9dcbf7510662a23555b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Chru=C5=9Bciel?= Date: Fri, 9 Aug 2019 18:48:19 +0200 Subject: [PATCH 1/2] Revert "Add onHand to product response" --- doc/swagger.yml | 3 --- spec/Factory/Product/ProductVariantViewFactorySpec.php | 2 -- src/Factory/Product/ProductVariantViewFactory.php | 1 - .../config/serializer/Product/ProductVariantView.yml | 3 --- src/View/Product/ProductVariantView.php | 3 --- tests/DataFixtures/ORM/shop.yml | 1 - .../cart/add_multiple_products_to_cart_response.json | 3 --- .../add_multiple_products_to_new_cart_response.json | 3 --- ...sed_on_options_multiple_times_to_cart_response.json | 1 - ...duct_variant_based_on_options_to_cart_response.json | 1 - ...roduct_variant_multiple_times_to_cart_response.json | 1 - .../cart/add_product_variant_to_cart_response.json | 1 - ...simple_product_multiple_times_to_cart_response.json | 1 - .../cart/add_simple_product_to_cart_response.json | 1 - .../cart/add_simple_product_to_new_cart_response.json | 1 - ...t_with_coupon_based_promotion_applied_response.json | 1 - ...led_cart_with_product_variant_summary_response.json | 2 -- ...lled_cart_with_simple_product_summary_response.json | 1 - ...led_cart_with_product_variant_summary_response.json | 1 - ...lled_cart_with_simple_product_summary_response.json | 1 - .../Expected/cart/recalculated_cart_after_log_in.json | 1 - .../cart/reprocessed_cart_after_deleting_an_item.json | 1 - .../Expected/checkout/cart_addressed_response.json | 1 - ...ifferent_shipping_and_billing_address_response.json | 1 - .../checkout/cart_with_chosen_payment_response.json | 1 - .../checkout/cart_with_chosen_shipment_response.json | 1 - ...th_chosen_shipment_with_per_item_rate_response.json | 1 - ...th_chosen_shipment_with_per_item_rate_response.json | 1 - .../Expected/order/order_details_response.json | 1 - .../Expected/order/order_details_response_guest.json | 1 - .../Responses/Expected/order/orders_list_response.json | 1 - .../german_product_list_page_by_code_response.json | 8 -------- .../german_product_list_page_by_slug_response.json | 8 -------- .../german_product_with_options_details_page.json | 7 ------- .../product/german_simple_product_details_page.json | 1 - .../limited_product_list_page_by_code_response.json | 2 -- .../limited_product_list_page_by_slug_response.json | 2 -- .../product/product_list_latest_2_response.json | 8 -------- .../product/product_list_latest_4_response.json | 10 ---------- .../product/product_list_page_by_code_response.json | 10 ---------- .../product/product_list_page_by_slug_response.json | 10 ---------- .../product_t_shirt_list_page_by_code_response.json | 2 -- .../product_t_shirt_list_page_by_slug_response.json | 2 -- .../product/product_with_options_details_page.json | 7 ------- .../product/product_with_variant_details_page.json | 2 -- .../Expected/product/simple_product_details_page.json | 1 - 46 files changed, 123 deletions(-) diff --git a/doc/swagger.yml b/doc/swagger.yml index f3a65b884..d10a59878 100644 --- a/doc/swagger.yml +++ b/doc/swagger.yml @@ -1321,9 +1321,6 @@ definitions: type: "object" additionalProperties: type: "string" - onHand: - type: "integer" - example: 12 price: $ref: "#/definitions/Price" originalPrice: diff --git a/spec/Factory/Product/ProductVariantViewFactorySpec.php b/spec/Factory/Product/ProductVariantViewFactorySpec.php index 8b7d5bfc8..c4b98c236 100644 --- a/spec/Factory/Product/ProductVariantViewFactorySpec.php +++ b/spec/Factory/Product/ProductVariantViewFactorySpec.php @@ -52,7 +52,6 @@ function it_builds_product_variant_view( $variantView = new ProductVariantView(); $variant->getCode()->willReturn('SMALL_RED_LOGAN_HAT_CODE'); - $variant->getOnHand()->willReturn(12); $variant->getTranslation('en_GB')->willReturn($productVariantTranslation); $variant->getChannelPricingForChannel($channel)->willReturn($channelPrice); $variant->getOptionValues()->willReturn(new ArrayCollection([ @@ -87,7 +86,6 @@ function it_builds_product_variant_view( $variantView->name = 'Small red Logan hat code'; $variantView->price = new PriceView(); $variantView->axis = ['HAT_SIZE_S', 'HAT_COLOR_RED']; - $variantView->onHand = 12; $variantView->nameAxis = [ 'HAT_SIZE_S' => 'Size S', 'HAT_COLOR_RED' => 'Color Red', diff --git a/src/Factory/Product/ProductVariantViewFactory.php b/src/Factory/Product/ProductVariantViewFactory.php index 86b3f455e..79669ce55 100644 --- a/src/Factory/Product/ProductVariantViewFactory.php +++ b/src/Factory/Product/ProductVariantViewFactory.php @@ -37,7 +37,6 @@ public function create(ProductVariantInterface $variant, ChannelInterface $chann $variantView->code = $variant->getCode(); $variantView->name = $variant->getTranslation($locale)->getName(); - $variantView->onHand = $variant->getOnHand(); $variantView->price = $this->priceViewFactory->create( $channelPricing->getPrice(), $channel->getBaseCurrency()->getCode() diff --git a/src/Resources/config/serializer/Product/ProductVariantView.yml b/src/Resources/config/serializer/Product/ProductVariantView.yml index cc91d4529..04c84b876 100644 --- a/src/Resources/config/serializer/Product/ProductVariantView.yml +++ b/src/Resources/config/serializer/Product/ProductVariantView.yml @@ -14,9 +14,6 @@ Sylius\ShopApiPlugin\View\Product\ProductVariantView: nameAxis: expose: true type: array - onHand: - expose: true - type: int price: expose: true type: Sylius\ShopApiPlugin\View\PriceView diff --git a/src/View/Product/ProductVariantView.php b/src/View/Product/ProductVariantView.php index ba18c6d7b..53511bf82 100644 --- a/src/View/Product/ProductVariantView.php +++ b/src/View/Product/ProductVariantView.php @@ -21,9 +21,6 @@ class ProductVariantView /** @var array */ public $nameAxis = []; - /** @var int */ - public $onHand; - /** @var PriceView */ public $price; diff --git a/tests/DataFixtures/ORM/shop.yml b/tests/DataFixtures/ORM/shop.yml index 30a3777a1..65b3c047c 100644 --- a/tests/DataFixtures/ORM/shop.yml +++ b/tests/DataFixtures/ORM/shop.yml @@ -117,7 +117,6 @@ Sylius\Component\Core\Model\ProductVariant: product: "@mug" currentLocale: "en_GB" translations: ["@en_gb_mug_variant_translation", "@de_de_mug_variant_translation"] - onHand: 12 channelPricings: WEB_GB: "@gb_mug_web_channel_pricing" WEB_DE: "@de_mug_web_channel_pricing" diff --git a/tests/Responses/Expected/cart/add_multiple_products_to_cart_response.json b/tests/Responses/Expected/cart/add_multiple_products_to_cart_response.json index cc4c615df..7c63b2004 100644 --- a/tests/Responses/Expected/cart/add_multiple_products_to_cart_response.json +++ b/tests/Responses/Expected/cart/add_multiple_products_to_cart_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -86,7 +85,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -147,7 +145,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 500, "currency": "GBP" diff --git a/tests/Responses/Expected/cart/add_multiple_products_to_new_cart_response.json b/tests/Responses/Expected/cart/add_multiple_products_to_new_cart_response.json index 29ac9758a..f98aeb8aa 100644 --- a/tests/Responses/Expected/cart/add_multiple_products_to_new_cart_response.json +++ b/tests/Responses/Expected/cart/add_multiple_products_to_new_cart_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -86,7 +85,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -147,7 +145,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 500, "currency": "GBP" diff --git a/tests/Responses/Expected/cart/add_product_variant_based_on_options_multiple_times_to_cart_response.json b/tests/Responses/Expected/cart/add_product_variant_based_on_options_multiple_times_to_cart_response.json index 050bf7e07..2520e8371 100644 --- a/tests/Responses/Expected/cart/add_product_variant_based_on_options_multiple_times_to_cart_response.json +++ b/tests/Responses/Expected/cart/add_product_variant_based_on_options_multiple_times_to_cart_response.json @@ -35,7 +35,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 500, "currency": "GBP" diff --git a/tests/Responses/Expected/cart/add_product_variant_based_on_options_to_cart_response.json b/tests/Responses/Expected/cart/add_product_variant_based_on_options_to_cart_response.json index cfcf1d5c0..c5ba71795 100644 --- a/tests/Responses/Expected/cart/add_product_variant_based_on_options_to_cart_response.json +++ b/tests/Responses/Expected/cart/add_product_variant_based_on_options_to_cart_response.json @@ -35,7 +35,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 500, "currency": "GBP" diff --git a/tests/Responses/Expected/cart/add_product_variant_multiple_times_to_cart_response.json b/tests/Responses/Expected/cart/add_product_variant_multiple_times_to_cart_response.json index 08bfa5603..0a578c293 100644 --- a/tests/Responses/Expected/cart/add_product_variant_multiple_times_to_cart_response.json +++ b/tests/Responses/Expected/cart/add_product_variant_multiple_times_to_cart_response.json @@ -29,7 +29,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/cart/add_product_variant_to_cart_response.json b/tests/Responses/Expected/cart/add_product_variant_to_cart_response.json index 5e37d8111..accbaa6ec 100644 --- a/tests/Responses/Expected/cart/add_product_variant_to_cart_response.json +++ b/tests/Responses/Expected/cart/add_product_variant_to_cart_response.json @@ -29,7 +29,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/cart/add_simple_product_multiple_times_to_cart_response.json b/tests/Responses/Expected/cart/add_simple_product_multiple_times_to_cart_response.json index 998d48834..4c1325717 100644 --- a/tests/Responses/Expected/cart/add_simple_product_multiple_times_to_cart_response.json +++ b/tests/Responses/Expected/cart/add_simple_product_multiple_times_to_cart_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/cart/add_simple_product_to_cart_response.json b/tests/Responses/Expected/cart/add_simple_product_to_cart_response.json index 2ff1ea2ef..c4428e3d7 100644 --- a/tests/Responses/Expected/cart/add_simple_product_to_cart_response.json +++ b/tests/Responses/Expected/cart/add_simple_product_to_cart_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/cart/add_simple_product_to_new_cart_response.json b/tests/Responses/Expected/cart/add_simple_product_to_new_cart_response.json index d0949c0e4..05889cbfe 100644 --- a/tests/Responses/Expected/cart/add_simple_product_to_new_cart_response.json +++ b/tests/Responses/Expected/cart/add_simple_product_to_new_cart_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/cart/cart_with_coupon_based_promotion_applied_response.json b/tests/Responses/Expected/cart/cart_with_coupon_based_promotion_applied_response.json index fff12a5ae..e978ecc86 100644 --- a/tests/Responses/Expected/cart/cart_with_coupon_based_promotion_applied_response.json +++ b/tests/Responses/Expected/cart/cart_with_coupon_based_promotion_applied_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/cart/filled_cart_with_product_variant_summary_response.json b/tests/Responses/Expected/cart/filled_cart_with_product_variant_summary_response.json index 1ebdac71e..70a3dbd8d 100644 --- a/tests/Responses/Expected/cart/filled_cart_with_product_variant_summary_response.json +++ b/tests/Responses/Expected/cart/filled_cart_with_product_variant_summary_response.json @@ -29,7 +29,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -90,7 +89,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 500, "currency": "GBP" diff --git a/tests/Responses/Expected/cart/filled_cart_with_simple_product_summary_response.json b/tests/Responses/Expected/cart/filled_cart_with_simple_product_summary_response.json index de67c6525..54f9cdc63 100644 --- a/tests/Responses/Expected/cart/filled_cart_with_simple_product_summary_response.json +++ b/tests/Responses/Expected/cart/filled_cart_with_simple_product_summary_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/cart/german_filled_cart_with_product_variant_summary_response.json b/tests/Responses/Expected/cart/german_filled_cart_with_product_variant_summary_response.json index dc20452f6..d6687df3b 100644 --- a/tests/Responses/Expected/cart/german_filled_cart_with_product_variant_summary_response.json +++ b/tests/Responses/Expected/cart/german_filled_cart_with_product_variant_summary_response.json @@ -35,7 +35,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Farbe Rot" }, - "onHand": 0, "price": { "current": 590, "currency": "EUR" diff --git a/tests/Responses/Expected/cart/german_filled_cart_with_simple_product_summary_response.json b/tests/Responses/Expected/cart/german_filled_cart_with_simple_product_summary_response.json index 61570a76c..5e0dfd0f5 100644 --- a/tests/Responses/Expected/cart/german_filled_cart_with_simple_product_summary_response.json +++ b/tests/Responses/Expected/cart/german_filled_cart_with_simple_product_summary_response.json @@ -28,7 +28,6 @@ "name": "Logan Becher", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 2099, "currency": "EUR" diff --git a/tests/Responses/Expected/cart/recalculated_cart_after_log_in.json b/tests/Responses/Expected/cart/recalculated_cart_after_log_in.json index 294afa0ad..fd32f3ca7 100644 --- a/tests/Responses/Expected/cart/recalculated_cart_after_log_in.json +++ b/tests/Responses/Expected/cart/recalculated_cart_after_log_in.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/cart/reprocessed_cart_after_deleting_an_item.json b/tests/Responses/Expected/cart/reprocessed_cart_after_deleting_an_item.json index 8ea3596f7..b71db94d5 100644 --- a/tests/Responses/Expected/cart/reprocessed_cart_after_deleting_an_item.json +++ b/tests/Responses/Expected/cart/reprocessed_cart_after_deleting_an_item.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/checkout/cart_addressed_response.json b/tests/Responses/Expected/checkout/cart_addressed_response.json index fe83c3dc9..82e8d78b6 100644 --- a/tests/Responses/Expected/checkout/cart_addressed_response.json +++ b/tests/Responses/Expected/checkout/cart_addressed_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/checkout/cart_addressed_with_different_shipping_and_billing_address_response.json b/tests/Responses/Expected/checkout/cart_addressed_with_different_shipping_and_billing_address_response.json index 89e8c0de1..59c210729 100644 --- a/tests/Responses/Expected/checkout/cart_addressed_with_different_shipping_and_billing_address_response.json +++ b/tests/Responses/Expected/checkout/cart_addressed_with_different_shipping_and_billing_address_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/checkout/cart_with_chosen_payment_response.json b/tests/Responses/Expected/checkout/cart_with_chosen_payment_response.json index cf426e5ea..a7e7ef0de 100644 --- a/tests/Responses/Expected/checkout/cart_with_chosen_payment_response.json +++ b/tests/Responses/Expected/checkout/cart_with_chosen_payment_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/checkout/cart_with_chosen_shipment_response.json b/tests/Responses/Expected/checkout/cart_with_chosen_shipment_response.json index dbf35df4a..4a355d04e 100644 --- a/tests/Responses/Expected/checkout/cart_with_chosen_shipment_response.json +++ b/tests/Responses/Expected/checkout/cart_with_chosen_shipment_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/checkout/cart_with_chosen_shipment_with_per_item_rate_response.json b/tests/Responses/Expected/checkout/cart_with_chosen_shipment_with_per_item_rate_response.json index 1250f6173..41320eb1f 100644 --- a/tests/Responses/Expected/checkout/cart_with_chosen_shipment_with_per_item_rate_response.json +++ b/tests/Responses/Expected/checkout/cart_with_chosen_shipment_with_per_item_rate_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/checkout/modified_cart_with_chosen_shipment_with_per_item_rate_response.json b/tests/Responses/Expected/checkout/modified_cart_with_chosen_shipment_with_per_item_rate_response.json index a7a7430b3..7ec0849d3 100644 --- a/tests/Responses/Expected/checkout/modified_cart_with_chosen_shipment_with_per_item_rate_response.json +++ b/tests/Responses/Expected/checkout/modified_cart_with_chosen_shipment_with_per_item_rate_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/order/order_details_response.json b/tests/Responses/Expected/order/order_details_response.json index 892af4dec..99079e0e5 100644 --- a/tests/Responses/Expected/order/order_details_response.json +++ b/tests/Responses/Expected/order/order_details_response.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/order/order_details_response_guest.json b/tests/Responses/Expected/order/order_details_response_guest.json index dd0aa934f..83846fdeb 100644 --- a/tests/Responses/Expected/order/order_details_response_guest.json +++ b/tests/Responses/Expected/order/order_details_response_guest.json @@ -29,7 +29,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/order/orders_list_response.json b/tests/Responses/Expected/order/orders_list_response.json index 310228317..53bf852c3 100644 --- a/tests/Responses/Expected/order/orders_list_response.json +++ b/tests/Responses/Expected/order/orders_list_response.json @@ -30,7 +30,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/german_product_list_page_by_code_response.json b/tests/Responses/Expected/product/german_product_list_page_by_code_response.json index 1244b854f..4f4115f03 100644 --- a/tests/Responses/Expected/product/german_product_list_page_by_code_response.json +++ b/tests/Responses/Expected/product/german_product_list_page_by_code_response.json @@ -29,7 +29,6 @@ "name": "Logan Becher", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -92,7 +91,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Farbe Rot" }, - "onHand": 0, "price": { "current": 500, "currency": "GBP" @@ -110,7 +108,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_RED": "Farbe Rot" }, - "onHand": 0, "price": { "current": 999, "currency": "GBP" @@ -128,7 +125,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_BLUE": "Farbe Blau" }, - "onHand": 0, "price": { "current": 1500, "currency": "GBP" @@ -146,7 +142,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_BLUE": "Farbe Blau" }, - "onHand": 0, "price": { "current": 2599, "currency": "GBP" @@ -176,7 +171,6 @@ "name": "Logan Becher", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -233,7 +227,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -250,7 +243,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/german_product_list_page_by_slug_response.json b/tests/Responses/Expected/product/german_product_list_page_by_slug_response.json index 90349827d..a42be6cca 100644 --- a/tests/Responses/Expected/product/german_product_list_page_by_slug_response.json +++ b/tests/Responses/Expected/product/german_product_list_page_by_slug_response.json @@ -29,7 +29,6 @@ "name": "Logan Becher", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -92,7 +91,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Farbe Rot" }, - "onHand": 0, "price": { "current": 500, "currency": "GBP" @@ -110,7 +108,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_RED": "Farbe Rot" }, - "onHand": 0, "price": { "current": 999, "currency": "GBP" @@ -128,7 +125,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_BLUE": "Farbe Blau" }, - "onHand": 0, "price": { "current": 1500, "currency": "GBP" @@ -146,7 +142,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_BLUE": "Farbe Blau" }, - "onHand": 0, "price": { "current": 2599, "currency": "GBP" @@ -176,7 +171,6 @@ "name": "Logan Becher", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -233,7 +227,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -250,7 +243,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/german_product_with_options_details_page.json b/tests/Responses/Expected/product/german_product_with_options_details_page.json index 2cb8c5196..aeb66c2c4 100644 --- a/tests/Responses/Expected/product/german_product_with_options_details_page.json +++ b/tests/Responses/Expected/product/german_product_with_options_details_page.json @@ -25,7 +25,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Farbe Rot" }, - "onHand": 0, "price": { "current": 500, "currency": "GBP" @@ -43,7 +42,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_RED": "Farbe Rot" }, - "onHand": 0, "price": { "current": 999, "currency": "GBP" @@ -61,7 +59,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_BLUE": "Farbe Blau" }, - "onHand": 0, "price": { "current": 1500, "currency": "GBP" @@ -79,7 +76,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_BLUE": "Farbe Blau" }, - "onHand": 0, "price": { "current": 2599, "currency": "GBP" @@ -109,7 +105,6 @@ "name": "Logan Becher", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -166,7 +161,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -183,7 +177,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/german_simple_product_details_page.json b/tests/Responses/Expected/product/german_simple_product_details_page.json index 64463aa35..b7a0ee6e5 100644 --- a/tests/Responses/Expected/product/german_simple_product_details_page.json +++ b/tests/Responses/Expected/product/german_simple_product_details_page.json @@ -18,7 +18,6 @@ "name": "Logan Becher", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/limited_product_list_page_by_code_response.json b/tests/Responses/Expected/product/limited_product_list_page_by_code_response.json index 1604f3ff6..12b319c3f 100644 --- a/tests/Responses/Expected/product/limited_product_list_page_by_code_response.json +++ b/tests/Responses/Expected/product/limited_product_list_page_by_code_response.json @@ -30,7 +30,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -47,7 +46,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/limited_product_list_page_by_slug_response.json b/tests/Responses/Expected/product/limited_product_list_page_by_slug_response.json index 965863143..6e163f65d 100644 --- a/tests/Responses/Expected/product/limited_product_list_page_by_slug_response.json +++ b/tests/Responses/Expected/product/limited_product_list_page_by_slug_response.json @@ -30,7 +30,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -47,7 +46,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/product_list_latest_2_response.json b/tests/Responses/Expected/product/product_list_latest_2_response.json index 9c1b745a7..56933f7a3 100644 --- a/tests/Responses/Expected/product/product_list_latest_2_response.json +++ b/tests/Responses/Expected/product/product_list_latest_2_response.json @@ -26,7 +26,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 500, "currency": "GBP" @@ -44,7 +43,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 999, "currency": "GBP" @@ -62,7 +60,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_BLUE": "Color Blue" }, - "onHand": 0, "price": { "current": 1500, "currency": "GBP" @@ -80,7 +77,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_BLUE": "Color Blue" }, - "onHand": 0, "price": { "current": 2599, "currency": "GBP" @@ -111,7 +107,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -168,7 +163,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -185,7 +179,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" @@ -249,7 +242,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/product_list_latest_4_response.json b/tests/Responses/Expected/product/product_list_latest_4_response.json index 59d3fc35a..e9b26a76f 100644 --- a/tests/Responses/Expected/product/product_list_latest_4_response.json +++ b/tests/Responses/Expected/product/product_list_latest_4_response.json @@ -26,7 +26,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 500, "currency": "GBP" @@ -44,7 +43,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 999, "currency": "GBP" @@ -62,7 +60,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_BLUE": "Color Blue" }, - "onHand": 0, "price": { "current": 1500, "currency": "GBP" @@ -80,7 +77,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_BLUE": "Color Blue" }, - "onHand": 0, "price": { "current": 2599, "currency": "GBP" @@ -111,7 +107,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -168,7 +163,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -185,7 +179,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" @@ -249,7 +242,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -326,7 +318,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -343,7 +334,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/product_list_page_by_code_response.json b/tests/Responses/Expected/product/product_list_page_by_code_response.json index edfe04066..04c56e591 100644 --- a/tests/Responses/Expected/product/product_list_page_by_code_response.json +++ b/tests/Responses/Expected/product/product_list_page_by_code_response.json @@ -30,7 +30,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -87,7 +86,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -104,7 +102,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" @@ -165,7 +162,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 500, "currency": "GBP" @@ -183,7 +179,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 999, "currency": "GBP" @@ -201,7 +196,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_BLUE": "Color Blue" }, - "onHand": 0, "price": { "current": 1500, "currency": "GBP" @@ -219,7 +213,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_BLUE": "Color Blue" }, - "onHand": 0, "price": { "current": 2599, "currency": "GBP" @@ -250,7 +243,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -307,7 +299,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -324,7 +315,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/product_list_page_by_slug_response.json b/tests/Responses/Expected/product/product_list_page_by_slug_response.json index bff78034a..8074066cb 100644 --- a/tests/Responses/Expected/product/product_list_page_by_slug_response.json +++ b/tests/Responses/Expected/product/product_list_page_by_slug_response.json @@ -30,7 +30,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -87,7 +86,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -104,7 +102,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" @@ -165,7 +162,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 500, "currency": "GBP" @@ -183,7 +179,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 999, "currency": "GBP" @@ -201,7 +196,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_BLUE": "Color Blue" }, - "onHand": 0, "price": { "current": 1500, "currency": "GBP" @@ -219,7 +213,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_BLUE": "Color Blue" }, - "onHand": 0, "price": { "current": 2599, "currency": "GBP" @@ -250,7 +243,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -307,7 +299,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -324,7 +315,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/product_t_shirt_list_page_by_code_response.json b/tests/Responses/Expected/product/product_t_shirt_list_page_by_code_response.json index 086ed3965..c83914422 100644 --- a/tests/Responses/Expected/product/product_t_shirt_list_page_by_code_response.json +++ b/tests/Responses/Expected/product/product_t_shirt_list_page_by_code_response.json @@ -30,7 +30,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -47,7 +46,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/product_t_shirt_list_page_by_slug_response.json b/tests/Responses/Expected/product/product_t_shirt_list_page_by_slug_response.json index 54674dfcd..9870ae890 100644 --- a/tests/Responses/Expected/product/product_t_shirt_list_page_by_slug_response.json +++ b/tests/Responses/Expected/product/product_t_shirt_list_page_by_slug_response.json @@ -30,7 +30,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -47,7 +46,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/product_with_options_details_page.json b/tests/Responses/Expected/product/product_with_options_details_page.json index 2be9708ba..b74a54a03 100644 --- a/tests/Responses/Expected/product/product_with_options_details_page.json +++ b/tests/Responses/Expected/product/product_with_options_details_page.json @@ -25,7 +25,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 500, "currency": "GBP" @@ -43,7 +42,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_RED": "Color Red" }, - "onHand": 0, "price": { "current": 999, "currency": "GBP" @@ -61,7 +59,6 @@ "HAT_SIZE_S": "Size S", "HAT_COLOR_BLUE": "Color Blue" }, - "onHand": 0, "price": { "current": 1500, "currency": "GBP" @@ -79,7 +76,6 @@ "HAT_SIZE_L": "Size L", "HAT_COLOR_BLUE": "Color Blue" }, - "onHand": 0, "price": { "current": 2599, "currency": "GBP" @@ -110,7 +106,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" @@ -167,7 +162,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -184,7 +178,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/product_with_variant_details_page.json b/tests/Responses/Expected/product/product_with_variant_details_page.json index fa037b39b..659b83fb2 100644 --- a/tests/Responses/Expected/product/product_with_variant_details_page.json +++ b/tests/Responses/Expected/product/product_with_variant_details_page.json @@ -19,7 +19,6 @@ "name": "Small Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 1999, "currency": "GBP" @@ -36,7 +35,6 @@ "name": "Large Logan T-Shirt", "axis": [], "nameAxis": {}, - "onHand": 0, "price": { "current": 2999, "currency": "GBP" diff --git a/tests/Responses/Expected/product/simple_product_details_page.json b/tests/Responses/Expected/product/simple_product_details_page.json index 3bb388fcf..a6e49d7eb 100644 --- a/tests/Responses/Expected/product/simple_product_details_page.json +++ b/tests/Responses/Expected/product/simple_product_details_page.json @@ -19,7 +19,6 @@ "name": "Logan Mug", "axis": [], "nameAxis": {}, - "onHand": 12, "price": { "current": 1999, "currency": "GBP" From 2f96763bb2f1ba13558f748986321ea5bcbd42dc Mon Sep 17 00:00:00 2001 From: mamazu <14860264+mamazu@users.noreply.github.com> Date: Wed, 28 Aug 2019 18:43:07 +0200 Subject: [PATCH 2/2] Fixing the spec tests --- spec/Factory/Product/ProductVariantViewFactorySpec.php | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/Factory/Product/ProductVariantViewFactorySpec.php b/spec/Factory/Product/ProductVariantViewFactorySpec.php index c4b98c236..debc82f53 100644 --- a/spec/Factory/Product/ProductVariantViewFactorySpec.php +++ b/spec/Factory/Product/ProductVariantViewFactorySpec.php @@ -150,7 +150,6 @@ function it_builds_product_variant_view_with_original_price( $variantView->price = new PriceView(); $variantView->originalPrice = new PriceView(); $variantView->axis = ['HAT_SIZE_S', 'HAT_COLOR_RED']; - $variantView->onHand = 0; $variantView->nameAxis = [ 'HAT_SIZE_S' => 'Size S', 'HAT_COLOR_RED' => 'Color Red',