Skip to content

Commit

Permalink
Add review feature and disable it for BC stores
Browse files Browse the repository at this point in the history
  • Loading branch information
powerwlsl committed Aug 10, 2022
1 parent 87134e2 commit c43a954
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 17 deletions.
3 changes: 2 additions & 1 deletion packages/bigcommerce/src/commerce.config.json
Expand Up @@ -2,6 +2,7 @@
"provider": "bigcommerce",
"features": {
"wishlist": true,
"customerAuth": true
"customerAuth": true,
"review": false
}
}
3 changes: 2 additions & 1 deletion packages/commercejs/src/commerce.config.json
Expand Up @@ -5,6 +5,7 @@
"search": true,
"customCheckout": true,
"customerAuth": true,
"wishlist": false
"wishlist": false,
"review": true
}
}
5 changes: 3 additions & 2 deletions packages/kibocommerce/src/commerce.config.json
Expand Up @@ -4,6 +4,7 @@
"wishlist": true,
"cart": true,
"search": true,
"customerAuth": true
"customerAuth": true,
"review": true
}
}
}
3 changes: 2 additions & 1 deletion packages/local/src/commerce.config.json
Expand Up @@ -5,6 +5,7 @@
"cart": false,
"search": false,
"customerAuth": false,
"customCheckout": false
"customCheckout": false,
"review": true
}
}
3 changes: 2 additions & 1 deletion packages/ordercloud/src/commerce.config.json
Expand Up @@ -5,6 +5,7 @@
"cart": true,
"search": true,
"customerAuth": false,
"customCheckout": true
"customCheckout": true,
"review": true
}
}
3 changes: 2 additions & 1 deletion packages/saleor/src/commerce.config.json
@@ -1,6 +1,7 @@
{
"provider": "saleor",
"features": {
"wishlist": false
"wishlist": false,
"review": true
}
}
3 changes: 2 additions & 1 deletion packages/sfcc/src/commerce.config.json
Expand Up @@ -5,6 +5,7 @@
"cart": false,
"search": true,
"customerAuth": false,
"customCheckout": false
"customCheckout": false,
"review": true
}
}
3 changes: 2 additions & 1 deletion packages/shopify/src/commerce.config.json
Expand Up @@ -2,6 +2,7 @@
"provider": "shopify",
"features": {
"wishlist": false,
"customerAuth": true
"customerAuth": true,
"review": true
}
}
3 changes: 2 additions & 1 deletion packages/spree/src/commerce.config.json
Expand Up @@ -5,6 +5,7 @@
"cart": true,
"search": true,
"customerAuth": true,
"customCheckout": false
"customCheckout": false,
"review": true
}
}
3 changes: 2 additions & 1 deletion packages/swell/src/commerce.config.json
@@ -1,6 +1,7 @@
{
"provider": "swell",
"features": {
"wishlist": false
"wishlist": false,
"review": true
}
}
3 changes: 2 additions & 1 deletion packages/vendure/src/commerce.config.json
@@ -1,6 +1,7 @@
{
"provider": "vendure",
"features": {
"wishlist": false
"wishlist": false,
"review": true
}
}
3 changes: 2 additions & 1 deletion site/commerce.config.json
Expand Up @@ -4,6 +4,7 @@
"search": true,
"wishlist": false,
"customerAuth": false,
"customCheckout": false
"customCheckout": false,
"review": true
}
}
10 changes: 6 additions & 4 deletions site/components/product/ProductSidebar/ProductSidebar.tsx
Expand Up @@ -52,10 +52,12 @@ const ProductSidebar: FC<ProductSidebarProps> = ({ product, className }) => {
className="pb-4 break-words w-full max-w-xl"
html={product.descriptionHtml || product.description}
/>
<div className="flex flex-row justify-between items-center">
<Rating value={4} />
<div className="text-accent-6 pr-1 font-medium text-sm">36 reviews</div>
</div>
{process.env.COMMERCE_REVIEW_ENABLED && (
<div className="flex flex-row justify-between items-center">
<Rating value={4} />
<div className="text-accent-6 pr-1 font-medium text-sm">36 reviews</div>
</div>
)}
<div>
{process.env.COMMERCE_CART_ENABLED && (
<Button
Expand Down

0 comments on commit c43a954

Please sign in to comment.