The setting file in snipcart\products-module\resources is 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:

Last but not least, in ProductPResenter class, I got errors when I pressed the productBuy button, in the example ( 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' attribute
I am not 100% if it is the right solution but it can be fixed replacing the array to:

array_merge($attributes, [
‘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 data-item-id & data-item-sku lines.


Written by

Competitive, entrepreneur and autodidact. Hard worker, lover of technology and free software.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store