summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/components/elements/Product/cartProductsList.jsx1
-rw-r--r--src/pages/api/shop/product-detail.js2
-rw-r--r--src/pages/shop/product/[slug].jsx2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/core/components/elements/Product/cartProductsList.jsx b/src/core/components/elements/Product/cartProductsList.jsx
index 7a95f1f1..5887b425 100644
--- a/src/core/components/elements/Product/cartProductsList.jsx
+++ b/src/core/components/elements/Product/cartProductsList.jsx
@@ -15,6 +15,7 @@ const CardProdcuctsList = ({
updateQuantity = () => {},
setDeleteConfirmation = () => {}
}) => {
+
return (
<table className='table-cart'>
<thead>
diff --git a/src/pages/api/shop/product-detail.js b/src/pages/api/shop/product-detail.js
index e77ae53a..8571b623 100644
--- a/src/pages/api/shop/product-detail.js
+++ b/src/pages/api/shop/product-detail.js
@@ -10,7 +10,7 @@ export default async function handler(req, res) {
process.env.SOLR_HOST +
`/solr/variants/select?q=template_id_i:${req.query.id}&q.op=OR&indent=true&rows=100`
)
- let auth = req.query.auth
+ let auth = JSON.parse(req.query.auth)
let result = productMappingSolr(productTemplate.data.response.docs, auth || false)
result[0].variants = variantsMappingSolr(
productTemplate.data.response.docs[0],
diff --git a/src/pages/shop/product/[slug].jsx b/src/pages/shop/product/[slug].jsx
index 7351da2f..63fb2e7e 100644
--- a/src/pages/shop/product/[slug].jsx
+++ b/src/pages/shop/product/[slug].jsx
@@ -18,7 +18,7 @@ export async function getServerSideProps(context) {
const cookies = context.req.headers.cookie
const cookieObj = cookies ? cookie.parse(cookies) : {}
const auth = cookieObj.auth ? JSON.parse(cookieObj.auth) : {}
- const tier = auth.pricelist
+ const tier = auth.pricelist ? auth.pricelist : false
const authToken = auth?.token || ''
let response = await axios(