Skip to content

Discount list should be per cart line item id, not (just) per variant ID #146

@mariusa

Description

@mariusa

The same variant ID can be in cart on multiple lines, with different attributes. But Shopify functions output requires to specify a variant ID instead of cart line item id:

"targets": [
        {
          "productVariant": {
            "id": "gid://shopify/ProductVariant/1"
          }
        }
      ],

To keep compatibility, another target type could be added (eg cartLineItem), besides productVariant.

Also requested by other partners on forums, ignored by Shopify: https://community.shopify.com/c/shopify-functions/feature-request-add-ability-to-discount-a-specific-cart-line/td-p/1801254

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions