Attachment Indicator

Renders a message on a minicart product item when the product has an attachment.

capture

Configuration

attachment-indicator props

Prop name
Type
Description
Default value

name

string

Name (can be partial) of attachment whose message will be rendered

undefined

markers

[string]

IDs of your choosing to identify the block's rendered message and customize it using the admin's Site Editor. Learn how to use them accessing the documentation on Using the Markers prop to customize a block's message. Notice the following: a block's message can also be customized in the Store Theme source code using the message prop.

[]

message

[string]

Defines the block's default text i.e. the block message.

"{name} - {price}"

message prop variables

Message variable
Type
Description

name

string

Name of attachment

price

Element

Price of the attachment

Usage

{
  ...

  "container#minicart-product-description": {
		"props": {
			"blockClass": "minicart-product-description"
		},
		"children": [
			"vtex.product-list:product-name",
			"attachment-indicator",
			"price"
		]
	},

	"attachment-indicator": {
		"props": {
			"name": "Personalizado",
			"message": "Personalizado Bebê Panda {price}"
		}
	},

  ...
}

Last updated