ABOUT
uc_wishlist is a module that adds wish list/gift registry support to Ubercart. This module requires Ubercart alpha 8, and has been tested with Ubercart beta 7.
INSTALLATION
Download the latest release of this module below. Uncompress the archive in your Ubercart contrib directory. Enable the wish list module under 'Ubercart - extra' in the Drupal module administration page.
FEATURES
This module enables users to create a gift list for use as a personal shopping list or a public gift registry. An 'add to wish list' button is added wherever there is an 'add to cart' button.
DETAILS
The number of products purchased from a user's wish list is tracked through a uc_order hook. When an item is added to the shopping cart from a wish list, the source wish list is stored with the item. When a sale is completed (and the order state changes to post_checkout) the order is checked for items that came from a wish list. If any are found, the corresponding wish list items are updated, and information about the order (the order id, order product id, user id, and time) are added to the purchase field in the wish list products table.
| Attachment | Size |
|---|---|
| uc_wishlist-0.6.tar.gz | 24.34 KB |



Re: Wish list/gift registry module
Hey, glad to see this contribution pop up in the recent posts.
I've put a few thoughts on the patch in the wish list thread.
bug
after updating to bzr 504 this morning i noticed this
warning: Invalid argument supplied for foreach() in /var/www/html/mix/modules/user/user.module on line 1519.
on this page
http://demo.example.net/user/1
i isolated the error down to the wishlist module. disabling it alone removes the error.
Marafa, Thanks for reporting
Marafa,
Thanks for reporting that problem. It has been fixed in version 0.3.
Error
Hello,
I have the list in a block and it works fine there.
However, I get the below error when trying to view /wishlist with products in it. If the wishlist is empty I can view /wishlist with no trouble.
PHP Fatal error: Call to undefined function uc_address_field_required() in modules/ubercart/uc_wishlist/uc_wishlist_address_pane.inc on line 30
This occurs for both anonymous and authenticated users.
Have I missed something obvious?
Paul
Some fixes
Just a note that I've made some fixes to 0.3 (mostly making it so it doesn't break the drupal search feature). The patch is on this issue.
Re: Some fixes
jrust,
Thanks for posting the patch. I've included those changes in the new version 0.4.
Changes in version 0.5
The new release of uc_wishlist, version 0.5, includes bug fixes as well as user interface improvements:
-- added admin options: The administrator can now specify the default title of a wish list, and a token is provided for substituting the user's name. Also, there is an option for allowing anonymous users to create wish lists, which is now by default not allowed.
-- added administrator manage page for listing and deleting wish lists
-- rearranged the wish list page: There are 'add to cart' buttons next to each wish list item. The wish list settings have been moved to the top. Also, I added a notice for users who have not yet entered an address.
The admin settings and manage page are available through store configuration (admin/store/wishlist/settings and admin/store/wishlist/manage). After installing this release, you may need to flush your menu cache to access the new pages.
Great Module
Thanks it works great
mailing address
I have created a wish list for a user and in the Mailing address settings I have an address for in India and when I try to save it; this is the message I get
"An illegal choice has been detected. Please contact the site administrator."
Can i either disable it and let the users provide shipping address at checkout or somehow make it take international addresses.
BTW great module.
thank you.
Changes in version 0.6
Version 0.6 includes bug fixes as well as user interface improvements:
-- on the wish list page, 'add to cart' buttons will add item even if the quantity has not been set
-- fixed bug causing error message about items from multiple wish lists
-- fixed bug that caused wish list items to not include shippable parameter (any items added to a wish list before this fix will not be marked as shippable. so you have to disable 'Hide shipping information when possible for carts with no shippable items.' in the checkout settings.)
-- added redirection back to page where user is prompted to login or register
-- added 'create or manage my wish list' link to search page
-- added CSS file for custom styles on wish list search page
Let me know how it works. Hope you enjoy.
Re: Changes in version 0.6
thank you detour.
I installed and tested it on beta. Works great. One thing if I could suggest is a report/notification to the list creator so that if someone buys him something on his list he gets an email with details as to who bought him what or a button under the manage wish list where he can click on it and see who bought him what..
Great work.
Re: Wish list/gift registry module
Is there any way i could sort the items on the wishlist? Alphabetically perhaps, or by category?
Status with UC 1.0
Does this module work for UC 1.0? I have installed it but I can't get anything to add to the wishlist. The button shows up and it confirms that it was added but then when you view the wishlist it does not show any products.
Thanks for your help.
Re: Wish list/gift registry module
i was almost dreading writing this module all by myself, but i just got one-upped

thanks guys
error and does not work in 1.0
hi folks,
happy about that moduel i also tryed to get it on work in ubercart 1.0 but i also can not see anything in the list after creating one and trying to add some articles.
after the first creation i pressed the save button and got the following
error warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/ubercart/sites/all/modules/uc_wishlist/uc_wishlist.module on line 1376.
i pressed save again and the error did not show up again.
it would be a great help if detour would make this moudule ubercart 1.0 compatible and i would spend a box of beer to him !
thanks in advance
sunny days
carsten
Can't see my wishlist
Hello ,
I can see my wishlist in navigation bar . But by clicking on "view wishlist", I can't see my wishlist. Help me
cathe
uc_wishlist Ubercart v1.x hacks / fixes
I did this in about 15 minutes so suggestions are greatly appreciated if not encouraged.
I am using these hacks for demonstration that nothing is extremely wrong here.
<?php
/**
* Display a page allowing the customer to view his/her wish list.
*/
function uc_wishlist_view_form($items, $wid, $own) {
/*** TODO: FIX: $items was not being passed so we load them just like before in uc_wishlist_view() */
if (!$items) {
$items = uc_wishlist_get_contents($wid);
}
$form['items'] = array('#tree' => TRUE);
$i = 0;
foreach($items as $item) {
$item->module = 'uc_product'; /**** TODO: WORKAROUND: my objects were not showing $item->module so i injected it here */
$display_item = module_invoke($item->module, 'wishlist_display', $item, $own);
if (!empty($display_item)) {
$form['items'][$i] = $display_item;
$i++;
}
}
if (($page = variable_get('uc_continue_shopping_url', '')) != '<none>' &&
variable_get('uc_continue_shopping_type', 'link') == 'button') {
$form['continue_shopping'] = array(
'#type' => 'submit',
'#value' => variable_get('uc_continue_shopping_text', t('Continue shopping')),
);
}
$form['wid'] = array(
'#type' => 'hidden',
'#value' => $wid,
);
if ($own) {
$form['own'] = array(
'#type' => 'hidden',
'#value' => true,
);
$form['update'] = array(
'#type' => 'submit',
'#value' => t('Save wish list'),
);
}
return $form;
}
?>
new features: to have list not pubblic
is possible when an user creat his wishlist,to assign a password (access code) so only his friends can see the list?
and also how name for the list owner's list can to decide a specific name and not his user name; this is some better also for example for not show own user name (used for login).
Example of use:
If the list is only pubblic and the site have many wishlists or/and there are user with similar name then the friends can make errors when they choiche the wishlist.
But if is required a code for access then will be open only the specific wishlist.