refactored backend GiftsController.php and insertInDB() in includes/src/Cart/CartItem.php. SHOP-6679
Closes SHOP-6679 and SHOP-7349