I managed to hook in the application_bottom.php changes thanks to @burt adding some more hooks, however, it doesn't fully work. The page redirects to the wishlist as it should but nothing is added not. The code is below
class hook_shop_system_wishlistApp {
var $preActionApp = null;
public function listen_preActionApp() {
// BOF WISHLIST
// wishlist data
if (!tep_session_is_registered('wishList') || !is_object($wishList)) {
tep_session_register('wishList');
$wishList = new wishlist;
}
//Wishlist actions (must be before shopping cart actions)
if (isset($_POST['wishlist'])) {
if (isset($_POST['products_id']) && is_numeric($_POST['products_id'])) {
$attributes = isset($_POST['id']) ? $_POST['id'] : '';
// php 5
$qty = isset($_POST['qty']) ? (int)$_POST['qty'] : 1;
// php 7
//$qty = (int)($_POST['qty'] ?? 1);
$wishList->add_wishlist($_POST['products_id'], $wishList->get_quantity(tep_get_uprid($_POST['products_id'], $attributes))+$qty, $attributes);
}
if (WISHLIST_REDIRECT == 'No') tep_redirect(tep_href_link('product_info.php', 'products_id=' . $_POST['products_id']));
tep_redirect(tep_href_link('wishlist.php'));
}
// EOF WISHLIST
}
}