[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. 6207f426a44bb506003323ce6ba297d7df19bd0c
Stefan Hornburg
racke at rt.icdevgroup.org
Thu Aug 13 15:37:10 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 6207f426a44bb506003323ce6ba297d7df19bd0c (commit)
from fa17dc58bb3e0925d4b6e4724f7e2bf3a953b036 (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 6207f426a44bb506003323ce6ba297d7df19bd0c
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date: Thu Aug 13 17:36:30 2009 +0200
set type attribute for a wishlist
-----------------------------------------------------------------------
Summary of changes and diff:
plugins/wishlists/code/wishlist.tag | 6 ++++++
plugins/wishlists/code/wishlists.sub | 14 ++++++++++----
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/plugins/wishlists/code/wishlist.tag b/plugins/wishlists/code/wishlist.tag
index c31d622..89e5470 100644
--- a/plugins/wishlists/code/wishlist.tag
+++ b/plugins/wishlists/code/wishlist.tag
@@ -195,9 +195,15 @@ sub {
return $Tag->query ({sql => $sql, list => 1, prefix => 'item',
body => $body});
}
+ elsif ($function eq 'code') {
+ return $wishlist_code;
+ }
elsif ($function eq 'name') {
return $Db{carts}->field($wishlist_code, 'name');
}
+ elsif ($function eq 'type') {
+ return $Db{carts}->field($wishlist_code, 'type');
+ }
elsif ($function eq 'status') {
my $status;
diff --git a/plugins/wishlists/code/wishlists.sub b/plugins/wishlists/code/wishlists.sub
index 55080f0..6a6ad5a 100644
--- a/plugins/wishlists/code/wishlists.sub
+++ b/plugins/wishlists/code/wishlists.sub
@@ -2,7 +2,7 @@ Sub wishlists <<EOS
sub {
my $page = shift;
my ($name, @args) = split(/\//, $page);
- my ($wishlist_code, $wishlist_name);
+ my ($wishlist_code, $wishlist_name, $wishlist_type);
unless ($Session->{logged_in}) {
$Tag->warnings(errmsg('Please login before adding a product to the wishlist.'));
@@ -18,13 +18,19 @@ sub {
$wishlist_code = $args[1];
$wishlist_name = $Tag->wishlist({function => 'name',
code => $wishlist_code});
- $Tag->attribute('set', 'wishlist', 'code', $args[1]);
- $Tag->attribute('set', 'wishlist', 'name', $wishlist_name);
}
else {
$wishlist_name = $args[1];
- $Tag->attribute('set', 'wishlist', 'name', $args[1]);
+ $wishlist_code = $Tag->wishlist({function => 'code',
+ name => $wishlist_name});
}
+
+ $wishlist_type = $Tag->wishlist({function => 'type',
+ code => $wishlist_code});
+
+ $Tag->attribute('set', 'wishlist', 'code', $wishlist_code);
+ $Tag->attribute('set', 'wishlist', 'name', $wishlist_name);
+ $Tag->attribute('set', 'wishlist', 'type', $wishlist_type);
}
if ($args[0] eq 'create') {
hooks/post-receive
--
Interchange wellwell catalog
More information about the wellwell-devel
mailing list