diff --git a/fsfe.org/cgi-bin/weborder.pl b/fsfe.org/cgi-bin/weborder.pl index d506f318c2..f02c24c211 100755 --- a/fsfe.org/cgi-bin/weborder.pl +++ b/fsfe.org/cgi-bin/weborder.pl @@ -97,15 +97,20 @@ my $items = XML::LibXML->load_xml(location => $items_file); my $count = 0; my $amount = 0; +my $pickup = 0; foreach my $item ( $query->param ) { my $value = $query->param($item); if ( not $item =~ /^_/ and $value ) { # Remove size from item info so price is found properly + my $origitem = $item; $item =~ s/_.*//; my $price = $items->findvalue("/itemset/item[\@id=\"$item\"]/\@price"); $count += 1; $amount += $value * $price; + if ( !$pickup ) { + $pickup = "hoodie-fourfreedoms" eq substr($origitem,0,length("hoodie-fourfreedoms")); + } } } @@ -117,6 +122,10 @@ if ( $country_code eq 'DE' ) { } else { $shipping = 8; } +# if one item was for pick up only, then shipping cost are 0 +if ( $pickup ) { + $shipping = 0; +} $amount += $shipping; @@ -218,6 +227,18 @@ HTML } } +if ( $pickup ) { +$body .= <<"HTML"; +Self pick-up (Shipping): € 0
+Total amount: € $amount + +

+ Best regards, +

+ + +HTML +} else { $body .= <<"HTML"; Shipping to $country_name: € $shipping
Total amount: € $amount @@ -228,6 +249,7 @@ Shipping to $country_name: € $shipping
HTML +} # ----------------------------------------------------------------------------- # Generate invoice @@ -239,7 +261,11 @@ my @odtfill = qw(); push @odtfill, $ENV{"DOCUMENT_ROOT"} . "/cgi-bin/odtfill"; # template file -push @odtfill, $ENV{"DOCUMENT_ROOT"} . "/templates/invoice.odt"; +if ( !$pickup ) { + push @odtfill, $ENV{"DOCUMENT_ROOT"} . "/templates/invoice.odt"; +} else { + push @odtfill, $ENV{"DOCUMENT_ROOT"} . "/templates/invoicepu.odt"; +} # output file push @odtfill, "/tmp/invoice.odt"; @@ -262,8 +288,10 @@ foreach my $item ( $query->param ) { push @odtfill, "Amount=" . sprintf "%.2f", $value * $price; } } -push @odtfill, "Country=" . $country_name; # 2nd Country placeholder -push @odtfill, "Shipping=" . sprintf "%.2f", $shipping; +if ( !$pickup ) { + push @odtfill, "Country=" . $country_name; # 2nd Country placeholder + push @odtfill, "Shipping=" . sprintf "%.2f", $shipping; +} push @odtfill, "Total=" . $amount_f; push @odtfill, "Net=" . $net; push @odtfill, "Vat=" . $vat; diff --git a/fsfe.org/order/data/info/hoodie-fourfreedoms-38c3-black.en.xml b/fsfe.org/order/data/info/hoodie-fourfreedoms-38c3-black.en.xml new file mode 100644 index 0000000000..1364369e8b --- /dev/null +++ b/fsfe.org/order/data/info/hoodie-fourfreedoms-38c3-black.en.xml @@ -0,0 +1,20 @@ + + +1 + + Hoodie (Pick-Up at 38c3), black + +

+ The new FSFE hoodies are produced only for those who will order them and will be self picked up only. + As the are self picked-up, there are no shipping fee for orders that include one or more hoodies. + You can combine them with other items from this shop for the same pick up location. +

+

+ This item is for self-pick up at the FSFE booth at 38c3 only. +

+

+ On the front the FSFE logo will be printed on the upper left side. +

+
+
+
\ No newline at end of file diff --git a/fsfe.org/order/data/info/hoodie-fourfreedoms-38c3-blue.en.xml b/fsfe.org/order/data/info/hoodie-fourfreedoms-38c3-blue.en.xml new file mode 100644 index 0000000000..0d895887a4 --- /dev/null +++ b/fsfe.org/order/data/info/hoodie-fourfreedoms-38c3-blue.en.xml @@ -0,0 +1,21 @@ + + +1 + + Hoodie (Pick-Up at 38c3), blue + +

Waiting is over... The new hoodies are here!

+

+ The new FSFE hoodies are produced only for those who will order them and will be self picked up only. + As the are self picked-up, there are no shipping fee for orders that include one or more hoodies. + You can combine them with other items from this shop for the same pick up location. +

+

+ This item is for self-pick up at the FSFE booth at 38c3 only. +

+

+ On the front the FSFE logo will be printed on the upper left side. +

+
+
+
\ No newline at end of file diff --git a/fsfe.org/order/data/info/hoodie-fourfreedoms-fosdem-black.en.xml b/fsfe.org/order/data/info/hoodie-fourfreedoms-fosdem-black.en.xml new file mode 100644 index 0000000000..b15ff85152 --- /dev/null +++ b/fsfe.org/order/data/info/hoodie-fourfreedoms-fosdem-black.en.xml @@ -0,0 +1,20 @@ + + +1 + + Hoodie (Pick-Up at FOSDEM 2025), black + +

+ The new FSFE hoodies are produced only for those who will order them and will be self picked up only. + As the are self picked-up, there are no shipping fee for orders that include one or more hoodies. + You can combine them with other items from this shop for the same pick up location. +

+

+ This item is for self-pick up at the FSFE booth at FOSDEM only. +

+

+ On the front the FSFE logo will be printed on the upper left side. +

+
+
+
\ No newline at end of file diff --git a/fsfe.org/order/data/info/hoodie-fourfreedoms-fosdem-blue.en.xml b/fsfe.org/order/data/info/hoodie-fourfreedoms-fosdem-blue.en.xml new file mode 100644 index 0000000000..6e9ac9e044 --- /dev/null +++ b/fsfe.org/order/data/info/hoodie-fourfreedoms-fosdem-blue.en.xml @@ -0,0 +1,20 @@ + + +1 + + Hoodie (Pick-Up at FOSDEM 2025), blue + +

+ The new FSFE hoodies are produced only for those who will order them and will be self picked up only. + As the are self picked-up, there are no shipping fee for orders that include one or more hoodies. + You can combine them with other items from this shop for the same pick up location. +

+

+ This item is for self-pick up at the FSFE booth at FOSDEM 2025 only. +

+

+ On the front the FSFE logo will be printed on the upper left side. +

+
+
+
\ No newline at end of file diff --git a/fsfe.org/order/data/items.en.xml b/fsfe.org/order/data/items.en.xml index f6dbbb1384..b8c0f9cc69 100644 --- a/fsfe.org/order/data/items.en.xml +++ b/fsfe.org/order/data/items.en.xml @@ -59,6 +59,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fsfe.org/order/data/pictures/hoodie-fourfreedoms-38c3-black-back-large.png b/fsfe.org/order/data/pictures/hoodie-fourfreedoms-38c3-black-back-large.png new file mode 100644 index 0000000000..5f76e7161b Binary files /dev/null and b/fsfe.org/order/data/pictures/hoodie-fourfreedoms-38c3-black-back-large.png differ diff --git a/fsfe.org/order/data/pictures/hoodie-fourfreedoms-38c3-black-back-small.png b/fsfe.org/order/data/pictures/hoodie-fourfreedoms-38c3-black-back-small.png new file mode 100644 index 0000000000..dbe43ea1e5 Binary files /dev/null and b/fsfe.org/order/data/pictures/hoodie-fourfreedoms-38c3-black-back-small.png differ diff --git a/fsfe.org/order/data/pictures/hoodie-fourfreedoms-38c3-blue-back-large.png b/fsfe.org/order/data/pictures/hoodie-fourfreedoms-38c3-blue-back-large.png new file mode 100644 index 0000000000..137a2d566e Binary files /dev/null and b/fsfe.org/order/data/pictures/hoodie-fourfreedoms-38c3-blue-back-large.png differ diff --git a/fsfe.org/order/data/pictures/hoodie-fourfreedoms-38c3-blue-back-small.png b/fsfe.org/order/data/pictures/hoodie-fourfreedoms-38c3-blue-back-small.png new file mode 100644 index 0000000000..9761fd0c9a Binary files /dev/null and b/fsfe.org/order/data/pictures/hoodie-fourfreedoms-38c3-blue-back-small.png differ diff --git a/fsfe.org/order/order.de.xhtml b/fsfe.org/order/order.de.xhtml index 12cb0f0bb2..93578f07d9 100644 --- a/fsfe.org/order/order.de.xhtml +++ b/fsfe.org/order/order.de.xhtml @@ -18,7 +18,7 @@