App Bridge POS - Price Override Issue

Highlighted

The new price override feature in POS has introduced a bug in POS App Bridge Cart methods. Essentially, there is now no way to tll if the cart line item has been discounted by a flat amount or by a price override, and the amount send is not consistant. 

Here is an example of the JSON returned for a $5 flower line item with a flat $1 discount applied:

 

  {
    "subtotal": "4",
    "taxTotal": "0.52",
    "grandTotal": "4.52",
    "lineItems": [
      {
        "quantity": 1,
        "discount": {
          "amount": 1,
          "type": "flat",
          "discountDescription": "Discount"
        },
        "taxLines": [
          {
            "price": "0.52",
            "title": "HST",
            "rate": "0.13"
          }
        ],
        "taxable": true,
        "variantId": 31120767320115,
        "title": "Fresh Cut Flowers",
        "price": 5,
        "productId": 4334593212467,
        "vendor": "None",
        "grams": 0,
        "variantTitle": "$5",
        "requiresShipping": false
      }
    ]
  }
]

 

This looks good and normal. The next example though is a price override of $2 on that same $5 product:

 

[
  {
    "subtotal": "2",
    "taxTotal": "0.26",
    "grandTotal": "2.26",
    "lineItems": [
      {
        "quantity": 1,
        "discount": {
          "amount": 2,
          "type": "flat",
          "discountDescription": "Discount"
        },
        "taxLines": [
          {
            "price": "0.26",
            "title": "HST",
            "rate": "0.13"
          }
        ],
        "taxable": true,
        "variantId": 31120767320115,
        "title": "Fresh Cut Flowers",
        "price": 5,
        "productId": 4334593212467,
        "vendor": "None",
        "grams": 0,
        "variantTitle": "$5",
        "requiresShipping": false
      }
    ]
  }
]

 

Now you can go about this and find a solution by looking at the line item price and the discount price, if they are equal then it was a price reduction, but overall this really should be resolved to either:

1. Introduce a new type of discount called "price_override" or 

2. Set the reduction to the inverse, in this case $3 to reduce the price of the line item to the proper $2. 

There also seems to be no way to write a price override into the cart line items via app bridge as there is no new type that is supported here. Happy to assist in getting this resolved or provide further example. 

Max Sadlowski - CEO - BentoSMB - Shopify Expert
0 Likes