@@ -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 {