我需要做什么/设置以在很多IP中保持浏览器会话很长时间?

Imagine the following scenario:

1) User comes to a site
2) User adds 5 products to their cart on the site:

session_start();
$_SESSION['cart'] = array(1,4,7,12,20);

3) User closes the lid of their laptop and puts the PC to sleep
4) 8 hours pass
5) User moves to another location, another internet connection, another IP
6) User opens the lid of their laptop, resuming the browser
7) The products are still in the cart

How do we achieve that the step 7 can/will happen?

  1. session_cart_id(rand) set cookie with session_cart_id independent from session, long living, persistent etc. (like rememberme cookie for login)
  2. store somewhere session_cart_id -> cart content
  3. on session start, load items from store, if session_cart_id isset