Add to Basket Button View Component
A prebuilt button using a form that adds a product to the Basket.
The table is unstyled and either requires styling within the partial cshtml file or using CSS.
The cshtml partial can be found at the following path:
Views -> Partials -> UmbCheckout -> _StripeAddToBasketButton.cshtml
To be able to use the Basket View Component you will need to add the following to your _ViewImports.cshtml file
@addTagHelper *, UmbCheckout.Stripe
This will allow you to use the following tag helper:
<vc:stripe-add-to-basket-button></vc:stripe-add-to-basket-button>
Alternatively, you can load the View Component without using the tag helper:
@await Component.InvokeAsync(typeof(StripeAddToBasketButtonViewComponent))
Configurable Properties
You can set the following properties
Property
Property Alias
Use
Default Value
[REQUIRED] The Umbraco product
The text shown on the button
The CSS class to be added to the button
The Guid of the Umbraco page to return to after adding to the Basket
Shows or hides the quantity input
The text shown above the quantity input
The alias which should be used for the product name
The CSS class added to the input elements
The CSS class added to the select elements
The CSS class added to the label elements
The CSS class added to the outer form element Div
The text shown above the variant select input