[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. 6fd9aff194242a2d41bda633b9e56184bfe91c5e
Stefan Hornburg
racke at rt.icdevgroup.org
Fri Apr 9 09:20:23 UTC 2010
via 6fd9aff194242a2d41bda633b9e56184bfe91c5e (commit)
from 99e63f46a7035208c55196fa43e34e900f4e2149 (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 6fd9aff194242a2d41bda633b9e56184bfe91c5e
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date: Fri Apr 9 11:19:46 2010 +0200
count function added to [wishlist] tag
-----------------------------------------------------------------------
Summary of changes and diff:
plugins/wishlists/code/wishlist.tag | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/plugins/wishlists/code/wishlist.tag b/plugins/wishlists/code/wishlist.tag
index 64d631c..ad3cc4a 100644
--- a/plugins/wishlists/code/wishlist.tag
+++ b/plugins/wishlists/code/wishlist.tag
@@ -204,6 +204,15 @@ sub {
elsif ($function eq 'type') {
return $Db{carts}->field($wishlist_code, 'type');
}
+ elsif ($function eq 'count') {
+ # number of items in the cart (not the cumulative quantity)
+ my ($sql, $ret);
+
+ $sql = qq{select count(*) from cart_products where cart = $wishlist_code};
+ $ret = $Db{cart_products}->query({sql => $sql});
+
+ return $ret->[0]->[0];
+ }
elsif ($function eq 'status') {
my $status;
hooks/post-receive
--
Interchange wellwell catalog
More information about the wellwell-devel
mailing list