From 32c1a1ba3a789007a8d77b4e28f4eb7efd1e3f88 Mon Sep 17 00:00:00 2001 From: Daniel Tiefnig Date: Fri, 17 Jul 2009 23:33:27 +0000 Subject: [PATCH] fixed access to product data structure in shop.pm fixed spa9k upgrade product handle in hardware.tt --- lib/csc/Controller/shop.pm | 7 ++++--- root/tt/shop/hardware.tt | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/csc/Controller/shop.pm b/lib/csc/Controller/shop.pm index 2eefa5b..0f7f6af 100644 --- a/lib/csc/Controller/shop.pm +++ b/lib/csc/Controller/shop.pm @@ -46,7 +46,7 @@ sub hardware : Local { $self->_load_products($c) or return; foreach my $product (@{$c->session->{shop}{dbprodarray}}) { - $c->stash->{product_hash}{$$product{handle}}{price} = sprintf "%.2f", $$product{price} / 100; + $c->stash->{product_hash}{$$product{handle}}{price} = sprintf "%.2f", $$product{data}{price} / 100; } if(ref $c->session->{shop}{cart} eq 'HASH' and keys %{$c->session->{shop}{cart}}) { @@ -294,7 +294,7 @@ sub system : Local { foreach my $product (@{$c->session->{shop}{dbprodarray}}) { next unless $$product{class} eq 'hardware'; - $c->stash->{price}{$$product{handle}} = sprintf "%.2f", $$product{price} / 100; + $c->stash->{price}{$$product{handle}} = sprintf "%.2f", $$product{data}{price} / 100; } if(exists $c->session->{refill}{hardware}) { @@ -1344,7 +1344,8 @@ sub _load_products : Private { $products = {}; for(@{$c->session->{shop}{dbprodarray}}) { - $$products{$$_{handle}} = $_; + $$_{data}{handle} = $$_{handle}; + $$products{$$_{handle}} = $$_{data}; } $c->session->{shop}{dbprodhash} = $products; } diff --git a/root/tt/shop/hardware.tt b/root/tt/shop/hardware.tt index 8011bbf..a4255ba 100644 --- a/root/tt/shop/hardware.tt +++ b/root/tt/shop/hardware.tt @@ -99,7 +99,7 @@ SPA9000 upgrade

SPA9000 Upgrade
von 4 auf 16 Nebenst.
- € [% product_hash.SPA9000_U.price %]

+ € [% product_hash.SPA9000_UPGRADE.price %]

@@ -107,7 +107,7 @@ - +