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

Stefan Hornburg racke at rt.icdevgroup.org
Thu Jul 23 13:02:55 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  b8ec1bc0a73548a0ff2d2f6472b65d62a31a16b9 (commit)
      from  1e496d078afa7699dfdfecd6aaab88474712da75 (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 b8ec1bc0a73548a0ff2d2f6472b65d62a31a16b9
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Thu Jul 23 15:02:35 2009 +0200

    new addtocart function for [wishlist]

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

Summary of changes and diff:
 plugins/wishlists/code/wishlist.tag |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/plugins/wishlists/code/wishlist.tag b/plugins/wishlists/code/wishlist.tag
index 0505722..a7b769f 100644
--- a/plugins/wishlists/code/wishlist.tag
+++ b/plugins/wishlists/code/wishlist.tag
@@ -147,6 +147,14 @@ sub {
 			$Db{carts}->set_field($wishlist_code, 'last_modified', $Tag->time({format => '%s'}));			
 		}
 	}
+	elsif ($function eq 'addtocart') {
+		# add all wishlist items to the session-bound shopping cart
+		$set = $Db{cart_products}->query(q{select sku,quantity from cart_products where cart = %s}, $wishlist_code);
+		
+		for (@$set) {
+			$Tag->addtocart(@$_);
+		}
+	}
 	elsif ($function eq 'remove') {
 		if ($status eq 'final') {
 			# no updates allowed to finalized wishlists


hooks/post-receive
-- 
Interchange wellwell catalog



More information about the wellwell-devel mailing list