Prints the URL to which a POST request is sent to remove an activated gift card from the order.

Kuvaus

The tag only prints content if the customer has activated a gift card. The tag works in a gift card listing created using the {CartGiftCards} tag.

You can use the tag to implement the gift card delete button in the gift card listing yourself.

You can print a ready-made delete button using the {GiftCardRemoveButton} tag.

Syntaksi

{GiftCardRemoveUrl}

Näkyvyys

Toimii näkyvyydessä: globaali

The tag is used in the {CartGiftCards} tag's helper attribute.

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

before/after:

With the before and after attributes, you can define content that is output before or after the content produced by the tag.

Allowed values: text that may contain HTML and Interface markup.

E.g.

  • before: '<p>This markup appears before the tag's own content.</p>'.
  • after: '<p>This appears after the tag's own content.</p>'

If the tag does not produce any content, the content of the before and after attributes will also not be displayed.

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: text that may contain HTML and Interface markup.

E.g. or:'Content not found.'