From: Marius Gavrilescu Date: Sat, 30 Apr 2016 15:02:39 +0000 (+0100) Subject: Add product description on product page X-Git-Tag: 0.000_005~2 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=b312852edba2294eb593a74d7209cc7082482244;p=app-web-oof.git Add product description on product page --- 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.