setting file in
settings.php (in plural) instead of
setting.php as the article says.
I also tried to install the
snipcart module but the js file doesn’t exist, if you paste only the suggested code, it won’t work. It needs jQuery library beyond others, I recommend to copy-paste the js file from the example: https://github.com/snipcart/laravel-pyrocms-snipcart/blob/master/resources/js_spag/addons/pyrocms/starter-theme/views/partials/scripts.twig
Last but not least, in
ProductPResenter class, I got errors when I pressed the product
Buy button, in the example (https://github.com/snipcart/laravel-pyrocms-snipcart/blob/master/addons/js_spag/snipcart/products-module/src/Product/ProductPresenter.php) is doing what the tutorial says.
I don't know if I did something wrong but when I press the button, the console log displays me an error message with the following:
This item is missing the mandatory ‘ata-item-id' attributeI am not 100% if it is the right solution but it can be fixed replacing the array to:
‘class' => $class,
‘data-item-id' => $this->object->id,
‘data-item-sku' => $this->object->sku,
‘data-item-name' => $this->object->name,
//and so on...
Notice the new