[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. 5739ea1abf39ffb3ef9a143c96578273c86ba64a

Stefan Hornburg racke at rt.icdevgroup.org
Wed Apr 8 14:46:50 UTC 2009


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Interchange wellwell catalog".

The branch, master has been updated
       via  5739ea1abf39ffb3ef9a143c96578273c86ba64a (commit)
      from  d734ec80715ae753a815f006ef033fddeca610a0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5739ea1abf39ffb3ef9a143c96578273c86ba64a
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Wed Apr 8 16:45:52 2009 +0200

    [wishlist create] returns true on success now
    quantity field added to cart_products

-----------------------------------------------------------------------

Summary of changes and diff:
 plugins/wishlists/code/wishlist.tag                |    4 ++--
 plugins/wishlists/database/pgsql/cart_products.sql |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/plugins/wishlists/code/wishlist.tag b/plugins/wishlists/code/wishlist.tag
index 29c946e..b51e138 100644
--- a/plugins/wishlists/code/wishlist.tag
+++ b/plugins/wishlists/code/wishlist.tag
@@ -64,7 +64,7 @@ sub {
 
 		# add product to wishlist
 		$Db{cart_products}->set_slice([$wishlist_code, $sku], {position => 0});
-		return;
+		return 1;
 	}
 
 	unless ($wishlist_code) {
@@ -78,7 +78,7 @@ sub {
 	}
 	elsif ($function eq 'list') {
 		# list products from wishlist
-		my $sql = qq{select sku from cart_products where cart = $wishlist_code order by position};
+		my $sql = qq{select sku,quantity from cart_products where cart = $wishlist_code order by position};
 
 		return $Tag->query ({sql => $sql, list => 1, prefix => 'item',
 				body => $body});
diff --git a/plugins/wishlists/database/pgsql/cart_products.sql b/plugins/wishlists/database/pgsql/cart_products.sql
index 4006160..009ba55 100644
--- a/plugins/wishlists/database/pgsql/cart_products.sql
+++ b/plugins/wishlists/database/pgsql/cart_products.sql
@@ -2,5 +2,6 @@ CREATE TABLE cart_products (
   cart integer NOT NULL,
   sku varchar(32) NOT NULL,
   position integer NOT NULL,
-  CONSTRAINT cart_products_pkey PRIMARY KEY (cart, position)
+  quantity integer NOT NULL DEFAULT 1,
+  CONSTRAINT cart_products_pkey PRIMARY KEY (cart, sku)
 );


hooks/post-receive
-- 
Interchange wellwell catalog



More information about the wellwell-devel mailing list