Although Simple Commerce has been built to primarily support Antlers, you can pretty easily use its Antlers Tags in Blade.

If you're using Blade, I'm guessing you've already seen Statamic's Blade documentation.

Using Tags in Blade

For some of Simple Commerce's tags which just return text (like {{ sc:cart:grandTotal }}), you can use it like this in your Blade view:

1{{ Statamic::tag('sc:cart:grandTotal') }}

If you need to pass parameters to tags, you can provide the param parameter.

1{{ Statamic::tag('sc:cart:update')->param('redirect', '/checkout') }}

Simple Commerce includes a concept of "form tags" which work slightly differently in Blade.

Instead of an HTML <form> being constructed & output for you, you need to construct the <form> yourself. Thankfully, it's easy to do:

2$form = Statamic::tag('sc:cart:addItem')->params([
3 'redirect' => '/cart',
7<form {!! $form['attrs_html'] !!}>
8 {!! $form['params_html'] !!}
10 <input type="hidden" name="product" value="{{ $id }}" />
11 <input type="text" name="quantity" value="1" />
12 <button>Add to Cart</button>

The above example is using the {{ sc:cart:addItem }} form.

You simply use the {!! $form['attrs_html'] !!} in the <form> tag (this adds the action and method attributes).

Then, somewhere inside the form, add the hidden parameters with {!! $form['params_html'] !!}.