Enabled product bundles #4

Merged
nedimu merged 2 commits from bundle into master 2018-06-29 15:56:27 +02:00
Showing only changes of commit 10d2bdd117 - Show all commits

View File

@@ -9,29 +9,36 @@ export const Order = (props) => {
width: "50px",
height: "50px",
};
let displayedProducts = products.map(
product => {
let displayedProducts = []
if (products) {
displayedProducts = products.map(
product => {
if (product.type === "grouped"){
bundledProductId = product.id
}
let images = product.images.map(
image => {
return (
<img key={image.id.toString()} style={imageStyle} src={image.src} />
)
if (product.type === "grouped") {
bundledProductId = product.id
}
)
return (
<div key={product.id.toString()}>
{images}
{product.name}
</div>
)
}
)
let images = product.images.map(
image => {
return (
<img key={image.id.toString()} style={imageStyle} src={image.src} />
)
}
)
return (
<div key={product.id.toString()}>
{images}
{product.name}
</div>
)
}
)
}
if (!bundledProductId) {
bundledProductId = 1
}
return (
<div>