'@type' => 'Product',
name => $data{title},
image => "/static/fullpics/$data{product}-1.jpg",
- description => $data{summary},
+ description => $data{subtitle},
offers => {
'@type' => 'Offer',
price => ($data{price} =~ s/(..)$/\.$1/r),
die "Not enough of " .$prod->{title}."\n" if $prod->{quantity} > $stock;
$db{$$}->update(products => {stock => $stock - $prod->{quantity}}, {product => $prod->{product}});
}
- $db{$$}->insert(orders => {id => $id, %parms});
+ $db{$$}->insert(orders => {id => $id, date => time, %parms});
$db{$$}->commit;
sendmail (Email::Simple->create(
header => [
my $slug = make_slug $data{title};
$tree->find('title')->replace_content("$data{title} | ledparts4you");
$tree->find('h2')->replace_content($data{title});
- $tree->fid('summary')->replace_content($data{summary});
+ my $summary_literal = HTML::Element::Library::super_literal $data{summary};
+ $tree->fid('summary')->replace_content($summary_literal);
$tree->look_down(rel => 'canonical')->attr(href => "/details/$id/$slug");
$tree->fid('pictures')->find('li')->iter3(\@pics, \&details_list_element);
$tree->fid('jsonld')->replace_content(encode_json product_to_schemaorg '', %data);