Skip to content

Using tags in Blade view #790

Closed Answered by duncanmcclean
ajcsilva asked this question in Help
Jan 25, 2023 · 3 comments · 2 replies
Discussion options

You must be logged in to vote

Hey!

I don't have much experience with Blade & Statamic but from what I can tell from the documentation & from a brief conversion on Discord is that you can't use any of Simple Commerce's "form tags" in Blade because they need to have 'content' inside them (for example: the HTML that goes in the middle of the start & end tags)

{{ sc:cart:addItem }}
  <input type="hidden" name="product" value="{{ id }}">
  <input type="number" name="quantity" value="2">
{{ /sc:cart:addItem }}

I've commented on an open Statamic feature request, statamic/ideas#802 as hopefully it's something that can be added in future.

Anyway, as a workaround, I think you have two options....

1. Use Antlers for the 'add to …

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ajcsilva
Comment options

You must be logged in to vote
1 reply
@duncanmcclean
Comment options

Comment options

You must be logged in to vote
1 reply
@duncanmcclean
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants