WooCommerce Germanized - Version 1.2.0

Version Description

  • Feature - Better shipping and fee taxation
  • Feature - Now supporting WooCommerce 2.3
  • Fix - Template location improvement
Download this release

Release Info

Developer vendidero
Plugin Icon 128x128 WooCommerce Germanized
Version 1.2.0
Comparing to
See all releases

Code changes from version 1.1.1 to 1.2.0

assets/css/woocommerce-gzd-admin.css CHANGED
@@ -60,4 +60,13 @@ table.data_table tr td p.form-field {
60
 
61
  .wc-gzd-button-wrapper .button {
62
  margin-right: 1em;
 
 
 
 
 
 
 
 
 
63
  }
60
 
61
  .wc-gzd-button-wrapper .button {
62
  margin-right: 1em;
63
+ }
64
+
65
+ table.wc-gzd-tax-example tr th, table.wc-gzd-tax-example tr td {
66
+ padding: 5px;
67
+ font-size: 0.9em;
68
+ }
69
+
70
+ table.wc-gzd-tax-example tr th:first-child, table.wc-gzd-tax-example tr td:first-child {
71
+ padding-left: 0;
72
  }
assets/css/woocommerce-gzd-layout.css CHANGED
@@ -83,6 +83,18 @@ p.footer-info {
83
  .wc-gzd-item-desc p {
84
  font-size: 0.9em;
85
  }
 
 
 
 
 
 
 
 
 
 
 
 
86
  .wc-gzd-trusted-shops-rating-widget {
87
  line-height: 1.5rem;
88
  }
83
  .wc-gzd-item-desc p {
84
  font-size: 0.9em;
85
  }
86
+ table.product-details-inner {
87
+ table-layout:fixed;
88
+ }
89
+ table.product-details-inner, table.product-details-inner tr, table.product-details-inner td {
90
+ padding: 0;
91
+ margin: 0;
92
+ border: none;
93
+ background: transparent;
94
+ }
95
+ table.product-details-inner tr td:last-child {
96
+ text-align: right;
97
+ }
98
  .wc-gzd-trusted-shops-rating-widget {
99
  line-height: 1.5rem;
100
  }
assets/js/add-to-cart-variation.js CHANGED
@@ -4,6 +4,7 @@
4
  ;(function ( $, window, document, undefined ) {
5
 
6
  function reset_variation() {
 
7
  if ( $('.type-product').find('.org_price').length > 0 ) {
8
  $( '.type-product .price.variation_modified:not(.price-unit)' ).html( $('.type-product').find('.org_price').html() ).removeClass('variation_modified').show();
9
  }
@@ -20,28 +21,28 @@
20
  $.fn.wc_gzd_variation_form = function () {
21
 
22
  $form = this
 
23
 
24
  .on( 'found_variation', function( event, variation ) {
25
- if ( ! $('.type-product .price').hasClass('variation_modified') ) {
26
- $('.type-product').append( '<div class="org_price org_product_info">' + $('.product .summary .price').html() + '</div>' );
27
- if ( $( '.type-product .delivery-time-info' ).length > 0 ) {
28
- $('.type-product').append( '<div class="org_delivery_time org_product_info">' + $('.product .summary .delivery-time-info').html() + '</div>' );
29
- }
30
- if ( $( '.type-product .price-unit' ).length > 0 )
31
- $('.type-product').append( '<div class="org_unit_price org_product_info">' + $('.product .summary .price-unit').html() + '</div>' );
32
- $('.org_product_info').hide();
33
  }
34
  if ( variation.price_html != '' ) {
35
- $('.single_variation .price').hide();
36
- $('.type-product .price').html( variation.price_html ).addClass('variation_modified');
37
  }
38
- $('.type-product .delivery-time-info').hide();
39
- $('.type-product .price-unit').hide();
40
  if ( variation.delivery_time != '' )
41
- $('p.delivery-time-info').html( variation.delivery_time ).addClass('variation_modified').show();
42
  if ( variation.unit_price != '' ) {
43
- $('.type-product .price-unit').remove();
44
- $('.type-product div[itemprop="offers"]').after('<p class="price price-unit smaller variation_modified">' + variation.unit_price + '</p>').show();
45
  }
46
  })
47
 
4
  ;(function ( $, window, document, undefined ) {
5
 
6
  function reset_variation() {
7
+
8
  if ( $('.type-product').find('.org_price').length > 0 ) {
9
  $( '.type-product .price.variation_modified:not(.price-unit)' ).html( $('.type-product').find('.org_price').html() ).removeClass('variation_modified').show();
10
  }
21
  $.fn.wc_gzd_variation_form = function () {
22
 
23
  $form = this
24
+ $wrapper = $form.parents( '.type-product' )
25
 
26
  .on( 'found_variation', function( event, variation ) {
27
+ if ( ! $wrapper.find( '.price:first' ).hasClass( 'variation_modified' ) ) {
28
+ $wrapper.append( '<div class="org_price org_product_info">' + $wrapper.find( '.price:not(.price-unit):first' ).html() + '</div>' );
29
+ if ( $wrapper.find( '.delivery-time-info:first' ).length > 0 )
30
+ $wrapper.append( '<div class="org_delivery_time org_product_info">' + $wrapper.find( '.delivery-time-info:first' ).html() + '</div>' );
31
+ if ( $wrapper.find( '.price-unit:first' ).length > 0 )
32
+ $wrapper.append( '<div class="org_unit_price org_product_info">' + $wrapper.find( '.price-unit:first' ).html() + '</div>' );
33
+ $( '.org_product_info' ).hide();
 
34
  }
35
  if ( variation.price_html != '' ) {
36
+ $( '.single_variation .price' ).hide();
37
+ $wrapper.find( '.price:not(.price-unit):first' ).html( variation.price_html ).addClass( 'variation_modified' );
38
  }
39
+ $wrapper.find( '.delivery-time-info:first' ).hide();
40
+ $wrapper.find( '.price-unit:first' ).hide();
41
  if ( variation.delivery_time != '' )
42
+ $wrapper.find( 'p.delivery-time-info:first' ).html( variation.delivery_time ).addClass('variation_modified').show();
43
  if ( variation.unit_price != '' ) {
44
+ $wrapper.find( '.price-unit:first' ).remove();
45
+ $wrapper.find( 'div[itemprop="offers"]:first' ).after('<p class="price price-unit smaller variation_modified">' + variation.unit_price + '</p>').show();
46
  }
47
  })
48
 
i18n/languages/woocommerce-germanized-de_DE.mo CHANGED
Binary file
i18n/languages/woocommerce-germanized-de_DE.po CHANGED
@@ -1,9 +1,9 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: WooCommerce Germanized v1.1.1\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2014-09-29 12:26+0100\n"
6
- "PO-Revision-Date: 2015-01-28 19:08:37+0000\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -94,8 +94,8 @@ msgstr "zu den WooCommerce Germanized Einstellungen"
94
  #: includes/admin/class-wc-gzd-admin.php:37
95
  #: includes/class-wc-gzd-checkout.php:22
96
  #: includes/class-wc-gzd-checkout.php:31
97
- #: woocommerce-germanized.php:83
98
- #: woocommerce-germanized.php:92
99
  #@ woocommerce-germanized
100
  msgid "Cheatin&#8217; huh?"
101
  msgstr "So geht das leider nicht.."
@@ -201,7 +201,7 @@ msgid "eKomi Options"
201
  msgstr "eKomi Optionen"
202
 
203
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:66
204
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:304
205
  #@ woocommerce-germanized
206
  msgid "General"
207
  msgstr "Allgemein"
@@ -362,202 +362,202 @@ msgstr "Dieser Text wird genutzt um die Kunden im Frontend über u.U. anfallende
362
  msgid "plus {link}Shipping Costs{/link}"
363
  msgstr "zzgl. {link}Versandkosten{/link}"
364
 
365
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:226
366
  #@ woocommerce-germanized
367
  msgid "Right of Recission"
368
  msgstr "Widerrufsrecht"
369
 
370
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:229
371
  #@ woocommerce-germanized
372
  msgid "Revocation Address"
373
  msgstr "Widerruf richten an"
374
 
375
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:230
376
  #@ woocommerce-germanized
377
  msgid "Type in an address, telephone/telefax number, email address which is to be used as revocation address"
378
  msgstr "Geben Sie hier Ihre Adresse, Telefon- und Faxnummer, E-Mail Adresse usw. an, an die Ihre Kunden Ihren Widerruf richten sollen"
379
 
380
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:239
381
  #@ woocommerce-germanized
382
  msgid "E-Mails"
383
  msgstr "E-Mails"
384
 
385
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:242
386
  #@ woocommerce-germanized
387
  msgid "Attach Imprint"
388
  msgstr "Impressum"
389
 
390
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:243
391
  #@ woocommerce-germanized
392
  msgid "Attach Imprint to the following email templates"
393
  msgstr "Hier können Sie die E-Mail Templates auswählen, an die das Impressum angehängt werden soll (Inhalt der oben ausgewählten Impressum-Seite bzw. des optionalen E-Mail Inhaltes dieser Seite)"
394
 
395
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:252
396
  #@ woocommerce-germanized
397
  msgid "Attach Terms & Conditions"
398
  msgstr "AGB"
399
 
400
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:253
401
  #@ woocommerce-germanized
402
  msgid "Attach Terms & Conditions to the following email templates"
403
  msgstr "Hier können Sie die E-Mail Templates auswählen, an die die AGB angehängt werden soll (Inhalt der in den WooCommerce-Einstellungen ausgewählten AGB-Seite bzw. des optionalen E-Mail Inhaltes dieser Seite)"
404
 
405
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:262
406
  #@ woocommerce-germanized
407
  msgid "Attach Power of Recission"
408
  msgstr "Widerrufsbelehrung"
409
 
410
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:263
411
  #@ woocommerce-germanized
412
  msgid "Attach Power of Recission to the following email templates"
413
  msgstr "Hier können Sie die E-Mail Templates auswählen, an die die Widerrufsbelehrung angehängt werden soll (Inhalt der oben ausgewählten Widerrufsbelehrungs-Seite bzw. des optionalen E-Mail Inhaltes dieser Seite). Standardmäßig sollte hier zumindest \"Bestellung in Abwicklung\" ausgewählt werden."
414
 
415
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:273
416
  #@ woocommerce-germanized
417
  msgid "Attach Data Security"
418
  msgstr "Datenschutzbelehrung"
419
 
420
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:274
421
  #@ woocommerce-germanized
422
  msgid "Attach Data Security Statement to the following email templates"
423
  msgstr "Hier können Sie die E-Mail Templates auswählen, an die die Datenschutzbelehrung angehängt werden soll (Inhalt der oben ausgewählten Datenschutzbelehrungs-Seite bzw. des optionalen E-Mail Inhaltes dieser Seite)"
424
 
425
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:307
426
  #@ woocommerce-germanized
427
  msgid "Add to Cart"
428
  msgstr "Zum Warenkorb Button"
429
 
430
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:308
431
  #@ woocommerce-germanized
432
  msgid "Show add to cart button on listings?"
433
  msgstr "Den zum Warenkorb Button in Produktlisten darstellen?"
434
 
435
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:312
436
  #@ woocommerce-germanized
437
  msgid "unset this option if you don't want to show the add to cart button within the product listings"
438
  msgstr "Deaktivieren Sie diese Option, wenn Sie den zum Warenkorb Button nicht innerhalb von Produktauflistungen darstellen möchten"
439
 
440
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:334
441
  #@ woocommerce-germanized
442
  msgid "Notice Footer"
443
  msgstr "Hinweise im Footer"
444
 
445
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:335
446
  #@ woocommerce-germanized
447
  msgid "Show a global VAT notice within footer"
448
  msgstr "Einen seitenübergreifenden Hinweis bzgl. der MwSt. im Footer darstellen"
449
 
450
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:343
451
  #@ woocommerce-germanized
452
  msgid "Show a global sale price notice within footer"
453
  msgstr "Einen seitenübergreifenden Hinweis bzgl. reduzierter Preise im Footer darstellen"
454
 
455
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:352
456
  #@ woocommerce-germanized
457
  msgid "Products"
458
  msgstr "Produkt"
459
 
460
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:355
461
  #@ woocommerce-germanized
462
  msgid "Show within Product Listings"
463
  msgstr "In Produktlisten"
464
 
465
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:356
466
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:389
467
  #@ woocommerce-germanized
468
  msgid "Shipping Costs notice"
469
  msgstr "Versandkosten-Hinweis"
470
 
471
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:212
472
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:372
473
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:405
474
  #@ woocommerce-germanized
475
  msgid "Unit Price"
476
  msgstr "Einheitspreis"
477
 
478
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:380
479
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:413
480
  #@ woocommerce-germanized
481
  msgid "Delivery Time Notice"
482
  msgstr "Lieferzeiten-Hinweis"
483
 
484
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:388
485
  #@ woocommerce-germanized
486
  msgid "Show on Product Detail Page"
487
  msgstr "Auf der Produktseite"
488
 
489
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:364
490
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:397
491
  #@ woocommerce-germanized
492
  msgid "Tax Info"
493
  msgstr "MwSt. Hinweis"
494
 
495
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:430
496
  #@ woocommerce-germanized
497
  msgid "Checkout & Cart"
498
  msgstr "Checkout & Warenkorb"
499
 
500
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:477
501
  #@ woocommerce-germanized
502
  msgid "Checkout Legal Display"
503
  msgstr "Checkbox oder Text"
504
 
505
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:478
506
  #@ woocommerce-germanized
507
  msgid "Use Text without Checkbox"
508
  msgstr "Rechtshinweis ohne Checkbox"
509
 
510
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:480
511
  #@ woocommerce-germanized
512
  msgid "This version will remove checkboxes from Checkout and display a text instead. This seems to be legally compliant (Zalando & Co are using this option)."
513
  msgstr "Diese Option nutzt anstatt einer Checkbox einen ausformulierten Text direkt überhalb des Kauf abschließen Buttons (Zalando und Andere Shops verwenden diese Form)"
514
 
515
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:486
516
  #@ woocommerce-germanized
517
  msgid "Legal Text"
518
  msgstr "Rechtlicher Hinweistext"
519
 
520
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:487
521
  #@ woocommerce-germanized
522
  msgid "Choose a Plain Text which will be shown right above checkout submit button. Use {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link} as Placeholders for the links to legal pages."
523
  msgstr "Geben Sie hier den Text ein, den Sie als Hinweistext überhalb des \"Kaufen\" - Buttons darstellen möchten. Nutzen Sie die Platzhalter {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link} um die jeweiligen Links zu den Seiten einzufügen."
524
 
525
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:489
526
  #@ woocommerce-germanized
527
  msgid "With your order, you agree to have read and understood our {term_link}Terms and Conditions{/term_link} and your {revocation_link}Right of Recission{/revocation_link}."
528
  msgstr "Mit Ihrer Bestellung erklären Sie sich mit unseren {term_link}Allgemeinen Geschäftsbedingungen{/term_link} und {revocation_link}Widerrufsbestimmungen{/revocation_link} einverstanden."
529
 
530
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:496
531
  #@ woocommerce-germanized
532
  msgid "Legal Text Error"
533
  msgstr "Fehlermeldung der Checkbox"
534
 
535
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:497
536
  #@ woocommerce-germanized
537
  msgid "If you have chosen to use checkbox validation please choose a error message which will be shown if the user doesn't check checkbox. Use {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link} as Placeholders for the links to legal pages."
538
  msgstr "Falls Sie sich dazu entschieden haben, eine Checkbox zu nutzen, können Sie hier die Fehlermeldung eingeben, die angezeigt wird, wenn ein Benutzer die Checkbox nicht aktiviert hat. Nutzen Sie die Platzhalter um Links zu den jeweiligen Hinweisseiten einzufügen: {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link}"
539
 
540
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:499
541
  #@ woocommerce-germanized
542
  msgid "To finish the order you have to accept to our {term_link}Terms and Conditions{/term_link} and {revocation_link}Right of Recission{/revocation_link}."
543
  msgstr "Bitte akzeptieren Sie unsere {term_link}Allgemeinen Geschäftsbedingungen{/term_link} und {revocation_link}Widerrufsbestimmungen{/revocation_link}."
544
 
545
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:525
546
  #@ woocommerce-germanized
547
  msgid "Order Success Text"
548
  msgstr "Bestellung eingegangen"
549
 
550
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:526
551
  #@ woocommerce-germanized
552
  msgid "Choose a custom text to display on order success page."
553
  msgstr "Hier können Sie einen individuellen kurzen Text eingeben, der nach der Bestellung ausgegeben wird."
554
 
555
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:534
556
  #@ woocommerce-germanized
557
  msgid "Order Success Data"
558
  msgstr "Bestellbestätigungs-Daten"
559
 
560
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:535
561
  #@ woocommerce-germanized
562
  msgid "Hide product table and customer data on order success page"
563
  msgstr "Zusätzliche Produktdetails (Tabelle, Kundeninformationen) von der Bestellbestätigungs-Seite entfernen"
@@ -626,8 +626,8 @@ msgctxt "revocation-form"
626
  msgid "Thank you. We have received your Revocation Request. You will receive a conformation email within a few minutes."
627
  msgstr "Vielen Dank. Wir haben Ihre Widerruf erhalten. Sie bekommen in Kürze eine E-Mail mit Ihre Daten als Bestätigung."
628
 
629
- #: includes/class-wc-gzd-checkout.php:60
630
- #: includes/class-wc-gzd-checkout.php:71
631
  #: includes/widgets/class-wc-gzd-widget-trusted-shops-reviews.php:26
632
  #: includes/widgets/class-wc-gzd-widget-trusted-shops-rich-snippets.php:26
633
  #@ woocommerce-germanized
@@ -635,14 +635,14 @@ msgstr "Vielen Dank. Wir haben Ihre Widerruf erhalten. Sie bekommen in Kürze ei
635
  msgid "Title"
636
  msgstr "Anrede"
637
 
638
- #: includes/class-wc-gzd-checkout.php:61
639
- #: includes/class-wc-gzd-checkout.php:69
640
  #@ woocommerce-germanized
641
  msgid "Sir"
642
  msgstr "Herr"
643
 
644
- #: includes/class-wc-gzd-checkout.php:61
645
- #: includes/class-wc-gzd-checkout.php:69
646
  #@ woocommerce-germanized
647
  msgid "Madam"
648
  msgstr "Frau"
@@ -730,7 +730,7 @@ msgctxt "ekomi"
730
  msgid "Number of days between an order being marked as completed and review email to customer."
731
  msgstr "Anzahl der Tage zwischen dem Datum an dem die Bestellung als \"abgeschlossen\" (completed) markiert wurde und dem Absenden der Bewertungseinladung an den Kunden"
732
 
733
- #: includes/class-wc-gzd-emails.php:118
734
  #@ woocommerce-germanized
735
  msgctxt "revocation-form"
736
  msgid "Forward your Revocation online"
@@ -1092,9 +1092,9 @@ msgstr "Mwst. berechnen?"
1092
  msgid "Payment charge"
1093
  msgstr "Zahlungsgebühr"
1094
 
1095
- #: includes/abstracts/abstract-wc-gzd-product.php:91
1096
- #: includes/wc-gzd-cart-functions.php:68
1097
- #: woocommerce-germanized.php:739
1098
  #, php-format
1099
  #@ woocommerce-germanized
1100
  msgid "incl. %s%% VAT"
@@ -1110,8 +1110,8 @@ msgstr "Bestellung bearbeiten"
1110
  msgid "Choose a Payment Gateway"
1111
  msgstr "Zahlungsmethode auswählen"
1112
 
1113
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:518
1114
- #: includes/wc-gzd-cart-functions.php:103
1115
  #@ woocommerce-germanized
1116
  msgid "I want immediate access to the digital content and I acknowledge that thereby I lose my right to cancel once the service has begun."
1117
  msgstr "Ja, ich möchte sofort Zugang zu dem digitalen Inhalt und weiß, dass mein Widerrufsrecht mit dem Zugang erlischt."
@@ -1136,60 +1136,68 @@ msgctxt "trusted-shops"
1136
  msgid "Trusted Shops Reviews"
1137
  msgstr "Trusted Shops Bewertung"
1138
 
1139
- #: templates/checkout/review-order.php:116
 
1140
  #@ woocommerce
1141
  msgid "Cart Subtotal"
1142
  msgstr "Zwischensumme"
1143
 
1144
- #: templates/checkout/review-order.php:170
 
1145
  #@ woocommerce
1146
  msgid "Order Total"
1147
  msgstr "Gesamtsumme"
1148
 
1149
- #: templates/checkout/form-pay.php:57
1150
- #: templates/checkout/review-order.php:70
 
 
1151
  #@ woocommerce
1152
  msgid "Product"
1153
  msgstr "Produkt"
1154
 
1155
- #: templates/checkout/review-order.php:71
1156
- #@ woocommerce
1157
- msgid "Total"
1158
- msgstr "gesamt"
1159
-
1160
- #: templates/checkout/review-order.php:51
1161
  #@ woocommerce
1162
  msgid "Please fill in your details above to see available payment methods."
1163
  msgstr "Bitte geben Sie Ihre Informationen ein, damit Sie die zu Verfügung stehenden Zahlungsmethoden sehen können."
1164
 
1165
- #: templates/checkout/review-order.php:53
 
1166
  #@ woocommerce
1167
  msgid "Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements."
1168
  msgstr "Es tut uns Leid! Leider gibt es für Sie aktuell keine passende Zahlungsmethode. Bitte nehmen Sie mit uns Kontakt auf, damit wir Ihnen eine individuelle Lösung anbieten können."
1169
 
1170
- #: templates/checkout/form-pay.php:52
1171
- #: templates/checkout/review-order.php:63
 
 
1172
  #@ woocommerce
1173
  msgid "Your order"
1174
  msgstr "Ihre Bestellung"
1175
 
1176
- #: templates/checkout/review-order.php:181
 
1177
  #@ woocommerce
1178
  msgid "Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so."
1179
  msgstr "Da Ihr Browser kein JavaScript erlaubt, denken Sie bitte daran, auf \"Gesamtsumme aktualisieren\" zu klicken, bevor Sie den Auftrag absenden. "
1180
 
1181
- #: templates/checkout/review-order.php:181
 
1182
  #@ woocommerce
1183
  msgid "Update totals"
1184
  msgstr "Gesamtsumme aktualisieren"
1185
 
1186
- #: templates/checkout/review-order.php:197
 
1187
  #, php-format
1188
  #@ woocommerce
1189
  msgid "I&rsquo;ve read and accept the <a href=\"%s\" target=\"_blank\">terms &amp; conditions</a>"
1190
  msgstr "Ich habe die <a href=\"%s\" target=\"_blank\">Allgemeinen Geschäftsbedingungen</a> gelesen und akzeptiert."
1191
 
1192
- #: templates/checkout/review-order.php:188
 
 
1193
  #@ woocommerce
1194
  msgid "Place order"
1195
  msgstr "Jetzt kaufen"
@@ -1270,17 +1278,17 @@ msgid "Forward Revocation"
1270
  msgstr "Widerruf erklären"
1271
 
1272
  #: templates/single-product/legal-info.php:19
1273
- #: templates/single-product/small-business-info.php:14
1274
  #@ woocommerce-germanized
1275
  msgid "VAT free based on &#167;19 UStG"
1276
  msgstr "Kein Mehrwertsteuerausweis, da Kleinunternehmer nach §19 (1) UStG."
1277
 
1278
- #: woocommerce-germanized.php:529
1279
  #@ woocommerce
1280
  msgid "Settings"
1281
  msgstr "Einstellungen"
1282
 
1283
- #: woocommerce-germanized.php:717
1284
  #@ woocommerce
1285
  msgid "Order Total:"
1286
  msgstr "Gesamtsumme"
@@ -1315,27 +1323,32 @@ msgstr "Vendidero"
1315
  msgid "http://vendidero.de"
1316
  msgstr "http://vendidero.de"
1317
 
1318
- #: templates/checkout/form-pay.php:58
 
1319
  #@ woocommerce
1320
  msgid "Qty"
1321
  msgstr ""
1322
 
1323
- #: templates/checkout/form-pay.php:59
 
1324
  #@ woocommerce
1325
  msgid "Totals"
1326
  msgstr ""
1327
 
 
1328
  #: templates/checkout/form-pay.php:19
1329
  #@ woocommerce
1330
  msgid "Payment"
1331
  msgstr ""
1332
 
 
1333
  #: templates/checkout/form-pay.php:44
1334
  #@ woocommerce
1335
  msgid "Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements."
1336
  msgstr ""
1337
 
1338
- #: templates/checkout/form-pay.php:93
 
1339
  #@ woocommerce
1340
  msgid "Pay for order"
1341
  msgstr ""
@@ -1470,12 +1483,12 @@ msgctxt "trusted-shops"
1470
  msgid "%s of %s based on %s <a href=\"%s\" target=\"_blank\">ratings</a>."
1471
  msgstr "%s von %s basierend auf %s <a href=\"%s\" target=\"_blank\">Bewertungen</a>."
1472
 
1473
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:469
1474
  #@ woocommerce-germanized
1475
  msgid "Checkout Table Color"
1476
  msgstr "Hintergrundfarbe der Tabelle"
1477
 
1478
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:471
1479
  #@ woocommerce-germanized
1480
  msgid "Choose the color of your checkout product table. This table should be highlighted within your checkout page."
1481
  msgstr "Wähle die Farbe des Hintergrundes deiner Produkt-Tabelle im Checkout. Die Tabelle sollte sich farblich vom Rest des Inhalts abheben."
@@ -1485,12 +1498,6 @@ msgstr "Wähle die Farbe des Hintergrundes deiner Produkt-Tabelle im Checkout. D
1485
  msgid "Theme incompatibility found"
1486
  msgstr "Theme Inkompatibilität entdeckt"
1487
 
1488
- #: includes/admin/views/html-notice-theme-incompatibility.php:15
1489
- #, php-format
1490
- #@ woocommerce-germanized
1491
- msgid "It seems like your theme tries to overwrite legally relevant templates. Please review your checkout page. Some things might look weird because WooCommerce Germanized had to stop template overriding for legal purposes. See <a href=\"%s\" target=\"_blank\">making your theme compatible</a> or check out our Theme <a href=\"%s\" target=\"_blank\">VendiPro</a> for 100&#37; compatibility."
1492
- msgstr "Es sieht so aus als wenn dein aktuelles Theme versucht rechtlich relevante Template zu überschreiben. Bitte überprüfe deinen Shop und insbesondere den Bezahlvorgang. WooCommerce Germanized musste das Überschreiben dieser Templates verhindern um für Rechtssicherheit sorgen zu können. Bitte lies dazu <a href=\"%s\" target=\"_blank\">mein Theme kompatibel machen</a> oder schau dir das von uns entwickelte Theme <a href=\"%s\" target=\"_blank\">VendiPro</a>für 100&#37; Kompatibilität an."
1493
-
1494
  #: includes/admin/views/html-notice-theme-incompatibility.php:17
1495
  #: includes/admin/views/html-notice-theme-not-ready.php:17
1496
  #@ woocommerce-germanized
@@ -1520,42 +1527,42 @@ msgstr "Wir haben festgestellt, dass dein Theme scheinbar noch nicht für WooCom
1520
  msgid "Check if fee is taxable."
1521
  msgstr "MwSt.-Berechnung für Gebühr aktivieren."
1522
 
1523
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:515
1524
  #@ woocommerce-germanized
1525
  msgid "Legal Digital Text"
1526
  msgstr "Hinweis Digital"
1527
 
1528
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:516
1529
  #@ woocommerce-germanized
1530
  msgid "Choose a Plain Text which will be shown right above checkout submit button if a user has picked a digital product. See legal text option for possible placeholders."
1531
  msgstr "Passen Sie hier optional den Hinweistext an, der angezeigt wird, wenn ein Kunde ein digitales Produkt im Warenkorb hat. Sie können hier die gleichen Platzhalter verwenden wie beim Rechtlichen Hinweistext"
1532
 
1533
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:316
1534
  #@ woocommerce-germanized
1535
  msgid "Link to Details"
1536
  msgstr "Verlinkung zu Produktdetails"
1537
 
1538
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:317
1539
  #@ woocommerce-germanized
1540
  msgid "Want to link to product details page instead of add to cart within listings?"
1541
  msgstr "Anstatt des zum Warenkorb Buttons einen Button zur Produktdetail-Seite einfügen?"
1542
 
1543
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:321
1544
  #@ woocommerce-germanized
1545
  msgid "Decide whether you like to link to your product's details page instead of displaying an add to cart button within product listings."
1546
  msgstr "Wenn du lieber einen Link zu deiner Produktseite anstatt eines zum Warenkorb Buttons innerhalb von Produktauflistungen haben möchtest, dann setze einfach diese Option."
1547
 
1548
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:325
1549
  #@ woocommerce-germanized
1550
  msgid "Product Details Text"
1551
  msgstr "Produktdetails Text"
1552
 
1553
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:327
1554
  #@ woocommerce-germanized
1555
  msgid "Details"
1556
  msgstr "Details"
1557
 
1558
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:329
1559
  #@ woocommerce-germanized
1560
  msgid "If you have chosen to link to product details page instead of add to cart URL you may want to change the button text."
1561
  msgstr "Wenn du dich dazu entschlossen hast, lieber auf die Produktseite zu verlinken anstatt den zum Warenkorb Button einzublenden, kannst du hier einen Button-Text vergeben."
@@ -1654,44 +1661,44 @@ msgstr "jetzt Bewertung verfassen"
1654
  msgid "Found Bugs?"
1655
  msgstr "Bugs oder Wünsche melden"
1656
 
1657
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:421
1658
  #@ woocommerce-germanized
1659
  msgid "Shipping Costs for Virtual"
1660
  msgstr "Versandkosten virtuell"
1661
 
1662
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:422
1663
  #@ woocommerce-germanized
1664
  msgid "Select this option if you want to display shipping costs notice for virtual products."
1665
  msgstr "Versandkosten-Hinweis auch für virtuelle Produkte aktivieren?"
1666
 
1667
- #: includes/abstracts/abstract-wc-gzd-product.php:90
1668
- #: includes/wc-gzd-cart-functions.php:68
1669
- #: woocommerce-germanized.php:739
1670
  #@ woocommerce-germanized
1671
  msgid "incl. VAT"
1672
  msgstr "inkl. MwSt."
1673
 
1674
- #: includes/abstracts/abstract-wc-gzd-product.php:90
1675
  #@ woocommerce-germanized
1676
  msgid "excl. VAT"
1677
  msgstr "exkl. MwSt."
1678
 
1679
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:284
1680
  #@ woocommerce-germanized
1681
  msgid "Virtual VAT"
1682
  msgstr "USt. Änderung 2015"
1683
 
1684
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:287
1685
  #@ woocommerce-germanized
1686
  msgid "Enable Virtual VAT"
1687
  msgstr "USt. Anpassung aktivieren"
1688
 
1689
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:288
1690
  #@ woocommerce-germanized
1691
  msgid "Enable if you want to charge your customer's countries' VAT for virtual products."
1692
  msgstr "Aktiviere diese Option um für virtuelle Produkte den USt.-Satz des Dienstleistungsempfängers zu berechnen."
1693
 
1694
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:292
1695
  #, php-format
1696
  #@ woocommerce-germanized
1697
  msgid "New EU VAT rule applies on 01.01.2015. Make sure that every digital or virtual product has chosen the right tax class (Virtual Rate or Virtual Reduced Rate). Gross prices will not differ from the prices you have chosen for affected products. In fact the net price will differ depending on the VAT rate of your customers' country. Shop settings will be adjusted to show prices including tax. More information can be found <a href=\"%s\" target=\"_blank\">here</a>."
@@ -1724,22 +1731,22 @@ msgstr "Wir übernehmen das Einfügen der unterschiedlichen EU MwSt.-Sätze für
1724
  msgid "Update WooCommerce Germanized"
1725
  msgstr "WooCommerce Germanized aktualisieren"
1726
 
1727
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:215
1728
  #@ woocommerce-germanized
1729
  msgid "Unit Price Text"
1730
  msgstr "Einheitspreis Text"
1731
 
1732
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:216
1733
  #@ woocommerce-germanized
1734
  msgid "This text will be used to display the unit price. Use {price} to insert the price."
1735
  msgstr "Dieser Text wird verwendet um den Einheitspreis darzustellen. Nutze {price} als Platzhalter für den eigentlichen Preis."
1736
 
1737
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:221
1738
  #@ woocommerce-germanized
1739
  msgid "{price}"
1740
  msgstr "{price}"
1741
 
1742
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:649
1743
  #@ woocommerce-germanized
1744
  msgid "Sorry, but the new Virtual VAT rules cannot be applied to small business."
1745
  msgstr "Sorry aber die neuen USt-Regelungen für virtuelle Produkte lassen sich leider nicht mit dem Kleinunternehmer vereinbaren. Bitte kontaktiere deinen Steuerberater für weitere Informationen."
@@ -1754,90 +1761,168 @@ msgstr "Anrede im Checkout"
1754
  msgid "Add a title field to the address within checkout?"
1755
  msgstr "Fügt ein Feld \"Anrede\" im Checkout hinzu."
1756
 
1757
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:506
1758
  #@ woocommerce-germanized
1759
  msgid "Show digital notice"
1760
  msgstr "Checkbox digitale Produkte"
1761
 
1762
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:507
1763
  #@ woocommerce-germanized
1764
  msgid "Show checkbox for digital products."
1765
  msgstr "Checkbox bei digitalen Produkten anzeigen"
1766
 
1767
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:508
1768
  #@ woocommerce-germanized
1769
  msgid "Disable this option if you want your customers to obtain their right of recission even if digital products are being bought."
1770
  msgstr "Diese Option setzt im Checkout eine Checkbox falls sich im Warenkorb digitale Produkte befinden. Hier können Kunden darauf aufmerksam gemacht werden, dass im Falle von digitalen Produkten das Widerrufsrecht erlischt."
1771
 
1772
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:442
1773
  #@ woocommerce-germanized
1774
  msgid "Show Thumbnails"
1775
  msgstr "Thumbnails anzeigen"
1776
 
1777
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:443
1778
  #@ woocommerce-germanized
1779
  msgid "Show product thumbnails on checkout page?"
1780
  msgstr "Produktbilder im Checkout darstellen?"
1781
 
1782
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:447
1783
  #@ woocommerce-germanized
1784
  msgid "Uncheck if you don't want to show your product thumbnails within checkout table."
1785
  msgstr "Deaktiviere diese Option, wenn du keine Produkbilder im Checkout angezeigt bekommen möchtest."
1786
 
1787
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:451
1788
  #@ woocommerce-germanized
1789
  msgid "Hide Shipping Select"
1790
  msgstr "Versandmethoden Auswahl"
1791
 
1792
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:452
1793
  #@ woocommerce-germanized
1794
  msgid "Hide shipping rate selection from checkout?"
1795
  msgstr "Die Auswahl von Versandmethoden im Checkout deaktivieren?"
1796
 
1797
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:456
1798
  #@ woocommerce-germanized
1799
  msgid "This option will hide shipping rate selection from checkout. By then customers will only be able to change their shipping rate on cart page."
1800
  msgstr "Diese Option deaktiviert die Darstellung der Versandmethoden Auswahl im Checkout. Kunden können von nun an nur noch über den Warenkorb die Versandmethode ändern."
1801
 
1802
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:433
1803
  #@ woocommerce-germanized
1804
  msgid "Hide taxes estimated"
1805
  msgstr "Hinweis \"Steuern geschätzt\""
1806
 
1807
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:434
1808
  #@ woocommerce-germanized
1809
  msgid "Do you want to hide the \"taxes and shipping estimated\" text from your cart?"
1810
  msgstr "Den Hinweis \"Versandkosten und Steuern werden geschätzt\" entfernen?"
1811
 
1812
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:438
1813
  #@ woocommerce-germanized
1814
  msgid "By default WooCommerce adds a \"taxes and shipping estimated\" text to your cart. This might puzzle your customers and may not meet german law."
1815
  msgstr "Der Hinweistext im Warenkorb zur Schätzung von Steuern und Versandkosten kann für Verwirrung beim Kunden sorgen und scheint nicht für den deutschen Markt geeignet."
1816
 
1817
- #: includes/abstracts/abstract-wc-gzd-product.php:91
1818
  #, php-format
1819
  #@ woocommerce-germanized
1820
  msgid "excl. %s%% VAT"
1821
  msgstr "exkl. %s%% MwSt."
1822
 
1823
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:460
1824
  #@ woocommerce-germanized
1825
  msgid "Show back to cart button"
1826
  msgstr "Bestellung bearbeiten"
1827
 
1828
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:461
1829
  #@ woocommerce-germanized
1830
  msgid "Show back to cart button within your checkout table?"
1831
  msgstr "Einen \"Bestellung bearbeiten\" Button in der Bestellübersicht anzeigen?"
1832
 
1833
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:465
1834
  #@ woocommerce-germanized
1835
  msgid "This button may let your customer edit their order before submitting. Some people state that this button should be hidden to avoid legal problems."
1836
  msgstr "Dieser Button ermöglicht es deinen Kunden etwaige Falscheingaben (d.h. fälschlich ausgewählte Produkte) zu korrigieren und zurück zum Warenkorb zu gelangen. Je nach Darstellung in deinem Theme könnte es allerdings auch das Risiko für Abmahnungen erhöhen, da zwischen Pflichtangaben und Kaufen-Button keine weitere Informationen abgedruckt werden sollten."
1837
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1838
  #. translators: plugin header field 'Version'
1839
  #: woocommerce-germanized.php:0
1840
  #@ woocommerce-germanized
1841
- msgid "1.1.1"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1842
  msgstr ""
1843
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: WooCommerce Germanized v1.1.2\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2014-09-29 12:26+0100\n"
6
+ "PO-Revision-Date: 2015-02-09 13:56:16+0000\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
94
  #: includes/admin/class-wc-gzd-admin.php:37
95
  #: includes/class-wc-gzd-checkout.php:22
96
  #: includes/class-wc-gzd-checkout.php:31
97
+ #: woocommerce-germanized.php:82
98
+ #: woocommerce-germanized.php:91
99
  #@ woocommerce-germanized
100
  msgid "Cheatin&#8217; huh?"
101
  msgstr "So geht das leider nicht.."
201
  msgstr "eKomi Optionen"
202
 
203
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:66
204
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:344
205
  #@ woocommerce-germanized
206
  msgid "General"
207
  msgstr "Allgemein"
362
  msgid "plus {link}Shipping Costs{/link}"
363
  msgstr "zzgl. {link}Versandkosten{/link}"
364
 
365
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:266
366
  #@ woocommerce-germanized
367
  msgid "Right of Recission"
368
  msgstr "Widerrufsrecht"
369
 
370
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:269
371
  #@ woocommerce-germanized
372
  msgid "Revocation Address"
373
  msgstr "Widerruf richten an"
374
 
375
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:270
376
  #@ woocommerce-germanized
377
  msgid "Type in an address, telephone/telefax number, email address which is to be used as revocation address"
378
  msgstr "Geben Sie hier Ihre Adresse, Telefon- und Faxnummer, E-Mail Adresse usw. an, an die Ihre Kunden Ihren Widerruf richten sollen"
379
 
380
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:279
381
  #@ woocommerce-germanized
382
  msgid "E-Mails"
383
  msgstr "E-Mails"
384
 
385
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:282
386
  #@ woocommerce-germanized
387
  msgid "Attach Imprint"
388
  msgstr "Impressum"
389
 
390
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:283
391
  #@ woocommerce-germanized
392
  msgid "Attach Imprint to the following email templates"
393
  msgstr "Hier können Sie die E-Mail Templates auswählen, an die das Impressum angehängt werden soll (Inhalt der oben ausgewählten Impressum-Seite bzw. des optionalen E-Mail Inhaltes dieser Seite)"
394
 
395
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:292
396
  #@ woocommerce-germanized
397
  msgid "Attach Terms & Conditions"
398
  msgstr "AGB"
399
 
400
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:293
401
  #@ woocommerce-germanized
402
  msgid "Attach Terms & Conditions to the following email templates"
403
  msgstr "Hier können Sie die E-Mail Templates auswählen, an die die AGB angehängt werden soll (Inhalt der in den WooCommerce-Einstellungen ausgewählten AGB-Seite bzw. des optionalen E-Mail Inhaltes dieser Seite)"
404
 
405
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:302
406
  #@ woocommerce-germanized
407
  msgid "Attach Power of Recission"
408
  msgstr "Widerrufsbelehrung"
409
 
410
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:303
411
  #@ woocommerce-germanized
412
  msgid "Attach Power of Recission to the following email templates"
413
  msgstr "Hier können Sie die E-Mail Templates auswählen, an die die Widerrufsbelehrung angehängt werden soll (Inhalt der oben ausgewählten Widerrufsbelehrungs-Seite bzw. des optionalen E-Mail Inhaltes dieser Seite). Standardmäßig sollte hier zumindest \"Bestellung in Abwicklung\" ausgewählt werden."
414
 
415
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:313
416
  #@ woocommerce-germanized
417
  msgid "Attach Data Security"
418
  msgstr "Datenschutzbelehrung"
419
 
420
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:314
421
  #@ woocommerce-germanized
422
  msgid "Attach Data Security Statement to the following email templates"
423
  msgstr "Hier können Sie die E-Mail Templates auswählen, an die die Datenschutzbelehrung angehängt werden soll (Inhalt der oben ausgewählten Datenschutzbelehrungs-Seite bzw. des optionalen E-Mail Inhaltes dieser Seite)"
424
 
425
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:347
426
  #@ woocommerce-germanized
427
  msgid "Add to Cart"
428
  msgstr "Zum Warenkorb Button"
429
 
430
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:348
431
  #@ woocommerce-germanized
432
  msgid "Show add to cart button on listings?"
433
  msgstr "Den zum Warenkorb Button in Produktlisten darstellen?"
434
 
435
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:352
436
  #@ woocommerce-germanized
437
  msgid "unset this option if you don't want to show the add to cart button within the product listings"
438
  msgstr "Deaktivieren Sie diese Option, wenn Sie den zum Warenkorb Button nicht innerhalb von Produktauflistungen darstellen möchten"
439
 
440
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:374
441
  #@ woocommerce-germanized
442
  msgid "Notice Footer"
443
  msgstr "Hinweise im Footer"
444
 
445
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:375
446
  #@ woocommerce-germanized
447
  msgid "Show a global VAT notice within footer"
448
  msgstr "Einen seitenübergreifenden Hinweis bzgl. der MwSt. im Footer darstellen"
449
 
450
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:383
451
  #@ woocommerce-germanized
452
  msgid "Show a global sale price notice within footer"
453
  msgstr "Einen seitenübergreifenden Hinweis bzgl. reduzierter Preise im Footer darstellen"
454
 
455
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:392
456
  #@ woocommerce-germanized
457
  msgid "Products"
458
  msgstr "Produkt"
459
 
460
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:395
461
  #@ woocommerce-germanized
462
  msgid "Show within Product Listings"
463
  msgstr "In Produktlisten"
464
 
465
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:396
466
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:429
467
  #@ woocommerce-germanized
468
  msgid "Shipping Costs notice"
469
  msgstr "Versandkosten-Hinweis"
470
 
471
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:252
472
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:412
473
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:445
474
  #@ woocommerce-germanized
475
  msgid "Unit Price"
476
  msgstr "Einheitspreis"
477
 
478
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:420
479
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:453
480
  #@ woocommerce-germanized
481
  msgid "Delivery Time Notice"
482
  msgstr "Lieferzeiten-Hinweis"
483
 
484
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:428
485
  #@ woocommerce-germanized
486
  msgid "Show on Product Detail Page"
487
  msgstr "Auf der Produktseite"
488
 
489
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:404
490
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:437
491
  #@ woocommerce-germanized
492
  msgid "Tax Info"
493
  msgstr "MwSt. Hinweis"
494
 
495
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:470
496
  #@ woocommerce-germanized
497
  msgid "Checkout & Cart"
498
  msgstr "Checkout & Warenkorb"
499
 
500
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:517
501
  #@ woocommerce-germanized
502
  msgid "Checkout Legal Display"
503
  msgstr "Checkbox oder Text"
504
 
505
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:518
506
  #@ woocommerce-germanized
507
  msgid "Use Text without Checkbox"
508
  msgstr "Rechtshinweis ohne Checkbox"
509
 
510
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:520
511
  #@ woocommerce-germanized
512
  msgid "This version will remove checkboxes from Checkout and display a text instead. This seems to be legally compliant (Zalando & Co are using this option)."
513
  msgstr "Diese Option nutzt anstatt einer Checkbox einen ausformulierten Text direkt überhalb des Kauf abschließen Buttons (Zalando und Andere Shops verwenden diese Form)"
514
 
515
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:526
516
  #@ woocommerce-germanized
517
  msgid "Legal Text"
518
  msgstr "Rechtlicher Hinweistext"
519
 
520
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:527
521
  #@ woocommerce-germanized
522
  msgid "Choose a Plain Text which will be shown right above checkout submit button. Use {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link} as Placeholders for the links to legal pages."
523
  msgstr "Geben Sie hier den Text ein, den Sie als Hinweistext überhalb des \"Kaufen\" - Buttons darstellen möchten. Nutzen Sie die Platzhalter {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link} um die jeweiligen Links zu den Seiten einzufügen."
524
 
525
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:529
526
  #@ woocommerce-germanized
527
  msgid "With your order, you agree to have read and understood our {term_link}Terms and Conditions{/term_link} and your {revocation_link}Right of Recission{/revocation_link}."
528
  msgstr "Mit Ihrer Bestellung erklären Sie sich mit unseren {term_link}Allgemeinen Geschäftsbedingungen{/term_link} und {revocation_link}Widerrufsbestimmungen{/revocation_link} einverstanden."
529
 
530
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:536
531
  #@ woocommerce-germanized
532
  msgid "Legal Text Error"
533
  msgstr "Fehlermeldung der Checkbox"
534
 
535
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:537
536
  #@ woocommerce-germanized
537
  msgid "If you have chosen to use checkbox validation please choose a error message which will be shown if the user doesn't check checkbox. Use {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link} as Placeholders for the links to legal pages."
538
  msgstr "Falls Sie sich dazu entschieden haben, eine Checkbox zu nutzen, können Sie hier die Fehlermeldung eingeben, die angezeigt wird, wenn ein Benutzer die Checkbox nicht aktiviert hat. Nutzen Sie die Platzhalter um Links zu den jeweiligen Hinweisseiten einzufügen: {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link}"
539
 
540
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:539
541
  #@ woocommerce-germanized
542
  msgid "To finish the order you have to accept to our {term_link}Terms and Conditions{/term_link} and {revocation_link}Right of Recission{/revocation_link}."
543
  msgstr "Bitte akzeptieren Sie unsere {term_link}Allgemeinen Geschäftsbedingungen{/term_link} und {revocation_link}Widerrufsbestimmungen{/revocation_link}."
544
 
545
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:565
546
  #@ woocommerce-germanized
547
  msgid "Order Success Text"
548
  msgstr "Bestellung eingegangen"
549
 
550
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:566
551
  #@ woocommerce-germanized
552
  msgid "Choose a custom text to display on order success page."
553
  msgstr "Hier können Sie einen individuellen kurzen Text eingeben, der nach der Bestellung ausgegeben wird."
554
 
555
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:574
556
  #@ woocommerce-germanized
557
  msgid "Order Success Data"
558
  msgstr "Bestellbestätigungs-Daten"
559
 
560
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:575
561
  #@ woocommerce-germanized
562
  msgid "Hide product table and customer data on order success page"
563
  msgstr "Zusätzliche Produktdetails (Tabelle, Kundeninformationen) von der Bestellbestätigungs-Seite entfernen"
626
  msgid "Thank you. We have received your Revocation Request. You will receive a conformation email within a few minutes."
627
  msgstr "Vielen Dank. Wir haben Ihre Widerruf erhalten. Sie bekommen in Kürze eine E-Mail mit Ihre Daten als Bestätigung."
628
 
629
+ #: includes/class-wc-gzd-checkout.php:62
630
+ #: includes/class-wc-gzd-checkout.php:73
631
  #: includes/widgets/class-wc-gzd-widget-trusted-shops-reviews.php:26
632
  #: includes/widgets/class-wc-gzd-widget-trusted-shops-rich-snippets.php:26
633
  #@ woocommerce-germanized
635
  msgid "Title"
636
  msgstr "Anrede"
637
 
638
+ #: includes/class-wc-gzd-checkout.php:63
639
+ #: includes/class-wc-gzd-checkout.php:71
640
  #@ woocommerce-germanized
641
  msgid "Sir"
642
  msgstr "Herr"
643
 
644
+ #: includes/class-wc-gzd-checkout.php:63
645
+ #: includes/class-wc-gzd-checkout.php:71
646
  #@ woocommerce-germanized
647
  msgid "Madam"
648
  msgstr "Frau"
730
  msgid "Number of days between an order being marked as completed and review email to customer."
731
  msgstr "Anzahl der Tage zwischen dem Datum an dem die Bestellung als \"abgeschlossen\" (completed) markiert wurde und dem Absenden der Bewertungseinladung an den Kunden"
732
 
733
+ #: includes/class-wc-gzd-emails.php:127
734
  #@ woocommerce-germanized
735
  msgctxt "revocation-form"
736
  msgid "Forward your Revocation online"
1092
  msgid "Payment charge"
1093
  msgstr "Zahlungsgebühr"
1094
 
1095
+ #: includes/abstracts/abstract-wc-gzd-product.php:93
1096
+ #: includes/wc-gzd-cart-functions.php:102
1097
+ #: woocommerce-germanized.php:773
1098
  #, php-format
1099
  #@ woocommerce-germanized
1100
  msgid "incl. %s%% VAT"
1110
  msgid "Choose a Payment Gateway"
1111
  msgstr "Zahlungsmethode auswählen"
1112
 
1113
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:558
1114
+ #: includes/wc-gzd-cart-functions.php:137
1115
  #@ woocommerce-germanized
1116
  msgid "I want immediate access to the digital content and I acknowledge that thereby I lose my right to cancel once the service has begun."
1117
  msgstr "Ja, ich möchte sofort Zugang zu dem digitalen Inhalt und weiß, dass mein Widerrufsrecht mit dem Zugang erlischt."
1136
  msgid "Trusted Shops Reviews"
1137
  msgstr "Trusted Shops Bewertung"
1138
 
1139
+ #: templates/checkout/review-order-2-2.php:116
1140
+ #: templates/checkout/review-order.php:66
1141
  #@ woocommerce
1142
  msgid "Cart Subtotal"
1143
  msgstr "Zwischensumme"
1144
 
1145
+ #: templates/checkout/review-order-2-2.php:170
1146
+ #: templates/checkout/review-order.php:113
1147
  #@ woocommerce
1148
  msgid "Order Total"
1149
  msgstr "Gesamtsumme"
1150
 
1151
+ #: templates/checkout/form-pay-2-2.php:57
1152
+ #: templates/checkout/form-pay.php:58
1153
+ #: templates/checkout/review-order-2-2.php:70
1154
+ #: templates/checkout/review-order.php:20
1155
  #@ woocommerce
1156
  msgid "Product"
1157
  msgstr "Produkt"
1158
 
1159
+ #: templates/checkout/payment.php:29
1160
+ #: templates/checkout/review-order-2-2.php:51
 
 
 
 
1161
  #@ woocommerce
1162
  msgid "Please fill in your details above to see available payment methods."
1163
  msgstr "Bitte geben Sie Ihre Informationen ein, damit Sie die zu Verfügung stehenden Zahlungsmethoden sehen können."
1164
 
1165
+ #: templates/checkout/payment.php:31
1166
+ #: templates/checkout/review-order-2-2.php:53
1167
  #@ woocommerce
1168
  msgid "Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements."
1169
  msgstr "Es tut uns Leid! Leider gibt es für Sie aktuell keine passende Zahlungsmethode. Bitte nehmen Sie mit uns Kontakt auf, damit wir Ihnen eine individuelle Lösung anbieten können."
1170
 
1171
+ #: includes/wc-gzd-template-functions.php:317
1172
+ #: templates/checkout/form-pay-2-2.php:52
1173
+ #: templates/checkout/form-pay.php:53
1174
+ #: templates/checkout/review-order-2-2.php:63
1175
  #@ woocommerce
1176
  msgid "Your order"
1177
  msgstr "Ihre Bestellung"
1178
 
1179
+ #: templates/checkout/order-submit.php:4
1180
+ #: templates/checkout/review-order-2-2.php:181
1181
  #@ woocommerce
1182
  msgid "Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so."
1183
  msgstr "Da Ihr Browser kein JavaScript erlaubt, denken Sie bitte daran, auf \"Gesamtsumme aktualisieren\" zu klicken, bevor Sie den Auftrag absenden. "
1184
 
1185
+ #: templates/checkout/order-submit.php:4
1186
+ #: templates/checkout/review-order-2-2.php:181
1187
  #@ woocommerce
1188
  msgid "Update totals"
1189
  msgstr "Gesamtsumme aktualisieren"
1190
 
1191
+ #: templates/checkout/order-submit.php:14
1192
+ #: templates/checkout/review-order-2-2.php:197
1193
  #, php-format
1194
  #@ woocommerce
1195
  msgid "I&rsquo;ve read and accept the <a href=\"%s\" target=\"_blank\">terms &amp; conditions</a>"
1196
  msgstr "Ich habe die <a href=\"%s\" target=\"_blank\">Allgemeinen Geschäftsbedingungen</a> gelesen und akzeptiert."
1197
 
1198
+ #: includes/wc-gzd-template-functions.php:308
1199
+ #: templates/checkout/order-submit.php:10
1200
+ #: templates/checkout/review-order-2-2.php:188
1201
  #@ woocommerce
1202
  msgid "Place order"
1203
  msgstr "Jetzt kaufen"
1278
  msgstr "Widerruf erklären"
1279
 
1280
  #: templates/single-product/legal-info.php:19
1281
+ #: templates/single-product/tax-info.php:18
1282
  #@ woocommerce-germanized
1283
  msgid "VAT free based on &#167;19 UStG"
1284
  msgstr "Kein Mehrwertsteuerausweis, da Kleinunternehmer nach §19 (1) UStG."
1285
 
1286
+ #: woocommerce-germanized.php:558
1287
  #@ woocommerce
1288
  msgid "Settings"
1289
  msgstr "Einstellungen"
1290
 
1291
+ #: woocommerce-germanized.php:746
1292
  #@ woocommerce
1293
  msgid "Order Total:"
1294
  msgstr "Gesamtsumme"
1323
  msgid "http://vendidero.de"
1324
  msgstr "http://vendidero.de"
1325
 
1326
+ #: templates/checkout/form-pay-2-2.php:58
1327
+ #: templates/checkout/form-pay.php:59
1328
  #@ woocommerce
1329
  msgid "Qty"
1330
  msgstr ""
1331
 
1332
+ #: templates/checkout/form-pay-2-2.php:59
1333
+ #: templates/checkout/form-pay.php:60
1334
  #@ woocommerce
1335
  msgid "Totals"
1336
  msgstr ""
1337
 
1338
+ #: templates/checkout/form-pay-2-2.php:19
1339
  #: templates/checkout/form-pay.php:19
1340
  #@ woocommerce
1341
  msgid "Payment"
1342
  msgstr ""
1343
 
1344
+ #: templates/checkout/form-pay-2-2.php:44
1345
  #: templates/checkout/form-pay.php:44
1346
  #@ woocommerce
1347
  msgid "Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements."
1348
  msgstr ""
1349
 
1350
+ #: templates/checkout/form-pay-2-2.php:93
1351
+ #: templates/checkout/form-pay.php:94
1352
  #@ woocommerce
1353
  msgid "Pay for order"
1354
  msgstr ""
1483
  msgid "%s of %s based on %s <a href=\"%s\" target=\"_blank\">ratings</a>."
1484
  msgstr "%s von %s basierend auf %s <a href=\"%s\" target=\"_blank\">Bewertungen</a>."
1485
 
1486
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:509
1487
  #@ woocommerce-germanized
1488
  msgid "Checkout Table Color"
1489
  msgstr "Hintergrundfarbe der Tabelle"
1490
 
1491
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:511
1492
  #@ woocommerce-germanized
1493
  msgid "Choose the color of your checkout product table. This table should be highlighted within your checkout page."
1494
  msgstr "Wähle die Farbe des Hintergrundes deiner Produkt-Tabelle im Checkout. Die Tabelle sollte sich farblich vom Rest des Inhalts abheben."
1498
  msgid "Theme incompatibility found"
1499
  msgstr "Theme Inkompatibilität entdeckt"
1500
 
 
 
 
 
 
 
1501
  #: includes/admin/views/html-notice-theme-incompatibility.php:17
1502
  #: includes/admin/views/html-notice-theme-not-ready.php:17
1503
  #@ woocommerce-germanized
1527
  msgid "Check if fee is taxable."
1528
  msgstr "MwSt.-Berechnung für Gebühr aktivieren."
1529
 
1530
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:555
1531
  #@ woocommerce-germanized
1532
  msgid "Legal Digital Text"
1533
  msgstr "Hinweis Digital"
1534
 
1535
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:556
1536
  #@ woocommerce-germanized
1537
  msgid "Choose a Plain Text which will be shown right above checkout submit button if a user has picked a digital product. See legal text option for possible placeholders."
1538
  msgstr "Passen Sie hier optional den Hinweistext an, der angezeigt wird, wenn ein Kunde ein digitales Produkt im Warenkorb hat. Sie können hier die gleichen Platzhalter verwenden wie beim Rechtlichen Hinweistext"
1539
 
1540
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:356
1541
  #@ woocommerce-germanized
1542
  msgid "Link to Details"
1543
  msgstr "Verlinkung zu Produktdetails"
1544
 
1545
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:357
1546
  #@ woocommerce-germanized
1547
  msgid "Want to link to product details page instead of add to cart within listings?"
1548
  msgstr "Anstatt des zum Warenkorb Buttons einen Button zur Produktdetail-Seite einfügen?"
1549
 
1550
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:361
1551
  #@ woocommerce-germanized
1552
  msgid "Decide whether you like to link to your product's details page instead of displaying an add to cart button within product listings."
1553
  msgstr "Wenn du lieber einen Link zu deiner Produktseite anstatt eines zum Warenkorb Buttons innerhalb von Produktauflistungen haben möchtest, dann setze einfach diese Option."
1554
 
1555
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:365
1556
  #@ woocommerce-germanized
1557
  msgid "Product Details Text"
1558
  msgstr "Produktdetails Text"
1559
 
1560
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:367
1561
  #@ woocommerce-germanized
1562
  msgid "Details"
1563
  msgstr "Details"
1564
 
1565
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:369
1566
  #@ woocommerce-germanized
1567
  msgid "If you have chosen to link to product details page instead of add to cart URL you may want to change the button text."
1568
  msgstr "Wenn du dich dazu entschlossen hast, lieber auf die Produktseite zu verlinken anstatt den zum Warenkorb Button einzublenden, kannst du hier einen Button-Text vergeben."
1661
  msgid "Found Bugs?"
1662
  msgstr "Bugs oder Wünsche melden"
1663
 
1664
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:461
1665
  #@ woocommerce-germanized
1666
  msgid "Shipping Costs for Virtual"
1667
  msgstr "Versandkosten virtuell"
1668
 
1669
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:462
1670
  #@ woocommerce-germanized
1671
  msgid "Select this option if you want to display shipping costs notice for virtual products."
1672
  msgstr "Versandkosten-Hinweis auch für virtuelle Produkte aktivieren?"
1673
 
1674
+ #: includes/abstracts/abstract-wc-gzd-product.php:92
1675
+ #: includes/wc-gzd-cart-functions.php:102
1676
+ #: woocommerce-germanized.php:773
1677
  #@ woocommerce-germanized
1678
  msgid "incl. VAT"
1679
  msgstr "inkl. MwSt."
1680
 
1681
+ #: includes/abstracts/abstract-wc-gzd-product.php:92
1682
  #@ woocommerce-germanized
1683
  msgid "excl. VAT"
1684
  msgstr "exkl. MwSt."
1685
 
1686
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:324
1687
  #@ woocommerce-germanized
1688
  msgid "Virtual VAT"
1689
  msgstr "USt. Änderung 2015"
1690
 
1691
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:327
1692
  #@ woocommerce-germanized
1693
  msgid "Enable Virtual VAT"
1694
  msgstr "USt. Anpassung aktivieren"
1695
 
1696
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:328
1697
  #@ woocommerce-germanized
1698
  msgid "Enable if you want to charge your customer's countries' VAT for virtual products."
1699
  msgstr "Aktiviere diese Option um für virtuelle Produkte den USt.-Satz des Dienstleistungsempfängers zu berechnen."
1700
 
1701
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:332
1702
  #, php-format
1703
  #@ woocommerce-germanized
1704
  msgid "New EU VAT rule applies on 01.01.2015. Make sure that every digital or virtual product has chosen the right tax class (Virtual Rate or Virtual Reduced Rate). Gross prices will not differ from the prices you have chosen for affected products. In fact the net price will differ depending on the VAT rate of your customers' country. Shop settings will be adjusted to show prices including tax. More information can be found <a href=\"%s\" target=\"_blank\">here</a>."
1731
  msgid "Update WooCommerce Germanized"
1732
  msgstr "WooCommerce Germanized aktualisieren"
1733
 
1734
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:255
1735
  #@ woocommerce-germanized
1736
  msgid "Unit Price Text"
1737
  msgstr "Einheitspreis Text"
1738
 
1739
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:256
1740
  #@ woocommerce-germanized
1741
  msgid "This text will be used to display the unit price. Use {price} to insert the price."
1742
  msgstr "Dieser Text wird verwendet um den Einheitspreis darzustellen. Nutze {price} als Platzhalter für den eigentlichen Preis."
1743
 
1744
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:261
1745
  #@ woocommerce-germanized
1746
  msgid "{price}"
1747
  msgstr "{price}"
1748
 
1749
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:694
1750
  #@ woocommerce-germanized
1751
  msgid "Sorry, but the new Virtual VAT rules cannot be applied to small business."
1752
  msgstr "Sorry aber die neuen USt-Regelungen für virtuelle Produkte lassen sich leider nicht mit dem Kleinunternehmer vereinbaren. Bitte kontaktiere deinen Steuerberater für weitere Informationen."
1761
  msgid "Add a title field to the address within checkout?"
1762
  msgstr "Fügt ein Feld \"Anrede\" im Checkout hinzu."
1763
 
1764
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:546
1765
  #@ woocommerce-germanized
1766
  msgid "Show digital notice"
1767
  msgstr "Checkbox digitale Produkte"
1768
 
1769
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:547
1770
  #@ woocommerce-germanized
1771
  msgid "Show checkbox for digital products."
1772
  msgstr "Checkbox bei digitalen Produkten anzeigen"
1773
 
1774
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:548
1775
  #@ woocommerce-germanized
1776
  msgid "Disable this option if you want your customers to obtain their right of recission even if digital products are being bought."
1777
  msgstr "Diese Option setzt im Checkout eine Checkbox falls sich im Warenkorb digitale Produkte befinden. Hier können Kunden darauf aufmerksam gemacht werden, dass im Falle von digitalen Produkten das Widerrufsrecht erlischt."
1778
 
1779
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:482
1780
  #@ woocommerce-germanized
1781
  msgid "Show Thumbnails"
1782
  msgstr "Thumbnails anzeigen"
1783
 
1784
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:483
1785
  #@ woocommerce-germanized
1786
  msgid "Show product thumbnails on checkout page?"
1787
  msgstr "Produktbilder im Checkout darstellen?"
1788
 
1789
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:487
1790
  #@ woocommerce-germanized
1791
  msgid "Uncheck if you don't want to show your product thumbnails within checkout table."
1792
  msgstr "Deaktiviere diese Option, wenn du keine Produkbilder im Checkout angezeigt bekommen möchtest."
1793
 
1794
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:491
1795
  #@ woocommerce-germanized
1796
  msgid "Hide Shipping Select"
1797
  msgstr "Versandmethoden Auswahl"
1798
 
1799
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:492
1800
  #@ woocommerce-germanized
1801
  msgid "Hide shipping rate selection from checkout?"
1802
  msgstr "Die Auswahl von Versandmethoden im Checkout deaktivieren?"
1803
 
1804
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:496
1805
  #@ woocommerce-germanized
1806
  msgid "This option will hide shipping rate selection from checkout. By then customers will only be able to change their shipping rate on cart page."
1807
  msgstr "Diese Option deaktiviert die Darstellung der Versandmethoden Auswahl im Checkout. Kunden können von nun an nur noch über den Warenkorb die Versandmethode ändern."
1808
 
1809
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:473
1810
  #@ woocommerce-germanized
1811
  msgid "Hide taxes estimated"
1812
  msgstr "Hinweis \"Steuern geschätzt\""
1813
 
1814
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:474
1815
  #@ woocommerce-germanized
1816
  msgid "Do you want to hide the \"taxes and shipping estimated\" text from your cart?"
1817
  msgstr "Den Hinweis \"Versandkosten und Steuern werden geschätzt\" entfernen?"
1818
 
1819
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:478
1820
  #@ woocommerce-germanized
1821
  msgid "By default WooCommerce adds a \"taxes and shipping estimated\" text to your cart. This might puzzle your customers and may not meet german law."
1822
  msgstr "Der Hinweistext im Warenkorb zur Schätzung von Steuern und Versandkosten kann für Verwirrung beim Kunden sorgen und scheint nicht für den deutschen Markt geeignet."
1823
 
1824
+ #: includes/abstracts/abstract-wc-gzd-product.php:93
1825
  #, php-format
1826
  #@ woocommerce-germanized
1827
  msgid "excl. %s%% VAT"
1828
  msgstr "exkl. %s%% MwSt."
1829
 
1830
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:500
1831
  #@ woocommerce-germanized
1832
  msgid "Show back to cart button"
1833
  msgstr "Bestellung bearbeiten"
1834
 
1835
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:501
1836
  #@ woocommerce-germanized
1837
  msgid "Show back to cart button within your checkout table?"
1838
  msgstr "Einen \"Bestellung bearbeiten\" Button in der Bestellübersicht anzeigen?"
1839
 
1840
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:505
1841
  #@ woocommerce-germanized
1842
  msgid "This button may let your customer edit their order before submitting. Some people state that this button should be hidden to avoid legal problems."
1843
  msgstr "Dieser Button ermöglicht es deinen Kunden etwaige Falscheingaben (d.h. fälschlich ausgewählte Produkte) zu korrigieren und zurück zum Warenkorb zu gelangen. Je nach Darstellung in deinem Theme könnte es allerdings auch das Risiko für Abmahnungen erhöhen, da zwischen Pflichtangaben und Kaufen-Button keine weitere Informationen abgedruckt werden sollten."
1844
 
1845
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:211
1846
+ #@ woocommerce-germanized
1847
+ msgid "Shipping Costs Tax"
1848
+ msgstr "Steuerberechnung"
1849
+
1850
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:212
1851
+ #@ woocommerce-germanized
1852
+ msgid "Enable better taxation for shpping costs?"
1853
+ msgstr "Genauere Steuerberechnung für Versandkosten aktivieren?"
1854
+
1855
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:216
1856
+ #, php-format
1857
+ #@ woocommerce-germanized
1858
+ msgid "By choosing this option shipping cost taxation will be calculated based on tax rates within cart. Imagine the following example. Further information can be found <a href=\"%s\" target=\"_blank\">here</a>. %s"
1859
+ msgstr "Mit der Auswahl dieser Option werden die Steuern für Versandkosten basierend auf den Anteilen der Steuersätze der Artikel im Warenkorb berechnet. Weitere Informationen findest du <a href=\"%s\" target=\"_blank\">hier</a>. Falls du vorher mit Nettobeträgen gearbeitet hast, ändere die Versandkosten bitte in Bruttobeträge. Hier ein kleines Beispiel: %s"
1860
+
1861
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:220
1862
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:242
1863
+ #@ woocommerce-germanized
1864
+ msgid "Force Tax Calculation"
1865
+ msgstr "Steuerberechnung erzwingen"
1866
+
1867
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:221
1868
+ #@ woocommerce-germanized
1869
+ msgid "Force shipping costs tax calculation for every method?"
1870
+ msgstr "Erzwinge die Besteuerung für Versandkosten für jede Versandmethode?"
1871
+
1872
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:225
1873
+ #@ woocommerce-germanized
1874
+ msgid "This option will overwrite settings for each individual shipping method to force tax calculation (instead of only calculating tax for those methods which are taxeable)."
1875
+ msgstr "Diese Option überschreibt alle abweichenden Einstellungen verschiedener Versandmethoden und erzwingt die Steuerberechnung."
1876
+
1877
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:230
1878
+ #@ woocommerce-germanized
1879
+ msgid "Fees"
1880
+ msgstr "Gebühren"
1881
+
1882
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:233
1883
+ #@ woocommerce-germanized
1884
+ msgid "Fee Tax"
1885
+ msgstr "Steuerberechnung"
1886
+
1887
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:234
1888
+ #@ woocommerce-germanized
1889
+ msgid "Enable better taxation for fees?"
1890
+ msgstr "Genauere Steuerberechnung für Gebühren aktivieren?"
1891
+
1892
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:238
1893
+ #@ woocommerce-germanized
1894
+ msgid "By choosing this option fee taxation will be calculated based on tax rates within cart. See shipping costs taxation for more information."
1895
+ msgstr "Mit Hilfe dieser Option werden die Steuern für Gebühren basierend auf den Steuersätzen der Artikel im Warenkorb berechnet (siehe Steuern für Versandkosten für weitere Informationen). Bitte passe auch hier etwaige Nettobeträge in Bruttobeträge an."
1896
+
1897
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:243
1898
+ #@ woocommerce-germanized
1899
+ msgid "Force fee tax calculation for every fee?"
1900
+ msgstr "Berechnung der Steuern für Gebühren erzwingen?"
1901
+
1902
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:247
1903
+ #@ woocommerce-germanized
1904
+ msgid "This option will overwrite settings for each individual fee to force tax calculation (instead of only calculating tax for those fees which are taxeable)."
1905
+ msgstr "Diese Option überschreibt die Einstellungen aller Gebühren und erzwingt die Steuerberechnung."
1906
+
1907
  #. translators: plugin header field 'Version'
1908
  #: woocommerce-germanized.php:0
1909
  #@ woocommerce-germanized
1910
+ msgid "1.1.2"
1911
+ msgstr "1.1.2"
1912
+
1913
+ #: templates/checkout/review-order.php:21
1914
+ #@ woocommerce-germanized
1915
+ msgid "Total Sum"
1916
+ msgstr "Gesamtsumme"
1917
+
1918
+ #: includes/admin/views/html-notice-theme-incompatibility.php:15
1919
+ #, php-format
1920
+ #@ woocommerce-germanized
1921
+ msgid "It seems like your theme tries to overwrite legally relevant templates. Please review your checkout page. Some things might look weird because WooCommerce Germanized had to stop template overriding for legal purposes (Critical templates: %s). See <a href=\"%s\" target=\"_blank\">making your theme compatible</a> or check out our Theme <a href=\"%s\" target=\"_blank\">VendiPro</a> for 100&#37; compatibility."
1922
+ msgstr "Es sieht so aus als wenn dein aktuelles Theme versucht rechtlich relevante Templates (kritische Templates: %s) zu überschreiben. Bitte überprüfe deinen Shop und insbesondere den Bezahlvorgang. WooCommerce Germanized musste das Überschreiben dieser Templates verhindern um für Rechtssicherheit sorgen zu können. Bitte lies dazu <a href=\"%s\" target=\"_blank\">mein Theme kompatibel machen</a> oder schau dir das von uns entwickelte Theme <a href=\"%s\" target=\"_blank\">VendiPro</a> für 100&#37; Kompatibilität an."
1923
+
1924
+ #: templates/checkout/review-order-2-2.php:71
1925
+ #@ woocommerce
1926
+ msgid "Total"
1927
  msgstr ""
1928
 
includes/abstracts/abstract-wc-gzd-payment-gateway.php CHANGED
@@ -65,8 +65,8 @@ class WC_GZD_Payment_Gateway {
65
  $is_taxable = ( $this->get_option( 'fee_is_taxable', 'no' ) == 'no' ? false : true );
66
  $fee = $this->get_option( 'fee' );
67
  if ( $is_taxable ) {
68
- $tax_rates = WC()->cart->tax->get_rates();
69
- $fee_taxes = WC()->cart->tax->calc_tax( $fee, $tax_rates, true );
70
  $fee = $fee - array_sum( $fee_taxes );
71
  }
72
  WC()->cart->add_fee( __( 'Payment charge', 'woocommerce-germanized' ), $fee, $is_taxable );
65
  $is_taxable = ( $this->get_option( 'fee_is_taxable', 'no' ) == 'no' ? false : true );
66
  $fee = $this->get_option( 'fee' );
67
  if ( $is_taxable ) {
68
+ $tax_rates = WC_Tax::get_rates();
69
+ $fee_taxes = WC_Tax::calc_tax( $fee, $tax_rates, true );
70
  $fee = $fee - array_sum( $fee_taxes );
71
  }
72
  WC()->cart->add_fee( __( 'Payment charge', 'woocommerce-germanized' ), $fee, $is_taxable );
includes/abstracts/abstract-wc-gzd-product.php CHANGED
@@ -19,19 +19,6 @@ class WC_GZD_Product {
19
  * @var object
20
  */
21
  private $child;
22
- protected static $_instance = null;
23
-
24
- /**
25
- * Main Instance
26
- *
27
- * @static
28
- * @return WC_GZD_Product instance
29
- */
30
- public static function instance( $product ) {
31
- if ( is_null( self::$_instance ) || self::$_instance->product !== $product )
32
- self::$_instance = new self( $product );
33
- return self::$_instance;
34
- }
35
 
36
  /**
37
  * Construct new WC_GZD_Product
19
  * @var object
20
  */
21
  private $child;
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  /**
24
  * Construct new WC_GZD_Product
includes/admin/class-wc-gzd-admin-notices.php CHANGED
@@ -125,7 +125,7 @@ class WC_GZD_Admin_Notices {
125
  * @return boolean
126
  */
127
  public function is_theme_compatible() {
128
- $templates_to_check = apply_filters( 'woocommerce_gzd_important_templates', array( 'checkout/form-pay.php', 'checkout/review-order.php' ) );
129
  if ( ! empty( $templates_to_check ) ) {
130
  foreach ( $templates_to_check as $template ) {
131
  $template_path = trailingslashit( 'woocommerce' ) . $template;
@@ -133,7 +133,7 @@ class WC_GZD_Admin_Notices {
133
  $template_path,
134
  $template
135
  ) );
136
- if ( $theme_template && ! WC_germanized()->is_theme_template_compatible( $template, $theme_template ) )
137
  return false;
138
  }
139
  }
125
  * @return boolean
126
  */
127
  public function is_theme_compatible() {
128
+ $templates_to_check = WC_germanized()->get_critical_templates();
129
  if ( ! empty( $templates_to_check ) ) {
130
  foreach ( $templates_to_check as $template ) {
131
  $template_path = trailingslashit( 'woocommerce' ) . $template;
133
  $template_path,
134
  $template
135
  ) );
136
+ if ( $theme_template )
137
  return false;
138
  }
139
  }
includes/admin/class-wc-gzd-admin-welcome.php CHANGED
@@ -153,27 +153,28 @@ class WC_GZD_Admin_Welcome {
153
  </div>
154
  </div>
155
  <div class="changelog">
156
- <h3>Neu in WooCommerce Germanized 1.1</h3>
157
  <div class="wc-feature feature-section col three-col" style="margin-bottom: -30px">
158
  <div>
159
- <h4><i class="fa fa-image"></i> Thumbnails im Checkout</h4>
160
  <p>
161
- Von nun an können auch auf der Kasse-Seite wieder Thumbnails in der Tabelle dargestellt werden.
162
- Ein Update von WooCommerce hatte diese (rechtlich relevante) Funktion standardmäßig deaktiviert.
 
163
  </p>
164
  </div>
165
  <div>
166
- <h4><i class="fa fa-truck"></i> Versandmethoden-Auswahl</h4>
167
  <p>
168
- Die Versandmethoden-Auswahl kann normalerweise auch noch auf der Kasse-Seite erfolgen.
169
- Wir haben nun die Funktion eingebettet, die Auswahl optional nur auf der Warenkorb-Seite zu erlauben.
170
  </p>
171
  </div>
172
  <div class="last-feature">
173
  <h4><i class="fa fa-check"></i> Plugin Kompatibilität</h4>
174
  <p>
175
- Mit der neuen Version bieten wir eine noch bessere Kompatibilität zu anderen WooCommerce Plugins
176
- ohne dabei gänzlich auf die Vorteile von OOP zu verzichten.
177
  </p>
178
  </div>
179
  </div>
153
  </div>
154
  </div>
155
  <div class="changelog">
156
+ <h3>Neu in WooCommerce Germanized 1.2</h3>
157
  <div class="wc-feature feature-section col three-col" style="margin-bottom: -30px">
158
  <div>
159
+ <h4><i class="fa fa-truck"></i> Steuern für Versandkosten</h4>
160
  <p>
161
+ Die Besteuerung von Versandkosten und Gebühren ist in Deutschland ziemlich kompliziert.
162
+ Auf Wunsch passt WooCommerce Germanized die Besteuerung nun automatisiert an und berechnet die Steuern
163
+ für Versandkosten und Gebühren basierend auf den MwSt.-Anteilen im Warenkorb. Hier findest du mehr <a href="http://www.it-recht-kanzlei.de/umsatzsteuer-versandkosten-mehrwertsteuer.html" target="_blank">Informationen</a>.
164
  </p>
165
  </div>
166
  <div>
167
+ <h4><i class="fa fa-hand-o-up"></i> WC 2.3 - Kompatibilität</h4>
168
  <p>
169
+ Mit dieser Version unterstützt WC Germanized auch die neueste WooCommerce Version (2.3), die in Kürze erscheint.
170
+ WC Germanized bleibt aber vorerst auch rückwärtskompatibel und unterstützt weiterhin 2.2.
171
  </p>
172
  </div>
173
  <div class="last-feature">
174
  <h4><i class="fa fa-check"></i> Plugin Kompatibilität</h4>
175
  <p>
176
+ Mit dieser Version unterstützen wir noch besser Plugins von Drittanbietern. Templates von WooCommerce Germanized
177
+ können nun in einem Theme-Ordner überschrieben werden (mein-theme/woocommerce-germanized).
178
  </p>
179
  </div>
180
  </div>
includes/admin/settings/class-wc-gzd-settings-germanized.php CHANGED
@@ -207,8 +207,48 @@ class WC_GZD_Settings_Germanized extends WC_Settings_Page {
207
  'default' => __( 'plus {link}Shipping Costs{/link}', 'woocommerce-germanized' ),
208
  ),
209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  array( 'type' => 'sectionend', 'id' => 'shipping_costs_options' ),
211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  array( 'title' => __( 'Unit Price', 'woocommerce-germanized' ), 'type' => 'title', 'id' => 'unit_price_options' ),
213
 
214
  array(
@@ -644,9 +684,15 @@ class WC_GZD_Settings_Germanized extends WC_Settings_Page {
644
  }
645
 
646
  public function after_save( $settings ) {
647
- if ( ! empty( $_POST[ 'woocommerce_gzd_small_enterprise' ] ) && ! empty( $_POST[ 'woocommerce_gzd_enable_virtual_vat' ] ) ) {
648
- update_option( 'woocommerce_gzd_enable_virtual_vat', 'no' );
649
- WC_Admin_Settings::add_error( __( 'Sorry, but the new Virtual VAT rules cannot be applied to small business.', 'woocommerce-germanized' ) );
 
 
 
 
 
 
650
  }
651
  }
652
 
207
  'default' => __( 'plus {link}Shipping Costs{/link}', 'woocommerce-germanized' ),
208
  ),
209
 
210
+ array(
211
+ 'title' => __( 'Shipping Costs Tax', 'woocommerce-germanized' ),
212
+ 'desc' => __( 'Enable better taxation for shpping costs?', 'woocommerce-germanized' ),
213
+ 'id' => 'woocommerce_gzd_shipping_tax',
214
+ 'default' => 'yes',
215
+ 'type' => 'checkbox',
216
+ 'desc_tip' => sprintf( __( 'By choosing this option shipping cost taxation will be calculated based on tax rates within cart. Imagine the following example. Further information can be found <a href="%s" target="_blank">here</a>. %s', 'woocommerce-germanized' ), 'http://www.it-recht-kanzlei.de/umsatzsteuer-versandkosten-mehrwertsteuer.html', '<table class="wc-gzd-tax-example"><thead><tr><th>Produkt</th><th>Preis</th><th>MwSt.-Satz</th><th>Anteil</th><th>MwSt.</th></tr></thead><tbody><tr><td>Buch</td><td>' . wc_price( 40 ) . '</td><td>7%</td><td>40%</td><td>' . wc_price( 2.62 ) . '</td></tr><tr><td>DVD</td><td>' . wc_price( 60 ) . '</td><td>19%</td><td>60%</td><td>' . wc_price( 9.58 ) . '</td></tr><tr><td>Versand</td><td>' . wc_price( 5 ) . '</td><td>7% | 19%</td><td>40% | 60%</td><td>' . wc_price( 0.13 ) . ' | ' . wc_price( 0.48 ) . '</td></tr></tbody></table>' ),
217
+ ),
218
+
219
+ array(
220
+ 'title' => __( 'Force Tax Calculation', 'woocommerce-germanized' ),
221
+ 'desc' => __( 'Force shipping costs tax calculation for every method?', 'woocommerce-germanized' ),
222
+ 'id' => 'woocommerce_gzd_shipping_tax_force',
223
+ 'default' => 'yes',
224
+ 'type' => 'checkbox',
225
+ 'desc_tip' => __( 'This option will overwrite settings for each individual shipping method to force tax calculation (instead of only calculating tax for those methods which are taxeable).', 'woocommerce-germanized' ),
226
+ ),
227
+
228
  array( 'type' => 'sectionend', 'id' => 'shipping_costs_options' ),
229
 
230
+ array( 'title' => __( 'Fees', 'woocommerce-germanized' ), 'type' => 'title', 'id' => 'fees_options' ),
231
+
232
+ array(
233
+ 'title' => __( 'Fee Tax', 'woocommerce-germanized' ),
234
+ 'desc' => __( 'Enable better taxation for fees?', 'woocommerce-germanized' ),
235
+ 'id' => 'woocommerce_gzd_fee_tax',
236
+ 'default' => 'yes',
237
+ 'type' => 'checkbox',
238
+ 'desc_tip' => __( 'By choosing this option fee taxation will be calculated based on tax rates within cart. See shipping costs taxation for more information.', 'woocommerce-germanized' ),
239
+ ),
240
+
241
+ array(
242
+ 'title' => __( 'Force Tax Calculation', 'woocommerce-germanized' ),
243
+ 'desc' => __( 'Force fee tax calculation for every fee?', 'woocommerce-germanized' ),
244
+ 'id' => 'woocommerce_gzd_fee_tax_force',
245
+ 'default' => 'yes',
246
+ 'type' => 'checkbox',
247
+ 'desc_tip' => __( 'This option will overwrite settings for each individual fee to force tax calculation (instead of only calculating tax for those fees which are taxeable).', 'woocommerce-germanized' ),
248
+ ),
249
+
250
+ array( 'type' => 'sectionend', 'id' => 'fees_options' ),
251
+
252
  array( 'title' => __( 'Unit Price', 'woocommerce-germanized' ), 'type' => 'title', 'id' => 'unit_price_options' ),
253
 
254
  array(
684
  }
685
 
686
  public function after_save( $settings ) {
687
+ if ( ! empty( $_POST[ 'woocommerce_gzd_small_enterprise' ] ) ) {
688
+ update_option( 'woocommerce_gzd_shipping_tax', 'no' );
689
+ update_option( 'woocommerce_gzd_shipping_tax_force', 'no' );
690
+ update_option( 'woocommerce_gzd_fee_tax', 'no' );
691
+ update_option( 'woocommerce_gzd_fee_tax_force', 'no' );
692
+ if ( ! empty( $_POST[ 'woocommerce_gzd_enable_virtual_vat' ] ) ) {
693
+ update_option( 'woocommerce_gzd_enable_virtual_vat', 'no' );
694
+ WC_Admin_Settings::add_error( __( 'Sorry, but the new Virtual VAT rules cannot be applied to small business.', 'woocommerce-germanized' ) );
695
+ }
696
  }
697
  }
698
 
includes/admin/views/html-notice-theme-incompatibility.php CHANGED
@@ -12,7 +12,7 @@ $dismiss_url = add_query_arg( 'notice', 'wc-gzd-hide-theme-notice', add_query_ar
12
 
13
  <div class="error fade">
14
  <h3><?php _e( 'Theme incompatibility found', 'woocommerce-germanized' ); ?></h3>
15
- <p><?php printf( __( 'It seems like your theme tries to overwrite legally relevant templates. Please review your checkout page. Some things might look weird because WooCommerce Germanized had to stop template overriding for legal purposes. See <a href="%s" target="_blank">making your theme compatible</a> or check out our Theme <a href="%s" target="_blank">VendiPro</a> for 100&#37; compatibility.', 'woocommerce-germanized' ), 'http://vendidero.de/dokument/woocommerce-germanized-theme-kompatibilitaet', 'http://vendidero.de/vendipro' ); ?></p>
16
  <p class="alignleft wc-gzd-button-wrapper">
17
  <a class="button button-primary" href="http://vendidero.de/vendipro" target="_blank"><?php _e( 'Get VendiPro now', 'woocommerce-germanized' ); ?></a>
18
  </p>
12
 
13
  <div class="error fade">
14
  <h3><?php _e( 'Theme incompatibility found', 'woocommerce-germanized' ); ?></h3>
15
+ <p><?php printf( __( 'It seems like your theme tries to overwrite legally relevant templates. Please review your checkout page. Some things might look weird because WooCommerce Germanized had to stop template overriding for legal purposes (Critical templates: %s). See <a href="%s" target="_blank">making your theme compatible</a> or check out our Theme <a href="%s" target="_blank">VendiPro</a> for 100&#37; compatibility.', 'woocommerce-germanized' ), implode( WC_germanized()->get_critical_templates(), ', ' ), 'http://vendidero.de/dokument/woocommerce-germanized-theme-kompatibilitaet', 'http://vendidero.de/vendipro' ); ?></p>
16
  <p class="alignleft wc-gzd-button-wrapper">
17
  <a class="button button-primary" href="http://vendidero.de/vendipro" target="_blank"><?php _e( 'Get VendiPro now', 'woocommerce-germanized' ); ?></a>
18
  </p>
includes/class-wc-gzd-cart-2-2.php ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce GZD cart
4
+ *
5
+ * Extends WooCommerce default cart to implement vat exception for digital products (if customer is not from shop base country)
6
+ *
7
+ * @class WC_GZD_Cart
8
+ * @see WC_Cart
9
+ * @version 1.0.0
10
+ * @author Vendidero
11
+ */
12
+ class WC_GZD_Cart extends WC_Cart {
13
+
14
+ /**
15
+ * Reset cart totals and clear sessions.
16
+ *
17
+ * @access private
18
+ * @return void
19
+ */
20
+ private function reset() {
21
+ foreach ( $this->cart_session_data as $key => $default ) {
22
+ $this->$key = $default;
23
+ unset( WC()->session->$key );
24
+ }
25
+ }
26
+
27
+ /**
28
+ * Calculate totals for cart. Implements vat exception for digital products.
29
+ */
30
+ public function calculate_totals() {
31
+
32
+ $this->reset();
33
+
34
+ do_action( 'woocommerce_before_calculate_totals', $this );
35
+
36
+ if ( sizeof( $this->get_cart() ) == 0 ) {
37
+ $this->set_session();
38
+ return;
39
+ }
40
+
41
+ $tax_rates = array();
42
+ $shop_tax_rates = array();
43
+
44
+ /**
45
+ * Calculate subtotals for items. This is done first so that discount logic can use the values.
46
+ */
47
+ foreach ( $this->get_cart() as $cart_item_key => $values ) {
48
+
49
+ $_product = $values['data'];
50
+
51
+ // Count items + weight
52
+ $this->cart_contents_weight += $_product->get_weight() * $values['quantity'];
53
+ $this->cart_contents_count += $values['quantity'];
54
+
55
+ // Prices
56
+ $base_price = $_product->get_price();
57
+ $line_price = $_product->get_price() * $values['quantity'];
58
+
59
+ $line_subtotal = 0;
60
+ $line_subtotal_tax = 0;
61
+
62
+ /**
63
+ * No tax to calculate
64
+ */
65
+ if ( ! $_product->is_taxable() ) {
66
+
67
+ // Subtotal is the undiscounted price
68
+ $this->subtotal += $line_price;
69
+ $this->subtotal_ex_tax += $line_price;
70
+
71
+ /**
72
+ * Prices include tax
73
+ *
74
+ * To prevent rounding issues we need to work with the inclusive price where possible
75
+ * otherwise we'll see errors such as when working with a 9.99 inc price, 20% VAT which would
76
+ * be 8.325 leading to totals being 1p off
77
+ *
78
+ * Pre tax coupons come off the price the customer thinks they are paying - tax is calculated
79
+ * afterwards.
80
+ *
81
+ * e.g. $100 bike with $10 coupon = customer pays $90 and tax worked backwards from that
82
+ */
83
+ } elseif ( $this->prices_include_tax ) {
84
+
85
+ // Get base tax rates
86
+ if ( empty( $shop_tax_rates[ $_product->tax_class ] ) )
87
+ $shop_tax_rates[ $_product->tax_class ] = $this->tax->get_shop_base_rate( $_product->tax_class );
88
+
89
+ // Get item tax rates
90
+ if ( empty( $tax_rates[ $_product->get_tax_class() ] ) )
91
+ $tax_rates[ $_product->get_tax_class() ] = $this->tax->get_rates( $_product->get_tax_class() );
92
+
93
+ $base_tax_rates = $shop_tax_rates[ $_product->tax_class ];
94
+ $item_tax_rates = $tax_rates[ $_product->get_tax_class() ];
95
+
96
+ /**
97
+ * ADJUST TAX - Calculations when base tax is not equal to the item tax
98
+ */
99
+ if ( $item_tax_rates !== $base_tax_rates ) {
100
+
101
+ // Work out a new base price without the shop's base tax
102
+ $taxes = $this->tax->calc_tax( $line_price, $base_tax_rates, true, true );
103
+
104
+ // Digital VAT exception
105
+ if ( $this->is_virtual_taxable() && $_product->gzd_product->is_virtual_vat_exception() )
106
+ $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates, true, true );
107
+
108
+ // Now we have a new item price (excluding TAX)
109
+ $line_subtotal = $line_price - array_sum( $taxes );
110
+
111
+ // Now add modifed taxes
112
+ $tax_result = $this->tax->calc_tax( $line_subtotal, $item_tax_rates );
113
+ $line_subtotal_tax = array_sum( $tax_result );
114
+
115
+ /**
116
+ * Regular tax calculation (customer inside base and the tax class is unmodified
117
+ */
118
+ } else {
119
+
120
+ // Calc tax normally
121
+ $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates, true );
122
+ $line_subtotal_tax = array_sum( $taxes );
123
+ $line_subtotal = $line_price - array_sum( $taxes );
124
+ }
125
+
126
+ /**
127
+ * Prices exclude tax
128
+ *
129
+ * This calculation is simpler - work with the base, untaxed price.
130
+ */
131
+ } else {
132
+
133
+ // Get item tax rates
134
+ if ( empty( $tax_rates[ $_product->get_tax_class() ] ) )
135
+ $tax_rates[ $_product->get_tax_class() ] = $this->tax->get_rates( $_product->get_tax_class() );
136
+
137
+ $item_tax_rates = $tax_rates[ $_product->get_tax_class() ];
138
+
139
+ // Base tax for line before discount - we will store this in the order data
140
+ $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates );
141
+ $line_subtotal_tax = array_sum( $taxes );
142
+ $line_subtotal = $line_price;
143
+ }
144
+
145
+ // Add to main subtotal
146
+ $this->subtotal += $line_subtotal + $line_subtotal_tax;
147
+ $this->subtotal_ex_tax += $line_subtotal;
148
+ }
149
+
150
+ /**
151
+ * Calculate totals for items
152
+ */
153
+ foreach ( $this->get_cart() as $cart_item_key => $values ) {
154
+
155
+ $_product = $values['data'];
156
+
157
+ // Prices
158
+ $base_price = $_product->get_price();
159
+ $line_price = $_product->get_price() * $values['quantity'];
160
+
161
+ // Tax data
162
+ $taxes = array();
163
+ $discounted_taxes = array();
164
+
165
+ /**
166
+ * No tax to calculate
167
+ */
168
+ if ( ! $_product->is_taxable() ) {
169
+
170
+ // Discounted Price (price with any pre-tax discounts applied)
171
+ $discounted_price = $this->get_discounted_price( $values, $base_price, true );
172
+ $discounted_tax_amount = 0;
173
+ $tax_amount = 0;
174
+ $line_subtotal_tax = 0;
175
+ $line_subtotal = $line_price;
176
+ $line_tax = 0;
177
+ $line_total = $this->tax->round( $discounted_price * $values['quantity'] );
178
+
179
+ /**
180
+ * Prices include tax
181
+ */
182
+ } elseif ( $this->prices_include_tax ) {
183
+
184
+ $base_tax_rates = $shop_tax_rates[ $_product->tax_class ];
185
+ $item_tax_rates = $tax_rates[ $_product->get_tax_class() ];
186
+
187
+ /**
188
+ * ADJUST TAX - Calculations when base tax is not equal to the item tax
189
+ */
190
+ if ( $item_tax_rates !== $base_tax_rates ) {
191
+
192
+ // Work out a new base price without the shop's base tax
193
+ $taxes = $this->tax->calc_tax( $line_price, $base_tax_rates, true, true );
194
+
195
+ // Digital tax exception
196
+ if ( $this->is_virtual_taxable() && $_product->gzd_product->is_virtual_vat_exception() )
197
+ $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates, true, true );
198
+
199
+ // Now we have a new item price (excluding TAX)
200
+ $line_subtotal = round( $line_price - array_sum( $taxes ), WC_ROUNDING_PRECISION );
201
+
202
+ // Now add modifed taxes
203
+ $taxes = $this->tax->calc_tax( $line_subtotal, $item_tax_rates );
204
+ $line_subtotal_tax = array_sum( $taxes );
205
+
206
+ // Adjusted price (this is the price including the new tax rate)
207
+ $adjusted_price = ( $line_subtotal + $line_subtotal_tax ) / $values['quantity'];
208
+
209
+ // Apply discounts
210
+ $discounted_price = $this->get_discounted_price( $values, $adjusted_price, true );
211
+ $discounted_taxes = $this->tax->calc_tax( $discounted_price * $values['quantity'], $item_tax_rates, true );
212
+ $line_tax = array_sum( $discounted_taxes );
213
+ $line_total = ( $discounted_price * $values['quantity'] ) - $line_tax;
214
+
215
+ /**
216
+ * Regular tax calculation (customer inside base and the tax class is unmodified
217
+ */
218
+ } else {
219
+
220
+ // Work out a new base price without the shop's base tax
221
+ $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates, true );
222
+
223
+ // Now we have a new item price (excluding TAX)
224
+ $line_subtotal = $line_price - array_sum( $taxes );
225
+ $line_subtotal_tax = array_sum( $taxes );
226
+
227
+ // Calc prices and tax (discounted)
228
+ $discounted_price = $this->get_discounted_price( $values, $base_price, true );
229
+ $discounted_taxes = $this->tax->calc_tax( $discounted_price * $values['quantity'], $item_tax_rates, true );
230
+ $line_tax = array_sum( $discounted_taxes );
231
+ $line_total = ( $discounted_price * $values['quantity'] ) - $line_tax;
232
+ }
233
+
234
+ // Tax rows - merge the totals we just got
235
+ foreach ( array_keys( $this->taxes + $discounted_taxes ) as $key ) {
236
+ $this->taxes[ $key ] = ( isset( $discounted_taxes[ $key ] ) ? $discounted_taxes[ $key ] : 0 ) + ( isset( $this->taxes[ $key ] ) ? $this->taxes[ $key ] : 0 );
237
+ }
238
+
239
+ /**
240
+ * Prices exclude tax
241
+ */
242
+ } else {
243
+
244
+ $item_tax_rates = $tax_rates[ $_product->get_tax_class() ];
245
+
246
+ // Work out a new base price without the shop's base tax
247
+ $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates );
248
+
249
+ // Now we have the item price (excluding TAX)
250
+ $line_subtotal = $line_price;
251
+ $line_subtotal_tax = array_sum( $taxes );
252
+
253
+ // Now calc product rates
254
+ $discounted_price = $this->get_discounted_price( $values, $base_price, true );
255
+ $discounted_taxes = $this->tax->calc_tax( $discounted_price * $values['quantity'], $item_tax_rates );
256
+ $discounted_tax_amount = array_sum( $discounted_taxes );
257
+ $line_tax = $discounted_tax_amount;
258
+ $line_total = $discounted_price * $values['quantity'];
259
+
260
+ // Tax rows - merge the totals we just got
261
+ foreach ( array_keys( $this->taxes + $discounted_taxes ) as $key ) {
262
+ $this->taxes[ $key ] = ( isset( $discounted_taxes[ $key ] ) ? $discounted_taxes[ $key ] : 0 ) + ( isset( $this->taxes[ $key ] ) ? $this->taxes[ $key ] : 0 );
263
+ }
264
+ }
265
+
266
+ // Add any product discounts (after tax)
267
+ $this->apply_product_discounts_after_tax( $values, $line_total + $line_tax );
268
+
269
+ // Cart contents total is based on discounted prices and is used for the final total calculation
270
+ $this->cart_contents_total += $line_total;
271
+
272
+ // Store costs + taxes for lines
273
+ $this->cart_contents[ $cart_item_key ]['line_total'] = $line_total;
274
+ $this->cart_contents[ $cart_item_key ]['line_tax'] = $line_tax;
275
+ $this->cart_contents[ $cart_item_key ]['line_subtotal'] = $line_subtotal;
276
+ $this->cart_contents[ $cart_item_key ]['line_subtotal_tax'] = $line_subtotal_tax;
277
+
278
+ // Store rates ID and costs - Since 2.2
279
+ $this->cart_contents[ $cart_item_key ]['line_tax_data'] = array( 'total' => $discounted_taxes, 'subtotal' => $taxes );
280
+ }
281
+
282
+ // Only calculate the grand total + shipping if on the cart/checkout
283
+ if ( is_checkout() || is_cart() || defined('WOOCOMMERCE_CHECKOUT') || defined('WOOCOMMERCE_CART') ) {
284
+
285
+ // Calculate the Shipping
286
+ $this->calculate_shipping();
287
+
288
+ // Trigger the fees API where developers can add fees to the cart
289
+ $this->calculate_fees();
290
+
291
+ // Total up/round taxes and shipping taxes
292
+ if ( $this->round_at_subtotal ) {
293
+ $this->tax_total = $this->tax->get_tax_total( $this->taxes );
294
+ $this->shipping_tax_total = $this->tax->get_tax_total( $this->shipping_taxes );
295
+ $this->taxes = array_map( array( $this->tax, 'round' ), $this->taxes );
296
+ $this->shipping_taxes = array_map( array( $this->tax, 'round' ), $this->shipping_taxes );
297
+ } else {
298
+ $this->tax_total = array_sum( $this->taxes );
299
+ $this->shipping_tax_total = array_sum( $this->shipping_taxes );
300
+ }
301
+
302
+ // VAT exemption done at this point - so all totals are correct before exemption
303
+ if ( WC()->customer->is_vat_exempt() ) {
304
+ $this->remove_taxes();
305
+ }
306
+
307
+ // Cart Discounts (after tax)
308
+ $this->apply_cart_discounts_after_tax();
309
+
310
+ // Allow plugins to hook and alter totals before final total is calculated
311
+ do_action( 'woocommerce_calculate_totals', $this );
312
+
313
+ // Grand Total - Discounted product prices, discounted tax, shipping cost + tax, and any discounts to be added after tax (e.g. store credit)
314
+ $this->total = max( 0, apply_filters( 'woocommerce_calculated_total', round( $this->cart_contents_total + $this->tax_total + $this->shipping_tax_total + $this->shipping_total - $this->discount_total + $this->fee_total, $this->dp ), $this ) );
315
+
316
+ } else {
317
+
318
+ // Set tax total to sum of all tax rows
319
+ $this->tax_total = $this->tax->get_tax_total( $this->taxes );
320
+
321
+ // VAT exemption done at this point - so all totals are correct before exemption
322
+ if ( WC()->customer->is_vat_exempt() ) {
323
+ $this->remove_taxes();
324
+ }
325
+
326
+ // Cart Discounts (after tax)
327
+ $this->apply_cart_discounts_after_tax();
328
+ }
329
+
330
+ $this->set_session();
331
+ }
332
+
333
+ /**
334
+ * Decides whether current cart (and customer) apply for a digital vat exception (checks whether customer is from EU and not from base country)
335
+ *
336
+ * @return boolean
337
+ */
338
+ public function is_virtual_taxable() {
339
+ if ( get_option( 'woocommerce_gzd_enable_virtual_vat' ) != 'yes' )
340
+ return false;
341
+ if ( ( ! empty( WC()->customer ) ) && ( is_checkout() || defined('WOOCOMMERCE_CHECKOUT') ) ) {
342
+ $taxable_address = WC()->customer->get_taxable_address();
343
+ $base_country = WC()->countries->get_base_country();
344
+ if ( isset( $taxable_address[0] ) && $taxable_address[0] != $base_country && in_array( $taxable_address[0], WC()->countries->get_european_union_countries() ) )
345
+ return true;
346
+ }
347
+ return false;
348
+ }
349
+
350
+ }
351
+
352
+ ?>
includes/class-wc-gzd-cart.php CHANGED
@@ -12,16 +12,19 @@
12
  class WC_GZD_Cart extends WC_Cart {
13
 
14
  /**
15
- * Reset cart totals and clear sessions.
16
  *
 
17
  * @access private
18
- * @return void
19
  */
20
- private function reset() {
21
  foreach ( $this->cart_session_data as $key => $default ) {
22
  $this->$key = $default;
23
- unset( WC()->session->$key );
 
 
24
  }
 
25
  }
26
 
27
  /**
@@ -30,6 +33,7 @@ class WC_GZD_Cart extends WC_Cart {
30
  public function calculate_totals() {
31
 
32
  $this->reset();
 
33
 
34
  do_action( 'woocommerce_before_calculate_totals', $this );
35
 
@@ -53,7 +57,6 @@ class WC_GZD_Cart extends WC_Cart {
53
  $this->cart_contents_count += $values['quantity'];
54
 
55
  // Prices
56
- $base_price = $_product->get_price();
57
  $line_price = $_product->get_price() * $values['quantity'];
58
 
59
  $line_subtotal = 0;
@@ -83,12 +86,14 @@ class WC_GZD_Cart extends WC_Cart {
83
  } elseif ( $this->prices_include_tax ) {
84
 
85
  // Get base tax rates
86
- if ( empty( $shop_tax_rates[ $_product->tax_class ] ) )
87
- $shop_tax_rates[ $_product->tax_class ] = $this->tax->get_shop_base_rate( $_product->tax_class );
 
88
 
89
  // Get item tax rates
90
- if ( empty( $tax_rates[ $_product->get_tax_class() ] ) )
91
- $tax_rates[ $_product->get_tax_class() ] = $this->tax->get_rates( $_product->get_tax_class() );
 
92
 
93
  $base_tax_rates = $shop_tax_rates[ $_product->tax_class ];
94
  $item_tax_rates = $tax_rates[ $_product->get_tax_class() ];
@@ -99,17 +104,17 @@ class WC_GZD_Cart extends WC_Cart {
99
  if ( $item_tax_rates !== $base_tax_rates ) {
100
 
101
  // Work out a new base price without the shop's base tax
102
- $taxes = $this->tax->calc_tax( $line_price, $base_tax_rates, true, true );
103
 
104
  // Digital VAT exception
105
  if ( $this->is_virtual_taxable() && $_product->gzd_product->is_virtual_vat_exception() )
106
- $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates, true, true );
107
 
108
  // Now we have a new item price (excluding TAX)
109
  $line_subtotal = $line_price - array_sum( $taxes );
110
 
111
- // Now add modifed taxes
112
- $tax_result = $this->tax->calc_tax( $line_subtotal, $item_tax_rates );
113
  $line_subtotal_tax = array_sum( $tax_result );
114
 
115
  /**
@@ -118,7 +123,7 @@ class WC_GZD_Cart extends WC_Cart {
118
  } else {
119
 
120
  // Calc tax normally
121
- $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates, true );
122
  $line_subtotal_tax = array_sum( $taxes );
123
  $line_subtotal = $line_price - array_sum( $taxes );
124
  }
@@ -131,13 +136,14 @@ class WC_GZD_Cart extends WC_Cart {
131
  } else {
132
 
133
  // Get item tax rates
134
- if ( empty( $tax_rates[ $_product->get_tax_class() ] ) )
135
- $tax_rates[ $_product->get_tax_class() ] = $this->tax->get_rates( $_product->get_tax_class() );
 
136
 
137
  $item_tax_rates = $tax_rates[ $_product->get_tax_class() ];
138
 
139
  // Base tax for line before discount - we will store this in the order data
140
- $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates );
141
  $line_subtotal_tax = array_sum( $taxes );
142
  $line_subtotal = $line_price;
143
  }
@@ -169,12 +175,10 @@ class WC_GZD_Cart extends WC_Cart {
169
 
170
  // Discounted Price (price with any pre-tax discounts applied)
171
  $discounted_price = $this->get_discounted_price( $values, $base_price, true );
172
- $discounted_tax_amount = 0;
173
- $tax_amount = 0;
174
  $line_subtotal_tax = 0;
175
  $line_subtotal = $line_price;
176
  $line_tax = 0;
177
- $line_total = $this->tax->round( $discounted_price * $values['quantity'] );
178
 
179
  /**
180
  * Prices include tax
@@ -190,17 +194,16 @@ class WC_GZD_Cart extends WC_Cart {
190
  if ( $item_tax_rates !== $base_tax_rates ) {
191
 
192
  // Work out a new base price without the shop's base tax
193
- $taxes = $this->tax->calc_tax( $line_price, $base_tax_rates, true, true );
194
 
195
  // Digital tax exception
196
  if ( $this->is_virtual_taxable() && $_product->gzd_product->is_virtual_vat_exception() )
197
- $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates, true, true );
198
 
199
  // Now we have a new item price (excluding TAX)
200
  $line_subtotal = round( $line_price - array_sum( $taxes ), WC_ROUNDING_PRECISION );
201
 
202
- // Now add modifed taxes
203
- $taxes = $this->tax->calc_tax( $line_subtotal, $item_tax_rates );
204
  $line_subtotal_tax = array_sum( $taxes );
205
 
206
  // Adjusted price (this is the price including the new tax rate)
@@ -208,7 +211,7 @@ class WC_GZD_Cart extends WC_Cart {
208
 
209
  // Apply discounts
210
  $discounted_price = $this->get_discounted_price( $values, $adjusted_price, true );
211
- $discounted_taxes = $this->tax->calc_tax( $discounted_price * $values['quantity'], $item_tax_rates, true );
212
  $line_tax = array_sum( $discounted_taxes );
213
  $line_total = ( $discounted_price * $values['quantity'] ) - $line_tax;
214
 
@@ -217,8 +220,8 @@ class WC_GZD_Cart extends WC_Cart {
217
  */
218
  } else {
219
 
220
- // Work out a new base price without the shop's base tax
221
- $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates, true );
222
 
223
  // Now we have a new item price (excluding TAX)
224
  $line_subtotal = $line_price - array_sum( $taxes );
@@ -226,7 +229,7 @@ class WC_GZD_Cart extends WC_Cart {
226
 
227
  // Calc prices and tax (discounted)
228
  $discounted_price = $this->get_discounted_price( $values, $base_price, true );
229
- $discounted_taxes = $this->tax->calc_tax( $discounted_price * $values['quantity'], $item_tax_rates, true );
230
  $line_tax = array_sum( $discounted_taxes );
231
  $line_total = ( $discounted_price * $values['quantity'] ) - $line_tax;
232
  }
@@ -244,7 +247,7 @@ class WC_GZD_Cart extends WC_Cart {
244
  $item_tax_rates = $tax_rates[ $_product->get_tax_class() ];
245
 
246
  // Work out a new base price without the shop's base tax
247
- $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates );
248
 
249
  // Now we have the item price (excluding TAX)
250
  $line_subtotal = $line_price;
@@ -252,7 +255,7 @@ class WC_GZD_Cart extends WC_Cart {
252
 
253
  // Now calc product rates
254
  $discounted_price = $this->get_discounted_price( $values, $base_price, true );
255
- $discounted_taxes = $this->tax->calc_tax( $discounted_price * $values['quantity'], $item_tax_rates );
256
  $discounted_tax_amount = array_sum( $discounted_taxes );
257
  $line_tax = $discounted_tax_amount;
258
  $line_total = $discounted_price * $values['quantity'];
@@ -263,9 +266,6 @@ class WC_GZD_Cart extends WC_Cart {
263
  }
264
  }
265
 
266
- // Add any product discounts (after tax)
267
- $this->apply_product_discounts_after_tax( $values, $line_total + $line_tax );
268
-
269
  // Cart contents total is based on discounted prices and is used for the final total calculation
270
  $this->cart_contents_total += $line_total;
271
 
@@ -290,10 +290,10 @@ class WC_GZD_Cart extends WC_Cart {
290
 
291
  // Total up/round taxes and shipping taxes
292
  if ( $this->round_at_subtotal ) {
293
- $this->tax_total = $this->tax->get_tax_total( $this->taxes );
294
- $this->shipping_tax_total = $this->tax->get_tax_total( $this->shipping_taxes );
295
- $this->taxes = array_map( array( $this->tax, 'round' ), $this->taxes );
296
- $this->shipping_taxes = array_map( array( $this->tax, 'round' ), $this->shipping_taxes );
297
  } else {
298
  $this->tax_total = array_sum( $this->taxes );
299
  $this->shipping_tax_total = array_sum( $this->shipping_taxes );
@@ -304,29 +304,26 @@ class WC_GZD_Cart extends WC_Cart {
304
  $this->remove_taxes();
305
  }
306
 
307
- // Cart Discounts (after tax)
308
- $this->apply_cart_discounts_after_tax();
309
-
310
  // Allow plugins to hook and alter totals before final total is calculated
311
  do_action( 'woocommerce_calculate_totals', $this );
312
 
313
- // Grand Total - Discounted product prices, discounted tax, shipping cost + tax, and any discounts to be added after tax (e.g. store credit)
314
- $this->total = max( 0, apply_filters( 'woocommerce_calculated_total', round( $this->cart_contents_total + $this->tax_total + $this->shipping_tax_total + $this->shipping_total - $this->discount_total + $this->fee_total, $this->dp ), $this ) );
315
 
316
  } else {
317
 
318
  // Set tax total to sum of all tax rows
319
- $this->tax_total = $this->tax->get_tax_total( $this->taxes );
320
 
321
  // VAT exemption done at this point - so all totals are correct before exemption
322
  if ( WC()->customer->is_vat_exempt() ) {
323
  $this->remove_taxes();
324
  }
325
 
326
- // Cart Discounts (after tax)
327
- $this->apply_cart_discounts_after_tax();
328
  }
329
 
 
 
330
  $this->set_session();
331
  }
332
 
12
  class WC_GZD_Cart extends WC_Cart {
13
 
14
  /**
15
+ * Reset cart totals to the defaults. Useful before running calculations.
16
  *
17
+ * @param bool $unset_session If true, the session data will be forced unset.
18
  * @access private
 
19
  */
20
+ private function reset( $unset_session = false ) {
21
  foreach ( $this->cart_session_data as $key => $default ) {
22
  $this->$key = $default;
23
+ if ( $unset_session ) {
24
+ unset( WC()->session->$key );
25
+ }
26
  }
27
+ do_action( 'woocommerce_cart_reset', $this, $unset_session );
28
  }
29
 
30
  /**
33
  public function calculate_totals() {
34
 
35
  $this->reset();
36
+ $this->coupons = $this->get_coupons();
37
 
38
  do_action( 'woocommerce_before_calculate_totals', $this );
39
 
57
  $this->cart_contents_count += $values['quantity'];
58
 
59
  // Prices
 
60
  $line_price = $_product->get_price() * $values['quantity'];
61
 
62
  $line_subtotal = 0;
86
  } elseif ( $this->prices_include_tax ) {
87
 
88
  // Get base tax rates
89
+ if ( empty( $shop_tax_rates[ $_product->tax_class ] ) ) {
90
+ $shop_tax_rates[ $_product->tax_class ] = WC_Tax::get_base_tax_rates( $_product->tax_class );
91
+ }
92
 
93
  // Get item tax rates
94
+ if ( empty( $tax_rates[ $_product->get_tax_class() ] ) ) {
95
+ $tax_rates[ $_product->get_tax_class() ] = WC_Tax::get_rates( $_product->get_tax_class() );
96
+ }
97
 
98
  $base_tax_rates = $shop_tax_rates[ $_product->tax_class ];
99
  $item_tax_rates = $tax_rates[ $_product->get_tax_class() ];
104
  if ( $item_tax_rates !== $base_tax_rates ) {
105
 
106
  // Work out a new base price without the shop's base tax
107
+ $taxes = WC_Tax::calc_tax( $line_price, $base_tax_rates, true, true );
108
 
109
  // Digital VAT exception
110
  if ( $this->is_virtual_taxable() && $_product->gzd_product->is_virtual_vat_exception() )
111
+ $taxes = WC_Tax::calc_tax( $line_price, $item_tax_rates, true, true );
112
 
113
  // Now we have a new item price (excluding TAX)
114
  $line_subtotal = $line_price - array_sum( $taxes );
115
 
116
+ // Now add modified taxes
117
+ $tax_result = WC_Tax::calc_tax( $line_subtotal, $item_tax_rates );
118
  $line_subtotal_tax = array_sum( $tax_result );
119
 
120
  /**
123
  } else {
124
 
125
  // Calc tax normally
126
+ $taxes = WC_Tax::calc_tax( $line_price, $item_tax_rates, true );
127
  $line_subtotal_tax = array_sum( $taxes );
128
  $line_subtotal = $line_price - array_sum( $taxes );
129
  }
136
  } else {
137
 
138
  // Get item tax rates
139
+ if ( empty( $tax_rates[ $_product->get_tax_class() ] ) ) {
140
+ $tax_rates[ $_product->get_tax_class() ] = WC_Tax::get_rates( $_product->get_tax_class() );
141
+ }
142
 
143
  $item_tax_rates = $tax_rates[ $_product->get_tax_class() ];
144
 
145
  // Base tax for line before discount - we will store this in the order data
146
+ $taxes = WC_Tax::calc_tax( $line_price, $item_tax_rates );
147
  $line_subtotal_tax = array_sum( $taxes );
148
  $line_subtotal = $line_price;
149
  }
175
 
176
  // Discounted Price (price with any pre-tax discounts applied)
177
  $discounted_price = $this->get_discounted_price( $values, $base_price, true );
 
 
178
  $line_subtotal_tax = 0;
179
  $line_subtotal = $line_price;
180
  $line_tax = 0;
181
+ $line_total = WC_Tax::round( $discounted_price * $values['quantity'] );
182
 
183
  /**
184
  * Prices include tax
194
  if ( $item_tax_rates !== $base_tax_rates ) {
195
 
196
  // Work out a new base price without the shop's base tax
197
+ $taxes = WC_Tax::calc_tax( $line_price, $base_tax_rates, true, true );
198
 
199
  // Digital tax exception
200
  if ( $this->is_virtual_taxable() && $_product->gzd_product->is_virtual_vat_exception() )
201
+ $taxes = WC_Tax::calc_tax( $line_price, $item_tax_rates, true, true );
202
 
203
  // Now we have a new item price (excluding TAX)
204
  $line_subtotal = round( $line_price - array_sum( $taxes ), WC_ROUNDING_PRECISION );
205
 
206
+ $taxes = WC_Tax::calc_tax( $line_subtotal, $item_tax_rates );
 
207
  $line_subtotal_tax = array_sum( $taxes );
208
 
209
  // Adjusted price (this is the price including the new tax rate)
211
 
212
  // Apply discounts
213
  $discounted_price = $this->get_discounted_price( $values, $adjusted_price, true );
214
+ $discounted_taxes = WC_Tax::calc_tax( $discounted_price * $values['quantity'], $item_tax_rates, true );
215
  $line_tax = array_sum( $discounted_taxes );
216
  $line_total = ( $discounted_price * $values['quantity'] ) - $line_tax;
217
 
220
  */
221
  } else {
222
 
223
+ // Work out a new base price without the item tax
224
+ $taxes = WC_Tax::calc_tax( $line_price, $item_tax_rates, true );
225
 
226
  // Now we have a new item price (excluding TAX)
227
  $line_subtotal = $line_price - array_sum( $taxes );
229
 
230
  // Calc prices and tax (discounted)
231
  $discounted_price = $this->get_discounted_price( $values, $base_price, true );
232
+ $discounted_taxes = WC_Tax::calc_tax( $discounted_price * $values['quantity'], $item_tax_rates, true );
233
  $line_tax = array_sum( $discounted_taxes );
234
  $line_total = ( $discounted_price * $values['quantity'] ) - $line_tax;
235
  }
247
  $item_tax_rates = $tax_rates[ $_product->get_tax_class() ];
248
 
249
  // Work out a new base price without the shop's base tax
250
+ $taxes = WC_Tax::calc_tax( $line_price, $item_tax_rates );
251
 
252
  // Now we have the item price (excluding TAX)
253
  $line_subtotal = $line_price;
255
 
256
  // Now calc product rates
257
  $discounted_price = $this->get_discounted_price( $values, $base_price, true );
258
+ $discounted_taxes = WC_Tax::calc_tax( $discounted_price * $values['quantity'], $item_tax_rates );
259
  $discounted_tax_amount = array_sum( $discounted_taxes );
260
  $line_tax = $discounted_tax_amount;
261
  $line_total = $discounted_price * $values['quantity'];
266
  }
267
  }
268
 
 
 
 
269
  // Cart contents total is based on discounted prices and is used for the final total calculation
270
  $this->cart_contents_total += $line_total;
271
 
290
 
291
  // Total up/round taxes and shipping taxes
292
  if ( $this->round_at_subtotal ) {
293
+ $this->tax_total = WC_Tax::get_tax_total( $this->taxes );
294
+ $this->shipping_tax_total = WC_Tax::get_tax_total( $this->shipping_taxes );
295
+ $this->taxes = array_map( array( 'WC_Tax', 'round' ), $this->taxes );
296
+ $this->shipping_taxes = array_map( array( 'WC_Tax', 'round' ), $this->shipping_taxes );
297
  } else {
298
  $this->tax_total = array_sum( $this->taxes );
299
  $this->shipping_tax_total = array_sum( $this->shipping_taxes );
304
  $this->remove_taxes();
305
  }
306
 
 
 
 
307
  // Allow plugins to hook and alter totals before final total is calculated
308
  do_action( 'woocommerce_calculate_totals', $this );
309
 
310
+ // Grand Total - Discounted product prices, discounted tax, shipping cost + tax
311
+ $this->total = max( 0, apply_filters( 'woocommerce_calculated_total', round( $this->cart_contents_total + $this->tax_total + $this->shipping_tax_total + $this->shipping_total + $this->fee_total, $this->dp ), $this ) );
312
 
313
  } else {
314
 
315
  // Set tax total to sum of all tax rows
316
+ $this->tax_total = WC_Tax::get_tax_total( $this->taxes );
317
 
318
  // VAT exemption done at this point - so all totals are correct before exemption
319
  if ( WC()->customer->is_vat_exempt() ) {
320
  $this->remove_taxes();
321
  }
322
 
 
 
323
  }
324
 
325
+ do_action( 'woocommerce_after_calculate_totals', $this );
326
+ //print_r($this->taxes);
327
  $this->set_session();
328
  }
329
 
includes/class-wc-gzd-checkout.php CHANGED
@@ -49,6 +49,8 @@ class WC_GZD_Checkout {
49
  add_filter( 'woocommerce_hidden_order_itemmeta', array( $this, 'set_item_desc_order_meta_hidden' ), 0 );
50
  // Deactivate checkout shipping selection
51
  add_action( 'woocommerce_review_order_before_shipping', array( $this, 'remove_shipping_rates' ), 0 );
 
 
52
  }
53
 
54
  public function init_fields() {
@@ -85,6 +87,51 @@ class WC_GZD_Checkout {
85
  }
86
  }
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  /**
89
  * Temporarily removes all shipping rates (except chosen one) from packages to only show chosen package within checkout.
90
  */
@@ -193,12 +240,16 @@ class WC_GZD_Checkout {
193
  }
194
 
195
  public function save_fields( $order_id ) {
 
196
  if ( ! empty( $this->custom_fields ) ) {
197
  foreach ( $this->custom_fields as $key => $custom_field ) {
198
  if ( ! empty( $custom_field[ 'group' ] ) && ! isset( $custom_field[ 'override' ] ) ) {
199
  foreach ( $custom_field[ 'group' ] as $group ) {
200
- if ( ! empty( $_POST[ $group . '_' . $key ] ) )
201
- update_post_meta( $order_id, '_' . $group . '_' . $key, sanitize_text_field( $_POST[ $group . '_' . $key ] ) );
 
 
 
202
  }
203
  }
204
  }
49
  add_filter( 'woocommerce_hidden_order_itemmeta', array( $this, 'set_item_desc_order_meta_hidden' ), 0 );
50
  // Deactivate checkout shipping selection
51
  add_action( 'woocommerce_review_order_before_shipping', array( $this, 'remove_shipping_rates' ), 0 );
52
+ // Add better fee taxation
53
+ add_action( 'woocommerce_cart_calculate_fees', array( $this, 'do_fee_tax_calculation' ), PHP_INT_MAX, 1 );
54
  }
55
 
56
  public function init_fields() {
87
  }
88
  }
89
 
90
+ /**
91
+ * Recalculate fee taxes to split tax based on different tax rates contained within cart
92
+ *
93
+ * @param WC_Cart $cart
94
+ */
95
+ public function do_fee_tax_calculation( WC_Cart $cart ) {
96
+ if ( get_option( 'woocommerce_gzd_fee_tax' ) != 'yes' )
97
+ return;
98
+ if ( ! empty( $cart->fees ) ) {
99
+ $tax_shares = wc_gzd_get_cart_tax_share( 'fee' );
100
+ foreach ( $cart->fees as $key => $fee ) {
101
+ if ( ! $fee->taxable && get_option( 'woocommerce_gzd_fee_tax_force' ) != 'yes' )
102
+ continue;
103
+ // Calculate gross price if necessary
104
+ if ( $fee->taxable ) {
105
+ $fee_tax_rates = WC_Tax::get_rates( $fee->tax_class );
106
+ $fee_tax = WC_Tax::calc_tax( $fee->amount, $fee_tax_rates, false );
107
+ $fee->amount += array_sum( $fee_tax );
108
+ }
109
+ // Set fee to nontaxable to avoid WooCommerce default tax calculation
110
+ $fee->taxable = false;
111
+ // Calculate tax class share
112
+ if ( ! empty( $tax_shares ) ) {
113
+ $fee_taxes = array();
114
+ foreach ( $tax_shares as $rate => $class ) {
115
+ $tax_rates = WC_Tax::get_rates( $rate );
116
+ $tax_shares[ $rate ][ 'fee_tax_share' ] = $fee->amount * $class[ 'share' ];
117
+ $tax_shares[ $rate ][ 'fee_tax' ] = WC_Tax::calc_tax( ( $fee->amount * $class[ 'share' ] ), $tax_rates, true );
118
+ $fee_taxes += $tax_shares[ $rate ][ 'fee_tax' ];
119
+ }
120
+ foreach ( $tax_shares as $rate => $class ) {
121
+ $cart->fees[ $key ]->tax_data = $cart->fees[ $key ]->tax_data + $class[ 'fee_tax' ];
122
+ }
123
+ // Add fee taxes to cart taxes
124
+ foreach ( array_keys( $cart->taxes + $fee_taxes ) as $sub ) {
125
+ $cart->taxes[ $sub ] = ( isset( $fee_taxes[ $sub ] ) ? $fee_taxes[ $sub ] : 0 ) + ( isset( $cart->taxes[ $sub ] ) ? $cart->taxes[ $sub ] : 0 );
126
+ }
127
+ // Update fee
128
+ $cart->fees[ $key ]->tax = array_sum( $cart->fees[ $key ]->tax_data );
129
+ $cart->fees[ $key ]->amount = $cart->fees[ $key ]->amount - $cart->fees[ $key ]->tax;
130
+ }
131
+ }
132
+ }
133
+ }
134
+
135
  /**
136
  * Temporarily removes all shipping rates (except chosen one) from packages to only show chosen package within checkout.
137
  */
240
  }
241
 
242
  public function save_fields( $order_id ) {
243
+ $checkout = WC()->checkout();
244
  if ( ! empty( $this->custom_fields ) ) {
245
  foreach ( $this->custom_fields as $key => $custom_field ) {
246
  if ( ! empty( $custom_field[ 'group' ] ) && ! isset( $custom_field[ 'override' ] ) ) {
247
  foreach ( $custom_field[ 'group' ] as $group ) {
248
+ $val = ( isset( $checkout->posted[ $group . '_' . $key ] ) ? $checkout->posted[ $group . '_' . $key ] : '' );
249
+ if ( $group == 'shipping' || $group == 'billing' )
250
+ $val = $checkout->get_posted_address_data( $key, $group );
251
+ if ( ! empty( $val ) )
252
+ update_post_meta( $order_id, '_' . $group . '_' . $key, sanitize_text_field( $val ) );
253
  }
254
  }
255
  }
includes/class-wc-gzd-emails.php CHANGED
@@ -31,7 +31,7 @@ class WC_GZD_Emails {
31
  add_action( 'woocommerce_email_footer', array( $this, 'add_template_footers' ), 0 );
32
  add_action( 'woocommerce_email_footer', array( WC()->mailer(), 'email_footer' ), 1 );
33
 
34
- add_action( 'woocommerce_order_item_name', 'wc_gzd_product_item_desc', 0, 2 );
35
 
36
  $mails = WC()->mailer()->get_emails();
37
 
@@ -42,8 +42,17 @@ class WC_GZD_Emails {
42
  }
43
  }
44
 
 
 
 
 
 
 
 
45
  public function order_item_desc( $item_name, $item ) {
46
- return wc_gzd_product_item_desc( $item_name, $item );
 
 
47
  }
48
  /**
49
  * Hook into Email Footer and attach legal page content if necessary
31
  add_action( 'woocommerce_email_footer', array( $this, 'add_template_footers' ), 0 );
32
  add_action( 'woocommerce_email_footer', array( WC()->mailer(), 'email_footer' ), 1 );
33
 
34
+ add_action( 'woocommerce_order_item_name', array( $this, 'order_item_desc' ), 0, 2 );
35
 
36
  $mails = WC()->mailer()->get_emails();
37
 
42
  }
43
  }
44
 
45
+ /**
46
+ * Adds product description to order item if available
47
+ *
48
+ * @param string $item_name product name
49
+ * @param array $item
50
+ * @return string the item name containing product description if available
51
+ */
52
  public function order_item_desc( $item_name, $item ) {
53
+ if ( isset( $item[ 'product_desc' ] ) )
54
+ $item_name .= '<div class="wc-gzd-item-desc item-desc">' . $item[ 'product_desc' ] . '</div>';
55
+ return $item_name;
56
  }
57
  /**
58
  * Hook into Email Footer and attach legal page content if necessary
includes/class-wc-gzd-install.php CHANGED
@@ -337,7 +337,7 @@ class WC_GZD_Install {
337
  'payment_methods' => array(
338
  'name' => _x( 'payment-methods', 'Page slug', 'woocommerce-germanized' ),
339
  'title' => _x( 'Payment Methods', 'Page title', 'woocommerce-germanized' ),
340
- 'content' => '[' . apply_filters( 'woocommerce_gzd_payment_methods_shortcode_tag', 'woocommerce_gzd_payment_methods' ) . ']'
341
  ),
342
  ) );
343
 
337
  'payment_methods' => array(
338
  'name' => _x( 'payment-methods', 'Page slug', 'woocommerce-germanized' ),
339
  'title' => _x( 'Payment Methods', 'Page title', 'woocommerce-germanized' ),
340
+ 'content' => '[' . apply_filters( 'woocommerce_gzd_payment_methods_shortcode_tag', 'payment_methods_info' ) . ']'
341
  ),
342
  ) );
343
 
includes/class-wc-gzd-product-factory.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Product Factory Class
4
+ *
5
+ * The WooCommerce product factory creating the right product object
6
+ *
7
+ * @class WC_Product_Factory
8
+ * @version 2.3.0
9
+ * @package WooCommerce/Classes
10
+ * @category Class
11
+ * @author WooThemes
12
+ */
13
+ class WC_GZD_Product_Factory extends WC_Product_Factory {
14
+
15
+ /**
16
+ * get_product function.
17
+ *
18
+ * @param bool $the_product (default: false)
19
+ * @param array $args (default: array())
20
+ * @return WC_Product|bool false if the product cannot be loaded
21
+ */
22
+ public function get_product( $the_product = false, $args = array() ) {
23
+ $product = parent::get_product( $the_product, $args );
24
+ if ( is_object( $product ) )
25
+ $product->gzd_product = new WC_GZD_Product( $product );
26
+ return $product;
27
+ }
28
+
29
+ }
includes/class-wc-gzd-shipping-rate.php CHANGED
@@ -6,32 +6,16 @@ class WC_GZD_Shipping_Rate extends WC_Shipping_Rate {
6
 
7
  public function __construct( WC_Shipping_Rate $rate ) {
8
  parent::__construct( $rate->id, $rate->label, $rate->cost, $rate->taxes, $rate->method_id );
9
- if ( ! get_option( 'woocommerce_shipping_tax_class' ) )
10
  $this->set_taxes();
11
  $this->set_costs();
12
  }
13
 
14
  public function set_taxes() {
15
- $cart = WC()->cart->get_cart();
16
- $item_totals = 0;
17
- // Get tax classes and tax amounts
18
- if ( ! empty( $cart ) ) {
19
- foreach ( $cart as $key => $item ) {
20
- $class = $item['data']->get_tax_class();
21
- if ( ! isset( $this->tax_shares[ $class ] ) ) {
22
- $this->tax_shares[ $class ] = array();
23
- $this->tax_shares[ $class ][ 'total' ] = 0;
24
- $this->tax_shares[ $class ][ 'key' ] = '';
25
- }
26
- $this->tax_shares[ $class ][ 'total' ] += $item[ 'line_total' ];
27
- $this->tax_shares[ $class ][ 'key' ] = key( $item[ 'line_tax_data' ][ 'total' ] );
28
- $item_totals += $item[ 'line_total' ];
29
- }
30
- }
31
  // Calculate tax class share
32
  if ( ! empty( $this->tax_shares ) ) {
33
- foreach ( $this->tax_shares as $key => $class )
34
- $this->tax_shares[ $key ][ 'share' ] = $class[ 'total' ] / $item_totals;
35
  foreach ( $this->tax_shares as $rate => $class ) {
36
  $tax_rates = WC_Tax::get_rates( $rate );
37
  $this->tax_shares[ $rate ][ 'shipping_tax_share' ] = $this->cost * $class[ 'share' ];
6
 
7
  public function __construct( WC_Shipping_Rate $rate ) {
8
  parent::__construct( $rate->id, $rate->label, $rate->cost, $rate->taxes, $rate->method_id );
9
+ if ( get_option( 'woocommerce_gzd_shipping_tax' ) == 'yes' && ( ! empty( $rate->taxes ) || get_option( 'woocommerce_gzd_shipping_tax_force' ) == 'yes' ) )
10
  $this->set_taxes();
11
  $this->set_costs();
12
  }
13
 
14
  public function set_taxes() {
15
+ $cart = WC()->cart;
16
+ $this->tax_shares = wc_gzd_get_cart_tax_share();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  // Calculate tax class share
18
  if ( ! empty( $this->tax_shares ) ) {
 
 
19
  foreach ( $this->tax_shares as $rate => $class ) {
20
  $tax_rates = WC_Tax::get_rates( $rate );
21
  $this->tax_shares[ $rate ][ 'shipping_tax_share' ] = $this->cost * $class[ 'share' ];
includes/wc-gzd-cart-functions.php CHANGED
@@ -29,6 +29,35 @@ function wc_gzd_product_item_desc( $title, $item ) {
29
  return $new;
30
  }
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  /**
33
  * Get order total html
34
  *
@@ -53,20 +82,25 @@ function wc_gzd_cart_totals_order_total_tax_html() {
53
  $rate = wc_gzd_get_tax_rate( $tax->tax_rate_id );
54
  if ( ! empty( $rate ) && isset( $rate->tax_rate ) )
55
  $tax->rate = $rate->tax_rate;
56
- $tax_array[] = array( 'tax' => $tax, 'amount' => $tax->formatted_amount );
 
 
 
 
 
57
  }
58
  } else {
59
  $base_rate = array_values( WC_Tax::get_shop_base_rate() );
60
  $base_rate = (object) $base_rate[0];
61
  $base_rate->rate = $base_rate->rate;
62
- $tax_array[] = array( 'tax' => $base_rate, 'amount' => wc_price( WC()->cart->get_taxes_total( true, true ) ) );
63
  }
64
  if ( ! empty( $tax_array ) ) {
65
  foreach ( $tax_array as $tax ) {
66
  echo '
67
  <tr class="order-tax">
68
  <th>' . ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ? sprintf( __( 'incl. %s%% VAT', 'woocommerce-germanized' ), wc_gzd_format_tax_rate_percentage( $tax[ 'tax' ]->rate ) ) : __( 'incl. VAT', 'woocommerce-germanized' ) ) . '</th>
69
- <td>' . $tax[ 'amount' ] . '</td>
70
  </tr>';
71
  }
72
  }
29
  return $new;
30
  }
31
 
32
+ function wc_gzd_get_cart_tax_share( $type = 'shipping' ) {
33
+ $cart = WC()->cart->get_cart();
34
+ $tax_shares = array();
35
+ $item_totals = 0;
36
+ // Get tax classes and tax amounts
37
+ if ( ! empty( $cart ) ) {
38
+ foreach ( $cart as $key => $item ) {
39
+ $_product = $item['data'];
40
+ // Dont calculate share if is shipping and product is virtual or vat exception
41
+ if ( $type == 'shipping' && $_product->is_virtual() || ( $_product->gzd_product->is_virtual_vat_exception() && $type == 'shipping' ) )
42
+ continue;
43
+ $class = $_product->get_tax_class();
44
+ if ( ! isset( $tax_shares[ $class ] ) ) {
45
+ $tax_shares[ $class ] = array();
46
+ $tax_shares[ $class ][ 'total' ] = 0;
47
+ $tax_shares[ $class ][ 'key' ] = '';
48
+ }
49
+ $tax_shares[ $class ][ 'total' ] += ( $item[ 'line_total' ] + $item[ 'line_tax' ] );
50
+ $tax_shares[ $class ][ 'key' ] = key( $item[ 'line_tax_data' ][ 'total' ] );
51
+ $item_totals += ( $item[ 'line_total' ] + $item[ 'line_tax' ] );
52
+ }
53
+ }
54
+ if ( ! empty( $tax_shares ) ) {
55
+ foreach ( $tax_shares as $key => $class )
56
+ $tax_shares[ $key ][ 'share' ] = $class[ 'total' ] / $item_totals;
57
+ }
58
+ return $tax_shares;
59
+ }
60
+
61
  /**
62
  * Get order total html
63
  *
82
  $rate = wc_gzd_get_tax_rate( $tax->tax_rate_id );
83
  if ( ! empty( $rate ) && isset( $rate->tax_rate ) )
84
  $tax->rate = $rate->tax_rate;
85
+ if ( ! isset( $tax_array[ $tax->rate ] ) )
86
+ $tax_array[ $tax->rate ] = array( 'tax' => $tax, 'amount' => $tax->amount, 'contains' => array( $tax ) );
87
+ else {
88
+ array_push( $tax_array[ $tax->rate ][ 'contains' ], $tax );
89
+ $tax_array[ $tax->rate ][ 'amount' ] += $tax->amount;
90
+ }
91
  }
92
  } else {
93
  $base_rate = array_values( WC_Tax::get_shop_base_rate() );
94
  $base_rate = (object) $base_rate[0];
95
  $base_rate->rate = $base_rate->rate;
96
+ $tax_array[] = array( 'tax' => $base_rate, 'contains' => array( $base_rate ), 'amount' => WC()->cart->get_taxes_total( true, true ) );
97
  }
98
  if ( ! empty( $tax_array ) ) {
99
  foreach ( $tax_array as $tax ) {
100
  echo '
101
  <tr class="order-tax">
102
  <th>' . ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ? sprintf( __( 'incl. %s%% VAT', 'woocommerce-germanized' ), wc_gzd_format_tax_rate_percentage( $tax[ 'tax' ]->rate ) ) : __( 'incl. VAT', 'woocommerce-germanized' ) ) . '</th>
103
+ <td>' . wc_price( $tax[ 'amount' ] ) . '</td>
104
  </tr>';
105
  }
106
  }
includes/wc-gzd-core-functions.php CHANGED
@@ -10,23 +10,6 @@
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
12
 
13
- /**
14
- * Gets WC_GZD_Product by WC_Product
15
- *
16
- * @param WC_Product|int $the_product
17
- * @return WC_GZD_Product
18
- */
19
- function wc_gzd_get_product( $the_product = false ) {
20
- global $product;
21
- if ( ! $the_product )
22
- $the_product = $product;
23
- if ( is_numeric( $the_product ) )
24
- $the_product = wc_get_product( $the_product );
25
- if ( isset( $the_product ) )
26
- return WC_GZD_Product::instance( $the_product );
27
- return false;
28
- }
29
-
30
  /**
31
  * Format tax rate percentage for output in frontend
32
  *
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  /**
14
  * Format tax rate percentage for output in frontend
15
  *
includes/wc-gzd-template-functions.php CHANGED
@@ -112,7 +112,7 @@ if ( ! function_exists( 'woocommerce_gzd_template_cart_product_delivery_time' )
112
  */
113
  function woocommerce_gzd_template_cart_product_delivery_time( $title, $cart_item, $cart_item_key ) {
114
  if ( isset($cart_item["data"]) ) {
115
- $product = wc_gzd_get_product( $cart_item["data"] );
116
  if ( $product->gzd_product->get_delivery_time_term() )
117
  $title .= '<p class="price-shipping-costs-info">' . $product->gzd_product->get_delivery_time_html() . '</p>';
118
  }
@@ -300,4 +300,23 @@ if ( ! function_exists( 'woocommerce_gzd_template_loop_add_to_cart' ) ) {
300
 
301
  }
302
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  ?>
112
  */
113
  function woocommerce_gzd_template_cart_product_delivery_time( $title, $cart_item, $cart_item_key ) {
114
  if ( isset($cart_item["data"]) ) {
115
+ $product = $cart_item["data"];
116
  if ( $product->gzd_product->get_delivery_time_term() )
117
  $title .= '<p class="price-shipping-costs-info">' . $product->gzd_product->get_delivery_time_html() . '</p>';
118
  }
300
 
301
  }
302
 
303
+ if ( ! function_exists( 'woocommerce_gzd_template_order_submit' ) ) {
304
+
305
+ function woocommerce_gzd_template_order_submit() {
306
+ wc_get_template( 'checkout/order-submit.php', array(
307
+ 'checkout' => WC()->checkout(),
308
+ 'order_button_text' => apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) )
309
+ ) );
310
+ }
311
+
312
+ }
313
+
314
+ if ( ! function_exists( 'woocommerce_gzd_template_checkout_review_title' ) ) {
315
+
316
+ function woocommerce_gzd_template_checkout_review_title() { ?>
317
+ <h3 id="wc_gzd_order_review_heading"><?php _e( 'Your order', 'woocommerce' ); ?></h3>
318
+ <?php }
319
+
320
+ }
321
+
322
  ?>
includes/wc-gzd-template-hooks.php CHANGED
@@ -49,17 +49,31 @@ add_filter( 'woocommerce_cart_item_name', 'wc_gzd_product_item_desc', 0, 2 );
49
  /**
50
  * Checkout
51
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  if ( get_option( 'woocommerce_gzd_display_checkout_back_to_cart_button' ) == 'yes' )
53
  add_action( 'woocommerce_review_order_after_cart_contents', 'woocommerce_gzd_template_checkout_back_to_cart' );
54
  add_action( 'woocommerce_review_order_before_payment', 'woocommerce_gzd_template_checkout_payment_title' );
55
- add_action( 'woocommerce_gzd_before_shop_table', 'woocommerce_gzd_template_checkout_legal' );
56
  add_filter( 'woocommerce_checkout_show_terms', 'woocommerce_gzd_remove_term_checkbox' );
57
- add_action( 'woocommerce_gzd_before_shop_table', 'woocommerce_gzd_template_checkout_set_terms_manually' );
58
- if ( get_option( 'woocommerce_gzd_checkout_legal_digital_checkbox' ) == 'yes' )
59
- add_action( 'woocommerce_gzd_before_shop_table', 'woocommerce_gzd_digital_checkbox', 1 );
60
  if ( get_option( 'woocommerce_gzd_trusted_shops_id' ) )
61
  add_action( 'woocommerce_thankyou', 'woocommerce_gzd_template_checkout_thankyou_trusted_shops', 10, 1 );
62
- add_filter( 'woocommerce_order_button_text', 'woocommerce_gzd_template_order_button_text', 50 );
 
63
  remove_action( 'woocommerce_order_details_after_order_table', 'woocommerce_order_again_button' );
64
  add_action( 'woocommerce_thankyou_order_received_text', 'woocommerce_gzd_template_order_success_text', 0, 1 );
65
  if ( get_option( 'woocommerce_gzd_hide_order_success_details' ) == 'yes' )
49
  /**
50
  * Checkout
51
  */
52
+ if ( version_compare( WC()->version, '2.3', '>=' ) ) {
53
+ remove_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 10 );
54
+ remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
55
+ add_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 10 );
56
+ add_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 20 );
57
+ add_action( 'woocommerce_checkout_order_review', 'woocommerce_gzd_template_order_submit', 21 );
58
+ add_action( 'woocommerce_review_order_after_payment', 'woocommerce_gzd_template_checkout_review_title', 1 );
59
+ add_action( 'woocommerce_review_order_after_payment', 'woocommerce_gzd_template_checkout_legal', 2 );
60
+ add_action( 'woocommerce_review_order_after_payment', 'woocommerce_gzd_template_checkout_set_terms_manually', 3 );
61
+ if ( get_option( 'woocommerce_gzd_checkout_legal_digital_checkbox' ) == 'yes' )
62
+ add_action( 'woocommerce_review_order_after_payment', 'woocommerce_gzd_digital_checkbox', 4 );
63
+ } else {
64
+ add_action( 'woocommerce_gzd_before_shop_table', 'woocommerce_gzd_template_checkout_legal', 2 );
65
+ add_action( 'woocommerce_gzd_before_shop_table', 'woocommerce_gzd_template_checkout_set_terms_manually' );
66
+ if ( get_option( 'woocommerce_gzd_checkout_legal_digital_checkbox' ) == 'yes' )
67
+ add_action( 'woocommerce_gzd_before_shop_table', 'woocommerce_gzd_digital_checkbox', 1 );
68
+ }
69
  if ( get_option( 'woocommerce_gzd_display_checkout_back_to_cart_button' ) == 'yes' )
70
  add_action( 'woocommerce_review_order_after_cart_contents', 'woocommerce_gzd_template_checkout_back_to_cart' );
71
  add_action( 'woocommerce_review_order_before_payment', 'woocommerce_gzd_template_checkout_payment_title' );
 
72
  add_filter( 'woocommerce_checkout_show_terms', 'woocommerce_gzd_remove_term_checkbox' );
 
 
 
73
  if ( get_option( 'woocommerce_gzd_trusted_shops_id' ) )
74
  add_action( 'woocommerce_thankyou', 'woocommerce_gzd_template_checkout_thankyou_trusted_shops', 10, 1 );
75
+ add_filter( 'woocommerce_order_button_text', 'woocommerce_gzd_template_order_button_text', PHP_INT_MAX );
76
+ add_filter( 'woocommerce_pay_order_button_text', 'woocommerce_gzd_template_order_button_text', PHP_INT_MAX );
77
  remove_action( 'woocommerce_order_details_after_order_table', 'woocommerce_order_again_button' );
78
  add_action( 'woocommerce_thankyou_order_received_text', 'woocommerce_gzd_template_order_success_text', 0, 1 );
79
  if ( get_option( 'woocommerce_gzd_hide_order_success_details' ) == 'yes' )
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: woocommerce, german market, german, germany, deutsch, deutschland, de, de_
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=info@vendidero.de&item_name=Donation+for+WooCommerce+Germanized
5
  Requires at least: 3.8
6
  Tested up to: 4.1
7
- Stable tag: 1.1.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -25,6 +25,9 @@ Bei der Entwicklung von VendiPro haben wir besonders auf die Einhaltung deutsche
25
  WooCommerce Germanized unterstützt eine Vielzahl typisch deutscher Funktionalitäten: Lieferzeiten, Einheitspreise, Versandkosten- und Mehrwertsteuer-Hinweise, rechtlich relevante Hinweisseiten (z.B. AGB, Widerrufsbelehrung usw.) - auch in E-Mails, Kleinuternehmerregelung, Gebühren für Zahlungsmethoden und noch vieles mehr.
26
  Zudem haben wir einige Anpassungen am Bezahlvorgang vorgenommen, damit dieser den rechtlichen Ansprüchen eines deutschen Online-Shops entspricht. Eine ausführliche Liste der Funktionalitäten sowie weitere Informationen findest du auf [vendidero.de](http://vendidero.de/woocommerce-germanized "WooCommerce Germanized - WooCommerce Plugin für den deutschen Markt")
27
 
 
 
 
28
  = Trusted Shops vorzertifiziert =
29
  WooCommerce Germanized wurde von Trusted Shops vorzertifiziert und bietet damit die optimalen technischen Voraussetzungen für einen rechtssicheren Online-Shop mit WooCommerce in Deutschland.
30
  Trusted Shops zertifiziert Online-Shops nach sorgfältig ausgewählten Qualitätskriterien und hat WooCommerce Germanized genau unter die Lupe genommen.
@@ -34,7 +37,11 @@ Selbstverständlich können Trusted Shops Kunden mit nur wenigen Einstellungen d
34
  Bei der Entwicklung von WooCommerce Germanized haben wir besonderes Augenmerk auf die nahtlose Integration in WooCommerce gelegt.
35
  Die meisten Änderungen erfolgen über Hooks & Filter - nur im äußersten Notfall wird ein Template direkt überschrieben.
36
 
37
- = Neue Umsatzsteuer-Regelung für virtuelle Produkte =
 
 
 
 
38
  Mit der neuesten Version unterstützt WooCommerce Germanized die neuen Umsatzsteuer-Regelungen (B2C-Geschäfte, gültig ab 01.01.2015) zum Verkauf von virtuellen Produkten in die Europäische Union.
39
  Dabei wird bei virtuellen Produkten der Brutto-Preis beibehalten und lediglich der Netto-Preis, je nach Herkunftsland des Dienstleistungsempfängers, angepasst.
40
  Insofern du von den Regelungen betroffen sein solltest, empfehlen wir dir unbedingt mit deinem Steuerberater Rücksprache zu halten.
@@ -123,6 +130,11 @@ Bugs sowie Hilfe bei der Arbeit an WooCommerce Germanized werden gerne über uns
123
 
124
  == Changelog ==
125
 
 
 
 
 
 
126
  = 1.1.1 =
127
  * Feature - Optionally choose to hide the edit order button on checkout
128
  * Fix - Crucial bug which led to blank screens after upgrading to 1.1.0
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=info@vendidero.de&item_name=Donation+for+WooCommerce+Germanized
5
  Requires at least: 3.8
6
  Tested up to: 4.1
7
+ Stable tag: 1.2.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
25
  WooCommerce Germanized unterstützt eine Vielzahl typisch deutscher Funktionalitäten: Lieferzeiten, Einheitspreise, Versandkosten- und Mehrwertsteuer-Hinweise, rechtlich relevante Hinweisseiten (z.B. AGB, Widerrufsbelehrung usw.) - auch in E-Mails, Kleinuternehmerregelung, Gebühren für Zahlungsmethoden und noch vieles mehr.
26
  Zudem haben wir einige Anpassungen am Bezahlvorgang vorgenommen, damit dieser den rechtlichen Ansprüchen eines deutschen Online-Shops entspricht. Eine ausführliche Liste der Funktionalitäten sowie weitere Informationen findest du auf [vendidero.de](http://vendidero.de/woocommerce-germanized "WooCommerce Germanized - WooCommerce Plugin für den deutschen Markt")
27
 
28
+ = WooCommerce 2.3 kompatibel =
29
+ Mit der neuesten Version unterstützt WC Germanized von nun an die in Kürze erscheinende Version 2.3 von WooCommerce. Vorerst ist WC Germanized weiterhin rückwärtskompatibel und unterstützt zusätzlich die alte Version (2.2).
30
+
31
  = Trusted Shops vorzertifiziert =
32
  WooCommerce Germanized wurde von Trusted Shops vorzertifiziert und bietet damit die optimalen technischen Voraussetzungen für einen rechtssicheren Online-Shop mit WooCommerce in Deutschland.
33
  Trusted Shops zertifiziert Online-Shops nach sorgfältig ausgewählten Qualitätskriterien und hat WooCommerce Germanized genau unter die Lupe genommen.
37
  Bei der Entwicklung von WooCommerce Germanized haben wir besonderes Augenmerk auf die nahtlose Integration in WooCommerce gelegt.
38
  Die meisten Änderungen erfolgen über Hooks & Filter - nur im äußersten Notfall wird ein Template direkt überschrieben.
39
 
40
+ = Steuern für Versandkosten und Gebühren =
41
+ WC Germanized unterstützt mit der aktuellen Version die komplizierte Besteuerung von Versandkosten bei "gemischten" Warenkörben (d.h. es befinden sich unterschiedliche MwSt.-Sätze im Warenkorb).
42
+ In diesem Fall muss die Mehrwertsteuer der Versandkosten anteilig (basierend auf den Anteil der jeweiligen MwSt.-Rate an der Gesamtbestellung), basierend auf den unterschiedlichen MwSt.-Raten berechnet werden.
43
+
44
+ = Neue Umsatzsteuer-Regelung 2015 für virtuelle Produkte =
45
  Mit der neuesten Version unterstützt WooCommerce Germanized die neuen Umsatzsteuer-Regelungen (B2C-Geschäfte, gültig ab 01.01.2015) zum Verkauf von virtuellen Produkten in die Europäische Union.
46
  Dabei wird bei virtuellen Produkten der Brutto-Preis beibehalten und lediglich der Netto-Preis, je nach Herkunftsland des Dienstleistungsempfängers, angepasst.
47
  Insofern du von den Regelungen betroffen sein solltest, empfehlen wir dir unbedingt mit deinem Steuerberater Rücksprache zu halten.
130
 
131
  == Changelog ==
132
 
133
+ = 1.2.0 =
134
+ * Feature - Better shipping and fee taxation
135
+ * Feature - Now supporting WooCommerce 2.3
136
+ * Fix - Template location improvement
137
+
138
  = 1.1.1 =
139
  * Feature - Optionally choose to hide the edit order button on checkout
140
  * Fix - Crucial bug which led to blank screens after upgrading to 1.1.0
templates/checkout/form-pay-2-2.php ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Pay for order form
4
+ *
5
+ * @author WooThemes
6
+ * @package WooCommerce/Templates
7
+ * @version 1.6.4
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit; // Exit if accessed directly
12
+ }
13
+
14
+ ?>
15
+ <form id="order_review" method="post">
16
+
17
+ <div id="payment">
18
+ <?php if ( $order->needs_payment() ) : ?>
19
+ <h3><?php _e( 'Payment', 'woocommerce' ); ?></h3>
20
+ <ul class="payment_methods methods">
21
+ <?php
22
+ if ( $available_gateways = WC()->payment_gateways->get_available_payment_gateways() ) {
23
+ // Chosen Method
24
+ if ( sizeof( $available_gateways ) )
25
+ current( $available_gateways )->set_current();
26
+
27
+ foreach ( $available_gateways as $gateway ) {
28
+ ?>
29
+ <li class="payment_method_<?php echo $gateway->id; ?>">
30
+ <input id="payment_method_<?php echo $gateway->id; ?>" type="radio" class="input-radio" name="payment_method" value="<?php echo esc_attr( $gateway->id ); ?>" <?php checked( $gateway->chosen, true ); ?> data-order_button_text="<?php echo esc_attr( $gateway->order_button_text ); ?>" />
31
+ <label for="payment_method_<?php echo $gateway->id; ?>"><?php echo $gateway->get_title(); ?> <?php echo $gateway->get_icon(); ?></label>
32
+ <?php
33
+ if ( $gateway->has_fields() || $gateway->get_description() ) {
34
+ echo '<div class="payment_box payment_method_' . $gateway->id . '" style="display:none;">';
35
+ $gateway->payment_fields();
36
+ echo '</div>';
37
+ }
38
+ ?>
39
+ </li>
40
+ <?php
41
+ }
42
+ } else {
43
+
44
+ echo '<p>' . __( 'Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) . '</p>';
45
+
46
+ }
47
+ ?>
48
+ </ul>
49
+ <?php endif; ?>
50
+ </div>
51
+
52
+ <h3 id="wc_gzd_order_review_heading"><?php _e( 'Your order', 'woocommerce' ); ?></h3>
53
+
54
+ <table class="shop_table">
55
+ <thead>
56
+ <tr>
57
+ <th class="product-name"><?php _e( 'Product', 'woocommerce' ); ?></th>
58
+ <th class="product-quantity"><?php _e( 'Qty', 'woocommerce' ); ?></th>
59
+ <th class="product-total"><?php _e( 'Totals', 'woocommerce' ); ?></th>
60
+ </tr>
61
+ </thead>
62
+ <tbody>
63
+ <?php
64
+ if ( sizeof( $order->get_items() ) > 0 ) :
65
+ foreach ( $order->get_items() as $item ) :
66
+ echo '
67
+ <tr>
68
+ <td class="product-name">' . $item['name'].'</td>
69
+ <td class="product-quantity">' . $item['qty'].'</td>
70
+ <td class="product-subtotal">' . $order->get_formatted_line_subtotal( $item ) . '</td>
71
+ </tr>';
72
+ endforeach;
73
+ endif;
74
+ ?>
75
+ </tbody>
76
+ <tfoot>
77
+ <?php
78
+ if ( $totals = $order->get_order_item_totals() ) foreach ( $totals as $total ) :
79
+ ?>
80
+ <tr>
81
+ <th scope="row" colspan="2"><?php echo $total['label']; ?></th>
82
+ <td class="product-total"><?php echo $total['value']; ?></td>
83
+ </tr>
84
+ <?php
85
+ endforeach;
86
+ ?>
87
+ </tfoot>
88
+ </table>
89
+
90
+ <div class="form-row">
91
+ <?php wp_nonce_field( 'woocommerce-pay' ); ?>
92
+ <?php
93
+ $pay_order_button_text = apply_filters( 'woocommerce_pay_order_button_text', __( 'Pay for order', 'woocommerce' ) );
94
+
95
+ echo apply_filters( 'woocommerce_pay_order_button_html', '<input type="submit" class="button alt" id="place_order" value="' . esc_attr( $pay_order_button_text ) . '" data-value="' . esc_attr( $pay_order_button_text ) . '" />' );
96
+ ?>
97
+ <input type="hidden" name="woocommerce_pay" value="1" />
98
+ </div>
99
+
100
+ </form>
templates/checkout/form-pay.php CHANGED
@@ -47,6 +47,7 @@ if ( ! defined( 'ABSPATH' ) ) {
47
  ?>
48
  </ul>
49
  <?php endif; ?>
 
50
  </div>
51
 
52
  <h3 id="wc_gzd_order_review_heading"><?php _e( 'Your order', 'woocommerce' ); ?></h3>
47
  ?>
48
  </ul>
49
  <?php endif; ?>
50
+
51
  </div>
52
 
53
  <h3 id="wc_gzd_order_review_heading"><?php _e( 'Your order', 'woocommerce' ); ?></h3>
templates/checkout/order-submit.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Order submit button template
4
+ *
5
+ * @author Vendidero
6
+ * @package WooCommerceGermanized/Templates
7
+ * @version 2.3.0
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+ ?>
14
+ <div class="wc-gzd-order-submit">
15
+ <div class="form-row place-order">
16
+
17
+ <noscript><?php _e( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'woocommerce' ); ?><br/><input type="submit" class="button alt" name="woocommerce_checkout_update_totals" value="<?php _e( 'Update totals', 'woocommerce' ); ?>" /></noscript>
18
+
19
+ <?php wp_nonce_field( 'woocommerce-process_checkout' ); ?>
20
+
21
+ <?php do_action( 'woocommerce_review_order_before_submit' ); ?>
22
+
23
+ <?php echo apply_filters( 'woocommerce_order_button_html', '<input type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) ) ) . '" data-value="' . esc_attr( apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) ) ) . '" />' ); ?>
24
+
25
+ <?php if ( wc_get_page_id( 'terms' ) > 0 && apply_filters( 'woocommerce_checkout_show_terms', true ) ) : ?>
26
+ <p class="form-row terms">
27
+ <label for="terms" class="checkbox"><?php printf( __( 'I&rsquo;ve read and accept the <a href="%s" target="_blank">terms &amp; conditions</a>', 'woocommerce' ), esc_url( get_permalink( wc_get_page_id( 'terms' ) ) ) ); ?></label>
28
+ <input type="checkbox" class="input-checkbox" name="terms" <?php checked( apply_filters( 'woocommerce_terms_is_checked_default', isset( $_POST['terms'] ) ), true ); ?> id="terms" />
29
+ </p>
30
+ <?php endif; ?>
31
+
32
+ <?php do_action( 'woocommerce_review_order_after_submit' ); ?>
33
+
34
+ </div>
35
+ </div>
templates/checkout/payment.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checkout Payment Section
4
+ *
5
+ * @author WooThemes
6
+ * @package WooCommerce/Templates
7
+ * @version 2.3.0
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+ ?>
14
+
15
+ <?php if ( ! is_ajax() ) : ?>
16
+ <?php do_action( 'woocommerce_review_order_before_payment' ); ?>
17
+ <?php endif; ?>
18
+
19
+ <div id="payment" class="woocommerce-checkout-payment">
20
+ <?php if ( WC()->cart->needs_payment() ) : ?>
21
+ <ul class="payment_methods methods">
22
+ <?php
23
+ if ( ! empty( $available_gateways ) ) {
24
+ foreach ( $available_gateways as $gateway ) {
25
+ wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
26
+ }
27
+ } else {
28
+ if ( ! WC()->customer->get_country() ) {
29
+ $no_gateways_message = __( 'Please fill in your details above to see available payment methods.', 'woocommerce' );
30
+ } else {
31
+ $no_gateways_message = __( 'Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' );
32
+ }
33
+
34
+ echo '<p>' . apply_filters( 'woocommerce_no_available_payment_methods_message', $no_gateways_message ) . '</p>';
35
+ }
36
+ ?>
37
+ </ul>
38
+ <?php endif; ?>
39
+
40
+ <div class="clear"></div>
41
+ </div>
42
+
43
+ <?php if ( ! is_ajax() ) : ?>
44
+ <?php do_action( 'woocommerce_review_order_after_payment' ); ?>
45
+ <?php endif; ?>
templates/checkout/review-order-2-2.php ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Review order form
4
+ *
5
+ * @author WooThemes
6
+ * @package WooCommerce/Templates
7
+ * @version 2.1.8
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11
+ ?>
12
+
13
+ <?php if ( ! $is_ajax ) : ?><div id="order_review"><?php endif; ?>
14
+
15
+ <?php do_action( 'woocommerce_review_order_before_payment' ); ?>
16
+
17
+ <div id="payment">
18
+ <?php if ( WC()->cart->needs_payment() ) : ?>
19
+ <ul class="payment_methods methods">
20
+ <?php
21
+ $available_gateways = WC()->payment_gateways->get_available_payment_gateways();
22
+ if ( ! empty( $available_gateways ) ) {
23
+
24
+ // Chosen Method
25
+ if ( isset( WC()->session->chosen_payment_method ) && isset( $available_gateways[ WC()->session->chosen_payment_method ] ) ) {
26
+ $available_gateways[ WC()->session->chosen_payment_method ]->set_current();
27
+ } elseif ( isset( $available_gateways[ get_option( 'woocommerce_default_gateway' ) ] ) ) {
28
+ $available_gateways[ get_option( 'woocommerce_default_gateway' ) ]->set_current();
29
+ } else {
30
+ current( $available_gateways )->set_current();
31
+ }
32
+
33
+ foreach ( $available_gateways as $gateway ) {
34
+ ?>
35
+ <li class="payment_method_<?php echo $gateway->id; ?>">
36
+ <input id="payment_method_<?php echo $gateway->id; ?>" type="radio" class="input-radio" name="payment_method" value="<?php echo esc_attr( $gateway->id ); ?>" <?php checked( $gateway->chosen, true ); ?> data-order_button_text="<?php echo esc_attr( $gateway->order_button_text ); ?>" />
37
+ <label for="payment_method_<?php echo $gateway->id; ?>"><?php echo $gateway->get_title(); ?> <?php echo $gateway->get_icon(); ?></label>
38
+ <?php
39
+ if ( $gateway->has_fields() || $gateway->get_description() ) :
40
+ echo '<div class="payment_box payment_method_' . $gateway->id . '" ' . ( $gateway->chosen ? '' : 'style="display:none;"' ) . '>';
41
+ $gateway->payment_fields();
42
+ echo '</div>';
43
+ endif;
44
+ ?>
45
+ </li>
46
+ <?php
47
+ }
48
+ } else {
49
+
50
+ if ( ! WC()->customer->get_country() )
51
+ $no_gateways_message = __( 'Please fill in your details above to see available payment methods.', 'woocommerce' );
52
+ else
53
+ $no_gateways_message = __( 'Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' );
54
+
55
+ echo '<p>' . apply_filters( 'woocommerce_no_available_payment_methods_message', $no_gateways_message ) . '</p>';
56
+
57
+ }
58
+ ?>
59
+ </ul>
60
+ <?php endif; ?>
61
+ </div>
62
+
63
+ <h3 id="wc_gzd_order_review_heading"><?php _e( 'Your order', 'woocommerce' ); ?></h3>
64
+
65
+ <?php do_action( 'woocommerce_gzd_before_shop_table' ); ?>
66
+
67
+ <table class="shop_table">
68
+ <thead>
69
+ <tr>
70
+ <th class="product-name"><?php _e( 'Product', 'woocommerce' ); ?></th>
71
+ <th class="product-total"><?php _e( 'Total', 'woocommerce' ); ?></th>
72
+ </tr>
73
+ </thead>
74
+ <tbody>
75
+ <?php
76
+ do_action( 'woocommerce_review_order_before_cart_contents' );
77
+
78
+ foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
79
+ $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
80
+
81
+ if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
82
+ ?>
83
+ <tr class="<?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
84
+ <td class="product-name">
85
+ <table class="product-name-inner">
86
+ <tr>
87
+ <?php if ( get_option( 'woocommerce_gzd_display_checkout_thumbnails' ) == 'yes' ) : ?>
88
+ <td class="product-thumbnail">
89
+ <?php echo apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ); ?>
90
+ </td>
91
+ <?php endif; ?>
92
+ <td class="product-name">
93
+ <?php echo apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key ); ?>
94
+ <?php echo WC()->cart->get_item_data( $cart_item ); ?>
95
+ </td>
96
+ <td class="product-quantity">
97
+ <?php echo apply_filters( 'woocommerce_checkout_cart_item_quantity', ' <strong class="product-quantity">' . sprintf( '&times; %s', $cart_item['quantity'] ) . '</strong>', $cart_item, $cart_item_key ); ?>
98
+ </td>
99
+ </tr>
100
+ </table>
101
+ </td>
102
+ <td class="product-total">
103
+ <?php echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); ?>
104
+ </td>
105
+ </tr>
106
+ <?php
107
+ }
108
+ }
109
+
110
+ do_action( 'woocommerce_review_order_after_cart_contents' );
111
+ ?>
112
+ </tbody>
113
+ <tfoot>
114
+
115
+ <tr class="cart-subtotal">
116
+ <th><?php _e( 'Cart Subtotal', 'woocommerce' ); ?></th>
117
+ <td><?php wc_cart_totals_subtotal_html(); ?></td>
118
+ </tr>
119
+
120
+ <?php foreach ( WC()->cart->get_coupons( 'cart' ) as $code => $coupon ) : ?>
121
+ <tr class="cart-discount coupon-<?php echo esc_attr( $code ); ?>">
122
+ <th><?php wc_cart_totals_coupon_label( $coupon ); ?></th>
123
+ <td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
124
+ </tr>
125
+ <?php endforeach; ?>
126
+
127
+ <?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>
128
+
129
+ <?php do_action( 'woocommerce_review_order_before_shipping' ); ?>
130
+
131
+ <?php wc_cart_totals_shipping_html(); ?>
132
+
133
+ <?php do_action( 'woocommerce_review_order_after_shipping' ); ?>
134
+
135
+ <?php endif; ?>
136
+
137
+ <?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
138
+ <tr class="fee">
139
+ <th><?php echo esc_html( $fee->name ); ?></th>
140
+ <td><?php wc_cart_totals_fee_html( $fee ); ?></td>
141
+ </tr>
142
+ <?php endforeach; ?>
143
+
144
+ <?php if ( WC()->cart->tax_display_cart === 'excl' ) : ?>
145
+ <?php if ( get_option( 'woocommerce_tax_total_display' ) === 'itemized' ) : ?>
146
+ <?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
147
+ <tr class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?>">
148
+ <th><?php echo esc_html( $tax->label ); ?></th>
149
+ <td><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
150
+ </tr>
151
+ <?php endforeach; ?>
152
+ <?php else : ?>
153
+ <tr class="tax-total">
154
+ <th><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></th>
155
+ <td><?php echo wc_price( WC()->cart->get_taxes_total() ); ?></td>
156
+ </tr>
157
+ <?php endif; ?>
158
+ <?php endif; ?>
159
+
160
+ <?php foreach ( WC()->cart->get_coupons( 'order' ) as $code => $coupon ) : ?>
161
+ <tr class="order-discount coupon-<?php echo esc_attr( $code ); ?>">
162
+ <th><?php wc_cart_totals_coupon_label( $coupon ); ?></th>
163
+ <td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
164
+ </tr>
165
+ <?php endforeach; ?>
166
+
167
+ <?php do_action( 'woocommerce_review_order_before_order_total' ); ?>
168
+
169
+ <tr class="order-total">
170
+ <th><?php _e( 'Order Total', 'woocommerce' ); ?></th>
171
+ <td><?php wc_cart_totals_order_total_html(); ?></td>
172
+ </tr>
173
+
174
+ <?php do_action( 'woocommerce_review_order_after_order_total' ); ?>
175
+
176
+ </tfoot>
177
+ </table>
178
+
179
+ <div class="form-row place-order">
180
+
181
+ <noscript><?php _e( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'woocommerce' ); ?><br/><input type="submit" class="button alt" name="woocommerce_checkout_update_totals" value="<?php _e( 'Update totals', 'woocommerce' ); ?>" /></noscript>
182
+
183
+ <?php wp_nonce_field( 'woocommerce-process_checkout' ); ?>
184
+
185
+ <?php do_action( 'woocommerce_review_order_before_submit' ); ?>
186
+
187
+ <?php
188
+ $order_button_text = apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) );
189
+
190
+ echo apply_filters( 'woocommerce_order_button_html', '<input type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '" />' );
191
+ ?>
192
+
193
+ <?php if ( wc_get_page_id( 'terms' ) > 0 && apply_filters( 'woocommerce_checkout_show_terms', true ) ) {
194
+ $terms_is_checked = apply_filters( 'woocommerce_terms_is_checked_default', isset( $_POST['terms'] ) );
195
+ ?>
196
+ <p class="form-row terms">
197
+ <label for="terms" class="checkbox"><?php printf( __( 'I&rsquo;ve read and accept the <a href="%s" target="_blank">terms &amp; conditions</a>', 'woocommerce' ), esc_url( get_permalink( wc_get_page_id( 'terms' ) ) ) ); ?></label>
198
+ <input type="checkbox" class="input-checkbox" name="terms" <?php checked( $terms_is_checked, true ); ?> id="terms" />
199
+ </p>
200
+ <?php } ?>
201
+
202
+ <?php do_action( 'woocommerce_review_order_after_submit' ); ?>
203
+
204
+ </div>
205
+
206
+ <div class="clear"></div>
207
+
208
+ <?php do_action( 'woocommerce_review_order_after_payment' ); ?>
209
+
210
+ <?php if ( ! $is_ajax ) : ?></div><?php endif; ?>
templates/checkout/review-order.php CHANGED
@@ -1,210 +1,120 @@
1
  <?php
2
  /**
3
- * Review order form
4
  *
5
  * @author WooThemes
6
  * @package WooCommerce/Templates
7
- * @version 2.1.8
8
  */
9
 
10
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
 
 
11
  ?>
12
-
13
- <?php if ( ! $is_ajax ) : ?><div id="order_review"><?php endif; ?>
14
-
15
- <?php do_action( 'woocommerce_review_order_before_payment' ); ?>
16
-
17
- <div id="payment">
18
- <?php if ( WC()->cart->needs_payment() ) : ?>
19
- <ul class="payment_methods methods">
20
- <?php
21
- $available_gateways = WC()->payment_gateways->get_available_payment_gateways();
22
- if ( ! empty( $available_gateways ) ) {
23
-
24
- // Chosen Method
25
- if ( isset( WC()->session->chosen_payment_method ) && isset( $available_gateways[ WC()->session->chosen_payment_method ] ) ) {
26
- $available_gateways[ WC()->session->chosen_payment_method ]->set_current();
27
- } elseif ( isset( $available_gateways[ get_option( 'woocommerce_default_gateway' ) ] ) ) {
28
- $available_gateways[ get_option( 'woocommerce_default_gateway' ) ]->set_current();
29
- } else {
30
- current( $available_gateways )->set_current();
31
- }
32
-
33
- foreach ( $available_gateways as $gateway ) {
34
- ?>
35
- <li class="payment_method_<?php echo $gateway->id; ?>">
36
- <input id="payment_method_<?php echo $gateway->id; ?>" type="radio" class="input-radio" name="payment_method" value="<?php echo esc_attr( $gateway->id ); ?>" <?php checked( $gateway->chosen, true ); ?> data-order_button_text="<?php echo esc_attr( $gateway->order_button_text ); ?>" />
37
- <label for="payment_method_<?php echo $gateway->id; ?>"><?php echo $gateway->get_title(); ?> <?php echo $gateway->get_icon(); ?></label>
38
- <?php
39
- if ( $gateway->has_fields() || $gateway->get_description() ) :
40
- echo '<div class="payment_box payment_method_' . $gateway->id . '" ' . ( $gateway->chosen ? '' : 'style="display:none;"' ) . '>';
41
- $gateway->payment_fields();
42
- echo '</div>';
43
- endif;
44
- ?>
45
- </li>
46
- <?php
47
- }
48
- } else {
49
-
50
- if ( ! WC()->customer->get_country() )
51
- $no_gateways_message = __( 'Please fill in your details above to see available payment methods.', 'woocommerce' );
52
- else
53
- $no_gateways_message = __( 'Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' );
54
-
55
- echo '<p>' . apply_filters( 'woocommerce_no_available_payment_methods_message', $no_gateways_message ) . '</p>';
56
-
57
- }
58
- ?>
59
- </ul>
60
- <?php endif; ?>
61
- </div>
62
-
63
- <h3 id="wc_gzd_order_review_heading"><?php _e( 'Your order', 'woocommerce' ); ?></h3>
64
-
65
  <?php do_action( 'woocommerce_gzd_before_shop_table' ); ?>
66
-
67
- <table class="shop_table">
68
- <thead>
69
- <tr>
70
- <th class="product-name"><?php _e( 'Product', 'woocommerce' ); ?></th>
71
- <th class="product-total"><?php _e( 'Total', 'woocommerce' ); ?></th>
72
- </tr>
73
- </thead>
74
- <tbody>
75
- <?php
76
- do_action( 'woocommerce_review_order_before_cart_contents' );
77
-
78
- foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
79
- $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
80
-
81
- if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
82
- ?>
83
- <tr class="<?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
84
- <td class="product-name">
85
- <table class="product-name-inner">
86
- <tr>
87
- <?php if ( get_option( 'woocommerce_gzd_display_checkout_thumbnails' ) == 'yes' ) : ?>
88
- <td class="product-thumbnail">
89
- <?php echo apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ); ?>
90
- </td>
91
- <?php endif; ?>
92
- <td class="product-name">
93
- <?php echo apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key ); ?>
94
- <?php echo WC()->cart->get_item_data( $cart_item ); ?>
95
- </td>
96
- <td class="product-quantity">
97
- <?php echo apply_filters( 'woocommerce_checkout_cart_item_quantity', ' <strong class="product-quantity">' . sprintf( '&times; %s', $cart_item['quantity'] ) . '</strong>', $cart_item, $cart_item_key ); ?>
98
  </td>
99
- </tr>
100
- </table>
101
- </td>
102
- <td class="product-total">
103
- <?php echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); ?>
104
- </td>
105
- </tr>
106
- <?php
107
- }
 
 
 
 
 
 
 
108
  }
 
109
 
110
- do_action( 'woocommerce_review_order_after_cart_contents' );
111
- ?>
112
- </tbody>
113
- <tfoot>
114
-
115
- <tr class="cart-subtotal">
116
- <th><?php _e( 'Cart Subtotal', 'woocommerce' ); ?></th>
117
- <td><?php wc_cart_totals_subtotal_html(); ?></td>
 
 
 
 
 
 
118
  </tr>
 
119
 
120
- <?php foreach ( WC()->cart->get_coupons( 'cart' ) as $code => $coupon ) : ?>
121
- <tr class="cart-discount coupon-<?php echo esc_attr( $code ); ?>">
122
- <th><?php wc_cart_totals_coupon_label( $coupon ); ?></th>
123
- <td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
124
- </tr>
125
- <?php endforeach; ?>
126
-
127
- <?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>
128
 
129
- <?php do_action( 'woocommerce_review_order_before_shipping' ); ?>
130
 
131
- <?php wc_cart_totals_shipping_html(); ?>
132
 
133
- <?php do_action( 'woocommerce_review_order_after_shipping' ); ?>
134
 
135
- <?php endif; ?>
136
 
137
- <?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
138
- <tr class="fee">
139
- <th><?php echo esc_html( $fee->name ); ?></th>
140
- <td><?php wc_cart_totals_fee_html( $fee ); ?></td>
141
- </tr>
142
- <?php endforeach; ?>
143
-
144
- <?php if ( WC()->cart->tax_display_cart === 'excl' ) : ?>
145
- <?php if ( get_option( 'woocommerce_tax_total_display' ) === 'itemized' ) : ?>
146
- <?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
147
- <tr class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?>">
148
- <th><?php echo esc_html( $tax->label ); ?></th>
149
- <td><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
150
- </tr>
151
- <?php endforeach; ?>
152
- <?php else : ?>
153
- <tr class="tax-total">
154
- <th><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></th>
155
- <td><?php echo wc_price( WC()->cart->get_taxes_total() ); ?></td>
156
  </tr>
