Display brand, model, stock and price on details page
[app-web-oof.git] / lib / App / Web / Oof.pm
index 23fd09ae37ac92a72ca77e0efa9ce220f2f879ff..9c62d54214b154020c066f3554f17c82267683bc 100644 (file)
@@ -282,6 +282,17 @@ sub details_app {
        $tree->fid('pictures')->find('li')->iter3(\@pics, \&details_list_element);
        $tree->fid('jsonld')->replace_content(encode_json product_to_schemaorg '', %data);
 
+       $tree->fid('dd_stock')->replace_content($data{stock});
+       $tree->fid('dd_price')->replace_content(stringify_money $data{price});
+       for (qw/brand model/) {
+               if ($data{$_}) {
+                       $tree->fid("dd_$_")->replace_content($data{$_});
+               } else {
+                       $tree->fid("dt_$_")->detach;
+                       $tree->fid("dd_$_")->detach;
+               }
+       }
+
        for my $ahref ($tree->find('a')) {
                $ahref->attr(href => "/form?highlight=$id") if $ahref->attr('href') eq '/';
        }
This page took 0.009152 seconds and 4 git commands to generate.