HI, I have wishlist 2 installed, I add 1 extra field in my customer_wishlist table call categories_id, I want my customer be able to sort the wishlist by categories.
I change the insert query from
tep_db_query("insert into " . TABLE_WISHLIST . " (customers_id, products_id) values ('" . $customer_id . "', '" . $wishlist_id . "')");
to
tep_db_query("insert into " . TABLE_WISHLIST . " (customers_id, products_id, categories_id) values ('" . $customer_id . "', '" . $wishlist_id . "', '" . $top_category_id . "')");
include/classes/wishlist.php
since I only want to insert the top category to wishlist table, I add the following code under product_info.php page to show the category_id
$cPath = implode('_', $cPath_array);
$top_category_id = strtok($cPath, '_');
echo $top_category_id;
before the
</form>
It does shows the top category id correctly under the products_info.php, but the sql query doesn't insert the $top_category_id to the table.
Can somebody tell me how fix this problem?
Thank you
ken