Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions