Skip to content

Use Cart API with Custom One-Time items (like Checkout Twig tag) #404

Open
@rogerdawkins

Description

Description

When using the Checkout Twig tag it is possible to specify Custom One-Time items instead of using a price ID. This is great, but I need to allow the user to add multiple custom items and ideally I would like to use the Cart API, but it appears that the Cart API only supports price ID's and not custom items.

Is it possible to use the Cart API with custom items? If not, would you consider this in the future?

My alternative options are:

  1. Implement my own Cart facility using Local Storage or similar. Then process the Cart items using the Checkout Twig tag.
  2. Display the items on one page and allow the user to select the required items. Then one pay button which again uses the Checkout Twig tag.
  3. Use the Cart API as is, which requires all items to be added as Stripe products. The reason NOT to do this in our case is that the website has lots of courses and lots of course dates and each would need to be a product in Stripe.

Are there any other suggestions to get custom items working with the Cart API?

Additional info

  • Craft version: 5
  • PHP version: 8.2
  • Database driver & version:
  • Plugin version:
  • Is SCA and Stripe Checkout enabled?:

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions