Context
We are developing an app that uses app blocks (theme app extensions). It adds a checkbox to the product form that sets a line item property.
## Overview of the issue
The dynamic checkout buttons no longer correctly apply line item properties. It was working correctly until sometime in the past few months. Specifically we have been testing the “unbranded” dynamic checkout button.
In the compatibility section, there is no mention that the dynamic checkout buttons do not support line item properties. This, along with the fact that it used to work (plus some technical details I’ll get into below), leads me to believe this is a bug.
### How we expect it to work
We expect line item properties to be applied and visible on the checkout page after using the “unbranded” dynamic checkout button.
Specifically, when the form contains an input such as the following (ref this thread)
{%- form 'product' -%}
{{ form | payment_button }}
{%- endform -%}
We would expect the product in checkout to display the properties “foo: bar” as below:
### How it actually works
The above code does not apply the line item properties as expected. Interestingly, however, it does pass through the data!
Upon clicking the “unbranded” dynamic checkout button we are redirected as follows:
`https://${shopDomain}/cart/${variantId}:${quantity}?properties=${propertiesString}`
The interesting part is that the line item properties are in fact passed through. Specifically here is how they are encoded:
// 1. All inputs with a key that matches `properties[
This /cart/ endpoint appears to be a [checkout link](https://help.shopify.com/en/manual/products/details/checkout-link#construct-manual-checkout-link). Checkout links do not mention this properties query parameter at all, they do forward it to the checkout however.
So, finally we end up at the following checkout url:
```javascript
`https://${shopDomain}/${shopId?}/checkouts/${checkoutId}?properties=${propertiesString}`
## Outcomes
We are hoping for clarification and one of two outcomes:
-
Clarify that line item properties are not supported by dynamic checkout buttons (and note that in the compatibility section of the docs)
-
Clarify that this behaviour is a bug and will be fixed at some time in the future
## Notes
We have spoken to support about this issue, and they directed us to post in this section of the forum.
We are aware that we can work around this issue in a few ways. However they would all slow down the customers checkout experience and increase complexity. This would be the simplest solution.
Other threads:
- https://community.shopify.com/topic/1488925
- https://community.shopify.com/c/shopify-discussions/dynamic-checkout-and-line-item-properties/m-p/1396024/highlight/true#M268450
- https://community.shopify.com/c/shopify-discussions/dynamic-checkout-and-line-item-properties/m-p/1396024/highlight/true#M268450
- https://community.shopify.com/topic/1490606
