Skip to content
This repository was archived by the owner on Oct 20, 2023. It is now read-only.
This repository was archived by the owner on Oct 20, 2023. It is now read-only.

theme-product-form doesn't work with some third party apps #135

@thebiggianthead

Description

@thebiggianthead

In the theme-product-form _onSubmit function, there is a call to the _setIdInputValue function:

this._setIdInputValue(event.dataset.variant.id);

This finds the input with the name="id" and changes the value to the selected variant ID. For some third parties, eg. Recharge, this is incompatible with how they work (in the case of Recharge, the default input is replaced with an alternative to add a different product to cart). This means the replacement input is incorrectly assigned a value which doesn't exist, resulting in an add to cart error.

It seems to me that re-setting the value of this input here is quite opinionated and doesn't allow for some adjustments to behaviour that might be quite legitimate.

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