diff --git a/components/Product/SingleProduct.component.jsx b/components/Product/SingleProduct.component.jsx index 3ab6bac73..f47585b89 100644 --- a/components/Product/SingleProduct.component.jsx +++ b/components/Product/SingleProduct.component.jsx @@ -3,7 +3,7 @@ import { useState, useEffect } from 'react'; import AddToCartButton from 'components/Cart/AddToCartButton.component'; import LoadingSpinner from 'components/LoadingSpinner/LoadingSpinner.component'; -import WOO_CONFIG from 'utils/config/nextConfig'; +import WOO_CONFIG from 'utils/config/nextConfig'; /** * Shows a single product with an Add To Cart button. @@ -58,7 +58,6 @@ const SingleProduct = ({ product }) => { src={WOO_CONFIG.PLACEHOLDER_LARGE_IMAGE_URL} /> )} -

{name}


@@ -110,7 +109,7 @@ const SingleProduct = ({ product }) => { )}
{ - // Display default AddToCart button if we dont have variations. If we do, send the variationId to AddToCart button + // Display default AddToCart button if we do not have variations. If we do, send the variationId to AddToCart button } {product.variations ? ( diff --git a/package-lock.json b/package-lock.json index f5003236b..8533b38bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nextjs-woocommerce", - "version": "1.0.11", + "version": "1.0.12", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index de310932f..61d65e783 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nextjs-woocommerce", - "version": "1.0.11", + "version": "1.0.12", "description": "NextJS WooCommerce webshop", "main": "index.js", "scripts": { diff --git a/utils/gql/GQL_QUERIES.js b/utils/gql/GQL_QUERIES.js index 6bf089eb4..282a6a7f3 100644 --- a/utils/gql/GQL_QUERIES.js +++ b/utils/gql/GQL_QUERIES.js @@ -3,11 +3,12 @@ import { gql } from '@apollo/client'; export const GET_SINGLE_PRODUCT = gql` query Product($id: ID!) { product(id: $id, idType: DATABASE_ID) { - id - databaseId + id + databaseId averageRating slug description + onSale image { id uri @@ -17,10 +18,14 @@ export const GET_SINGLE_PRODUCT = gql` } name ... on SimpleProduct { + salePrice + regularPrice price id } ... on VariableProduct { + salePrice + regularPrice price id paColors {