Prints the URL address to which a POST request can be sent to remove a gift card from an order.
Kuvaus
Use this tag to implement your own form for removing gift cards on the gift card listing{_>-<_}
To print a ready-to-use removal form, use the {GiftCardRemoveButton}
tag.
If the visitor hasn't entered any gift card codes, the tag won't print anything.
Syntaksi
{GiftCardRemoveUrl}
Implementing a form for removing gift cards
Below you can see how to implement a form for removing gift cards in a theme:
{CartGiftCards(
helper: {{
<form action="{GiftCardRemoveUrl}" method="post">
<button type="submit">
{%CartGiftCardRemove}
</button>
</form>
}}
)}
The gift card listing is created by using the {CartGiftCards}
tag. The <form>
element for disabling gift cards is placed in the tag's helper
attribute.
The removal URL is added to the <form>
element's action attribute, and the method="post"
attribute is defined for the form.
The text for the removal button is retrieved from the dictionary's CartGiftCardRemove item.
In this example no functions other than removal are added to the form. Use gift card tags to add desired features to the listing.
Attribuutit
after/before:
By using the
after
andbefore
attributes you can define content that is output either after or before the tag's output.Allowed values:The HTML and Interface markup
E.g.
before:
'<p>Tämä merkkaus näkyy ennen tagin omaa sisältöä.</p>'after:
'<p>Tämä taas näkyy tagin oman sisällön jälkeen.</p>'
If the tag does not produce any content, neither the content of the
after
andbefore
attributes will be output.escape:
Adds an escape character before quotation marks in the output.
The attribute makes it easier to process the tag-produced content when using JavaScript.
Allowed values:true/false. The default value is false.
or:
Defines alternative content that is displayed if the tag itself does not produce any content.
Allowed values:The HTML and Interface markup
E.g.
or:
'Sisältöä ei löytynyt.'