vtex-apps / product-price

The Product Price app exports blocks related to the product price, such as list price, selling price, and savings.
9 stars 27 forks source link

SeelingPriceWithTax returns NaN in category page #27

Closed doruradu closed 4 years ago

doruradu commented 4 years ago

Hi! I've added bellow details about what (I think) is a bug.

Describe the bug Once we set "{sellingPriceWithTax}" for the selling price in the admin, the component returns NaN in category page.

To Reproduce Set selling price to {sellingPriceWithTax} in the admin, then go to a category page.

Expected behavior Should return the Selling Price with tax, as it does in the product page

Screenshots

image

Additional context You can see it "in action" here: https://golive--dacris.myvtex.com/admin/cms/site-editor/articole-de-birou/organizare-si-arhivare/bibliorafturi

Here's the code used:

Thank you!

 "product-summary.shelf#produseCategorie": {
    "children": [
      "flex-layout.col#produseCategorieTop",
      "flex-layout.col#produseCategorieBottom"
    ],
    "props": {
      "blockClass": "containerProdusCategorie"
    }
  },
  "flex-layout.col#produseCategorieTop": {
    "children": [
      "product-summary-image",
      "product-specification-badges",
      "product-summary-name#numeProdus"
    ],
    "props": {
      "width": "100%",
      "preventVerticalStretch": true
    }
  },
  "product-summary-name#numeProdus": {
    "props": {
      "blockClass": "numeProdusCategorie"
    }
  },
  "flex-layout.col#produseCategorieBottom": {
    "children": [
      "flex-layout.row#price-container",
      "product-selling-price#pret-fara-tva-shelf",
      "product-summary-sku-selector#skuCategorie",
      "add-to-cart-button"
    ],
    "props": {
      "width": "100%",
      "preventVerticalStretch": true,
      "verticalAlign": "bottom"
    }
  },
  "flex-layout.row#price-container":{
    "children":[
      "product-list-price#pret-intreg-shelf",
      "product-selling-price#pret-redus-shelf"
    ],
    "props":{
      "colSizing":"auto",
      "marginTop":4,
      "marginBottom":0,
      "preventHorizontalStretch":true,
      "colGap":0,
      "blockClass":"priceContainerCategory"
    }
  },
  "product-selling-price#pret-redus-shelf": {
    "props": {
      "markers": [
        "listPriceValue"
      ],
      "blockClass":"pretRedusShelf"
    }
  },
  "product-selling-price#pret-fara-tva-shelf": {
    "props": {
      "markers": [
        "listPriceValue"
      ],
      "blockClass":"pretFaraTvaShelf"
    }
  },
  "product-list-price#pret-intreg-shelf": {
    "props": {
      "markers": [
        "sellingPriceValue"
      ],
      "blockClass":"pretIntregShelf"
    }
  },
iaronaraujo commented 4 years ago

Hi! This will be implemented when this is merged https://github.com/vtex-apps/store-resources/pull/120 !

doruradu commented 4 years ago

Thank you!

iaronaraujo commented 4 years ago

Done @doruradu !