Error Message when trying to place the c5 snipcart product block

Permalink Browser Info Environment
The theme is custom made, are there requirements for the plugin to work?

I ask because the following Error occurs when trying to place the product block on a content area:

Undefined variable $fID

Details
.com/packages/snipcart/blocks/snipcart_product/edit.php(6): Whoops\Run->handleError
.com/packages/snipcart/blocks/snipcart_product/edit.php(6): Whoops\Exception\ErrorException->null
.com/concrete/src/Block/View/BlockView.php(382): null->include
.com/packages/snipcart/blocks/snipcart_product/add.php(3): Concrete\Core\Block\View\BlockView->inc
.com/concrete/src/Block/View/BlockView.php(269): null->include
.com/concrete/src/View/AbstractView.php(164): Concrete\Core\Block\View\BlockView->renderViewContents
.com/concrete/views/dialogs/page/add_block.php(102): Concrete\Core\View\AbstractView->render
.com/concrete/src/View/View.php(295): null->include
.com/concrete/src/View/View.php(273): Concrete\Core\View\View->renderInnerContents
.com/concrete/src/View/DialogView.php(34): Concrete\Core\View\View->renderViewContents
.com/concrete/src/View/AbstractView.php(164): Concrete\Core\View\DialogView->renderViewContents
.com/concrete/src/Routing/ControllerRouteAction.php(82): Concrete\Core\View\AbstractView->render
.com/concrete/src/Http/RouteDispatcher.php(37): Concrete\Core\Routing\ControllerRouteAction->execute
.com/concrete/src/Http/Middleware/DispatcherDelegate.php(39): Concrete\Core\Http\RouteDispatcher->dispatch
.com/concrete/src/Http/Middleware/MiddlewareStack.php(86): Concrete\Core\Http\Middleware\DispatcherDelegate->next
.com/concrete/src/Http/DefaultDispatcher.php(127): Concrete\Core\Http\Middleware\MiddlewareStack->process
.com/concrete/src/Http/DefaultDispatcher.php(60): Concrete\Core\Http\DefaultDispatcher->handleDispatch
.com/concrete/src/Http/Middleware/DispatcherDelegate.php(39): Concrete\Core\Http\DefaultDispatcher->dispatch
.com/concrete/src/Http/Middleware/FrameOptionsMiddleware.php(39): Concrete\Core\Http\Middleware\DispatcherDelegate->next
.com/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\FrameOptionsMiddleware->process
.com/concrete/src/Http/Middleware/StrictTransportSecurityMiddleware.php(36): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
.com/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\StrictTransportSecurityMiddleware->process
.com/concrete/src/Http/Middleware/ContentSecurityPolicyMiddleware.php(36): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
.com/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\ContentSecurityPolicyMiddleware->process
.com/concrete/src/Http/Middleware/CookieMiddleware.php(35): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
.com/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\CookieMiddleware->process
.com/concrete/src/Http/Middleware/ApplicationMiddleware.php(29): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
.com/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\ApplicationMiddleware->process
.com/concrete/src/Http/Middleware/MiddlewareStack.php(86): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
.com/concrete/src/Http/DefaultServer.php(85): Concrete\Core\Http\Middleware\MiddlewareStack->process
.com/concrete/src/Foundation/Runtime/Run/DefaultRunner.php(125): Concrete\Core\Http\DefaultServer->handleRequest
.com/concrete/src/Foundation/Runtime/DefaultRuntime.php(102): Concrete\Core\Foundation\Runtime\Run\DefaultRunner->run
.com/concrete/dispatcher.php(45): Concrete\Core\Foundation\Runtime\DefaultRuntime->run
.com/index.php(2): null->require

Type: Ticket
Status: In Progress
woobiethebear
View Replies:
mesuva replied on at Permalink Reply
mesuva
Hi there,

I think that might be a PHP8 issue.
For the time being, are you able to run the site under PHP7.4?

Concrete _mostly_ works on PHP8, but I know the core, plus lots of add-ons are still being update to fix minor bugs, so PHP7.4 is perhaps still more stable PHP version to use.

I'll investigate this bug - I may need to make a few updates and push up an update.

Cheers
-Ryan
woobiethebear replied on at Permalink Reply
woobiethebear
Works! Thanks!

At some point it would be nice to use php version 8.1 to have a secure page but i guess that is not super urgent at the moment.

Good job by the way and thank you so much for the addon!
mesuva replied on at Permalink Reply
mesuva
I've just pushed version 2.2 of the add-on, which should fix the PHP8 bugs you hit.
It also fixes some other issues from V9 of Concrete as well. So I'd recommend updating to it when it becomes available to update.

I'd say my suggestion to stay on PHP7.4 still stands for the time being, but going to PHP8 eventually is a good idea.

Please let me know if you hit any further bugs or issues.
This add-on has had to evolve a lot over time, as Snipcart continues to add and change features (and different versions of Snipcart have different features!).

Make sure you try out both version 2.x and 3.x of Snipcart (on the main configuration page). When version 3.x first came out, I personally wasn't that impressed by it, whilst 2.x was quite stable and easy to configure. Over time, they've improved version 3.x, so I've now set it as the default when the add-on installs. The main difference is the style of cart.

A broader comment is that I'd weigh this add-on up against my Shopify one if you haven't already. Not that I don't think Snipcart is still a solid product, but I'm finding myself I'm using Shopify more for our own clients' stores these days over Snipcart.
It all depends on the kind of store you're trying to set up though.

(and if you did look at my Shopify add-on and wanted to use that instead, I'd be quite happy to refund you for the Snipcart one).

concrete5 Environment Information

Client is accessing on running web page.
Server is a shared cloud managed by a third party.

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.