157
- <?php endif; ?>
158
- <?php endif; ?>
159
-
160
- <?php foreach ( WC()->cart->get_coupons( 'order' ) as $code => $coupon ) : ?>
161
- <tr class="order-discount coupon-<?php echo esc_attr( $code ); ?>">
162
- <th><?php wc_cart_totals_coupon_label( $coupon ); ?></th>
163
- <td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
164
  </tr>
165
- <?php endforeach; ?>
166
-
167
- <?php do_action( 'woocommerce_review_order_before_order_total' ); ?>
168
-
169
- <tr class="order-total">
170
- <th><?php _e( 'Order Total', 'woocommerce' ); ?></th>
171
- <td><?php wc_cart_totals_order_total_html(); ?></td>
172
- </tr>
173
-
174
- <?php do_action( 'woocommerce_review_order_after_order_total' ); ?>
175
-
176
- </tfoot>
177
- </table>
178
-
179
- <div class="form-row place-order">
180
-
181
- <noscript><?php _e( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'woocommerce' ); ?><br/><input type="submit" class="button alt" name="woocommerce_checkout_update_totals" value="<?php _e( 'Update totals', 'woocommerce' ); ?>" /></noscript>
182
-
183
- <?php wp_nonce_field( 'woocommerce-process_checkout' ); ?>
184
-
185
- <?php do_action( 'woocommerce_review_order_before_submit' ); ?>
186
-
187
- <?php
188
- $order_button_text = apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) );
189
-
190
- echo apply_filters( 'woocommerce_order_button_html', '<input type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '" />' );
191
- ?>
192
-
193
- <?php if ( wc_get_page_id( 'terms' ) > 0 && apply_filters( 'woocommerce_checkout_show_terms', true ) ) {
194
- $terms_is_checked = apply_filters( 'woocommerce_terms_is_checked_default', isset( $_POST['terms'] ) );
195
- ?>
196
- <p class="form-row terms">
197
- <label for="terms" class="checkbox"><?php printf( __( 'I&rsquo;ve read and accept the <a href="%s" target="_blank">terms &amp; conditions</a>', 'woocommerce' ), esc_url( get_permalink( wc_get_page_id( 'terms' ) ) ) ); ?></label>
198
- <input type="checkbox" class="input-checkbox" name="terms" <?php checked( $terms_is_checked, true ); ?> id="terms" />
199
- </p>
200
- <?php } ?>
201
-
202
- <?php do_action( 'woocommerce_review_order_after_submit' ); ?>
203
 
204
- </div>
205
 
206
- <div class="clear"></div>
 
 
 
207
 
208
- <?php do_action( 'woocommerce_review_order_after_payment' ); ?>
209
 
210
- <?php if ( ! $is_ajax ) : ?></div><?php endif; ?>
 
1
  <?php
2
  /**
3
+ * Review order table
4
  *
5
  * @author WooThemes
6
  * @package WooCommerce/Templates
7
+ * @version 2.3.0
8
  */
9
 
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
  ?>
14
+ <?php if ( ! is_ajax() ) : ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  <?php do_action( 'woocommerce_gzd_before_shop_table' ); ?>
16
+ <?php endif; ?>
17
+ <table class="shop_table woocommerce-checkout-review-order-table">
18
+ <thead>
19
+ <tr>
20
+ <th class="product-name"><?php _e( 'Product', 'woocommerce' ); ?></th>
21
+ <th class="product-total"><?php echo __( 'Total Sum', 'woocommerce-germanized' ); ?></th>
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <?php
26
+ do_action( 'woocommerce_review_order_before_cart_contents' );
27
+
28
+ foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
29
+ $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
30
+
31
+ if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
32
+ ?>
33
+ <tr class="<?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
34
+ <td class="product-name">
35
+ <table class="product-details-inner">
36
+ <tr>
37
+ <?php if ( get_option( 'woocommerce_gzd_display_checkout_thumbnails' ) == 'yes' ) : ?>
38
+ <td class="product-thumbnail">
39
+ <?php echo apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ); ?>
 
 
 
 
 
 
 
 
40
  </td>
