Or simply try it as getProduct in the Wix API Reference.
https://www.wix.com/corvid/reference/$w.ProductPage.html#getProduct
Examples
Get the current product’s information
$w('#myProductPage').getProduct()
.then( (product) => {
let productName = product.name;
let productDescription = product.description;
// see example product object below
} )
.catch( (error) => {
console.log(error);
} );
/*
* Example product object:
*
* {
* "_id": "3fb6a3c8-988b-8755-04bd-5c59ae0b18ea",
* "_updatedDate: "2020-1-26T11:24:25.607Z"
* "name": "Product Name",
* "description": "Product description",
* "mainMedia": "wix:image://v1/a...3.jpg/file.jpg#originWidth=1000&originHeight=1000",
* "mediaItems": [
* {
* "id": "a...3.jpg",
* "src": "wix:image://v1/a...3.jpg/file.jpg#originWidth=1000&originHeight=1000",
* "description": "Media desc",
* "title": "Media title",
* "type": "Image"
* }
* ],
* "sku": "36523641234523",
* "ribbons": [
* {
* "text": "New and Improved"
* }
* ],
* "currency": "USD",
* "price": 15,
* "discountedPrice": 12,
* "formattedPrice": "$15.00",
* "formattedDiscountedPrice": "$12.00",
* "discount": {
* "type": "PERCENT",
* "value" :20
* },
* "trackInventory": true,
* "inStock": true,
* "quantityInStock": "100",
* "additionalInfoSections": [
* {
* "title": "Product info",
* "description": "Product detail."
* }
* ],
* "productOptions": {
* "Size": {
* "optionType": "drop_down",
* "name": "Size",
* "choices": [
* {
* "value": "Small",
* "description": "Small",
* "inStock": true,
* "visible": true
* },
* {
* "value": "Large",
* "description": "Large",
* "inStock": true,
* "visible": true
* }
* ]
* },
* "productPageUrl": "/product-page/i-m-a-product",
* "manageVariants": true,
* "customTextFields": [
* {
* "title": "New Custom Text",
* "maxLength": 500,
* "mandatory": true
* }
* ],
* "productType": "physical",
* "slug": "my-product",
* "weight": 10,
* "variants": [
* {
* "_id":"00000000-0000-0020-0005-97ae39161f00",
* "choices": {
* "Size": "Small"
* },
* "variant": {
* "currency": "USD",
* "price": 15,
* "discountedPrice": 12,
* "formattedPrice": "$15.00",
* "formattedDiscountedPrice":"$12.00",
* "weight":10,
* "sku":"217537123517253",
* "visible":true
* }
* }, {
* "_id":"00000000-0000-0021-0005-97ae39161f00",
* "choices": {
* "Size": "Large"
* },
* "variant": {
* "currency": "USD",
* "price": 15,
* "discountedPrice": 15,
* "formattedPrice": "$15.00",
* "formattedDiscountedPrice":"$15.00",
* "weight":12,
* "sku":"217537123517253",
* "visible":true
* }
* }
* ]
*/