I started using zen cart recently, Installed wishlist 0.9. However I can't create new wishlist, it seems it has something to do with this code.
please any help will be appreciated.
/**
* create a new wishlist
*
* @param string $name name for wishlist
# @param string $comment comment for wishlist
# @param boolean $default indicates default wishlist for customer
* @return integer $iWishlistId unique wishlist identifier
* @access public
/----------------------------------------------------------/
function createWishlist($name='', $comment='', $default_status=0, $public_status=1) {
if ( !isset($this->_iCustomerId) ) {
return false;
}
$sql = "INSERT INTO '" . UN_TABLE_WISHLISTS . "' (
`id`,
`customers_id`,
`created`,
`modified`,
`name`,
`comment`,
`default_status`,
`public_status`
) VALUES (
NULL,
'".$this->_iCustomerId."',
NOW(),
NOW(),
'".$name."',
'".$comment."',
'".$default_status."',
'".$public_status."'
)";
$result = $this->_oDB->Execute($sql);
if ( !$result ) {
$this->_oMessages->add($this->_sName, UN_ERROR_CREATE_WISHLIST);
return false;
}
return $this->_oDB->Insert_ID();
}