41
+ <?php endif; ?>
42
+ <td class="product-title">
43
+ <?php echo apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key ); ?>
44
+ <?php echo WC()->cart->get_item_data( $cart_item ); ?>
45
+ </td>
46
+ <td class="product-quantity">
47
+ <?php echo apply_filters( 'woocommerce_checkout_cart_item_quantity', ' <strong class="product-quantity">' . sprintf( '&times; %s', $cart_item['quantity'] ) . '</strong>', $cart_item, $cart_item_key ); ?>
48
+ </td>
49
+ </tr>
50
+ </table>
51
+ </td>
52
+ <td class="product-total">
53
+ <?php echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); ?>
54
+ </td>
55
+ </tr>
56
+ <?php
57
  }
58
+ }
59
 
60
+ do_action( 'woocommerce_review_order_after_cart_contents' );
61
+ ?>
62
+ </tbody>
63
+ <tfoot>
64
+
65
+ <tr class="cart-subtotal">
66
+ <th><?php _e( 'Cart Subtotal', 'woocommerce' ); ?></th>
67
+ <td><?php wc_cart_totals_subtotal_html(); ?></td>
68
+ </tr>
69
+
70
+ <?php foreach ( WC()->cart->get_coupons() as $code => $coupon ) : ?>
71
+ <tr class="cart-discount coupon-<?php echo esc_attr( $code ); ?>">
72
+ <th><?php wc_cart_totals_coupon_label( $coupon ); ?></th>
73
+ <td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
74
  </tr>
