change this:
if ((!isset($_SESSION['kshopcart'])) && (isset($_COOKIE['kscart']))){
$CART = unserialize($CART);
if ((!isset($_SESSION['kshopcart'])) && (isset($_COOKIE['kscart']))){
$CART = stripslashes($_COOKIE['kscart']);
$CART = unserialize($CART);