jonassiewertsen / statamic-butik

"Butik" is a Scandinavian term for a small and medium-sized shop. Exactly what this Statamic addon has been crafted for.
43 stars 13 forks source link

Add Information to include livewire scripts into layout. #235

Closed Oleafeon closed 3 years ago

Oleafeon commented 3 years ago

Describe the bug

i have a problem that when i setup the buttons via

<button wire:click="add()" class="btn btn-shop">
    <i class="fas fa-shopping-cart"></i> {{ 'butik::web.add_to_bag' | trans }}
</button>

or even {{ livewire:butik.add-to-cart slug="{{ slug }}" }} the button not work it wont place my items in the cart

Oleafeon commented 3 years ago

this is fixed i had to include {{ livewire:scripts }} in layout

jonassiewertsen commented 3 years ago

As it does work with Livewire, you need to include the livewire scripts.

Glad you got it working already!

Oleafeon commented 3 years ago

Maybe you should include it in the docs 😄

jonassiewertsen commented 3 years ago

I thought I already had, but it's missing.

I will add it.

jonassiewertsen commented 3 years ago

Thanks for letting me know @Oleafeon

It might not be perfect but should help clearing things up. Let me know if something else is missing.

https://www.butik.dev/frontend/livewire