75
+ <?php endforeach; ?>
76
 
77
+ <?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>
 
 
 
 
 
 
 
78
 
79
+ <?php do_action( 'woocommerce_review_order_before_shipping' ); ?>
80
 
81
+ <?php wc_cart_totals_shipping_html(); ?>
82
 
83
+ <?php do_action( 'woocommerce_review_order_after_shipping' ); ?>
84
 
85
+ <?php endif; ?>
86
 
87
+ <?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
88
+ <tr class="fee">
89
+ <th><?php echo esc_html( $fee->name ); ?></th>
90
+ <td><?php wc_cart_totals_fee_html( $fee ); ?></td>
91
+ </tr>
92
+ <?php endforeach; ?>
93
+
94
+ <?php if ( WC()->cart->tax_display_cart === 'excl' ) : ?>
95
+ <?php if ( get_option( 'woocommerce_tax_total_display' ) === 'itemized' ) : ?>
96
+ <?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
97
+ <tr class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?>">
98
+ <th><?php echo esc_html( $tax->label ); ?></th>
99
+ <td><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
 
 
 
 
 
 
100
  </tr>
101
+ <?php endforeach; ?>
102
+ <?php else : ?>
103
+ <tr class="tax-total">
104
+ <th><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></th>
105
+ <td><?php echo wc_price( WC()->cart->get_taxes_total() ); ?></td>
 
 
106
  </tr>
