Scenario - there is an item with a promotion, if the promotion is expired but a customer has it lingering in the cart I want to prevent it’s sale.
I am running a validation that seems to block deleting items from the cart when it is in the error state. This is not ideal as I want to force a user to remove the item from the cart if they are no longer valid. Has anyone else run into this issue? (looking again it seems to block all cart modification?)
Here is some simplified example of code, it’s working as expected in terms of cart items being invalidated when the promoPhase over takes the line items date. It feels like I’m missing something bigger picture about why validation would prevent other types of interaction? Or perhaps this is a bug, but I am unsure where best to file an issue if that’s the case.
# run.graphql
query RunInput {
cart {
lines {
validTill: attribute(key: "itemEpoch") {
value # string of epoch time
}
}
validation {
promoPhase: metafield(
namespace: "foo"
key: "bah"
) {
value # string of epoch time
}
}
}
I looked into this some more and wrote a more general issue on the functions examples repo
It seems like this is a fairly serious flaw (unless I’ve misunderstood something ), any time a validation is enabled / updated it could trap users in an invalid state. That same holds true for updating any of the functions inputs that are not user triggered?