From b312852edba2294eb593a74d7209cc7082482244 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 30 Apr 2016 16:02:39 +0100 Subject: [PATCH] Add product description on product page --- lib/App/Web/Oof.pm | 3 ++- tmpl/details.html | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/App/Web/Oof.pm b/lib/App/Web/Oof.pm index e7d93f5..c2344c6 100644 --- a/lib/App/Web/Oof.pm +++ b/lib/App/Web/Oof.pm @@ -226,11 +226,12 @@ sub details_app { $db{$$} //= DBIx::Simple->connect($ENV{OOF_DSN} // 'dbi:Pg:'); my $tree = $details->clone; my ($id) = $env->{PATH_INFO} =~ m,^/(\d+),; - my $title = $db{$$}->select(products => 'title', {product => $id})->list; + my ($title, $summary) = $db{$$}->select(products => [qw/title summary/], {product => $id})->list; my @pics = ; my $slug = make_slug $title; $tree->find('title')->replace_content("Pictures of $title | ledparts4you"); $tree->find('h2')->replace_content($title); + $tree->fid('summary')->replace_content($summary); $tree->look_down(rel => 'canonical')->attr(href => "/details/$id/$slug"); $tree->fid('pictures')->find('li')->iter3(\@pics, \&details_list_element); diff --git a/tmpl/details.html b/tmpl/details.html index 418fec8..ec99046 100644 --- a/tmpl/details.html +++ b/tmpl/details.html @@ -8,6 +8,8 @@
Issues/Questions? Contact us at orders@ledparts4you.uk.to

Item

+

Go to order form. +

Go to order form. -- 2.30.2