107
+ <?php endif; ?>
108
+ <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
 
110
+ <?php do_action( 'woocommerce_review_order_before_order_total' ); ?>
111
 
112
+ <tr class="order-total">
113
+ <th><?php _e( 'Order Total', 'woocommerce' ); ?></th>
114
+ <td><?php wc_cart_totals_order_total_html(); ?></td>
115
+ </tr>
116
 
117
+ <?php do_action( 'woocommerce_review_order_after_order_total' ); ?>
118
 
119
+ </tfoot>
120
+ </table>
woocommerce-germanized.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce Germanized
4
  * Plugin URI: http://www.vendidero.de/woocommerce-germanized
5
  * Description: Extends WooCommerce to become a legally compliant store for the german market.
6
- * Version: 1.1.1
7
  * Author: Vendidero
8
  * Author URI: http://vendidero.de
9
  * Requires at least: 3.8
@@ -26,7 +26,7 @@ final class WooCommerce_Germanized {
26
  *
27
  * @var string
28
  */
29
- public $version = '1.1.1';
30
 
31
  /**
32
  * Single instance of WooCommerce Germanized Main Class
@@ -130,6 +130,7 @@ final class WooCommerce_Germanized {
130
  add_action( 'plugins_loaded', array( $this, 'load_plugin_textdomain' ) );
131
  add_action( 'woocommerce_init', array( $this, 'replace_woocommerce_cart' ), 0 );
132
  add_action( 'woocommerce_init', array( $this, 'replace_woocommerce_payment_gateways' ), 0 );
 
133
 
134
  // Loaded action
135
  do_action( 'woocommerce_germanized_loaded' );
@@ -164,6 +165,10 @@ final class WooCommerce_Germanized {
164
  do_action( 'before_woocommerce_germanized_init' );
165
 
166
  add_filter( 'woocommerce_locate_template', array( $this, 'filter_templates' ), PHP_INT_MAX, 3 );
 
 
 
 
167
  add_filter( 'woocommerce_product_class', array( $this, 'filter_product_classes' ), PHP_INT_MAX, 4 );
168
  add_filter( 'woocommerce_get_settings_pages', array( $this, 'add_settings' ) );
169
  add_filter( 'woocommerce_enqueue_styles', array( $this, 'add_styles' ) );
@@ -181,14 +186,13 @@ final class WooCommerce_Germanized {
181
 
182
  // Adjust virtual Product Price and tax class
183
  add_filter( 'woocommerce_get_price_including_tax', array( $this, 'set_virtual_product_price' ), PHP_INT_MAX, 3 );
184
- add_filter( 'get_post_metadata', array( $this, 'inject_gzd_product' ), 0, 4 );
185
 
186
  // Hide cart estimated text if chosen
187
  add_action( 'woocommerce_cart_totals_after_order_total', array( $this, 'hide_cart_estimated_text' ) );
188
  add_action( 'woocommerce_after_cart_totals', array( $this, 'remove_cart_tax_zero_filter' ) );
189
 
190
  // Add better WooCommerce shipping taxation
191
- // add_filter( 'woocommerce_package_rates', array( $this, 'replace_shipping_rate_class' ), 0, 2 );
192
 
193
  // Send order notice directly after new order is being added - use these filters because order status has to be updated already
194
  add_filter( 'woocommerce_payment_successful_result', array( $this, 'send_order_confirmation_mails' ), 0, 2 );
@@ -219,6 +223,13 @@ final class WooCommerce_Germanized {
219
  WC()->payment_gateways = WC_GZD_Payment_Gateways::instance();
220
  }
221
 
 
 
 
 
 
 
 
222
  /**
223
  * Replace default WC_Shipping_Rate to enable exact taxation for shipping costs
224
  *
@@ -246,6 +257,12 @@ final class WooCommerce_Germanized {
246
  if ( strpos( $class, 'wc_gzd_gateway_' ) === 0 )
247
  $path = $this->plugin_path() . '/includes/gateways/' . trailingslashit( substr( str_replace( '_', '-', $class ), 15 ) );
248
 
 
 
 
 
 
 
249
  if ( $path && is_readable( $path . $file ) ) {
250
  include_once( $path . $file );
251
  return;
@@ -270,6 +287,15 @@ final class WooCommerce_Germanized {
270
  return untrailingslashit( plugin_dir_path( __FILE__ ) );
271
  }
272
 
 
 
 
 
 
 
 
 
 
273
  /**
274
  * Get the language path
275
  *
@@ -352,14 +378,12 @@ final class WooCommerce_Germanized {
352
  * @return string
353
  */
354
  public function filter_templates( $template, $template_name, $template_path ) {
355
-
356
- if ( ! $template_path ) {
357
- $template_path = WC()->template_path();
358
- }
359
 
360
  if ( empty( $GLOBALS[ 'template_name' ] ) )
361
  $GLOBALS['template_name'] = array();
362
  $GLOBALS['template_name'][] = $template_name;
 
363
  // Check Theme
364
  $theme_template = locate_template(
365
  array(
@@ -367,49 +391,47 @@ final class WooCommerce_Germanized {
367
  $template_name
368
  )
369
  );
370
- if ( ! $this->is_theme_template_compatible( $template_name, $theme_template ) )
371
- $theme_template = false;
372
  // Load Default
373
- if ( ! $theme_template ) {
374
- if ( file_exists( $this->plugin_path() . '/templates/' . $template_name ) )
375
- $template = $this->plugin_path() . '/templates/' . $template_name;
376
- } else
377
  $template = $theme_template;
378
-
379
  return apply_filters( 'woocommerce_germanized_filter_template', $template, $template_name, $template_path );
380
  }
381
 
382
  /**
383
- * Checks if a template from a theme is woocommerce germanized compatible
384
  *
385
- * @param string $template template's file name
386
- * @param string $path path to template file
387
- * @return boolean
388
- */
389
- public function is_theme_template_compatible( $template, $path = '' ) {
390
- $templates_to_check = apply_filters( 'woocommerce_gzd_important_templates', array( 'checkout/form-pay.php', 'checkout/review-order.php' ) );
391
- if ( in_array( $template, $templates_to_check ) && ! empty( $path ) ) {
392
- // Check if theme may overwrite files
393
- $data = get_file_data( $path, array( 'wc_gzd_compatible' => 'wc_gzd_compatible' ) );
394
- if ( ! $data[ 'wc_gzd_compatible' ] )
395
- return false;
396
- }
397
- return true;
398
  }
399
 
400
  /**
401
- * Inject WC_GZD_Product into WC_Product by filtering postmeta
402
  *
403
- * @param mixed $metadata
404
- * @param int $object_id
405
- * @param string $meta_key
406
- * @param boolean $single
407
- * @return mixed
 
 
 
 
 
408
  */
409
- public function inject_gzd_product( $metadata, $object_id, $meta_key, $single ) {
410
- if ( $meta_key == '_gzd_product' && in_array( get_post_type( $object_id ), array( 'product', 'product_variation' ) ) )
411
- return wc_gzd_get_product( $object_id );
412
- return $metadata;
413
  }
414
 
415
  /**
@@ -723,20 +745,25 @@ final class WooCommerce_Germanized {
723
  if ( 'itemized' == get_option( 'woocommerce_tax_total_display' ) ) {
724
  foreach ( $order->get_tax_totals() as $code => $tax ) {
725
  $tax->rate = WC_Tax::get_rate_percent( $tax->rate_id );
726
- $tax_array[] = array( 'tax' => $tax, 'amount' => $tax->formatted_amount );
 
 
 
 
 
727
  }
728
  } else {
729
  $base_rate = array_values( WC_Tax::get_shop_base_rate() );
730
  $base_rate = (object) $base_rate[0];
731
  $base_rate->rate = $base_rate->rate;
732
- $tax_array[] = array( 'tax' => $base_rate, 'amount' => wc_price( $order->get_total_tax() ) );
733
  }
734
 
735
  if ( ! empty( $tax_array ) ) {
736
  foreach ( $tax_array as $tax ) {
737
  $order_totals['tax_' . $tax['tax']->label] = array(
738
  'label' => '<span class="tax small tax-label">' . ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ? sprintf( __( 'incl. %s%% VAT', 'woocommerce-germanized' ), wc_gzd_format_tax_rate_percentage( $tax[ 'tax' ]->rate ) ) : __( 'incl. VAT', 'woocommerce-germanized' ) ) . '</span>',
739
- 'value' => '<span class="tax small tax-value">' . $tax[ 'amount' ] . '</span>'
740
  );
741
  }
742
  }
3
  * Plugin Name: WooCommerce Germanized
4
  * Plugin URI: http://www.vendidero.de/woocommerce-germanized
5
  * Description: Extends WooCommerce to become a legally compliant store for the german market.
6
+ * Version: 1.2.0
7
  * Author: Vendidero
8
  * Author URI: http://vendidero.de
9
  * Requires at least: 3.8
26
  *
27
  * @var string
28
  */
29
+ public $version = '1.2.0';
30
 
31
  /**
32
  * Single instance of WooCommerce Germanized Main Class
130
  add_action( 'plugins_loaded', array( $this, 'load_plugin_textdomain' ) );
131
  add_action( 'woocommerce_init', array( $this, 'replace_woocommerce_cart' ), 0 );
132
  add_action( 'woocommerce_init', array( $this, 'replace_woocommerce_payment_gateways' ), 0 );
133
+ add_action( 'woocommerce_init', array( $this, 'replace_woocommerce_product_factory' ), PHP_INT_MAX );
134
 
135
  // Loaded action
136
  do_action( 'woocommerce_germanized_loaded' );
165
  do_action( 'before_woocommerce_germanized_init' );
166
 
167
  add_filter( 'woocommerce_locate_template', array( $this, 'filter_templates' ), PHP_INT_MAX, 3 );
168
+ if ( version_compare( WC()->version, '2.3', '<' ) )
169
+ add_filter( 'woocommerce_gzd_default_plugin_template', array( $this, 'filter_templates_old_version' ), 0, 2 );
170
+ else
171
+ add_filter( 'woocommerce_gzd_important_templates', array( $this, 'set_critical_templates_new_version' ), 0 );
172
  add_filter( 'woocommerce_product_class', array( $this, 'filter_product_classes' ), PHP_INT_MAX, 4 );
173
  add_filter( 'woocommerce_get_settings_pages', array( $this, 'add_settings' ) );
174
  add_filter( 'woocommerce_enqueue_styles', array( $this, 'add_styles' ) );
186
 
187
  // Adjust virtual Product Price and tax class
188
  add_filter( 'woocommerce_get_price_including_tax', array( $this, 'set_virtual_product_price' ), PHP_INT_MAX, 3 );
 
189
 
190
  // Hide cart estimated text if chosen
191
  add_action( 'woocommerce_cart_totals_after_order_total', array( $this, 'hide_cart_estimated_text' ) );
192
  add_action( 'woocommerce_after_cart_totals', array( $this, 'remove_cart_tax_zero_filter' ) );
193
 
194
  // Add better WooCommerce shipping taxation
195
+ add_filter( 'woocommerce_package_rates', array( $this, 'replace_shipping_rate_class' ), 0, 2 );
196
 
197
  // Send order notice directly after new order is being added - use these filters because order status has to be updated already
198
  add_filter( 'woocommerce_payment_successful_result', array( $this, 'send_order_confirmation_mails' ), 0, 2 );
223
  WC()->payment_gateways = WC_GZD_Payment_Gateways::instance();
224
  }
225
 
226
+ /**
227
+ * Overload product factory to inject gzd_product
228
+ */
229
+ public function replace_woocommerce_product_factory() {
230
+ WC()->product_factory = new WC_GZD_Product_Factory();
231
+ }
232
+
233
  /**
234
  * Replace default WC_Shipping_Rate to enable exact taxation for shipping costs
235
  *
257
  if ( strpos( $class, 'wc_gzd_gateway_' ) === 0 )
258
  $path = $this->plugin_path() . '/includes/gateways/' . trailingslashit( substr( str_replace( '_', '-', $class ), 15 ) );
259
 
260
+ if ( version_compare( get_option( 'woocommerce_version' ), '2.3', '<' ) ) {
261
+ $old_file = str_replace( '.php', '-2-2.php', $file );
262
+ if ( $path && is_readable( $path . $old_file ) )
263
+ $file = $old_file;
264
+ }
265
+
266
  if ( $path && is_readable( $path . $file ) ) {
267
  include_once( $path . $file );
268
  return;
287
  return untrailingslashit( plugin_dir_path( __FILE__ ) );
288
  }
289
 
290
+ /**
291
+ * Get WC Germanized template path
292
+ *
293
+ * @return string
294
+ */
295
+ public function template_path() {
296
+ return apply_filters( 'woocommerce_gzd_template_path', 'woocommerce-germanized/' );
297
+ }
298
+
299
  /**
300
  * Get the language path
301
  *
378
  * @return string
379
  */
380
  public function filter_templates( $template, $template_name, $template_path ) {
381
+ $template_path = $this->template_path();
 
 
 
382
 
383
  if ( empty( $GLOBALS[ 'template_name' ] ) )
384
  $GLOBALS['template_name'] = array();
385
  $GLOBALS['template_name'][] = $template_name;
386
+
387
  // Check Theme
388
  $theme_template = locate_template(
389
  array(
391
  $template_name
392
  )
393
  );
394
+
 
395
  // Load Default
396
+ if ( ! $theme_template && file_exists( apply_filters( 'woocommerce_gzd_default_plugin_template', $this->plugin_path() . '/templates/' . $template_name, $template_name ) ) )
397
+ return apply_filters( 'woocommerce_gzd_default_plugin_template', $this->plugin_path() . '/templates/' . $template_name, $template_name );
398
+ else if ( $theme_template )
 
399
  $template = $theme_template;
400
+
401
  return apply_filters( 'woocommerce_germanized_filter_template', $template, $template_name, $template_path );
402
  }
403
 
404
  /**
405
+ * Filter templates for WooCommerce 2.2 specific template files
406
  *
407
+ * @param string $path
408
+ * @param string $template_name
409
+ * @return string
410
+ */
411
+ public function filter_templates_old_version( $path, $template_name ) {
412
+ $old_path = str_replace( '.php', '-2-2.php', $path );
413
+ if ( file_exists( $old_path ) )
414
+ return $old_path;
415
+ return $path;
 
 
 
 
416
  }
417
 
418
  /**
419
+ * Get templates which are legally critical
420
  *
421
+ * @return array
422
+ */
423
+ public function get_critical_templates() {
424
+ return apply_filters( 'woocommerce_gzd_important_templates', array( 'checkout/form-pay.php', 'checkout/review-order.php' ) );
425
+ }
426
+
427
+ /**
428
+ * Add payment.php template to critical if Woo 2.3 is acticated
429
+ *
430
+ * @param array $templates
431
  */
432
+ public function set_critical_templates_new_version( $templates ) {
433
+ array_push( $templates, 'checkout/payment.php' );
434
+ return $templates;
 
435
  }
436
 
437
  /**
745
  if ( 'itemized' == get_option( 'woocommerce_tax_total_display' ) ) {
746
  foreach ( $order->get_tax_totals() as $code => $tax ) {
747
  $tax->rate = WC_Tax::get_rate_percent( $tax->rate_id );
748
+ if ( ! isset( $tax_array[ $tax->rate ] ) )
749
+ $tax_array[ $tax->rate ] = array( 'tax' => $tax, 'amount' => $tax->amount, 'contains' => array( $tax ) );
750
+ else {
751
+ array_push( $tax_array[ $tax->rate ][ 'contains' ], $tax );
752
+ $tax_array[ $tax->rate ][ 'amount' ] += $tax->amount;
753
+ }
754
  }
755
  } else {
756
  $base_rate = array_values( WC_Tax::get_shop_base_rate() );
757
  $base_rate = (object) $base_rate[0];
758
  $base_rate->rate = $base_rate->rate;
759
+ $tax_array[] = array( 'tax' => $base_rate, 'contains' => array( $base_rate ), 'amount' => $order->get_total_tax() );
760
  }
761
 
762
  if ( ! empty( $tax_array ) ) {
763
  foreach ( $tax_array as $tax ) {
764
  $order_totals['tax_' . $tax['tax']->label] = array(
765
  'label' => '<span class="tax small tax-label">' . ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ? sprintf( __( 'incl. %s%% VAT', 'woocommerce-germanized' ), wc_gzd_format_tax_rate_percentage( $tax[ 'tax' ]->rate ) ) : __( 'incl. VAT', 'woocommerce-germanized' ) ) . '</span>',
766
+ 'value' => '<span class="tax small tax-value">' . wc_price( $tax[ 'amount' ] ) . '</span>'
767
  );
768
  }
769
  }