[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. 10b73c48dfbf6e274bafba1aae15673dba71a6bf

Stefan Hornburg racke at rt.icdevgroup.org
Thu Apr 9 12:21:41 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  10b73c48dfbf6e274bafba1aae15673dba71a6bf (commit)
      from  c39ade568a8a01a77cefbd71fcb97714f9e93523 (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 10b73c48dfbf6e274bafba1aae15673dba71a6bf
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Thu Apr 9 14:21:24 2009 +0200

    pass wishlist code/name for removals

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

Summary of changes and diff:
 plugins/wishlists/code/wishlists.sub |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/plugins/wishlists/code/wishlists.sub b/plugins/wishlists/code/wishlists.sub
index 3d822dc..fdb3ef2 100644
--- a/plugins/wishlists/code/wishlists.sub
+++ b/plugins/wishlists/code/wishlists.sub
@@ -2,6 +2,7 @@ Sub wishlists <<EOS
 sub {
 	my $page = shift;
 	my ($name, @args) = split(/\//, $page);
+	my ($wishlist_code, $wishlist_name);
 
 	unless ($Session->{logged_in}) {
 		$Tag->warnings(errmsg('Please login before adding a product to the wishlist.'));
@@ -11,6 +12,18 @@ sub {
 		return 1;
 	}
 
+	if ($args[1]) {
+		# select wishlist by code or name
+		if ($args[1] =~ /^(\d+)$/) {
+			$wishlist_code = $args[1];
+			$Tag->attribute('set', 'wishlist', 'code', $args[1]);
+		}
+		else {
+			$wishlist_name = $args[1];
+			$Tag->attribute('set', 'wishlist', 'name', $args[1]);
+		}
+	}
+	
 	if ($args[0] eq 'create') {
 		$Values->{sku} = $args[1];
 		$Tag->wishlist('create', $Values->{sku});
@@ -22,7 +35,10 @@ sub {
 	if ($CGI->{movetocart}) {
 		for (@{$CGI_array->{sku}}) {
 			$Tag->addtocart($_, 1);
-			$Tag->wishlist('remove', $_);
+			$Tag->wishlist({function => 'remove',
+							sku => $_,
+							name => $wishlist_name,
+							code => $wishlist_code});
 		}
 		$CGI->{mv_nextpage} = $Config->{Special}->{order};
 		return 1;
@@ -47,16 +63,6 @@ sub {
 		$CGI->{mv_nextpage} = 'wishlists/carts';
 	}
 	else {
-		if ($args[1]) {
-			# select wishlist by code or name
-			if ($args[1] =~ /^(\d+)$/) {
-				$Tag->attribute('set', 'wishlist', 'code', $args[1]);
-			}
-			else {
-				$Tag->attribute('set', 'wishlist', 'name', $args[1]);
-			}
-		}
-
 		$CGI->{mv_nextpage} = 'wishlists/list';
 	}
 


hooks/post-receive
-- 
Interchange wellwell catalog



More information about the wellwell-devel mailing list