@shopgate/pwa-common-commerce 7.30.0-alpha.7 → 7.30.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cart/action-creators/addCouponsToCart.js +9 -2
- package/cart/action-creators/addProductsToCart.js +9 -2
- package/cart/action-creators/deleteCouponsFromCart.js +9 -2
- package/cart/action-creators/deleteProductsFromCart.js +9 -2
- package/cart/action-creators/errorAddCouponsToCart.js +10 -2
- package/cart/action-creators/errorAddProductsToCart.js +10 -2
- package/cart/action-creators/errorCart.js +8 -2
- package/cart/action-creators/errorDeleteCouponsFromCart.js +10 -2
- package/cart/action-creators/errorDeleteProductsFromCart.js +10 -2
- package/cart/action-creators/errorUpdateProductsInCart.js +10 -2
- package/cart/action-creators/receiveCart.js +9 -2
- package/cart/action-creators/requestCart.js +8 -2
- package/cart/action-creators/setCartProductPendingCount.js +9 -2
- package/cart/action-creators/setCouponFieldError.js +9 -2
- package/cart/action-creators/setCouponFieldValue.js +9 -2
- package/cart/action-creators/setFulfillmentSlot.js +9 -2
- package/cart/action-creators/successAddCouponsToCart.js +10 -2
- package/cart/action-creators/successAddProductsToCart.js +8 -2
- package/cart/action-creators/successDeleteCouponsFromCart.js +8 -2
- package/cart/action-creators/successDeleteProductsFromCart.js +8 -2
- package/cart/action-creators/successUpdateProductsInCart.js +8 -2
- package/cart/action-creators/updateProductsInCart.js +9 -2
- package/cart/actions/addCouponsToCart.js +52 -8
- package/cart/actions/addProductsToCart.js +80 -11
- package/cart/actions/deleteCouponsFromCart.js +39 -6
- package/cart/actions/deleteProductsFromCart.js +38 -6
- package/cart/actions/fetchCart.js +52 -8
- package/cart/actions/updateProductsInCart.js +44 -6
- package/cart/constants/PipelineErrors.js +6 -1
- package/cart/constants/Pipelines.js +6 -1
- package/cart/constants/Portals.js +85 -1
- package/cart/constants/index.js +39 -2
- package/cart/helpers/config.js +47 -2
- package/cart/helpers/createPipelineErrorList.js +30 -4
- package/cart/helpers/fulfillmentSlots.js +37 -4
- package/cart/helpers/index.js +14 -3
- package/cart/helpers/quantity.js +23 -4
- package/cart/helpers/shipping.js +57 -2
- package/cart/helpers/tax.js +26 -2
- package/cart/index.js +25 -5
- package/cart/mock.js +130 -1
- package/cart/reducers/couponField.js +30 -2
- package/cart/reducers/data.js +98 -6
- package/cart/reducers/index.js +7 -1
- package/cart/selectors/index.js +181 -31
- package/cart/selectors/spec.js +189 -2
- package/cart/streams/index.js +176 -29
- package/cart/subscriptions/index.js +307 -30
- package/category/action-creators/errorCategory.js +10 -2
- package/category/action-creators/errorCategoryChildren.js +9 -2
- package/category/action-creators/errorRootCategories.js +8 -2
- package/category/action-creators/receiveCategory.js +12 -2
- package/category/action-creators/receiveCategoryChildren.js +10 -2
- package/category/action-creators/receiveRootCategories.js +9 -2
- package/category/action-creators/requestCategory.js +9 -2
- package/category/action-creators/requestCategoryChildren.js +9 -2
- package/category/action-creators/requestRootCategories.js +8 -2
- package/category/actions/fetchCategory.js +47 -5
- package/category/actions/fetchCategoryChildren.js +30 -2
- package/category/actions/fetchCategoryOrRootCategories.js +16 -2
- package/category/actions/fetchCategoryProducts.js +36 -2
- package/category/actions/fetchRootCategories.js +31 -2
- package/category/actions/getCategory.js +10 -2
- package/category/constants/Pipelines.js +3 -1
- package/category/constants/Portals.js +56 -3
- package/category/constants/index.js +17 -2
- package/category/helpers/index.js +27 -3
- package/category/index.js +19 -5
- package/category/mock.js +176 -1
- package/category/reducers/categoriesById.js +65 -3
- package/category/reducers/childrenByCategoryId.js +55 -4
- package/category/reducers/helpers/handleCategoryCollection.js +24 -3
- package/category/reducers/helpers/handleReceivedCategories.js +3 -1
- package/category/reducers/index.js +12 -2
- package/category/reducers/rootCategories.js +31 -2
- package/category/selectors/index.js +115 -16
- package/category/streams/index.js +82 -4
- package/category/subscriptions/index.js +96 -3
- package/checkout/action-creators/successCheckout.js +9 -2
- package/checkout/actions/fetchCheckoutUrl.js +28 -3
- package/checkout/constants/Pipelines.js +1 -1
- package/checkout/constants/index.js +3 -2
- package/checkout/index.js +11 -4
- package/checkout/selectors/index.js +7 -2
- package/checkout/streams/index.js +8 -2
- package/checkout/subscriptions/index.js +35 -6
- package/favorites/action-creators/index.js +206 -24
- package/favorites/actions/addFavorites.js +41 -3
- package/favorites/actions/addFavoritesList.js +27 -2
- package/favorites/actions/fetchFavoriteIds.js +49 -5
- package/favorites/actions/fetchFavorites.js +60 -5
- package/favorites/actions/fetchFavoritesList.js +47 -3
- package/favorites/actions/fetchFavoritesListsWithItems.js +32 -3
- package/favorites/actions/getFavorites.js +6 -2
- package/favorites/actions/removeFavorites.js +32 -3
- package/favorites/actions/removeFavoritesList.js +24 -2
- package/favorites/actions/toggleFavorites.js +68 -10
- package/favorites/actions/updateFavorites.js +39 -3
- package/favorites/actions/updateFavoritesList.js +26 -2
- package/favorites/constants/Pipelines.js +9 -1
- package/favorites/constants/Portals.js +32 -4
- package/favorites/constants/index.js +37 -5
- package/favorites/index.js +14 -4
- package/favorites/mock.js +89 -4
- package/favorites/reducers/index.js +7 -1
- package/favorites/reducers/lists.js +74 -2
- package/favorites/reducers/products.js +231 -24
- package/favorites/selectors/index.js +188 -24
- package/favorites/streams/index.js +135 -23
- package/favorites/streams/spec.js +517 -8
- package/favorites/subscriptions/index.js +260 -25
- package/favorites/subscriptions/spec.js +700 -28
- package/filter/action-creators/errorFilters.js +9 -2
- package/filter/action-creators/index.js +4 -1
- package/filter/action-creators/receiveFilters.js +10 -2
- package/filter/action-creators/requestFilters.js +9 -2
- package/filter/action-creators/updateFilters.js +8 -2
- package/filter/actions/fetchFilters.js +46 -3
- package/filter/actions/getFilters.js +6 -2
- package/filter/actions/helpers/buildFilterParams.js +34 -2
- package/filter/actions/helpers/buildRequestFilters.js +35 -2
- package/filter/actions/helpers/processFilters.js +10 -2
- package/filter/actions/helpers/processParams.js +26 -2
- package/filter/constants/Pipelines.js +1 -1
- package/filter/constants/Portals.js +39 -3
- package/filter/constants/index.js +8 -1
- package/filter/index.js +12 -4
- package/filter/reducers/helpers/enrichFilters.js +11 -3
- package/filter/reducers/index.js +5 -1
- package/filter/reducers/resultsByHash.js +43 -3
- package/filter/selectors/index.js +47 -6
- package/filter/streams/index.js +30 -1
- package/filter/subscriptions/index.js +34 -2
- package/market/constants/Portals.js +22 -4
- package/market/constants/index.js +2 -1
- package/market/helpers/showReturnPolicy.js +3 -1
- package/market/helpers/showTaxDisclaimer.js +3 -1
- package/market/index.js +6 -2
- package/orders/constants.js +2 -1
- package/package.json +4 -4
- package/product/action-creators/deleteProductsByIds.js +10 -2
- package/product/action-creators/errorProduct.js +10 -2
- package/product/action-creators/errorProductDescription.js +10 -2
- package/product/action-creators/errorProductImages.js +10 -2
- package/product/action-creators/errorProductMedia.js +10 -2
- package/product/action-creators/errorProductOptions.js +10 -2
- package/product/action-creators/errorProductProperties.js +10 -2
- package/product/action-creators/errorProductRelations.js +9 -2
- package/product/action-creators/errorProductShipping.js +10 -2
- package/product/action-creators/errorProductVariants.js +10 -2
- package/product/action-creators/errorProducts.js +9 -2
- package/product/action-creators/expireProductById.js +10 -2
- package/product/action-creators/expireProductData.js +11 -2
- package/product/action-creators/expireProductsByHash.js +9 -2
- package/product/action-creators/productNotAvailable.js +10 -2
- package/product/action-creators/provideProduct.js +9 -2
- package/product/action-creators/receiveProduct.js +10 -2
- package/product/action-creators/receiveProductCached.js +9 -2
- package/product/action-creators/receiveProductDescription.js +10 -2
- package/product/action-creators/receiveProductImages.js +10 -2
- package/product/action-creators/receiveProductMedia.js +10 -2
- package/product/action-creators/receiveProductOptions.js +10 -2
- package/product/action-creators/receiveProductProperties.js +10 -2
- package/product/action-creators/receiveProductRelations.js +12 -2
- package/product/action-creators/receiveProductShipping.js +10 -2
- package/product/action-creators/receiveProductVariants.js +10 -2
- package/product/action-creators/receiveProducts.js +16 -2
- package/product/action-creators/receiveProductsCached.js +9 -2
- package/product/action-creators/refreshExpiredPDPData.js +8 -2
- package/product/action-creators/requestProduct.js +10 -2
- package/product/action-creators/requestProductDescription.js +9 -2
- package/product/action-creators/requestProductImages.js +9 -2
- package/product/action-creators/requestProductMedia.js +9 -2
- package/product/action-creators/requestProductOptions.js +9 -2
- package/product/action-creators/requestProductProperties.js +9 -2
- package/product/action-creators/requestProductRelations.js +10 -2
- package/product/action-creators/requestProductShipping.js +9 -2
- package/product/action-creators/requestProductVariants.js +9 -2
- package/product/action-creators/requestProducts.js +9 -2
- package/product/action-creators/setProductId.js +9 -2
- package/product/action-creators/setProductQuantity.js +9 -2
- package/product/action-creators/setProductVariantId.js +9 -2
- package/product/actions/changeSortOrder.js +21 -2
- package/product/actions/fetchHighlightProducts.js +18 -2
- package/product/actions/fetchLiveshoppingProducts.js +14 -2
- package/product/actions/fetchProduct.js +52 -3
- package/product/actions/fetchProductDescription.js +30 -2
- package/product/actions/fetchProductImages.js +31 -2
- package/product/actions/fetchProductMedia.js +35 -2
- package/product/actions/fetchProductOptions.js +31 -2
- package/product/actions/fetchProductProperties.js +30 -2
- package/product/actions/fetchProductRelations.js +63 -2
- package/product/actions/fetchProductShipping.js +31 -2
- package/product/actions/fetchProductVariants.js +31 -2
- package/product/actions/fetchProducts.js +189 -17
- package/product/actions/fetchProductsById.js +68 -8
- package/product/actions/fetchProductsByQuery.js +102 -18
- package/product/actions/getHighlightProducts.js +6 -2
- package/product/actions/getLiveshoppingProducts.js +6 -2
- package/product/actions/getProduct.js +6 -2
- package/product/actions/getProductDescription.js +6 -2
- package/product/actions/getProductImages.js +6 -2
- package/product/actions/getProductOptions.js +6 -2
- package/product/actions/getProductProperties.js +6 -2
- package/product/actions/getProductRelations.js +6 -2
- package/product/actions/getProductShipping.js +6 -2
- package/product/actions/getProductVariants.js +6 -2
- package/product/actions/getProducts.js +6 -2
- package/product/actions/getProductsById.js +6 -2
- package/product/actions/getProductsByQuery.js +6 -2
- package/product/actions/processProductFlags.js +35 -3
- package/product/actions/updateMetadata.js +17 -2
- package/product/collections/ProductImageFormats.js +48 -8
- package/product/collections/index.js +1 -1
- package/product/constants/Pipelines.js +12 -1
- package/product/constants/Portals.js +200 -33
- package/product/constants/index.js +90 -18
- package/product/helpers/index.js +61 -8
- package/product/index.js +36 -6
- package/product/mock.js +1002 -2
- package/product/reducers/descriptionsByProductId.js +54 -5
- package/product/reducers/helpers/formatOptions.js +17 -2
- package/product/reducers/helpers/handleProductCollection.js +19 -2
- package/product/reducers/imagesByProductId.js +51 -4
- package/product/reducers/index.js +23 -1
- package/product/reducers/mediaByProductId.js +55 -3
- package/product/reducers/optionsByProductId.js +41 -2
- package/product/reducers/productRelationsByHash.js +43 -2
- package/product/reducers/productsById.js +122 -7
- package/product/reducers/propertiesByProductId.js +48 -2
- package/product/reducers/resultsByHash.js +125 -9
- package/product/reducers/shippingByProductId.js +37 -2
- package/product/reducers/variantsByProductId.js +56 -2
- package/product/selectors/options.js +90 -13
- package/product/selectors/page.js +62 -13
- package/product/selectors/price.js +81 -18
- package/product/selectors/product.js +549 -59
- package/product/selectors/product.mock.js +327 -12
- package/product/selectors/relations.js +35 -5
- package/product/selectors/variants.js +91 -15
- package/product/streams/index.js +167 -13
- package/product/subscriptions/index.js +210 -4
- package/reviews/action-creators/errorProductReviews.js +9 -2
- package/reviews/action-creators/errorReviews.js +9 -2
- package/reviews/action-creators/errorSubmitReview.js +9 -2
- package/reviews/action-creators/errorUserReview.js +9 -2
- package/reviews/action-creators/flushUserReview.js +8 -2
- package/reviews/action-creators/receiveProductReviews.js +11 -2
- package/reviews/action-creators/receiveReviews.js +12 -2
- package/reviews/action-creators/receiveSubmitReview.js +9 -2
- package/reviews/action-creators/receiveUserReview.js +10 -2
- package/reviews/action-creators/requestProductReviews.js +10 -2
- package/reviews/action-creators/requestReviews.js +9 -2
- package/reviews/action-creators/requestSubmitReview.js +9 -2
- package/reviews/action-creators/requestUserReview.js +9 -2
- package/reviews/action-creators/resetSubmittedReview.js +9 -2
- package/reviews/action-creators/spec.js +40 -1
- package/reviews/actions/fetchProductReviews.js +37 -2
- package/reviews/actions/fetchReviews.js +38 -2
- package/reviews/actions/fetchUserReview.js +31 -2
- package/reviews/actions/flushUserReview.js +5 -1
- package/reviews/actions/getProductReviews.js +6 -2
- package/reviews/actions/getUserReview.js +6 -2
- package/reviews/actions/spec.js +241 -4
- package/reviews/actions/submitReview.js +63 -3
- package/reviews/constants/Pipelines.js +4 -1
- package/reviews/constants/Portals.js +4 -1
- package/reviews/constants/index.js +26 -7
- package/reviews/index.js +15 -4
- package/reviews/mock.js +172 -11
- package/reviews/reducers/index.js +11 -1
- package/reviews/reducers/mock.js +14 -2
- package/reviews/reducers/reviewsByHash.js +52 -6
- package/reviews/reducers/reviewsById.js +27 -2
- package/reviews/reducers/reviewsByProductId.js +47 -2
- package/reviews/reducers/spec.js +211 -2
- package/reviews/reducers/userReviewsByProductId.js +68 -2
- package/reviews/selectors/index.js +123 -19
- package/reviews/selectors/mock.js +100 -1
- package/reviews/selectors/spec.js +100 -1
- package/reviews/streams/index.js +37 -5
- package/reviews/streams/spec.js +25 -1
- package/reviews/subscriptions/index.js +27 -2
- package/scanner/action-creators/errorHandleScanner.js +11 -2
- package/scanner/action-creators/scannerFinished.js +11 -2
- package/scanner/action-creators/startScanner.js +8 -2
- package/scanner/action-creators/successHandleScanner.js +11 -2
- package/scanner/actions/handleBarCode.js +22 -2
- package/scanner/actions/handleNoResults.js +23 -2
- package/scanner/actions/handleQrCode.js +116 -6
- package/scanner/actions/handleSearch.js +33 -2
- package/scanner/constants/Portals.js +22 -1
- package/scanner/constants/index.js +17 -1
- package/scanner/helpers/index.js +115 -5
- package/scanner/index.js +19 -5
- package/scanner/streams/index.js +36 -1
- package/scanner/subscriptions/index.js +78 -8
- package/search/action-creators/errorSearchResults.js +10 -2
- package/search/action-creators/receiveSearchResults.js +11 -2
- package/search/action-creators/receiveSearchSuggestions.js +10 -2
- package/search/action-creators/requestSearchResults.js +10 -2
- package/search/action-creators/requestSearchSuggestions.js +9 -2
- package/search/actions/fetchSearchResults.js +66 -8
- package/search/actions/fetchSearchSuggestions.js +36 -2
- package/search/constants/Pipelines.js +1 -1
- package/search/constants/Portals.js +9 -2
- package/search/constants/index.js +10 -2
- package/search/helpers/index.js +5 -2
- package/search/helpers/removeHighlightingPlaceholders.js +4 -1
- package/search/helpers/spec.js +19 -1
- package/search/index.js +17 -5
- package/search/reducers/index.js +38 -2
- package/search/selectors/index.js +23 -4
- package/search/streams/index.js +51 -3
- package/search/subscriptions/index.js +132 -5
package/product/mock.js
CHANGED
|
@@ -1,4 +1,1004 @@
|
|
|
1
|
-
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}var productRouteMock={id:'0903d6a9-2b5c-47a7-bdd4-e95be5311a23',params:{productId:'393133'},pathname:'/item/393133',pattern:'/item/:productId',query:{},state:{}};var mockedProducts={products:[{id:'SG117',name:'no_description',active:true,description:'',customData:null,manufacturer:'',identifiers:{sku:'pub_SG117'},tags:[],ageRating:0,baseProductId:null,stock:{ignoreQuantity:true,quantity:0,info:'',orderable:true,minOrderQuantity:0,maxOrderQuantity:0},rating:{count:0,average:0,reviewCount:0},flags:{hasChildren:true,hasVariants:false,hasOptions:false},internalLog:'d41d8cd98f00b204e9800998ecf8427e',availability:{text:'Verfügbar',state:'ok'},featuredImageUrl:null,featuredImageBaseUrl:null,type:'simple',price:{currency:'EUR',info:'',unitPrice:100,unitPriceStriked:0,unitPriceMin:0,unitPriceNet:100,unitPriceWithTax:100,taxAmount:0,taxPercent:0,msrp:0,tiers:[],unitPriceMax:1000,mapPricing:{startDate:'2019-04-01T10:00:00.000Z',endDate:'2019-04-10T10:00:00.000Z',price:10}},characteristics:[{id:1,name:'Color',label:'Color',value:'Black'},{id:2,name:'Shoe size',label:'Shoe size',value:'5'}]},{id:'SG118',name:'no_description',active:true,description:'',customData:null,manufacturer:'',baseProductId:'SG117',identifiers:{sku:'pub_SG117'},tags:[],ageRating:0,stock:{ignoreQuantity:true,quantity:0,info:'',orderable:true,minOrderQuantity:0,maxOrderQuantity:0},rating:{count:0,average:0,reviewCount:0},flags:{hasChildren:false,hasVariants:false,hasOptions:false},internalLog:'d41d8cd98f00b204e9800998ecf8427e',availability:{text:'Verfügbar',state:'ok'},featuredImageUrl:null,featuredImageBaseUrl:null,type:'simple',price:null}]};var initialState={product:{productsById:{},descriptionsByProductId:{},propertiesByProductId:{},variantsByProductId:{},optionsByProductId:{},resultsByHash:{},imagesByProductId:{}}};var basicProductState=_extends({},initialState,{product:_extends({},initialState.product,{productsById:{913:{isFetching:false,expires:1497428462438,productData:{id:'913',baseProductId:null,name:'This is a product with a very very long name -5-',manufacturer:'',identifiers:{sku:'857347363'},ageRating:0,stock:{ignoreQuantity:true,quantity:0,info:'In stock',orderable:true,minOrderQuantity:1,maxOrderQuantity:10000},rating:{count:0,average:0,reviewCount:0},flags:{hasChildren:false,hasVariants:false,hasOptions:false},featuredImageBaseUrl:'https://img-cdn.shopgate.com/30188/1/fce216e970614ec94f701b4fc234d1908b48c3b097303c9698e3a6f46787cf3b',featuredImageUrl:'https://img-cdn.shopgate.com/30188/1/fce216e970614ec94f701b4fc234d1908b48c3b097303c9698e3a6f46787cf3b',price:{currency:'EUR',info:'',unitPrice:89,unitPriceStriked:0,unitPriceMin:0,unitPriceNet:89,unitPriceWithTax:89,taxAmount:0,taxPercent:0,msrp:0,tiers:[],unitPriceMax:1000,mapPricing:{startDate:'2019-04-01T10:00:00.000Z',endDate:'2019-04-10T10:00:00.000Z',price:10}},liveshoppings:[],highlight:true,availability:{text:'In stock',state:'ok'}}},914:{productData:{id:'914',price:{currency:'EUR',info:'',unitPrice:89,unitPriceStriked:0,unitPriceMin:0,unitPriceNet:89,unitPriceWithTax:89,taxAmount:0,taxPercent:0,msrp:0}}}},imagesByProductId:{913:{isFetching:false,expires:99999999999,images:[{width:440,height:440,sources:['https://img-service.shopgate.com/image440.jpg']},{width:1024,height:1024,sources:['https://img-service.shopgate.com/image1024.jpg']},{width:2048,height:2048,sources:['https://img-service.shopgate.com/image2048.jpg']}]}},optionsByProductId:{913:{isFetching:false,expires:1497429213141,options:[]}}})});var productWithOneOption=_extends({},initialState,{product:_extends({},initialState.product,{productsById:{1097:{isFetching:false,expires:1497429212949,productData:{id:'1097',baseProductId:null,name:'simple Product with options',manufacturer:'',identifiers:{sku:'12345667878754654'},ageRating:0,stock:{ignoreQuantity:true,quantity:0,info:'In stock',orderable:true,minOrderQuantity:1,maxOrderQuantity:10000},rating:{count:0,average:0,reviewCount:0},flags:{hasChildren:false,hasVariants:false,hasOptions:true},featuredImageBaseUrl:null,featuredImageUrl:null,price:{currency:'EUR',info:'',unitPrice:10,unitPriceStriked:0,unitPriceMin:11,unitPriceNet:10,unitPriceWithTax:10,taxAmount:0,taxPercent:0,msrp:0,tiers:[],unitPriceMax:1000},liveshoppings:[],highlight:false,availability:{text:'In stock',state:'ok'}}}},optionsByProductId:{913:{isFetching:false,expires:1497429213141,options:[]},1097:{isFetching:false,expires:1497429213141,options:[{id:'1',type:'select',label:'Ball color',values:[{id:'1',label:'Green Ball',unitPriceModifier:1},{id:'3',label:'magic ball',unitPriceModifier:1},{id:'2',label:'Red Ball',unitPriceModifier:1.5}]},{id:'10',type:'text',label:'Foo',annotation:'Bar',required:true,unitPriceModifier:3}]}},imagesByProductId:{913:{isFetching:false,expires:99999999999,images:[{width:440,height:440,sources:['https://img-service.shopgate.com/image440.jpg']},{width:1024,height:1024,sources:['https://img-service.shopgate.com/image1024.jpg']},{width:2048,height:2048,sources:['https://img-service.shopgate.com/image2048.jpg']}]},1097:{isFetching:false,expires:99999999999,images:[]}}})});var productWithSelectedOptions=_extends({},productWithOneOption,{product:_extends({},productWithOneOption.product)});var productWithVariants=_extends({},initialState,{product:_extends({},initialState.product,{productsById:{dif01:{isFetching:false,expires:1497432294167,productData:{id:'dif01',baseProductId:null,name:'Product with children that have different prices',manufacturer:'',identifiers:{sku:'dif01'},ageRating:0,stock:{ignoreQuantity:true,quantity:0,info:'',orderable:true,minOrderQuantity:0,maxOrderQuantity:0},rating:{count:0,average:0,reviewCount:0},flags:{hasChildren:false,hasVariants:true,hasOptions:false},featuredImageBaseUrl:null,featuredImageUrl:null,price:{currency:'EUR',info:'',unitPrice:5,unitPriceStriked:0,unitPriceMin:15,unitPriceNet:5,unitPriceWithTax:5,taxAmount:0,taxPercent:0,msrp:0,tiers:[],unitPriceMax:1000},liveshoppings:[],highlight:false,availability:{text:'Verfügbar',state:'ok'}}}},variantsByProductId:{dif01:{isFetching:false,expires:1497432294379,variants:{products:[{id:'dif01-exp',hasOptions:false,characteristics:{1:'1'}},{id:'dif01-cheap',hasOptions:false,characteristics:{1:'2'}}],characteristics:[{id:'1',label:'Attribute',values:[{id:'2',label:'Cheap'},{id:'1',label:'Expensive'}]}]}}}})});var productWithSelectedVariant=_extends({},productWithVariants,{product:_extends({},productWithVariants.product,{productsById:_extends({},productWithVariants.product.productsById,{'dif01-exp':{isFetching:false,expires:1497432564083,productData:{id:'dif01-exp',name:'Product with children that have different prices - Expensive product',manufacturer:'',identifiers:{sku:'dif01-exp'},ageRating:0,stock:{ignoreQuantity:true,quantity:0,info:'',orderable:true,minOrderQuantity:0,maxOrderQuantity:0},rating:{count:0,average:0,reviewCount:0},flags:{hasChildren:false,hasVariants:false,hasOptions:false},featuredImageBaseUrl:null,featuredImageUrl:null,price:{currency:'EUR',info:'',unitPrice:26,unitPriceStriked:0,unitPriceMin:0,unitPriceNet:26,unitPriceWithTax:26,taxAmount:0,taxPercent:0,msrp:0,tiers:[],unitPriceMax:1000},liveshoppings:[],highlight:false,availability:{text:'Verfügbar',state:'ok'}}}})})});var productWithVariantsAndOptions=_extends({},initialState,{product:_extends({},initialState.product,{productsById:{SG74:{isFetching:false,expires:1497436381610,productData:{id:'SG74',name:'Produkt mit Optionen und Attributen',manufacturer:'MANUFACTURER',identifiers:{sku:'item_number_public-74',mpn:'manufacturer_item_number-74'},ageRating:0,stock:{ignoreQuantity:false,quantity:100,info:'Available_Text',orderable:true,minOrderQuantity:0,maxOrderQuantity:0},rating:{count:0,average:0,reviewCount:0},flags:{hasChildren:false,hasVariants:true,hasOptions:false},featuredImageBaseUrl:'https://img-cdn.shopgate.com/30187/1/0b63a9a326f1a87ee8e8abf5da5cf72c47a9cbfd4e80c1d53e289a79a86ed29f',featuredImageUrl:'https://img-cdn.shopgate.com/30187/1/0b63a9a326f1a87ee8e8abf5da5cf72c47a9cbfd4e80c1d53e289a79a86ed29f',price:{currency:'EUR',info:'',unitPrice:10.51,unitPriceStriked:0,unitPriceMin:11.51,unitPriceNet:8.83,unitPriceWithTax:10.51,taxAmount:1.68,taxPercent:19,msrp:0,tiers:[],unitPriceMax:1000},liveshoppings:[],highlight:true,availability:{text:'Available_Text',state:'ok'}}},SG75:{isFetching:false,expires:1497436387040,productData:{id:'SG75',name:'Kindprodukt 1 mit Optionen',manufacturer:'MANUFACTURER',identifiers:{sku:'item_number_public-75',mpn:'manufacturer_item_number-75'},ageRating:0,stock:{ignoreQuantity:false,quantity:100,info:'Available_Text',orderable:true,minOrderQuantity:0,maxOrderQuantity:0},rating:{count:0,average:0,reviewCount:0},flags:{hasChildren:false,hasVariants:false,hasOptions:true},featuredImageBaseUrl:'https://img-cdn.shopgate.com/30187/1/418315732cd28ab495acd3861f2d4a0d406b07c997d28b17d5a38446ae9122c3',featuredImageUrl:'https://img-cdn.shopgate.com/30187/1/418315732cd28ab495acd3861f2d4a0d406b07c997d28b17d5a38446ae9122c3',price:{currency:'EUR',info:'',unitPrice:10.51,unitPriceStriked:0,unitPriceMin:11.51,unitPriceNet:8.83,unitPriceWithTax:10.51,taxAmount:1.68,taxPercent:19,msrp:0,tiers:[],unitPriceMax:1000},liveshoppings:[],highlight:false,availability:{text:'Available_Text',state:'ok'}}},SG78:{isFetching:false,expires:1497436396446,productData:{id:'SG78',name:'Kindprodukt 4 mit Optionen',manufacturer:'MANUFACTURER',identifiers:{sku:'item_number_public-78',mpn:'manufacturer_item_number-78'},ageRating:0,stock:{ignoreQuantity:false,quantity:100,info:'Available_Text',orderable:true,minOrderQuantity:0,maxOrderQuantity:0},rating:{count:0,average:0,reviewCount:0},flags:{hasChildren:false,hasVariants:false,hasOptions:true},featuredImageBaseUrl:'https://img-cdn.shopgate.com/30187/1/5470e69c84493a2e1eb9360fef3b0b1e545a69d7ebf67d86d8f245c130ed5994',featuredImageUrl:'https://img-cdn.shopgate.com/30187/1/5470e69c84493a2e1eb9360fef3b0b1e545a69d7ebf67d86d8f245c130ed5994',price:{currency:'EUR',info:'',unitPrice:10.54,unitPriceStriked:0,unitPriceMin:11.54,unitPriceNet:8.85,unitPriceWithTax:10.54,taxAmount:1.69,taxPercent:19,msrp:0,tiers:[],unitPriceMax:1000},liveshoppings:[],highlight:false,availability:{text:'Available_Text',state:'ok'}}},SG79:{isFetching:false,expires:1497436425368,productData:{id:'SG79',name:'Kindprodukt 5 mit Optionen',manufacturer:'MANUFACTURER',identifiers:{sku:'item_number_public-79',mpn:'manufacturer_item_number-79'},ageRating:0,stock:{ignoreQuantity:false,quantity:100,info:'Available_Text',orderable:true,minOrderQuantity:0,maxOrderQuantity:0},rating:{count:0,average:0,reviewCount:0},flags:{hasChildren:false,hasVariants:false,hasOptions:true},featuredImageBaseUrl:'https://img-cdn.shopgate.com/30187/1/fa8f6a39cafe657d578ebe45a0dbbfbfe4884df834adf718db84fd256fbdcf79',featuredImageUrl:'https://img-cdn.shopgate.com/30187/1/fa8f6a39cafe657d578ebe45a0dbbfbfe4884df834adf718db84fd256fbdcf79',price:{currency:'EUR',info:'',unitPrice:10.55,unitPriceStriked:0,unitPriceMin:11.55,unitPriceNet:8.86,unitPriceWithTax:10.55,taxAmount:1.69,taxPercent:19,msrp:0,tiers:[],unitPriceMax:1000},liveshoppings:[],highlight:false,availability:{text:'Available_Text',state:'ok'}}},SG76:{isFetching:false,expires:1497436434262,productData:{id:'SG76',name:'Kindprodukt 2 mit Optionen',manufacturer:'MANUFACTURER',identifiers:{sku:'item_number_public-76',mpn:'manufacturer_item_number-76'},ageRating:0,stock:{ignoreQuantity:false,quantity:100,info:'Available_Text',orderable:true,minOrderQuantity:0,maxOrderQuantity:0},rating:{count:0,average:0,reviewCount:0},flags:{hasChildren:false,hasVariants:false,hasOptions:true},featuredImageBaseUrl:'https://img-cdn.shopgate.com/30187/1/4720d364278292d92451f615c8350bbc26bdb5ea8b06e5cc9b9bb8ef3a964b0d',featuredImageUrl:'https://img-cdn.shopgate.com/30187/1/4720d364278292d92451f615c8350bbc26bdb5ea8b06e5cc9b9bb8ef3a964b0d',price:{currency:'EUR',info:'',unitPrice:10.52,unitPriceStriked:0,unitPriceMin:11.52,unitPriceNet:8.84,unitPriceWithTax:10.52,taxAmount:1.68,taxPercent:19,msrp:0,tiers:[],unitPriceMax:1000},liveshoppings:[],highlight:false,availability:{text:'Available_Text',state:'ok'}}}},variantsByProductId:{SG74:{isFetching:false,expires:1497436381810,variants:{products:[{id:'SG79',hasOptions:true,characteristics:{1:'1'}},{id:'SG78',hasOptions:true,characteristics:{1:'2'}},{id:'SG77',hasOptions:true,characteristics:{1:'3'}},{id:'SG76',hasOptions:true,characteristics:{1:'4'}},{id:'SG75',hasOptions:true,characteristics:{1:'5'}}],characteristics:[{id:'1',label:'attribut1',values:[{id:'5',label:'attribut1_1'},{id:'4',label:'attribut1_2'},{id:'3',label:'attribut1_3'},{id:'2',label:'attribut1_4'},{id:'1',label:'attribut1_5'}]}]}}},optionsByProductId:{SG75:{isFetching:false,expires:1497436387244,options:[{id:'1',type:'select',label:'Option 1',values:[{id:'5',label:'Value5',unitPriceModifier:5},{id:'4',label:'Value4',unitPriceModifier:4},{id:'3',label:'Value3',unitPriceModifier:3},{id:'2',label:'Value2',unitPriceModifier:2},{id:'1',label:'Value1',unitPriceModifier:1}]}]},SG78:{isFetching:false,expires:1497436396627,options:[{id:'1',type:'select',label:'Option 1',values:[{id:'5',label:'Value5',unitPriceModifier:5},{id:'4',label:'Value4',unitPriceModifier:4},{id:'3',label:'Value3',unitPriceModifier:3},{id:'2',label:'Value2',unitPriceModifier:2},{id:'1',label:'Value1',unitPriceModifier:1}]}]},SG79:{isFetching:false,expires:1497436425568,options:[{id:'1',type:'select',label:'Option 1',values:[{id:'5',label:'Value5',unitPriceModifier:5},{id:'4',label:'Value4',unitPriceModifier:4},{id:'3',label:'Value3',unitPriceModifier:3},{id:'2',label:'Value2',unitPriceModifier:2},{id:'1',label:'Value1',unitPriceModifier:1}]}]},SG76:{isFetching:false,expires:1497436434474,options:[{id:'1',type:'select',label:'Option 1',values:[{id:'5',label:'Value5',unitPriceModifier:5},{id:'4',label:'Value4',unitPriceModifier:4},{id:'3',label:'Value3',unitPriceModifier:3},{id:'2',label:'Value2',unitPriceModifier:2},{id:'1',label:'Value1',unitPriceModifier:1}]}]}}})});/**
|
|
1
|
+
const productRouteMock = {
|
|
2
|
+
id: '0903d6a9-2b5c-47a7-bdd4-e95be5311a23',
|
|
3
|
+
params: {
|
|
4
|
+
productId: '393133'
|
|
5
|
+
},
|
|
6
|
+
pathname: '/item/393133',
|
|
7
|
+
pattern: '/item/:productId',
|
|
8
|
+
query: {},
|
|
9
|
+
state: {}
|
|
10
|
+
};
|
|
11
|
+
const mockedProducts = {
|
|
12
|
+
products: [{
|
|
13
|
+
id: 'SG117',
|
|
14
|
+
name: 'no_description',
|
|
15
|
+
active: true,
|
|
16
|
+
description: '',
|
|
17
|
+
customData: null,
|
|
18
|
+
manufacturer: '',
|
|
19
|
+
identifiers: {
|
|
20
|
+
sku: 'pub_SG117'
|
|
21
|
+
},
|
|
22
|
+
tags: [],
|
|
23
|
+
ageRating: 0,
|
|
24
|
+
baseProductId: null,
|
|
25
|
+
stock: {
|
|
26
|
+
ignoreQuantity: true,
|
|
27
|
+
quantity: 0,
|
|
28
|
+
info: '',
|
|
29
|
+
orderable: true,
|
|
30
|
+
minOrderQuantity: 0,
|
|
31
|
+
maxOrderQuantity: 0
|
|
32
|
+
},
|
|
33
|
+
rating: {
|
|
34
|
+
count: 0,
|
|
35
|
+
average: 0,
|
|
36
|
+
reviewCount: 0
|
|
37
|
+
},
|
|
38
|
+
flags: {
|
|
39
|
+
hasChildren: true,
|
|
40
|
+
hasVariants: false,
|
|
41
|
+
hasOptions: false
|
|
42
|
+
},
|
|
43
|
+
internalLog: 'd41d8cd98f00b204e9800998ecf8427e',
|
|
44
|
+
availability: {
|
|
45
|
+
text: 'Verfügbar',
|
|
46
|
+
state: 'ok'
|
|
47
|
+
},
|
|
48
|
+
featuredImageUrl: null,
|
|
49
|
+
featuredImageBaseUrl: null,
|
|
50
|
+
type: 'simple',
|
|
51
|
+
price: {
|
|
52
|
+
currency: 'EUR',
|
|
53
|
+
info: '',
|
|
54
|
+
unitPrice: 100,
|
|
55
|
+
unitPriceStriked: 0,
|
|
56
|
+
unitPriceMin: 0,
|
|
57
|
+
unitPriceNet: 100,
|
|
58
|
+
unitPriceWithTax: 100,
|
|
59
|
+
taxAmount: 0,
|
|
60
|
+
taxPercent: 0,
|
|
61
|
+
msrp: 0,
|
|
62
|
+
tiers: [],
|
|
63
|
+
unitPriceMax: 1000,
|
|
64
|
+
mapPricing: {
|
|
65
|
+
startDate: '2019-04-01T10:00:00.000Z',
|
|
66
|
+
endDate: '2019-04-10T10:00:00.000Z',
|
|
67
|
+
price: 10
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
characteristics: [{
|
|
71
|
+
id: 1,
|
|
72
|
+
name: 'Color',
|
|
73
|
+
label: 'Color',
|
|
74
|
+
value: 'Black'
|
|
75
|
+
}, {
|
|
76
|
+
id: 2,
|
|
77
|
+
name: 'Shoe size',
|
|
78
|
+
label: 'Shoe size',
|
|
79
|
+
value: '5'
|
|
80
|
+
}]
|
|
81
|
+
}, {
|
|
82
|
+
id: 'SG118',
|
|
83
|
+
name: 'no_description',
|
|
84
|
+
active: true,
|
|
85
|
+
description: '',
|
|
86
|
+
customData: null,
|
|
87
|
+
manufacturer: '',
|
|
88
|
+
baseProductId: 'SG117',
|
|
89
|
+
identifiers: {
|
|
90
|
+
sku: 'pub_SG117'
|
|
91
|
+
},
|
|
92
|
+
tags: [],
|
|
93
|
+
ageRating: 0,
|
|
94
|
+
stock: {
|
|
95
|
+
ignoreQuantity: true,
|
|
96
|
+
quantity: 0,
|
|
97
|
+
info: '',
|
|
98
|
+
orderable: true,
|
|
99
|
+
minOrderQuantity: 0,
|
|
100
|
+
maxOrderQuantity: 0
|
|
101
|
+
},
|
|
102
|
+
rating: {
|
|
103
|
+
count: 0,
|
|
104
|
+
average: 0,
|
|
105
|
+
reviewCount: 0
|
|
106
|
+
},
|
|
107
|
+
flags: {
|
|
108
|
+
hasChildren: false,
|
|
109
|
+
hasVariants: false,
|
|
110
|
+
hasOptions: false
|
|
111
|
+
},
|
|
112
|
+
internalLog: 'd41d8cd98f00b204e9800998ecf8427e',
|
|
113
|
+
availability: {
|
|
114
|
+
text: 'Verfügbar',
|
|
115
|
+
state: 'ok'
|
|
116
|
+
},
|
|
117
|
+
featuredImageUrl: null,
|
|
118
|
+
featuredImageBaseUrl: null,
|
|
119
|
+
type: 'simple',
|
|
120
|
+
price: null
|
|
121
|
+
}]
|
|
122
|
+
};
|
|
123
|
+
const initialState = {
|
|
124
|
+
product: {
|
|
125
|
+
productsById: {},
|
|
126
|
+
descriptionsByProductId: {},
|
|
127
|
+
propertiesByProductId: {},
|
|
128
|
+
variantsByProductId: {},
|
|
129
|
+
optionsByProductId: {},
|
|
130
|
+
resultsByHash: {},
|
|
131
|
+
imagesByProductId: {}
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const basicProductState = {
|
|
135
|
+
...initialState,
|
|
136
|
+
product: {
|
|
137
|
+
...initialState.product,
|
|
138
|
+
productsById: {
|
|
139
|
+
913: {
|
|
140
|
+
isFetching: false,
|
|
141
|
+
expires: 1497428462438,
|
|
142
|
+
productData: {
|
|
143
|
+
id: '913',
|
|
144
|
+
baseProductId: null,
|
|
145
|
+
name: 'This is a product with a very very long name -5-',
|
|
146
|
+
manufacturer: '',
|
|
147
|
+
identifiers: {
|
|
148
|
+
sku: '857347363'
|
|
149
|
+
},
|
|
150
|
+
ageRating: 0,
|
|
151
|
+
stock: {
|
|
152
|
+
ignoreQuantity: true,
|
|
153
|
+
quantity: 0,
|
|
154
|
+
info: 'In stock',
|
|
155
|
+
orderable: true,
|
|
156
|
+
minOrderQuantity: 1,
|
|
157
|
+
maxOrderQuantity: 10000
|
|
158
|
+
},
|
|
159
|
+
rating: {
|
|
160
|
+
count: 0,
|
|
161
|
+
average: 0,
|
|
162
|
+
reviewCount: 0
|
|
163
|
+
},
|
|
164
|
+
flags: {
|
|
165
|
+
hasChildren: false,
|
|
166
|
+
hasVariants: false,
|
|
167
|
+
hasOptions: false
|
|
168
|
+
},
|
|
169
|
+
featuredImageBaseUrl: 'https://img-cdn.shopgate.com/30188/1/fce216e970614ec94f701b4fc234d1908b48c3b097303c9698e3a6f46787cf3b',
|
|
170
|
+
featuredImageUrl: 'https://img-cdn.shopgate.com/30188/1/fce216e970614ec94f701b4fc234d1908b48c3b097303c9698e3a6f46787cf3b',
|
|
171
|
+
price: {
|
|
172
|
+
currency: 'EUR',
|
|
173
|
+
info: '',
|
|
174
|
+
unitPrice: 89,
|
|
175
|
+
unitPriceStriked: 0,
|
|
176
|
+
unitPriceMin: 0,
|
|
177
|
+
unitPriceNet: 89,
|
|
178
|
+
unitPriceWithTax: 89,
|
|
179
|
+
taxAmount: 0,
|
|
180
|
+
taxPercent: 0,
|
|
181
|
+
msrp: 0,
|
|
182
|
+
tiers: [],
|
|
183
|
+
unitPriceMax: 1000,
|
|
184
|
+
mapPricing: {
|
|
185
|
+
startDate: '2019-04-01T10:00:00.000Z',
|
|
186
|
+
endDate: '2019-04-10T10:00:00.000Z',
|
|
187
|
+
price: 10
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
liveshoppings: [],
|
|
191
|
+
highlight: true,
|
|
192
|
+
availability: {
|
|
193
|
+
text: 'In stock',
|
|
194
|
+
state: 'ok'
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
914: {
|
|
199
|
+
productData: {
|
|
200
|
+
id: '914',
|
|
201
|
+
price: {
|
|
202
|
+
currency: 'EUR',
|
|
203
|
+
info: '',
|
|
204
|
+
unitPrice: 89,
|
|
205
|
+
unitPriceStriked: 0,
|
|
206
|
+
unitPriceMin: 0,
|
|
207
|
+
unitPriceNet: 89,
|
|
208
|
+
unitPriceWithTax: 89,
|
|
209
|
+
taxAmount: 0,
|
|
210
|
+
taxPercent: 0,
|
|
211
|
+
msrp: 0
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
imagesByProductId: {
|
|
217
|
+
913: {
|
|
218
|
+
isFetching: false,
|
|
219
|
+
expires: 99999999999,
|
|
220
|
+
images: [{
|
|
221
|
+
width: 440,
|
|
222
|
+
height: 440,
|
|
223
|
+
sources: ['https://img-service.shopgate.com/image440.jpg']
|
|
224
|
+
}, {
|
|
225
|
+
width: 1024,
|
|
226
|
+
height: 1024,
|
|
227
|
+
sources: ['https://img-service.shopgate.com/image1024.jpg']
|
|
228
|
+
}, {
|
|
229
|
+
width: 2048,
|
|
230
|
+
height: 2048,
|
|
231
|
+
sources: ['https://img-service.shopgate.com/image2048.jpg']
|
|
232
|
+
}]
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
optionsByProductId: {
|
|
236
|
+
913: {
|
|
237
|
+
isFetching: false,
|
|
238
|
+
expires: 1497429213141,
|
|
239
|
+
options: []
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
const productWithOneOption = {
|
|
245
|
+
...initialState,
|
|
246
|
+
product: {
|
|
247
|
+
...initialState.product,
|
|
248
|
+
productsById: {
|
|
249
|
+
1097: {
|
|
250
|
+
isFetching: false,
|
|
251
|
+
expires: 1497429212949,
|
|
252
|
+
productData: {
|
|
253
|
+
id: '1097',
|
|
254
|
+
baseProductId: null,
|
|
255
|
+
name: 'simple Product with options',
|
|
256
|
+
manufacturer: '',
|
|
257
|
+
identifiers: {
|
|
258
|
+
sku: '12345667878754654'
|
|
259
|
+
},
|
|
260
|
+
ageRating: 0,
|
|
261
|
+
stock: {
|
|
262
|
+
ignoreQuantity: true,
|
|
263
|
+
quantity: 0,
|
|
264
|
+
info: 'In stock',
|
|
265
|
+
orderable: true,
|
|
266
|
+
minOrderQuantity: 1,
|
|
267
|
+
maxOrderQuantity: 10000
|
|
268
|
+
},
|
|
269
|
+
rating: {
|
|
270
|
+
count: 0,
|
|
271
|
+
average: 0,
|
|
272
|
+
reviewCount: 0
|
|
273
|
+
},
|
|
274
|
+
flags: {
|
|
275
|
+
hasChildren: false,
|
|
276
|
+
hasVariants: false,
|
|
277
|
+
hasOptions: true
|
|
278
|
+
},
|
|
279
|
+
featuredImageBaseUrl: null,
|
|
280
|
+
featuredImageUrl: null,
|
|
281
|
+
price: {
|
|
282
|
+
currency: 'EUR',
|
|
283
|
+
info: '',
|
|
284
|
+
unitPrice: 10,
|
|
285
|
+
unitPriceStriked: 0,
|
|
286
|
+
unitPriceMin: 11,
|
|
287
|
+
unitPriceNet: 10,
|
|
288
|
+
unitPriceWithTax: 10,
|
|
289
|
+
taxAmount: 0,
|
|
290
|
+
taxPercent: 0,
|
|
291
|
+
msrp: 0,
|
|
292
|
+
tiers: [],
|
|
293
|
+
unitPriceMax: 1000
|
|
294
|
+
},
|
|
295
|
+
liveshoppings: [],
|
|
296
|
+
highlight: false,
|
|
297
|
+
availability: {
|
|
298
|
+
text: 'In stock',
|
|
299
|
+
state: 'ok'
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
optionsByProductId: {
|
|
305
|
+
913: {
|
|
306
|
+
isFetching: false,
|
|
307
|
+
expires: 1497429213141,
|
|
308
|
+
options: []
|
|
309
|
+
},
|
|
310
|
+
1097: {
|
|
311
|
+
isFetching: false,
|
|
312
|
+
expires: 1497429213141,
|
|
313
|
+
options: [{
|
|
314
|
+
id: '1',
|
|
315
|
+
type: 'select',
|
|
316
|
+
label: 'Ball color',
|
|
317
|
+
values: [{
|
|
318
|
+
id: '1',
|
|
319
|
+
label: 'Green Ball',
|
|
320
|
+
unitPriceModifier: 1
|
|
321
|
+
}, {
|
|
322
|
+
id: '3',
|
|
323
|
+
label: 'magic ball',
|
|
324
|
+
unitPriceModifier: 1
|
|
325
|
+
}, {
|
|
326
|
+
id: '2',
|
|
327
|
+
label: 'Red Ball',
|
|
328
|
+
unitPriceModifier: 1.5
|
|
329
|
+
}]
|
|
330
|
+
}, {
|
|
331
|
+
id: '10',
|
|
332
|
+
type: 'text',
|
|
333
|
+
label: 'Foo',
|
|
334
|
+
annotation: 'Bar',
|
|
335
|
+
required: true,
|
|
336
|
+
unitPriceModifier: 3
|
|
337
|
+
}]
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
imagesByProductId: {
|
|
341
|
+
913: {
|
|
342
|
+
isFetching: false,
|
|
343
|
+
expires: 99999999999,
|
|
344
|
+
images: [{
|
|
345
|
+
width: 440,
|
|
346
|
+
height: 440,
|
|
347
|
+
sources: ['https://img-service.shopgate.com/image440.jpg']
|
|
348
|
+
}, {
|
|
349
|
+
width: 1024,
|
|
350
|
+
height: 1024,
|
|
351
|
+
sources: ['https://img-service.shopgate.com/image1024.jpg']
|
|
352
|
+
}, {
|
|
353
|
+
width: 2048,
|
|
354
|
+
height: 2048,
|
|
355
|
+
sources: ['https://img-service.shopgate.com/image2048.jpg']
|
|
356
|
+
}]
|
|
357
|
+
},
|
|
358
|
+
1097: {
|
|
359
|
+
isFetching: false,
|
|
360
|
+
expires: 99999999999,
|
|
361
|
+
images: []
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
const productWithSelectedOptions = {
|
|
367
|
+
...productWithOneOption,
|
|
368
|
+
product: {
|
|
369
|
+
...productWithOneOption.product
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
const productWithVariants = {
|
|
373
|
+
...initialState,
|
|
374
|
+
product: {
|
|
375
|
+
...initialState.product,
|
|
376
|
+
productsById: {
|
|
377
|
+
dif01: {
|
|
378
|
+
isFetching: false,
|
|
379
|
+
expires: 1497432294167,
|
|
380
|
+
productData: {
|
|
381
|
+
id: 'dif01',
|
|
382
|
+
baseProductId: null,
|
|
383
|
+
name: 'Product with children that have different prices',
|
|
384
|
+
manufacturer: '',
|
|
385
|
+
identifiers: {
|
|
386
|
+
sku: 'dif01'
|
|
387
|
+
},
|
|
388
|
+
ageRating: 0,
|
|
389
|
+
stock: {
|
|
390
|
+
ignoreQuantity: true,
|
|
391
|
+
quantity: 0,
|
|
392
|
+
info: '',
|
|
393
|
+
orderable: true,
|
|
394
|
+
minOrderQuantity: 0,
|
|
395
|
+
maxOrderQuantity: 0
|
|
396
|
+
},
|
|
397
|
+
rating: {
|
|
398
|
+
count: 0,
|
|
399
|
+
average: 0,
|
|
400
|
+
reviewCount: 0
|
|
401
|
+
},
|
|
402
|
+
flags: {
|
|
403
|
+
hasChildren: false,
|
|
404
|
+
hasVariants: true,
|
|
405
|
+
hasOptions: false
|
|
406
|
+
},
|
|
407
|
+
featuredImageBaseUrl: null,
|
|
408
|
+
featuredImageUrl: null,
|
|
409
|
+
price: {
|
|
410
|
+
currency: 'EUR',
|
|
411
|
+
info: '',
|
|
412
|
+
unitPrice: 5,
|
|
413
|
+
unitPriceStriked: 0,
|
|
414
|
+
unitPriceMin: 15,
|
|
415
|
+
unitPriceNet: 5,
|
|
416
|
+
unitPriceWithTax: 5,
|
|
417
|
+
taxAmount: 0,
|
|
418
|
+
taxPercent: 0,
|
|
419
|
+
msrp: 0,
|
|
420
|
+
tiers: [],
|
|
421
|
+
unitPriceMax: 1000
|
|
422
|
+
},
|
|
423
|
+
liveshoppings: [],
|
|
424
|
+
highlight: false,
|
|
425
|
+
availability: {
|
|
426
|
+
text: 'Verfügbar',
|
|
427
|
+
state: 'ok'
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
variantsByProductId: {
|
|
433
|
+
dif01: {
|
|
434
|
+
isFetching: false,
|
|
435
|
+
expires: 1497432294379,
|
|
436
|
+
variants: {
|
|
437
|
+
products: [{
|
|
438
|
+
id: 'dif01-exp',
|
|
439
|
+
hasOptions: false,
|
|
440
|
+
characteristics: {
|
|
441
|
+
1: '1'
|
|
442
|
+
}
|
|
443
|
+
}, {
|
|
444
|
+
id: 'dif01-cheap',
|
|
445
|
+
hasOptions: false,
|
|
446
|
+
characteristics: {
|
|
447
|
+
1: '2'
|
|
448
|
+
}
|
|
449
|
+
}],
|
|
450
|
+
characteristics: [{
|
|
451
|
+
id: '1',
|
|
452
|
+
label: 'Attribute',
|
|
453
|
+
values: [{
|
|
454
|
+
id: '2',
|
|
455
|
+
label: 'Cheap'
|
|
456
|
+
}, {
|
|
457
|
+
id: '1',
|
|
458
|
+
label: 'Expensive'
|
|
459
|
+
}]
|
|
460
|
+
}]
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
const productWithSelectedVariant = {
|
|
467
|
+
...productWithVariants,
|
|
468
|
+
product: {
|
|
469
|
+
...productWithVariants.product,
|
|
470
|
+
productsById: {
|
|
471
|
+
...productWithVariants.product.productsById,
|
|
472
|
+
'dif01-exp': {
|
|
473
|
+
isFetching: false,
|
|
474
|
+
expires: 1497432564083,
|
|
475
|
+
productData: {
|
|
476
|
+
id: 'dif01-exp',
|
|
477
|
+
name: 'Product with children that have different prices - Expensive product',
|
|
478
|
+
manufacturer: '',
|
|
479
|
+
identifiers: {
|
|
480
|
+
sku: 'dif01-exp'
|
|
481
|
+
},
|
|
482
|
+
ageRating: 0,
|
|
483
|
+
stock: {
|
|
484
|
+
ignoreQuantity: true,
|
|
485
|
+
quantity: 0,
|
|
486
|
+
info: '',
|
|
487
|
+
orderable: true,
|
|
488
|
+
minOrderQuantity: 0,
|
|
489
|
+
maxOrderQuantity: 0
|
|
490
|
+
},
|
|
491
|
+
rating: {
|
|
492
|
+
count: 0,
|
|
493
|
+
average: 0,
|
|
494
|
+
reviewCount: 0
|
|
495
|
+
},
|
|
496
|
+
flags: {
|
|
497
|
+
hasChildren: false,
|
|
498
|
+
hasVariants: false,
|
|
499
|
+
hasOptions: false
|
|
500
|
+
},
|
|
501
|
+
featuredImageBaseUrl: null,
|
|
502
|
+
featuredImageUrl: null,
|
|
503
|
+
price: {
|
|
504
|
+
currency: 'EUR',
|
|
505
|
+
info: '',
|
|
506
|
+
unitPrice: 26,
|
|
507
|
+
unitPriceStriked: 0,
|
|
508
|
+
unitPriceMin: 0,
|
|
509
|
+
unitPriceNet: 26,
|
|
510
|
+
unitPriceWithTax: 26,
|
|
511
|
+
taxAmount: 0,
|
|
512
|
+
taxPercent: 0,
|
|
513
|
+
msrp: 0,
|
|
514
|
+
tiers: [],
|
|
515
|
+
unitPriceMax: 1000
|
|
516
|
+
},
|
|
517
|
+
liveshoppings: [],
|
|
518
|
+
highlight: false,
|
|
519
|
+
availability: {
|
|
520
|
+
text: 'Verfügbar',
|
|
521
|
+
state: 'ok'
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
const productWithVariantsAndOptions = {
|
|
529
|
+
...initialState,
|
|
530
|
+
product: {
|
|
531
|
+
...initialState.product,
|
|
532
|
+
productsById: {
|
|
533
|
+
SG74: {
|
|
534
|
+
isFetching: false,
|
|
535
|
+
expires: 1497436381610,
|
|
536
|
+
productData: {
|
|
537
|
+
id: 'SG74',
|
|
538
|
+
name: 'Produkt mit Optionen und Attributen',
|
|
539
|
+
manufacturer: 'MANUFACTURER',
|
|
540
|
+
identifiers: {
|
|
541
|
+
sku: 'item_number_public-74',
|
|
542
|
+
mpn: 'manufacturer_item_number-74'
|
|
543
|
+
},
|
|
544
|
+
ageRating: 0,
|
|
545
|
+
stock: {
|
|
546
|
+
ignoreQuantity: false,
|
|
547
|
+
quantity: 100,
|
|
548
|
+
info: 'Available_Text',
|
|
549
|
+
orderable: true,
|
|
550
|
+
minOrderQuantity: 0,
|
|
551
|
+
maxOrderQuantity: 0
|
|
552
|
+
},
|
|
553
|
+
rating: {
|
|
554
|
+
count: 0,
|
|
555
|
+
average: 0,
|
|
556
|
+
reviewCount: 0
|
|
557
|
+
},
|
|
558
|
+
flags: {
|
|
559
|
+
hasChildren: false,
|
|
560
|
+
hasVariants: true,
|
|
561
|
+
hasOptions: false
|
|
562
|
+
},
|
|
563
|
+
featuredImageBaseUrl: 'https://img-cdn.shopgate.com/30187/1/0b63a9a326f1a87ee8e8abf5da5cf72c47a9cbfd4e80c1d53e289a79a86ed29f',
|
|
564
|
+
featuredImageUrl: 'https://img-cdn.shopgate.com/30187/1/0b63a9a326f1a87ee8e8abf5da5cf72c47a9cbfd4e80c1d53e289a79a86ed29f',
|
|
565
|
+
price: {
|
|
566
|
+
currency: 'EUR',
|
|
567
|
+
info: '',
|
|
568
|
+
unitPrice: 10.51,
|
|
569
|
+
unitPriceStriked: 0,
|
|
570
|
+
unitPriceMin: 11.51,
|
|
571
|
+
unitPriceNet: 8.83,
|
|
572
|
+
unitPriceWithTax: 10.51,
|
|
573
|
+
taxAmount: 1.68,
|
|
574
|
+
taxPercent: 19,
|
|
575
|
+
msrp: 0,
|
|
576
|
+
tiers: [],
|
|
577
|
+
unitPriceMax: 1000
|
|
578
|
+
},
|
|
579
|
+
liveshoppings: [],
|
|
580
|
+
highlight: true,
|
|
581
|
+
availability: {
|
|
582
|
+
text: 'Available_Text',
|
|
583
|
+
state: 'ok'
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
SG75: {
|
|
588
|
+
isFetching: false,
|
|
589
|
+
expires: 1497436387040,
|
|
590
|
+
productData: {
|
|
591
|
+
id: 'SG75',
|
|
592
|
+
name: 'Kindprodukt 1 mit Optionen',
|
|
593
|
+
manufacturer: 'MANUFACTURER',
|
|
594
|
+
identifiers: {
|
|
595
|
+
sku: 'item_number_public-75',
|
|
596
|
+
mpn: 'manufacturer_item_number-75'
|
|
597
|
+
},
|
|
598
|
+
ageRating: 0,
|
|
599
|
+
stock: {
|
|
600
|
+
ignoreQuantity: false,
|
|
601
|
+
quantity: 100,
|
|
602
|
+
info: 'Available_Text',
|
|
603
|
+
orderable: true,
|
|
604
|
+
minOrderQuantity: 0,
|
|
605
|
+
maxOrderQuantity: 0
|
|
606
|
+
},
|
|
607
|
+
rating: {
|
|
608
|
+
count: 0,
|
|
609
|
+
average: 0,
|
|
610
|
+
reviewCount: 0
|
|
611
|
+
},
|
|
612
|
+
flags: {
|
|
613
|
+
hasChildren: false,
|
|
614
|
+
hasVariants: false,
|
|
615
|
+
hasOptions: true
|
|
616
|
+
},
|
|
617
|
+
featuredImageBaseUrl: 'https://img-cdn.shopgate.com/30187/1/418315732cd28ab495acd3861f2d4a0d406b07c997d28b17d5a38446ae9122c3',
|
|
618
|
+
featuredImageUrl: 'https://img-cdn.shopgate.com/30187/1/418315732cd28ab495acd3861f2d4a0d406b07c997d28b17d5a38446ae9122c3',
|
|
619
|
+
price: {
|
|
620
|
+
currency: 'EUR',
|
|
621
|
+
info: '',
|
|
622
|
+
unitPrice: 10.51,
|
|
623
|
+
unitPriceStriked: 0,
|
|
624
|
+
unitPriceMin: 11.51,
|
|
625
|
+
unitPriceNet: 8.83,
|
|
626
|
+
unitPriceWithTax: 10.51,
|
|
627
|
+
taxAmount: 1.68,
|
|
628
|
+
taxPercent: 19,
|
|
629
|
+
msrp: 0,
|
|
630
|
+
tiers: [],
|
|
631
|
+
unitPriceMax: 1000
|
|
632
|
+
},
|
|
633
|
+
liveshoppings: [],
|
|
634
|
+
highlight: false,
|
|
635
|
+
availability: {
|
|
636
|
+
text: 'Available_Text',
|
|
637
|
+
state: 'ok'
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
SG78: {
|
|
642
|
+
isFetching: false,
|
|
643
|
+
expires: 1497436396446,
|
|
644
|
+
productData: {
|
|
645
|
+
id: 'SG78',
|
|
646
|
+
name: 'Kindprodukt 4 mit Optionen',
|
|
647
|
+
manufacturer: 'MANUFACTURER',
|
|
648
|
+
identifiers: {
|
|
649
|
+
sku: 'item_number_public-78',
|
|
650
|
+
mpn: 'manufacturer_item_number-78'
|
|
651
|
+
},
|
|
652
|
+
ageRating: 0,
|
|
653
|
+
stock: {
|
|
654
|
+
ignoreQuantity: false,
|
|
655
|
+
quantity: 100,
|
|
656
|
+
info: 'Available_Text',
|
|
657
|
+
orderable: true,
|
|
658
|
+
minOrderQuantity: 0,
|
|
659
|
+
maxOrderQuantity: 0
|
|
660
|
+
},
|
|
661
|
+
rating: {
|
|
662
|
+
count: 0,
|
|
663
|
+
average: 0,
|
|
664
|
+
reviewCount: 0
|
|
665
|
+
},
|
|
666
|
+
flags: {
|
|
667
|
+
hasChildren: false,
|
|
668
|
+
hasVariants: false,
|
|
669
|
+
hasOptions: true
|
|
670
|
+
},
|
|
671
|
+
featuredImageBaseUrl: 'https://img-cdn.shopgate.com/30187/1/5470e69c84493a2e1eb9360fef3b0b1e545a69d7ebf67d86d8f245c130ed5994',
|
|
672
|
+
featuredImageUrl: 'https://img-cdn.shopgate.com/30187/1/5470e69c84493a2e1eb9360fef3b0b1e545a69d7ebf67d86d8f245c130ed5994',
|
|
673
|
+
price: {
|
|
674
|
+
currency: 'EUR',
|
|
675
|
+
info: '',
|
|
676
|
+
unitPrice: 10.54,
|
|
677
|
+
unitPriceStriked: 0,
|
|
678
|
+
unitPriceMin: 11.54,
|
|
679
|
+
unitPriceNet: 8.85,
|
|
680
|
+
unitPriceWithTax: 10.54,
|
|
681
|
+
taxAmount: 1.69,
|
|
682
|
+
taxPercent: 19,
|
|
683
|
+
msrp: 0,
|
|
684
|
+
tiers: [],
|
|
685
|
+
unitPriceMax: 1000
|
|
686
|
+
},
|
|
687
|
+
liveshoppings: [],
|
|
688
|
+
highlight: false,
|
|
689
|
+
availability: {
|
|
690
|
+
text: 'Available_Text',
|
|
691
|
+
state: 'ok'
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
SG79: {
|
|
696
|
+
isFetching: false,
|
|
697
|
+
expires: 1497436425368,
|
|
698
|
+
productData: {
|
|
699
|
+
id: 'SG79',
|
|
700
|
+
name: 'Kindprodukt 5 mit Optionen',
|
|
701
|
+
manufacturer: 'MANUFACTURER',
|
|
702
|
+
identifiers: {
|
|
703
|
+
sku: 'item_number_public-79',
|
|
704
|
+
mpn: 'manufacturer_item_number-79'
|
|
705
|
+
},
|
|
706
|
+
ageRating: 0,
|
|
707
|
+
stock: {
|
|
708
|
+
ignoreQuantity: false,
|
|
709
|
+
quantity: 100,
|
|
710
|
+
info: 'Available_Text',
|
|
711
|
+
orderable: true,
|
|
712
|
+
minOrderQuantity: 0,
|
|
713
|
+
maxOrderQuantity: 0
|
|
714
|
+
},
|
|
715
|
+
rating: {
|
|
716
|
+
count: 0,
|
|
717
|
+
average: 0,
|
|
718
|
+
reviewCount: 0
|
|
719
|
+
},
|
|
720
|
+
flags: {
|
|
721
|
+
hasChildren: false,
|
|
722
|
+
hasVariants: false,
|
|
723
|
+
hasOptions: true
|
|
724
|
+
},
|
|
725
|
+
featuredImageBaseUrl: 'https://img-cdn.shopgate.com/30187/1/fa8f6a39cafe657d578ebe45a0dbbfbfe4884df834adf718db84fd256fbdcf79',
|
|
726
|
+
featuredImageUrl: 'https://img-cdn.shopgate.com/30187/1/fa8f6a39cafe657d578ebe45a0dbbfbfe4884df834adf718db84fd256fbdcf79',
|
|
727
|
+
price: {
|
|
728
|
+
currency: 'EUR',
|
|
729
|
+
info: '',
|
|
730
|
+
unitPrice: 10.55,
|
|
731
|
+
unitPriceStriked: 0,
|
|
732
|
+
unitPriceMin: 11.55,
|
|
733
|
+
unitPriceNet: 8.86,
|
|
734
|
+
unitPriceWithTax: 10.55,
|
|
735
|
+
taxAmount: 1.69,
|
|
736
|
+
taxPercent: 19,
|
|
737
|
+
msrp: 0,
|
|
738
|
+
tiers: [],
|
|
739
|
+
unitPriceMax: 1000
|
|
740
|
+
},
|
|
741
|
+
liveshoppings: [],
|
|
742
|
+
highlight: false,
|
|
743
|
+
availability: {
|
|
744
|
+
text: 'Available_Text',
|
|
745
|
+
state: 'ok'
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
SG76: {
|
|
750
|
+
isFetching: false,
|
|
751
|
+
expires: 1497436434262,
|
|
752
|
+
productData: {
|
|
753
|
+
id: 'SG76',
|
|
754
|
+
name: 'Kindprodukt 2 mit Optionen',
|
|
755
|
+
manufacturer: 'MANUFACTURER',
|
|
756
|
+
identifiers: {
|
|
757
|
+
sku: 'item_number_public-76',
|
|
758
|
+
mpn: 'manufacturer_item_number-76'
|
|
759
|
+
},
|
|
760
|
+
ageRating: 0,
|
|
761
|
+
stock: {
|
|
762
|
+
ignoreQuantity: false,
|
|
763
|
+
quantity: 100,
|
|
764
|
+
info: 'Available_Text',
|
|
765
|
+
orderable: true,
|
|
766
|
+
minOrderQuantity: 0,
|
|
767
|
+
maxOrderQuantity: 0
|
|
768
|
+
},
|
|
769
|
+
rating: {
|
|
770
|
+
count: 0,
|
|
771
|
+
average: 0,
|
|
772
|
+
reviewCount: 0
|
|
773
|
+
},
|
|
774
|
+
flags: {
|
|
775
|
+
hasChildren: false,
|
|
776
|
+
hasVariants: false,
|
|
777
|
+
hasOptions: true
|
|
778
|
+
},
|
|
779
|
+
featuredImageBaseUrl: 'https://img-cdn.shopgate.com/30187/1/4720d364278292d92451f615c8350bbc26bdb5ea8b06e5cc9b9bb8ef3a964b0d',
|
|
780
|
+
featuredImageUrl: 'https://img-cdn.shopgate.com/30187/1/4720d364278292d92451f615c8350bbc26bdb5ea8b06e5cc9b9bb8ef3a964b0d',
|
|
781
|
+
price: {
|
|
782
|
+
currency: 'EUR',
|
|
783
|
+
info: '',
|
|
784
|
+
unitPrice: 10.52,
|
|
785
|
+
unitPriceStriked: 0,
|
|
786
|
+
unitPriceMin: 11.52,
|
|
787
|
+
unitPriceNet: 8.84,
|
|
788
|
+
unitPriceWithTax: 10.52,
|
|
789
|
+
taxAmount: 1.68,
|
|
790
|
+
taxPercent: 19,
|
|
791
|
+
msrp: 0,
|
|
792
|
+
tiers: [],
|
|
793
|
+
unitPriceMax: 1000
|
|
794
|
+
},
|
|
795
|
+
liveshoppings: [],
|
|
796
|
+
highlight: false,
|
|
797
|
+
availability: {
|
|
798
|
+
text: 'Available_Text',
|
|
799
|
+
state: 'ok'
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
variantsByProductId: {
|
|
805
|
+
SG74: {
|
|
806
|
+
isFetching: false,
|
|
807
|
+
expires: 1497436381810,
|
|
808
|
+
variants: {
|
|
809
|
+
products: [{
|
|
810
|
+
id: 'SG79',
|
|
811
|
+
hasOptions: true,
|
|
812
|
+
characteristics: {
|
|
813
|
+
1: '1'
|
|
814
|
+
}
|
|
815
|
+
}, {
|
|
816
|
+
id: 'SG78',
|
|
817
|
+
hasOptions: true,
|
|
818
|
+
characteristics: {
|
|
819
|
+
1: '2'
|
|
820
|
+
}
|
|
821
|
+
}, {
|
|
822
|
+
id: 'SG77',
|
|
823
|
+
hasOptions: true,
|
|
824
|
+
characteristics: {
|
|
825
|
+
1: '3'
|
|
826
|
+
}
|
|
827
|
+
}, {
|
|
828
|
+
id: 'SG76',
|
|
829
|
+
hasOptions: true,
|
|
830
|
+
characteristics: {
|
|
831
|
+
1: '4'
|
|
832
|
+
}
|
|
833
|
+
}, {
|
|
834
|
+
id: 'SG75',
|
|
835
|
+
hasOptions: true,
|
|
836
|
+
characteristics: {
|
|
837
|
+
1: '5'
|
|
838
|
+
}
|
|
839
|
+
}],
|
|
840
|
+
characteristics: [{
|
|
841
|
+
id: '1',
|
|
842
|
+
label: 'attribut1',
|
|
843
|
+
values: [{
|
|
844
|
+
id: '5',
|
|
845
|
+
label: 'attribut1_1'
|
|
846
|
+
}, {
|
|
847
|
+
id: '4',
|
|
848
|
+
label: 'attribut1_2'
|
|
849
|
+
}, {
|
|
850
|
+
id: '3',
|
|
851
|
+
label: 'attribut1_3'
|
|
852
|
+
}, {
|
|
853
|
+
id: '2',
|
|
854
|
+
label: 'attribut1_4'
|
|
855
|
+
}, {
|
|
856
|
+
id: '1',
|
|
857
|
+
label: 'attribut1_5'
|
|
858
|
+
}]
|
|
859
|
+
}]
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
optionsByProductId: {
|
|
864
|
+
SG75: {
|
|
865
|
+
isFetching: false,
|
|
866
|
+
expires: 1497436387244,
|
|
867
|
+
options: [{
|
|
868
|
+
id: '1',
|
|
869
|
+
type: 'select',
|
|
870
|
+
label: 'Option 1',
|
|
871
|
+
values: [{
|
|
872
|
+
id: '5',
|
|
873
|
+
label: 'Value5',
|
|
874
|
+
unitPriceModifier: 5
|
|
875
|
+
}, {
|
|
876
|
+
id: '4',
|
|
877
|
+
label: 'Value4',
|
|
878
|
+
unitPriceModifier: 4
|
|
879
|
+
}, {
|
|
880
|
+
id: '3',
|
|
881
|
+
label: 'Value3',
|
|
882
|
+
unitPriceModifier: 3
|
|
883
|
+
}, {
|
|
884
|
+
id: '2',
|
|
885
|
+
label: 'Value2',
|
|
886
|
+
unitPriceModifier: 2
|
|
887
|
+
}, {
|
|
888
|
+
id: '1',
|
|
889
|
+
label: 'Value1',
|
|
890
|
+
unitPriceModifier: 1
|
|
891
|
+
}]
|
|
892
|
+
}]
|
|
893
|
+
},
|
|
894
|
+
SG78: {
|
|
895
|
+
isFetching: false,
|
|
896
|
+
expires: 1497436396627,
|
|
897
|
+
options: [{
|
|
898
|
+
id: '1',
|
|
899
|
+
type: 'select',
|
|
900
|
+
label: 'Option 1',
|
|
901
|
+
values: [{
|
|
902
|
+
id: '5',
|
|
903
|
+
label: 'Value5',
|
|
904
|
+
unitPriceModifier: 5
|
|
905
|
+
}, {
|
|
906
|
+
id: '4',
|
|
907
|
+
label: 'Value4',
|
|
908
|
+
unitPriceModifier: 4
|
|
909
|
+
}, {
|
|
910
|
+
id: '3',
|
|
911
|
+
label: 'Value3',
|
|
912
|
+
unitPriceModifier: 3
|
|
913
|
+
}, {
|
|
914
|
+
id: '2',
|
|
915
|
+
label: 'Value2',
|
|
916
|
+
unitPriceModifier: 2
|
|
917
|
+
}, {
|
|
918
|
+
id: '1',
|
|
919
|
+
label: 'Value1',
|
|
920
|
+
unitPriceModifier: 1
|
|
921
|
+
}]
|
|
922
|
+
}]
|
|
923
|
+
},
|
|
924
|
+
SG79: {
|
|
925
|
+
isFetching: false,
|
|
926
|
+
expires: 1497436425568,
|
|
927
|
+
options: [{
|
|
928
|
+
id: '1',
|
|
929
|
+
type: 'select',
|
|
930
|
+
label: 'Option 1',
|
|
931
|
+
values: [{
|
|
932
|
+
id: '5',
|
|
933
|
+
label: 'Value5',
|
|
934
|
+
unitPriceModifier: 5
|
|
935
|
+
}, {
|
|
936
|
+
id: '4',
|
|
937
|
+
label: 'Value4',
|
|
938
|
+
unitPriceModifier: 4
|
|
939
|
+
}, {
|
|
940
|
+
id: '3',
|
|
941
|
+
label: 'Value3',
|
|
942
|
+
unitPriceModifier: 3
|
|
943
|
+
}, {
|
|
944
|
+
id: '2',
|
|
945
|
+
label: 'Value2',
|
|
946
|
+
unitPriceModifier: 2
|
|
947
|
+
}, {
|
|
948
|
+
id: '1',
|
|
949
|
+
label: 'Value1',
|
|
950
|
+
unitPriceModifier: 1
|
|
951
|
+
}]
|
|
952
|
+
}]
|
|
953
|
+
},
|
|
954
|
+
SG76: {
|
|
955
|
+
isFetching: false,
|
|
956
|
+
expires: 1497436434474,
|
|
957
|
+
options: [{
|
|
958
|
+
id: '1',
|
|
959
|
+
type: 'select',
|
|
960
|
+
label: 'Option 1',
|
|
961
|
+
values: [{
|
|
962
|
+
id: '5',
|
|
963
|
+
label: 'Value5',
|
|
964
|
+
unitPriceModifier: 5
|
|
965
|
+
}, {
|
|
966
|
+
id: '4',
|
|
967
|
+
label: 'Value4',
|
|
968
|
+
unitPriceModifier: 4
|
|
969
|
+
}, {
|
|
970
|
+
id: '3',
|
|
971
|
+
label: 'Value3',
|
|
972
|
+
unitPriceModifier: 3
|
|
973
|
+
}, {
|
|
974
|
+
id: '2',
|
|
975
|
+
label: 'Value2',
|
|
976
|
+
unitPriceModifier: 2
|
|
977
|
+
}, {
|
|
978
|
+
id: '1',
|
|
979
|
+
label: 'Value1',
|
|
980
|
+
unitPriceModifier: 1
|
|
981
|
+
}]
|
|
982
|
+
}]
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
};
|
|
987
|
+
|
|
988
|
+
/**
|
|
2
989
|
* @param {string} id The product ID.
|
|
3
990
|
* @return {Object}
|
|
4
|
-
*/
|
|
991
|
+
*/
|
|
992
|
+
const getShippingStateForId = id => ({
|
|
993
|
+
shippingByProductId: {
|
|
994
|
+
[id]: {
|
|
995
|
+
isFetching: false,
|
|
996
|
+
expires: 9999999999999,
|
|
997
|
+
shipping: {
|
|
998
|
+
currency: 'USD',
|
|
999
|
+
price: 3.5
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
});
|
|
1004
|
+
export { mockedProducts, initialState, basicProductState, getShippingStateForId, productRouteMock, productWithOneOption, productWithSelectedOptions, productWithVariants, productWithSelectedVariant, productWithVariantsAndOptions };
|