Hi,
I have created from following a guide the following script which on click of a button should add the product to the basket and refresh the page, but instead refreshes and directs to the default unknown product page as highlighted in bold - is there anyway that I can remain on the current page?
<?php
$item_id = $_GET['item_id'] ?? **1;**
foreach ($product->getData() as $item) :
if ($item['item_id'] == $item_id) :
?>