summaryrefslogtreecommitdiff
path: root/views/mods
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2016-01-14 14:55:36 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2016-01-14 14:55:36 +0000
commitad405c7045c6e242080ec9d3ce4c9e586b517c4f (patch)
treeb41905f4d27f3eaaabd5bad3a39f8d3873540b46 /views/mods
- Testweise 4
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5261 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods')
-rw-r--r--views/mods/mod_abo/basket_row.phtml16
-rw-r--r--views/mods/mod_abo/mail_expiration.phtml25
-rw-r--r--views/mods/mod_abo/mail_expiration_html.phtml25
-rw-r--r--views/mods/mod_abo/mail_firstbuy.phtml23
-rw-r--r--views/mods/mod_abo/mail_firstbuy_html.phtml23
-rw-r--r--views/mods/mod_abo/mail_rebuy.phtml25
-rw-r--r--views/mods/mod_abo/mail_rebuy_html.phtml25
-rw-r--r--views/mods/mod_abo/mail_row.phtml8
-rw-r--r--views/mods/mod_abo/mail_row_html.phtml13
-rw-r--r--views/mods/mod_abo/order_view_base.phtml18
-rw-r--r--views/mods/mod_abo/order_view_row.phtml13
-rw-r--r--views/mods/mod_abo/overview_row.phtml13
-rw-r--r--views/mods/mod_abo/produkt_edit_content.phtml58
-rw-r--r--views/mods/mod_abo/settings_edit.phtml12
-rw-r--r--views/mods/mod_auftragsbestaetigung/auftragsbestaetigung.phtml149
-rw-r--r--views/mods/mod_auftragsbestaetigung/auftragsbestaetigung_html.phtml50
-rw-r--r--views/mods/mod_auftragsbestaetigung/order_view.phtml51
-rw-r--r--views/mods/mod_autodebit/mail.phtml21
-rw-r--r--views/mods/mod_autodebit/mail_html.phtml41
-rw-r--r--views/mods/mod_autodebit/order_done.phtml8
-rw-r--r--views/mods/mod_autodebit/order_view_afterpayment.phtml23
-rw-r--r--views/mods/mod_autodebit/paymenthint.phtml67
-rw-r--r--views/mods/mod_autodebit/settings_edit.phtml18
-rw-r--r--views/mods/mod_bankalignment/order_ajax.phtml97
-rw-r--r--views/mods/mod_bankalignment/produkt_index_aftersearch.phtml29
-rw-r--r--views/mods/mod_bankalignment/produkt_index_head.phtml11
-rw-r--r--views/mods/mod_bankalignment/settings_edit.phtml9
-rw-r--r--views/mods/mod_basketteaser/basket_row.phtml25
-rw-r--r--views/mods/mod_basketteaser/produkt_edit_sidebar.phtml18
-rw-r--r--views/mods/mod_basketteaser/settings_edit.phtml29
-rw-r--r--views/mods/mod_billsafe/gfx/logo_100x25.pngbin0 -> 3052 bytes
-rw-r--r--views/mods/mod_billsafe/order_done.phtml24
-rw-r--r--views/mods/mod_billsafe/order_view_sidebar.phtml30
-rw-r--r--views/mods/mod_billsafe/settings_edit.phtml30
-rw-r--r--views/mods/mod_billsafe/zahlung_ablehnung.phtml11
-rw-r--r--views/mods/mod_billsafe/zahlung_erfolg.phtml11
-rw-r--r--views/mods/mod_cab/mail_mms.phtml12
-rw-r--r--views/mods/mod_cab/mail_mms_error.phtml12
-rw-r--r--views/mods/mod_cab/mail_resend.phtml10
-rw-r--r--views/mods/mod_cab/order_done.phtml24
-rw-r--r--views/mods/mod_cab/order_view_content.phtml83
-rw-r--r--views/mods/mod_cab/order_view_content_inner.phtml67
-rw-r--r--views/mods/mod_cab/settings_edit.phtml49
-rw-r--r--views/mods/mod_core/admin_licence.phtml7
-rw-r--r--views/mods/mod_core/admin_register.phtml100
-rw-r--r--views/mods/mod_core/module_index.phtml78
-rw-r--r--views/mods/mod_crefopay/gfx/logo_100x25.pngbin0 -> 3247 bytes
-rw-r--r--views/mods/mod_crefopay/gfx/logo_crefopay.gifbin0 -> 4455 bytes
-rw-r--r--views/mods/mod_crefopay/iframe.phtml21
-rw-r--r--views/mods/mod_crefopay/order_done.phtml19
-rw-r--r--views/mods/mod_crefopay/order_view_afterpayment.phtml26
-rw-r--r--views/mods/mod_crefopay/settings_edit.phtml69
-rw-r--r--views/mods/mod_customerbudget/customer_sidebar.phtml16
-rw-r--r--views/mods/mod_customerbudget/settings_edit.phtml9
-rw-r--r--views/mods/mod_customergroup/addedit.phtml165
-rw-r--r--views/mods/mod_customergroup/index.phtml217
-rw-r--r--views/mods/mod_customergroup/settings_edit.phtml9
-rw-r--r--views/mods/mod_debitpayment/settings_edit.phtml15
-rw-r--r--views/mods/mod_deliverynote/deliverymail.phtml19
-rw-r--r--views/mods/mod_deliverynote/deliverymail_html.phtml21
-rw-r--r--views/mods/mod_deliverynote/deliverynote_pdf.phtml340
-rw-r--r--views/mods/mod_deliverynote/foottext_list.phtml61
-rw-r--r--views/mods/mod_deliverynote/order_view_content.phtml150
-rw-r--r--views/mods/mod_deliverynote/order_view_row.phtml15
-rw-r--r--views/mods/mod_deliverynote/settings_edit.phtml209
-rw-r--r--views/mods/mod_deliverytime/basket_row.phtml13
-rw-r--r--views/mods/mod_deliverytime/mail_row.phtml7
-rw-r--r--views/mods/mod_deliverytime/mail_row_html.phtml16
-rw-r--r--views/mods/mod_deliverytime/overview_row.phtml13
-rw-r--r--views/mods/mod_deliverytime/produkt_edit_allgemein.phtml12
-rw-r--r--views/mods/mod_deliverytime/settings_edit.phtml40
-rw-r--r--views/mods/mod_discount/basket_top.phtml14
-rw-r--r--views/mods/mod_discount/customergroup_edit.phtml16
-rw-r--r--views/mods/mod_discount/productgroups_addedit_sidebar.phtml19
-rw-r--r--views/mods/mod_discount/produkt_edit_sidebar.phtml19
-rw-r--r--views/mods/mod_discount/settings_edit.phtml175
-rw-r--r--views/mods/mod_downloadplus/cronmail.phtml18
-rw-r--r--views/mods/mod_downloadplus/cronmail_html.phtml22
-rw-r--r--views/mods/mod_downloadplus/filelist.phtml20
-rw-r--r--views/mods/mod_downloadplus/order_view_sidebar.phtml110
-rw-r--r--views/mods/mod_downloadplus/order_view_sidebar_renderlist.phtml66
-rw-r--r--views/mods/mod_downloadplus/pdfdownloadmail.phtml18
-rw-r--r--views/mods/mod_downloadplus/pdfdownloadmail_html.phtml20
-rw-r--r--views/mods/mod_downloadplus/produkt_edit_sidebar.phtml105
-rw-r--r--views/mods/mod_downloadplus/settings_edit.phtml289
-rw-r--r--views/mods/mod_downloadprodukte/order_view_row.phtml15
-rw-r--r--views/mods/mod_downloadprodukte/produkt_edit_list.phtml22
-rw-r--r--views/mods/mod_downloadprodukte/produkt_edit_sidebar.phtml102
-rw-r--r--views/mods/mod_downloadprodukte/settings_edit.phtml32
-rw-r--r--views/mods/mod_downloadprodukte/zahlung_downloadprodukt.phtml16
-rw-r--r--views/mods/mod_downloadprodukte/zahlung_downloadprodukt_html.phtml21
-rw-r--r--views/mods/mod_export/produkt_index_aftersearch.phtml65
-rw-r--r--views/mods/mod_export/produkt_index_head.phtml13
-rw-r--r--views/mods/mod_export/profil.phtml287
-rw-r--r--views/mods/mod_export/profillist.phtml25
-rw-r--r--views/mods/mod_export/settings_edit.phtml107
-rw-r--r--views/mods/mod_flexipay/gfx/flexipay.gifbin0 -> 6247 bytes
-rw-r--r--views/mods/mod_flexipay/gfx/logo_100x25.pngbin0 -> 1578 bytes
-rw-r--r--views/mods/mod_flexipay/order_done.phtml18
-rw-r--r--views/mods/mod_flexipay/settings_edit.phtml77
-rw-r--r--views/mods/mod_freeshipping/settings_edit.phtml10
-rw-r--r--views/mods/mod_fuellmenge/priceinfo.phtml11
-rw-r--r--views/mods/mod_fuellmenge/produkt_edit_sidebar.phtml17
-rw-r--r--views/mods/mod_fuellmenge/settings_edit.phtml14
-rw-r--r--views/mods/mod_funding/product_bottom.phtml20
-rw-r--r--views/mods/mod_funding/product_edit_sidebar.phtml48
-rw-r--r--views/mods/mod_funding/product_top_afterheadline.phtml19
-rw-r--r--views/mods/mod_funding/settings_edit.phtml7
-rw-r--r--views/mods/mod_giropay/gfx/gc_creditcard.pngbin0 -> 8505 bytes
-rw-r--r--views/mods/mod_giropay/gfx/gc_directdebit.pngbin0 -> 7898 bytes
-rwxr-xr-xviews/mods/mod_giropay/gfx/gc_giropay.pngbin0 -> 7262 bytes
-rw-r--r--views/mods/mod_giropay/gfx/logo_100x25.pngbin0 -> 1838 bytes
-rw-r--r--views/mods/mod_giropay/order_done.phtml21
-rwxr-xr-xviews/mods/mod_giropay/settings_edit.phtml81
-rw-r--r--views/mods/mod_gutschein/add.phtml72
-rw-r--r--views/mods/mod_gutschein/admin_setcapabilities.phtml19
-rw-r--r--views/mods/mod_gutschein/basket_row_end.phtml17
-rw-r--r--views/mods/mod_gutschein/import.phtml36
-rw-r--r--views/mods/mod_gutschein/index.phtml332
-rw-r--r--views/mods/mod_gutschein/settings_edit.phtml9
-rw-r--r--views/mods/mod_icp/gfx/icp.pngbin0 -> 2508 bytes
-rw-r--r--views/mods/mod_icp/order_done.phtml18
-rw-r--r--views/mods/mod_icp/settings_edit.phtml75
-rw-r--r--views/mods/mod_invoice_type/settings_edit.phtml15
-rw-r--r--views/mods/mod_keygen/settings_edit.phtml119
-rw-r--r--views/mods/mod_klarna/gfx/klarna_rechnung.pngbin0 -> 11288 bytes
-rw-r--r--views/mods/mod_klarna/gfx/logo_100x25.pngbin0 -> 2705 bytes
-rw-r--r--views/mods/mod_klarna/settings_edit.phtml25
-rw-r--r--views/mods/mod_kundenkontakt/order_view.phtml184
-rw-r--r--views/mods/mod_kundenkontakt/templates/zahlungsaufforderung.phtml30
-rw-r--r--views/mods/mod_kundenkontakt/templates/zahlungsaufforderung_html.phtml35
-rw-r--r--views/mods/mod_kundenkontakt/templates/zahlungserinnerung.phtml30
-rw-r--r--views/mods/mod_kundenkontakt/templates/zahlungserinnerung_html.phtml34
-rw-r--r--views/mods/mod_kundenverwaltung/admin_setcapabilities.phtml19
-rw-r--r--views/mods/mod_kundenverwaltung/checkout_customer_inner.phtml23
-rw-r--r--views/mods/mod_kundenverwaltung/checkout_login.phtml32
-rw-r--r--views/mods/mod_kundenverwaltung/checkout_logout.phtml16
-rw-r--r--views/mods/mod_kundenverwaltung/edit.phtml260
-rw-r--r--views/mods/mod_kundenverwaltung/getpwd.phtml35
-rw-r--r--views/mods/mod_kundenverwaltung/import.phtml30
-rw-r--r--views/mods/mod_kundenverwaltung/index.phtml264
-rw-r--r--views/mods/mod_kundenverwaltung/login.phtml42
-rw-r--r--views/mods/mod_kundenverwaltung/logout.phtml10
-rw-r--r--views/mods/mod_kundenverwaltung/mail_activate.phtml14
-rw-r--r--views/mods/mod_kundenverwaltung/mail_activate_html.phtml14
-rw-r--r--views/mods/mod_kundenverwaltung/mail_pwdrequest.phtml19
-rw-r--r--views/mods/mod_kundenverwaltung/mail_pwdrequest_html.phtml20
-rw-r--r--views/mods/mod_kundenverwaltung/mail_pwdsend.phtml15
-rw-r--r--views/mods/mod_kundenverwaltung/mail_pwdsend_html.phtml15
-rw-r--r--views/mods/mod_kundenverwaltung/mail_register.phtml26
-rw-r--r--views/mods/mod_kundenverwaltung/mail_register_html.phtml61
-rw-r--r--views/mods/mod_kundenverwaltung/order.phtml94
-rw-r--r--views/mods/mod_kundenverwaltung/profil.phtml193
-rw-r--r--views/mods/mod_kundenverwaltung/register.phtml235
-rw-r--r--views/mods/mod_kundenverwaltung/settings_edit.phtml85
-rw-r--r--views/mods/mod_kundenverwaltung/widget.phtml50
-rw-r--r--views/mods/mod_legaltexts/form_haendlerbund.phtml39
-rw-r--r--views/mods/mod_legaltexts/form_itrecht.phtml37
-rw-r--r--views/mods/mod_legaltexts/form_protectedshops.phtml27
-rw-r--r--views/mods/mod_legaltexts/settings_edit.phtml43
-rw-r--r--views/mods/mod_micropayment/debugInfo.phtml33
-rw-r--r--views/mods/mod_micropayment/gfx/bank2pay.pngbin0 -> 7310 bytes
-rw-r--r--views/mods/mod_micropayment/gfx/call2pay.pngbin0 -> 7265 bytes
-rw-r--r--views/mods/mod_micropayment/gfx/chip.pngbin0 -> 5996 bytes
-rw-r--r--views/mods/mod_micropayment/gfx/creditcard.pngbin0 -> 8798 bytes
-rw-r--r--views/mods/mod_micropayment/gfx/directdebit.pngbin0 -> 7554 bytes
-rw-r--r--views/mods/mod_micropayment/gfx/handypay.pngbin0 -> 7874 bytes
-rw-r--r--views/mods/mod_micropayment/gfx/logo_100x25.pngbin0 -> 2888 bytes
-rw-r--r--views/mods/mod_micropayment/gfx/prepayment.pngbin0 -> 8602 bytes
-rw-r--r--views/mods/mod_micropayment/order_done.phtml122
-rw-r--r--views/mods/mod_micropayment/settings_edit.phtml213
-rw-r--r--views/mods/mod_minquantity/produkt_edit_allgemein.phtml9
-rw-r--r--views/mods/mod_minquantity/settings_edit.phtml7
-rw-r--r--views/mods/mod_minrequest/settings_edit.phtml11
-rw-r--r--views/mods/mod_newsletter/checkout_customer_inner.phtml13
-rw-r--r--views/mods/mod_newsletter/customer_sidebar.phtml18
-rw-r--r--views/mods/mod_newsletter/settings_edit.phtml63
-rw-r--r--views/mods/mod_nlsatolo/checkout_customer_inner.phtml15
-rw-r--r--views/mods/mod_onepagecheckout/onepage.phtml402
-rw-r--r--views/mods/mod_onepagecheckout/settings_edit.phtml8
-rw-r--r--views/mods/mod_ordercondition/list.phtml121
-rw-r--r--views/mods/mod_ordercondition/overview_top.phtml25
-rw-r--r--views/mods/mod_ordercondition/produkt_edit_sidebar.phtml18
-rw-r--r--views/mods/mod_ordercondition/settings_edit.phtml168
-rw-r--r--views/mods/mod_orderupload/checkout_inner_prebutton.phtml26
-rw-r--r--views/mods/mod_orderupload/order_view_sidebar.phtml22
-rw-r--r--views/mods/mod_orderupload/settings_edit.phtml11
-rw-r--r--views/mods/mod_ordervars/checkout_inner_prebutton.phtml44
-rw-r--r--views/mods/mod_ordervars/mail.phtml13
-rw-r--r--views/mods/mod_ordervars/mail_html.phtml18
-rw-r--r--views/mods/mod_ordervars/order_view_sidebar.phtml63
-rw-r--r--views/mods/mod_ordervars/ov_list.phtml121
-rw-r--r--views/mods/mod_ordervars/settings_edit.phtml49
-rw-r--r--views/mods/mod_packagetracking/mail_status.phtml2
-rw-r--r--views/mods/mod_packagetracking/mail_status_html.phtml3
-rw-r--r--views/mods/mod_packagetracking/order_view_switchStatus.phtml53
-rw-r--r--views/mods/mod_packagetracking/settings_edit.phtml70
-rw-r--r--views/mods/mod_packagetracking/settings_edit_list.phtml87
-rw-r--r--views/mods/mod_packagetracking/wpsg_mod_versandarten_listrow.phtml42
-rw-r--r--views/mods/mod_pap/settings_edit.phtml14
-rw-r--r--views/mods/mod_paypal/order_done.phtml25
-rw-r--r--views/mods/mod_paypal/order_view_afterpayment.phtml27
-rw-r--r--views/mods/mod_paypal/settings_edit.phtml95
-rw-r--r--views/mods/mod_paypalapi/basket_inner_prebutton.phtml16
-rw-r--r--views/mods/mod_paypalapi/checkout_handlePayment.phtml92
-rw-r--r--views/mods/mod_paypalapi/gfx/checkout-logo-large-alt-de-2x.pngbin0 -> 6700 bytes
-rw-r--r--views/mods/mod_paypalapi/gfx/checkout-logo-large-alt-de.pngbin0 -> 5591 bytes
-rw-r--r--views/mods/mod_paypalapi/gfx/checkout-logo-large-de-2x.pngbin0 -> 7728 bytes
-rw-r--r--views/mods/mod_paypalapi/gfx/checkout-logo-large-de.pngbin0 -> 6425 bytes
-rw-r--r--views/mods/mod_paypalapi/gfx/checkout-logo-medium-alt-de-2x.pngbin0 -> 5409 bytes
-rw-r--r--views/mods/mod_paypalapi/gfx/checkout-logo-medium-alt-de.pngbin0 -> 4236 bytes
-rw-r--r--views/mods/mod_paypalapi/gfx/checkout-logo-medium-de-2x.pngbin0 -> 6246 bytes
-rw-r--r--views/mods/mod_paypalapi/gfx/checkout-logo-medium-de.pngbin0 -> 4804 bytes
-rw-r--r--views/mods/mod_paypalapi/gfx/checkout-logo-small-alt-de-2x.pngbin0 -> 4835 bytes
-rw-r--r--views/mods/mod_paypalapi/gfx/checkout-logo-small-alt-de.pngbin0 -> 3824 bytes
-rw-r--r--views/mods/mod_paypalapi/gfx/checkout-logo-small-de-2x.pngbin0 -> 5616 bytes
-rw-r--r--views/mods/mod_paypalapi/gfx/checkout-logo-small-de.pngbin0 -> 4314 bytes
-rw-r--r--views/mods/mod_paypalapi/order_done.phtml31
-rw-r--r--views/mods/mod_paypalapi/order_view_afterpayment.phtml40
-rw-r--r--views/mods/mod_paypalapi/paypalplus.phtml29
-rw-r--r--views/mods/mod_paypalapi/settings_edit.phtml129
-rw-r--r--views/mods/mod_prepayment/mail.phtml15
-rw-r--r--views/mods/mod_prepayment/mail_html.phtml29
-rw-r--r--views/mods/mod_prepayment/order_done.phtml17
-rw-r--r--views/mods/mod_prepayment/settings_edit.phtml41
-rw-r--r--views/mods/mod_productfilter/settings_edit.phtml75
-rw-r--r--views/mods/mod_productfilter/widget.phtml7
-rw-r--r--views/mods/mod_productgroups/add.phtml72
-rw-r--r--views/mods/mod_productgroups/admin_setcapabilities.phtml19
-rw-r--r--views/mods/mod_productgroups/index.phtml61
-rw-r--r--views/mods/mod_productgroups/list.phtml45
-rw-r--r--views/mods/mod_productgroups/productgroups_addedit_sidebar.phtml17
-rw-r--r--views/mods/mod_productgroups/produkt_edit_sidebar.phtml25
-rw-r--r--views/mods/mod_productgroups/produkt_index_filter.phtml45
-rw-r--r--views/mods/mod_productgroups/settings_edit.phtml15
-rw-r--r--views/mods/mod_productgroups/show.phtml48
-rw-r--r--views/mods/mod_productindex/css/productindex.css37
-rw-r--r--views/mods/mod_productindex/gfx/icon_grid.pngbin0 -> 1453 bytes
-rw-r--r--views/mods/mod_productindex/gfx/icon_list.pngbin0 -> 1290 bytes
-rw-r--r--views/mods/mod_productindex/layouts/grid.phtml279
-rw-r--r--views/mods/mod_productindex/layouts/list.phtml264
-rw-r--r--views/mods/mod_productindex/page_metabox.phtml83
-rw-r--r--views/mods/mod_productpackage/productlist.phtml15
-rw-r--r--views/mods/mod_productpackage/produkt_edit_sidebar.phtml77
-rw-r--r--views/mods/mod_productvars/basket_row.phtml27
-rw-r--r--views/mods/mod_productvars/mail_row.phtml11
-rw-r--r--views/mods/mod_productvars/mail_row_html.phtml14
-rw-r--r--views/mods/mod_productvars/order_view_row.phtml65
-rw-r--r--views/mods/mod_productvars/overview_row.phtml31
-rw-r--r--views/mods/mod_productvars/produkt_edit_sidebar.phtml24
-rw-r--r--views/mods/mod_productvars/pv_list.phtml137
-rw-r--r--views/mods/mod_productvars/renderTemplate.phtml32
-rw-r--r--views/mods/mod_productvars/settings_edit.phtml61
-rw-r--r--views/mods/mod_produktartikel/header_facebook.phtml22
-rw-r--r--views/mods/mod_produktartikel/header_google.phtml19
-rw-r--r--views/mods/mod_produktartikel/produkt.phtml41
-rw-r--r--views/mods/mod_produktartikel/produkt_edit_allgemein.phtml19
-rw-r--r--views/mods/mod_produktartikel/produkt_edit_sidebar.phtml44
-rw-r--r--views/mods/mod_produktartikel/schemaorg.phtml20
-rw-r--r--views/mods/mod_produktartikel/settings_edit.phtml99
-rw-r--r--views/mods/mod_produktattribute/basket_row.phtml17
-rw-r--r--views/mods/mod_produktattribute/genPACode.phtml17
-rw-r--r--views/mods/mod_produktattribute/list.phtml128
-rw-r--r--views/mods/mod_produktattribute/mail_row.phtml10
-rw-r--r--views/mods/mod_produktattribute/mail_row_html.phtml18
-rw-r--r--views/mods/mod_produktattribute/overview_row.phtml17
-rw-r--r--views/mods/mod_produktattribute/produkt_bottom.phtml22
-rw-r--r--views/mods/mod_produktattribute/produkt_edit_content.phtml45
-rw-r--r--views/mods/mod_produktattribute/settings_edit.phtml116
-rw-r--r--views/mods/mod_produktbilder/produkt_edit_content.phtml123
-rw-r--r--views/mods/mod_produktbilder/produkt_edit_list.phtml23
-rw-r--r--views/mods/mod_produktbilder/produktbild.phtml8
-rw-r--r--views/mods/mod_produktbilder/settings_edit.phtml13
-rw-r--r--views/mods/mod_rechnungen/copymail.phtml11
-rw-r--r--views/mods/mod_rechnungen/copymail_html.phtml11
-rw-r--r--views/mods/mod_rechnungen/foottext_list.phtml61
-rw-r--r--views/mods/mod_rechnungen/gutschriftmail.phtml19
-rw-r--r--views/mods/mod_rechnungen/gutschriftmail_html.phtml19
-rw-r--r--views/mods/mod_rechnungen/order_view.phtml278
-rw-r--r--views/mods/mod_rechnungen/rechnung_pdf.phtml919
-rw-r--r--views/mods/mod_rechnungen/rechnungsmail.phtml16
-rw-r--r--views/mods/mod_rechnungen/rechnungsmail_html.phtml20
-rw-r--r--views/mods/mod_rechnungen/settings_edit.phtml241
-rw-r--r--views/mods/mod_relatedproducts/basket_after.phtml20
-rw-r--r--views/mods/mod_relatedproducts/list.phtml52
-rw-r--r--views/mods/mod_relatedproducts/produkt_edit_sidebar.phtml52
-rw-r--r--views/mods/mod_relatedproducts/relatedproducts.phtml14
-rw-r--r--views/mods/mod_relatedproducts/settings_edit.phtml30
-rw-r--r--views/mods/mod_request/adminmail.phtml22
-rw-r--r--views/mods/mod_request/adminmail_html.phtml21
-rw-r--r--views/mods/mod_request/customermail.phtml16
-rw-r--r--views/mods/mod_request/customermail_html.phtml15
-rw-r--r--views/mods/mod_request/product_bottom.phtml43
-rw-r--r--views/mods/mod_request/produkt_edit_allgemein.phtml13
-rw-r--r--views/mods/mod_request/requestmail.phtml116
-rw-r--r--views/mods/mod_request/requestmail_html.phtml202
-rw-r--r--views/mods/mod_request/requestpage.phtml412
-rw-r--r--views/mods/mod_request/settings_edit.phtml23
-rw-r--r--views/mods/mod_scaleprice/product_bottom.phtml45
-rw-r--r--views/mods/mod_scaleprice/produkt_edit_sidebar.phtml202
-rw-r--r--views/mods/mod_scaleprice/scaleList.phtml84
-rw-r--r--views/mods/mod_securepay/gfx/logo_100x25.pngbin0 -> 2679 bytes
-rw-r--r--views/mods/mod_securepay/gfx/securepay.pngbin0 -> 9268 bytes
-rw-r--r--views/mods/mod_securepay/order_done.phtml18
-rw-r--r--views/mods/mod_securepay/settings_edit.phtml75
-rw-r--r--views/mods/mod_shippingadress/checkout_inner_prebutton.phtml126
-rw-r--r--views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml77
-rw-r--r--views/mods/mod_shs/gfx/internetkasse-logo.pngbin0 -> 7697 bytes
-rw-r--r--views/mods/mod_shs/gfx/internetkasse-logo_creditcard.pngbin0 -> 6095 bytes
-rw-r--r--views/mods/mod_shs/gfx/internetkasse-logo_directdebit.pngbin0 -> 6026 bytes
-rw-r--r--views/mods/mod_shs/gfx/internetkasse-logo_maestro.pngbin0 -> 6017 bytes
-rw-r--r--views/mods/mod_shs/gfx/logo_100x25.pngbin0 -> 2960 bytes
-rw-r--r--views/mods/mod_shs/order_done.phtml24
-rw-r--r--views/mods/mod_shs/settings_edit.phtml82
-rw-r--r--views/mods/mod_skrill/gfx/logo_100x25.pngbin0 -> 1924 bytes
-rw-r--r--views/mods/mod_skrill/order_done.phtml60
-rw-r--r--views/mods/mod_skrill/settings_edit.phtml27
-rw-r--r--views/mods/mod_skrill/skrill-moneybookers-payby-border_de_150x106.pngbin0 -> 5262 bytes
-rw-r--r--views/mods/mod_spconditions/conditionList.phtml20
-rw-r--r--views/mods/mod_spconditions/settings_edit.phtml42
-rw-r--r--views/mods/mod_statistics/admin_setcapabilities.phtml19
-rw-r--r--views/mods/mod_statistics/chartsalestopaymentmethod/all.phtml91
-rw-r--r--views/mods/mod_statistics/chartsalestopaymentmethod/data.phtml68
-rw-r--r--views/mods/mod_statistics/charttopsellertosales/all.phtml171
-rw-r--r--views/mods/mod_statistics/charttopsellertosales/data.phtml82
-rw-r--r--views/mods/mod_statistics/chartturnover/all.phtml123
-rw-r--r--views/mods/mod_statistics/chartturnover/customrange.phtml112
-rw-r--r--views/mods/mod_statistics/chartturnover/data.phtml111
-rw-r--r--views/mods/mod_statistics/chartturnover/day.phtml118
-rw-r--r--views/mods/mod_statistics/chartturnover/month.phtml117
-rw-r--r--views/mods/mod_statistics/chartturnover/quarter.phtml120
-rw-r--r--views/mods/mod_statistics/chartturnover/week.phtml118
-rw-r--r--views/mods/mod_statistics/chartturnover/year.phtml127
-rw-r--r--views/mods/mod_statistics/chartturnoverperhour/all.phtml117
-rw-r--r--views/mods/mod_statistics/chartturnoverperhour/data.phtml103
-rw-r--r--views/mods/mod_statistics/customermap/all.phtml48
-rw-r--r--views/mods/mod_statistics/settings_edit.phtml133
-rw-r--r--views/mods/mod_statistics/simplefilter.phtml104
-rw-r--r--views/mods/mod_statistics/statistics.phtml128
-rw-r--r--views/mods/mod_statistics/totals.phtml21
-rw-r--r--views/mods/mod_stock/produkt_edit_sidebar.phtml33
-rw-r--r--views/mods/mod_stock/settings_edit.phtml59
-rw-r--r--views/mods/mod_su/gfx/logo_100x25.pngbin0 -> 5658 bytes
-rw-r--r--views/mods/mod_su/order_done.phtml24
-rw-r--r--views/mods/mod_su/settings_edit.phtml68
-rw-r--r--views/mods/mod_test/settings_edit.phtml77
-rw-r--r--views/mods/mod_test/showConfiguration.phtml11
-rw-r--r--views/mods/mod_topseller/produkt_edit_allgemein.phtml18
-rw-r--r--views/mods/mod_topseller/settings_edit.phtml12
-rw-r--r--views/mods/mod_topseller/topseller.phtml15
-rw-r--r--views/mods/mod_topseller/widget_form.phtml23
-rw-r--r--views/mods/mod_trustedshops/checkout_customer_inner.phtml12
-rw-r--r--views/mods/mod_trustedshops/gfx/rate_now_button_de.pngbin0 -> 4036 bytes
-rw-r--r--views/mods/mod_trustedshops/gfx/siegel.gifbin0 -> 3150 bytes
-rw-r--r--views/mods/mod_trustedshops/invoicemail.phtml10
-rw-r--r--views/mods/mod_trustedshops/invoicemail_html.phtml11
-rw-r--r--views/mods/mod_trustedshops/mail.phtml15
-rw-r--r--views/mods/mod_trustedshops/mail_aftercalculation.phtml10
-rw-r--r--views/mods/mod_trustedshops/mail_aftercalculation_html.phtml11
-rw-r--r--views/mods/mod_trustedshops/mail_html.phtml17
-rw-r--r--views/mods/mod_trustedshops/order_done.phtml17
-rw-r--r--views/mods/mod_trustedshops/order_view_sidebar.phtml28
-rw-r--r--views/mods/mod_trustedshops/settings_edit.phtml199
-rw-r--r--views/mods/mod_trustedshops/widget.phtml51
-rw-r--r--views/mods/mod_trustedshops/widget_form.phtml30
-rw-r--r--views/mods/mod_userpayment/list.phtml165
-rw-r--r--views/mods/mod_userpayment/settings_edit.phtml82
-rw-r--r--views/mods/mod_varianten/basket_row.phtml23
-rw-r--r--views/mods/mod_varianten/drawVarianten.phtml535
-rw-r--r--views/mods/mod_varianten/mail_row.phtml18
-rw-r--r--views/mods/mod_varianten/mail_row_html.phtml22
-rw-r--r--views/mods/mod_varianten/order_view_row.phtml22
-rw-r--r--views/mods/mod_varianten/overview_row.phtml22
-rw-r--r--views/mods/mod_varianten/produkt.phtml148
-rw-r--r--views/mods/mod_varianten/produkt_edit_content.phtml297
-rw-r--r--views/mods/mod_varianten/settings_edit.phtml25
-rw-r--r--views/mods/mod_varianten/varianten.js58
-rw-r--r--views/mods/mod_versandarten/list.phtml248
-rw-r--r--views/mods/mod_versandarten/settings_edit.phtml100
-rw-r--r--views/mods/mod_videodownload/cronmail.phtml18
-rw-r--r--views/mods/mod_videodownload/cronmail_html.phtml21
-rw-r--r--views/mods/mod_videodownload/filelist.phtml20
-rw-r--r--views/mods/mod_videodownload/fonts/Default.ttfbin0 -> 69492 bytes
-rw-r--r--views/mods/mod_videodownload/order_view_sidebar.phtml110
-rw-r--r--views/mods/mod_videodownload/order_view_sidebar_renderlist.phtml59
-rw-r--r--views/mods/mod_videodownload/produkt_edit_sidebar.phtml96
-rw-r--r--views/mods/mod_videodownload/settings_edit.phtml188
-rw-r--r--views/mods/mod_videodownload/videodownloadmail.phtml18
-rw-r--r--views/mods/mod_videodownload/videodownloadmail_html.phtml20
-rw-r--r--views/mods/mod_voucherproduct/gutschein_mail.phtml18
-rw-r--r--views/mods/mod_voucherproduct/gutschein_mail_html.phtml20
-rw-r--r--views/mods/mod_voucherproduct/order_view_sidebar.phtml195
-rw-r--r--views/mods/mod_voucherproduct/order_view_sidebar_content.phtml38
-rw-r--r--views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml18
-rw-r--r--views/mods/mod_voucherproduct/settings_edit.phtml173
-rw-r--r--views/mods/mod_voucherproduct/voucher_pdf.phtml104
-rw-r--r--views/mods/mod_weight/basket_row.phtml13
-rw-r--r--views/mods/mod_weight/basket_row_end.phtml15
-rw-r--r--views/mods/mod_weight/overview_row.phtml13
-rw-r--r--views/mods/mod_weight/overview_row_end.phtml15
-rw-r--r--views/mods/mod_weight/produkt_edit_allgemein.phtml8
-rw-r--r--views/mods/mod_weight/settings_edit.phtml20
-rw-r--r--views/mods/mod_willcollect/mail.phtml14
-rw-r--r--views/mods/mod_willcollect/mail_html.phtml22
-rw-r--r--views/mods/mod_willcollect/settings_edit.phtml24
-rw-r--r--views/mods/mod_willcollect/shippinghint.phtml13
-rw-r--r--views/mods/mod_wirecard/gfx/logo_100x25.pngbin0 -> 3792 bytes
-rw-r--r--views/mods/mod_wirecard/gfx/wirecard.pngbin0 -> 4762 bytes
-rw-r--r--views/mods/mod_wirecard/order_done.phtml35
-rw-r--r--views/mods/mod_wirecard/paymenthint.phtml14
-rw-r--r--views/mods/mod_wirecard/settings_edit.phtml125
411 files changed, 22099 insertions, 0 deletions
diff --git a/views/mods/mod_abo/basket_row.phtml b/views/mods/mod_abo/basket_row.phtml
new file mode 100644
index 0000000..2d2d274
--- /dev/null
+++ b/views/mods/mod_abo/basket_row.phtml
@@ -0,0 +1,16 @@
+<?php
+
+ /**
+ * Template für die Anzeige der Abo Verlängerung im Warenkorb
+ */
+
+?>
+<tr class="wpsg_<?php echo (($this->view['i'] == 0)?'odd':'even'); ?>">
+ <td class="wpsg_cell_number">
+
+ </td>
+ <td><?php echo __('Abo Verlängerung', 'wpsg'); ?>:</td>
+ <td colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
+ <?php echo wpsg_translate(__('Verlängerung zu Bestellung #1# (#2# Tage)', 'wpsg'), $this->view['wpsg_mod_abo']['order']['onr'], $this->view['wpsg_mod_abo']['wpsg_mod_abo_durration_menge']); ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_abo/mail_expiration.phtml b/views/mods/mod_abo/mail_expiration.phtml
new file mode 100644
index 0000000..a5b11df
--- /dev/null
+++ b/views/mods/mod_abo/mail_expiration.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Mail die beim Auslauf eines Abos versendet wird
+ */
+
+?><?php echo __('Hallo', 'wpsg'); ?> <?php echo wpsg_hspc($this->view['customer']['vname']); ?> <?php echo wpsg_hspc($this->view['customer']['name']); ?>,
+
+<?php echo __('ihr Abo ist ausgelaufen.', 'wpsg'); ?>
+
+<?php if ($this->view['allowRebuy'] !== false) { ?>
+<?php echo wpsg_translate(__('Sie können das Abo jederzeit über folgenden Link um #1# Tage verlängern. Die Verlängerung kostet #2#.', 'wpsg'), $this->view['product']['wpsg_mod_abo_durration'], wpsg_ff($this->view['product']['wpsg_mod_abo_price'], $this->get_option('wpsg_currency'))); ?>
+
+<?php echo $this->view['rebuyLink']; ?>
+
+<?php if ($this->view['product']['wpsg_mod_abo_resell'] > 0) { ?>
+<?php echo wpsg_translate(__('Sie können das Abo dabei noch maximal #1# mal verlängern, dann muss das Produkt erneut erworben werden.', 'wpsg'), $this->view['allowRebuy']); ?>
+<?php } ?>
+<?php } else { ?>
+<?php echo __('Die Verlängerung des Abos ist nicht mehr möglich, sie müssen das Produkt erneut erwerben.', 'wpsg'); ?>
+<?php } ?>
+
+<?php echo __('Viele Grüße', 'wpsg'); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_abo/mail_expiration_html.phtml b/views/mods/mod_abo/mail_expiration_html.phtml
new file mode 100644
index 0000000..33d7f7e
--- /dev/null
+++ b/views/mods/mod_abo/mail_expiration_html.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Mail die beim Auslauf eines Abos versendet wird (HTML)
+ */
+
+?><p><?php echo __('Hallo', 'wpsg'); ?> <?php echo wpsg_hspc($this->view['customer']['vname']); ?> <?php echo wpsg_hspc($this->view['customer']['name']); ?>,</p>
+
+<p><?php echo __('ihr Abo ist ausgelaufen.', 'wpsg'); ?></p>
+
+<?php if ($this->view['allowRebuy'] !== false) { ?>
+<p><?php echo wpsg_translate(__('Sie können das Abo jederzeit über folgenden Link um #1# Tage verlängern. Die Verlängerung kostet #2#.', 'wpsg'), $this->view['product']['wpsg_mod_abo_durration'], wpsg_ff($this->view['product']['wpsg_mod_abo_price'], $this->get_option('wpsg_currency'))); ?></p>
+
+<a href="<?php echo $this->view['rebuyLink']; ?>"><?php echo __('Abo verlängern', 'wpsg'); ?></a>
+
+<?php if ($this->view['product']['wpsg_mod_abo_resell'] > 0) { ?>
+<p><?php echo wpsg_translate(__('Sie können das Abo dabei noch maximal #1# mal verlängern, dann muss das Produkt erneut erworben werden.', 'wpsg'), $this->view['allowRebuy']); ?></p>
+<?php } ?>
+<?php } else { ?>
+<p><?php echo __('Die Verlängerung des Abos ist nicht mehr möglich, sie müssen das Produkt erneut erwerben.', 'wpsg'); ?></p>
+<?php } ?>
+
+<p><?php echo __('Viele Grüße', 'wpsg'); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_abo/mail_firstbuy.phtml b/views/mods/mod_abo/mail_firstbuy.phtml
new file mode 100644
index 0000000..df59a1d
--- /dev/null
+++ b/views/mods/mod_abo/mail_firstbuy.phtml
@@ -0,0 +1,23 @@
+<?php
+
+ /**
+ * Mailtemplate, welches beim erstmaligen Kauf eines Abos versendet wird
+ */
+
+?><?php echo __('Hallo', 'wpsg'); ?> <?php echo wpsg_hspc($this->view['customer']['vname']); ?> <?php echo wpsg_hspc($this->view['customer']['name']); ?>,
+
+<?php echo __('ihr Abo wurde erfolgreich aktiviert.', 'wpsg'); ?>
+
+<?php echo wpsg_translate(__('Sie können das Abo jederzeit über folgenden Link um #1# Tage verlängern.', 'wpsg'), $this->view['product']['wpsg_mod_abo_durration']); ?>
+
+<?php echo $this->view['rebuyLink']; ?>
+
+<?php echo wpsg_translate(__('Die Verlängerung kostet #1#.', 'wpsg'), wpsg_ff($this->view['product']['wpsg_mod_abo_price'], $this->get_option('wpsg_currency'))); ?>
+
+<?php if ($this->view['product']['wpsg_mod_abo_resell'] > 0) { ?>
+<?php echo wpsg_translate(__('Sie können das Abo dabei maximal #1# mal verlängern, dann muss das Produkt erneut erworben werden.', 'wpsg'), $this->view['product']['wpsg_mod_abo_resell']); ?>
+
+<?php } ?>
+<?php echo __('Viele Grüße', 'wpsg'); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_abo/mail_firstbuy_html.phtml b/views/mods/mod_abo/mail_firstbuy_html.phtml
new file mode 100644
index 0000000..ff365ad
--- /dev/null
+++ b/views/mods/mod_abo/mail_firstbuy_html.phtml
@@ -0,0 +1,23 @@
+<?php
+
+ /**
+ * Mailtemplate, welches beim erstmaligen Kauf eines Abos versendet wird (HTML)
+ */
+
+?><p><?php echo __('Hallo', 'wpsg'); ?> <?php echo wpsg_hspc($this->view['customer']['vname']); ?> <?php echo wpsg_hspc($this->view['customer']['name']); ?>,</p>
+
+<p><?php echo __('ihr Abo wurde erfolgreich aktiviert.', 'wpsg'); ?></p>
+
+<p><?php echo wpsg_translate(__('Sie können das Abo jederzeit über folgenden Link um #1# Tage verlängern.', 'wpsg'), $this->view['product']['wpsg_mod_abo_durration']); ?></p>
+
+<a href="<?php echo $this->view['rebuyLink']; ?>"><?php echo __('Abo verlängern', 'wpsg'); ?></a>
+
+<p><?php echo wpsg_translate(__('Die Verlängerung kostet #1#.', 'wpsg'), wpsg_ff($this->view['product']['wpsg_mod_abo_price'], $this->get_option('wpsg_currency'))); ?></p>
+
+<?php if ($this->view['product']['wpsg_mod_abo_resell'] > 0) { ?>
+<p><?php echo wpsg_translate(__('Sie können das Abo dabei maximal #1# mal verlängern, dann muss das Produkt erneut erworben werden.', 'wpsg'), $this->view['product']['wpsg_mod_abo_resell']); ?></p>
+<?php } ?>
+
+<p><?php echo __('Viele Grüße', 'wpsg'); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_abo/mail_rebuy.phtml b/views/mods/mod_abo/mail_rebuy.phtml
new file mode 100644
index 0000000..4d6e28c
--- /dev/null
+++ b/views/mods/mod_abo/mail_rebuy.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Template für die Mail an den Kunden wenn ein Abo verlängert wurde
+ */
+
+?><?php echo __('Hallo', 'wpsg'); ?> <?php echo wpsg_hspc($this->view['customer']['vname']); ?> <?php echo wpsg_hspc($this->view['customer']['name']); ?>,
+
+<?php echo __('ihr Abo wurde erfolgreich verlängert.', 'wpsg'); ?>
+
+<?php if ($this->view['allowRebuy'] !== false) { ?>
+<?php echo wpsg_translate(__('Sie können das Abo jederzeit über folgenden Link um #1# Tage verlängern. Die Verlängerung kostet #2#.', 'wpsg'), $this->view['product']['wpsg_mod_abo_durration'], wpsg_ff($this->view['product']['wpsg_mod_abo_price'], $this->get_option('wpsg_currency'))); ?>
+
+<?php echo $this->view['rebuyLink']; ?>
+
+<?php if ($this->view['product']['wpsg_mod_abo_resell'] > 0) { ?>
+<?php echo wpsg_translate(__('Sie können das Abo dabei noch maximal #1# mal verlängern, dann muss das Produkt erneut erworben werden.', 'wpsg'), $this->view['allowRebuy']); ?>
+<?php } ?>
+<?php } else { ?>
+<?php echo __('Eine Verlängerung des Abos ist zukünftig nicht mehr möglich, sie müssen das Produkt erneut erwerben.', 'wpsg'); ?>
+<?php } ?>
+
+<?php echo __('Viele Grüße', 'wpsg'); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_abo/mail_rebuy_html.phtml b/views/mods/mod_abo/mail_rebuy_html.phtml
new file mode 100644
index 0000000..722c1a1
--- /dev/null
+++ b/views/mods/mod_abo/mail_rebuy_html.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Template für die Mail an den Kunden wenn ein Abo verlängert wurde (HTML)
+ */
+
+?><p><?php echo __('Hallo', 'wpsg'); ?> <?php echo wpsg_hspc($this->view['customer']['vname']); ?> <?php echo wpsg_hspc($this->view['customer']['name']); ?>,</p>
+
+<p><?php echo __('ihr Abo wurde erfolgreich verlängert.', 'wpsg'); ?></p>
+
+<?php if ($this->view['allowRebuy'] !== false) { ?>
+<p><?php echo wpsg_translate(__('Sie können das Abo jederzeit über folgenden Link um #1# Tage verlängern. Die Verlängerung kostet #2#.', 'wpsg'), $this->view['product']['wpsg_mod_abo_durration'], wpsg_ff($this->view['product']['wpsg_mod_abo_price'], $this->get_option('wpsg_currency'))); ?></p>
+
+<a href="<?php echo $this->view['rebuyLink']; ?>"><?php echo __('Abo verlängern', 'wpsg'); ?></a>
+
+<?php if ($this->view['product']['wpsg_mod_abo_resell'] > 0) { ?>
+<p><?php echo wpsg_translate(__('Sie können das Abo dabei noch maximal #1# mal verlängern, dann muss das Produkt erneut erworben werden.', 'wpsg'), $this->view['allowRebuy']); ?></p>
+<?php } ?>
+<?php } else { ?>
+<p><?php echo __('Eine Verlängerung des Abos ist zukünftig nicht mehr möglich, sie müssen das Produkt erneut erwerben.', 'wpsg'); ?></p>
+<?php } ?>
+
+<p><?php echo __('Viele Grüße', 'wpsg'); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_abo/mail_row.phtml b/views/mods/mod_abo/mail_row.phtml
new file mode 100644
index 0000000..6f039c9
--- /dev/null
+++ b/views/mods/mod_abo/mail_row.phtml
@@ -0,0 +1,8 @@
+<?php
+
+ /**
+ * Mit diesem Template kann die Zeile eines Produktes im Mailtemplate erweitert werden
+ */
+
+?>
+<?php echo wpsg_pad_right(' ', 5); ?><?php echo __('Abo Verlängerung', 'wpsg'); ?>: <?php echo wpsg_translate(__('Verlängerung zu Bestellung #1# (#2# Tage)', 'wpsg'), $this->view['wpsg_mod_abo']['order']['onr'], $this->view['wpsg_mod_abo']['wpsg_mod_abo_durration_menge']); ?>
diff --git a/views/mods/mod_abo/mail_row_html.phtml b/views/mods/mod_abo/mail_row_html.phtml
new file mode 100644
index 0000000..4da00c9
--- /dev/null
+++ b/views/mods/mod_abo/mail_row_html.phtml
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Template für die Zeile eines Abo Produktes im HTML Template
+ */
+
+?>
+<tr class="productrow productrow2 <?php echo ((($this->view['i'] % 2) == 0)?'productrow_odd':'productrow_even'); ?>">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_pos">&nbsp;</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'5':'4'); ?>">
+ <?php echo __('Abo Verlängerung', 'wpsg'); ?>: <?php echo wpsg_translate(__('Verlängerung zu Bestellung #1# (#2# Tage)', 'wpsg'), $this->view['wpsg_mod_abo']['order']['onr'], $this->view['wpsg_mod_abo']['wpsg_mod_abo_durration_menge']); ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_abo/order_view_base.phtml b/views/mods/mod_abo/order_view_base.phtml
new file mode 100644
index 0000000..69f4517
--- /dev/null
+++ b/views/mods/mod_abo/order_view_base.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Integration einer Abo-Verlängerung in die Bestellansicht im Backend (Abo Produkt)
+ */
+?>
+<tr class="wpsg_<?php echo (($this->view['i'] == 0)?'odd':'even'); ?>">
+ <td ><?php echo __('Abo Verlängerungen', 'wpsg'); ?>:</td>
+ <td align="right" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
+ <?php if (wpsg_isSizedArray($this->view['wpsg_mod_abo']['rebuy'])) { ?>
+ <?php foreach ($this->view['wpsg_mod_abo']['rebuy'] as $k => $v) { ?>
+ <?php echo wpsg_translate(__('Mit Bestellung <a href="#1#">#2#</a> um #3# Tage verlängert.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$v['o_id'], $v['order']['onr'], $v['tage']); ?><br />
+ <?php } ?>
+ <?php } else { ?>
+ <?php echo __('Noch keine Abo Verlängerungen erworben.', 'wpsg'); ?>
+ <?php } ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_abo/order_view_row.phtml b/views/mods/mod_abo/order_view_row.phtml
new file mode 100644
index 0000000..b0b4a88
--- /dev/null
+++ b/views/mods/mod_abo/order_view_row.phtml
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Integration einer Abo Verlängerung in die Bestellansicht im Backend (Abo-Verlängerungen)
+ */
+
+?>
+<tr class="wpsg_<?php echo (($this->view['i'] == 0)?'odd':'even'); ?>">
+ <td ><?php echo __('Abo Verlängerung', 'wpsg'); ?>:</td>
+ <td align="right" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
+ <?php echo wpsg_translate(__('Verlängerung zu Bestellung <a href="#1#">#2#</a> (#3# Tage)', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$this->view['wpsg_mod_abo']['order']['id'], $this->view['wpsg_mod_abo']['order']['onr'], $this->view['wpsg_mod_abo']['wpsg_mod_abo_durration_menge']); ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_abo/overview_row.phtml b/views/mods/mod_abo/overview_row.phtml
new file mode 100644
index 0000000..fb7bbf5
--- /dev/null
+++ b/views/mods/mod_abo/overview_row.phtml
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Template für die Anzeige der Abo-Verlängerung im Warenkorb
+ */
+
+?>
+<tr class="wpsg_<?php echo (($this->view['i'] == 0)?'odd':'even'); ?>">
+ <td><?php echo __('Abo Verlängerung', 'wpsg'); ?>:</td>
+ <td colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
+ <?php echo wpsg_translate(__('Verlängerung zu Bestellung #1# (#2# Tage)', 'wpsg'), $this->view['wpsg_mod_abo']['order']['onr'], $this->view['wpsg_mod_abo']['wpsg_mod_abo_durration_menge']); ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_abo/produkt_edit_content.phtml b/views/mods/mod_abo/produkt_edit_content.phtml
new file mode 100644
index 0000000..a4d0b67
--- /dev/null
+++ b/views/mods/mod_abo/produkt_edit_content.phtml
@@ -0,0 +1,58 @@
+<?php
+
+ /**
+ * Integriert die Abo-Einstellungen in das Produkt
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_abo_activ').bind('change', function() {
+
+ if (jQuery(this).attr('checked')) jQuery('#wpsg_mod_abo_layer').show();
+ else jQuery('#wpsg_mod_abo_layer').hide();
+
+ } ).change();
+
+ jQuery('#wpsg_mod_abo_resell').bind('change', function() {
+
+ if (jQuery(this).attr('checked')) jQuery('#wpsg_mod_abo_resell_layer').show();
+ else jQuery('#wpsg_mod_abo_resell_layer').hide();
+
+ } ).change();
+
+ } );
+
+/* ]]> */</script>
+
+<div class="postbox" id="wpsg_abo">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Abo Produkt', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_abo_activ', __('Abo Produkt', 'wpsg'), $this->view['product']['wpsg_mod_abo_activ']); ?>
+
+ <div id="wpsg_mod_abo_layer">
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_abo_resell', __('Anzahl beschränken', 'wpsg'), $this->view['product']['wpsg_mod_abo_resell']); ?>
+
+ <div id="wpsg_mod_abo_resell_layer">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_abo_resell_count', __('Anzahl', 'wpsg'), $this->view['product']['wpsg_mod_abo_resell_count']); ?>
+
+ </div>
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_abo_price', wpsg_translate(__('Abo Preis (#1#)', 'wpsg'), (($this->get_option('wpsg_preisangaben') == WPSG_NETTO)?__('Netto', 'wpsg'):__('Brutto', 'wpsg'))), wpsg_ff($this->view['product']['wpsg_mod_abo_price']), array('unit' => $this->get_option('wpsg_currency'))); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_abo_durration', __('Abo Dauer (Tage)', 'wpsg'), $this->view['product']['wpsg_mod_abo_durration']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_abo_url', __('URL Benachrichtigung', 'wpsg'), $this->view['product']['wpsg_mod_abo_url'], array('hint' => wpsg_translate(__('nohspc_Wird hier nichts angegeben, so wird die URL aus der <a href="#1#">Modulkonfiguration</a> bei Ablauf/Verlängerung benachrichtigt.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_abo'))); ?>
+
+ <div class="wpsg_clear"></div>
+
+ </div>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_abo/settings_edit.phtml b/views/mods/mod_abo/settings_edit.phtml
new file mode 100644
index 0000000..8dcb052
--- /dev/null
+++ b/views/mods/mod_abo/settings_edit.phtml
@@ -0,0 +1,12 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Abo Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_abo_url', __('Standard URL für Ablauf/Verlängerung', 'wpsg'), $this->get_option('wpsg_mod_abo_url'), array ('help' => 'wpsg_mod_abo_url')); ?>
+<br />
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_abo_wpsgmodabofirstbuy', __('Mail bei erstem Kauf eines Abos', 'wpsg'), $this->get_option('wpsg_mod_abo_wpsgmodabofirstbuy'), array('hint' => wpsg_translate(__('nohspc_Mail wird bei Bezahlung der Abo Bestellung zusätzlich versendet. (mail_firstbuy.phtml) -> <a href="#1#">Konfiguration</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodabofirstbuy'), 'help' => 'wpsg_mod_abo_wpsgmodabofirstbuy',)); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_abo_wpsgmodaboexpiration', __('Mail bei Auslauf eines Abos', 'wpsg'), $this->get_option('wpsg_mod_abo_wpsgmodaboexpiration'), array('hint' => wpsg_translate(__('nohspc_Mail wird bei Auslauf eines Abos versendet. (mail_expiration.phtml) -> <a href="#1#">Konfiguration</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodaboexpiration'), 'help' => 'wpsg_mod_abo_wpsgmodaboexpiration',)); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_abo_wpsgmodabrebuy', __('Mail bei Kauf einer Verlängerung', 'wpsg'), $this->get_option('wpsg_mod_abo_wpsgmodabrebuy'), array('hint' => wpsg_translate(__('nohspc_Mail wird bei Bezahlung einer Abo Verlängerung versendet. (mail_rebuy.phtml) -> <a href="#1#">Konfiguration</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodabrebuy'), 'help' => 'wpsg_mod_abo_wpsgmodabrebuy',)); ?> \ No newline at end of file
diff --git a/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung.phtml b/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung.phtml
new file mode 100644
index 0000000..11c6ef1
--- /dev/null
+++ b/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung.phtml
@@ -0,0 +1,149 @@
+<?php echo __("Auftragsbestätigung", "wpsg"); ?>
+
+<?php echo __("Vielen Dank für Ihre Bestellung. Sie erhalten hiermit die Auftragsbestätigung mit allen wichtigen Informationen zu Ihrer Bestellung.", "wpsg"); ?>
+
+----------------------------------------------------------------------------
+
+<?php if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['data']['k_id'], 'o_id' => $this->view['data']['id']))) { ?>
+<?php echo __('Rechnungsadresse:', 'wpsg'); ?>
+
+<?php echo wpsg_pad_right(__('Firma', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['firma']; ?>
+<?php echo wpsg_pad_right(__('Name', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['vname']; ?> <?php echo $this->view['basket']['checkout']['name']; ?>
+<?php echo wpsg_pad_right(__('Straße', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['strasse']; ?>
+<?php echo wpsg_pad_right(__('Land', 'wpsg').':', 35); ?><?php echo $this->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->view['basket']['checkout']['land'])."' "); ?>
+<?php if (trim($this->view['basket']['checkout']['ustidnr']) != "") { ?>
+<?php echo wpsg_pad_right(__('USt.IdNr.', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['ustidnr']; ?>
+<?php } ?>
+
+<?php echo wpsg_pad_right(__('Ort', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['plz']; ?> <?php echo $this->view['basket']['checkout']['ort']; ?>
+<?php echo wpsg_pad_right(__('Telefon', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['tel']; ?>
+<?php echo wpsg_pad_right(__('Fax', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['fax']; ?>
+<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>
+
+<?php echo __('Lieferadresse:', 'wpsg'); ?>
+
+<?php echo wpsg_pad_right(__('Firma', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['shipping_firma']; ?>
+<?php echo wpsg_pad_right(__('Name', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['shipping_vname']; ?> <?php echo $this->view['basket']['checkout']['name']; ?>
+<?php echo wpsg_pad_right(__('Straße', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['shipping_strasse']; ?>
+<?php echo wpsg_pad_right(__('Ort', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['shipping_plz']; ?> <?php echo $this->view['basket']['checkout']['shipping_ort']; ?>
+
+<?php echo wpsg_pad_right(__('Land', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['shipping_land']; ?>
+
+<?php } else { ?>
+<?php echo __('Rechnungs- /Lieferadresse:', 'wpsg'); ?>
+
+<?php echo wpsg_pad_right(__('Firma', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['firma']; ?>
+<?php echo wpsg_pad_right(__('Name', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['vname']; ?> <?php echo $this->view['basket']['checkout']['name']; ?>
+<?php echo wpsg_pad_right(__('Straße', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['strasse']; ?>
+<?php echo wpsg_pad_right(__('Land', 'wpsg').':', 35); ?><?php echo $this->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->view['basket']['checkout']['land'])."' "); ?>
+<?php if (trim($this->view['basket']['checkout']['ustidnr']) != "") { ?>
+<?php echo wpsg_pad_right(__('USt.IdNr.', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['ustidnr']; ?>
+<?php } ?>
+
+<?php echo wpsg_pad_right(__('Ort', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['plz']; ?> <?php echo $this->view['basket']['checkout']['ort']; ?>
+<?php echo wpsg_pad_right(__('Telefon', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['tel']; ?>
+<?php echo wpsg_pad_right(__('Fax', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['fax']; ?>
+<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>
+<?php } ?>
+
+<?php echo wpsg_pad_right(__('Kundennummer', 'wpsg').':', 35); ?><?php echo $this->view['customer']['knr']; ?>
+<?php echo wpsg_pad_right(__('Bestellnummer', 'wpsg').':', 35); ?><?php echo $this->view['order']['onr']; ?>
+<?php echo wpsg_pad_right(__('Bestelldatum', 'wpsg').':', 35); ?><?php echo date("d.m.Y H:i:s", strtotime($this->view['order']['cdate'])); ?>
+<?php echo wpsg_pad_right(__('Rechnungsbetrag', 'wpsg').':', 35); ?><?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?>
+<?php if ($this->get_option('wpsg_kleinunternehmer')) { ?>
+<?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
+<?php } else { ?>
+<?php echo wpsg_pad_right(__('Steueranteil', 'wpsg').':', 35); ?><?php echo wpsg_ff($this->view['basket']['sum']['mwst'], $this->get_option('wpsg_currency')); ?>
+<?php } ?>
+
+<?php echo wpsg_pad_right(__('Versandart', 'wpsg').':', 35); ?><?php echo $this->arShipping[$this->view['basket']['checkout']['shipping']]['name']; ?>
+<?php echo wpsg_pad_right(__('Zahlungsart', 'wpsg').':', 35); ?><?php echo $this->arPayment[$this->view['basket']['checkout']['payment']]['name']; ?>
+<?php $this->callMods('mail_payment'); ?>
+
+<?php if ($this->view['auftrag_note'] != '') { ?>
+<?php echo wpsg_pad_right(__('Kommentar Auftragsbestätigung', 'wpsg').':', 35); ?>
+<?php echo $this->view['auftrag_note'] ?>
+<?php }?>
+
+
+<?php echo __('Bestellung', 'wpsg'); ?>:
+<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { $prod_col = 25; } else { $prod_col = 35; } ?>
+
+<?php echo wpsg_pad_right(__('Pos', 'wpsg'), 5); ?>
+<?php echo wpsg_pad_right(__('Produkt', 'wpsg'), $prod_col); ?>
+<?php echo wpsg_pad_left(__('Stückpreis', 'wpsg').' ', 15); ?>
+<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+<?php echo wpsg_pad_left(__('MwSt.', 'wpsg').' ', 10); ?>
+<?php } ?>
+<?php echo wpsg_pad_right(__('Anzahl', 'wpsg'), 6); ?>
+<?php echo wpsg_pad_left(__('Summe', 'wpsg'), 15); ?>
+----------------------------------------------------------------------------
+<?php $i = 0; foreach ((array)$this->view['basket']['produkte'] as $p) { $i ++; ?>
+<?php echo wpsg_pad_right($i.'.', 5); ?>
+<?php echo wpsg_pad_right($p['name'], $prod_col); ?>
+<?php echo wpsg_pad_left(wpsg_ff($p['preis'], $this->get_option('wpsg_currency')).' ', 15); ?>
+<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+<?php echo wpsg_pad_left(wpsg_ff($p['mwst_value'], '%').' ', 10); ?>
+<?php } ?>
+<?php echo wpsg_pad_left($p['menge'], 6); ?>
+<?php echo wpsg_pad_left(wpsg_ff($p['preis'] * $p['menge'], $this->get_option('wpsg_currency')), 15); ?>
+<?php $this->callMods('mail_row', array($i, $p)); ?>
+<?php } ?>
+<?php if (isset($this->view['basket']['gs'])) { ?>
+<?php echo wpsg_pad_right(($i + 1).'.', 5); ?>
+<?php echo wpsg_pad_right(wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $this->view['basket']['gs']['code']), $prod_col); ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->view['basket']['gs']['value'], (($this->view['basket']['gs']['calc'] == 'w')?$this->get_option('wpsg_currency'):'%')).' ', 15); ?>
+<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+<?php echo wpsg_pad_left(__('anteilig', 'wpsg').' ', 10); ?>
+<?php } ?>
+<?php echo wpsg_pad_left('1', 6); ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->view['basket']['gs']['value'], $this->get_option('wpsg_currency')), 15); ?>
+<?php } ?>
+ <?php echo wpsg_pad_right(__('Zwischensumme:', 'wpsg'), 40); ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->view['basket']['sum']['preis'], $this->get_option('wpsg_currency')), 31); ?>
+<?php if ($this->view['basket']['sum']['preis_shipping'] != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
+ <?php echo wpsg_pad_right(__('Versandkosten', 'wpsg'), 40); ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->arShipping[$this->view['basket']['checkout']['shipping']]['mwst_value'],'% '), 10); ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 21); ?>
+<?php } ?>
+<?php if ($this->view['basket']['sum']['preis_payment'] != 0 || $this->get_option('wpsg_hideemptypayment') != '1') { ?>
+ <?php echo wpsg_pad_right(__('Zahlungsart', 'wpsg'), 40); ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst_value'],'% '), 10); ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 21); ?>
+<?php } ?>
+<?php //wpsg_debug($this->view['basket']['mwst']) ?>
+<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
+<?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
+<?php } else { ?>
+<?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
+<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <?php echo wpsg_pad_right(wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $mwst['name']), 47); ?>
+<?php } else { ?>
+ <?php echo wpsg_pad_right(wpsg_translate(__('darin enthaltenes MwSt. (#1#)', 'wpsg'), $mwst['name']), 47); ?>
+<?php } ?>
+<?php echo wpsg_pad_left(wpsg_ff($mwst['sum'], $this->get_option('wpsg_currency')), 24); ?>
+<?php } ?>
+<?php }?>
+<?php echo wpsg_pad_left(' ', 61); ?>---------------
+ <?php echo wpsg_pad_right(__('Gesamtpreis', 'wpsg'), 37); ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), 34); ?>
+
+<?php echo __('Wir bedanken uns fuer Ihre Bestellung.', 'wpsg'); ?>
+
+<?php echo __('Es gelten unsere Allgemeinen Geschaeftsbedingungen (AGB).', 'wpsg'); ?>
+
+<?php echo $this->getURL(wpsg_ShopController::URL_AGB); ?>
+
+ -- <?php echo __("Widerrufsbelehrung", "wpsg"); ?> --
+
+<?php if (trim($this->get_option("wpsg_ps_mailwiderruf")) != "") { ?>
+<?php echo $this->get_option("wpsg_ps_mailwiderruf"); ?>
+<?php } else { ?>
+<?php echo __("...hier steht der Text zum Widerrufsrecht...", "wpsg"); ?>
+<?php } ?>
+
+-- <?php echo __("Ende der Widerrufsbelehrung", "wpsg"); ?> --
+
+<?php echo __('Mit freundlichen Grüßen', 'wpsg'); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung_html.phtml b/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung_html.phtml
new file mode 100644
index 0000000..a7f3ea1
--- /dev/null
+++ b/views/mods/mod_auftragsbestaetigung/auftragsbestaetigung_html.phtml
@@ -0,0 +1,50 @@
+<?php
+
+ /* Wichtig, da die Module sonst kein HTML zurückgeben */
+ $this->htmlMail = true;
+
+?><?php $this->render(WPSG_PATH_VIEW.'/mailtemplates/html/html_head.phtml'); ?>
+
+<h1><?php echo __("Auftragsbestätigung", "wpsg"); ?></h1>
+
+<p><?php echo __("Vielen Dank für Ihre Bestellung. Sie erhalten hiermit die Auftragsbestätigung mit allen wichtigen Informationen zu Ihrer Bestellung.", "wpsg"); ?></p>
+
+<?php if (wpsg_isSizedString($this->view['auftrag_note'])) { ?>
+<h2><?php echo __('Kommentar Auftragsbestätigung', 'wpsg'); ?></h2>
+<p><?php echo $this->view['auftrag_note'] ?></p>
+<?php }?>
+
+<?php $this->render(WPSG_PATH_VIEW.'/mailtemplates/html/customer.phtml'); ?>
+
+<h2><?php echo __('Warenkorb', 'wpsg'); ?>:</h2>
+
+<?php $this->render(WPSG_PATH_VIEW.'/mailtemplates/html/order.phtml'); ?>
+
+<?php $this->callMods('mail_aftercalculation', array(&$this->view['basket']['checkout']['o_id'])); ?>
+
+<?php if (wpsg_isSizedString($this->view['basket']['checkout']['comment'])) { ?>
+<h2><?php echo __('Bestellkommentar', 'wpsg') ?></h2>
+<p><?php echo $this->view['basket']['checkout']['comment'] ?></p>
+<?php } ?>
+
+<br />
+
+<p><?php echo __('Wir bedanken uns fuer Ihre Bestellung.', 'wpsg'); ?></p>
+
+<p><?php echo wpsg_translate(__('Es gelten unsere <a href="#1#">Allgemeinen Geschaeftsbedingungen</a> (<a href="#1#">AGB</a>).', 'wpsg'), $this->getURL(wpsg_ShopController::URL_AGB)); ?></p>
+
+<h3><?php echo __("Widerrufsbelehrung", "wpsg"); ?></h3>
+
+<?php if (wpsg_isSizedString($this->get_option("wpsg_ps_mailwiderruf"))) { ?>
+<p><?php echo $this->get_option("wpsg_ps_mailwiderruf"); ?></p>
+<?php } else { ?>
+<?php echo __("...hier steht der Text zum Widerrufsrecht...", "wpsg"); ?>
+<?php } ?>
+
+<h3><?php echo __("Ende der Widerrufsbelehrung", "wpsg"); ?></h3>
+
+<p><?php echo __('Mit freundlichen Grüßen', 'wpsg'); ?></p>
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p>
+
+<?php $this->render(WPSG_PATH_VIEW.'/mailtemplates/html/html_foot.phtml'); ?>
+ \ No newline at end of file
diff --git a/views/mods/mod_auftragsbestaetigung/order_view.phtml b/views/mods/mod_auftragsbestaetigung/order_view.phtml
new file mode 100644
index 0000000..8da660b
--- /dev/null
+++ b/views/mods/mod_auftragsbestaetigung/order_view.phtml
@@ -0,0 +1,51 @@
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery(".handlediv").bind("click", function() {
+ if (jQuery(this.parentNode).hasClass("closed"))
+ {
+
+ jQuery.cookie("wpsg_ab_field", "0", { expires: 999999 } );
+
+ }
+ else
+ {
+
+ jQuery.cookie("wpsg_ab_field", "1", { expires: 999999 } );
+
+ }
+ } );
+
+ if (jQuery.cookie("wpsg_ab_field") == "1")
+ {
+
+ jQuery("#wpsg_ab_postbox").removeClass("closed");
+ }
+
+ } );
+
+</script>
+
+<div class="postbox" id="wpsg_auftragsbestaetigung">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Auftragsbestätigung', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <div class="inside" style="padding:5px;">
+
+ <form method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_auftragsbestaetigung&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1">
+ <textarea class="wpsg_order_view_auftragsbestaetigung" name="auftrag_note"></textarea>
+ <input class="wpsg_order_view_auftragsbestaetigung_submit" type="submit" value="<?php echo __('Senden', 'wpsg'); ?>" /><br />
+ <i>
+ <?php echo __('Die Auftragsbestätigung bestätigt dem Kunden die erfolgreiche Erfassung des Auftrages. Abweichungen vom Auftrag können mittels des Textfeldes mitgesendet werden.', 'wpsg'); ?>
+ <?php echo __('Der Status ändert sich automatisch auf "Bestätigt".', 'wpsg'); ?>
+ </i>
+ <br />
+ <input type="hidden" name="mod_auftragbestaetigung" value="1"/>
+ </form>
+
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_autodebit/mail.phtml b/views/mods/mod_autodebit/mail.phtml
new file mode 100644
index 0000000..bec996e
--- /dev/null
+++ b/views/mods/mod_autodebit/mail.phtml
@@ -0,0 +1,21 @@
+<?php
+
+ /**
+ * Dieses Template integriert sich in die E-Mails für Kunden und Admin und zeigt die Bankdaten für das Modul "Bankeinzug" an
+ */
+
+?>
+
+<?php echo wpsg_pad_right(__('Name der Bank', 'wpsg').':', 35); ?><?php echo $this->view['wpsg_mod_autodebit']['name']; ?>
+<?php if ($this->get_option('wpsg_mod_autodebit_iban') == '1') { ?>
+<?php echo wpsg_pad_right(__('BIC Code der Bank', 'wpsg').':', 35); ?><?php echo $this->view['wpsg_mod_autodebit']['bic']; ?>
+<?php } else { ?>
+<?php echo wpsg_pad_right(__('BLZ der Bank', 'wpsg').':', 35); ?><?php echo $this->view['wpsg_mod_autodebit']['blz']; ?>
+<?php } ?>
+<?php echo wpsg_pad_right(__('Name des Kontoinhabers', 'wpsg').':', 35); ?><?php echo $this->view['wpsg_mod_autodebit']['inhaber']; ?>
+<?php if ($this->get_option('wpsg_mod_autodebit_iban') == '1') { ?>
+<?php echo wpsg_pad_right(__('IBAN Nr.', 'wpsg').':', 35); ?><?php echo $this->view['wpsg_mod_autodebit']['iban']; ?>
+<?php } else { ?>
+<?php echo wpsg_pad_right(__('Kontonummer', 'wpsg').':', 35); ?><?php echo $this->view['wpsg_mod_autodebit']['knr']; ?>
+<?php } ?>
+ \ No newline at end of file
diff --git a/views/mods/mod_autodebit/mail_html.phtml b/views/mods/mod_autodebit/mail_html.phtml
new file mode 100644
index 0000000..d08970f
--- /dev/null
+++ b/views/mods/mod_autodebit/mail_html.phtml
@@ -0,0 +1,41 @@
+<?php
+
+ /**
+ * Dieses Template integriert sich in die E-Mails für Kunden und Admin und zeigt die Bankdaten für das Modul "Bankeinzug" an
+ */
+
+?>
+
+<table style="width:100%;">
+ <tr>
+ <td><?php echo __('Name der Bank', 'wpsg'); ?></td>
+ <td style="text-align:right;"><?php echo $this->view['wpsg_mod_autodebit']['name']; ?></td>
+ </tr>
+ <?php if ($this->get_option('wpsg_mod_autodebit_iban') == '1') { ?>
+ <tr>
+ <td><?php echo __('BIC Code der Bank', 'wpsg'); ?></td>
+ <td style="text-align:right;"><?php echo $this->view['wpsg_mod_autodebit']['bic']; ?></td>
+ </tr>
+ <?php } else { ?>
+ <tr>
+ <td><?php echo __('BLZ der Bank', 'wpsg'); ?></td>
+ <td style="text-align:right;"><?php echo $this->view['wpsg_mod_autodebit']['blz']; ?></td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td><?php echo __('Name des Kontoinhabers', 'wpsg'); ?></td>
+ <td style="text-align:right;"><?php echo $this->view['wpsg_mod_autodebit']['inhaber']; ?></td>
+ </tr>
+ <?php if ($this->get_option('wpsg_mod_autodebit_iban') == '1') { ?>
+ <tr>
+ <td><?php echo __('IBAN Nr.', 'wpsg'); ?></td>
+ <td style="text-align:right;"><?php echo $this->view['wpsg_mod_autodebit']['iban']; ?></td>
+ </tr>
+ <?php } else { ?>
+ <tr>
+ <td><?php echo __('Kontonummer', 'wpsg'); ?></td>
+ <td style="text-align:right;"><?php echo $this->view['wpsg_mod_autodebit']['knr']; ?></td>
+ </tr>
+ <?php } ?>
+</table>
+ \ No newline at end of file
diff --git a/views/mods/mod_autodebit/order_done.phtml b/views/mods/mod_autodebit/order_done.phtml
new file mode 100644
index 0000000..ed8c4e3
--- /dev/null
+++ b/views/mods/mod_autodebit/order_done.phtml
@@ -0,0 +1,8 @@
+<?php
+
+ /**
+ * Template wird nach Bestellabschluss für Zahlungsart "Bankeinzug angezeigt"
+ */
+
+?>
+<p><?php echo __('Sie bezahlen mit Bankeinzug. Wir werden den Betrag von Ihrem Konto abbuchen.', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_autodebit/order_view_afterpayment.phtml b/views/mods/mod_autodebit/order_view_afterpayment.phtml
new file mode 100644
index 0000000..3a294c2
--- /dev/null
+++ b/views/mods/mod_autodebit/order_view_afterpayment.phtml
@@ -0,0 +1,23 @@
+<?php
+
+ /**
+ * Das Template wird in der Bestellansicht eingebunden und zeigt die Kontodaten des Kunden an, die er während der Bestellung angegeben hat
+ */
+
+?>
+<br />
+<?php echo wpsg_drawForm_Input('', __('Name der Bank', 'wpsg'), $this->view['wpsg_mod_autodebit']['name'], array('text' => true, 'clear_after' => true)); ?>
+
+<?php if ($this->get_option('wpsg_mod_autodebit_iban') == '1') { ?>
+<?php echo wpsg_drawForm_Input('', __('BIC der Bank', 'wpsg'), $this->view['wpsg_mod_autodebit']['bic'], array('text' => true, 'clear_after' => true)); ?>
+<?php } else { ?>
+<?php echo wpsg_drawForm_Input('', __('BLZ der Bank', 'wpsg'), $this->view['wpsg_mod_autodebit']['blz'], array('text' => true, 'clear_after' => true)); ?>
+<?php } ?>
+
+<?php echo wpsg_drawForm_Input('', __('Inhaber', 'wpsg'), $this->view['wpsg_mod_autodebit']['inhaber'], array('text' => true, 'clear_after' => true)); ?>
+
+<?php if ($this->get_option('wpsg_mod_autodebit_iban') == '1') { ?>
+<?php echo wpsg_drawForm_Input('', __('IBAN Nr.', 'wpsg'), $this->view['wpsg_mod_autodebit']['iban'], array('text' => true, 'clear_after' => true)); ?>
+<?php } else { ?>
+<?php echo wpsg_drawForm_Input('', __('Kontonummer', 'wpsg'), $this->view['wpsg_mod_autodebit']['knr'], array('text' => true, 'clear_after' => true)); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_autodebit/paymenthint.phtml b/views/mods/mod_autodebit/paymenthint.phtml
new file mode 100644
index 0000000..93de573
--- /dev/null
+++ b/views/mods/mod_autodebit/paymenthint.phtml
@@ -0,0 +1,67 @@
+<?php
+
+ /**
+ * Template für die Integration der Kundeneingaben für das Modul "Bankeinzug" in den Checkout2
+ */
+
+?>
+<br /><br />
+<div class="wpsg_mod_autodebit">
+
+ <div class="wpsg_mod_autodebit_inhaber wpsg_mod_autodebit_field">
+ <label>
+ <?php echo __('Inhaber', 'wpsg'); ?><span class="wpsg_required">*</span>:
+ <input class="<?php echo ((in_array("mod_autodebit_inhaber", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_autodebit[inhaber]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_autodebit']['inhaber']); ?>" />
+ </label>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <?php if ($this->get_option('wpsg_mod_autodebit_iban') == '1') { ?>
+ <div class="wpsg_mod_autodebit_bic wpsg_mod_autodebit_field">
+ <label>
+ <?php echo __('BIC', 'wpsg'); ?><span class="wpsg_required">*</span>:
+ <input class="<?php echo ((in_array("mod_autodebit_bic", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_autodebit[bic]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_autodebit']['bic']); ?>" />
+ </label>
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php } else { ?>
+ <div class="wpsg_mod_autodebit_blz wpsg_mod_autodebit_field">
+ <label>
+ <?php echo __('Bankleitzahl', 'wpsg'); ?><span class="wpsg_required">*</span>:
+ <input class="<?php echo ((in_array("mod_autodebit_blz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_autodebit[blz]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_autodebit']['blz']); ?>" />
+ </label>
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php } ?>
+
+ <?php if ($this->get_option('wpsg_mod_autodebit_iban') == '1') { ?>
+ <div class="wpsg_mod_autodebit_iban wpsg_mod_autodebit_field">
+ <label>
+ <?php echo __('IBAN', 'wpsg'); ?><span class="wpsg_required">*</span>:
+ <input class="<?php echo ((in_array("mod_autodebit_iban", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_autodebit[iban]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_autodebit']['iban']); ?>" />
+ </label>
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php } else { ?>
+ <div class="wpsg_mod_autodebit_knr wpsg_mod_autodebit_field">
+ <label>
+ <?php echo __('Kontonummer', 'wpsg'); ?><span class="wpsg_required">*</span>:
+ <input class="<?php echo ((in_array("mod_autodebit_knr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_autodebit[knr]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_autodebit']['knr']); ?>" />
+ </label>
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php } ?>
+
+ <div class="wpsg_mod_autodebit_name wpsg_mod_autodebit_field">
+ <label>
+ <?php echo __('Name der Bank', 'wpsg'); ?><span class="wpsg_required">*</span>:
+ <input class="<?php echo ((in_array("mod_autodebit_name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_autodebit[name]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_autodebit']['name']); ?>" />
+ </label>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_mandatoryfield_hint">
+ <?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
+ </div>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_autodebit/settings_edit.phtml b/views/mods/mod_autodebit/settings_edit.phtml
new file mode 100644
index 0000000..1e6685d
--- /dev/null
+++ b/views/mods/mod_autodebit/settings_edit.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Moduls "Bankeinzug"
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_autodebit_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_autodebit_bezeichnung'), array('help' => 'wpsg_shippay_name')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_autodebit_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_autodebit_aktiv'), array('help' => 'wpsg_shippay_activ')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_autodebit_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_autodebit_hint'), array('help' => 'wpsg_shippay_hint')); ?>
+
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_autodebit_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_autodebit_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_autodebit_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_autodebit_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_autodebit_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_autodebit_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_autodebit_iban', __('IBAN/BIC statt Kontonummer/BLZ verwenden', 'wpsg'), $this->get_option('wpsg_mod_autodebit_iban'), array('help' => 'wpsg_mod_autodebit_iban')); ?>
+<?php // echo wpsg_drawForm_Button('wpsg_mod_autodebit_ibanbicconvert2', __('BIC/IBAN Konvertierung', 'wpsg'), array('button_text' => __('BIC/IBAN Konvertieren', 'wpsg'), 'button_class' => 'wpsg_mod_autodebit_button', 'button_onclick' => 'if (!confirm(\''.wpsg_hspc(__('Es werden die Bankdaten von allen Bestellungen mit Bankeinzug in BIC/IBAN konvertiert, sofern noch nicht angegeben. Die Länderkürzel müssen den IBAN Länderkürzeln entsprechen.', 'wpsg')).'\')) return false; location.href=\''.WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_autodebit&wpsg_mod_autodebit_bicibanconverter=1&mail=0&noheader=1\'')); ?>
+<?php // echo wpsg_drawForm_Button('wpsg_mod_autodebit_ibanbicconvert', '', array('button_text' => __('BIC/IBAN Konvertierung starten / Kunden informieren', 'wpsg'), 'button_class' => 'wpsg_mod_autodebit_button', 'button_onclick' => 'if (!confirm(\''.wpsg_hspc(__('Es werden die Bankdaten von allen Bestellungen mit Bankeinzug in BIC/IBAN konvertiert, sofern noch nicht angegeben. Die Länderkürzel müssen den IBAN Länderkürzeln entsprechen. Der Kunde wird darüber per E-Mail informiert.', 'wpsg')).'\')) return false;', 'onclick' => WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_autodebit&wpsg_mod_autodebit_bicibanconverter=1&mail=1&noheader=1')); ?>
diff --git a/views/mods/mod_bankalignment/order_ajax.phtml b/views/mods/mod_bankalignment/order_ajax.phtml
new file mode 100644
index 0000000..bf8bc4b
--- /dev/null
+++ b/views/mods/mod_bankalignment/order_ajax.phtml
@@ -0,0 +1,97 @@
+<?php
+
+ /**
+ * Template für die Zuweisung der Bestellungen zu Datensätzen aus der CSV Datei
+ */
+
+ //wpsg_debug($this->view);
+
+?>
+<div class="wrap wpsg_mod_bankalignment_order_ajax">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
+ <h2>
+ <?php echo __('Bestellverwaltung', 'wpsg'); ?> - <?php echo __('Bankabgleich', 'wpsg'); ?>
+ </h2>
+
+ <br />
+
+ <form method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_bankalignment">
+
+ <table class="widefat post fixed">
+ <thead>
+ <tr>
+ <th class="manage-column wpsg-nr"><?php echo __('Zeile', 'wpsg'); ?></th>
+ <th class="manage-column wpsg-order"><?php echo __('Bestellung', 'wpsg'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php $i = 0; foreach ($this->view['set'] as $row) { $i ++; ?>
+ <tr>
+ <td class="wpsg-nr">
+ <?php echo $i; ?>
+ <?php if ($row['order_id'] === false) { ?>
+ <span class="wpsg_error"><?php echo __('Bestellung konnte nicht automatisch ermittelt werden.', 'wpsg'); ?></span>
+ <?php } else { ?>
+ <span class="wpsg_erfolg"><?php echo wpsg_translate(__('Bestellung #1# wurde automatisch erkannt.', 'wpsg'), $row['onr']); ?></span>
+ <?php } ?>
+ <div class="row-actions">
+ <span class="view"><a onclick="return wpsg_mod_bankalignment_show(this);" title="<?php echo __("Details anzeigen", "wpsg"); ?>" href="#"><?php echo __("Details anzeigen", "wpsg"); ?></a></span>
+ </div>
+ <div class="row-details">
+ <br />
+ <?php foreach ($this->view['colInfo'] as $k => $v) { ?>
+ <?php echo $v; ?>: <?php echo $row['data'][$k]; ?> <br />
+ <?php } ?>
+ </div>
+ </td>
+ <td class="wpsg-order">
+ <select name="set[]" style="width:100%;">
+ <option value="-1"><?php echo __('Bitte Bestellung auswählen / Zeile ignorieren', 'wpsg'); ?></option>
+ <?php foreach ($this->view['arOrder'] as $o) { ?>
+ <option <?php echo (($row['order_id'] == $o['o_id'])?'selected="selected"':''); ?> value="<?php echo $o['o_id']; ?>"><?php echo wpsg_translate(__('Bestellung #1# (#2#) auf "#3#" setzen', 'wpsg'), $o['onr'], $o['okey'], $this->arStatus[100]); ?></option>
+ <?php } ?>
+ </select>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ </table>
+
+ <br />
+
+ <input type="submit" name="wpsg_mod_bankalignment_submit" value="<?php echo __('Änderungen übernehmen', 'wpsg'); ?>" class="button-primary" />
+
+ </form>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Zeigt die Details einer Datenzeile an oder blendet sie aus
+ */
+ function wpsg_mod_bankalignment_show(oElement)
+ {
+
+ if (jQuery(oElement).parent().parent().parent().find('.row-details').is(':visible'))
+ {
+
+ jQuery(oElement).parent().parent().parent().find('.row-details').hide();
+ jQuery(oElement).attr('title', '<?php echo __("Details anzeigen", "wpsg"); ?>');
+ jQuery(oElement).text('<?php echo __("Details anzeigen", "wpsg"); ?>');
+
+ }
+ else
+ {
+
+ jQuery(oElement).parent().parent().parent().find('.row-details').show();
+ jQuery(oElement).attr('title', '<?php echo __("Details ausblenden", "wpsg"); ?>');
+ jQuery(oElement).text('<?php echo __("Details ausblenden", "wpsg"); ?>');
+
+ }
+
+ return false;
+
+ } // function wpsg_mod_bankalignment_show(oElement)
+
+ /* ]]> */</script>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_bankalignment/produkt_index_aftersearch.phtml b/views/mods/mod_bankalignment/produkt_index_aftersearch.phtml
new file mode 100644
index 0000000..8f0d09a
--- /dev/null
+++ b/views/mods/mod_bankalignment/produkt_index_aftersearch.phtml
@@ -0,0 +1,29 @@
+<?php
+
+ /**
+ * Integriert das Uploadformular in die Bestellverwaltung
+ */
+
+?>
+<div class="wpsg_clear"></div>
+<div class="metabox-holder" id="wpsg_mod_bankalignment_layer" style="<?php echo (($_COOKIE['wpsg_mod_bankalignment_layer'] == '1')?'display:block;':'display:none;'); ?>">
+ <div id="mod_bankalignment" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br></span>
+ <span><?php echo __('Bankabgleich', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_bankalignment" enctype="multipart/form-data">
+
+ <?php echo wpsg_drawForm_Upload('wpsg_mod_bankalignment_file', __('CSV Datei', 'wpsg')); ?>
+
+ <br />
+
+ <input type="submit" value="<?php echo __('Abgleich starten', 'wpsg'); ?>" name="submit" class="button" />
+
+ </form>
+
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_bankalignment/produkt_index_head.phtml b/views/mods/mod_bankalignment/produkt_index_head.phtml
new file mode 100644
index 0000000..92cbcf5
--- /dev/null
+++ b/views/mods/mod_bankalignment/produkt_index_head.phtml
@@ -0,0 +1,11 @@
+<?php
+
+ /**
+ * Template für die Integration in den Kopf der Bestellverwaltung
+ * Integriert lediglich den Link zum Upload der CSV Datei
+ */
+
+?>
+<label>
+ <input type="checkbox" <?php echo (($_COOKIE['wpsg_mod_bankalignment_layer'] == '1')?'checked="checked"':''); ?> onclick="if (jQuery(this).attr('checked') == 'checked') { jQuery('#wpsg_mod_bankalignment_layer').show(); jQuery.cookie('wpsg_mod_bankalignment_layer', '1'); } else { jQuery('#wpsg_mod_bankalignment_layer').hide(); jQuery.cookie('wpsg_mod_bankalignment_layer', null); }" />&nbsp;<?php echo __('Bankabgleich', 'wpsg'); ?>
+</label> \ No newline at end of file
diff --git a/views/mods/mod_bankalignment/settings_edit.phtml b/views/mods/mod_bankalignment/settings_edit.phtml
new file mode 100644
index 0000000..57b9e60
--- /dev/null
+++ b/views/mods/mod_bankalignment/settings_edit.phtml
@@ -0,0 +1,9 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Bankabgleichsmoduls
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_bankalignment_separator', __('Treenzeichen', 'wpsg'), $this->get_option('wpsg_mod_bankalignment_separator')); ?> \ No newline at end of file
diff --git a/views/mods/mod_basketteaser/basket_row.phtml b/views/mods/mod_basketteaser/basket_row.phtml
new file mode 100644
index 0000000..1d26f53
--- /dev/null
+++ b/views/mods/mod_basketteaser/basket_row.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Template für die Integration der Warenkorbteaserprodukte innerhalb des Warenkorbs
+ */
+
+?>
+<tr class="wpsg_mod_basketteaser_row_<?php echo $this->view['data']['id']; ?> wpsg_<?php echo (($this->view['wpsg_mod_productvars']['i'] == 0)?'odd':'even'); ?>">
+ <td class="wpsg_cell_number">&nbsp;</td>
+ <td class="wpsg_cell_name">
+ <?php if ($this->getProduktLink($this->view['data'])) { ?>
+ <a href="<?php echo $this->getProduktLink($this->view['data']); ?>"><?php echo wpsg_hspc((($this->view['data']['detailname'] != '')?$this->view['data']['detailname']:$this->view['data']['name'])); ?></a>
+ <?php } else { ?>
+ <?php echo wpsg_hspc((($this->view['data']['detailname'] != '')?$this->view['data']['detailname']:$this->view['data']['name'])); ?>
+ <?php } ?>
+ </td>
+ <td class="wpsg_cell_preis"><?php echo wpsg_ff($this->view['data']['preis'], $this->get_option('wpsg_currency')); ?></td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td class="wpsg_cell_mwst"><?php echo wpsg_ff($this->view['data']['mwst_value'], '%'); ?></td>
+ <?php } ?>
+ <td class="wpsg_cell_menge"><input name="wpsg_mod_basketteaser_row[<?php echo $this->view['data']['id']; ?>]" type="text" size="3" value="0" /></td>
+ <td class="wpsg_cell_gesamtpreis">
+ <a href="#" onclick="return wpsg_mod_basketteaser_add(<?php echo $this->view['data']['id']; ?>);"><?php echo __('Hinzufügen', 'wpsg'); ?></a>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_basketteaser/produkt_edit_sidebar.phtml b/views/mods/mod_basketteaser/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..1cc9c83
--- /dev/null
+++ b/views/mods/mod_basketteaser/produkt_edit_sidebar.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Template für die Integration des Warenkorbteaser Moduls in die Produktverwaltung
+ * Sollte nicht verändert werden
+ */
+
+?>
+<div id="wpsg_basketteaser" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></span>
+ <span><?php echo __('Warenkorbteaserprodukt', 'wpsg'); ?> </span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Input('mod_basketteaser_from', __('Von', 'wpsg'), wpsg_fromDate($this->view['data']['mod_basketteaser_from']), array('datepicker' => true)); ?>
+ <?php echo wpsg_drawForm_Input('mod_basketteaser_to', __('Bis', 'wpsg'), wpsg_fromDate($this->view['data']['mod_basketteaser_to']), array('datepicker' => true)); ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_basketteaser/settings_edit.phtml b/views/mods/mod_basketteaser/settings_edit.phtml
new file mode 100644
index 0000000..3bc9610
--- /dev/null
+++ b/views/mods/mod_basketteaser/settings_edit.phtml
@@ -0,0 +1,29 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Warenkorbteaser Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_basketteaser_show', __('Anzeige', 'wpsg'), array(0 => __('Unter dem Warenkorb', 'wpsg'), 1 => __('Im Warenkorb', 'wpsg')), $this->get_option('wpsg_mod_basketteaser_show'), array('help' => 'wpsg_mod_basketteaser_show')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_basketteaser_template', __('Template für die Produkte im Warenkorb', 'wpsg'), $this->view['templates'], $this->get_option('wpsg_mod_basketteaser_template'), array('help' => 'wpsg_mod_basketteaser_template'))?>
+
+<script type="text/javascript">
+
+ function wpsg_mod_basketteaser_switchshow()
+ {
+
+ if (jQuery('#wpsg_mod_basketteaser_show').val() == '0') jQuery('#wpsg_mod_basketteaser_template').parent().parent().show();
+ else jQuery('#wpsg_mod_basketteaser_template').parent().parent().hide();
+
+ }
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_basketteaser_show').bind('change', function() { wpsg_mod_basketteaser_switchshow(); } );
+
+ wpsg_mod_basketteaser_switchshow();
+
+ } );
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_billsafe/gfx/logo_100x25.png b/views/mods/mod_billsafe/gfx/logo_100x25.png
new file mode 100644
index 0000000..6bf1d3a
--- /dev/null
+++ b/views/mods/mod_billsafe/gfx/logo_100x25.png
Binary files differ
diff --git a/views/mods/mod_billsafe/order_done.phtml b/views/mods/mod_billsafe/order_done.phtml
new file mode 100644
index 0000000..cc40dd5
--- /dev/null
+++ b/views/mods/mod_billsafe/order_done.phtml
@@ -0,0 +1,24 @@
+<?php
+
+ /**
+ * Dieses Template wird bei der Bezahlart "Billsafe" nach der Bestellung eingebunden um auf den Billsafe Gateway zu leiten
+ */
+
+?>
+<p><?php echo __('Um den Betrag mit Billsafe zu bezahlen klicken Sie bitte auf folgendes Logo.', 'wpsg'); ?></p>
+<p>
+ <a href="<?php echo $this->view['wpsg_mod_billsafe']['url']; ?>">
+ <img src="https://images.billsafe.de/image/image/id/22227102a95c"/>
+ </a>
+</p>
+<?php if ($this->get_option('wpsg_mod_billsafe_autostart') == '1') { ?>
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+ window.setTimeout(function() {
+ location.href = "<?php echo $this->view['wpsg_mod_billsafe']['url']; ?>";
+ }, 1000);
+ } );
+
+</script>
+<?php } ?>
diff --git a/views/mods/mod_billsafe/order_view_sidebar.phtml b/views/mods/mod_billsafe/order_view_sidebar.phtml
new file mode 100644
index 0000000..5de0042
--- /dev/null
+++ b/views/mods/mod_billsafe/order_view_sidebar.phtml
@@ -0,0 +1,30 @@
+<?php
+
+ /**
+ * Template für die erweiterten Angaben der Billsafe Zahlungsart in der Rechnungsansicht
+ * sollten normalerweise nicht verändert werden
+ */
+
+?>
+<div id="wpsg_billsafe" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br></span>
+ <span><?php echo __('Billsafe', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Input('', __('Transaction ID', 'wpsg'), $this->view['wpsg_mod_billsafe']['data']['mod_billsafe_transaction_id'], array('text' => true)); ?>
+ <?php if (wpsg_isSizedString($this->view['wpsg_mod_billsafe']['rechnung_url'])) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for=""><?php echo __('Rechnung', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p class="" id="">
+ <a href="<?php echo $this->view['wpsg_mod_billsafe']['rechnung_url']; ?>"><?php echo __('Download', 'wpsg'); ?></a>
+ </p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ </div>
+</div>
diff --git a/views/mods/mod_billsafe/settings_edit.phtml b/views/mods/mod_billsafe/settings_edit.phtml
new file mode 100644
index 0000000..64c1f87
--- /dev/null
+++ b/views/mods/mod_billsafe/settings_edit.phtml
@@ -0,0 +1,30 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Billsafe Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_billsafe_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_billsafe_bezeichnung'), array ('help' => 'wpsg_mod_billsafe_bezeichnung')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_billsafe_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_billsafe_aktiv'), array ('help' => 'wpsg_mod_billsafe_aktiv')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_billsafe_aktiv_from', __('Aktiv ab Betrag', 'wpsg'), $this->get_option('wpsg_mod_billsafe_aktiv_from'), array ('help' => 'wpsg_mod_billsafe_aktiv_from')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_billsafe_aktiv_to', __('Aktiv bis Betrag', 'wpsg'), $this->get_option('wpsg_mod_billsafe_aktiv_to'), array ('help' => 'wpsg_mod_billsafe_aktiv_to')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_billsafe_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_billsafe_hint'), array ('help' => 'wpsg_mod_billsafe_hint')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_billsafe_logo', __('Logo URL', 'wpsg'), $this->get_option('wpsg_mod_billsafe_logo'), array ('help' => 'wpsg_mod_billsafe_logo')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_billsafe_vendorID', __('Händler ID (Vendor/Merchant ID)', 'wpsg'), $this->get_option('wpsg_mod_billsafe_vendorID'), array ('help' => 'wpsg_mod_billsafe_vendorId')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_billsafe_licence', __('Lizenz', 'wpsg'), $this->get_option('wpsg_mod_billsafe_licence'), array ('help' => 'wpsg_mod_billsafe_licence')); ?>
+<br />
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_billsafe_sandbox', __('Sandboxmodus', 'wpsg'), $this->get_option('wpsg_mod_billsafe_sandbox'), array ('help' => 'wpsg_mod_billsafe_sandbox')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_billsafe_licencesandbox', __('Lizenz (Sandbox)', 'wpsg'), $this->get_option('wpsg_mod_billsafe_licencesandbox'), array ('help' => 'wpsg_mod_billsafe_licencesandbox')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_billsafe_gebuehr', __('Gebühr', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_billsafe_gebuehr'), true), array('help' => 'wpsg_mod_billsafe_gebuehr','unit' => $this->get_option('wpsg_currency').' / %', 'hint' => __('Müssen mit dem Billsafe Support abgestimmt werden.', 'wpsg'))); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_billsafe_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_billsafe_mwst'), array ('help' => 'wpsg_mod_billsafe_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_billsafe_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_billsafe_mwstland'), array ('help' => 'wpsg_mod_billsafe_mwstland')); ?>
+<br />
+<?php echo wpsg_drawForm_Select('wpsg_mod_billsafe_currency', __('Währung', 'wpsg'), array('EUR' => __('EUR', 'wpsg')), $this->get_option('wpsg_mod_billsafe_currency'), array('help' => 'wpsg_mod_billsafe_currency','hint' => __('Derzeit nur EUR.', 'wpsg'))); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_billsafe_autorun', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_billsafe_autorun'), array ('help' => 'wpsg_mod_billsafe_autorun')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_billsafe_precheck', __('Vorabprüfung', 'wpsg'), $this->get_option('wpsg_mod_billsafe_precheck'), array ('help' => 'wpsg_mod_billsafe_precheck')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_billsafe_success', __('Erfolgsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_billsafe_success'), array('help' => 'wpsg_mod_billsafe_success','hint' => __('Diese Seite wird nach erfolgreicher Abwicklung innerhalb des Billsafe Gateways aufgerufen und zeigt dem Nutzer das Ergebnis an.', 'wpsg'))); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_billsafe_error', __('Fehlerseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_billsafe_error'), array('help' => 'wpsg_mod_billsafe_error','hint' => __('Diese Seite wird angezeigt wenn es technische Probleme gibt oder der Kunde die Billsafe Zahlung abbricht.', 'wpsg'))); ?>
+ \ No newline at end of file
diff --git a/views/mods/mod_billsafe/zahlung_ablehnung.phtml b/views/mods/mod_billsafe/zahlung_ablehnung.phtml
new file mode 100644
index 0000000..d241110
--- /dev/null
+++ b/views/mods/mod_billsafe/zahlung_ablehnung.phtml
@@ -0,0 +1,11 @@
+<?php
+
+ /**
+ * Template welches verwendet wird, wenn die Zahlung durch Billsafe nicht verifiziert werden konnte
+ * wird auf der Erfolgsseite eingebaut
+ */
+
+?>
+<p>
+ <?php echo __('Ihre Zahlung konnte leider nicht mittels Billsafe abgewickelt werden, bitte wenden Sie sich an den Shop Betreiber um eine alternative Zahlungsart zu vereinbaren.', 'wpsg'); ?>
+</p> \ No newline at end of file
diff --git a/views/mods/mod_billsafe/zahlung_erfolg.phtml b/views/mods/mod_billsafe/zahlung_erfolg.phtml
new file mode 100644
index 0000000..9849024
--- /dev/null
+++ b/views/mods/mod_billsafe/zahlung_erfolg.phtml
@@ -0,0 +1,11 @@
+<?php
+
+ /**
+ * Template welches verwendet wird, wenn die Zahlung durch Billsafe verifiziert werden konnte
+ * wird auf der Erfolgsseite eingebaut
+ */
+
+?>
+<p>
+ <?php echo __('Ihre Zahlung wurde erfolgreich angenommen und sie werden ihre Bestellung in den nächsten Tagen erhalten.', 'wpsg'); ?>
+</p> \ No newline at end of file
diff --git a/views/mods/mod_cab/mail_mms.phtml b/views/mods/mod_cab/mail_mms.phtml
new file mode 100644
index 0000000..ed6f7df
--- /dev/null
+++ b/views/mods/mod_cab/mail_mms.phtml
@@ -0,0 +1,12 @@
+Hallo Administrator,
+
+Eine neue MMS ClickandBuy Benachrichtigung ist eingetroffen
+
+Datum: <?php echo date("d.m.Y H:i:s"); ?>
+
+Aktualisierte Bestellungen: <?php echo $this->view['wpsg_mod_cab']['nUpdated']; ?>
+
+Es folgt der Inhalt der XML Daten:
+
+-----------------------------------------------------------
+<?php echo $this->view['wpsg_mod_cab']['xml']; ?> \ No newline at end of file
diff --git a/views/mods/mod_cab/mail_mms_error.phtml b/views/mods/mod_cab/mail_mms_error.phtml
new file mode 100644
index 0000000..3e8fe7f
--- /dev/null
+++ b/views/mods/mod_cab/mail_mms_error.phtml
@@ -0,0 +1,12 @@
+Hallo Administrator,
+
+Eine neue MMS ClickandBuy Benachrichtigung ist eingetroffen, aber der Hash konnte nicht verifiziert werden!
+
+Datum: <?php echo date("d.m.Y H:i:s"); ?>
+
+Ermittelter Hash: <?php echo $this->view['wpsg_mod_cab']['hash']; ?>
+
+Es folgt der Inhalt der XML Daten:
+
+-----------------------------------------------------------
+<?php echo $this->view['wpsg_mod_cab']['xml']; ?> \ No newline at end of file
diff --git a/views/mods/mod_cab/mail_resend.phtml b/views/mods/mod_cab/mail_resend.phtml
new file mode 100644
index 0000000..0bfd6ef
--- /dev/null
+++ b/views/mods/mod_cab/mail_resend.phtml
@@ -0,0 +1,10 @@
+<?php wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['wpsg_mod_cab']['customer']['vname'], $this->view['wpsg_mod_cab']['customer']['name']); ?>,
+
+<?php echo __('Es wurde vom Administrator ein neuer ClickandBuy Bezahllink erstellt:', 'wpsg'); ?>
+
+<?php echo $this->view['wpsg_mod_cab']['payLink']; ?>
+
+
+<?php echo __('Mit freundlichen Grüßen', 'wpsg'); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_cab/order_done.phtml b/views/mods/mod_cab/order_done.phtml
new file mode 100644
index 0000000..c159d49
--- /dev/null
+++ b/views/mods/mod_cab/order_done.phtml
@@ -0,0 +1,24 @@
+<?php
+
+ /**
+ * Dieses Template wird bei der Bezahlart "ClickandBuy" nach der Bestellung eingebunden
+ */
+
+?>
+<p><?php echo __('Um den Betrag mit ClickandBuy zu bezahlen klicken Sie bitte auf folgendes Logo.', 'wpsg'); ?></p>
+<p>
+ <a href="<?php echo $this->view['wpsg_mod_cab']['url']; ?>">
+ <img src="<?php echo $this->arPayment[810]['logo']; ?>" alt="<?php echo __('Mit ClickandBuy bezahlen', 'wpsg'); ?>" />
+ </a>
+</p>
+<?php if ($this->get_option('wpsg_mod_cab_autostart') == '1') { ?>
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+ window.setTimeout(function() {
+ location.href = "<?php echo $this->view['wpsg_mod_cab']['url']; ?>";
+ }, 1000);
+ } );
+
+</script>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_cab/order_view_content.phtml b/views/mods/mod_cab/order_view_content.phtml
new file mode 100644
index 0000000..13396e6
--- /dev/null
+++ b/views/mods/mod_cab/order_view_content.phtml
@@ -0,0 +1,83 @@
+<?php
+
+ /**
+ * Template für die Integration der Zahlungsart Click&Buy in die Bestellverwaltung
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_mod_cab_reload()
+ {
+
+ jQuery('#wpsg_mod_cab_inner').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_cab&cmd=refresh&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_cab']['order']['id']; ?>',
+ data: {
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_mod_cab_inner').html(data);
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_cab_reload()
+
+ function wpsg_mod_cab_rebuild()
+ {
+
+ jQuery('#wpsg_mod_cab_inner').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_cab&cmd=rebuild&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_cab']['order']['id']; ?>',
+ data: {
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_mod_cab_inner').html(data);
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_cab_rebuild()
+
+ function wpsg_mod_cab_repay()
+ {
+
+ jQuery('#wpsg_mod_cab_inner').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_cab&cmd=repay&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_cab']['order']['id']; ?>',
+ data: {
+ value: jQuery('#wpsg_cab_repayvalue').val()
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_mod_cab_inner').html(data);
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_cab_repay()
+
+/* ]]> */</script>
+
+<div id="wpsg_cab" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br></span>
+ <span><?php echo __('Click & Buy', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside" id="wpsg_mod_cab_inner">
+
+ <?php echo $this->view['wpsg_mod_cab']['content']; ?>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_cab/order_view_content_inner.phtml b/views/mods/mod_cab/order_view_content_inner.phtml
new file mode 100644
index 0000000..11959d1
--- /dev/null
+++ b/views/mods/mod_cab/order_view_content_inner.phtml
@@ -0,0 +1,67 @@
+<?php
+
+ /**
+ * Template für die Integration von Click&Buy in die Bestellverwaltung
+ */
+
+?>
+<?php if (wpsg_isSizedString($this->view['wpsg_mod_cab']['strError'])) { ?>
+<div class="wpsg_error"><?php echo $this->view['wpsg_mod_cab']['strError']; ?></div><br />
+<?php } ?>
+
+<div style="width:30%; float:left;"><?php echo __("Derzeitiger Status", "wpsg"); ?></div>
+
+<div style="width:70%; float:right;">
+ <?php echo $this->view['wpsg_mod_cab']['order']['cab_transactionStatus'].' ('.wpsg_formatTimestamp(strtotime($this->view['wpsg_mod_cab']['order']['cab_lastupdate'])).')'; ?>
+ <a href="#" onclick="return wpsg_mod_cab_reload();"><?php echo __("Neu abfragen", "wpsg"); ?></a>
+</div><div style="clear:both; height:3px; width:100%;"></div>
+
+<div style="width:100%;">
+ <div style="width:30%; float:left;"><?php echo __("transactionID", "wpsg"); ?>:</div>
+ <div style="width:70%; float:right;"><?php echo $this->view['wpsg_mod_cab']['order']['cab_transactionID']; ?></div>
+</div><div style="clear:both; height:3px; width:100%;"></div>
+
+<div style="width:100%;">
+ <div style="width:30%; float:left;"><?php echo __("externalID", "wpsg"); ?>:</div>
+ <div style="width:70%; float:right;"><?php echo $this->view['wpsg_mod_cab']['order']['cab_externalid']; ?></div>
+</div><div style="clear:both; height:3px; width:100%;"></div>
+
+<?php if (wpsg_isSizedArray($this->view['wpsg_mod_cab']['log'])) { ?>
+<table style="width:100%;">
+ <tr>
+ <th><?php echo __("Datum", "wpsg"); ?></th>
+ <th><?php echo __("Event ID", "wpsg"); ?></th>
+ <th><?php echo __("Alter Status", "wpsg"); ?></th>
+ <th><?php echo __("Neuer Status", "wpsg"); ?></th>
+ </tr>
+ <?php foreach ($log as $l) { ?>
+ <tr>
+ <td><?php echo date("d.m.Y H:i:s", strtotime($l['cdate'])); ?></td>
+ <td><?php echo $l['eventID']; ?></td>
+ <td><?php echo $l['oldState']; ?></td>
+ <td><?php echo $l['newState']; ?></td>
+ </tr>
+ <?php } ?>
+</table><div style="clear:both; height:3px; width:100%;"></div>
+<?php } ?>
+
+<div style="width:100%;">
+<div style="width:30%; float:left;"><?php echo __("Link zum Bezahlen", "wpsg"); ?>:</div>
+<div style="width:70%; float:right;">
+ <a href="<?php echo $this->view['wpsg_mod_cab']['order']['cab_paylink']; ?>"><?php echo __("Link", "wpsg"); ?></a>&nbsp;|&nbsp;
+ <a href="#" onclick="return wpsg_mod_cab_rebuild();"><?php echo __("Neu generieren und versenden", "wpsg"); ?></a>
+</div>
+</div><div style="clear:both; height:3px; width:100%;"></div>
+
+<br />
+
+<div style="width:30%; float:left; line-height:20px;"><?php echo __("Rückzahlung", "wpsg"); ?>:</div>
+
+<?php if (($this->view['wpsg_mod_cab']['order']['price_gesamt'] - $this->view['wpsg_mod_cab']['order']['cab_repayed']) > 0) { ?>
+<div style="width:70%; float:left;">
+ <input type="text" id="wpsg_cab_repayvalue" name="wpsg_cab_repayvalue" value="" />&nbsp;&nbsp;(<?php echo __('Max', 'wpsg'); ?>: <?php echo wpsg_ff($this->view['wpsg_mod_cab']['order']['price_gesamt'] - $this->view['wpsg_mod_cab']['order']['cab_repayed'], $this->get_option('wpsg_currency')).')'; ?>
+ <input onclick="return wpsg_mod_cab_repay();" type="submit" value="<?php echo __("Zurückzahlen", "wpsg"); ?>" style="float:right;" />
+</div>
+<?php } ?>
+
+<div style="clear:both; height:3px; width:100%;"></div> \ No newline at end of file
diff --git a/views/mods/mod_cab/settings_edit.phtml b/views/mods/mod_cab/settings_edit.phtml
new file mode 100644
index 0000000..553c63c
--- /dev/null
+++ b/views/mods/mod_cab/settings_edit.phtml
@@ -0,0 +1,49 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Click&Buy Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_cab_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_cab_bezeichnung'), array('help' => 'wpsg_mod_cab_bezeichnung')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_cab_auftragsbezeichnung', __('Auftragsbezeichnung', 'wpsg'), $this->get_option('wpsg_mod_cab_auftragsbezeichnung'), array('help' => 'wpsg_mod_cab_auftragsbezeichnung')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_cab_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_cab_aktiv'), array('help' => 'wpsg_mod_cab_aktiv')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_cab_sandbox', __('Sandbox', 'wpsg'), $this->get_option('wpsg_mod_cab_sandbox'), array('help' => 'wpsg_mod_cab_sandbox')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_cab_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_cab_hint'), array('help' => 'wpsg_mod_cab_hint')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_cab_merchantID', __('MerchantID', 'wpsg'), $this->get_option('wpsg_mod_cab_merchantID'), array('help' => 'wpsg_mod_cab_merchantID')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_cab_projectID', __('ProjektID', 'wpsg'), $this->get_option('wpsg_mod_cab_projectID'), array('help' => 'wpsg_mod_cab_projectID')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_cab_kryptkey', __('Kryptographischer Schlüssel', 'wpsg'), $this->get_option('wpsg_mod_cab_kryptkey'), array('help' => 'wpsg_mod_cab_kryptkey')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('', __('MMS Push URL', 'wpsg'), $this->view['wpsg_mod_cab_mmspushurl'], array('help' => 'wpsg_mod_cab_mmspushurl','readonly' => true, 'disabled' => false)); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_cab_mmskryptkey', __('Kryptographischer Schlüssel (MMS)', 'wpsg'), $this->get_option('wpsg_mod_cab_mmskryptkey'), array('help' => 'wpsg_mod_cab_mmskryptkey')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_cab_mmsstatusmail', __('MMS Statusmail', 'wpsg'), $this->get_option('wpsg_mod_cab_mmsstatusmail'), array('help' => 'wpsg_mod_cab_mmsstatusmail')); ?>
+<br />
+<?php echo wpsg_drawForm_Select('wpsg_mod_cab_success', __('Erfolgslink', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_cab_success'), array('help' => 'wpsg_mod_cab_success')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_cab_error', __('Abbruchlink', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_cab_error'), array('help' => 'wpsg_mod_cab_error')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_cab_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_cab_gebuehr'), true), array('help' => 'wpsg_mod_cab_gebuehr','unit' => $this->get_option('wpsg_currency').' / %')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_cab_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_cab_mwst'), array('help' => 'wpsg_mod_cab_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_cab_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_cab_mwstland'), array('help' => 'wpsg_mod_cab_mwstland')); ?>
+<br />
+<?php echo wpsg_drawForm_Select('wpsg_mod_cab_currency', __('Währung', 'wpsg'), array('EUR' => __('EUR', 'wpsg'), 'GBP' => __('GBP', 'wpsg'), 'USD' => __('USD', 'wpsg'), 'CHR' => __('CHR', 'wpsg')), $this->get_option('wpsg_mod_cab_currency'), array('help' => 'wpsg_mod_cab_currency')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_cab_autorun', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_cab_autorun'), array('help' => 'wpsg_mod_cab_autorun')); ?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ var wpsg_pageURLs = new Object();
+
+ <?php if (wpsg_isSizedArray($this->view['pageURLs'])) { ?>
+ <?php foreach ($this->view['pageURLs'] as $page_id => $page_url) { ?>
+ wpsg_pageURLs['<?php echo $page_id; ?>'] = '<?php echo $page_url; ?>';
+ <?php } ?>
+ <?php } ?>
+
+ jQuery(document).ready(function() {
+
+ wpsg_switchPage(jQuery('#wpsg_mod_cab_success'));
+ wpsg_switchPage(jQuery('#wpsg_mod_cab_error'));
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_core/admin_licence.phtml b/views/mods/mod_core/admin_licence.phtml
new file mode 100644
index 0000000..7573d43
--- /dev/null
+++ b/views/mods/mod_core/admin_licence.phtml
@@ -0,0 +1,7 @@
+<?php
+
+
+?>
+<h2><?php echo __('Es wurde noch keine gültige Lizenz gefunden.', 'wpsg'); ?></h2>
+
+<p><?php echo __('Damit sie den Shop registrieren können benötigen sie eine gültige Lizenz.<br />Diese können sie unter <a href="http://shop.maennchen1.de/" target="_blank">shop.maennchen1.de</a> erwerben und anschließend in der Plugin Verwaltung installieren.', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_core/admin_register.phtml b/views/mods/mod_core/admin_register.phtml
new file mode 100644
index 0000000..379faf5
--- /dev/null
+++ b/views/mods/mod_core/admin_register.phtml
@@ -0,0 +1,100 @@
+<?php
+
+ /**
+ * Templatedatei für das Registrierungsinterface
+ * Sollte nicht verändert werden
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Lizenzverwaltung", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <li class="<?php echo ((!isset($_REQUEST['subaction']))?'current':''); ?>"><a href="<?php echo wpsg_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung'); ?>"><?php echo __('Registrierungsdaten', 'wpsg'); ?></a></li>
+ <li class="<?php echo ((isset($_REQUEST['subaction']) && $_REQUEST['subaction'] == 'domains')?'current':''); ?>"><a href="<?php echo wpsg_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=domains'); ?>"><?php echo __('Domainverwaltung', 'wpsg'); ?></a></li>
+ <li class="<?php echo ((isset($_REQUEST['subaction']) && $_REQUEST['subaction'] == 'module')?'current':''); ?>"><a href="<?php echo wpsg_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=module'); ?>"><?php echo __('Modulaktivierung', 'wpsg'); ?></a></li>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+
+ <?php if (!isset($_REQUEST['subaction'])) { ?>
+ <h2><?php echo __('Registrierungsdaten', 'wpsg'); ?></h2>
+
+ <?php echo wpsg_drawForm_Input('register_lizenz', __('Lizenzart', 'wpsg'), $this->view['typ'], array('readonly' => true, 'disabled' => true)); ?>
+
+ <br />
+ <form enctype="multipart/form-data" method="post" action="<?php echo wpsg_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1'); ?>" name="form1">
+
+ <?php echo wpsg_drawForm_Input('register_vname', __('Vorname', 'wpsg'), $this->view['data']['vname']); ?>
+ <?php echo wpsg_drawForm_Input('register_name', __('Name', 'wpsg'), $this->view['data']['name']); ?>
+ <?php echo wpsg_drawForm_Input('register_plz', __('PLZ', 'wpsg'), $this->view['data']['plz']); ?>
+ <?php echo wpsg_drawForm_Input('register_ort', __('Ort', 'wpsg'), $this->view['data']['ort']); ?>
+ <?php echo wpsg_drawForm_Input('register_strasse', __('Straße', 'wpsg'), $this->view['data']['strasse']); ?>
+ <?php echo wpsg_drawForm_Select('register_land', __('Land', 'wpsg'), $this->view['data']['lander'], $this->view['data']['land']); ?>
+ <?php echo wpsg_drawForm_Input('register_email', __('E-Mail', 'wpsg'), $this->view['data']['email']); ?>
+
+ <br />
+ <input id="submit" name="registerdata-submit" type="submit" class="button-primary" value="<?php echo __('Änderungen übermitteln', 'wpsg'); ?>" />
+
+ </form>
+ <?php } ?>
+
+ <?php if (isset($_REQUEST['subaction']) && $_REQUEST['subaction'] == 'domains') { ?>
+ <h2><?php echo __('Registrierte Domains', 'wpsg'); ?></h2>
+
+ <?php if (sizeof($this->view['data']['domains']) <= 0) { ?>
+ <p><?php echo __('Noch keine Domains registriert.', 'wpsg'); ?>
+ <?php } else { ?>
+ <b><?php echo __('Bereits auf diesen Key registrierte Domains', 'wpsg')?>:</b><br /><br />
+ <?php foreach ($this->view['data']['domains'] as $d) { ?>
+ <div class="wpsg_domainrow">
+ <?php echo wpsg_hspc($d['url']); ?>&nbsp;[<a href="<?php echo wpsg_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=remove&url='.rawurlencode($d['url'])); ?>"><?php echo __('Registrierung aufheben', 'wpsg'); ?></a>]
+ </div>
+ <?php } ?>
+ <?php } ?>
+
+ <br />
+ <?php if ($this->view['data']['registred'] === true) { ?>
+ <p class="wpsg_registersuccess"><?php echo __('Diese Domain ist bereits auf diesen Schlüssel registriert.', 'wpsg'); ?></p>
+ <?php } else { ?>
+
+ <p class="wpsg_registerfailure"><?php echo __('Diese Domain ist noch nicht auf diesen Schlüssel registriert.', 'wpsg'); ?></p>
+
+ <?php if (sizeof($this->view['data']['domains']) > 0 && $this->arLizenz['l'] != 3) { ?>
+ <p class="wpsg_registerfailure">
+ <?php echo __('Sie dürfen mit dieser Lizenz den Shop nur auf einer Domain laufen lassen. Löschen sie die bereits registrierte Domain und registrieren Sie diese Domain neu.', 'wpsg'); ?>
+ </p>
+ <?php } else { ?>
+ <br />
+ <form method="post" action="<?php echo wpsg_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=register'); ?>">
+ <input type="submit" value="<?php echo __('Diese Domain registrieren', 'wpsg'); ?>" class="button-primary" />
+ </form>
+ <?php } ?>
+
+ <?php } ?>
+ <?php } ?>
+
+ <?php if (isset($_REQUEST['subaction']) && $_REQUEST['subaction'] == 'module') { ?>
+ <h2><?php echo __('Weitere Module', 'wpsg'); ?></h2>
+
+ <p><?php echo wpsg_translate(__('Erweitern Sie Ihre wpShopGermany-Lizenz um weitere Funktionen, indem Sie <a href="#1#">weitere Module installieren</a> und ihrer bestehenden wpShopGermany-Lizenz hinzufügen.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module'); ?></p>
+
+ <br />
+ <form method="post" action="<?php echo wpsg_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=aktivateModul'); ?>">
+
+ <?php echo wpsg_drawForm_Input('wpsg_modulkey', __('Modulschlüssel', 'wpsg'), $this->get_option('wpsg_modulkey')); ?>
+
+ <br />
+ <input type="submit" value="<?php echo __('wpShopGermany Lizenz erweitern', 'wpsg'); ?>" class="button-primary" />
+
+ </form>
+
+ <?php } ?>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_core/module_index.phtml b/views/mods/mod_core/module_index.phtml
new file mode 100644
index 0000000..5518fea
--- /dev/null
+++ b/views/mods/mod_core/module_index.phtml
@@ -0,0 +1,78 @@
+<?php
+
+ /**
+ * Startseite der Module
+ */
+
+?>
+<div class="wpsg_admin_content">
+
+ <h3><?php echo __('Modulverwaltung', 'wpsg'); ?></h3>
+ <p><?php echo __('Aktivieren/Installieren Sie weitere Module oder halten Sie externe Module aktuell.', 'wpsg'); ?></p>
+
+ <div class="wpsg_admin_box">
+ <div class="head">
+ <div class="title">
+ <div class="fulltab">
+ <?php echo __('Hier sehen sie verfügbare externe Module', 'wpsg'); ?>
+ </div>
+ </div>
+ </div>
+ <div class="content">
+ <?php if (wpsg_isSizedArray($this->view['arOnlineModule'])) { ?>
+ <table class="wpsg_modultable">
+ <tr>
+ <th class="wpsg_col_name"><?php echo __('Modulname', 'wpsg'); ?></th>
+ <th class="wpsg_col_instversion"><?php echo __('installierte Version', 'wpsg'); ?></th>
+ <th class="wpsg_col_licence"><?php echo __('Lizenz', 'wpsg'); ?></th>
+ <th class="wpsg_col_availableversion"><?php echo __('verfügbare Version', 'wpsg'); ?></th>
+ </tr>
+ <?php foreach ($this->view['arOnlineModule'] as $modul) { ?>
+ <tr>
+ <td class="wpsg_col_name"><?php echo $modul['name']; ?></td>
+ <td class="wpsg_col_instversion">
+
+ <?php echo $modul['version_local']; ?>
+
+ </td>
+ <td class="wpsg_col_licence">
+
+ <?php if ($modul['free'] == '1') { ?>
+ <?php echo __('kostenlos', 'wpsg'); ?>
+ <?php } else { ?>
+
+ <?php if (@in_array($modul['key'], $this->arLizenz['mods'])) { ?>
+ <?php echo __('aktiv', 'wpsg'); ?>
+ <?php } else { ?>
+
+ <?php echo __('Demo', 'wpsg'); ?>
+
+ <?php } ?>
+
+ <?php } ?>
+
+ </td>
+ <td class="wpsg_col_availableversion">
+
+ <?php //wpsg_debug($modul); ?>
+ <?php if ($modul['version'] == $modul['version_local']) { ?>
+ <?php echo $modul['version']; ?> (aktuell)
+ <?php } else if (version_compare($modul['shop_version'], WPSG_VERSION) > 0) { ?>
+ <?php echo wpsg_translate(__('neue Version verfügbar (<a href="#1#">wpShopGermany Update</a> notwendig)', 'wpsg'), WPSG_URL_WP.'wp-admin/plugins.php'); ?>
+ <?php } else if (version_compare($modul['version'], $modul['version_local']) > 0) { ?>
+ <?php echo wpsg_translate(__('neue Version verfügbar: <a href="#1#">installiere #2#</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$modul['key'], $modul['version']); ?>
+ <?php } else { ?>
+ <?php echo $modul['version']; ?>
+ <?php } ?>
+
+ </td>
+ </tr>
+ <?php } ?>
+ </table>
+ <?php } else { ?>
+ <?php echo __('Module konnten aufgrund fehlender SOAP Unterstützung nicht geladen werden.', 'wpsg'); ?>
+ <?php } ?>
+ </div>
+ </div>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_crefopay/gfx/logo_100x25.png b/views/mods/mod_crefopay/gfx/logo_100x25.png
new file mode 100644
index 0000000..808b2ac
--- /dev/null
+++ b/views/mods/mod_crefopay/gfx/logo_100x25.png
Binary files differ
diff --git a/views/mods/mod_crefopay/gfx/logo_crefopay.gif b/views/mods/mod_crefopay/gfx/logo_crefopay.gif
new file mode 100644
index 0000000..c8cebd0
--- /dev/null
+++ b/views/mods/mod_crefopay/gfx/logo_crefopay.gif
Binary files differ
diff --git a/views/mods/mod_crefopay/iframe.phtml b/views/mods/mod_crefopay/iframe.phtml
new file mode 100644
index 0000000..7308299
--- /dev/null
+++ b/views/mods/mod_crefopay/iframe.phtml
@@ -0,0 +1,21 @@
+<?php
+
+ /**
+ * Template, welches die Zahlung über CrefoPay ermöglicht
+ */
+
+?>
+
+<?php echo $this->writeFrontendMessage(); ?>
+
+<?php if (wpsg_isSizedString($this->view['wpsg_mod_crefopay']['redirectURL'])) { ?>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_mod_crefopay_destroyFrame(url) { location.href = url; } // function wpsg_mod_crefopay_destroyFrame(url)
+
+ /* ]]> */</script>
+
+ <iframe id="wpsg_mod_crefopay_iframe" style="min-height:<?php echo ((wpsg_isSizedInt($this->get_option('wpsg_mod_crefopay_frameheight')))?$this->get_option('wpsg_mod_crefopay_frameheight'):1100); ?>px;" src="<?php echo $this->view['wpsg_mod_crefopay']['redirectURL']; ?>" scrolling="no" seamless="seamless"></iframe>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_crefopay/order_done.phtml b/views/mods/mod_crefopay/order_done.phtml
new file mode 100644
index 0000000..78943bc
--- /dev/null
+++ b/views/mods/mod_crefopay/order_done.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template, welches die Zahlung nach der Bestellung über CrefoPay ermöglicht
+ * Wird von warenkorb/done.phtml eingebunden
+ */
+
+?>
+<?php if (wpsg_isSizedString($this->view['wpsg_mod_crefopay']['redirectURL'])) { ?>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_mod_crefopay_destroyFrame(url) { location.href = url; } // function wpsg_mod_crefopay_destroyFrame(url)
+
+ /* ]]> */</script>
+
+ <iframe id="wpsg_mod_crefopay_iframe" style="min-height:<?php echo ((wpsg_isSizedInt($this->get_option('wpsg_mod_crefopay_frameheight')))?$this->get_option('wpsg_mod_crefopay_frameheight'):1100); ?>px;" src="<?php echo $this->view['wpsg_mod_crefopay']['redirectURL']; ?>" scrolling="no" seamless="seamless"></iframe>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_crefopay/order_view_afterpayment.phtml b/views/mods/mod_crefopay/order_view_afterpayment.phtml
new file mode 100644
index 0000000..c293b9a
--- /dev/null
+++ b/views/mods/mod_crefopay/order_view_afterpayment.phtml
@@ -0,0 +1,26 @@
+<?php
+
+ /**
+ * Template für die Integration der CrefoPay Zahlungsart in die Bestellverwaltung
+ */
+
+?>
+
+<?php if (wpsg_isSizedInt($this->view['oOrder']->getMeta('wpsg_mod_crefopay_status_time'))) { ?>
+ <?php echo wpsg_drawForm_Input('', __('Zahlungsstatus', 'wpsg'),$this->view['oOrder']->getMeta('wpsg_mod_crefopay_status').' ('.wpsg_formatTimestamp($this->view['oOrder']->getMeta('wpsg_mod_crefopay_status_time')).')', array('text' => true)); ?>
+ <br />
+<?php } ?>
+
+<div class="wpsg_mod_crefopay_order_sidebar">
+ <a class="button" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_crefopay&do=status&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Zahlungsstatus aktualisieren (GetStatus Call)', 'wpsg'); ?></a>
+ <a class="button" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_crefopay&do=cancel&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Zahlung abbrechen (Cancellation Call)', 'wpsg'); ?></a>
+
+ <?php if ($this->view['oOrder']->getMeta('wpsg_mod_crefopay_transactionType') == "RETAIL") { ?>
+ <a class="button" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_crefopay&do=capture&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Zahlung einziehen (Capture Call)', 'wpsg'); ?></a>
+ <?php } ?>
+
+ <a class="button" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_crefopay&do=refund&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Zahlung rückerstatten (Refund Call)', 'wpsg'); ?></a>
+ <a class="button" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_crefopay&do=finish&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Zahlung abschließen (Finish Transaction Call)', 'wpsg'); ?></a>
+
+ <div class="wpsg_clear"></div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_crefopay/settings_edit.phtml b/views/mods/mod_crefopay/settings_edit.phtml
new file mode 100644
index 0000000..39bc4a2
--- /dev/null
+++ b/views/mods/mod_crefopay/settings_edit.phtml
@@ -0,0 +1,69 @@
+<?php
+
+ /**
+ * Einstellungen für das Modul "CrefoPay"
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_crefopay_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_crefopay_sandbox'), array('help' => 'wpsg_mod_crefopay_sandbox')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_crefopay_merchantID', __('Merchant ID', 'wpsg'), $this->get_option('wpsg_mod_crefopay_merchantID'), array('help' => 'wpsg_mod_crefopay_merchantID')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_crefopay_shopID', __('Shop ID', 'wpsg'), $this->get_option('wpsg_mod_crefopay_shopID'), array('help' => 'wpsg_mod_crefopay_shopID')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_crefopay_privateKey', __('Privater Schlüssel', 'wpsg'), $this->get_option('wpsg_mod_crefopay_privateKey'), array('help' => 'wpsg_mod_crefopay_privateKey')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_crefopay_autocapture', __('Autocapture (Nur fullcapture möglich / DIRECT)', 'wpsg'), $this->get_option('wpsg_mod_crefopay_autocapture'), array('help' => 'wpsg_mod_crefopay_autocapture')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_crefopay_capturestatus', __('Bestellstatus für CAPTURE (Nur RETAIL)', 'wpsg'), $this->arStatus, $this->get_option('wpsg_mod_crefopay_capturestatus'), array('help' => 'wpsg_mod_crefopay_capturestatus')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_crefopay_riskclass', __('Risiko Klasse', 'wpsg'), array(
+ '0' => __('Gering', 'wpsg'), // trusted transaction
+ '1' => __('Normal', 'wpsg'), // default risk transaction
+ '2' => __('Stark', 'wpsg') // high risk transaction
+), $this->get_option('wpsg_mod_crefopay_riskclass'), array('help' => 'wpsg_mod_crefopay_riskclass')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_crefopay_currency', __('Währungscode (Standard: EUR)', 'wpsg'), $this->get_option('wpsg_mod_crefopay_currency')); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_crefopay_frameheight', __('Höhe des IFrames in px', 'wpsg'), $this->get_option('wpsg_mod_crefopay_frameheight'), array('help' => 'wpsg_mod_crefopay_frameheight')); ?>
+
+<div class="wpsg_form_field ">
+ <div class="wpsg_form_left">
+ <label for=""><?php echo __('MNS Statuswechsel', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <a href="#" class="wpsg_mod_crefopay_switchstatemapping" onclick="return wpsg_mod_crefopay_mnsstatemapping();"><?php echo __('Bearbeiten', 'wpsg'); ?></a>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+<div class="wpsg_mod_crefopay_mnsstatemapping">
+ <?php foreach ($this->view['transactionMapping'] as $crefopay_status => $wpsg_status) { ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_crefopay_statemapping_'.$crefopay_status, __($wpsg_status[1], 'wpsg'), wpsg_array_merge(array('-1' => __('Kein Wechsel', 'wpsg')), $this->arStatus), $this->get_option('wpsg_mod_crefopay_statemapping_'.$crefopay_status)); ?>
+ <?php } ?>
+ <br />
+</div>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_crefopay_mns_notice', __('Kunden über Statuswechsel informieren', 'wpsg'), $this->get_option('wpsg_mod_crefopay_mns_notice'), array('labelright' => true)); ?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_mod_crefopay_switchstatemapping').bind('click', function() {
+
+ jQuery('.wpsg_mod_crefopay_mnsstatemapping').toggle();
+
+ if (jQuery('.wpsg_mod_crefopay_mnsstatemapping').is(':visible')) jQuery(this).html('<?php echo __('Ausblenden', 'wpsg'); ?>');
+ else jQuery(this).html('<?php echo __('Bearbeiten', 'wpsg'); ?>');
+
+ return false;
+
+ } );
+
+ } );
+
+/* ]]> */</script>
+
+<br />
+
+<?php echo wpsg_drawForm_Input('', __('Redirect URL', 'wpsg'), $this->view['url']['redirect_url'], array('readonly' => true, 'nohspc' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('Warenkorb URL', 'wpsg'), $this->view['url']['basket_url'], array('readonly' => true, 'nohspc' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('AGB URL', 'wpsg'), $this->view['url']['agb_url'], array('readonly' => true, 'nohspc' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('MNS URL', 'wpsg'), $this->view['url']['mns_url'], array('readonly' => true, 'nohspc' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('Jump URL', 'wpsg'), $this->view['url']['jump_url'], array('readonly' => true, 'nohspc' => true)); ?> \ No newline at end of file
diff --git a/views/mods/mod_customerbudget/customer_sidebar.phtml b/views/mods/mod_customerbudget/customer_sidebar.phtml
new file mode 100644
index 0000000..b2ef044
--- /dev/null
+++ b/views/mods/mod_customerbudget/customer_sidebar.phtml
@@ -0,0 +1,16 @@
+<?php
+
+ /**
+ * Template für die Budgeterfassung innerhalb der Kundenverwaltung
+ */
+
+?>
+<div id="wpsg_customercustomerbudget" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></span>
+ <span><?php echo __('Kundenbudget', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Input('wpsg_mod_customerbudget_budget', __('Budget', 'wpsg'), $this->view['mod_customerbudget']['budget']); ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_customerbudget/settings_edit.phtml b/views/mods/mod_customerbudget/settings_edit.phtml
new file mode 100644
index 0000000..966faac
--- /dev/null
+++ b/views/mods/mod_customerbudget/settings_edit.phtml
@@ -0,0 +1,9 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Kundenbudget Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_customerbudget_name', __('Bezeichnung der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_customerbudget_name'), array('help' => 'wpsg_mod_customerbudget_name')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_customerbudget_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_customerbudget_hint'), array('help' => 'wpsg_mod_customerbudget_hint')); ?> \ No newline at end of file
diff --git a/views/mods/mod_customergroup/addedit.phtml b/views/mods/mod_customergroup/addedit.phtml
new file mode 100644
index 0000000..1ac02e7
--- /dev/null
+++ b/views/mods/mod_customergroup/addedit.phtml
@@ -0,0 +1,165 @@
+<?php
+
+ /**
+ * Template für das Anlegen und Bearbeiten einer Kundengruppe im Backend
+ */
+
+?>
+<div class="wrap wpsg_mod_kundenverwaltung_customergroup_addedit wpsg_customergroup_view wpsg_produkt_addedit wrap columns-2">
+ <div class="icon32 icon32-posts-post" id="icon-add"><br /></div>
+
+ <h2>
+ <?php if ($this->view['mode'] == 'edit') { ?>
+ <?php echo __('Kundengruppe bearbeiten', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo __('Kundengruppe anlegen', 'wpsg'); ?>
+ <?php } ?>
+ </h2>
+ <br />
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=save&noheader=1" enctype="multipart/form-data">
+
+ <?php if ($this->view['mode'] == 'edit') { ?>
+ <input type="hidden" name="edit_id" value="<?php echo $this->view['data']->id; ?>" />
+ <?php } ?>
+
+ <div id="postbox" class="metabox-holder has-right-sidebar">
+
+ <div id="side-info-column" class="inner-sidebar" style="width:386px;">
+
+ <div id="side-sortables" class="meta-box-sortables ui-sortable" style="width:380px;">
+
+ <?php $this->callMods('customergroup_edit', array(&$this->view['data'])); ?>
+
+ </div>
+
+ </div>
+
+ <div id="post-body">
+
+ <div id="normal-sortables" class="meta-box-sortables" style="margin-right:400px;">
+
+ <div id="wpsg_customergroup_general" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Allgemein', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung[name]', __('Name', 'wpsg'), $this->view['data']->name); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung[calculation]', __('Preisangaben im Shop (Frontend)', 'wpsg'), array(
+ -1 => __('Standard', 'wpsg'),
+ WPSG_BRUTTO => __('Brutto (inkl. Steuer)', 'wpsg'),
+ WPSG_NETTO => __('Netto (zzgl. Steuer)', 'wpsg')
+ ), $this->view['data']->calculation); ?>
+
+ </div>
+ </div>
+
+ </div>
+
+ <p class="submit">
+ <input type="submit" value="<?php echo __('Kundengruppe speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
+ <input type="submit" value="<?php echo __('Kundengruppe speichern und zur Übersicht', 'wpsg'); ?>" class="button-primary" id="submit_index" name="submit_index" />
+ </p>
+
+ </div>
+
+ </div>
+
+ </form>
+
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready( function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ jQuery("#normal-sortables, #side-sortables").sortable({
+ connectWith: ".meta-box-sortables",
+ placeholder: 'wpsg_placeholder',
+ dropOnEmpty: true,
+ cursor: 'move',
+ handle: '.wpsg_handlediv',
+ grid: [50, 20],
+ forceHelperSize: true,
+ forcePlaceholderSize: true,
+ opacity: 0.8,
+ stop: function(e,ui) {
+
+ var ser = jQuery("#normal-sortables").sortable("serialize");
+ ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
+
+ jQuery.cookie('wpsg_customergroup_view_normal', ser);
+
+ var ser = jQuery("#side-sortables").sortable("serialize");
+ ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
+
+ jQuery.cookie('wpsg_customergroup_view_side', ser);
+
+ },
+ receive: function(e, ui) {
+ }
+ });
+
+ if (jQuery.cookie('wpsg_customergroup_view_normal') != null)
+ {
+
+ var divs = jQuery.cookie('wpsg_customergroup_view_normal').split(',').reverse();
+
+ for (index in divs)
+ {
+
+ jQuery('#normal-sortables').prepend(jQuery('#wpsg_' + divs[index]));
+
+ }
+
+ }
+
+ if (jQuery.cookie('wpsg_customergroup_view_side') != null)
+ {
+
+ var divs = jQuery.cookie('wpsg_customergroup_view_side').split(',').reverse();
+
+ for (index in divs)
+ {
+
+ jQuery('#side-sortables').prepend(jQuery('#wpsg_' + divs[index]));
+
+ }
+
+ }
+
+ jQuery('.wpsg_handlediv').bind('click', function() {
+ jQuery(this).next().toggle();
+
+ var arClose = new Array();
+ jQuery('.wpsg_customergroup_view .postbox .inside:hidden').each(function() {
+ arClose.push(jQuery(this).parent().attr("id"));
+ } );
+
+ jQuery.cookie('wpsg_customergroup_closed', arClose.join(','));
+
+ } );
+
+ if (jQuery.cookie('wpsg_customergroup_closed') != null)
+ {
+
+ var arClose = jQuery.cookie('wpsg_customergroup_closed').split(',');
+
+ for (index in arClose)
+ {
+
+ jQuery('#' + arClose[index] + ' .inside').hide();
+
+ }
+
+ }
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_customergroup/index.phtml b/views/mods/mod_customergroup/index.phtml
new file mode 100644
index 0000000..8542227
--- /dev/null
+++ b/views/mods/mod_customergroup/index.phtml
@@ -0,0 +1,217 @@
+<?php
+
+ /**
+ * Template für die Kundengruppenübersicht im Backend
+ */
+
+?>
+<div class="wrap wpsg_mod_kundenverwaltung_customergroup_index">
+
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
+
+ <h2>
+ <?php echo __('Kundengruppenverwaltung', 'wpsg'); ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=add" class="add-new-h2"><?php echo __("Hinzufügen", "wpsg"); ?></a>
+ </h2>
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <form method="POST" id="filter_form">
+
+ <?php if (sizeof($this->view['data']) > 0) { ?>
+ <p class="search-box">
+ <label for="post-search-input" class="screen-reader-text"><?php echo __('Kundengruppen suchen', 'wpsg'); ?>:</label>
+ <input type="text" value="<?php echo wpsg_hspc($_REQUEST['s']); ?>" name="filter[s]" id="post-search-input">
+ <input type="submit" value="<?php echo __('Kundengruppen suchen', 'wpsg'); ?>" class="button" id="search-submit" name="">
+ </p>
+ <?php } ?>
+
+ <div class="tablenav top">
+
+ <?php if (sizeof($this->view['data']) > 0) { ?>
+ <div class="tablenav-pages"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
+ <div class="tablenav-pages">
+ <span class="pagination-links">
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=1&s=<?php echo $_REQUEST['s'].'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">«</a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo ($this->view['seite'] - 1).'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">‹</a>
+ <span class="paging-input"><input type="text" size="1" value="<?php echo $this->view['seite']; ?>" id="seite" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo ($this->view['seite'] + 1).'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur nächsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">›</a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo $this->view['pages'].'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">»</a>
+ </span>
+ </div>
+
+ <script type="text/javascript">
+
+ jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
+
+ </script>
+
+ <br class="clear" />
+ </div>
+ <?php } ?>
+
+ </div>
+
+ <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo $this->view['filter']['order']; ?>" />
+ <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo $this->view['filter']['ascdesc']; ?>" />
+
+ <input style="display:none;" type="submit" name="suchen" value="" />
+
+ </form>
+
+ <?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
+ <table class="widefat post fixed">
+ <thead>
+ <tr>
+ <th class="manage-column col-id <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'id'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('id');">
+ <span><?php echo __("Id", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column col-name <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'name'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('name');">
+ <span><?php echo __("Name", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column col-calculation <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'calculation'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('name');">
+ <span><?php echo __("Preisanzeige", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column col-customercount <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'customercount'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('customercount');">
+ <span><?php echo __("Kunden", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php $i = 0; foreach ($this->view['data'] as $oCustomerGroup) { ?>
+ <tr class="<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="col-id">
+ <?php echo wpsg_hspc($oCustomerGroup->id); ?>
+ </td>
+ <td class="col-name">
+ <?php echo wpsg_hspc($oCustomerGroup->name); ?>
+ <div class="row-actions">
+ <span class="edit"><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=edit&edit_id=<?php echo $oCustomerGroup->id; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a></span>
+ |
+ <span class="edit"><a title="<?php echo __("Kunden dieser Kundengruppe anzeigen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&customergroup=<?php echo $oCustomerGroup->id; ?>"><?php echo __("Kunden anzeigen", "wpsg"); ?></a></span>
+ |
+ <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sicher, dass Sie diese Kundengruppe löschen wollen?", "wpsg"); ?>')) return false;" title="<?php echo __("Diesen Kunden löschen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=del&edit_id=<?php echo $oCustomerGroup->id; ?>&noheader=1"><?php echo __("Löschen", "wpsg"); ?></a></span>
+ </div>
+ </td>
+ <td class="col-calculation">
+ <?php if ($oCustomerGroup->calculation == WPSG_BRUTTO) { ?>
+ <?php echo __('Brutto Preise', 'wpsg'); ?>
+ <?php } else if ($oCustomerGroup->calculation == WPSG_NETTO) { ?>
+ <?php echo __('Netto Preise', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo __('Standard', 'wpsg'); ?>
+ <?php } ?>
+ </td>
+ <td class="col-customercount">
+ <?php echo wpsg_hspc($oCustomerGroup->customercount); ?>
+ </td>
+ </tr>
+ <?php $i ++; } ?>
+ </tbody>
+ <tfoot>
+ <tr>
+ <th class="manage-column col-id <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'id'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('id');">
+ <span><?php echo __("Id", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column col-name <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'name'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('name');">
+ <span><?php echo __("Name", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column col-calculation <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'calculation'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('name');">
+ <span><?php echo __("Preisanzeige", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column col-customercount <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'customercount'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('customercount');">
+ <span><?php echo __("Kunden", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </tfoot>
+ </table>
+ <?php } ?>
+
+ <div class="tablenav">
+
+ <?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
+
+ <div class="tablenav-pages"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
+ <div class="tablenav-pages">
+ <span class="pagination-links">
+ <form method="POST">
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=1&s=<?php echo $_REQUEST['s'].'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">«</a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo ($this->view['seite'] - 1).'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">‹</a>
+ <span class="paging-input"><input type="text" size="1" value="<?php echo $this->view['seite']; ?>" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo ($this->view['seite'] + 1).'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur nächsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">›</a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo $this->view['pages'].'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">»</a>
+ </form>
+ </span>
+ </div>
+
+ <script type="text/javascript">
+
+ jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
+
+ </script>
+
+ <br class="clear">
+ </div>
+
+ <?php } ?>
+
+ </div>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ var wpsg_order = '<?php echo $this->view['filter']['order']; ?>';
+ var wpsg_ascdesc = '<?php echo $this->view['filter']['ascdesc']; ?>';
+
+ function wpsg_setOrder(order)
+ {
+
+ if (order == wpsg_order)
+ {
+
+ // Nur Richtung ändern
+ if (wpsg_ascdesc == 'asc') jQuery('#wpsg_ascdesc').val('desc');
+ else jQuery('#wpsg_ascdesc').val('asc');
+
+ }
+ else
+ {
+
+ jQuery('#wpsg_order').val(order);
+ jQuery('#wpsg_ascdesc').val('asc');
+
+ }
+
+ jQuery('#seite').val(1);
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ } // function wpsg_setOrder(order)
+
+ /* ]]> */</script>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_customergroup/settings_edit.phtml b/views/mods/mod_customergroup/settings_edit.phtml
new file mode 100644
index 0000000..ae69c5c
--- /dev/null
+++ b/views/mods/mod_customergroup/settings_edit.phtml
@@ -0,0 +1,9 @@
+<?php
+
+ /**
+ * Einstellungen für das Modul "Kundengruppen"
+ */
+
+?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_group_checkout', __('Kundengruppe bei Registrierung (Checkout)', 'wpsg'), $this->view['arCustomergroup'], $this->get_option('wpsg_page_mod_kundenverwaltung_group_checkout'), array('help' => 'wpsg_page_mod_kundenverwaltung_group_checkout')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_group_register', __('Kundengruppe bei Registrierung (Registrierung)', 'wpsg'), $this->view['arCustomergroup'], $this->get_option('wpsg_page_mod_kundenverwaltung_group_register'), array('help' => 'wpsg_page_mod_kundenverwaltung_group_register')); ?>
diff --git a/views/mods/mod_debitpayment/settings_edit.phtml b/views/mods/mod_debitpayment/settings_edit.phtml
new file mode 100644
index 0000000..65af1bc
--- /dev/null
+++ b/views/mods/mod_debitpayment/settings_edit.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Template für die Zahlungsart "Nachnahme"
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_debitpayment_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_debitpayment_name'), array('help' => 'wpsg_mod_debitpayment_name')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_debitpayment_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_debitpayment_aktiv'), array('help' => 'wpsg_mod_debitpayment_aktiv')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_debitpayment_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_debitpayment_hint'), array('help' => 'wpsg_mod_debitpayment_hint')); ?>
+
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_debitpayment_rabgeb', __('Rabatt/Gebühr', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_debitpayment_rabgeb'), true), array('help' => 'wpsg_mod_debitpayment_rabgeb', 'unit' => $this->get_option('wpsg_currency').' / %')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_debitpayment_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_debitpayment_mwst'), array('help' => 'wpsg_mod_debitpayment_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_debitpayment_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_debitpayment_mwstland'), array('help' => 'wpsg_mod_debitpayment_mwstland')); ?> \ No newline at end of file
diff --git a/views/mods/mod_deliverynote/deliverymail.phtml b/views/mods/mod_deliverynote/deliverymail.phtml
new file mode 100644
index 0000000..b3e1132
--- /dev/null
+++ b/views/mods/mod_deliverynote/deliverymail.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template für die Mail an den Kunden
+ */
+
+?><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['customer']['vname']; ?> <?php echo $this->view['customer']['name']; ?>,
+
+<?php echo wpsg_translate(__("Sie erhalten hiermit den Lieferschein mit der Nummer #1# für folgende Produkte.", "wpsg"), $this->view['dn']->lnr); ?>
+
+<?php foreach ($this->view['dn']->getProducts() as $p) { ?>
+- <?php echo $p['name']; ?>
+<?php } ?>
+
+<?php echo wpsg_translate(__('Das Lieferdatum ist der #1#', 'wpsg'), wpsg_formatTimestamp($this->view['dn']->getDeliveryTimestamp(), true)); ?>
+
+<?php echo __("Mit freundlichen Grüßen", "wpsg"); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_deliverynote/deliverymail_html.phtml b/views/mods/mod_deliverynote/deliverymail_html.phtml
new file mode 100644
index 0000000..99573f8
--- /dev/null
+++ b/views/mods/mod_deliverynote/deliverymail_html.phtml
@@ -0,0 +1,21 @@
+<?php
+
+ /**
+ * Template für die Mail an den Kunden (HTML)
+ */
+
+?><p><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['customer']['vname']; ?> <?php echo $this->view['customer']['name']; ?>,</p>
+
+<p><?php echo wpsg_translate(__("Sie erhalten hiermit den Lieferschein mit der Nummer #1# für folgende Produkte.", "wpsg"), $this->view['dn']->lnr); ?></p>
+
+<ul>
+<?php foreach ($this->view['dn']->getProducts() as $p) { ?>
+<li><?php echo $p['name']; ?></li>
+<?php } ?>
+</ul>
+
+<p><?php echo wpsg_translate(__('Das Lieferdatum ist der #1#', 'wpsg'), wpsg_formatTimestamp($this->view['dn']->getDeliveryTimestamp(), true)); ?></p>
+
+<p><?php echo __("Mit freundlichen Grüßen", "wpsg"); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_deliverynote/deliverynote_pdf.phtml b/views/mods/mod_deliverynote/deliverynote_pdf.phtml
new file mode 100644
index 0000000..17a613f
--- /dev/null
+++ b/views/mods/mod_deliverynote/deliverynote_pdf.phtml
@@ -0,0 +1,340 @@
+<?php
+
+ /**
+ * FPDF Template für die Generierung des Lieferscheins
+ */
+
+ require_once WPSG_PATH_LIB.'fpdf/fpdf.php';
+ require_once WPSG_PATH_LIB.'fpdf/fpdi.php';
+ require_once WPSG_PATH_LIB.'wpsg_fpdf.class.php';
+
+ global $absender_left, $absender_top, $adress_left, $adress_top, $dndata_left, $dndata_top;
+
+ if (!function_exists('AddDeliverynotePage'))
+ {
+
+ function AddDeliverynotePage($shop, $pdf)
+ {
+
+ global $absender_left, $absender_top, $adress_left, $adress_top, $dndata_left, $dndata_top;
+
+ $pdf->AddPage();
+
+ if (file_exists($shop->callMod('wpsg_mod_deliverynote', getFilePath, array(''))."wpsg_deliverynote_bp.pdf"))
+ {
+
+ $pagecount = $pdf->setSourceFile($shop->callMod('wpsg_mod_deliverynote', getFilePath, array(''))."wpsg_deliverynote_bp.pdf");
+ $tplidx = $pdf->importPage(1, '/MediaBox');
+ $pdf->useTemplate($tplidx, 0, 0, 210);
+
+ }
+ else if (file_exists($shop->callMod('wpsg_mod_deliverynote', getFilePath, array(''))."wpsg_deliverynote_bp.jpg"))
+ {
+
+ $pdf->image($shop->callMod('wpsg_mod_deliverynote', getFilePath, array(''))."wpsg_deliverynote_bp.jpg", 0, 0, 210, 297, 'jpg');
+
+ }
+
+
+ if (file_exists($shop->callMod('wpsg_mod_deliverynote', getFilePath, array(''))."wpsg_deliverynote_logo.jpg"))
+ {
+
+ list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_deliverynote', getFilePath, array(''))."wpsg_deliverynote_logo.jpg");
+
+ $wPix = (25.4 * $width) / 96;
+ $hPix = (25.4 * $height) / 96;
+
+ $pdf->image($shop->callMod('wpsg_mod_deliverynote', getFilePath, array(''))."wpsg_deliverynote_logo.jpg", 210 - $wPix, 0, $wPix, $hPix);
+
+ }
+
+ // Absenderadresszeile (Wird in der Konfiguration hinterlegt)
+ $pdf->SetFont('Arial', '', 6);
+ $pdf->Text($absender_left, $absender_top, $shop->replaceUniversalPlatzhalter($shop->get_option("wpsg_mod_deliverynote_adressrow"), $shop->view['order']['id']));
+
+ if ($shop->view['kunde']['kuerzel'] != "") $shop->view['kunde']['kuerzel'] = $shop->view['kunde']['kuerzel'].'-';
+
+ // Adresse des Kunden
+ $pdf->SetFont('Arial', '', 12);
+ $pdf->Text($adress_left, $adress_top, $shop->view['data']['firma']);
+ $pdf->Text($adress_left, $adress_top + 5, $shop->view['data']['vname'].' '.$shop->view['data']['name']);
+ $pdf->Text($adress_left, $adress_top + 10, $shop->view['data']['strasse'].' '.$shop->view['data']['hausnr']);
+ $pdf->Text($adress_left, $adress_top + 15, $shop->view['data']['plz'].' '.$shop->view['data']['ort']);
+ if ($shop->get_option('wpsg_mod_deliverynote_hideCountry') != '1') $pdf->Text($adress_left, $adress_top + 20, strtoupper($shop->view['oOrder']->getShippingCountryName()));
+
+ // Lieferscheindaten
+ $pdf->SetFont('Arial', 'B', 16);
+ $pdf->Text($dndata_left, $dndata_top, $shop->view['title']);
+ $pdf->SetFont('Arial', 'B', 9);
+ $pdf->Text($dndata_left, $dndata_top + 6, $shop->view['lnr']);
+ $pdf->SetFont('Arial', '', 9);
+
+ $pdf->Text($rdata_left + 100, $dndata_top, __("Kunden-Nr", "wpsg"));
+ $pdf->Text($rdata_left + 100, $dndata_top + 6, (($shop->view['customer']['knr'] != '')?$shop->view['customer']['knr']:$shop->view['customer']['id']));
+
+ $pdf->Text($rdata_left + 125, $dndata_top, __("Best. Nr.", "wpsg"));
+ $pdf->Text($rdata_left + 125, $dndata_top + 6, ((trim($shop->view['order']['onr']) != '')?$shop->view['order']['onr']:$shop->view['order']['id']));
+
+ $pdf->Text($rdata_left + 145, $dndata_top, __("Bestelldatum", "wpsg"));
+ $pdf->Text($rdata_left + 145, $dndata_top + 6, wpsg_formatTimestamp(strtotime($shop->view['order']['cdate']), true));
+
+ $pdf->Text($rdata_left + 170, $dndata_top, __("Lieferdatum", "wpsg"));
+ $pdf->Text($rdata_left + 170, $dndata_top + 6, wpsg_formatTimestamp($shop->view['lDatum'], true));
+
+ if ($shop->view['oOrder']->isInnerEu())
+ {
+
+ $pdf->SetFont('Arial', '', 9);
+ $pdf->Text($adress_left, $dndata_top + 11.5, __("Innergemeinschaftliche Lieferung.", "wpsg"));
+
+ }
+
+ // Benutzerdefinierte Felder
+ $arTexte = $shop->callMod('wpsg_mod_deliverynote', 'getTexte', array($shop->view['data']['id']));
+
+ foreach ((array)$arTexte as $text)
+ {
+
+ if (isset($text['aktiv']) && $text['aktiv'] == 1)
+ {
+
+ $pdf->SetFont('Arial', 'B', ((intval($text['fontsize']) > 0)?intval($text['fontsize']):10));
+ $pdf->SetTextColor($text['color']);
+ $pdf->MultiCell($text['x'], $text['y'], 5, utf8_encode($text['text']));
+ $pdf->SetTextColor("#000000");
+
+ }
+
+ }
+
+ }
+
+ }
+
+ // Positionierung der Absenderadresszeile
+ $absender_left = 25;
+ $absender_top = 50;
+
+ // Positionierung der Zieladress
+ $adress_left = 25;
+ $adress_top = 55;
+
+ // Positionierund des Lieferscheinkopfes
+ $dndata_left = 25;
+ $dndata_top = 90;
+
+ // Positionierung der Produktdaten
+ $prod_left = 25;
+ $prod_top = 105;
+
+ // Anzahl an Produkten pro Seite
+ $prod_break = 10;
+
+ $pdf = new wpsg_fpdf();
+ $pdf->SetAutoPageBreak(true, 5);
+ AddDeliverynotePage($this, $pdf);
+
+ $filename = $this->view['filename'].".pdf";
+
+ $bKopf = false; $pnr = 1; $offset = 0; $count = 0;
+ foreach ($this->view['data']['products'] as $p)
+ {
+
+ $product_data = $this->loadProduktArray($this->getProduktID($p['p_id']));
+
+ if (!$bKopf)
+ {
+
+ $pdf->SetFont('Arial', 'B', 9);
+ $pdf->setXY($prod_left, $prod_top);
+ $pdf->Cell(10, 8, __("Nr.", "wpsg"), 1, 0, 'C');
+
+ $pdf->setXY($prod_left + 10, $prod_top);
+ $pdf->Cell(137, 8, "Name", 1, 0, 'L');
+
+ $pdf->setXY($prod_left + 147, $prod_top);
+ $pdf->Cell(15, 8, __("Menge", "wpsg"), 1, 0, 'C');
+
+ $offset = 8;
+ $bKopf = true;
+
+ }
+
+ /*
+ if ($this->hasMod('wpsg_mod_varianten') && isset($p['mod_vp_varkey']))
+ {
+
+ $variante = $this->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($p['mod_vp_varkey']));
+ $anr = $variante['akey'];
+
+ }
+ else
+ {
+
+ $anr = $product_data['anr'];
+
+ }*/
+
+ $pdf->SetFont('Arial', '', 9);
+ $pdf->setXY($prod_left, $prod_top + $offset);
+
+ if ($this->get_option('wpsg_mod_deliverynote_anr') === '1')
+ {
+
+ $anr = $this->getProductAnr($p['productkey']);
+ $pdf->Cell(10, 8, $anr, 0, 0, 'C'); /* Artikelnummer anzeigen */
+
+ }
+ else
+ {
+
+ $pdf->Cell(10, 8, $pnr.".", 0, 0, 'C');
+
+ }
+
+ $produkt_text = $this->getProductName($this->getProduktID($p['p_id']), true);
+ $produktBeschreibung = trim(strip_tags($p['beschreibung']));
+
+ if ($this->isOtherLang())
+ {
+
+ $trans_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($this->getProduktID($p['productkey']))."' AND `lang_locale` = '".wpsg_q(get_locale())."'");
+
+ if (is_array($trans_db) && sizeof($trans_db) > 0)
+ {
+
+ $produkt_text = $trans_db['name'];
+ $produktBeschreibung = trim(strip_tags($trans_db['beschreibung']));
+
+ }
+
+ }
+
+ $height = 0; // Höhe der Zeile für den Rahmen
+
+ $pdf->setXY($prod_left + 10, $prod_top + $offset);
+
+ // Produktvariablen
+ if ($this->hasMod('wpsg_mod_productvars') && $this->get_option("wpsg_mod_rechnungen_showpv") == "1")
+ {
+
+ $arPV = $this->callMod('wpsg_mod_productvars', 'getAllProductVarValues', array($this->view['data']['id'], $p['productkey']));
+
+ if (wpsg_isSizedArray($arPV))
+ {
+
+ foreach ($arPV as $pv)
+ {
+
+ $produkt_text .= "\r\n".$pv['name'].': '.$pv['value'];
+ $height += 5;
+
+ }
+
+ }
+
+ }
+
+ if ($this->get_option('wpsg_mod_deliverynote_anr') === '2')
+ {
+
+ $anr = $this->getProductAnr($p['productkey']);
+ $produkt_text .= "\r\n".wpsg_translate(__('Artikelnummer: #1#', 'wpsg'), $anr);
+
+ }
+
+ $produkt_text_cell_width = 137;
+ $produkt_text_width = $pdf->GetStringWidth($produkt_text);
+
+ $height += 5 * ceil($produkt_text_width / $produkt_text_cell_width) + 3;
+
+ $height_y = $pdf->getY();
+ $height = 2 + $pdf->MultiCell($prod_left + 10, $prod_top + $offset + 1.5, 5, utf8_encode($produkt_text), 0, 'L', 0, $produkt_text_cell_width);
+
+ $pdf->setXY($prod_left + 147, $prod_top + $offset);
+ $pdf->Cell(15, 8, $p['menge'], 0, 0, 'C');
+
+ /**
+ * Produktbeschreibung anzeigen Ja/Nein
+ */
+ $pBeschreibungHeight = 0;
+ if ($this->get_option("wpsg_mod_deliverynote_pdf_beschreibung") == "1" && trim(strip_tags($p['beschreibung'])) != '')
+ {
+
+ $produktBeschreibung = nl2br($produktBeschreibung);
+ preg_match_all('/\<br \/\>/', $produktBeschreibung, $treffer);
+ $produktBeschreibung = strip_tags($produktBeschreibung);
+
+ $pBeschreibungWidth = $pdf->getStringWidth($produktBeschreibung);
+ $pBeschreibungHeight = 5 * (ceil($pBeschreibungWidth / $produkt_text_cell_width) + @sizeof($treffer[0]));
+
+ $pdf->SetFont('Arial', 'I', 9);
+
+ $cellY = $pdf->getY();
+ $pdf->MultiCell($prod_left + 10, $prod_top + $height + $offset - 1, 5, utf8_encode($produktBeschreibung), 0, 'L', 0, $produkt_text_cell_width);
+ $pBeschreibungHeight = $pdf->getY() - $cellY - $height + 1;
+ $pdf->SetFont('Arial', '', 9);
+
+ }
+
+ $height += $pBeschreibungHeight;
+
+ /**
+ * Variante ?
+ */
+ if ($this->get_option("wpsg_mod_deliverynote_pdf_varianten") == "1" && preg_match('/vp_(.*)/', $p['productkey']))
+ {
+
+ $variInfo = $this->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($p['productkey']));
+
+ $height += $pdf->MultiCell($prod_left + 10, $prod_top + $height + $offset - 1.5, 5, utf8_encode(wpsg_translate(__('Variante: #1#', 'wpsg'), $variInfo['key'])), 0, 'L', 0, $produkt_text_cell_width);
+
+ }
+
+ // Jetzt die Rahmen zeichnen
+ $pdf->Rect($prod_left, $prod_top + $offset, 10, $height);
+ $pdf->Rect($prod_left + 10, $prod_top + $offset, 137, $height);
+ $pdf->Rect($prod_left + 147, $prod_top + $offset, 15, $height);
+
+ $offset += $height;
+
+ $pnr ++;
+ $count ++;
+
+ $summe += $p['price'] * $p['menge'];
+
+ if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($this->view['data']['products']) > ($pnr - 1)))
+ {
+
+ AddDeliverynotePage($this, $pdf);
+ $bKopf = false; $offset = 0; $count = 0;
+
+ }
+
+ }
+
+ $offset += 5;
+
+ if ($this->view['fussText'] != "")
+ {
+
+ $pdf->MultiCell($prod_left - 1, $prod_top + $offset, 5, utf8_encode($this->view['fussText']));
+ $pdf->SetFont('Arial', 'B', 9);
+ $offset += 10;
+
+ }
+
+ if ($this->view['preview'])
+ {
+ $pdf->Output($this->view['filename'], 'I');
+ }
+ else
+ {
+
+ $pdf->Output($this->callMod('wpsg_mod_deliverynote', 'getFilePath', array($this->view['order']['id'])).$this->view['filename'], 'F');
+
+ if ($this->view['output'] === true) $pdf->Output($filename, 'I');
+
+ }
+
+?> \ No newline at end of file
diff --git a/views/mods/mod_deliverynote/foottext_list.phtml b/views/mods/mod_deliverynote/foottext_list.phtml
new file mode 100644
index 0000000..8845aab
--- /dev/null
+++ b/views/mods/mod_deliverynote/foottext_list.phtml
@@ -0,0 +1,61 @@
+<?php
+
+ /**
+ * Template für die Liste der Fußtexte
+ */
+
+?>
+<?php if (sizeof($this->view['wpsg_mod_deliverynote']['data']) <= 0) { ?>
+<p><?php echo __('Bisher keine Fußtexte angelegt!', 'wpsg'); ?></p>
+<?php } else { ?>
+<table class="wpsg_foottextlist">
+ <tr>
+ <th class="col_kuerzel"><?php echo __('Kürzel', 'wpsg'); ?></th>
+ <th class="col_text"><?php echo __('Text', 'wpsg'); ?></th>
+ <th class="col_standard"><?php echo __('Standard', 'wpsg'); ?></th>
+ <th class="col_aktion"></th>
+ </tr>
+ <?php foreach ((array)$this->view['wpsg_mod_deliverynote']['data'] as $key => $d) { ?>
+ <tr>
+ <td class="col_kuerzel wpsg_editable" id="wpsg_foottext_0_<?php echo $key; ?>"><?php echo wpsg_hspc($d[0]); ?></td>
+ <td class="col_text wpsg_editable" id="wpsg_foottext_1_<?php echo $key; ?>"><?php echo wpsg_hspc($d[1]); ?></td>
+ <td class="col_standard"><input type="radio" value="<?php echo $key; ?>" <?php echo (($this->get_option('wpsg_mod_deliverynote_foottext_standard') == $key)?'checked="checked"':''); ?> class="wpsg_mod_deliverynote_foottext_standard" name="wpsg_mod_deliverynote_foottext_standard" /></td>
+ <td class="col_aktion">
+
+ <a onclick="return wpsg_removeFooter(<?php echo $key; ?>);" title="<?php echo __('Fußtext löschen', 'wpsg'); ?>'" href="#" class="wpsg_icon wpsg_icon_center wpsg_icon_remove"></a>
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_foottext_0_<?php echo $key; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverynote&do=inlineEdit&noheader=1', {
+ submitdata: {
+ field: '0',
+ field_id: '<?php echo $key; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#wpsg_foottext_1_<?php echo $key; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverynote&do=inlineEdit&noheader=1', {
+ submitdata: {
+ field: '1',
+ field_id: '<?php echo $key; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ } );
+
+ </script>
+
+ </td>
+ </tr>
+ <?php } ?>
+</table>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_deliverynote/order_view_content.phtml b/views/mods/mod_deliverynote/order_view_content.phtml
new file mode 100644
index 0000000..0811d5c
--- /dev/null
+++ b/views/mods/mod_deliverynote/order_view_content.phtml
@@ -0,0 +1,150 @@
+<?php
+
+ /**
+ * Template für die Integration des Lieferscheins in die Bestellverwaltung
+ */
+
+?>
+<div class="postbox" id="wpsg_deliverynote">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Lieferschein', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+
+ <?php if (!wpsg_isSizedArray($this->view['wpsg_mod_deliverynote']['arDeliverynotes'])) { ?>
+ <p><?php echo __('Bisher wurden zu dieser Bestellung keine Lieferscheine erstellt.', 'wpsg'); ?></p>
+ <?php } else { ?>
+
+ <?php foreach ($this->view['wpsg_mod_deliverynote']['arDeliverynotes'] as $k => $v) { ?>
+ <?php echo wpsg_translate(__('##1# Lieferschein geschrieben am #2# (Lieferdatum: #3#)', 'wpsg'),
+ $v->lnr,
+ wpsg_formatTimestamp(strtotime($v->cdate), true),
+ wpsg_formatTimestamp($v->getDeliveryTimestamp(), true)
+ ); ?> <a target="_blank" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_deliverynote&do=get&edit_id=<?php echo $this->view['data']['id']; ?>&dn_id=<?php echo $v->id; ?>"><?php echo __('Ansehen', 'wpsg'); ?></a><br />
+ <?php } ?><br />
+
+ <?php } ?>
+
+ <?php if (wpsg_isSizedArray($this->view['wpsg_mod_deliverynote']['arNoDeliveredProducts'])) { ?>
+ <fieldset style="border:1px solid #999999; width:100%;">
+ <legend style="margin-left:10px; margin-right:10px;"><?php echo __('Neuer Lieferschein', 'wpsg'); ?></legend>
+
+ <form target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_deliverynote&cmd=deliverynote&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>">
+
+ <div style="padding:5px;">
+
+ <label style="height:25px; width:240px; float:left; margin-top:10px;">
+ <input onchange="if (this.checked) jQuery('#wpsg_mod_deliverynote_email').show(); else jQuery('#wpsg_mod_deliverynote_email').hide();" type="checkbox" checked="checked" value="1" name="wpsg_mod_deliverynote_showmail" />
+ &nbsp;<?php echo __("E-Mail an Kunden senden.", "wpsg"); ?>
+ </label>
+ <input type="text" style="display:block; width:300px; float:right;" id="wpsg_mod_deliverynote_email" name="wpsg_mod_deliverynote_email" value="<?php echo wpsg_hspc($this->view['data']['email']); ?>" />
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label style="height:25px; width:220px; float:left;">
+ <input checked="checked" onchange="if (this.checked) jQuery('#wpsg_mod_deliverynote_status').show(); else jQuery('#wpsg_mod_deliverynote_status').hide();" type="checkbox" value="1" name="wpsg_mod_deliverynote_setstatus" />
+ &nbsp;<?php echo __("Neuer Status:", "wpsg"); ?>
+ </label>
+ <select style="width:300px; float:right;" id="wpsg_mod_deliverynote_status" name="wpsg_mod_deliverynote_status">
+ <?php foreach ($this->arStatus as $k => $v) { ?>
+ <option value="<?php echo $k; ?>" <?php echo (($k == 250)?'selected="selected"':''); ?>><?php echo $v; ?></option>
+ <?php } ?>
+ </select>
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label style="height:25px; width:240px; float:left;">
+ <input <?php echo (($this->get_option("wpsg_mod_deliverynote_url_standard") === "1")?'checked="checked"':''); ?> type="checkbox" value="1" name="wpsg_mod_deliverynote_noticeurl" />
+ &nbsp;<?php echo __("URL Benachrichtigung", "wpsg"); ?>
+ </label>
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label style="height:25px; width:240px; float:left; padding-left:22px;">
+ <?php echo __("Lieferdatum", "wpsg"); ?>:
+ </label>
+ <input style="display:block;float:right; width:300px;" type="text" name="wpsg_mod_deliverynote_date" value="<?php echo date("d.m.Y", time()); ?>" />
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label for="wpsg_mod_deliverynote_foottext" style="height:25px; width:220px; padding-left:22px; float:left">
+ <?php echo __("Fußtext", "wpsg"); ?>
+ </label>
+
+ <?php
+
+ $wpsg_mod_deliverynote_footer = $this->get_option("wpsg_mod_deliverynote_footer");
+ if (!is_array($wpsg_mod_deliverynote_footer)) $wpsg_mod_deliverynote_footer = unserialize($this->get_option("wpsg_mod_deliverynote_footer"));
+ if (!is_array($wpsg_mod_deliverynote_footer)) $wpsg_mod_deliverynote_footer = Array();
+
+ ?>
+
+ <?php if (sizeof($wpsg_mod_deliverynote_footer) > 0) { ?>
+ <select style="width:300px; float:right;" name="wpsg_mod_deliverynote_select" id="wpsg_mod_deliverynote_select" onchange="jQuery('#wpsg_mod_deliverynote_fusstext').val(this.value);">
+ <?php foreach ($wpsg_mod_deliverynote_footer as $k => $v) { ?>
+ <option <?php echo (($this->get_option('wpsg_mod_deliverynote_foottext_standard') == $k)?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($v[1]); ?>"><?php echo wpsg_hspc($v[0]); ?></option>
+ <?php } ?>
+ </select>
+ <?php } ?>
+
+ <div style="clear:both; width:100%; height:5px;"></div>
+ <div style="padding-left:25px;"><input style="width:100%;" type="text" name="wpsg_mod_deliverynote_fusstext" id="wpsg_mod_deliverynote_fusstext" value="" /></div>
+ <div style="clear:both; width:100%; height:15px;"></div>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+ jQuery('#wpsg_mod_deliverynote_fusstext').val(jQuery("#wpsg_mod_deliverynote_select").val());
+ });
+
+ /* ]]> */</script>
+
+ <input type="hidden" id="wpsg_mod_deliverynote_productindexes" name="wpsg_mod_deliverynote_productindexes" />
+
+ <input class="button" style="float:right;" onclick="if (!wpsg_mod_deliverynote_checkProducts()) return false; window.setTimeout(function() { location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>'; }, 1000);" name="wpsg_mod_deliverynote_write" type="submit" value="<?php echo __("Lieferschein erstellen", "wpsg"); ?>" />
+ <input class="button" style="float:right; margin-right:10px;" onclick="if (!wpsg_mod_deliverynote_checkProducts()) return false;" name="wpsg_mod_deliverynote_preview" type="submit" value="<?php echo __("Vorschau", "wpsg"); ?>" />
+
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ </div>
+
+ </form>
+
+ </fieldset>
+ <?php } ?>
+
+ </div>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Prüft ob Produkte für den Lieferschein ausgewählt wurden
+ */
+ function wpsg_mod_deliverynote_checkProducts()
+ {
+
+ if (jQuery('.wpsg_mod_deliverynote_product:checked').length <= 0)
+ {
+
+ alert('<?php echo __('Bitte mindestens ein Produkt für den Lieferschein wählen', 'wpsg'); ?>');
+ return false;
+
+ }
+ else
+ {
+
+ var arProductKeys = Array();
+
+ jQuery('.wpsg_mod_deliverynote_product:checked').each(function() {
+
+ arProductKeys.push(jQuery(this).val());
+
+ } );
+
+ jQuery('#wpsg_mod_deliverynote_productindexes').val(arProductKeys.join(','));
+
+ }
+
+ return true;
+
+ } // function wpsg_mod_deliverynote_checkProducts()
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_deliverynote/order_view_row.phtml b/views/mods/mod_deliverynote/order_view_row.phtml
new file mode 100644
index 0000000..188349f
--- /dev/null
+++ b/views/mods/mod_deliverynote/order_view_row.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Template für die Produktauswahl innerhalb der Bestellansicht
+ */
+
+?>
+<tr class="wpsg_<?php echo (($this->view['wpsg_mod_deliverynote']['i'] == 0)?'odd':'even'); ?>">
+ <td align="left" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'5':'4'); ?>">
+ <label>
+ <input checked="checked" type="checkbox" class="wpsg_mod_deliverynote_product" name="wpsg_mod_deliverynote_products[]" value="<?php echo $this->view['wpsg_mod_deliverynote']['product']['product_index']; ?>" />
+ &nbsp;<?php echo __('In Lieferschein einbeziehen', 'wpsg'); ?>
+ </label>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_deliverynote/settings_edit.phtml b/views/mods/mod_deliverynote/settings_edit.phtml
new file mode 100644
index 0000000..a9a1bae
--- /dev/null
+++ b/views/mods/mod_deliverynote/settings_edit.phtml
@@ -0,0 +1,209 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des "Lieferschein" Moduls
+ */
+
+?>
+<br />
+<div class="wpsg_admin_box" id="wpsg_tab">
+ <div class="head">
+ <div class="title">
+ <div class="tab" id="tab1"><?php echo __('Vordefinierte Textfelder', 'wpsg'); ?></div>
+ <div class="tab" id="tab2"><?php echo __('Fußzeile', 'wpsg'); ?></div>
+ <div class="tab" id="tab3"><?php echo __('Sonstiges', 'wpsg'); ?></div>
+ <div class="tabcontent tablink">
+ <a href="" title="<?php echo __('Neues Feld für die Fußzeile hinzufügen', 'wpsg'); ?>" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addFooter();"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+ <div class="content">
+ <div id="tabcontent1" class="tabcontent">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_deliverynote_adressrow', __('Adresszeile', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_adressrow')); ?>
+ <div class="wpsg_hinweis"><?php echo __('Diese Zeile wird klein oberhalb der Kundenadresse platziert', 'wpsg'); ?></div>
+ <br />
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Briefpapier (PDF/JPG)', 'wpsg'); ?>:</label><br />
+ <?php if ($this->view['wpsg_mod_deliverynote']['bp'] !== false) { ?>
+ <label>
+ <input type="checkbox" name="wpsg_mod_deliverynote_bp_del" value="1" />&nbsp;<?php echo __('Löschen', 'wpsg'); ?>
+ </label>
+ <?php } ?>
+ </div>
+ <div class="wpsg_form_right">
+ <?php if ($this->view['wpsg_mod_deliverynote']['bp'] === false) { ?>
+ <p><?php echo __('Es wurde bisher kein Briefpapier hochgeladen', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <a href="<?php echo $this->view['wpsg_mod_deliverynote']['bp']; ?>" target="_blank"><?php echo __('Derzeitiges Briefpapier', 'wpsg'); ?></a>
+ <?php } ?>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_bp" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_bp"></a>
+ <input type="file" name="wpsg_mod_deliverynote_bp">
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Logo (JPG)', 'wpsg'); ?>:</label><br />
+ <?php if ($this->view['wpsg_mod_deliverynote']['logo'] !== false) { ?>
+ <label>
+ <input type="checkbox" name="wpsg_mod_deliverynote_logo_del" value="1" />&nbsp;<?php echo __('Löschen', 'wpsg'); ?>
+ </label>
+ <?php } ?>
+ </div>
+ <div class="wpsg_form_right">
+ <?php if ($this->view['wpsg_mod_deliverynote']['logo'] === false) { ?>
+ <p><?php echo __('Es wurde bisher kein Logo hochgeladen', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <a href="<?php echo $this->view['wpsg_mod_deliverynote']['logo']; ?>" target="_blank"><?php echo __('Derzeitiges Logo', 'wpsg'); ?></a>
+ <?php } ?>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_logo" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_logo"></a>
+ <input type="file" name="wpsg_mod_deliverynote_logo">
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <div class="wpsg_hinweis"><?php echo __('Das Briefpapier wird hinter die gesamte Seite gelegt, das Logo wird rechts oben auf jeder Seite platziert. (96 dpi)', 'wpsg'); ?></div>
+ <br />
+
+ <table class="wpsg_mod_deliverynote_fieldtable">
+ <tr>
+ <th class="col_bezeichnung"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
+ <th class="col_freitext"><?php echo __('Freitext', 'wpsg'); ?></th>
+ <th class="col_x"><?php echo __('X', 'wpsg'); ?></th>
+ <th class="col_y"><?php echo __('Y', 'wpsg'); ?></th>
+ <th class="col_color"><?php echo __('Farbe', 'wpsg'); ?></th>
+ <th class="col_groesse"><?php echo __('Größe', 'wpsg'); ?></th>
+ <th class="col_action"></th>
+ </tr>
+ <?php foreach ($this->view['wpsg_mod_deliverynote']['fields'] as $f => $field_name) { ?>
+ <tr>
+ <td><?php echo wpsg_hspc($field_name); ?></td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][text]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['text']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][x]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['x']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][y]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['y']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][color]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['color']); ?>" />
+ </td>
+ <td>
+ <select name="text[<?php echo $f; ?>][fontsize]" style="width:100%;">
+ <option <?php echo (($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize'] == "8")?'selected="selected"':''); ?> value="8">8</option>
+ <option <?php echo (($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize'] == "9")?'selected="selected"':''); ?> value="9">9</option>
+ <option <?php echo (($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize'] == "10")?'selected="selected"':''); ?> value="10">10</option>
+ <option <?php echo (($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize'] == "11")?'selected="selected"':''); ?> value="11">11</option>
+ <option <?php echo (($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize'] == "12")?'selected="selected"':''); ?> value="12">12</option>
+ <option <?php echo (($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize'] == "13")?'selected="selected"':''); ?> value="13">13</option>
+ <option <?php echo (($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize'] == "14")?'selected="selected"':''); ?> value="14">14</option>
+ </select>
+ </td>
+ <td>
+ <label><input type="checkbox" value="1" name="text[<?php echo $f; ?>][aktiv]" <?php echo ((wpsg_isSizedInt($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['aktiv']))?'checked="checked"':''); ?> />&nbsp;<?php echo __("Aktiv", "wpsg"); ?></label>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_fieldconfig" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_fieldconfig"></a>
+ </td>
+ </tr>
+ <?php } ?>
+ </table>
+
+ <br />
+
+ <input style="float:right;" class="button" onclick="if (!confirm('<?php echo __('Sind Sie sich sicher? Ihre bisherigen Einstellungen gehen verloren!', 'wpsg'); ?>')) return false; else location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module&amp;modul=<?php echo $_REQUEST['modul']; ?>&amp;do=reset&amp;noheader=1';" type="button" value="<?php echo __('Standardeinstellungen laden', 'wpsg'); ?>" />
+
+ <div class="wpsg_hinweis">
+ <?php echo __('Die Angaben für X (Abstand von Links) und Y (Abstand von Oben) werden in mm eingetragen.', 'wpsg'); ?><br />
+ <?php echo __('Die Farbe wird im Hexadezimalformat angegeben (#FFFFF für weiß, #000000 für schwarz).', 'wpsg'); ?>
+ </div>
+ <br />
+
+ </div>
+ <div id="tabcontent2" class="tabcontent">
+
+ <div id="foottext_list"><?php echo $this->view['foottext_list']; ?></div>
+ <br />
+
+ <div class="wpsg_hinweis">
+ <?php echo __('Hier können Sie Texte vordefinieren, die sie unter den Lieferschein setzen können.', 'wpsg'); ?>
+ </div>
+
+ </div>
+ <div id="tabcontent3" class="tabcontent">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_deliverynote_nrformat', __('Format der Lieferscheinnummer', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_nrformat'), array('help' => 'wpsg_mod_deliverynote_nrformat')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_deliverynote_nr', __('Start für Lieferscheinnummer', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_nr'), array('help' => 'wpsg_mod_deliverynote_nr')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_deliverynote_url', __('URL Für URL Benachrichtigung', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_url'), array('help' => 'wpsg_mod_deliverynote_url')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverynote_url_standard', __('URL Benachrichtigung standardmäßig aktiv', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_url_standard'), array('help' => 'wpsg_mod_deliverynote_url_standard')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverynote_hideCountry', __('Land auf Lieferschein verbergen', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_hideCountry'), array('help' => 'wpsg_mod_deliverynote_hideCountry')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_deliverynote_anr', __('Artikelnummer anzeigen', 'wpsg'), array(
+ '0' => __('Nicht anzeigen', 'wpsg'),
+ '1' => __('In Spalte "Nr." zeigen', 'wpsg'),
+ '2' => __('Als extra Zeile anzeigen', 'wpsg')
+ ), $this->get_option('wpsg_mod_deliverynote_anr'), array('help' => 'wpsg_mod_deliverynote_anr')); ?>
+
+ </div>
+ </div>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Wird beim anlegen einer neuen Fußzeile aufgerufen
+ */
+ function wpsg_addFooter()
+ {
+
+ jQuery('#foottext_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverynote&do=addFoottext&noheader=1',
+ success: function(data) {
+ jQuery('#foottext_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addFooter()
+
+ /**
+ * Wird beim entfernen einer Fußzeile aufgerufen
+ */
+ function wpsg_removeFooter(foot_id)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Fußzeile löschen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery('#foottext_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverynote&do=removeFoottext&noheader=1',
+ data: {
+ foot_id: foot_id
+ },
+ success: function(data) {
+ jQuery('#foottext_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_removeFooter()
+
+ jQuery(document).ready(function() {
+ jQuery('#wpsg_tab').wpsg_tab( {
+ 'cookiename': 'wpsg_mod_deliverynote_tab',
+ 'tab2': function() {
+ jQuery('.tablink').show();
+ }
+ } );
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_deliverytime/basket_row.phtml b/views/mods/mod_deliverytime/basket_row.phtml
new file mode 100644
index 0000000..1bbbdea
--- /dev/null
+++ b/views/mods/mod_deliverytime/basket_row.phtml
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Template für die Integration der Lieferzeit in den Warenkorb
+ */
+
+?>
+<tr class="wpsg_<?php echo (($this->view['i'] % 2 == 0)?'odd':'even'); ?>">
+ <td colspan="1"><?php echo __('Lieferzeit', 'wpsg'); ?>:</td>
+ <td colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'3':'2'); ?>" class="wpsg_cell_deliverytime_value" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
+ <?php echo $this->view['wpsg_mod_deliverytime']['deliverytime']; ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_deliverytime/mail_row.phtml b/views/mods/mod_deliverytime/mail_row.phtml
new file mode 100644
index 0000000..ff8bbcc
--- /dev/null
+++ b/views/mods/mod_deliverytime/mail_row.phtml
@@ -0,0 +1,7 @@
+<?php
+
+ /**
+ * Template für die Integration in order.phtml (Kundenmail, Adminmail, Auftragsbestätigung ...)
+ */
+
+?><?php echo wpsg_pad_right(' ', 5); ?><?php echo __('Lieferzeit', 'wpsg'); ?>: <?php echo $this->view['wpsg_mod_deliverytime']['deliverytime']; ?>
diff --git a/views/mods/mod_deliverytime/mail_row_html.phtml b/views/mods/mod_deliverytime/mail_row_html.phtml
new file mode 100644
index 0000000..d893b35
--- /dev/null
+++ b/views/mods/mod_deliverytime/mail_row_html.phtml
@@ -0,0 +1,16 @@
+<?php
+
+ /**
+ * Template für die Integration in html/order.phtml (Kundenmail, Adminmail, Auftragsbestätigung ...)
+ */
+
+?>
+<tr class="productrow productrow2 <?php echo ((($this->view['i'] % 2) == 0)?'productrow_odd':'productrow_even'); ?>">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_pos">&nbsp;</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name">
+ <?php echo __('Lieferzeit', 'wpsg'); ?>:
+ </td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
+ <?php echo $this->view['wpsg_mod_deliverytime']['deliverytime']; ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_deliverytime/overview_row.phtml b/views/mods/mod_deliverytime/overview_row.phtml
new file mode 100644
index 0000000..29ca640
--- /dev/null
+++ b/views/mods/mod_deliverytime/overview_row.phtml
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Template für die Integration der Lieferzeit in die Bestellübersichtsseite
+ */
+
+?>
+<tr class="wpsg_<?php echo (($this->view['i'] % 2 == 0)?'odd':'even'); ?>">
+ <td><?php echo __('Lieferzeit', 'wpsg'); ?>:</td>
+ <td colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'2':'1'); ?>" class="wpsg_cell_deliverytime_value">
+ <?php echo $this->view['wpsg_mod_deliverytime']['deliverytime']; ?>
+ </td>
+</tr>
diff --git a/views/mods/mod_deliverytime/produkt_edit_allgemein.phtml b/views/mods/mod_deliverytime/produkt_edit_allgemein.phtml
new file mode 100644
index 0000000..77a9910
--- /dev/null
+++ b/views/mods/mod_deliverytime/produkt_edit_allgemein.phtml
@@ -0,0 +1,12 @@
+<?php
+
+ /**
+ * Template für die Eingabe der Lieferzeit im Produkt
+ */
+
+?>
+<?php if ($this->get_option('wpsg_mod_deliverytime_mode') == wpsg_mod_deliverytime::MODE_SELECT) { ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[deliverytime]', __('Lieferzeit', 'wpsg'), $this->view['wpsg_mod_deliverytime']['arSelection'], $this->view['wpsg_mod_deliverytime']['deliverytime'], array('noIndex' => true)); ?>
+<?php } else if ($this->get_option('wpsg_mod_deliverytime_mode') == wpsg_mod_deliverytime::MODE_DAYS) { ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_deliverytime[deliverytime]', __('Lieferzeit', 'wpsg'), $this->view['wpsg_mod_deliverytime']['deliverytime'], array('unit' => __('Tage', 'wpsg'))); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_deliverytime/settings_edit.phtml b/views/mods/mod_deliverytime/settings_edit.phtml
new file mode 100644
index 0000000..d2d26e1
--- /dev/null
+++ b/views/mods/mod_deliverytime/settings_edit.phtml
@@ -0,0 +1,40 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Lieferzeit Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime_mode', __('Eingabetyp', 'wpsg'), array(
+ wpsg_mod_deliverytime::MODE_DAYS => __('Angabe von Tagen', 'wpsg'),
+ wpsg_mod_deliverytime::MODE_SELECT => __('Auswahl', 'wpsg')
+), $this->get_option('wpsg_mod_deliverytime_mode'), array('help' => 'wpsg_mod_deliverytime_mode')); ?>
+<div id="wpsg_mod_deliverytime_mode_<?php echo wpsg_mod_deliverytime::MODE_SELECT; ?>" class="wpsg_mod_deliverytime_mode">
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_deliverytime_mode_select_values', __('Verfügbare Lieferzeiten', 'wpsg'), $this->get_option('wpsg_mod_deliverytime_mode_select_values'), array('help' => 'wpsg_mod_deliverytime_mode_select_values', 'hint' => __('Kommagetrennt', 'wpsg'))); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime_mode_select_default', __('Standard Lieferzeit', 'wpsg'), $this->view['wpsg_mod_deliverytime']['arSelection'], $this->get_option('wpsg_mod_deliverytime_mode_select_default'), array('help' => 'wpsg_mod_deliverytime_mode_select_default')); ?>
+</div>
+<div id="wpsg_mod_deliverytime_mode_<?php echo wpsg_mod_deliverytime::MODE_DAYS; ?>" class="wpsg_mod_deliverytime_mode">
+ <?php echo wpsg_drawForm_Input('wpsg_mod_deliverytime_mode_days_default', __('Standard Lieferzeit', 'wpsg'), $this->get_option('wpsg_mod_deliverytime_mode_days_default'), array('help' => 'wpsg_mod_deliverytime_mode_days_default')); ?>
+</div>
+
+<br />
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverytime_show_product', __('Im Produkt anzeigen', 'wpsg'), $this->get_option('wpsg_mod_deliverytime_show_product'), array('help' => 'wpsg_mod_deliverytime_show_product')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverytime_show_basket', __('Im Warenkorb anzeigen', 'wpsg'), $this->get_option('wpsg_mod_deliverytime_show_basket'), array('help' => 'wpsg_mod_deliverytime_show_basket')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverytime_show_overview', __('In Bestellzusammenfassung anzeigen', 'wpsg'), $this->get_option('wpsg_mod_deliverytime_show_overview'), array('help' => 'wpsg_mod_deliverytime_show_overview')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverytime_show_mail', __('In den Mails anzeigen', 'wpsg'), $this->get_option('wpsg_mod_deliverytime_show_mail'), array('help' => 'wpsg_mod_deliverytime_show_mail')); ?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_deliverytime_mode').bind('change', function() {
+
+ jQuery('.wpsg_mod_deliverytime_mode').hide();
+ jQuery('#wpsg_mod_deliverytime_mode_' + jQuery(this).val()).show();
+
+ } ).change();
+
+ } );
+
+/* ]]> */</script>
diff --git a/views/mods/mod_discount/basket_top.phtml b/views/mods/mod_discount/basket_top.phtml
new file mode 100644
index 0000000..049e916
--- /dev/null
+++ b/views/mods/mod_discount/basket_top.phtml
@@ -0,0 +1,14 @@
+<?php
+
+ /**
+ * Template für die Integration des nächsten Warenkorbrabattes über dem Warenkorb
+ */
+
+?>
+<div id="wpsg_notice">
+ <p><?php echo wpsg_translate(
+ __('Ab einem Bestellwert von #1# erhalten Sie einen Rabatt von #2#. Ihnen fehlen dazu noch #3# im Warenkorb.', 'wpsg'),
+ wpsg_ff($this->view['wpsg_mod_discount']['value'], $this->get_option('wpsg_currency')),
+ wpsg_ff($this->view['wpsg_mod_discount']['discount'], $this->get_option('wpsg_currency')),
+ wpsg_ff($this->view['wpsg_mod_discount']['discountdifference'], $this->get_option('wpsg_currency'))); ?></p>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_discount/customergroup_edit.phtml b/views/mods/mod_discount/customergroup_edit.phtml
new file mode 100644
index 0000000..f826a2e
--- /dev/null
+++ b/views/mods/mod_discount/customergroup_edit.phtml
@@ -0,0 +1,16 @@
+<?php
+
+ /**
+ * Template für die Integration des Rabatts in die Kundengruppenverwaltung
+ */
+
+?>
+<div id="wpsg_customerpasswd" class="postbox">
+ <div class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></div>
+ <h3 class="wpsg_handlediv">
+ <span><?php echo __('Kundengruppenrabatt', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Input('wpsg_mod_discount[discount]', __('Rabatt', 'wpsg'), wpsg_ff($this->view['wpsg_mod_discount']['discount'])); ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_discount/productgroups_addedit_sidebar.phtml b/views/mods/mod_discount/productgroups_addedit_sidebar.phtml
new file mode 100644
index 0000000..1f85b65
--- /dev/null
+++ b/views/mods/mod_discount/productgroups_addedit_sidebar.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template für die Rabattdefinition innerhalb der Einstellungen der Produktgruppe
+ */
+
+?>
+<div id="postbox_productgrouprabatt" class="postbox">
+ <div class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></div>
+ <h3 class="handle">
+ <span><?php echo __('Produktgruppenrabatt', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount[discount_aktiv]', __('Aktion aktiv', 'wpsg'), $this->view['wpsg_mod_discount']['data'][0]); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_discount[discount_from]', __('Start (TT.MM.JJJJ)', 'wpsg'), wpsg_hspc($this->view['wpsg_mod_discount']['data'][1])); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_discount[discount_to]', __('Ende (TT.MM.JJJJ)', 'wpsg'), wpsg_hspc($this->view['wpsg_mod_discount']['data'][2])); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_discount[discount_value]', __('Rabatt', 'wpsg'), wpsg_ff($this->view['wpsg_mod_discount']['data'][3])); ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_discount/produkt_edit_sidebar.phtml b/views/mods/mod_discount/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..a2c272a
--- /dev/null
+++ b/views/mods/mod_discount/produkt_edit_sidebar.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template für die Rabattkonfiguration innerhalb der Produktverwaltung
+ */
+
+?>
+<div id="wpsg_discount" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></span>
+ <span><?php echo __('Produktrabatt', 'wpsg'); ?> </span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount[discount_aktiv]', __('Aktion aktiv', 'wpsg'), $this->view['wpsg_mod_discount']['data'][0]); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_discount[discount_from]', __('Start (TT.MM.JJJJ)', 'wpsg'), wpsg_hspc($this->view['wpsg_mod_discount']['data'][1])); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_discount[discount_to]', __('Ende (TT.MM.JJJJ)', 'wpsg'), wpsg_hspc($this->view['wpsg_mod_discount']['data'][2])); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_discount[discount_value]', __('Rabatt', 'wpsg'), wpsg_ff($this->view['wpsg_mod_discount']['data'][3])); ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_discount/settings_edit.phtml b/views/mods/mod_discount/settings_edit.phtml
new file mode 100644
index 0000000..c33a6b9
--- /dev/null
+++ b/views/mods/mod_discount/settings_edit.phtml
@@ -0,0 +1,175 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Rabatt Moduls
+ */
+
+?>
+
+<br />
+<div class="wpsg_mod_discount_settings">
+ <div class="wpsg_admin_box" id="wpsg_tab">
+ <div class="head">
+ <div class="title">
+ <div class="tab" id="tab1"><?php echo __('Produktrabatt', 'wpsg'); ?></div>
+ <div class="tab" id="tab2"><?php echo __('Warenkorbrabatt', 'wpsg'); ?></div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+ <div class="content" id="wpsg_mwst_list">
+
+ <div id="tabcontent1" class="tabcontent">
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_productdiscount', __('Rabatt auf Produkte', 'wpsg'), $this->get_option('wpsg_mod_discount_productdiscount'), array('help' =>'wpsg_mod_discount_productdiscount')); ?>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_universal', __('Rabatt auf alle Produkte', 'wpsg'), $this->get_option('wpsg_mod_discount_universal'), array('help' => 'wpsg_mod_discount_universal')); ?>
+
+ <div class="wpsg_form_field" id="wpsg_mod_discount_universal_layer">
+ <div class="wpsg_form_left">&nbsp;</div>
+ <div class="wpsg_form_right">
+ <div class="wpsg_mod_discount_generalcol">
+ <strong><?php echo __('Von (tt.mm.jjjj)', 'wpsg'); ?></strong><br />
+ <input name="wpsg_mod_discount_universal_from" type="text" value="<?php echo $this->get_option('wpsg_mod_discount_universal_from'); ?>" id="wpsg_mod_discount_universal_from" />
+ </div>
+ <div class="wpsg_mod_discount_generalcol">
+ <strong><?php echo __('Bis (tt.mm.jjjj)', 'wpsg'); ?></strong><br />
+ <input name="wpsg_mod_discount_universal_to" type="text" value="<?php echo $this->get_option('wpsg_mod_discount_universal_to'); ?>" id="wpsg_mod_discount_universal_to" />
+ </div>
+ <div class="wpsg_mod_discount_generalcol">
+ <strong><?php echo __('Rabatt', 'wpsg'); ?></strong><br />
+ <input name="wpsg_mod_discount_universal_value" type="text" value="<?php echo $this->get_option('wpsg_mod_discount_universal_value'); ?>" id="wpsg_mod_discount_universal_value" />
+ </div>
+ </div>
+ <div class="wpsg_clear"></div><br />
+ </div>
+
+ <?php if ($this->hasMod('wpsg_mod_productgroups')) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_productgroupdiscount', __('Rabatt auf Produktgruppen', 'wpsg'), $this->get_option('wpsg_mod_discount_productgroupdiscount'), array('help' => 'wpsg_mod_discount_productgroupdiscount')); ?>
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_customergroup')) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_customergroup', __('Rabatt auf Kundengruppen', 'wpsg'), $this->get_option('wpsg_mod_discount_customergroup'), array('help' => 'wpsg_mod_discount_customergroup')); ?>
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_show', __('Originalpreis im Produkttemplate anzeigen', 'wpsg'), $this->get_option('wpsg_mod_discount_show'), array ('help' => 'wpsg_mod_discount_show')); ?>
+
+ <div class="wpsg_form_field" id="wpsg_mod_discount_hierarchie">
+ <div class="wpsg_form_left">
+ <?php echo __('Rabattreihenfolge (für Berechnung):', 'wpsg')?><br />
+ <a href="#" onclick="return wpsg_mod_discount_restoredefaulthierarchie();"><?php echo __('Standard wiederherstellen', 'wpsg'); ?></a>
+ </div>
+ <div class="wpsg_form_right">
+
+ <ul>
+ <?php foreach ($this->view['wpsg_mod_discount']['hierarchie'] as $discount_typ) { ?>
+ <li class="<?php echo $discount_typ; ?>">
+ <input type="hidden" name="wpsg_mod_discount_hierarchie[]" value="<?php echo $discount_typ; ?>" />
+ <input type="checkbox" value="<?php echo $discount_typ; ?>" <?php echo ((in_array($discount_typ, (array)explode(',', $this->get_option('wpsg_mod_discount_hierarchie'))))?'checked="checked"':''); ?> name="wpsg_mod_discount_hierarchie[]" />&nbsp;
+ <?php echo $this->callMod('wpsg_mod_discount', 'getNameFromType', array($discount_typ)); ?>
+ </li>
+ <?php } ?>
+ </ul>
+
+ <p class="wpsg_hinweis"><?php echo __('Reihenfolge kann mittels Drag&Drop verändert werden.', 'wpsg'); ?></p>
+
+ <input type="hidden" name="wpsg_mod_discount_stopRabatt" value="0" />
+ <label>
+ <input type="checkbox" name="wpsg_mod_discount_stopRabatt" value="1" <?php echo (($this->get_option('wpsg_mod_discount_stopRabatt') == '1')?'checked="checked"':''); ?> />
+ <?php echo __('Nur ersten Rabatt berücksichtigen', 'wpsg'); ?>
+ </label>
+
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ </div>
+
+ <div id="tabcontent2" class="tabcontent">
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left"><?php echo __('Staffelung:', 'wpsg'); ?></div>
+ <div class="wpsg_form_right">
+
+ <div class="wpsg_mod_discount_seriescol"><strong><?php echo __('Bestellwert', 'wpsg'); ?></strong></div>
+ <div class="wpsg_mod_discount_seriescol"><strong><?php echo __('Rabatt', 'wpsg'); ?></strong></div>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg').' '.wpsg_ff(0, $this->get_option('wpsg_currency')); ?></div>
+ <div class="wpsg_mod_discount_seriescol wpsg_mod_discount_seriescol_sub"><input type="text" name="value[0][rabatt]" value="<?php echo wpsg_ff($this->view['data'][0]['rabatt']); ?>" /></div>
+ <div class="wpsg_clear"></div>
+
+ <?php foreach ($this->view['data'] as $k => $v) { if ($k > 0) { ?>
+ <div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg').' '.wpsg_ff($v['value'], $this->get_option('wpsg_currency')); ?></div>
+ <div class="wpsg_mod_discount_seriescol wpsg_mod_discount_seriescol_sub"><input type="text" name="value[<?php echo $k; ?>][rabatt]" value="<?php echo wpsg_ff($v['rabatt']); ?>" /></div>
+ <div class="wpsg_mod_discount_seriescol wpsg_mod_discount_seriescol_sub"><label><input type="checkbox" name="value[<?php echo $k; ?>][del]" value="1" /> <?php echo __('löschen', 'wpsg'); ?></label></div>
+ <input type="hidden" name="value[<?php echo $k; ?>][value]" value="<?php echo $v['value']; ?>" /><div class="wpsg_clear"></div>
+ <?php } } ?>
+
+ <div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg'); ?> <input type="text" name="neu[value]" value="" /> <?php echo $this->get_option('wpsg_currency'); ?></div>
+ <div class="wpsg_mod_discount_seriescol"><input type="text" name="neu[rabatt]" value="" /></div>
+ <div class="wpsg_clear"></div>
+
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <br />
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_showBasket', __('Nächste Staffelung im Warenkorb anpreisen', 'wpsg'), $this->get_option('wpsg_mod_discount_showBasket')); ?>
+
+ </div>
+
+ </div>
+
+ </div>
+
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery("#wpsg_mod_discount_hierarchie ul").sortable().disableSelection();
+
+ jQuery('#wpsg_tab').wpsg_tab( {
+ 'cookiename': 'wpsg_mod_discount_tab',
+ 'tab1': function() {
+ jQuery('.tablink').show();
+ }
+ } );
+
+ jQuery('#wpsg_mod_discount_universal').bind('change', function() {
+ wpsg_switchUniversalDiscount();
+ } );
+
+ wpsg_switchUniversalDiscount();
+
+ } );
+
+ function wpsg_mod_discount_restoredefaulthierarchie()
+ {
+
+ jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .general'));
+ jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .product'));
+ jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .productgroup'));
+ jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .customer'));
+
+ return false;
+
+ }
+
+ function wpsg_switchUniversalDiscount()
+ {
+
+ if (jQuery('#wpsg_mod_discount_universal').attr("checked") == "checked")
+ {
+ jQuery('#wpsg_mod_discount_universal_layer').show();
+ }
+ else
+ {
+ jQuery('#wpsg_mod_discount_universal_layer').hide();
+ }
+
+ }
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_downloadplus/cronmail.phtml b/views/mods/mod_downloadplus/cronmail.phtml
new file mode 100644
index 0000000..2e56cda
--- /dev/null
+++ b/views/mods/mod_downloadplus/cronmail.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Template für die Mail, die bei erfolgreicher Individualisierung an den Admin gesendet wird
+ */
+
+?>
+<?php echo __('Hallo Administrator,', 'wpsg'); ?>
+
+<?php echo __('Es wurden PDFs von folgenden Bestellungen individualisiert:', 'wpsg'); ?>
+
+<?php foreach ($this->view['arOrder'] as $k => $o) { ?>
+<?php echo wpsg_translate(__('Bestellung ##1#: #2# Dateien', 'wpsg'), $o[1]['onr'], $o[0]); ?>
+<?php if ($this->get_option('wpsg_mod_downloadplus_autosend') != '1') { ?>
+<?php echo __('Links versenden: ', 'wpsg'); ?><?php echo preg_replace('/wp\-content/', '', WP_CONTENT_URL); ?>?wpsg_action=wpsg_mod_downloadplus_send&hash=<?php echo $o[2]; ?>&order=<?php echo $k; ?>
+<?php } ?>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_downloadplus/cronmail_html.phtml b/views/mods/mod_downloadplus/cronmail_html.phtml
new file mode 100644
index 0000000..bddc9d0
--- /dev/null
+++ b/views/mods/mod_downloadplus/cronmail_html.phtml
@@ -0,0 +1,22 @@
+<?php
+
+ /**
+ * Template für die Mail, die bei erfolgreicher Individualisierung an den Admin gesendet wird (HTML)
+ */
+
+?>
+<p><?php echo __('Hallo Administrator,', 'wpsg'); ?></p>
+
+<p><?php echo __('Es wurden PDFs von folgenden Bestellungen individualisiert:', 'wpsg'); ?></p>
+
+<ul>
+<?php foreach ($this->view['arOrder'] as $k => $o) { ?>
+<li>
+<?php echo wpsg_translate(__('Bestellung ##1#: #2# Dateien', 'wpsg'), $o[1]['onr'], $o[0]); ?>
+<?php if ($this->get_option('wpsg_mod_downloadplus_autosend') != '1') { ?>
+<br />
+<a href="<?php echo preg_replace('/wp\-content/', '', WP_CONTENT_URL); ?>?wpsg_action=wpsg_mod_downloadplus_send&hash=<?php echo $o[2]; ?>&order=<?php echo $k; ?>"><?php echo __('Links versenden', 'wpsg'); ?></a>
+<?php } ?>
+</li>
+<?php } ?>
+</ul> \ No newline at end of file
diff --git a/views/mods/mod_downloadplus/filelist.phtml b/views/mods/mod_downloadplus/filelist.phtml
new file mode 100644
index 0000000..6b43615
--- /dev/null
+++ b/views/mods/mod_downloadplus/filelist.phtml
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Template für die Liste der Dateien im Backend
+ */
+
+?>
+<?php if (!wpsg_isSizedArray($this->view['files'])) { ?>
+<p><?php echo __('Bisher keine PDFs hochgeladen.', 'wpsg'); ?></p>
+<?php } else { ?>
+ <ul>
+ <?php foreach ($this->view['files'] as $v) { ?>
+ <li>
+ <a target="_blank" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadplus&noheader=1&cmd=download_file&file=<?php echo rawurlencode($v); ?>&edit_id=<?php echo $_REQUEST['edit_id']; ?>" title="<?php echo wpsg_hspc($v); ?>"><?php echo wpsg_hspc(substr($v, 0, 25)); ?></a>
+ (<?php echo wpsg_formatSize($this->callMod('wpsg_mod_downloadplus', 'getPDFPath', array($_REQUEST['edit_id'])).'/'.$v); ?>)
+ <div class="wpsg_mod_downloadplus_admin_delete" title="<?php echo __('PDF löschen', 'wpsg'); ?>" onclick="return wpsg_pdfdownload_removePDF('<?php echo rawurlencode($v); ?>');"></div>
+ </li>
+ <?php } ?>
+ </ul>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_downloadplus/order_view_sidebar.phtml b/views/mods/mod_downloadplus/order_view_sidebar.phtml
new file mode 100644
index 0000000..d100189
--- /dev/null
+++ b/views/mods/mod_downloadplus/order_view_sidebar.phtml
@@ -0,0 +1,110 @@
+<?php
+
+ /**
+ * Template für die Integration des PDFDownload Moduls in die Bestellverwaltung
+ * sollte nicht verändert werden
+ */
+
+?>
+<script type="text/javascript">
+/* <![CDATA[ */
+
+ function wpsg_mod_downloadplus_schedule(product_key, file, product_index)
+ {
+
+ jQuery('#wpsg_mod_downloadplus_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_downloadplus&edit_id=<?php echo $this->view['order_id']; ?>&noheader=1&cmd=schedule_file&product_index=' + product_index + '&product_key='+ product_key + '&file=' + file,
+ success: function(data) {
+ jQuery('#wpsg_mod_downloadplus_target').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_downloadplus_schedule(file)
+
+ function wpsg_mod_downloadplus_reindiv()
+ {
+
+ jQuery('#wpsg_mod_downloadplus_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_downloadplus&edit_id=<?php echo $this->view['order_id']; ?>&noheader=1&cmd=reindiv',
+ success: function(data) {
+
+ jQuery('#wpsg_mod_downloadplus_target').html(data);
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_downloadplus_reindiv()
+
+ function wpsg_mod_downloadplus_reset()
+ {
+
+ jQuery('#wpsg_mod_downloadplus_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_downloadplus&edit_id=<?php echo $this->view['order_id']; ?>&noheader=1&cmd=reset',
+ success: function(data) {
+
+ jQuery('#wpsg_mod_downloadplus_target').html(data);
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_downloadplus_reset()
+
+ function wpsg_mod_downloadplus_send()
+ {
+
+ jQuery('#wpsg_mod_downloadplus_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_downloadplus&edit_id=<?php echo $this->view['order_id']; ?>&noheader=1&cmd=send_files',
+ success: function(data) {
+
+ jQuery('#wpsg_mod_downloadplus_target').html(data);
+ wpsg_reloadOrderLog();
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_downloadplus_send()
+
+ function wpsg_mod_downloadplus_cangelschedule(product_key, file)
+ {
+
+ jQuery('#wpsg_mod_downloadplus_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_downloadplus&edit_id=<?php echo $this->view['order_id']; ?>&noheader=1&cmd=cancelschedule_file&product_key=' + product_key + '&file=' + file,
+ success: function(data) {
+ jQuery('#wpsg_mod_downloadplus_target').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_downloadplus_cangelschedule(file)
+
+/* ]]> */
+</script>
+
+<div class="postbox" id="wpsg_pdfdownload">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Downloadplus', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside" id="wpsg_mod_downloadplus_target">
+ <?php echo $this->callMod('wpsg_mod_downloadplus', 'order_view_sidebar_renderList', array($this->view['order_id'])); ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_downloadplus/order_view_sidebar_renderlist.phtml b/views/mods/mod_downloadplus/order_view_sidebar_renderlist.phtml
new file mode 100644
index 0000000..834c7c6
--- /dev/null
+++ b/views/mods/mod_downloadplus/order_view_sidebar_renderlist.phtml
@@ -0,0 +1,66 @@
+<?php
+
+ /**
+ * Template für die Liste der Produkte innerhalb der Bestellansicht, wird per Ajax neu geladen
+ */
+
+?>
+<?php if (wpsg_isSizedArray($this->view['messages'])) { ?>
+<?php foreach ($this->view['messages'] as $m) { ?>
+<div class="updated"><p><?php echo wpsg_hspc($m); ?></p></div>
+<?php } ?>
+<?php } ?>
+<?php if (wpsg_isSizedArray($this->view['errors'])) { ?>
+<?php foreach ($this->view['errors'] as $e) { ?>
+<div class="error"><p><?php echo wpsg_hspc($e); ?></p></div>
+<?php } ?>
+<?php } ?>
+<table class="wpsg_mod_downloadplus_order_view_filelist">
+ <tr>
+ <th class="col_file"><?php echo __('Datei', 'wpsg'); ?></th>
+ <th class="col_status"><?php echo __('Status', 'wpsg'); ?></th>
+ <th class="col_counter">#</th>
+ <th class="col_action"></th>
+ </tr>
+ <?php foreach ($this->view['arFiles'] as $f) { ?>
+ <tr class="<?php echo (($f[3] !== false && $f[3]['raid'] === true)?'row_raid':''); ?>">
+ <td class="col_file">
+
+ <?php if ($f[3] !== false && wpsg_isSizedArray($f[3]) && strtotime($f[3]['done']) > 0) { ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_downloadplus&cmd=download_indivfile&edit_id=<?php echo $f[3]['o_id']; ?>&product_id=<?php echo $f[0]; ?>&file=<?php echo rawurlencode($f[3]['out_file']); ?>&noheader=1">
+ <?php } ?>
+
+ <?php if ($f[3] === false) { ?>
+ <?php echo $f[1]; ?>
+ <?php } else { ?>
+ <?php echo $f[3]['out_file']; ?>
+ <?php } ?>
+
+ <?php if ($f[3] !== false && wpsg_isSizedArray($f[3]) && strtotime($f[3]['done']) > 0) { ?>
+ </a>
+ <?php } ?>
+ </td>
+ <td class="col_status">
+ <?php if ($f[3] === false) { ?>
+ <?php echo __('Noch nicht geplant.', 'wpsg'); ?>
+ <?php } else if (strtotime($f[3]['scheduled']) > 0 && strtotime($f[3]['done']) <= 0) { ?>
+ <?php echo wpsg_translate(__('Geplant am #1#', 'wpsg'), wpsg_fromDate($f[3]['scheduled'])); ?>
+ <?php } else if (strtotime($f[3]['done']) > 0) { ?>
+ <?php echo wpsg_translate(__('Durchgeführt am #1#', 'wpsg'), wpsg_fromDate($f[3]['done'])); ?>
+ <?php } ?>
+ </td>
+ <td class="col_counter"><?php echo (($f[3] !== false)?$f[3]['counter']:'0'); ?></td>
+ <td class="col_action">
+ <?php if ($f[3] === false) { ?>
+ <a href="#" onclick="return wpsg_mod_downloadplus_schedule('<?php echo $f[0]; ?>', '<?php echo rawurldecode($f[1]); ?>', '<?php echo $f[2]; ?>');"><?php echo __('Planen', 'wpsg'); ?></a>
+ <?php } else if (strtotime($f[2]['scheduled']) > 0 && strtotime($f[3]['done']) <= 0) { ?>
+ <a href="#" onclick="return wpsg_mod_downloadplus_cangelschedule('<?php echo $f[0]; ?>', '<?php echo rawurldecode($f[1]); ?>');"><?php echo __('Abbrechen', 'wpsg'); ?></a>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+</table>
+<br />
+<input type="button" onclick="return wpsg_mod_downloadplus_send();" value="<?php echo __('Fertige Downloads an Kunden senden', 'wpsg'); ?>" /><br />
+<input type="button" onclick="return wpsg_mod_downloadplus_reindiv();" value="<?php echo __('Alle Dokumente neu planen', 'wpsg'); ?>" />
+<input type="button" onclick="return wpsg_mod_downloadplus_reset();" value="<?php echo __('Zähler zurücksetzen', 'wpsg'); ?>" /> \ No newline at end of file
diff --git a/views/mods/mod_downloadplus/pdfdownloadmail.phtml b/views/mods/mod_downloadplus/pdfdownloadmail.phtml
new file mode 100644
index 0000000..7e11f0e
--- /dev/null
+++ b/views/mods/mod_downloadplus/pdfdownloadmail.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Mail, die die PDF Downloads an den Kunden sendet
+ */
+
+?>
+<?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?>
+
+<?php echo __('hiermit erhalten Sie die Downloadlinks für Ihre gekauften PDFs:', 'wpsg'); ?>
+
+<?php foreach ($this->view['arPDFs'] as $v) { ?>
+<?php echo $v['out_file']; ?>: <?php echo site_url(); ?>?wpsg_action=wpsg_mod_downloadplus_download&hash=<?php echo $v['hash']; ?>&indi=<?php echo $v['id']; ?>
+<?php } ?>
+
+<?php echo __("Mit freundlichen Grüßen", "wpsg"); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_downloadplus/pdfdownloadmail_html.phtml b/views/mods/mod_downloadplus/pdfdownloadmail_html.phtml
new file mode 100644
index 0000000..e089454
--- /dev/null
+++ b/views/mods/mod_downloadplus/pdfdownloadmail_html.phtml
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Mail, die die PDF Downloads an den Kunden sendet (HTML)
+ */
+
+?>
+<p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?></p>
+
+<p><?php echo __('hiermit erhalten Sie die Downloadlinks für Ihre gekauften PDFs:', 'wpsg'); ?></p>
+
+<ul>
+<?php foreach ($this->view['arPDFs'] as $v) { ?>
+<li><?php echo $v['out_file']; ?>: <a href="<?php echo site_url(); ?>?wpsg_action=wpsg_mod_downloadplus_download&hash=<?php echo $v['hash']; ?>&indi=<?php echo $v['id']; ?>"><?php echo __('Download', 'wpsg'); ?></a></li>
+<?php } ?>
+</ul>
+
+<p><?php echo __("Mit freundlichen Grüßen", "wpsg"); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_downloadplus/produkt_edit_sidebar.phtml b/views/mods/mod_downloadplus/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..a38ed90
--- /dev/null
+++ b/views/mods/mod_downloadplus/produkt_edit_sidebar.phtml
@@ -0,0 +1,105 @@
+<?php
+
+ /**
+ * Template für die Integration des Uploadformulars im rechten Bereich
+ * sollte nicht verändert werden
+ */
+
+?>
+<script type="text/javascript">
+/* <![CDATA[ */
+
+ function wpsg_pdfdownload_removePDF(file)
+ {
+
+ if (!confirm('<?php echo __('Sind sie sich sicher, dass sie die Datei löschen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_mod_downloadplus_files').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadplus&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1&cmd=delete_file&file=' + file,
+ success: function(response) {
+
+ if (response == '1')
+ {
+ jQuery("#wpsg_mod_downloadplus_files").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadplus&cmd=pdffiles_list&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1");
+ }
+ else
+ {
+
+ alert(response);
+ jQuery("#wpsg_mod_downloadplus_files").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadplus&cmd=pdffiles_list&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1");
+
+ }
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_pdfdownload_removePDF($pdf)
+
+ jQuery(document).ready(function() {
+
+ <?php if ($this->get_option('wpsg_classicupload') != '1') { ?>
+ new AjaxUpload(
+ "wpsg_mod_downloadplus_upload", {
+ name: "wpsg_mod_downloadplus_file",
+ action: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadplus&edit_id=<?php echo $this->view['data']['id'] ?>&noheader=1&cmd=upload_file",
+ onSubmit: function(file, extension) {
+
+ jQuery('#wpsg_mod_downloadplus_files').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ },
+ onComplete: function(file, response) {
+
+ if (response == '1')
+ {
+ jQuery("#wpsg_mod_downloadplus_files").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadplus&cmd=pdffiles_list&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1");
+ }
+ else
+ {
+
+ alert(response);
+ jQuery("#wpsg_mod_downloadplus_files").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadplus&cmd=pdffiles_list&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1");
+
+ }
+ }
+ }
+ );
+ <?php } ?>
+
+ });
+
+/* ]]> */
+</script>
+
+<div id="wpsg_pdfdownload" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('DownloadPlus Produkt', 'wpsg'); ?> </span>
+ </h3>
+ <div class="inside">
+ <div id="wpsg_mod_downloadplus_files"><?php echo $this->view['filesList']; ?></div>
+
+ <?php if ($this->get_option('wpsg_classicupload') == '1') { ?>
+ <input type="file" name="wpsg_mod_downloadplus_file" />
+ <?php } else { ?>
+ <input value="<?php echo __("Upload", "wpsg"); ?>" type="text" style="text-align:center;" size="10" id="wpsg_mod_downloadplus_upload" />
+ <?php } ?>
+
+ <div class="wpsg_clear"></div><br />
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left" style="width:75px;">
+ <label for="feinheit"><?php echo __('FTP Pfad', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <a href="#" onclick="alert('<?php echo addslashes($this->callMod('wpsg_mod_downloadplus', 'getPDFPath', array($this->view['data']['id'], true))); ?>'); return false;"><?php echo __('Anzeigen', 'wpsg'); ?></a>
+ </p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+ <div class="clear"></div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_downloadplus/settings_edit.phtml b/views/mods/mod_downloadplus/settings_edit.phtml
new file mode 100644
index 0000000..be972f0
--- /dev/null
+++ b/views/mods/mod_downloadplus/settings_edit.phtml
@@ -0,0 +1,289 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des PDFDownload Moduls
+ */
+
+?>
+<div class="wpsg_admin_box wpsg_mod_downloadplus" id="wpsg_tab">
+ <div class="head">
+ <div class="title">
+ <div class="tab" id="tab1"><?php echo __('Einstellungen', 'wpsg'); ?></div>
+ <div class="tab" id="tab2"><?php echo __('Textfelder', 'wpsg'); ?></div>
+ <div class="tab" id="tab3"><?php echo __('Erweitert', 'wpsg'); ?></div>
+ <div class="tab tabright tabright-last" id="tab4"><?php echo __('Info / Hilfe', 'wpsg'); ?></div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+ <div class="content">
+
+ <div id="tabcontent1" class="tabcontent">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_downloadplus_filename', __('Personalisierter Dateiname', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_filename'), array('help' => 'mod_pdfdownload_einstellungen_filename')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_downloadplus_indiv_mode', __('Individualisierung planen', 'wpsg'), array(0 => __('Manuell', 'wpsg'), 1 => __('Nach Zahlung', 'wpsg'), 2 => __('Nach Bestellung', 'wpsg')), $this->get_option('wpsg_mod_downloadplus_indiv_mode'), array('help' => 'mod_pdfdownload_einstellungen_individualisierungsmodus')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_downloadplus_autosend', __('PDFs nach Individualisierung sofort senden', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_autosend'), array('help' => 'mod_pdfdownload_einstellungen_autosend')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_downloadplus_shipping', __('Versandart "Versand per Mail" aktiv', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_shipping'), array('help' => 'wpsg_mod_downloadplus_shipping')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_downloadplus_einsplusx', __(' Mehr als ein Produkt im Warenkorb zulassen', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_einsplusx'), array('help' => 'wpsg_mod_downloadplus_einsplusx')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_downloadplus_accepted', __('Gültigkeit von Links', 'wpsg'), array(0 => __('Unbegrenzt', 'wpsg'), 1 => __('Nach Downloads', 'wpsg'), 2 => __('Nach Tagen', 'wpsg')), $this->get_option('wpsg_mod_downloadplus_accepted'), array('help' => 'mod_pdfdownload_einstellungen_accepted')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_downloadplus_days', __('Gültigkeit in Tagen', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_days'), array('help' => 'wpsg_mod_downloadplus_days')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_downloadplus_downloads', __('Anzahl an möglichen Downloads', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_downloads'), array('help' => 'wpsg_mod_downloadplus_downloads')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_downloadplus_cleanraiddownloads', __('Abgelaufene Downloads bereinigen', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_cleanraiddownloads'), array('help' => 'wpsg_mod_downloadplus_cleanraiddownloads')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_downloadplus_cleanolddownloads', __('Downloads nach X Tagen löschen', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_cleanolddownloads'), array('help' => 'wpsg_mod_downloadplus_cleanolddownloads')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_downloadplus_pdfpath', __('Pfad für die PDFs der Produkte', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_pdfpath'), array('hint' => __('Standard: uploads/wpsg_pdfprodukte/', 'wpsg'), 'help' => 'wpsg_mod_downloadplus_pdfpath')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_downloadplus_pdfindivpath', __('Pfad für die Individualisierten PDFs', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_pdfindivpath'), array('hint' => __('Standard: uploads/wpsg_pdfprodukte_order/', 'wpsg'), 'help' => 'wpsg_mod_downloadplus_pdfindivpath')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_downloadplus_format', __('Auslieferungsformat', 'wpsg'), array(0 => __('Direkt', 'wpsg'), 1 => __('Gezippt (intern)', 'wpsg')), $this->get_option('wpsg_mod_downloadplus_format'), array('help' => 'wpsg_mod_downloadplus_format')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_downloadplus_range', __('Anpassung', 'wpsg'), array(0 => __('Gesamtes Dokument', 'wpsg'), 1 => __('Bereich', 'wpsg')), $this->get_option('wpsg_mod_downloadplus_range'), array ('help' => 'wpsg_mod_downloadplus_range')); ?>
+ <div class="wpsg_form_field" style="display:none;" id="wpsg_mod_downloadplus_rangefield">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Seitenbereich (Von/Bis)', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input type="text" style="width:100px;" size="5" name="wpsg_mod_downloadplus_range_von" value="<?php echo $this->get_option('wpsg_mod_downloadplus_range_von'); ?>" />&nbsp;-&nbsp;
+ <input type="text" style="width:100px;" size="5" name="wpsg_mod_downloadplus_range_bis" value="<?php echo $this->get_option('wpsg_mod_downloadplus_range_bis'); ?>" />
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_downloadplus_masterpass', __('Passwort (Um Schutz aufzuheben)', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_masterpass'), array('help' => 'wpsg_mod_downloadplus_masterpass')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_downloadplus_openpass', __('Passwort (Um Dokument öffnen zu können)', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_openpass'), array('help' => 'wpsg_mod_downloadplus_openpass')); ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Dokumentenberechtigungen', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right wpsg_mod_downloadplus_security">
+ <p>
+ <input type="hidden" value="0" name="wpsg_mod_downloadplus_securitysave" />
+ <label><input type="checkbox" value="1" name="wpsg_mod_downloadplus_securitysave" <?php echo (($this->get_option('wpsg_mod_downloadplus_securitysave') == '1')?'checked="checked"':''); ?> />&nbsp;<?php echo __('Speichern erlauben', 'wpsg'); ?></label><br />
+
+ <input type="hidden" value="0" name="wpsg_mod_downloadplus_securityprint" />
+ <label><input type="checkbox" value="1" name="wpsg_mod_downloadplus_securityprint" <?php echo (($this->get_option('wpsg_mod_downloadplus_securityprint') == '1')?'checked="checked"':''); ?> />&nbsp;<?php echo __('Drucken erlauben', 'wpsg'); ?></label><br />
+
+ <input type="hidden" value="0" name="wpsg_mod_downloadplus_securitymod" />
+ <label><input type="checkbox" value="1" name="wpsg_mod_downloadplus_securitymod" <?php echo (($this->get_option('wpsg_mod_downloadplus_securitymod') == '1')?'checked="checked"':''); ?> />&nbsp;<?php echo __('Modifizieren erlauben', 'wpsg'); ?></label><br />
+
+ <input type="hidden" value="0" name="wpsg_mod_downloadplus_securitynote" />
+ <label><input type="checkbox" value="1" name="wpsg_mod_downloadplus_securitynote" <?php echo (($this->get_option('wpsg_mod_downloadplus_securitynote') == '1')?'checked="checked"':''); ?> />&nbsp;<?php echo __('Bemerkungen erlauben', 'wpsg'); ?></label><br />
+ </p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Mail für Individualisierungsbericht', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p><?php echo wpsg_translate(__('Kann <a href="#1#">hier</a> konfiguriert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#pdfdownloadcronmail'); ?></p>
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_pdfdownload_individualisierungsbericht" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_pdfdownload_individualisierungsbericht"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Mail für Downloads an Kunden', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p><?php echo wpsg_translate(__('Kann <a href="#1#">hier</a> konfiguriert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#pdfdownloadfiles'); ?></p>
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_pdfdownload_kundenmail" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_pdfdownload_kundenmail"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Letzte Ausführung des Crons', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p><?php echo (($this->get_option('wpsg_lastCron') > 0)?wpsg_formatTimestamp($this->get_option('wpsg_lastCron')):__('Noch nicht ausgeführt', 'wpsg')); ?></p>
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_pdfdownload_einstellungen_cron" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_pdfdownload_einstellungen_cron"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ </div>
+
+ <div id="tabcontent2" class="tabcontent">
+ <table class="wpsg_mod_downloadplus_fieldtable">
+ <tr>
+ <th class="col_bezeichnung"></th>
+ <th class="col_x"><?php echo __('X', 'wpsg'); ?></th>
+ <th class="col_y"><?php echo __('Y', 'wpsg'); ?></th>
+ <th class="col_align"><?php echo __('Zentriert', 'wpsg'); ?></th>
+ <th class="col_bg"><?php echo __('Hintergrund', 'wpsg'); ?></th>
+ <th class="col_color"><?php echo __('Farbe', 'wpsg'); ?></th>
+ <th class="col_alpha"><?php echo __('Opaque', 'wpsg'); ?></th>
+ <th class="col_angle"><?php echo __('Winkel', 'wpsg'); ?></th>
+ <th class="col_groesse"><?php echo __('Größe', 'wpsg'); ?></th>
+ <th class="col_action"></th>
+ </tr>
+ <?php for ($i = 0; $i < 10; $i ++) { ?>
+ <tr>
+ <td><?php echo '#'.($i + 1); ?></td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][x]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['x']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][y]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['y']); ?>" />
+ </td>
+ <td class="col_align">
+ <input type="hidden" name="text[<?php echo $i; ?>][align]" value="0" />
+ <input class="wpsg_hideBarcode" type="checkbox" name="text[<?php echo $i; ?>][align]" value="1" <?php echo (($this->view['arTexte'][$i]['align'] == '1')?'checked="checked"':''); ?> />
+ </td>
+ <td class="col_bg">
+ <input type="hidden" name="text[<?php echo $i; ?>][bg]" value="0" />
+ <input class="wpsg_hideBarcode" type="checkbox" name="text[<?php echo $i; ?>][bg]" value="1" <?php echo (($this->view['arTexte'][$i]['bg'] == '1')?'checked="checked"':''); ?> />
+ </td>
+ <td>
+ <input class="wpsg_hideBarcode" type="text" style="width:100%;" name="text[<?php echo $i; ?>][color]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['color']); ?>" />
+ </td>
+ <td>
+ <input class="wpsg_hideBarcode" type="text" style="width:100%;" name="text[<?php echo $i; ?>][alpha]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['alpha']); ?>" />
+ </td>
+ <td>
+ <input class="wpsg_hideBarcode" type="text" style="width:100%;" name="text[<?php echo $i; ?>][angle]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['angle']); ?>" />
+ </td>
+ <td>
+ <select name="text[<?php echo $i; ?>][fontsize]" style="width:100%;">
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "4")?'selected="selected"':''); ?> value="4">4</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "5")?'selected="selected"':''); ?> value="5">5</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "6")?'selected="selected"':''); ?> value="6">6</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "7")?'selected="selected"':''); ?> value="7">7</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "8")?'selected="selected"':''); ?> value="8">8</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "9")?'selected="selected"':''); ?> value="9">9</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "10")?'selected="selected"':''); ?> value="10">10</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "11")?'selected="selected"':''); ?> value="11">11</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "12")?'selected="selected"':''); ?> value="12">12</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "13")?'selected="selected"':''); ?> value="13">13</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "14")?'selected="selected"':''); ?> value="14">14</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "16")?'selected="selected"':''); ?> value="16">16</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "18")?'selected="selected"':''); ?> value="18">18</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "20")?'selected="selected"':''); ?> value="20">20</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "22")?'selected="selected"':''); ?> value="22">22</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "24")?'selected="selected"':''); ?> value="24">24</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "26")?'selected="selected"':''); ?> value="26">26</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "28")?'selected="selected"':''); ?> value="28">28</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "30")?'selected="selected"':''); ?> value="30">30</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "32")?'selected="selected"':''); ?> value="32">32</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "34")?'selected="selected"':''); ?> value="34">34</option>
+ </select>
+ </td>
+ <td>
+ <label><input type="checkbox" value="1" name="text[<?php echo $i; ?>][aktiv]" <?php echo (($this->view['arTexte'][$i]['aktiv'] == 1)?'checked="checked"':''); ?> />&nbsp;<?php echo __("Aktiv", "wpsg"); ?></label>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_pdfdownload_fieldconfig" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_pdfdownload_fieldconfig"></a>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="col_freitext_label"><?php echo __('Freitext', 'wpsg'); ?>:</td>
+ <td colspan="7" class="col_freitext">
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][text]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['text']); ?>" />
+ </td>
+ <td>
+ <select class="fontselect" name="text[<?php echo $i; ?>][font]" style="width:100%;">
+ <?php foreach ($this->view['wpsg_mod_downloadplus']['arFonts'] as $k => $v) { ?>
+ <option value="<?php echo wpsg_hspc($k); ?>" <?php echo (($k == $this->view['arTexte'][$i]['font'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($v); ?></option>
+ <?php } ?>
+ </select>
+ </td>
+ </tr>
+ <?php if ($i < 9) { ?>
+ <tr class="wpsg_border_bottom"><td colspan="10"></td></tr>
+ <?php } ?>
+ <?php } ?>
+ </table>
+ </div>
+
+ <div id="tabcontent3" class="tabcontent">
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_downloadplus_memorylimit', __('Versuche Speicherlimit hochzusetzen', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_memorylimit'), array('help' => 'wpsg_mod_downloadplus_memorylimit')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_downloadplus_timelimit', __('Versuche die Ausführungszeit hochzusetzen', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_timelimit'), array('help' => 'wpsg_mod_downloadplus_timelimit')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_downloadplus_numberformat', __('Format der Downloadnummer', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_numberformat'), array('help' => 'wpsg_mod_downloadplus_numberformat')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_downloadplus_startnumber', __('Downloadnummer Startnummer', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_startnumber'), array('help' => 'wpsg_mod_downloadplus_startnumber')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_downloadplus_attachement', __('Angepasste Dokumente als Anhang versenden', 'wpsg'), $this->get_option('wpsg_mod_downloadplus_attachement'), array('help' => 'wpsg_mod_downloadplus_attachement')); ?>
+
+ </div>
+
+ <div id="tabcontent4" class="tabcontent">
+
+ <p>
+ <?php echo __('Das Downloadplus Modul ist eine erweiterung des Downloadprodukt Moduls und ermöglicht das Individualisieren von PDF Dokumenten.', 'wpsg'); ?>
+ </p>
+ <p>
+ <?php echo __('Weitere Informationen erhalten Sie auf der <a href="http://wpshopgermany.de/?p=1426">Hilfe Seite</a> oder in unserem <a href="http://forum.maennchen1.de">Support Forum</a>.', 'wpsg'); ?>
+ </p>
+
+ <p>
+ <?php echo __('Eintrag in der Crontab:', 'wpsg'); ?>:<br /><br />
+ <span style="font-weight:bold; font-family:monospace;">
+ */5 * * * * /usr/bin/php <?php echo WPSG_PATH.DIRECTORY_SEPARATOR; ?>cron.php
+ </span>
+ </p>
+ <p>
+ <?php echo __('HTTP Aufruf des Cron Scriptes:', 'wpsg'); ?><br /><br />
+ <a href="<?php echo WPSG_PLUGIN_URL; ?>/wpshopgermany/cron.php" target="_blank"><?php echo WPSG_PLUGIN_URL; ?>/wpshopgermany/cron.php</a>
+ </p>
+
+ </div>
+
+ </div>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_mod_downloadplus_switchAccepted()
+ {
+
+ if (jQuery('#wpsg_mod_downloadplus_accepted').val() == '1')
+ jQuery('#wpsg_mod_downloadplus_downloads').parent().parent().show();
+ else
+ jQuery('#wpsg_mod_downloadplus_downloads').parent().parent().hide();
+
+ if (jQuery('#wpsg_mod_downloadplus_accepted').val() == '2')
+ jQuery('#wpsg_mod_downloadplus_days').parent().parent().show();
+ else
+ jQuery('#wpsg_mod_downloadplus_days').parent().parent().hide();
+
+ } // function wpsg_mod_downloadplus_switchAccepted()
+
+ function wpsg_mod_downloadplus_switchRange()
+ {
+
+ if (jQuery('#wpsg_mod_downloadplus_range').val() == '1')
+ jQuery('#wpsg_mod_downloadplus_rangefield').show();
+ else
+ jQuery('#wpsg_mod_downloadplus_rangefield').hide();
+
+ } // function wpsg_mod_downloadplus_switchRange()
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_mod_downloadplus_fieldtable select.fontselect').bind('change', function() {
+
+ if (jQuery(this).val() == 'EAN13' || jQuery(this).val() == 'Code128' || jQuery(this).val() == 'UPC_A')
+ {
+
+ jQuery(this).parents('tr').prev().find('input.wpsg_hideBarcode').hide();
+
+ }
+ else
+ {
+
+ jQuery(this).parents('tr').prev().find('input.wpsg_hideBarcode').show();
+
+ }
+
+ } ).change();
+
+ jQuery('#wpsg_mod_downloadplus_range').bind('change', function() { wpsg_mod_downloadplus_switchRange(); } );
+ jQuery('#wpsg_mod_downloadplus_accepted').bind('change', function() { wpsg_mod_downloadplus_switchAccepted(); } );
+
+ wpsg_mod_downloadplus_switchAccepted();
+ wpsg_mod_downloadplus_switchRange();
+
+ jQuery('#wpsg_tab').wpsg_tab( {
+ 'cookiename': 'wpsg_pdfdownload_tab',
+ 'tab2': function() {
+ jQuery('.tablink').show();
+ }
+ } );
+ } );
+
+ /* ]]> */</script>
+ \ No newline at end of file
diff --git a/views/mods/mod_downloadprodukte/order_view_row.phtml b/views/mods/mod_downloadprodukte/order_view_row.phtml
new file mode 100644
index 0000000..7ccebd4
--- /dev/null
+++ b/views/mods/mod_downloadprodukte/order_view_row.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Template für die Integration der Produkte in die Bestellverwaltung
+ */
+
+?>
+<tr class="wpsg_<?php echo (($this->view['i'] == 0)?'odd':'even'); ?>">
+ <td ><?php echo __('Downloads', 'wpsg'); ?>:</td>
+ <td align="right" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
+ <?php foreach ($this->view['wpsg_mod_downloadprodukte']['arFiles'] as $file) { ?>
+ <a target="_new" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadprodukte&noheader=1&cmd=download_file&file=<?php echo rawurlencode(basename($file[1])); ?>&edit_id=<?php echo $this->getProduktId($this->view['wpsg_mod_downloadprodukte']['product']['productkey']); ?>"><?php echo basename($file[1]); ?></a>
+ <?php } ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_downloadprodukte/produkt_edit_list.phtml b/views/mods/mod_downloadprodukte/produkt_edit_list.phtml
new file mode 100644
index 0000000..926ebd4
--- /dev/null
+++ b/views/mods/mod_downloadprodukte/produkt_edit_list.phtml
@@ -0,0 +1,22 @@
+<?php
+
+ /**
+ * Template für die Liste der Dateien eines Download- Produkts
+ */
+
+?>
+<?php if (wpsg_isSizedArray($this->view['prodFiles']) && wpsg_isSizedInt($_REQUEST['edit_id'])) { ?>
+ <ul>
+<?php foreach ($this->view['prodFiles'] as $file) { ?>
+
+ <li>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadprodukte&noheader=1&cmd=download_file&file=<?php echo rawurlencode(basename($file[1])); ?>&edit_id=<?php echo $_REQUEST['edit_id']; ?>" title="<?php echo wpsg_hspc(basename($file[1])); ?>"><?php echo wpsg_hspc(substr(basename($file[1]), 0, 25)); ?></a>
+ (<?php echo wpsg_formatSize($file[1]); ?>)
+ <div class="wpsg_mod_downloadprodukte_admin_delete" onclick="return wpsg_remove_file('<?php echo basename($file[0]) ?>');" title="<?php echo __('Datei löschen', 'wpsg') ?>"></div>
+ </li>
+
+<?php } ?>
+ </ul>
+<?php } else { ?>
+<p><?php echo __('Bisher keine Dateien hochgeladen.', 'wpsg'); ?>
+<?php } ?>
diff --git a/views/mods/mod_downloadprodukte/produkt_edit_sidebar.phtml b/views/mods/mod_downloadprodukte/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..d409e3f
--- /dev/null
+++ b/views/mods/mod_downloadprodukte/produkt_edit_sidebar.phtml
@@ -0,0 +1,102 @@
+<?php
+
+/**
+ * Dieses Template wird in der Produktverwaltung in der rechten Spalte verwendet
+ */
+
+?>
+
+<script type="text/javascript">
+/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ <?php if ($this->get_option('wpsg_classicupload') != '1') { ?>
+ new AjaxUpload(
+ "upload_produktfile_button", {
+ name: "wpsg_mod_downloadprodukte_file",
+ action: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadprodukte&edit_id=<?php echo $this->view['data']['id'] ?>&noheader=1&cmd=upload_file",
+ onSubmit: function(file, extension) {
+
+ jQuery('#produktfiles_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ },
+ onComplete: function(file, response) {
+ //alert(response);
+ if (response == '1')
+ {
+ //jQuery("#produktfiles_target").html('lalal');
+ jQuery("#produktfiles_target").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadprodukte&cmd=produktfiles_list&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1");
+ }
+ else
+ {
+ alert(response);
+ }
+ }
+ }
+ );
+ <?php } ?>
+
+ } );
+
+ /**
+ * Wird beim löschen einer Datei aufgerufen
+ */
+ function wpsg_remove_file(strFile)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sicher, das Sie diese Datei löschen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery('#produktfiles_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadprodukte&cmd=remove&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
+ data: {
+ file: strFile
+ },
+ success: function(data) {
+ //alert(data);
+ jQuery('#produktfiles_target').html(data);
+ }
+ } );
+
+ return false;
+
+ }
+
+/* ]]> */
+</script>
+
+<div id="wpsg_downloadprodukte" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span>
+ <?php echo __('Downloadprodukt', 'wpsg'); ?>
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_downloadprodukt_produktverwaltung" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_downloadprodukt_produktverwaltung" class="wpsg_form_help"></a>
+ </span>
+ </h3>
+ <div class="inside">
+ <div id="produktfiles_target"><?php echo $this->view['prodFiles']; ?></div>
+
+ <?php if ($this->get_option('wpsg_classicupload') == '1') { ?>
+ <input type="file" name="wpsg_mod_downloadprodukte_file" />
+ <?php } else { ?>
+ <input value="<?php echo __("Upload", "wpsg"); ?>" type="text" style="text-align:center;" size="10" id="upload_produktfile_button" />
+ <?php } ?>
+
+ <div class="wpsg_clear"></div><br />
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left" style="width:75px;">
+ <label for="feinheit"><?php echo __('FTP Pfad', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <a href="#" onclick="alert('<?php echo wpsg_hspc($this->view['wpsg_mod_downloadprodukte']['path']); ?>'); return false;"><?php echo __('Anzeigen', 'wpsg'); ?></a>
+ </p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ </div>
+ <div class="clear"></div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_downloadprodukte/settings_edit.phtml b/views/mods/mod_downloadprodukte/settings_edit.phtml
new file mode 100644
index 0000000..2ed9ff0
--- /dev/null
+++ b/views/mods/mod_downloadprodukte/settings_edit.phtml
@@ -0,0 +1,32 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Downloadprodukt Moduls
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_downloadprodukte_zt', __('Zähltyp', 'wpsg'), array(0 => __('Tage', 'wpsg'), 1 => __('Downloads', 'wpsg')), $this->get_option('wpsg_mod_downloadprodukte_zt'), array('help' => 'wpsg_mod_downloadprodukte_zt')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_downloadprodukte_days', __('Tage/Downloads gültig', 'wpsg'), $this->get_option('wpsg_mod_downloadprodukte_days'), array('help' => 'wpsg_mod_downloadprodukte_days')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_downloadprodukte_raid', __('Meldung wenn kein Download mehr möglich ist', 'wpsg'), $this->get_option('wpsg_mod_downloadprodukte_raid'), array('help' => 'wpsg_mod_downloadprodukte_raid')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_downloadprodukte_zip', __('Gezippte Auslieferung', 'wpsg'), $this->get_option('wpsg_mod_downloadprodukte_zip'), array('help' => 'wpsg_mod_downloadprodukte_zip')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_downloadprodukte_ziptemp', __('Verzeichnis für temporäres Archiv (Standard /tmp)', 'wpsg'), $this->get_option('wpsg_mod_downloadprodukte_ziptemp'), array('help' => 'wpsg_mod_downloadprodukte_ziptemp')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_downloadprodukte_einsplusx', __('Mehr als ein Produkt im Warenkorb zulassen', 'wpsg'), $this->get_option('wpsg_mod_downloadprodukte_einsplusx'), array('help' => 'wpsg_mod_downloadprodukte_einsplusx')); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/views/mods/mod_downloadprodukte/zahlung_downloadprodukt.phtml b/views/mods/mod_downloadprodukte/zahlung_downloadprodukt.phtml
new file mode 100644
index 0000000..2785e90
--- /dev/null
+++ b/views/mods/mod_downloadprodukte/zahlung_downloadprodukt.phtml
@@ -0,0 +1,16 @@
+<?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['customer']['vname']; ?> <?php echo $this->view['customer']['name']; ?>
+
+<?php echo __("Ihre Bezahlung zu der Bestellung", "wpsg"); ?> <?php echo $this->view['order']['onr'] ?> <?php echo __("ist bei uns eingegangen.", "wpsg"); ?>
+
+<?php echo __("Die Produkte, die als Download vorliegen, wurden für Sie freigeschaltet.", "wpsg"); ?>
+
+<?php echo $this->view['data']['strLinks']; ?>
+<?php if ($this->get_option('wpsg_mod_downloadprodukte_zt') == '0') { ?>
+<?php echo __("Sie haben für", "wpsg"); ?> <?php echo $this->view['data']['tage']; ?> <?php echo __("Tage die Möglichkeit die Dateien herunterzuladen.", "wpsg"); ?>
+<?php } else { ?>
+<?php echo preg_replace('/%1%/', $this->get_option('wpsg_mod_downloadprodukte_days'), __('Sie können die Datei %1% mal herunterladen', 'wpsg')); ?>
+<?php } ?>
+
+
+<?php echo __("Viele Grüße", "wpsg"); ?>
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_downloadprodukte/zahlung_downloadprodukt_html.phtml b/views/mods/mod_downloadprodukte/zahlung_downloadprodukt_html.phtml
new file mode 100644
index 0000000..9a87ffc
--- /dev/null
+++ b/views/mods/mod_downloadprodukte/zahlung_downloadprodukt_html.phtml
@@ -0,0 +1,21 @@
+<p><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['customer']['vname']; ?> <?php echo $this->view['customer']['name']; ?></p>
+
+<p><?php echo __("Ihre Bezahlung zu der Bestellung", "wpsg"); ?> <?php echo $this->view['order']['onr'] ?> <?php echo __("ist bei uns eingegangen.", "wpsg"); ?></p>
+
+<p><?php echo __("Die Produkte, die als Download vorliegen, wurden für Sie freigeschaltet.", "wpsg"); ?></p>
+
+<ul>
+ <?php foreach ((array)$this->view['arLinks'] as $link) { ?>
+ <li><a href="<?php echo $link; ?>"><?php echo $link; ?></a></li>
+ <?php } ?>
+</ul>
+
+<?php if ($this->get_option('wpsg_mod_downloadprodukte_zt') == '0') { ?>
+<p><?php echo __("Sie haben für", "wpsg"); ?> <?php echo $this->view['data']['tage']; ?> <?php echo __("Tage die Möglichkeit die Dateien herunterzuladen.", "wpsg"); ?></p>
+<?php } else { ?>
+<p><?php echo preg_replace('/%1%/', $this->get_option('wpsg_mod_downloadprodukte_days'), __('Sie können die Datei %1% mal herunterladen', 'wpsg')); ?></p>
+<?php } ?>
+
+<p><?php echo __("Viele Grüße", "wpsg"); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_export/produkt_index_aftersearch.phtml b/views/mods/mod_export/produkt_index_aftersearch.phtml
new file mode 100644
index 0000000..73ce3cc
--- /dev/null
+++ b/views/mods/mod_export/produkt_index_aftersearch.phtml
@@ -0,0 +1,65 @@
+<?php
+
+ /**
+ * Template für die Integration des Produktexportes in die Bestellvarwaltung im unteren Bereich
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Startet den Export, dazu wird der obere Filter mißbraucht
+ */
+ function wpsg_mod_export_do()
+ {
+
+ var arProfileIDs = Array();
+
+ jQuery('.wpsg_mod_export_profilid:checked').each(function() {
+
+ arProfileIDs.push(jQuery(this).val());
+
+ } );
+
+ if (arProfileIDs.length <= 0)
+ {
+
+ alert('<?php echo __('Bitte mindestens ein Profil zum exportieren wählen.', 'wpsg'); ?>');
+ return false;
+
+ }
+
+ jQuery('#wpsg_mod_export_profile').val(arProfileIDs.join(','));
+ jQuery('#submit_export').val('1');
+ jQuery('#wpsg_order_index_noheader_filter').attr('name', 'noheader');
+ jQuery('#filter_form').attr('target', '_new');
+
+ jQuery('#filter_form').submit();
+
+ jQuery('#wpsg_order_index_noheader_filter').attr('name', '');
+ jQuery('#submit_export').val('0');
+ jQuery('#filter_form').attr('target', '');
+
+ return false;
+
+ } // function wpsg_mod_export_do()
+
+/* ]]> */</script>
+
+<div class="metabox-holder" id="wpsg_mod_export_layer" style="<?php echo (($_COOKIE['wpsg_mod_export_layer'] == '1')?'display:block;':'display:none;'); ?>padding-top:0px;">
+ <div id="wpsg_modexport" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br></span>
+ <span><?php echo __('Bestellexport', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php foreach ($this->view['wpsg_mod_export']['arProfile'] as $p) { ?>
+ <label class="wpsg_mod_export_profillabel">
+ <input type="checkbox" class="wpsg_mod_export_profilid" value="<?php echo $p['id']; ?>" type="checkbox" />&nbsp;<?php echo __($p['name'], 'wpsg'); ?>
+ </label>
+ <?php } ?>
+ <div class="wpsg_clear"></div><br />
+ <input type="submit" onclick="return wpsg_mod_export_do();" value="<?php echo __('Export starten', 'wpsg'); ?>" class="button" name="submit_export" />
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_export/produkt_index_head.phtml b/views/mods/mod_export/produkt_index_head.phtml
new file mode 100644
index 0000000..23f3759
--- /dev/null
+++ b/views/mods/mod_export/produkt_index_head.phtml
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Template für die Integration der Exportprofile in die Übersicht der Bestellungen
+ */
+
+?>
+<input type="hidden" name="submit_export" id="submit_export" value="" />
+<input type="hidden" id="wpsg_mod_export_profile" name="wpsg_mod_export_profile" value="" />
+
+<label>
+ <input type="checkbox" <?php echo (($_COOKIE['wpsg_mod_export_layer'] == '1')?'checked="checked"':''); ?> onclick="if (jQuery(this).attr('checked') == 'checked') { jQuery('#wpsg_mod_export_layer').show(); jQuery.cookie('wpsg_mod_export_layer', '1'); } else { jQuery('#wpsg_mod_export_layer').hide(); jQuery.cookie('wpsg_mod_export_layer', null); }" />&nbsp;<?php echo __('Bestellexport', 'wpsg'); ?>
+</label> \ No newline at end of file
diff --git a/views/mods/mod_export/profil.phtml b/views/mods/mod_export/profil.phtml
new file mode 100644
index 0000000..e272abf
--- /dev/null
+++ b/views/mods/mod_export/profil.phtml
@@ -0,0 +1,287 @@
+<?php
+
+ /**
+ * Template für die Einstellungen eines Profils
+ */
+
+?>
+
+<?php echo $this->writeBackendMessage(); ?>
+
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_export[name]"><?php echo __('Profilname', 'wpsg'); ?>:</label>
+ </div>
+ <div style="width:350px;" class="wpsg_form_right wpsg_editable" id="wpsg_mod_export_profilname"><?php echo $this->view['profil']['name']; ?></div>
+ <a style="float:right;" onclick="return wpsg_mod_export_removeProfil(<?php echo $this->view['profil']['id']; ?>);" title="<?php echo __('Profil löschen', 'wpsg'); ?>" href="#" class="wpsg_icon wpsg_icon_remove"></a>
+ <div class="wpsg_clear"></div>
+</div>
+<script type="text/javascript">
+
+ jQuery('#wpsg_mod_export_profilname').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ profil_id: '<?php echo $this->view['profil']['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+</script>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_export[filename]"><?php echo __('Dateiname', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right wpsg_editable" id="wpsg_mod_export_filename"><?php echo @$this->view['profil']['data']['filename']; ?></div>
+ <div class="wpsg_clear"></div>
+</div>
+<script type="text/javascript">
+
+ jQuery('#wpsg_mod_export_filename').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'filename',
+ profil_id: '<?php echo $this->view['profil']['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+</script>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_export[separator]"><?php echo __('Trennzeichen', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right wpsg_editable" id="wpsg_mod_export_separator"><?php echo @$this->view['profil']['data']['separator']; ?></div>
+ <div class="wpsg_clear"></div>
+</div>
+<script type="text/javascript">
+
+ jQuery('#wpsg_mod_export_separator').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'separator',
+ profil_id: '<?php echo $this->view['profil']['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+</script>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_export_oneline"><?php echo __('Eine Zeile pro Bestellung', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input style="width:auto;" type="checkbox" <?php echo ((@$this->view['profil']['data']['oneline'] == '1')?'checked="checked"':''); ?> value="1" onchange="" id="wpsg_mod_export_oneline" /></div>
+ <div class="wpsg_clear"></div>
+</div>
+<script type="text/javascript">
+
+ jQuery('#wpsg_mod_export_oneline').bind('change', function() {
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1',
+ data: {
+ field: 'oneline',
+ value: ((jQuery('#wpsg_mod_export_oneline').attr("checked") == 'checked')?'1':'0'),
+ profil_id: '<?php echo $this->view['profil']['id']; ?>'
+ }
+ } );
+ } );
+
+</script>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_export_firstlinecolname"><?php echo __('Spaltennamen in erster Spalte', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input style="width:auto;" type="checkbox" <?php echo ((@$this->view['profil']['data']['firstlinecolname'] == '1')?'checked="checked"':''); ?> value="1" onchange="" id="wpsg_mod_export_firstlinecolname" id="wpsg_mod_export_firstlinecolname" /></div>
+ <div class="wpsg_clear"></div>
+</div>
+<script type="text/javascript">
+
+ jQuery('#wpsg_mod_export_firstlinecolname').bind('change', function() {
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1',
+ data: {
+ field: 'firstlinecolname',
+ value: ((jQuery('#wpsg_mod_export_firstlinecolname').attr("checked") == 'checked')?'1':'0'),
+ profil_id: '<?php echo $this->view['profil']['id']; ?>'
+ }
+ } );
+ } );
+
+</script>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_export_iso"><?php echo __('Dateiformat (Import wie Export)', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <select name="wpsg_mod_export_iso" id="wpsg_mod_export_iso">
+ <option value="0" <?php echo ((@$this->view['profil']['data']['iso'] != '1')?'selected="selected"':''); ?>><?php echo __('UTF-8', 'wpsg'); ?></option>
+ <option value="1" <?php echo ((@$this->view['profil']['data']['iso'] == '1')?'selected="selected"':''); ?>><?php echo __('ISO-8859-1', 'wpsg'); ?></option>
+ </select>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+
+<br />
+
+<script type="text/javascript">
+
+ jQuery('#wpsg_mod_export_iso').bind('change', function() {
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1',
+ data: {
+ field: 'iso',
+ value: jQuery('#wpsg_mod_export_iso').val(),
+ profil_id: '<?php echo $this->view['profil']['id']; ?>'
+ }
+ } );
+ } );
+
+</script>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_export_iso"><?php echo __('Muster Vorlage (csv Datei)', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <iframe name="wpsg_mod_export_upload_frame" style="display:none;"></iframe>
+ <form action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=musterupload&noheader=1&profil_id=<?php echo $this->view['profil']['id']; ?>" target="wpsg_mod_export_upload_frame" method="post" enctype="multipart/form-data">
+ <input style="float:left; width:auto;" type="file" name="wpsg_mod_export_muster" />
+ <input style="float:right; width:auto;" type="submit" value="<?php echo __('Hochladen', 'wpsg'); ?>" />
+ </form>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+<br />
+<table class="wpsg_mod_export_fieldlist" cellpadding="0" cellspacing="0">
+ <tr>
+ <th class="wpsg_mod_export_col_name"><?php echo __('Spaltenname', 'wpsg'); ?></th>
+ <th class="wpsg_mod_export_col_value"><?php echo __('Wert', 'wpsg'); ?></th>
+ <th class="wpsg_mod_export_col_format"><?php echo __('Format', 'wpsg'); ?></th>
+ <th class="wpsg_mod_export_col_remove"></th>
+ </tr>
+ <?php $i = 0; foreach ((array)$this->view['profil']['data']['fields'] as $f_key => $f) { $i ++; ?>
+ <tr class="wpsg_tablerow wpsg_mod_export_row1 wpsg_mod_export_fieldrow_<?php echo $f_key; ?> <?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="wpsg_mod_export_col_name wpsg_editable" id="field_name_<?php echo $f_key; ?>"><?php echo $f['name']; ?></td>
+ <td class="wpsg_mod_export_col_field wpsg_editable" id="field_typ_<?php echo $f_key; ?>"><?php
+
+ foreach ($this->view['fields'] as $fieldgroup)
+ {
+
+ foreach ($fieldgroup['fields'] as $field_key => $field)
+ {
+
+ if ($field_key == $f['value'])
+ {
+ echo $field;
+ }
+
+ }
+
+ }
+
+ ?></td>
+ <td class="wpsg_mod_export_col_format wpsg_editable" id="field_format_<?php echo $f_key; ?>"><?php echo $this->view['arFormats'][$f['format']]; ?></td>
+ <td>
+ <a style="float:right;" onclick="return wpsg_mod_export_removeField(<?php echo $this->view['profil']['id']; ?>, <?php echo $f_key; ?>);" title="<?php echo __('Profil löschen', 'wpsg'); ?>" href="#" class="wpsg_icon wpsg_icon_remove"></a>
+ </td>
+ </tr>
+ <tr id="userformatrow_<?php echo $f_key; ?>" style="<?php echo (($f['format'] != 700)?'display:none;':''); ?>" class="wpsg_mod_export_row2 wpsg_tablerow wpsg_mod_export_fieldrow_<?php echo $f_key; ?> <?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="wpsg_mod_export_col_name"></td>
+ <td class="wpsg_mod_export_col_field_user"><?php echo __('Format:', 'wpsg'); ?></td>
+ <td class="wpsg_mod_export_col_format_user wpsg_editable" id="field_userformat_<?php echo $f_key; ?>"><?php echo wpsg_hspc($f['userformat']); ?></td>
+ <td style="position:relative;">
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_export_userformat" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_export_userformat" class="wpsg_form_help" style="float:right; position:relative;"></a>
+ <script type="text/javascript">
+
+ jQuery('#field_userformat_<?php echo $f_key; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'fielduserformat_<?php echo $f_key; ?>',
+ profil_id: '<?php echo $this->view['profil']['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#field_format_<?php echo $f_key; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'fieldformat_<?php echo $f_key; ?>',
+ profil_id: '<?php echo $this->view['profil']['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ data: '<?php echo json_encode($this->view['arFormats']); ?>',
+ type: 'select',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ callback: function(el) {
+ if (el == '<?php echo $this->view['arFormats'][700]; ?>')
+ {
+ jQuery('#userformatrow_<?php echo $f_key; ?>').show();
+ }
+ else
+ {
+ jQuery('#userformatrow_<?php echo $f_key; ?>').hide();
+ }
+ }
+ });
+
+ jQuery('#field_name_<?php echo $f_key; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'fieldname_<?php echo $f_key; ?>',
+ profil_id: '<?php echo $this->view['profil']['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#field_typ_<?php echo $f_key; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'fieldtyp_<?php echo $f_key; ?>',
+ profil_id: '<?php echo $this->view['profil']['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ data: '<?php echo json_encode($this->view['fields']); ?>',
+ type: 'select',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ </script>
+ </td>
+ </tr>
+ <?php } ?>
+</table>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ jQuery('.wpsg_mod_export_row1').bind('mouseover', function() {
+ jQuery(this).next().addClass('wpsg_tablerow_hover');
+ } ).bind('mouseout', function() {
+ jQuery(this).next().removeClass('wpsg_tablerow_hover');
+ } );
+
+ jQuery('.wpsg_mod_export_row2').bind('mouseover', function() {
+ jQuery(this).prev().addClass('wpsg_tablerow_hover');
+ } ).bind('mouseout', function() {
+ jQuery(this).prev().removeClass('wpsg_tablerow_hover');
+ } );
+
+ } );
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_export/profillist.phtml b/views/mods/mod_export/profillist.phtml
new file mode 100644
index 0000000..eb866f2
--- /dev/null
+++ b/views/mods/mod_export/profillist.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Template für die Liste der Profile
+ */
+
+?>
+<?php if (sizeof($this->view['arProfile']) > 0) { ?>
+<select name="wpsg_mod_export[profil]" id="wpsg_mod_export_profil" onchange="wpsg_mod_export_profilSwitch();" style="width:99%;">
+ <?php foreach ($this->view['arProfile'] as $p) { ?>
+ <option value="<?php echo $p['id']; ?>" <?php echo ((isset($this->view['profil_id']) && $p['id'] == $this->view['profil_id'])?'selected="selected"':''); ?>><?php echo $p['name']; ?></option>
+ <?php } ?>
+</select>
+<div id="profil_content" style="padding:5px 0px 5px 0px;"></div>
+<?php } else { ?>
+<p><?php echo __('Bisher noch keine Profile angelegt.', 'wpsg'); ?></p>
+<?php } ?>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+ wpsg_mod_export_profilSwitch();
+ } );
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_export/settings_edit.phtml b/views/mods/mod_export/settings_edit.phtml
new file mode 100644
index 0000000..39aec29
--- /dev/null
+++ b/views/mods/mod_export/settings_edit.phtml
@@ -0,0 +1,107 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Export Moduls
+ */
+
+?>
+<script type="text/javascript">
+
+ function wpsg_mod_export_profilSwitch()
+ {
+
+ jQuery('#profil_content').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_profilSwitch&noheader=1',
+ data: {
+ profil: jQuery('#wpsg_mod_export_profil').val()
+ },
+ success: function(data) {
+ jQuery("#profil_content").html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_export_profilSwitch()
+
+ function wpsg_mod_export_removeField(profil_id, field_key)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_removeField&noheader=1',
+ data: {
+ profil: profil_id,
+ field_key: field_key
+ },
+ success: function(data) {
+ if (data == '1')
+ {
+ jQuery('tr.wpsg_mod_export_fieldrow_' + field_key).remove();
+ }
+ else
+ {
+ alert(data);
+ }
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_export_removeField(profil_id, field_key)
+
+ function wpsg_mod_export_removeProfil(profil_id)
+ {
+
+ if (!confirm('<?php echo __('Sind sie sich sicher?', 'wpsg'); ?>')) return false;
+
+ jQuery('#profil_content').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_removeProfil&noheader=1',
+ data: {
+ profil: profil_id
+ },
+ success: function(data) {
+ jQuery("#wpsg_profil_list").html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_export_removeProfil(profil_id)
+
+ function wpsg_mod_export_addProfil()
+ {
+
+ jQuery('#wpsg_profil_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_addProfil&noheader=1',
+ success: function(data) {
+ jQuery("#wpsg_profil_list").html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addExportProfil()
+
+</script>
+
+<div class="wpsg_admin_box">
+ <div class="head">
+ <div class="title">
+ <div class="fulltab">
+ <?php echo __('Exportprofile', 'wpsg'); ?>
+ <a title="<?php echo __('Neuens Exportprofil anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_mod_export_addProfil();"></a>
+ </div>
+ </div>
+ <div id="wpsg_profil_list" class="content">
+ <?php echo $this->callMod('wpsg_mod_export', 'profilList'); ?>
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_flexipay/gfx/flexipay.gif b/views/mods/mod_flexipay/gfx/flexipay.gif
new file mode 100644
index 0000000..fedda1d
--- /dev/null
+++ b/views/mods/mod_flexipay/gfx/flexipay.gif
Binary files differ
diff --git a/views/mods/mod_flexipay/gfx/logo_100x25.png b/views/mods/mod_flexipay/gfx/logo_100x25.png
new file mode 100644
index 0000000..bd3819d
--- /dev/null
+++ b/views/mods/mod_flexipay/gfx/logo_100x25.png
Binary files differ
diff --git a/views/mods/mod_flexipay/order_done.phtml b/views/mods/mod_flexipay/order_done.phtml
new file mode 100644
index 0000000..dadc4e2
--- /dev/null
+++ b/views/mods/mod_flexipay/order_done.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Template für die Bestellabschlußseite mit Flexipay
+ */
+
+?>
+<?php if (wpsg_isSizedString($this->view['wpsg_mod_flexipay']['ident'])) { ?>
+<script src="<?php echo $this->view['wpsg_mod_flexipay']['widgetjs']; ?>"></script>
+
+<p><?php echo wpsg_translate(__('Sie bezahlen Ihre Bestellung mit der Nummer #1# in Höhe von #2#.', 'wpsg'), $this->view['order']['onr'], wpsg_ff($this->view['order']['price_gesamt'], $this->get_option('wpsg_currency'))); ?></p>
+
+<form action="<?php echo $this->view['wpsg_mod_flexipay']['statusURL']; ?>" id="<?php echo $this->view['wpsg_mod_flexipay']['ident']; ?>"><?php echo $this->view['wpsg_mod_flexipay']['paymenttypes']; ?></form>
+<?php } else { ?>
+
+<p><?php echo __('FlexiPay Zahlung konnte nicht gestartet werden, wenden Sie sich an den Betreiber des Shops.', 'wpsg'); ?></p>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_flexipay/settings_edit.phtml b/views/mods/mod_flexipay/settings_edit.phtml
new file mode 100644
index 0000000..460b187
--- /dev/null
+++ b/views/mods/mod_flexipay/settings_edit.phtml
@@ -0,0 +1,77 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des FlexiPay Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_flexipay_integratormode', __('Integrationsmodus', 'wpsg'), array(
+ 'INTEGRATOR_TEST' => 'INTEGRATOR_TEST',
+ 'CONNECTOR_TEST' => 'CONNECTOR_TEST',
+ 'LIVE' => 'LIVE'
+), $this->get_option('wpsg_mod_flexipay_integratormode')); ?>
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_flexipay_sender', __('Sender ID', 'wpsg'), $this->get_option('wpsg_mod_flexipay_sender'), array('help' => 'wpsg_mod_flexipay_sender')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_flexipay_channelid', __('Channel ID', 'wpsg'), $this->get_option('wpsg_mod_flexipay_channelid'), array('help' => 'wpsg_mod_flexipay_channelid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_flexipay_userid', __('UserID', 'wpsg'), $this->get_option('wpsg_mod_flexipay_userid'), array('help' => 'wpsg_mod_flexipay_userid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_flexipay_password', __('Passwort', 'wpsg'), $this->get_option('wpsg_mod_flexipay_password'), array('help' => 'wpsg_mod_flexipay_password')); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_flexipay_activ', __('Zahlungsart aktiv', 'wpsg'), $this->get_option('wpsg_mod_flexipay_activ')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_flexipay_paymenttypes', __('Zahlungsarten', 'wpsg'), array(
+ 'AMEX' => 'American Express',
+ 'BARPAY' => 'BarPay',
+ 'BOLETO' => 'Boleto',
+ 'CARTEBLEUE' => 'Carte Bleue',
+ 'CHINAUNIONPAY' => 'China UnionPay',
+ 'DANKORT' => 'Dankort',
+ 'DINERS' => 'Diners',
+ 'DIRECTDEBIT_SEPA' => 'Direct Debit Sepa',
+ 'DIRECTDEBIT_SEPA_MIX_DE' => 'Direct Debit Germany and Sepa',
+ 'DIRECTDEBIT_SEPA_MIX_AT' => 'Direct Debit Austria and Sepa',
+ 'DIRECTDEBIT_DE' => 'Direct Debit Germany',
+ 'DIRECTDEBIT_AT' => 'Direct Debit Austria',
+ 'DISCOVER' => 'Discover',
+ 'GIROPAY' => 'Giropay',
+ 'IDEAL' => 'iDeal',
+ 'INVOICE' => 'Invoice',
+ 'JCB' => 'JCB',
+ 'MAESTRO' => 'Maestro',
+ 'MASTER' => 'MasterCard',
+ 'PASTEANDPAY_V' => 'PasteAndPay',
+ 'PAYPAL' => 'PayPal',
+ 'POSTEPAY' => 'PostePay',
+ 'SOFORTUEBERWEISUNG' => 'sofort Überweisung',
+ 'UKASH' => 'Ukash',
+ 'VISA' => 'Visa',
+ 'VISADEBIT' => 'Visa Debit',
+ 'VISAELECTRON' => 'Visa Electron',
+ 'VPAY' => 'V PAY',
+ 'VSTATION_V' => 'Voucher Station',
+ 'AXESS' => 'AXESS',
+ 'BONUS' => 'Bonus',
+ 'MAXIMUM' => 'Maximum',
+ 'WORLD' => 'World',
+ 'CARDFINANS' => 'CardFinans',
+ 'ADVANTAGE' => 'Advantage',
+ 'QOOQO' => 'Qooqo',
+ 'KLARNA_INVOICE' => 'Klarna Invoice',
+ 'KLARNA_INSTALLMENTS' => 'Klarna Installments',
+ 'ASYACARD' => 'AsyaCard'
+), @explode(' ', $this->get_option('wpsg_mod_flexipay_paymenttypes')), array('multiple' => '8', 'help' => 'wpsg_mod_flexipay_paymenttypes', 'hint' => __('STRG für Mehrfachauswahl', 'wpsg'))); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_flexipay_name', __('Bezeichnung der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_flexipay_name'), array('help' => 'wpsg_mod_flexipay_name')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_flexipay_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_flexipay_hint'), array('help' => 'wpsg_mod_flexipay_hint')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_flexipay_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_flexipay_logo'), array('help' => 'wpsg_mod_flexipay_logo')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_flexipay_language', __('Sprache', 'wpsg'), array(
+ 'auto' => __('Automatisch', 'wpsg'),
+ 'de' => __('Deutsch', 'wpsg'),
+ 'en' => __('Englisch', 'wpsg')
+), $this->get_option('wpsg_mod_flexipay_language'), array('help' => 'wpsg_mod_flexipay_language')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_flexipay_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_flexipay_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_flexipay_gebuehr')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_flexipay_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_flexipay_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_flexipay_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_flexipay_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
+<br />
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_flexipay_successPage', __('Seite nach erfolgreicher Zahlung', 'wpsg'), $this->view['wpsg_mod_flexipay']['arPages'], $this->get_option('wpsg_mod_flexipay_successPage'), array('help' => 'wpsg_mod_flexipay_successPage')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_flexipay_errorPage', __('Seite nach fehlgeschlagener Zahlung', 'wpsg'), $this->view['wpsg_mod_flexipay']['arPages'], $this->get_option('wpsg_mod_flexipay_errorPage'), array('help' => 'wpsg_mod_flexipay_errorPage')); ?>
diff --git a/views/mods/mod_freeshipping/settings_edit.phtml b/views/mods/mod_freeshipping/settings_edit.phtml
new file mode 100644
index 0000000..c75fc9f
--- /dev/null
+++ b/views/mods/mod_freeshipping/settings_edit.phtml
@@ -0,0 +1,10 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Moduls "Versandkostenfrei"
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_freeshipping_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_freeshipping_bezeichnung'), array('help' => 'wpsg_mod_freeshipping_bezeichnung')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_freeshipping_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_freeshipping_aktiv'), array('help' => 'wpsg_mod_freeshipping_aktiv')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_freeshipping_minvalue', __('Mindestbestellwert', 'wpsg'), $this->get_option('wpsg_mod_freeshipping_minvalue'), array('help' => 'wpsg_mod_freeshipping_minvalue')); ?> \ No newline at end of file
diff --git a/views/mods/mod_fuellmenge/priceinfo.phtml b/views/mods/mod_fuellmenge/priceinfo.phtml
new file mode 100644
index 0000000..8531cd6
--- /dev/null
+++ b/views/mods/mod_fuellmenge/priceinfo.phtml
@@ -0,0 +1,11 @@
+<?php
+
+ /**
+ * Anzeige der Grundpreisinformationen im Produkttemplate
+ */
+
+?><div class="wpsg_mod_fuellmenge_info"><?php echo wpsg_translate(
+ __('(#1# / #2#)', 'wpsg'),
+ wpsg_ff($this->view['wpsg_mod_fuellmenge']['fmenge_preis'], $this->get_option('wpsg_currency')),
+ wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $this->view['wpsg_mod_fuellmenge']['feinheit'])
+); ?></div> \ No newline at end of file
diff --git a/views/mods/mod_fuellmenge/produkt_edit_sidebar.phtml b/views/mods/mod_fuellmenge/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..c21c496
--- /dev/null
+++ b/views/mods/mod_fuellmenge/produkt_edit_sidebar.phtml
@@ -0,0 +1,17 @@
+<?php
+
+ /**
+ * Template für den Adminbereich des Füllmengenmoduls innerhalb des Produktes
+ */
+
+?>
+<div id="wpsg_fuellmenge" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Füllmenge', 'wpsg'); ?> </span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Select('feinheit', __('Einheit', 'wpsg'), $this->view['data']['arFeinheiten'], $this->view['data']['feinheit']); ?>
+ <?php echo wpsg_drawForm_Input('fmenge', __('Füllmenge', 'wpsg'), wpsg_tf($this->view['data']['fmenge'])); ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_fuellmenge/settings_edit.phtml b/views/mods/mod_fuellmenge/settings_edit.phtml
new file mode 100644
index 0000000..0c4af8d
--- /dev/null
+++ b/views/mods/mod_fuellmenge/settings_edit.phtml
@@ -0,0 +1,14 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Füllmengenmoduls
+ * Sollte nicht verändert werden
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_fuellmenge_einheit', __('Mögliche Einheiten (Kommagetrennt)', 'wpsg'), $this->get_option('wpsg_mod_fuellmenge_einheit'), array('help' => 'wpsg_mod_fuellmenge_einheit')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_fuellmenge_bezug', __('Bezugsgröße', 'wpsg'), $this->get_option('wpsg_mod_fuellmenge_bezug'), array('help' => 'wpsg_mod_fuellmenge_bezug')); ?>
+<?php if ($this->hasMod('wpsg_mod_productindex')) { ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_fuellmenge_showProductindex_fmenge', __('Füllmenge auf Produktübersichtsseiten anzeigen', 'wpsg'), $this->get_option('wpsg_mod_fuellmenge_showProductindex_fmenge'), array('help' => 'wpsg_mod_fuellmenge_showProductindex_fmenge')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_fuellmenge_showProductindex_grundpreis', __('Grundpreis auf Produktübersichtsseiten anzeigen', 'wpsg'), $this->get_option('wpsg_mod_fuellmenge_showProductindex_grundpreis'), array('help' => 'wpsg_mod_fuellmenge_showProductindex_grundpreis')); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_funding/product_bottom.phtml b/views/mods/mod_funding/product_bottom.phtml
new file mode 100644
index 0000000..4672c08
--- /dev/null
+++ b/views/mods/mod_funding/product_bottom.phtml
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Template welches unterhalb des Produkttemplates eingebunden wird
+ */
+
+?>
+<?php if ($this->view['wpsg_mod_funding']['state'] === wpsg_mod_funding::STATE_COMPLETED) { ?>
+<div id="wpsg_message" class="published updated">
+ <p><?php echo __('Die Finanzierung dieses Produktes ist erfolgreich durchgeführt worden.', 'wpsg'); ?><br /><?php echo __('Aktuell kann es nicht mehr erworben werden.', 'wpsg'); ?></p>
+</div>
+<?php } else if ($this->view['wpsg_mod_funding']['state'] === wpsg_mod_funding::STATE_NOTSTARTET) { ?>
+<div id="wpsg_error" class="published error">
+ <p><?php echo __('Die Finanzierung dieses Produktes ist noch nicht gestartet.', 'wpsg'); ?><br /><?php echo __('Aktuell kann es nicht erworben werden.', 'wpsg'); ?></p>
+</div>
+<?php } else if ($this->view['wpsg_mod_funding']['state'] === wpsg_mod_funding::STATE_CLOSED) { ?>
+<div id="wpsg_error" class="published error">
+ <p><?php echo __('Die Finanzierung dieses Produktes ist abgeschlossen.', 'wpsg'); ?><br /><?php echo __('Aktuell kann es nicht erworben werden.', 'wpsg'); ?></p>
+</div>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_funding/product_edit_sidebar.phtml b/views/mods/mod_funding/product_edit_sidebar.phtml
new file mode 100644
index 0000000..1e08767
--- /dev/null
+++ b/views/mods/mod_funding/product_edit_sidebar.phtml
@@ -0,0 +1,48 @@
+<?php
+
+ /**
+ * Template für die Integration in die Produktverwaltung
+ */
+
+?><div id="wpsg_funding" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Finanzierungsprodukt', 'wpsg'); ?> </span>
+ </h3>
+ <div class="inside">
+
+ <?php if (wpsg_isSizedInt($_REQUEST['edit_id'])) { ?>
+
+ <input type="hidden" name="wpsg_mod_funding_save" value="1" />
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_funding[activ]', __('Finanzierungsprodukt', 'wpsg'), wpsg_getStr($this->view['wpsg_mod_funding']['activ']), array('id' => 'wpsg_mod_funding_activ')); ?>
+
+ <div id="wpsg_mod_funding_activ_layer">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_funding[start]', __('Start der Runde', 'wpsg'), wpsg_getStr($this->view['wpsg_mod_funding']['start']), array('datepicker' => true)); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_funding[end]', __('Ende der Runde', 'wpsg'), wpsg_getStr($this->view['wpsg_mod_funding']['end']), array('datepicker' => true)); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_funding[limit]', __('Mögliche Bestellungen', 'wpsg'), ((wpsg_isSizedInt($this->view['wpsg_mod_funding']['limit']))?$this->view['wpsg_mod_funding']['limit']:'10')); ?>
+
+ </div>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_funding_activ').bind('change', function() {
+
+ if (jQuery(this).is(':checked')) jQuery('#wpsg_mod_funding_activ_layer').show();
+ else jQuery('#wpsg_mod_funding_activ_layer').hide();
+
+ } ).change();
+
+ } );
+
+ /* ]]> */</script>
+
+ <?php } else { ?>
+ <p><?php echo __('Das Produkt muss einmalig gespeichert werden bevor die Option "Finanzierungsprodukt" aktiviert werden kann.', 'wpsg'); ?></p>
+ <?php } ?>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_funding/product_top_afterheadline.phtml b/views/mods/mod_funding/product_top_afterheadline.phtml
new file mode 100644
index 0000000..f9bbcf5
--- /dev/null
+++ b/views/mods/mod_funding/product_top_afterheadline.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template für die Integration des CrowdFunding Produktes
+ */
+
+?>
+<div class="wpsg_mod_funding_progress">
+
+ <div class="wpsg_mod_funding_label">
+ <strong><?php echo __('Status der Finanzierung', 'wpsg'); ?>:</strong>&nbsp;<?php echo $this->view['wpsg_mod_funding']['stateLabel']; ?>
+ </div>
+
+ <div class="wpsg_mod_funding_state">
+ <div class="bar"><div class="value wpsg_mod_funding_state_value" data-wpsg-funding-width="<?php echo ceil($this->view['wpsg_mod_funding']['currentFundingCount'] / $this->view['wpsg_mod_funding']['maxFundingCount'] * 100); ?>"></div></div>
+ <div class="value"><?php echo $this->view['wpsg_mod_funding']['currentFundingCount'].'/'.$this->view['wpsg_mod_funding']['maxFundingCount']; ?></div>
+ </div>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_funding/settings_edit.phtml b/views/mods/mod_funding/settings_edit.phtml
new file mode 100644
index 0000000..d3290a6
--- /dev/null
+++ b/views/mods/mod_funding/settings_edit.phtml
@@ -0,0 +1,7 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Moduls "Crowdfunding"
+ */
+
+?> \ No newline at end of file
diff --git a/views/mods/mod_giropay/gfx/gc_creditcard.png b/views/mods/mod_giropay/gfx/gc_creditcard.png
new file mode 100644
index 0000000..f4e96b8
--- /dev/null
+++ b/views/mods/mod_giropay/gfx/gc_creditcard.png
Binary files differ
diff --git a/views/mods/mod_giropay/gfx/gc_directdebit.png b/views/mods/mod_giropay/gfx/gc_directdebit.png
new file mode 100644
index 0000000..5d10a71
--- /dev/null
+++ b/views/mods/mod_giropay/gfx/gc_directdebit.png
Binary files differ
diff --git a/views/mods/mod_giropay/gfx/gc_giropay.png b/views/mods/mod_giropay/gfx/gc_giropay.png
new file mode 100755
index 0000000..c10e889
--- /dev/null
+++ b/views/mods/mod_giropay/gfx/gc_giropay.png
Binary files differ
diff --git a/views/mods/mod_giropay/gfx/logo_100x25.png b/views/mods/mod_giropay/gfx/logo_100x25.png
new file mode 100644
index 0000000..54d26ee
--- /dev/null
+++ b/views/mods/mod_giropay/gfx/logo_100x25.png
Binary files differ
diff --git a/views/mods/mod_giropay/order_done.phtml b/views/mods/mod_giropay/order_done.phtml
new file mode 100644
index 0000000..c3a144e
--- /dev/null
+++ b/views/mods/mod_giropay/order_done.phtml
@@ -0,0 +1,21 @@
+<?php
+
+ /**
+ * Template für die Anzeige nach der Bestellung bei Auswahl einer Giropay Zahlungsart
+ */
+
+?>
+<?php echo __('Klicken Sie auf das folgende Logo um ihre Bestellung zu bezahlen.', 'wpsg'); ?>
+<br /><br />
+<a href="<?php echo $this->view['wpsg_mod_giropay']['payLink']; ?>"><img src="<?php echo $this->view['wpsg_mod_giropay']['logo']; ?>" alt="<?php echo $this->view['wpsg_mod_giropay']['title']; ?>" /></a>
+<?php if ($this->get_option('wpsg_mod_giropay_paystart') == '1') { ?>
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+ window.setTimeout(function() {
+ location.href = "<?php echo $this->view['wpsg_mod_giropay']['payLink']; ?>";
+ }, 1000);
+ } );
+
+</script>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_giropay/settings_edit.phtml b/views/mods/mod_giropay/settings_edit.phtml
new file mode 100755
index 0000000..3d526ca
--- /dev/null
+++ b/views/mods/mod_giropay/settings_edit.phtml
@@ -0,0 +1,81 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Moduls "giropay"
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_giropay_merchantId', __('Verkäufer-ID', 'wpsg'), $this->get_option('wpsg_mod_giropay_merchantId'), array('help' => 'wpsg_mod_giropay_merchantId')); ?>
+<?php /* echo wpsg_drawForm_Input('wpsg_mod_giropay_currency', __('Währungscode (Standard: EUR)', 'wpsg'), $this->get_option('wpsg_mod_giropay_currency'), array('help' => 'wpsg_mod_giropay_currency')); */ ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_giropay_paystart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_giropay_paystart'), array('help' => 'wpsg_shippay_paystart')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_giropay_subject', __('Verwendungszweck für Zahlungen', 'wpsg'), $this->get_option('wpsg_mod_giropay_subject'), array('help' => 'wpsg_mod_giropay_subject')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_giropay_successPage', __('Seite nach erfolgreicher Zahlung', 'wpsg'), $this->view['wpsg_mod_giropay']['arPages'], $this->get_option('wpsg_mod_giropay_successPage'), array('help' => 'wpsg_mod_giropay_successPage')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_giropay_errorPage', __('Seite nach fehlgeschlagener Zahlung', 'wpsg'), $this->view['wpsg_mod_giropay']['arPages'], $this->get_option('wpsg_mod_giropay_errorPage'), array('help' => 'wpsg_mod_giropay_errorPage')); ?>
+<br />
+<div class="wpsg_admin_box" id="wpsg_mod_giropay_giropay">
+ <div class="head" style="border-bottom: 0px none;">
+ <div class="title">
+ <div class="fulltab"><?php echo __('GiroCheckout - giropay', 'wpsg'); ?></div>
+ </div>
+ <div class="content wpsg_admin_box_content" style="display: block;">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_giropay_giropay_activ', __('Zahlungsart "giropay" aktiv', 'wpsg'), $this->get_option('wpsg_mod_giropay_giropay_activ'), array('help' => 'wpsg_shippay_activ')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_giropay_projectid', __('Projekt-ID für giropay', 'wpsg'), $this->get_option('wpsg_mod_giropay_giropay_projectid'), array('help' => 'wpsg_mod_giropay_giropay_projectid')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_giropay_projectpw', __('Projekt-Passwort', 'wpsg'), $this->get_option('wpsg_mod_giropay_giropay_projectpw'), array('help' => 'wpsg_mod_giropay_giropay_projectpw')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_giropay_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_giropay_giropay_name'), array('help' => 'wpsg_shippay_name')); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_giropay_giropay_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_giropay_giropay_hint'), array('help' => 'wpsg_shippay_hint')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_giropay_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_giropay_giropay_logo'), array('help' => 'wpsg_shippay_logo')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_giropay_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_giropay_giropay_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_giropay_giropay_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_giropay_giropay_mwst')); ?>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_giropay_giropay_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_giropay_giropay_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
+ </div>
+ </div>
+</div>
+<br />
+<div class="wpsg_admin_box" id="wpsg_mod_giropay_creditcard">
+ <div class="head" style="border-bottom: 0px none;">
+ <div class="title">
+ <div class="fulltab"><?php echo __('GiroCheckout - Kreditkarte', 'wpsg'); ?></div>
+ </div>
+ <div class="content wpsg_admin_box_content" style="display: block;">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_giropay_creditcard_activ', __('Zahlungsart "Kreditkarte" aktiv', 'wpsg'), $this->get_option('wpsg_mod_giropay_creditcard_activ'), array('help' => 'wpsg_shippay_activ')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_creditcard_projectid', __('Projekt-ID für Kreditkarte', 'wpsg'), $this->get_option('wpsg_mod_giropay_creditcard_projectid'), array('help' => 'wpsg_mod_giropay_creditcard_projectid')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_creditcard_projectpw', __('Projekt-Passwort', 'wpsg'), $this->get_option('wpsg_mod_giropay_creditcard_projectpw'), array('help' => 'wpsg_mod_giropay_creditcard_projectpw')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_creditcard_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_giropay_creditcard_name'), array('help' => 'wpsg_shippay_name')); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_giropay_creditcard_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_giropay_creditcard_hint'), array('help' => 'wpsg_shippay_hint')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_creditcard_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_giropay_creditcard_logo'), array('help' => 'wpsg_shippay_logo')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_creditcard_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_giropay_creditcard_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_giropay_creditcard_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_giropay_creditcard_mwst')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_giropay_creditcard_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_giropay_creditcard_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
+ </div>
+ </div>
+</div>
+<br />
+<div class="wpsg_admin_box" id="wpsg_mod_giropay_directdebit">
+ <div class="head" style="border-bottom: 0px none;">
+ <div class="title">
+ <div class="fulltab"><?php echo __('GiroCheckout - Lastschrift', 'wpsg'); ?></div>
+ </div>
+ <div class="content wpsg_admin_box_content" style="display: block;">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_giropay_directdebit_activ', __('Zahlungsart "Lastschrift" aktiv', 'wpsg'), $this->get_option('wpsg_mod_giropay_directdebit_activ'), array('help' => 'wpsg_shippay_activ')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_directdebit_projectid', __('Projekt-ID für Lastschrift', 'wpsg'), $this->get_option('wpsg_mod_giropay_directdebit_projectid'), array('help' => 'wpsg_mod_giropay_directdebit_projectid')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_directdebit_projectpw', __('Projekt-Passwort', 'wpsg'), $this->get_option('wpsg_mod_giropay_directdebit_projectpw'), array('help' => 'wpsg_mod_giropay_directdebit_projectpw')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_directdebit_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_giropay_directdebit_name'), array('help' => 'wpsg_shippay_name')); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_giropay_directdebit_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_giropay_directdebit_hint'), array('help' => 'wpsg_shippay_hint')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_directdebit_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_giropay_directdebit_logo'), array('help' => 'wpsg_shippay_logo')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_giropay_directdebit_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_giropay_directdebit_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_giropay_directdebit_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_giropay_directdebit_mwst')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_giropay_directdebit_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_giropay_directdebit_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
+ </div>
+ </div>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_admin_box').wpsg_adminbox();
+
+ } );
+
+/* ]]> */</script>
diff --git a/views/mods/mod_gutschein/add.phtml b/views/mods/mod_gutschein/add.phtml
new file mode 100644
index 0000000..4895269
--- /dev/null
+++ b/views/mods/mod_gutschein/add.phtml
@@ -0,0 +1,72 @@
+<?php
+
+ /**
+ * Template für die Maske eines neuen Gutscheins
+ */
+
+?>
+<div class="wrap columns-2">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
+ <h2><?php echo __('Neuer Gutschein', 'wpsg'); ?></h2>
+ <br />
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&amp;action=save&amp;noheader=1" enctype="multipart/form-data">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_value', __('Wert', 'wpsg'), $this->view['mod_gutschein']['value']); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_calc', __('Berechnung', 'wpsg'), array(
+ 'w' => __('Absoluter Betrag', 'wpsg'),
+ 'p' => __('Prozentual', 'wpsg')
+ ), $this->view['mod_gutschein']['calc']); ?>
+ <?php echo wpsg_drawForm_Date('wpsg_mod_gutschein_start', __('Gültig ab', 'wpsg'), $this->view['mod_gutschein']['start']); ?>
+ <?php echo wpsg_drawForm_Date('wpsg_mod_gutschein_end', __('Gültig bis', 'wpsg'), $this->view['mod_gutschein']['end']); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_gen', __('Code Generierung', 'wpsg'), array(
+ '0' => __('Automatisch', 'wpsg'),
+ '1' => __('Manuell', 'wpsg')
+ ), wpsg_getStr($this->view['mod_gutschein']['gen']), array('help' => 'wpsg_mod_gutschein_gen')); ?>
+ <div id="wpsg_mod_gutschein_layercode">
+ <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_code', __('Code', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['code']), array('help' => 'wpsg_mod_gutschein_code')); ?>
+ </div>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_minvalue', __('Minimaler Warenwert', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['minvalue']), array('help' => 'wpsg_mod_gutschein_minvalue')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_count', __('Menge', 'wpsg'), $this->view['mod_gutschein']['count']); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_gutschein_multi', __('Mehrfach verwendbar', 'wpsg'), $this->view['mod_gutschein']['multi']); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_gutschein_comment', __('Kommentar', 'wpsg'), $this->view['mod_gutschein']['comment']); ?>
+ <?php if ($this->hasMod('wpsg_mod_productgroups') && wpsg_isSizedArray($this->view['wpsg_mod_gutschein']['arProductGroups'])) { ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_productgroups', __('Beschränkung auf Produktgruppen', 'wpsg'), $this->view['wpsg_mod_gutschein']['arProductGroups'], $this->view['mod_gutschein']['productgroups'], array('multiple' => ((sizeof($this->view['wpsg_mod_gutschein']['arProductGroups']) > 5)?5:sizeof($this->view['wpsg_mod_gutschein']['arProductGroups'])), 'help' => 'wpsg_mod_gutschein_productgroups')); ?>
+ <?php } ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_products', __('Beschränkung auf Produkte', 'wpsg'), $this->view['wpsg_mod_gutschein']['arProducts'], $this->view['mod_gutschein']['products'], array('multiple' => ((sizeof($this->view['wpsg_mod_gutschein']['arProducts']) > 5)?5:sizeof($this->view['wpsg_mod_gutschein']['arProducts'])), 'help' => 'wpsg_mod_gutschein_products')); ?>
+
+ <p class="submit">
+ <input type="submit" value="<?php echo __('Gutschein anlegen', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
+ </p>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ jQuery('#wpsg_mod_gutschein_gen').bind('change', function() {
+
+ if (jQuery(this).val() == '1')
+ {
+
+ jQuery('#wpsg_mod_gutschein_layercode').show();
+
+ }
+ else
+ {
+
+ jQuery('#wpsg_mod_gutschein_layercode').hide();
+
+ }
+
+ } ).change();
+
+ } );
+
+ /* ]]> */</script>
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_gutschein/admin_setcapabilities.phtml b/views/mods/mod_gutschein/admin_setcapabilities.phtml
new file mode 100644
index 0000000..0f49d85
--- /dev/null
+++ b/views/mods/mod_gutschein/admin_setcapabilities.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template für die Integration in die Verwaltung der Berechtigungen
+ */
+
+ global $wpdb; $arRoles = get_option($wpdb->prefix."user_roles");
+
+?>
+<tr>
+ <td class="wpsg_col_capname"><?php echo __('Gutscheinverwaltung', 'wpsg'); ?></td>
+ <?php foreach ($arRoles as $role_key => $r) { ?>
+ <td class="wpsg_col_cap">
+ <input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_voucher]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_voucher']) && $r['capabilities']['wpsg_voucher'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_voucher]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_gutschein/basket_row_end.phtml b/views/mods/mod_gutschein/basket_row_end.phtml
new file mode 100644
index 0000000..9bca86b
--- /dev/null
+++ b/views/mods/mod_gutschein/basket_row_end.phtml
@@ -0,0 +1,17 @@
+<?php
+
+ /**
+ * Template für die Integration der Gutscheineingabe innerhalb des Warenkorbes
+ */
+
+?>
+<tr class="wpsg_gutschein_weight">
+ <td colspan="<?php echo ($this->view['colspan'] + 1); ?>" class="wpsg_cell_gutschein">
+
+ <label for="wpsg_gutschein_input"><?php echo __('Gutscheincode:', 'wpsg'); ?></label>
+
+ <input class="wpsg_gutschein_add wpsg_button" type="submit" name="wpsg_gutschein_add" value="<?php echo __('Hinzufügen', 'wpsg'); ?>" />
+ <input id="wpsg_gutschein_input" class="wpsg_gutschein_input <?php echo ((in_array("gutschein", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg[gutschein]" value="" />
+
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_gutschein/import.phtml b/views/mods/mod_gutschein/import.phtml
new file mode 100644
index 0000000..520f4d0
--- /dev/null
+++ b/views/mods/mod_gutschein/import.phtml
@@ -0,0 +1,36 @@
+<?php
+
+ /**
+ * Template für den Import von Gutscheinen über CSV Datei
+ */
+
+?>
+<?php echo $this->writeBackendMessage(); ?>
+
+<div class="wrap wpsg_mod_gutschein">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
+ <h2>
+ <?php echo __('Gutscheinverwaltung - CSV Import', 'wpsg'); ?>
+ </h2>
+ <form name="wpsg_form" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Voucher&action=import&noheader=1'); ?>">
+
+ <?php echo wpsg_drawForm_Select('gs_exists', __('Bestehende Codes', 'wpsg'), array('0' => __('Überschreiben', 'wpsg'), '1' => __('Ignorieren', 'wpsg')), '1'); ?>
+
+ <br />
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="abo_file"><?php echo __('CSV Quell Datei', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input type="file" name="wpsg_file" />
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <p class="submit">
+ <input id="wpsg_submit" type="submit" value="<?php echo __('Import starten', 'wpsg'); ?>" class="button-primary" name="submit" />
+ <input type="button" class="button" value="<?php echo __('Zurück zur Gutscheinverwaltung', 'wpsg'); ?>" onclick="location.href = '<?php echo wpsg_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Voucher'); ?>';" />
+ </p>
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_gutschein/index.phtml b/views/mods/mod_gutschein/index.phtml
new file mode 100644
index 0000000..47659a3
--- /dev/null
+++ b/views/mods/mod_gutschein/index.phtml
@@ -0,0 +1,332 @@
+<?php
+
+ /**
+ * Template für die Übersicht der Gutschein
+ */
+
+?>
+<div class="wrap wpsg_mod_gutschein">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
+ <h2>
+ <?php echo __('Gutscheinverwaltung', 'wpsg'); ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&amp;action=add" class="add-new-h2"><?php echo __("Hinzufügen", "wpsg"); ?></a>
+ <a href="#" onclick="return wpsg_doExport();" class="add-new-h2"><?php echo __('CSV Export', 'wpsg'); ?></a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&amp;action=import" class="add-new-h2"><?php echo __('CSV Import', 'wpsg'); ?></a>
+ </h2>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ var wpsg_order = '<?php echo $this->view['filter']['order']; ?>';
+ var wpsg_ascdesc = '<?php echo $this->view['filter']['ascdesc']; ?>';
+
+ function wpsg_setOrder(order)
+ {
+
+ if (order == wpsg_order)
+ {
+
+ // Nur Richtung ändern
+ if (wpsg_ascdesc == 'asc') jQuery('#wpsg_ascdesc').val('desc');
+ else jQuery('#wpsg_ascdesc').val('asc');
+
+ }
+ else
+ {
+
+ jQuery('#wpsg_order').val(order);
+ jQuery('#wpsg_ascdesc').val('asc');
+
+ }
+
+ jQuery('#seite').val(1);
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ } // function wpsg_setOrder(order)
+
+ function goPage(page)
+ {
+
+ if (page <= 0 || page == <?php echo $this->view['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
+
+ jQuery('#seite').val(page);
+
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ } // function goPage(page)
+
+ function goStatus(status)
+ {
+
+ jQuery('#status').val(status);
+ jQuery('#seite').val('1');
+
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ } // public function goStatus(status)
+
+ function wpsg_doExport()
+ {
+
+ var action_alt = jQuery('#filter_form').attr('action');
+
+ jQuery('#wpsg_voucher_export').val('1');
+ jQuery('#filter_form').attr('target', '_blank');
+ jQuery('#filter_form').attr('action', jQuery('#filter_form').attr('action') + '&noheader=1');
+
+ jQuery('#filter_form').submit();
+
+ jQuery('#filter_form').attr('action', action_alt);
+ jQuery('#filter_form').attr('target', '');
+ jQuery('#wpsg_voucher_export').val('0');
+
+ return false;
+
+ } // function wpsg_doExport()
+
+ /* ]]> */</script>
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <form method="POST" id="filter_form" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher">
+
+ <input type="hidden" name="wpsg_status" id="status" value="<?php echo @$this->view['filter']['status']; ?>" />
+ <input type="hidden" name="wpsg_voucher_export" value="0" id="wpsg_voucher_export" />
+
+ <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo $this->view['filter']['order']; ?>" />
+ <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo $this->view['filter']['ascdesc']; ?>" />
+
+ <?php if (wpsg_isSizedArray($this->view['arStatus'])) { ?>
+ <ul class="subsubsub wpsg_order_index_status">
+ <?php foreach ($this->view['arStatus'] as $status_id => $status) { ?>
+ <li>
+ <?php if (isset($this->view['filter']['status']) && $this->view['filter']['status'] == $status_id) { ?>
+ <span class="akt"><?php echo wpsg_hspc($status[0]); ?></span> <span class="count">(<?php echo $status[1]; ?>) | </span>
+ <?php } else { ?>
+ <a onclick="return goStatus(<?php echo $status_id; ?>);" href="#"><?php echo wpsg_hspc($status[0]); ?> <span class="count">(<?php echo $status[1]; ?>)</span></a> |
+ <?php } ?>
+ </li>
+ <?php } ?>
+ <li>
+ <?php if (!isset($this->view['filter']['status']) || $this->view['filter']['status'] <= 0) { ?>
+ <span class="akt"><?php echo __('Alle', 'wpsg'); ?></span> <span class="count">(<?php echo $this->view['countAll']; ?>)</span>
+ <?php } else { ?>
+ <a onclick="return goStatus(0);" href="#"><?php echo __('Alle', 'wpsg'); ?> <span class="count">(<?php echo $this->view['countAll']; ?>)</span></a>
+ <?php } ?>
+ </li>
+ </ul>
+ <?php } ?>
+
+ <p class="search-box wpsg-search-box">
+ <label for="post-search-input" class="screen-reader-text"><?php echo __('Gutscheine suchen', 'wpsg'); ?>:</label>
+ <input type="text" value="<?php echo wpsg_hspc($this->view['filter']['search']); ?>" id="wpsg_search" name="wpsg_search" id="post-search-input" />
+ <input type="submit" value="<?php echo __('Gutscheine suchen', 'wpsg'); ?>" class="button" id="search-submit" name="search-submit" />
+ </p>
+
+ <?php if (sizeof($this->view['data'] > 0)) { ?>
+ <div class="tablenav top">
+ <div class="tablenav-pages tablenav-pages-wrap"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
+ <div class="tablenav-pages">
+ <span class="pagination-links">
+ <a onclick="return goPage(1);" href="#" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['page'] == '1')?'disabled':''); ?>">«</a>
+ <a onclick="return goPage(<?php echo $this->view['page'] - 1; ?>);" href="#" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['page'] <= 1)?'disabled':''); ?>">‹</a>
+ <span class="paging-input"><input type="text" size="1" value="<?php echo $this->view['page']; ?>" id="seite" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
+ <a onclick="return goPage(<?php echo $this->view['page'] + 1; ?>);" href="#" title="<?php echo __('Zur nächsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['page'] >= $this->view['pages'])?'disabled':''); ?>">›</a>
+ <a onclick="return goPage(<?php echo $this->view['pages']; ?>);" href="#" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['page'] == $this->view['pages'])?'disabled':''); ?>">»</a>
+ </span>
+ </div>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
+
+ /* ]]> */</script>
+
+ <br class="wpsg_clear">
+ </div>
+ </div>
+ <?php } ?>
+
+ </form>
+
+ <form method="POST" id="#gs_form" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&noheader=1">
+
+ <?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
+ <table class="widefat post fixed vouchertable">
+ <thead>
+ <tr>
+ <th class="manage-column column-checkbox"><input title="<?php echo __("Alle markieren", "wpsg"); ?>" type="checkbox" onclick="markAll(this);"/></th>
+ <th class="manage-column column-nr <?php echo (($this->view['filter']['order'] == 'id')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('id');">
+ <span><?php echo __("ID", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-code <?php echo (($this->view['filter']['order'] == 'code')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('code');">
+ <span><?php echo __("Code", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-start <?php echo (($this->view['filter']['order'] == 'start_date')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('start_date');">
+ <span><?php echo __("Start", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-end <?php echo (($this->view['filter']['order'] == 'end_date')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('end_date');">
+ <span><?php echo __("End", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-value <?php echo (($this->view['filter']['order'] == 'value')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('value');">
+ <span><?php echo __("Wert", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-status <?php echo (($this->view['filter']['order'] == 'status')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('status');">
+ <span><?php echo __("Status", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->view['data'] as $g) { ?>
+ <tr>
+ <td class="column-checkbox"><input type="checkbox" value="<?php echo $g['id']; ?>" class="wpsg_mod_gs_cb" name="wpsg_gs_cb[]" /></td>
+ <td class="column-nr"><?php echo wpsg_hspc($g['id']); ?>.</td>
+ <td class="column-code"><?php echo wpsg_hspc($g['code']); ?></td>
+ <td class="column-start"><?php echo date('d.m.Y H:i', strtotime($g['start_date'])); ?></td>
+ <td class="column-end"><?php echo date('d.m.Y H:i', strtotime($g['end_date'])); ?></td>
+ <td class="column-value">
+ <?php if ($g['calc_typ'] == 'w') { ?>
+ <?php echo wpsg_ff($g['value'], $this->get_option('wpsg_currency')); ?>
+ <?php } else { ?>
+ <?php echo wpsg_ff($g['value'], '%'); ?>
+ <?php } ?>
+ <?php if (wpsg_tf($g['minvalue']) > 0) { ?>
+ <br /><div class="wpsg_hinweis"><?php echo wpsg_translate(__('Ab #1#', 'wpsg'), wpsg_ff(wpsg_tf($g['minvalue']), $this->get_option('wpsg_currency'))); ?></div>
+ <?php } ?>
+ </td>
+ <td class="column-status">
+ <?php if (trim($g['comment']) != '') { ?>
+ <a href="#" style="cursor:default;" title="<?php echo wpsg_hspc($g['comment']); ?>">
+ <img src="<?php echo WPSG_URL_CONTENT; ?>plugins/wpshopgermany/views/gfx/comment.png" alt="<?php echo wpsg_hspc($g['comment']); ?>" />
+ </a>
+ <?php } ?>
+ <?php echo wpsg_hspc($g['status']); ?>
+ <?php if ($g['multi'] == '1') { ?>
+ <?php if ($g['ordered'] > 0) { ?>
+ <?php echo wpsg_translate(__('#1# mal benutzt', 'wpsg'), $g['ordered']); ?>
+ <?php } ?>
+ <span class="wpsg_mod_gutschein_multi">&nbsp;<a class="tooltip" href="#" onclick="return false;" title="<?php echo __('Mehrfach benutzbar', 'wpsg'); ?>">[M]</a></span>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ <tfoot>
+ <tr>
+ <th class="manage-column column-checkbox"><input title="<?php echo __("Alle markieren", "wpsg"); ?>" type="checkbox" onclick="markAll(this);"/></th>
+ <th class="manage-column column-nr <?php echo (($this->view['filter']['order'] == 'id')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('id');">
+ <span><?php echo __("ID", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-code <?php echo (($this->view['filter']['order'] == 'code')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('code');">
+ <span><?php echo __("Code", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-start <?php echo (($this->view['filter']['order'] == 'start_date')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('start_date');">
+ <span><?php echo __("Start", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-end <?php echo (($this->view['filter']['order'] == 'end_date')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('end_date');">
+ <span><?php echo __("End", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-value <?php echo (($this->view['filter']['order'] == 'value')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('value');">
+ <span><?php echo __("Wert", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-status <?php echo (($this->view['filter']['order'] == 'status')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('status');">
+ <span><?php echo __("Status", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </tfoot>
+ </table>
+
+ <div class="tablenav top">
+ <div class="tablenav-pages"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
+ <div class="tablenav-pages">
+ <span class="pagination-links">
+ <a onclick="return goPage(1);" href="#" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['page'] == '1')?'disabled':''); ?>">«</a>
+ <a onclick="return goPage(<?php echo $this->view['page'] - 1; ?>);" href="#" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['page'] <= 1)?'disabled':''); ?>">‹</a>
+ <span class="paging-input"><input type="text" size="1" value="<?php echo $this->view['page']; ?>" id="seite" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
+ <a onclick="return goPage(<?php echo $this->view['page'] + 1; ?>);" href="#" title="<?php echo __('Zur nächsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['page'] >= $this->view['pages'])?'disabled':''); ?>">›</a>
+ <a onclick="return goPage(<?php echo $this->view['pages']; ?>);" href="#" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['page'] == $this->view['pages'])?'disabled':''); ?>">»</a>
+ </span>
+ </div>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
+
+ /* ]]> */</script>
+
+ <br class="wpsg_clear">
+ </div>
+ </div>
+
+ <input class="button-primary" type="submit" onclick="if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;" name="wpshopgermany-submit-gs_del" value="<?php echo __("Markierte löschen", "wpsg"); ?>" />&nbsp;
+ <br /><br />
+ <?php } else { ?>
+ <p><?php echo __('Keine Gutscheine in der Datenbank.', 'wpsg'); ?></p>
+ <?php } ?>
+
+ </form>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ function markAll(el)
+ {
+
+ var arCB = jQuery(".wpsg_mod_gs_cb");
+
+ for (var i = 0; i < arCB.length; i ++)
+ {
+ if (el.checked)
+ {
+ jQuery(arCB[i]).attr('checked', true);
+ }
+ else
+ {
+ jQuery(arCB[i]).attr('checked', false);
+ }
+ }
+
+ } // function markAll(el)
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_gutschein/settings_edit.phtml b/views/mods/mod_gutschein/settings_edit.phtml
new file mode 100644
index 0000000..db2c044
--- /dev/null
+++ b/views/mods/mod_gutschein/settings_edit.phtml
@@ -0,0 +1,9 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Gutscheinmoduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_size', __('Länge der Gutscheincodes', 'wpsg'), $this->get_option('wpsg_mod_gutschein_size'), array ('help' => wpsg_mod_gutschein_size)); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_perPage', __('Gutscheine pro Seite (Backend)', 'wpsg'), $this->get_option('wpsg_mod_gutschein_perPage'), array ('help' => 'wpsg_mod_gutschein_perPage')); ?> \ No newline at end of file
diff --git a/views/mods/mod_icp/gfx/icp.png b/views/mods/mod_icp/gfx/icp.png
new file mode 100644
index 0000000..d6fbbe1
--- /dev/null
+++ b/views/mods/mod_icp/gfx/icp.png
Binary files differ
diff --git a/views/mods/mod_icp/order_done.phtml b/views/mods/mod_icp/order_done.phtml
new file mode 100644
index 0000000..635a0d5
--- /dev/null
+++ b/views/mods/mod_icp/order_done.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Template für die Bestellabschlußseite mit SecurePay
+ */
+
+?>
+<?php if (wpsg_isSizedString($this->view['wpsg_mod_icp']['ident'])) { ?>
+<script src="<?php echo $this->view['wpsg_mod_icp']['widgetjs']; ?>"></script>
+
+<p><?php echo wpsg_translate(__('Sie bezahlen Ihre Bestellung mit der Nummer #1# in Höhe von #2#.', 'wpsg'), $this->view['order']['onr'], wpsg_ff($this->view['order']['price_gesamt'], $this->get_option('wpsg_currency'))); ?></p>
+
+<form action="<?php echo $this->view['wpsg_mod_icp']['statusURL']; ?>" id="<?php echo $this->view['wpsg_mod_icp']['ident']; ?>"><?php echo $this->view['wpsg_mod_icp']['paymenttypes']; ?></form>
+<?php } else { ?>
+
+<p><?php echo __('ICP Zahlung konnte nicht gestartet werden, wenden Sie sich an den Betreiber des Shops.', 'wpsg'); ?></p>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_icp/settings_edit.phtml b/views/mods/mod_icp/settings_edit.phtml
new file mode 100644
index 0000000..b8566fc
--- /dev/null
+++ b/views/mods/mod_icp/settings_edit.phtml
@@ -0,0 +1,75 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des ICP Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_icp_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_icp_sandbox'), array('help' => 'wpsg_mod_icp_sandbox')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_icp_sender', __('Sender ID', 'wpsg'), $this->get_option('wpsg_mod_icp_sender'), array('help' => 'wpsg_mod_icp_sender')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_icp_channelid', __('Channel ID', 'wpsg'), $this->get_option('wpsg_mod_icp_channelid'), array('help' => 'wpsg_mod_icp_channelid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_icp_userid', __('UserID', 'wpsg'), $this->get_option('wpsg_mod_icp_userid'), array('help' => 'wpsg_mod_icp_userid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_icp_password', __('Passwort', 'wpsg'), $this->get_option('wpsg_mod_icp_password'), array('help' => 'wpsg_mod_icp_password')); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_icp_activ', __('Zahlungsart aktiv', 'wpsg'), $this->get_option('wpsg_mod_icp_activ')); ?>
+<?php /* echo wpsg_drawForm_Select('wpsg_mod_icp_paymenttypes', __('Zahlungsarten', 'wpsg'), array(
+// 'AMEX' => 'American Express',
+// 'BARPAY' => 'BarPay',
+// 'BOLETO' => 'Boleto',
+// 'CARTEBLEUE' => 'Carte Bleue',
+// 'CHINAUNIONPAY' => 'China UnionPay',
+// 'DANKORT' => 'Dankort',
+// 'DINERS' => 'Diners',
+ 'DIRECTDEBIT_SEPA' => 'Direct Debit Sepa',
+// 'DIRECTDEBIT_SEPA_MIX_DE' => 'Direct Debit Germany and Sepa',
+// 'DIRECTDEBIT_SEPA_MIX_AT' => 'Direct Debit Austria and Sepa',
+// 'DIRECTDEBIT_DE' => 'Direct Debit Germany',
+// 'DIRECTDEBIT_AT' => 'Direct Debit Austria',
+// 'DISCOVER' => 'Discover',
+// 'GIROPAY' => 'Giropay',
+// 'IDEAL' => 'iDeal',
+// 'INVOICE' => 'Invoice',
+// 'JCB' => 'JCB',
+// 'MAESTRO' => 'Maestro',
+ 'MASTER' => 'MasterCard',
+// 'PASTEANDPAY_V' => 'PasteAndPay',
+// 'PAYPAL' => 'PayPal',
+// 'POSTEPAY' => 'PostePay',
+// 'SOFORTUEBERWEISUNG' => 'sofort Überweisung',
+// 'UKASH' => 'Ukash',
+ 'VISA' => 'Visa',
+// 'VISADEBIT' => 'Visa Debit',
+// 'VISAELECTRON' => 'Visa Electron',
+// 'VPAY' => 'V PAY',
+// 'VSTATION_V' => 'Voucher Station',
+// 'AXESS' => 'AXESS',
+// 'BONUS' => 'Bonus',
+// 'MAXIMUM' => 'Maximum',
+// 'WORLD' => 'World',
+// 'CARDFINANS' => 'CardFinans',
+// 'ADVANTAGE' => 'Advantage',
+// 'QOOQO' => 'Qooqo',
+// 'KLARNA_INVOICE' => 'Klarna Invoice',
+// 'KLARNA_INSTALLMENTS' => 'Klarna Installments',
+// 'ASYACARD' => 'AsyaCard'
+), @explode(' ', $this->get_option('wpsg_mod_icp_paymenttypes')), array('multiple' => '3', 'help' => 'wpsg_mod_icp_paymenttypes', 'hint' => __('STRG für Mehrfachauswahl', 'wpsg'))); */ ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_icp_paymenttypes', __('Zahlungsarten', 'wpsg'), $this->get_option('wpsg_mod_icp_paymenttypes'), array('help' => 'wpsg_mod_icp_paymenttypes')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_icp_name', __('Bezeichnung der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_icp_name'), array('help' => 'wpsg_mod_icp_name')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_icp_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_icp_hint'), array('help' => 'wpsg_mod_icp_hint')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_icp_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_icp_logo'), array('help' => 'wpsg_mod_icp_logo')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_icp_language', __('Sprache', 'wpsg'), array(
+ 'auto' => __('Automatisch', 'wpsg'),
+ 'de' => __('Deutsch', 'wpsg'),
+ 'en' => __('Englisch', 'wpsg')
+), $this->get_option('wpsg_mod_icp_language'), array('help' => 'wpsg_mod_icp_language')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_icp_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_icp_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_icp_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_icp_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_icp_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_icp_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
+<br />
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_icp_successPage', __('Seite nach erfolgreicher Zahlung', 'wpsg'), $this->view['wpsg_mod_icp']['arPages'], $this->get_option('wpsg_mod_icp_successPage'), array('help' => 'wpsg_mod_icp_successPage')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_icp_errorPage', __('Seite nach fehlgeschlagener Zahlung', 'wpsg'), $this->view['wpsg_mod_icp']['arPages'], $this->get_option('wpsg_mod_icp_errorPage'), array('help' => 'wpsg_mod_icp_errorPage')); ?>
+
+<br /><div class="wpsg_hinweis"><?php echo __('Die verfügbaren Zahlungsarten müssen mit <a href="http://www.kreditkartenanbieter-fuer-onlineshop.de/">ICP Onlinepayments</a> vereinbart werden.', 'wpsg'); ?></div>
diff --git a/views/mods/mod_invoice_type/settings_edit.phtml b/views/mods/mod_invoice_type/settings_edit.phtml
new file mode 100644
index 0000000..25a96c3
--- /dev/null
+++ b/views/mods/mod_invoice_type/settings_edit.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Einstellungen für das Zahlungsmodul "Rechnung"
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_invoice_type_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_invoice_type_bezeichnung'), array('help' => 'wpsg_mod_invoice_type_bezeichnung')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_invoide_type_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_invoide_type_aktiv'), array('help' => 'wpsg_mod_invoice_type_aktiv')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_invoice_type_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_invoice_type_hint'), array('help' => 'wpsg_mod_invoice_type_hint')); ?>
+
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_invoice_type_gebuehr', __('Gebühr/ Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_invoice_type_gebuehr'), true), array('help' => 'wpsg_mod_invoice_type_gebuehr','unit' => $this->get_option('wpsg_currency').' / %')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_invoice_type_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_invoice_type_mwst'), array('help' => 'wpsg_mod_invoice_type_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_invoice_type_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_invoice_type_mwstland'), array('help' => 'wpsg_mod_invoice_type_mwstland')); ?> \ No newline at end of file
diff --git a/views/mods/mod_keygen/settings_edit.phtml b/views/mods/mod_keygen/settings_edit.phtml
new file mode 100644
index 0000000..46fc904
--- /dev/null
+++ b/views/mods/mod_keygen/settings_edit.phtml
@@ -0,0 +1,119 @@
+<?php
+
+ /**
+ * Template für die Einstellungsseite des keygen Moduls
+ */
+
+?>
+
+<form name="form1" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module&amp;modul=<?php echo $_REQUEST['modul']; ?>&amp;noheader=1" method="post" enctype="multipart/form-data">
+
+ <?php echo wpsg_drawForm_Select('wpsg_mod_keygen[wpsg_mod_keygen_anwendung]', __('Anwendung', 'wpsg'), array('wpShopGermany' => __('wpShopGermany', 'wpsg'), 'wpNewsletterGermany' => __('wpNewsletterGermany', 'wpsg')), ((isset($_SESSION['wpsg_mod_keygen']['wpsg_mod_keygen_anwendung']))?$_SESSION['wpsg_mod_keygen']['wpsg_mod_keygen_anwendung']:'')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_keygen[wpsg_mod_keygen_nr]', __('Schlüsselnummer', 'wpsg'), ((isset($_SESSION['wpsg_mod_keygen']['wpsg_mod_keygen_nr']))?$_SESSION['wpsg_mod_keygen']['wpsg_mod_keygen_nr']:'')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_keygen[wpsg_mod_keygen_lizenz]', __('Lizenz', 'wpsg'), array('1' => 'Light', '2' => 'Pro', '3' => 'Enterprise'), ((isset($_SESSION['wpsg_mod_keygen']['wpsg_mod_keygen_lizenz']))?$_SESSION['wpsg_mod_keygen']['wpsg_mod_keygen_lizenz']:'1')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_keygen[wpsg_mod_keygen_date]', __('Enddatum (tt.mm.jjjj)', 'wpsg'), ((isset($_SESSION['wpsg_mod_keygen']['wpsg_mod_keygen_date']))?$_SESSION['wpsg_mod_keygen']['wpsg_mod_keygen_date']:'99.99.9999')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_keygen[wpsg_mod_keygen_maxver]', __('Maximale Versionsnummer', 'wpsg'), ((isset($_SESSION['wpsg_mod_keygen']['wpsg_mod_keygen_maxver']))?$_SESSION['wpsg_mod_keygen']['wpsg_mod_keygen_maxver']:'9.9.9')); ?>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Module', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_rechnungen'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_rechnungen" />&nbsp;<?php echo __('Rechnungsmodul', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_downloadplus'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_downloadplus" />&nbsp;<?php echo __('Downloadplus', 'wpsg'); ?>
+ </label><br />
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_statistics'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_statistics" />&nbsp;<?php echo __('Statistikmodul', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_produktartikel'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_produktartikel" />&nbsp;<?php echo __('Produktartikel', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_videodownload'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_videodownload" />&nbsp;<?php echo __('Videodownloadmodul', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_ordercondition'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_ordercondition" />&nbsp;<?php echo __('Bestellbedingung', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_voucherproduct'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_voucherproduct" />&nbsp;<?php echo __('Gutscheinprodukt', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_orderupload'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_orderupload" />&nbsp;<?php echo __('Bestellupload', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_deliverynote'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_deliverynote" />&nbsp;<?php echo __('Lieferschein', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_abo'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_abo" />&nbsp;<?php echo __('Abo Produkte', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_shs'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_shs" />&nbsp;<?php echo __('Internetkasse', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_customergroup'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_customergroup" />&nbsp;<?php echo __('Kundengruppen', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_packagetracking'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_packagetracking" />&nbsp;<?php echo __('Paketverfolgung', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_request'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_request" />&nbsp;<?php echo __('Anfrage Produkte', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_minquantity'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_minquantity" />&nbsp;<?php echo __('Mindestbestellmenge', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_minrequest'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_minrequest" />&nbsp;<?php echo __('Mindestbestellwert', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ <label style="line-height:25px;">
+ <input class="checkbox" type="checkbox" name="wpsg_mod_keygen[mods][]" <?php echo ((@$_SESSION['wpsg_mod_keygen']['mods']['wpsg_mod_paypalapi'] == '1')?'checked="checked"':''); ?> value="wpsg_mod_paypalapi" />&nbsp;<?php echo __('PayPal PLUS', 'wpsg'); ?>
+ </label>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+
+ <input type="hidden" name="aktiv" value="1" />
+ <input type="hidden" name="wpsg_genkey" value="1" />
+
+ <p class="submit"><input type="submit" value="<?php echo __('Key generieren', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
+
+</form>
+
+<br />
+
+<form name="form1" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module&amp;modul=<?php echo $_REQUEST['modul']; ?>&amp;noheader=1" method="post" enctype="multipart/form-data">
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Module', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input type="file" name="testkey" />
+ </div>
+ </div>
+
+ <br />
+
+ <input type="hidden" name="aktiv" value="1" />
+
+ <p class="submit"><input type="submit" value="<?php echo __('Key testen', 'wpsg'); ?>" class="button-primary" id="submit" name="submit">
+
+</form>
diff --git a/views/mods/mod_klarna/gfx/klarna_rechnung.png b/views/mods/mod_klarna/gfx/klarna_rechnung.png
new file mode 100644
index 0000000..70f3963
--- /dev/null
+++ b/views/mods/mod_klarna/gfx/klarna_rechnung.png
Binary files differ
diff --git a/views/mods/mod_klarna/gfx/logo_100x25.png b/views/mods/mod_klarna/gfx/logo_100x25.png
new file mode 100644
index 0000000..b03852f
--- /dev/null
+++ b/views/mods/mod_klarna/gfx/logo_100x25.png
Binary files differ
diff --git a/views/mods/mod_klarna/settings_edit.phtml b/views/mods/mod_klarna/settings_edit.phtml
new file mode 100644
index 0000000..1085fcc
--- /dev/null
+++ b/views/mods/mod_klarna/settings_edit.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Klarna Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_klarna_bezeichnung'), array('help' => 'wpsg_mod_klarna_bezeichnung')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_klarna_aktiv'), array('help' => 'wpsg_mod_klarna_aktiv')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_aktiv_from', __('Aktiv ab Betrag', 'wpsg'), $this->get_option('wpsg_mod_klarna_aktiv_from'), array('help' => 'wpsg_mod_klarna_aktiv_from')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_aktiv_to', __('Aktiv bis Betrag', 'wpsg'), $this->get_option('wpsg_mod_klarna_aktiv_to'), array('help' => 'wpsg_mod_klarna_aktiv_to')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_klarna_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_klarna_hint'), array('help' => 'wpsg_mod_klarna_hint')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_merchantID', __('Händler ID (Merchant ID)', 'wpsg'), $this->get_option('wpsg_mod_klarna_merchantID'), array('help' => 'wpsg_mod_klarna_merchantID')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_sharedSecret', __('Geheimnis', 'wpsg'), $this->get_option('wpsg_mod_klarna_sharedSecret'), array('help' => 'wpsg_mod_klarna_sharedSecret')); ?>
+<br />
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_sandbox', __('Sandboxmodus', 'wpsg'), $this->get_option('wpsg_mod_klarna_sandbox'), array('help' => 'wpsg_mod_klarna_sandbox')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_gebuehr', __('Gebühr', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_klarna_gebuehr'), true), array('help' => 'wpsg_mod_klarna_gebuehr','unit' => $this->get_option('wpsg_currency').' / %')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_klarna_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_klarna_mwst'), array('help' => 'wpsg_mod_klarna_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_klarna_mwstland'), array('help' => 'wpsg_mod_klarna_mwstland')); ?>
+<br />
+<?php echo wpsg_drawForm_Select('wpsg_mod_klarna_success', __('Erfolgsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_klarna_success'), array('help' => 'wpsg_mod_klarna_success')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_klarna_error', __('Fehlerseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_klarna_error'), array('help' => 'wpsg_mod_klarna_error')); ?>
+
diff --git a/views/mods/mod_kundenkontakt/order_view.phtml b/views/mods/mod_kundenkontakt/order_view.phtml
new file mode 100644
index 0000000..fbe8b24
--- /dev/null
+++ b/views/mods/mod_kundenkontakt/order_view.phtml
@@ -0,0 +1,184 @@
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ kk_switchTemplate();
+
+ } );
+
+ /**
+ *
+ */
+ function kk_switchTemplate()
+ {
+
+ var template_val = jQuery("#kk_template").val();
+
+ if (template_val != "-1")
+ {
+
+ jQuery.ajax( {
+ url: "<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_kundenkontakt&edit_id='.$this->view['data']['id'].'&noheader=1&do=kk_switchTemplate' ?>",
+ dataType: 'json',
+ data: {
+ template_file: template_val
+ },
+ success: function(data) {
+
+ jQuery("#kk_subject").val(data.subject);
+
+ <?php if ($this->get_option('wpsg_htmlmail') === '1') { ?>
+ jQuery('#kk_html').html(data.content);
+ tinyMCE.get("kk_html").setContent(data.content);
+ <?php } else { ?>
+ jQuery("#kk_text").text(data.content);
+ <?php } ?>
+
+ }
+ } );
+
+ }
+ else
+ {
+
+ jQuery("#kk_subject").val('');
+ jQuery("#kk_template").val(-1);
+
+ <?php if ($this->get_option('wpsg_htmlmail') === '1') { ?>
+ jQuery('#kk_html').html('');
+ //tinyMCE.get("kk_html").setContent('');
+ <?php } else { ?>
+ jQuery("#kk_text").text('');
+ <?php } ?>
+
+ }
+
+ }
+
+ /**
+ *
+ */
+ function kk_sendMail()
+ {
+
+ if (jQuery('#kk_subject').val() == '')
+ {
+
+ alert("<?php echo __('Bitte einen Betreff angeben!', 'wpsg'); ?>");
+ return;
+
+ }
+
+ if (jQuery('#kk_text').val() == '')
+ {
+
+ alert("<?php echo __('Bitte einen Text angeben!', 'wpsg'); ?>");
+ return;
+
+ }
+
+ var text = "";
+
+ <?php if ($this->get_option('wpsg_htmlmail') === '1') { ?>
+ text = tinyMCE.get('kk_html').getContent();
+ <?php } else { ?>
+ text = jQuery('#kk_text').val();
+ <?php } ?>
+
+ jQuery.ajax( {
+ url: "<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_kundenkontakt&edit_id='.$this->view['data']['id'].'&noheader=1&do=kk_sendMail' ?>",
+ method: 'post',
+ data: {
+ text: text,
+ absendermail: jQuery('#kk_absendermail').val(),
+ absendername: jQuery('#kk_absendername').val(),
+ subject: jQuery('#kk_subject').val(),
+ empfaenger: "<?php echo $this->view['data']['email']; ?>"
+ },
+ success: function(data) {
+
+ if (data != '1')
+ {
+ alert("<?php echo __("Mail konnte nicht versendet werden es ist ein Fehler aufgetreten!", "wpsg"); ?>");
+ }
+ else
+ {
+
+ <?php if ($this->get_option('wpsg_htmlmail') === '1') { ?>
+ tinyMCE.get('kk_html').setContent('');
+ <?php } else { ?>
+ jQuery('#kk_text').html('');
+ <?php } ?>
+
+ jQuery('#kk_subject').val('');
+ jQuery('#kk_absendermail').val('');
+ jQuery('#kk_absendername').val('');
+ jQuery('#kk_template').val(-1);
+
+ alert("<?php echo __('Mail wurde erfolgreich an den Kunden gesendet.', 'wpsg'); ?>");
+
+ location.reload();
+
+ }
+
+ }
+
+ } );
+
+ }
+
+
+</script>
+<?php //wpsg_debug($this->view) ?>
+<div class="postbox" id="wpsg_kundenkontakt">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Kundenkontakt', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <div style="padding:5px;">
+
+ <form method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_kundenkontakt&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1">
+
+ <label>
+ <?php echo __("Template", "wpsg"); ?>:
+ <select name="kk_template" style="width:50%; float:right;" id="kk_template" onchange="kk_switchTemplate();">
+ <option value="-1"><?php echo __("Bitte auswählen", "wpsg"); ?></option>
+ <?php foreach ($this->view['arTemplates'] as $k => $v) { ?>
+ <option value="<?php echo rawurlencode($v['filename']); ?>"><?php echo htmlspecialchars($v['name']); ?></option>
+ <?php } ?>
+ </select>
+ </label>
+ <div class="wpsg_clear"></div>
+
+ <label>
+ <?php echo __("Betreff", "wpsg"); ?>:
+ <input type="text" name="kk_subject" style="width:50%; float:right;" id="kk_subject" />
+ </label>
+ <div class="wpsg_clear"></div>
+
+ <?php if ($this->get_option('wpsg_htmlmail') === '1') { ?>
+
+ <?php echo __('Text (HTML)', 'wpsg'); ?>:<br /><br />
+
+ <?php wp_editor('', 'kk_html'); ?>
+
+
+ <div class="wpsg_clear"></div>
+ <?php } else { ?>
+ <label>
+ <?php echo __("Text", "wpsg"); ?>:<br />
+ <textarea id="kk_text" style="width:100%; float:right; height:150px;"></textarea>
+ </label>
+ <div class="wpsg_clear"></div>
+ <?php } ?>
+
+ <br />
+ <input type="button" class="button" onclick="kk_sendMail(); return false;" value="<?php echo __("Absenden", "wpsg"); ?>" style="float:right;" />
+ <div class="wpsg_clear"></div>
+
+ </form>
+
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung.phtml b/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung.phtml
new file mode 100644
index 0000000..eb6d61f
--- /dev/null
+++ b/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung.phtml
@@ -0,0 +1,30 @@
+<?php
+
+ global $template_name, $template_betreff, $absender_name, $absender_email;
+
+ /**
+ * Betreff des Templates
+ */
+
+ $template_betreff = __('wpShopGermany: Zahlungsaufforderung', 'wpsg');
+
+ /*
+ * $this->view['basket'] enthält Angaben über den Warenlorb
+ * $this->view['kunde'] Enthält den Kundendatensatz aus der Datenbank
+ * $this->view['order'] Enthält den Bestelldatensatz aus der Datenbank
+ * $this->view['datum'] Enthält das aktuelle Datum (Timestemp)
+ */
+
+?><?php echo __('Hallo', 'wpsg') ?> <?php echo $this->view['kunde']['vname']; ?> <?php echo $this->view['kunde']['name']; ?>,
+
+<?php echo __('Sie sind Ihren Zahlungsverpflichtungen nicht nachgekommen. Bitte begleichen Sie umgehend den Rechnungsbetrag von', 'wpsg') ?> <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?>
+
+<?php echo __('Bestelldaten', 'wpsg'); ?>:
+%basket_txt%
+
+<?php echo __('Nutzen Sie bitte folgenden Link um den Zahlvorgang abschließen zu können', 'wpsg'); ?>:
+<?php echo $this->getDoneURL($this->view['order']['id']); ?>
+
+<?php echo __('Mit freundlichen Grüßen', 'wpsg') ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung_html.phtml b/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung_html.phtml
new file mode 100644
index 0000000..97045d5
--- /dev/null
+++ b/views/mods/mod_kundenkontakt/templates/zahlungsaufforderung_html.phtml
@@ -0,0 +1,35 @@
+<?php
+
+ global $template_name, $template_betreff, $absender_name, $absender_email;
+
+ /**
+ * Betreff des Templates
+ */
+
+ $template_betreff = __('wpShopGermany: Zahlungsaufforderung', 'wpsg');
+
+ /*
+ * $this->view['basket'] enthält Angaben über den Warenlorb
+ * $this->view['kunde'] Enthält den Kundendatensatz aus der Datenbank
+ * $this->view['order'] Enthält den Bestelldatensatz aus der Datenbank
+ * $this->view['datum'] Enthält das aktuelle Datum (Timestemp)
+ */
+
+?><p><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['kunde']['vname']; ?> <?php echo $this->view['kunde']['name']; ?>,</p>
+
+<p><?php echo __('Sie sind Ihren Zahlungsverpflichtungen nicht nachgekommen. Bitte begleichen Sie umgehend den Rechnungsbetrag von', 'wpsg') ?> <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?>.</p>
+
+<h2><?php echo __('Bestelldaten', 'wpsg'); ?></h2>
+
+%basket_html%
+
+<br />
+
+<p>
+ <?php echo __('Nutzen Sie bitte folgenden Link um den Zahlvorgang abschließen zu können', 'wpsg'); ?>:
+ <a href="<?php echo $this->getDoneURL($this->view['order']['id']); ?>"><?php echo __('Bestellabschlußseite', 'wpsg'); ?></a>
+</p>
+
+<p><?php echo __("Mit freundlichen Grüßen", "wpsg"); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_kundenkontakt/templates/zahlungserinnerung.phtml b/views/mods/mod_kundenkontakt/templates/zahlungserinnerung.phtml
new file mode 100644
index 0000000..e36ceb5
--- /dev/null
+++ b/views/mods/mod_kundenkontakt/templates/zahlungserinnerung.phtml
@@ -0,0 +1,30 @@
+<?php
+
+ global $template_name, $template_betreff, $absender_name, $absender_email;
+
+ /**
+ * Betreff des Templates
+ */
+
+ $template_betreff = __('wpShopGermany: Zahlungserinnerung', 'wpsg');
+
+ /*
+ * $this->view['basket'] enthält Angaben über den Warenlorb
+ * $this->view['kunde'] Enthält den Kundendatensatz aus der Datenbank
+ * $this->view['order'] Enthält den Bestelldatensatz aus der Datenbank
+ * $this->view['datum'] Enthält das aktuelle Datum (Timestemp)
+ */
+
+?><?php echo __('Hallo', 'wpsg') ?> <?php echo $this->view['kunde']['vname']; ?> <?php echo $this->view['kunde']['name']; ?>,
+
+<?php echo __('Sie haben am', 'wpsg') ?> <?php echo date("d.m.Y | H:i", strtotime($this->view['order']['cdate'])); ?> <?php echo __('eine Bestellung über', 'wpsg') ?> <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?> <?php echo __('aufgegeben. Leider ist bis heute kein Zahlungsausgleich erfolgt. Gab es Probleme mit der Zahlung? Gerne helfen wir Ihnen weiter! Oder dürfen wir die Bestellung für Sie stornieren?', 'wpsg') ?>
+
+<?php echo __('Bestelldaten', 'wpsg'); ?>:
+%basket_txt%
+
+<?php echo __('Nutzen Sie bitte folgenden Link um den Zahlvorgang abschließen zu können', 'wpsg'); ?>:
+<?php echo $this->getDoneURL($this->view['order']['id']); ?>
+
+<?php echo __('Mit freundlichen Grüßen', 'wpsg') ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_kundenkontakt/templates/zahlungserinnerung_html.phtml b/views/mods/mod_kundenkontakt/templates/zahlungserinnerung_html.phtml
new file mode 100644
index 0000000..2e54f59
--- /dev/null
+++ b/views/mods/mod_kundenkontakt/templates/zahlungserinnerung_html.phtml
@@ -0,0 +1,34 @@
+<?php
+
+ global $template_name, $template_betreff, $absender_name, $absender_email;
+
+ /**
+ * Betreff des Templates
+ */
+ $template_betreff = __('wpShopGermany: Zahlungserinnerung', 'wpsg');
+
+ /*
+ * $this->view['basket'] enthält Angaben über den Warenlorb
+ * $this->view['kunde'] Enthält den Kundendatensatz aus der Datenbank
+ * $this->view['order'] Enthält den Bestelldatensatz aus der Datenbank
+ * $this->view['datum'] Enthält das aktuelle Datum (Timestemp)
+ */
+
+?><p><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['kunde']['vname']; ?> <?php echo $this->view['kunde']['name']; ?>,</p>
+
+<p><?php echo __('Sie haben am', 'wpsg') ?> <?php echo date("d.m.Y | H:i", strtotime($this->view['data']['cdate'])); ?> <?php echo __('eine Bestellung über', 'wpsg') ?> <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?> <?php echo __('aufgegeben. Leider ist bis heute kein Zahlungsausgleich erfolgt. Gab es Probleme mit der Zahlung? Gerne helfen wir Ihnen weiter! Oder dürfen wir die Bestellung für Sie stornieren?', 'wpsg') ?></p>
+
+<h2><?php echo __('Bestelldaten', 'wpsg'); ?></h2>
+
+%basket_html%
+
+<br />
+
+<p>
+ <?php echo __('Nutzen Sie bitte folgenden Link um den Zahlvorgang abschließen zu können', 'wpsg'); ?>:
+ <a href="<?php echo $this->getDoneURL($this->view['order']['id']); ?>"><?php echo __('Bestellabschlußseite', 'wpsg'); ?></a>
+</p>
+
+<p><?php echo __("Mit freundlichen Grüßen", "wpsg"); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/admin_setcapabilities.phtml b/views/mods/mod_kundenverwaltung/admin_setcapabilities.phtml
new file mode 100644
index 0000000..39b4838
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/admin_setcapabilities.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template für die Integration in die Verwaltung der Berechtigungen
+ */
+
+ global $wpdb; $arRoles = get_option($wpdb->prefix."user_roles");
+
+?>
+<tr>
+ <td class="wpsg_col_capname"><?php echo __('Kundenverwaltung', 'wpsg'); ?></td>
+ <?php foreach ($arRoles as $role_key => $r) { ?>
+ <td class="wpsg_col_cap">
+ <input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_customer]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_customer']) && $r['capabilities']['wpsg_customer'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_customer]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/checkout_customer_inner.phtml b/views/mods/mod_kundenverwaltung/checkout_customer_inner.phtml
new file mode 100644
index 0000000..093024b
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/checkout_customer_inner.phtml
@@ -0,0 +1,23 @@
+<?php
+
+ /**
+ * Template für die Registrierung während des Checkouts
+ * wird von checkout.phtml eingebunden
+ */
+
+?>
+<div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_pwd1"><?php echo __("Passwort", "wpsg"); ?>
+ <?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_checkout <?php echo (($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1')?'validate[required]':''); ?> <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="mod_kundenverwaltung_pwd1" name="wpsg[mod_kundenverwaltung][pwd1]" value="" />
+</div>
+
+<div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_pwd2"><?php echo __("Passwort wiederholen", "wpsg"); ?>
+ <?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_checkout <?php echo (($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1')?'validate[required]':''); ?> <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pwd2" name="wpsg[mod_kundenverwaltung][pwd2]" value="" />
+</div>
+
+<div class="wpsg_clear"></div> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/checkout_login.phtml b/views/mods/mod_kundenverwaltung/checkout_login.phtml
new file mode 100644
index 0000000..855449c
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/checkout_login.phtml
@@ -0,0 +1,32 @@
+<?php
+
+ /**
+ * Template für die Integration des Login Formulares in den Checkout
+ * wird von checkout.phtml eingebunden
+ */
+
+?>
+<div class="wpsg_box">
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_email"><?php echo __("E-Mail Adresse", "wpsg"); ?>:
+ </label>
+ <input class="wpsg_checkout <?php echo ((in_array("wpsg_mod_kundenverwaltung_email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_mod_kundenverwaltung_email" name="wpsg[mod_kundenverwaltung][email]" value="" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_password"><?php echo __("Passwort", "wpsg"); ?>:
+ </label>
+ <input class="wpsg_checkout <?php echo ((in_array("wpsg_mod_kundenverwaltung_password", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_password" name="wpsg[mod_kundenverwaltung][password]" value="" />
+ </div>
+
+ <br />
+
+ <div class="wpsg_checkoutblock">
+ <a class="wpsg_pwdvergessen_link" href="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getPwdVergessenURL'); ?>">Passwort vergessen?</a>
+ <input type="submit" class="wpsg_button wpsg_mod_kundenverwaltung_login" value="<?php echo __('Login', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_login" />
+ </div>
+
+ <div class="wpsg_clearer"></div><br />
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/checkout_logout.phtml b/views/mods/mod_kundenverwaltung/checkout_logout.phtml
new file mode 100644
index 0000000..b23a0bd
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/checkout_logout.phtml
@@ -0,0 +1,16 @@
+<?php
+
+ /**
+ * Template für die Integration des Logout Buttons in den Checkout
+ * wird von checkout.phtml eingebunden
+ */
+
+?>
+<div class="wpsg_checkout wpsg_logout_box">
+ <?php echo __('Hallo','wpsg');?>
+ <?php echo wpsg_hspc(($this->view['basket']['checkout']['title'] != '' && $this->view['basket']['checkout']['title'] != '-1')?$this->view['basket']['checkout']['title']:''); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['vname']); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['name']); ?>
+ <a href="<?php echo $this->getUrl(wpsg_ShopController::URL_LOGOUT); ?>"><?php echo __('Abmelden', 'wpsg'); ?></a>
+
+ <div class="wpsg_clearer"></div><br />
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/edit.phtml b/views/mods/mod_kundenverwaltung/edit.phtml
new file mode 100644
index 0000000..d550f0f
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/edit.phtml
@@ -0,0 +1,260 @@
+<?php
+
+ /**
+ * Template für die Bearbeitung eines Kunden im Backend
+ */
+
+?>
+<script type="text/javascript">
+/* <![CDATA[ */
+
+ jQuery(document).ready( function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ jQuery("#normal-sortables, #side-sortables").sortable({
+ connectWith: ".meta-box-sortables",
+ placeholder: 'wpsg_placeholder',
+ dropOnEmpty: true,
+ cursor: 'move',
+ handle: '.wpsg_handlediv',
+ grid: [50, 20],
+ forceHelperSize: true,
+ forcePlaceholderSize: true,
+ opacity: 0.8,
+ stop: function(e,ui) {
+
+ var ser = jQuery("#normal-sortables").sortable("serialize");
+ ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
+
+ jQuery.cookie('wpsg_customer_view_normal', ser);
+
+ var ser = jQuery("#side-sortables").sortable("serialize");
+ ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
+
+ jQuery.cookie('wpsg_customer_view_side', ser);
+
+ },
+ receive: function(e, ui) {
+ }
+ });
+
+ if (jQuery.cookie('wpsg_customer_view_normal') != null)
+ {
+
+ var divs = jQuery.cookie('wpsg_customer_view_normal').split(',').reverse();
+
+ for (index in divs)
+ {
+
+ jQuery('#normal-sortables').prepend(jQuery('#wpsg_' + divs[index]));
+
+ }
+
+ }
+
+ if (jQuery.cookie('wpsg_customer_view_side') != null)
+ {
+
+ var divs = jQuery.cookie('wpsg_customer_view_side').split(',').reverse();
+
+ for (index in divs)
+ {
+
+ jQuery('#side-sortables').prepend(jQuery('#wpsg_' + divs[index]));
+
+ }
+
+ }
+
+ jQuery('.wpsg_handlediv').bind('click', function() {
+ jQuery(this).next().toggle();
+
+ var arClose = new Array();
+ jQuery('.wpsg_customer_view .postbox .inside:hidden').each(function() {
+ arClose.push(jQuery(this).parent().attr("id"));
+ } );
+
+ jQuery.cookie('wpsg_customer_closed', arClose.join(','));
+
+ } );
+
+ if (jQuery.cookie('wpsg_customer_closed') != null)
+ {
+
+ var arClose = jQuery.cookie('wpsg_customer_closed').split(',');
+
+ for (index in arClose)
+ {
+
+ jQuery('#' + arClose[index] + ' .inside').hide();
+
+ }
+
+ }
+
+ } );
+
+/* ]]> */
+</script>
+
+<div class="wrap columns-2 wpsg_produkt_addedit wpsg_customer_view">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
+ <h2>
+ <?php echo wpsg_hspc($this->view['data']['vname'].' '.$this->view['data']['name']); ?>
+ </h2>
+ <br />
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;action=save&amp;noheader=1" enctype="multipart/form-data">
+
+ <div id="postbox" class="metabox-holder has-right-sidebar">
+
+ <div id="side-info-column" class="inner-sidebar" style="width:386px;">
+ <div id="side-sortables" class="meta-box-sortables ui-sortable" style="width:380px;">
+
+ <div id="wpsg_customerpasswd" class="postbox">
+ <div class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></div>
+ <h3 class="wpsg_handlediv">
+ <span><?php echo __('Passwortänderung', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Input('password1', __('Passwort', 'wpsg'), ''); ?>
+ <?php echo wpsg_drawForm_Input('password2', __('Wiederholung', 'wpsg'), ''); ?>
+ </div>
+ </div>
+
+ <div id="wpsg_customerstats" class="postbox">
+ <div class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></div>
+ <h3 class="wpsg_handlediv">
+ <span><?php echo __('Information', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left"><?php echo __('Bestellungen', 'wpsg'); ?>:</div>
+ <div class="wpsg_form_right">
+ <p>
+ <?php echo $this->view['data']['countOrder']; ?>
+ <?php if ($this->view['data']['countOrder'] > 0) { ?>
+ [ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter%5Bk_id%5D=<?php echo $this->view['data']['id']; ?>"><?php echo __('Bestellungen anzeigen', 'wpsg'); ?></a> ]
+ <?php } ?>
+ </p>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left"><?php echo __('Letzte Bestellung', 'wpsg'); ?>:</div>
+ <div class="wpsg_form_right"><p><?php echo wpsg_formatTimestamp(strtotime($this->view['data']['lastorder'])); ?></p></div>
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php if ($this->hasMod('wpsg_mod_statistics')) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left"><?php echo wpsg_translate(__('Umsatz in #1#', 'wpsg'), $this->get_option('wpsg_currency')); ?>:</div>
+ <div class="wpsg_form_right wpsg_mod_kundenverwaltung_customeramount">
+ <p>
+ <?php
+ echo wpsg_translate(__('<a href="#1#" title="Storniert" class="wpsg_storno">#2#</a> / <a href="#3#" title="Offen" class="wpsg_open">#4#</a> / <a href="#5#" title="Bezahlt" class="wpsg_payed">#6#</a>', 'wpsg'),
+ WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&filter[status]=500&filter[k_id]='.$this->view['data']['id'],
+ wpsg_ff($this->view['amountStorno']),
+ WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&filter[status]=0&filter[k_id]='.$this->view['data']['id'],
+ wpsg_ff($this->view['amountAll'] - $this->view['amountStorno'] - $this->view['amountPayed']),
+ WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&filter[status]=100,110&filter[k_id]='.$this->view['data']['id'],
+ wpsg_ff($this->view['amountPayed'])
+ );
+ ?>
+ </p>
+ </div>
+ </div>
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+
+ <?php if (wpsg_isSizedArray($this->view['pflicht']['custom'])) { ?>
+ <div id="wpsg_customercustomfields" class="postbox">
+ <div class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></div>
+ <h3 class="wpsg_handlediv">
+ <span><?php echo __('Benutzerdefinierte Felder', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php foreach ($this->view['pflicht']['custom'] as $c_id => $c) { ?>
+ <?php if ($c['typ'] == '0') { // Textfeld ?>
+ <?php echo wpsg_drawForm_Input('custom['.$c_id.']', __($c['name'], 'wpsg'), @$this->view['data']['custom'][$c_id]); ?>
+ <?php } else if ($c['typ'] == '1') { // Auswahl ?>
+ <?php echo wpsg_drawForm_Select('custom['.$c_id.']', __($c['name'], 'wpsg'), wpsg_array_merge(array('' => __('Keine Auswahl', 'wpsg')), explode('|', $c['auswahl'])), @$this->view['data']['custom'][$c_id], array('noIndex' => true)); ?>
+ <?php } else if ($c['typ'] == '2') { // Checkbox?>
+ <?php echo wpsg_drawForm_Checkbox('custom['.$c_id.']', __($c['name'], 'wpsg'), @$this->view['data']['custom'][$c_id]); ?>
+ <?php } ?>
+ <?php } ?>
+ </div>
+ </div>
+ <?php } ?>
+
+ <?php $this->callMods('wpsg_mod_customer_sidebar', array(&$this->view['data'])); ?>
+
+ </div>
+ </div>
+
+ <div id="post-body">
+
+ <div id="normal-sortables" class="meta-box-sortables" style="margin-right:400px;">
+
+ <div id="wpsg_customeraddress" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Name/Anschrift', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Input('knr', __('Kundennummer', 'wpsg'), $this->view['data']['knr']); ?>
+
+ <?php if ($this->hasMod('wpsg_mod_customergroup')) { ?>
+ <?php echo wpsg_drawForm_Select('group_id', __('Kundengruppe', 'wpsg'), $this->view['arCustomergroup'], $this->view['data']['group_id']); ?>
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_Select('title', __('Anrede', 'wpsg'), $this->view['arTitles'], $this->view['data']['title'], array('noIndex' => true)); ?>
+ <?php echo wpsg_drawForm_Input('name', __('Name', 'wpsg'), $this->view['data']['name']); ?>
+ <?php echo wpsg_drawForm_Input('vname', __('Vorname', 'wpsg'), $this->view['data']['vname']); ?>
+ <?php echo wpsg_drawForm_Input('geb', __('Geburtsdatum', 'wpsg'), wpsg_formatTimestamp(strtotime($this->view['data']['geb']), true), array('datepicker' => true, 'hint' => __('Format: TT.MM.JJJJ', 'wpsg'))); ?>
+ <?php echo wpsg_drawForm_Input('email', __('E-Mail', 'wpsg'), $this->view['data']['email']); ?>
+ <?php echo wpsg_drawForm_Input('firma', __('Firma', 'wpsg'), $this->view['data']['firma']); ?>
+ <?php echo wpsg_drawForm_Input('tel', __('Telefon', 'wpsg'), $this->view['data']['tel']); ?>
+ <?php echo wpsg_drawForm_Input('fax', __('Fax', 'wpsg'), $this->view['data']['fax']); ?>
+ <?php echo wpsg_drawForm_Input('strasse', __('Straße', 'wpsg'), $this->view['data']['strasse']); ?>
+ <?php echo wpsg_drawForm_Input('plz', __('PLZ', 'wpsg'), $this->view['data']['plz']); ?>
+ <?php echo wpsg_drawForm_Input('ort', __('Ort', 'wpsg'), $this->view['data']['ort']); ?>
+ <?php echo wpsg_drawForm_Select('land', __('Land', 'wpsg'), $this->view['arLand'], $this->view['data']['land']); ?>
+ <?php echo wpsg_drawForm_Input('ustidnr', __('UStIdNr.', 'wpsg'), $this->view['data']['ustidnr']); ?>
+ <?php echo wpsg_drawForm_Select('status', __('Status', 'wpsg'), array('inaktiv', 'aktiv'), $this->view['data']['status'], array()); ?>
+ <?php echo wpsg_drawForm_Checkbox('info-mail', __('Mail bei Statusänderung', 'wpsg'), '', array()); ?>
+ </div>
+ </div>
+
+ <div id="wpsg_customercomment" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Kundenkommentar', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <textarea name="comment"><?php echo wpsg_hspc($this->view['data']['comment']); ?></textarea>
+ </div>
+ </div>
+
+ </div>
+
+ <?php if ($_REQUEST['edit_id'] > 0) { ?>
+ <input type="hidden" name="edit_id" value="<?php echo $_REQUEST['edit_id']; ?>" />
+ <?php } ?>
+
+ <p class="submit">
+ <input type="submit" value="<?php echo __('Kunde speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
+ <input type="submit" value="<?php echo __('Kunde speichern und zur Übersicht', 'wpsg'); ?>" class="button-primary" id="submit_index" name="submit_index" />
+ </p>
+
+ </div>
+
+ </div>
+
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/getpwd.phtml b/views/mods/mod_kundenverwaltung/getpwd.phtml
new file mode 100644
index 0000000..ef99967
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/getpwd.phtml
@@ -0,0 +1,35 @@
+<?php
+
+ /**
+ * Template für die Seite, auf der der Kunde sein Passwort erneuern kann
+ */
+
+?>
+<div class="wpsg_register">
+
+ <p>
+ <?php echo __('Geben Sie hier die E-Mail Adresse an, mit der Sie bereits bestellt haben. Sie erhalten dann eine E-Mail mit der Aufforderung ein neues Passwort zu generieren.', 'wpsg'); ?>
+ </p>
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <form method="post" action="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getRegisterURL'); ?>">
+
+ <div class="wpsg_block">
+
+ <label for="wpsg_firma"><?php echo __("E-Mail", "wpsg"); ?>:</label>
+ <input class="wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_email" name="wpsg[sendpwd][email]" value="<?php echo htmlspecialchars($this->view['data']['email']); ?>" />
+
+ </div>
+
+ <br />
+
+ <input type="submit" value="<?php echo __('Passwort anfordern', 'wpsg'); ?>" class="wpsg_button wpsg_button_sendpwd" name="wpsg_mod_kundenverwaltung_sendpwd" />
+
+ <?php $this->ClearSessionErrors(); ?>
+
+ <div class="wpsg_clear"></div>
+
+ </form>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/import.phtml b/views/mods/mod_kundenverwaltung/import.phtml
new file mode 100644
index 0000000..d8b898b
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/import.phtml
@@ -0,0 +1,30 @@
+<?php
+
+ /**
+ * Template für den Import der Kundendaten
+ */
+
+?>
+<div class="wrap">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
+ <h2>
+ <?php echo __('Kundenimport', 'wpsg'); ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;action=index" class="add-new-h2"><?php echo __("Zurück zur Kundenverwaltung", "wpsg"); ?></a>
+ </h2>
+
+ <?php echo $this->writeBackendMessage(); ?>
+ <br />
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;action=import&amp;noheader=1" id="import_form" enctype="multipart/form-data">
+
+ <div class="wpsg_hinweis"><?php echo __('Laden Sie ein vorher exportiertes CSV File hoch, die Kundendaten werden dann aus dieser Datei importiert.', 'wpsg'); ?></div>
+ <br />
+
+ <input type="file" name="wpsg_importfile" />
+
+ <br /><br />
+ <input type="submit" value="<?php echo __('Import starten', 'wpsg'); ?>" class="button-primary" name="wpsg_import" />
+
+ </form>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/index.phtml b/views/mods/mod_kundenverwaltung/index.phtml
new file mode 100644
index 0000000..a8753e4
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/index.phtml
@@ -0,0 +1,264 @@
+<?php
+
+ /**
+ * Template für die Kundenübersichtsseite im Backend
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ var wpsg_order = '<?php echo $this->view['filter']['order']; ?>';
+ var wpsg_ascdesc = '<?php echo $this->view['filter']['ascdesc']; ?>';
+
+ function wpsg_setOrder(order)
+ {
+
+ if (order == wpsg_order)
+ {
+
+ // Nur Richtung ändern
+ if (wpsg_ascdesc == 'asc') jQuery('#wpsg_ascdesc').val('desc');
+ else jQuery('#wpsg_ascdesc').val('asc');
+
+ }
+ else
+ {
+
+ jQuery('#wpsg_order').val(order);
+ jQuery('#wpsg_ascdesc').val('asc');
+
+ }
+
+ jQuery('#seite').val(1);
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ } // function wpsg_setOrder(order)
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_handlediv').bind('click', function() {
+
+ jQuery(this).next().toggle();
+
+ var arClose = new Array();
+ jQuery('.wpsg_customer_index .postbox .inside:hidden').each(function() {
+ arClose.push(jQuery(this).parent().attr("id"));
+ } );
+
+ jQuery.cookie('wpsg_customer_index_closed', arClose.join(','));
+
+ } );
+
+ if (jQuery.cookie('wpsg_customer_index_closed') != null)
+ {
+
+ var arClose = jQuery.cookie('wpsg_customer_index_closed').split(',');
+
+ for (index in arClose)
+ {
+
+ if (arClose[index] != '') jQuery('#' + arClose[index] + ' .inside').hide();
+
+ }
+
+ }
+
+ } );
+
+/* ]]> */</script>
+
+<div class="wrap wpsg_customer_index">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
+ <h2>
+ <?php echo __('Kundenverwaltung', 'wpsg'); ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;action=add" class="add-new-h2"><?php echo __("Hinzufügen", "wpsg"); ?></a>
+ <?php if (wpsg_isSizedArray($this->view['data'])) { ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;action=export&amp;noheader=1" class="add-new-h2"><?php echo __('Exportieren', 'wpsg'); ?></a>
+ <?php } ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;action=import" class="add-new-h2"><?php echo __('Importieren', 'wpsg'); ?></a>
+ </h2>
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <form method="POST" id="filter_form">
+
+ <?php if ($this->hasMod('wpsg_mod_customergroup')) { ?>
+ <select style="float:left;" name="customergroup" onchange="jQuery('#filter_form').submit();">
+ <option value="-1"><?php echo __('Alle Kundengruppen', 'wpsg'); ?></option>
+ <option value="0" <?php echo (($_REQUEST['customergroup'] === '0')?'selected="selected"':''); ?>><?php echo __('Unzugeordnet', 'wpsg'); ?></option>
+ <?php foreach ((array)$this->view['arCustomergroup'] as $customer_group_id => $customer_group_name) { ?>
+ <option value="<?php echo $customer_group_id; ?>" <?php echo (($customer_group_id == $_REQUEST['customergroup'])?'selected="selected"':''); ?>><?php echo $customer_group_name; ?></option>
+ <?php } ?>
+ </select>
+ <?php } ?>
+
+ <p class="search-box">
+ <label for="post-search-input" class="screen-reader-text"><?php echo __('Kunden suchen', 'wpsg'); ?>:</label>
+ <input type="text" value="<?php echo wpsg_hspc($_REQUEST['s']); ?>" name="s" id="post-search-input">
+ <input type="submit" value="<?php echo __('Kunden suchen', 'wpsg'); ?>" class="button" id="search-submit" name="">
+ </p>
+
+ <div class="tablenav top">
+
+ <?php if (sizeof($this->view['data'] > 0)) { ?>
+ <div class="tablenav-pages"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
+ <div class="tablenav-pages">
+ <span class="pagination-links">
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;seite=1&amp;s=<?php echo $_REQUEST['s']; ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">«</a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;seite=<?php echo $this->view['seite'] - 1; ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">‹</a>
+ <span class="paging-input"><input type="text" size="1" value="<?php echo $this->view['seite']; ?>" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;seite=<?php echo $this->view['seite'] + 1; ?>" title="<?php echo __('Zur nächsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">›</a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;seite=<?php echo $this->view['pages']; ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">»</a>
+ </span>
+ </div>
+
+ <script type="text/javascript">
+
+ jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
+
+ </script>
+
+ <br class="clear" />
+ </div>
+ <?php } ?>
+
+ </div>
+
+ <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo $this->view['filter']['order']; ?>" />
+ <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo $this->view['filter']['ascdesc']; ?>" />
+
+ <input style="display:none;" type="submit" name="suchen" value="" />
+
+ <?php $this->callMods('wpsg_mod_customer_head'); ?>
+
+ <?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
+ <table class="widefat post fixed">
+ <thead>
+ <tr>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'nr')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" style="width:60px;">
+ <a href="#" onclick="return wpsg_setOrder('nr');">
+ <span><?php echo __("Nr.", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'name')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('name');">
+ <span><?php echo __("Name", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-adress <?php echo (($this->view['filter']['order'] == 'adress')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('adress');">
+ <span><?php echo __("Anschrift", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-status <?php echo (($this->view['filter']['order'] == 'status')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('status');">
+ <span><?php echo __("Status", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->view['data'] as $k) { ?>
+ <tr>
+ <td class="manage-column column-title">
+ <?php echo ((strlen($k['knr']) > 0)?$k['knr']:$k['id']); ?>
+ </td>
+ <td class="manage-column column-title">
+ <strong>&nbsp;<?php echo wpsg_hspc((trim($k['vname'].' '.$k['name']) == "")?__("---- ", "wpsg"):$k['vname'].' '.$k['name']); ?>&nbsp;<a href="mailto:<?php echo wpsg_hspc($k['email']); ?>" style="font-weight:normal;">(<?php echo wpsg_hspc($k['email']); ?>)</a></strong>
+ </td>
+ <td rowspan="2" class="manage-column column-adress">
+ <?php echo (($k['firma'] != '')?$k['firma']:'').'<br />'; ?>
+ <?php echo isset($this->$k['strasse']) && $k['strasse'].' '.isset ($this->$k['hausnr']) && $k['hausnr']; ?><br />
+ <?php echo $k['plz'].' '.$k['ort'].' '.$k['land_kuerzel']; ?><br />
+ </td>
+ <td rowspan="2" class="manage-column column-status">
+ <?php echo wpsg_translate(__('#1# Bestellungen', 'wpsg'), $k['order_count']); ?><br />
+ <?php echo wpsg_translate(__('Umsatz: #1#', 'wpsg'), wpsg_ff($k['order_umsatz'], $this->get_option('wpsg_currency'))); ?>
+ <?php if ($k['order_count'] > 0) { ?>
+ <br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter%5Bk_id%5D=<?php echo $k['id']; ?>"><?php echo __('Bestellungen einsehen', 'wpsg'); ?></a>
+ <?php } ?>
+ </td>
+ </tr>
+ <tr>
+ <td class="manage-column wpsg-row-actions" colspan="2">
+ <div>
+ <span class="edit"><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;action=edit&amp;edit_id=<?php echo $k['id']; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a></span>
+ |
+ <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sicher, dass Sie diesen Kunden löschen wollen?", "wpsg"); ?>')) return false;" title="<?php echo __("Diesen Kunden löschen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;action=del&amp;edit_id=<?php echo $k['id']; ?>&amp;noheader=1"><?php echo __("Löschen", "wpsg"); ?></a></span>
+ <?php if ($k['order_count'] > 0) { ?>
+ |
+ <span class="order"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter%5Bk_id%5D=<?php echo $k['id']; ?>"><?php echo __('Bestellungen einsehen', 'wpsg'); ?></a></span>
+ <?php } ?>
+ </div>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ <tfoot>
+ <tr>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'nr')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('nr');">
+ <span><?php echo __("Nr.", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'name')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('name');">
+ <span><?php echo __("Name", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-adress <?php echo (($this->view['filter']['order'] == 'adress')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('adress');">
+ <span><?php echo __("Anschrift", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-status <?php echo (($this->view['filter']['order'] == 'status')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>">
+ <a href="#" onclick="return wpsg_setOrder('status');">
+ <span><?php echo __("Status", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </tfoot>
+ </table>
+
+ <?php /* if (sizeof($this->view['data'] > 0)) { ?>
+ <div class="tablenav">
+ <div class="tablenav-pages"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
+ <div class="tablenav-pages">
+ <span class="pagination-links">
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;seite=1&amp;s=<?php echo $_REQUEST['s']; ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">«</a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;seite=<?php echo $this->view['seite'] - 1; ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">‹</a>
+ <span class="paging-input"><input type="text" size="1" value="<?php echo $this->view['seite']; ?>" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;seite=<?php echo $this->view['seite'] + 1; ?>" title="<?php echo __('Zur nächsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">›</a>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&amp;seite=<?php echo $this->view['pages']; ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">»</a>
+ </span>
+ </div>
+
+ <script type="text/javascript">
+
+ jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
+
+ </script>
+
+ <br class="clear">
+ </div>
+ </div>
+ <?php } */ ?>
+
+ <?php } else { ?>
+ <p><?php echo __('Keine Kunden in der Datenbank.', 'wpsg'); ?></p>
+ <?php } ?>
+
+ </form>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/login.phtml b/views/mods/mod_kundenverwaltung/login.phtml
new file mode 100644
index 0000000..668420e
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/login.phtml
@@ -0,0 +1,42 @@
+<?php
+
+ /**
+ * Dieses Template wird angezeigt, wenn z.B. auf die Profilseite zugegriffen wird und der User nicht eingelogt ist
+ */
+
+?>
+<div class="wpsg_profil wpsg_checkout wpsg">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <form method="post" action="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getProfilURL'); ?>">
+ <div class="wpsg_box">
+
+ <h2><?php echo __('Bereits Kunde? Hier einloggen ...', 'wpsg'); ?></h2>
+
+ <div class="wpsg_inner wpsg_login">
+
+ <div class="wpsg_block wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_email"><?php echo __("E-Mail Adresse", "wpsg"); ?>:</label>
+ <input class="wpsg_checkout" type="text" id="wpsg_mod_kundenverwaltung_email" name="wpsg[mod_kundenverwaltung][email]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_kundenverwaltung']['email']); ?>" />
+ </div>
+
+ <div class="wpsg_block wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_password"><?php echo __("Passwort", "wpsg"); ?>:</label>
+ <input class="wpsg_checkout" type="password" id="wpsg_mod_kundenverwaltung_password" name="wpsg[mod_kundenverwaltung][password]" value="" />
+ </div>
+
+ <br />
+
+ <div class="wpsg_checkoutblock">
+ <a class="wpsg_pwdvergessen_link" href="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getPwdVergessenURL'); ?>">Passwort vergessen?</a>
+ <input type="submit" class="wpsg_button wpsg_mod_kundenverwaltung_login" value="<?php echo __('Login', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_login" />
+ </div>
+
+ <div class="wpsg_clearer"></div><br />
+
+ </div>
+ </div>
+ </form>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/logout.phtml b/views/mods/mod_kundenverwaltung/logout.phtml
new file mode 100644
index 0000000..1ae3443
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/logout.phtml
@@ -0,0 +1,10 @@
+<?php
+
+ /**
+ * Wird angezeigt, wenn die Registrierungsseite aufgerufen wird und man bereits eingelogt ist
+ */
+
+?>
+<div class="wpsg_logout wpsg">
+ <?php echo wpsg_translate(__('Sie können sich nicht registrieren, da sie derzeit eingelogt sind. Klicken Sie <a href="#1#">hier</a> um sich abzumelden.', 'wpsg'), $this->callMod('wpsg_mod_kundenverwaltung', 'getLogoutURL')); ?>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/mail_activate.phtml b/views/mods/mod_kundenverwaltung/mail_activate.phtml
new file mode 100644
index 0000000..07cb0d4
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/mail_activate.phtml
@@ -0,0 +1,14 @@
+<?php
+
+ /**
+ * Diese Mail wird an den Kunden geschickt, wenn der Status seines Accounts ändert
+ * und die entsprechende Option aktiviert ist
+ */
+
+?><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?>
+
+<?php echo __('Der Status Ihres Accounts hat sich gändert auf:', 'wpsg'); ?> <?php echo $this->view['kunde']['status'] ?>
+
+<?php echo __('Viele Grüße', 'wpsg'); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/mail_activate_html.phtml b/views/mods/mod_kundenverwaltung/mail_activate_html.phtml
new file mode 100644
index 0000000..c57c69d
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/mail_activate_html.phtml
@@ -0,0 +1,14 @@
+<?php
+
+ /**
+ * Diese Mail wird an den Kunden geschickt, wenn der Status seines Accounts ändert
+ * und die entsprechende Option aktiviert ist (HTML)
+ */
+
+?><p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?></p>
+
+<p><?php echo __('Der Status Ihres Accounts hat sich gändert auf:', 'wpsg'); ?> <?php echo $this->view['kunde']['status'] ?></p>
+
+<p><?php echo __('Viele Grüße', 'wpsg'); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/mail_pwdrequest.phtml b/views/mods/mod_kundenverwaltung/mail_pwdrequest.phtml
new file mode 100644
index 0000000..6052c69
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/mail_pwdrequest.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template für die Mail einer Anfrage nach einem neuen Passwort
+ */
+
+?><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?>
+
+<?php echo __('Sie haben eine neues Passwort angefragt.', 'wpsg'); ?>
+
+<?php echo __('Es wird ihnen ein neues Passwort generiert, wenn sie auf folgenden Link klicken:', 'wpsg'); ?>
+
+<?php echo $this->view['strLink']; ?>
+
+<?php echo __('Sollten Sie kein neues Passwort angefragt haben können Sie diese Mail ignorieren.', 'wpsg'); ?>
+
+<?php echo __('Viele Grüße', 'wpsg'); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/mail_pwdrequest_html.phtml b/views/mods/mod_kundenverwaltung/mail_pwdrequest_html.phtml
new file mode 100644
index 0000000..51f042d
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/mail_pwdrequest_html.phtml
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Template für die Mail einer Anfrage nach einem neuen Passwort (HTML)
+ */
+
+?>
+<p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?></p>
+
+<p><?php echo __('Sie haben eine neues Passwort angefragt.', 'wpsg'); ?></p>
+
+<p><?php echo __('Es wird ihnen ein neues Passwort generiert, wenn sie auf folgenden Link klicken:', 'wpsg'); ?></p>
+
+<a href="<?php echo $this->view['strLink']; ?>"><?php echo __('Neues Passwort generieren', 'wpsg'); ?></a>
+
+<p><?php echo __('Sollten Sie kein neues Passwort angefragt haben können Sie diese Mail ignorieren.', 'wpsg'); ?></p>
+
+<p><?php echo __('Viele Grüße', 'wpsg'); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/mail_pwdsend.phtml b/views/mods/mod_kundenverwaltung/mail_pwdsend.phtml
new file mode 100644
index 0000000..bac5a15
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/mail_pwdsend.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Diese Mail wird an den Kunden geschickt, wenn er die Passwort Anfrage erfolgreich bestätigt hat
+ */
+
+?><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?>
+
+<?php echo __('Sie haben eine neues Passwort angefragt.', 'wpsg'); ?>
+
+<?php echo wpsg_translate(__('Ihr neues Passwort lautet ab sofort: #1#', 'wpsg'), $this->view['kunde']['passwort']); ?>
+
+<?php echo __('Viele Grüße', 'wpsg'); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/mail_pwdsend_html.phtml b/views/mods/mod_kundenverwaltung/mail_pwdsend_html.phtml
new file mode 100644
index 0000000..18dc959
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/mail_pwdsend_html.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Diese Mail wird an den Kunden geschickt, wenn er die Passwort Anfrage erfolgreich bestätigt hat
+ */
+
+?><p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?></p>
+
+<p><?php echo __('Sie haben eine neues Passwort angefragt.', 'wpsg'); ?></p>
+
+<p><?php echo wpsg_translate(__('Ihr neues Passwort lautet ab sofort: #1#', 'wpsg'), $this->view['kunde']['passwort']); ?></p>
+
+<p><?php echo __('Viele Grüße', 'wpsg'); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/mail_register.phtml b/views/mods/mod_kundenverwaltung/mail_register.phtml
new file mode 100644
index 0000000..7c015fa
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/mail_register.phtml
@@ -0,0 +1,26 @@
+<?php
+
+ /**
+ * Diese Mail wird an den Kunden geschickt, wenn er die Registrierung erfolgreich beendet hat
+ */
+
+?><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?>
+
+<?php echo __('Sie haben sich mit folgenden Daten bei uns registriert.', 'wpsg'); ?>
+<?php echo '--------------------------------------------------------------------' ?>
+<?php echo wpsg_translate(__('Firma: #1#', 'wpsg'), $this->view['kunde']['firma']); ?>
+<?php echo wpsg_translate(__('Vorname: #1#', 'wpsg'), $this->view['kunde']['vname']); ?>
+<?php echo wpsg_translate(__('Name: #1#', 'wpsg'), $this->view['kunde']['name']); ?>
+<?php echo wpsg_translate(__('E-Mail: #1#', 'wpsg'), $this->view['kunde']['email']); ?>
+<?php echo wpsg_translate(__('Telefon: #1#', 'wpsg'), $this->view['kunde']['tel']); ?>
+<?php echo wpsg_translate(__('Fax: #1#', 'wpsg'), $this->view['kunde']['fax']); ?>
+<?php echo wpsg_translate(__('Straße: #1#', 'wpsg'), $this->view['kunde']['strasse']); ?>
+<?php echo wpsg_translate(__('PLZ: #1#', 'wpsg'), $this->view['kunde']['plz']); ?>
+<?php echo wpsg_translate(__('Ort: #1#', 'wpsg'), $this->view['kunde']['ort']); ?>
+<?php echo wpsg_translate(__('Land: #1#', 'wpsg'), $this->view['kunde']['land']); ?>
+<?php echo wpsg_translate(__('UStIdNr.: #1#', 'wpsg'), $this->view['kunde']['ustidnr']); ?>
+<?php echo '--------------------------------------------------------------------' ?>
+
+<?php echo __('Viele Grüße', 'wpsg'); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/mail_register_html.phtml b/views/mods/mod_kundenverwaltung/mail_register_html.phtml
new file mode 100644
index 0000000..2a302b4
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/mail_register_html.phtml
@@ -0,0 +1,61 @@
+<?php
+
+ /**
+ * Diese Mail wird an den Kunden geschickt, wenn er die Registrierung erfolgreich beendet hat (HTML)
+ */
+
+?>
+<p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?></p>
+
+<p><?php echo __('Sie haben sich mit folgenden Daten bei uns registriert.', 'wpsg'); ?></p>
+
+<table style="width:100%;">
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Firma', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['firma']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Vorname', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['vname']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Name', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['name']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('E-Mail', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['email']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Telefon', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['tel']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Fax', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['fax']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Straße', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['strasse']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('PLZ', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['plz']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Ort', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['ort']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('Land', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['land']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding-right:15px;"><?php echo __('UStIdNr.', 'wpsg'); ?>:</td>
+ <td><?php echo wpsg_hspc($this->view['kunde']['ustidnr']); ?></td>
+ </tr>
+</table>
+
+<p><?php echo __('Viele Grüße', 'wpsg'); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/order.phtml b/views/mods/mod_kundenverwaltung/order.phtml
new file mode 100644
index 0000000..59853e9
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/order.phtml
@@ -0,0 +1,94 @@
+<?php
+
+ /**
+ * Template für die Übersichtsseite der Bestellungen im Frontend
+ */
+
+ //wpsg_debug($this->view['arOrder']);
+
+?>
+
+<div class="wpsg_mod_kundenverwaltung_order wpsg">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <?php if (wpsg_isSizedArray($this->view['arOrder'])) { ?>
+ <?php foreach ($this->view['arOrder'] as $order) { ?>
+
+ <div class="wpsg_box">
+
+ <h2><?php echo wpsg_translate(__('Bestellung vom #1# über #2#', 'wpsg'), date('d.m.Y', strtotime($order['cdate'])), wpsg_ff($order['price_gesamt'], $this->get_option('wpsg_currency'))); ?></h2>
+
+ <div class="wpsg_inner wpsg_order_<?php echo $order['id']; ?>">
+ <strong><?php echo __('Bestellstatus', 'wpsg'); ?>:</strong>&nbsp;
+ <?php echo $this->arStatus[$order['status']]; ?>
+ <?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
+
+ <?php if ($r = $this->callMod('wpsg_mod_rechnungen', 'getOrderInvoice', array($order['id']))) { ?>
+ <a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', array($r['id'])); ?>"><?php echo wpsg_translate(__('Rechnung #1#', 'wpsg'), $r['rnr']); ?></a>
+ <?php } else if ($r = $this->callMod('wpsg_mod_rechnungen', 'getOrderCredit', array($order['id']))) { ?>
+ <a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', array($r['id'])); ?>"><?php echo wpsg_translate(__('Rechnungskorrektur #1#', 'wpsg'), $r['gnr']); ?></a>
+ <?php } ?>
+
+ <?php } ?>
+ <br />
+ <strong><?php echo __('Rechnungsbetrag', 'wpsg'); ?>:</strong> <?php echo wpsg_ff($order['price_gesamt'], $this->get_option('wpsg_currency')); ?><br />
+ <strong><?php echo __('Bestellte Produkte', 'wpsg'); ?>:</strong>
+
+ <table class="wpsg_mod_kundenverwaltung_producttable">
+ <tr>
+ <th class="col_name"><?php echo __('Name', 'wpsg'); ?></th>
+ <th class="col_price"><?php echo __('Preis', 'wpsg'); ?></th>
+ </tr>
+ <?php foreach ((array)$order['arProdukte'] as $p) { ?>
+ <tr>
+ <td class="col_name">
+ <a href="<?php echo $p['url']; ?>"><?php echo $this->getProductName($this->getProduktID($p['id']), true); ?></a>
+ <br /><?php echo __('Artikelnummer', 'wpsg'); ?>: <?php echo $p['anr']; ?>
+ <?php if ($this->hasMod('wpsg_mod_varianten') && wpsg_isSizedString($p['mod_vp_varkey'])) { $arVarInfo = $this->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($p['mod_vp_varkey'])); ?>
+ <br /><?php echo __('Variante', 'wpsg'); ?>: <?php echo $arVarInfo['key']; ?>
+ <?php } ?>
+ <?php if ($this->hasMod('wpsg_mod_downloadplus')) { ?>
+ <?php if ($this->callMod('wpsg_mod_downloadplus', 'isPDFProdukt', array($p['id'])) === true) { $arDownloads = $this->callMod('wpsg_mod_downloadplus', 'getIndivFiles', array($p['id'], $order['id'])); ?>
+ <?php foreach ((array)$arDownloads as $d) { ?>
+ <br /><?php echo wpsg_translate(__('Datei "#1#": ', 'wpsg'), ((strlen($d['file_out']) > 0)?$d['file_out']:$d['file'])); ?>
+ <?php if ($d['status'] == '0') { ?>
+ <?php echo __('Noch nicht geplant', 'wpsg'); ?>
+ <?php } else if ($d['status'] == '1') { ?>
+ <?php echo wpsg_translate(__('Geplant am #1#.', 'wpsg'), date('d.m.Y', strtotime($d['scheduled']))); ?>
+ <?php } else if ($d['status'] == '2') { ?>
+ <?php $strURL = site_url().'?wpsg_action=wpsg_mod_downloadplus_download&hash='.$d['hash'].'&indi='.$d['indiv_id']; ?>
+ <?php echo wpsg_translate(__('<a href="#1#" target="blank">Download</a>', 'wpsg'), $strURL); ?>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ <br />
+ <?php if ($this->hasMod('wpsg_mod_productvars')) { $arPV = $this->callMod('wpsg_mod_productvars', 'getAllProductVarValues', array($order['id'], $p['product_index'])); ?>
+ <?php if (wpsg_isSizedArray($arPV)) { ?>
+ <?php foreach ($arPV as $pv) { ?>
+ <?php echo wpsg_hspc($pv['name']); ?>: <?php echo wpsg_hspc($pv['value']); ?>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ </td>
+ <td class="col_price">
+ <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <?php echo wpsg_ff($p['preis_netto'], $this->get_option('wpsg_currency')); ?>
+ <?php } else { ?>
+ <?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ </table>
+
+ </div>
+ </div>
+
+ <?php } ?>
+ <?php } else { ?>
+ <p><?php echo __('Bisher keine Bestellungen durchgeführt.', 'wpsg'); ?></p>
+ <?php } ?>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/profil.phtml b/views/mods/mod_kundenverwaltung/profil.phtml
new file mode 100644
index 0000000..e95e157
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/profil.phtml
@@ -0,0 +1,193 @@
+<?php
+
+ /**
+ * Seite für das Profil eines Kunden
+ */
+
+?>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery("#form-profil").validationEngine('attach', {promptPosition : "centerRight", scroll: false});
+
+ } );
+
+</script>
+
+<div class="wpsg wpsg_profil wpsg_checkout">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <form method="post" id="form-profil" action="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getProfilURL'); ?>">
+
+ <h2><?php echo __('Kundendaten', 'wpsg'); ?></h2>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['firma'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("firma", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_firma" name="wpsg[profil][firma]" value="<?php echo htmlspecialchars($this->view['data']['firma']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
+ <?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
+ <select class="wpsg_checkout <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[profil][title]">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
+ <option value="<?php echo $t; ?>" <?php echo (($this->view['data']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="vname" name="wpsg[profil][vname]" value="<?php echo htmlspecialchars($this->view['data']['vname']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="name" class="wpsg_checkout"><?php echo __("Name", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="name" name="wpsg[profil][name]" value="<?php echo htmlspecialchars($this->view['data']['name']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="geb" class="wpsg_checkout"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ)', 'wpsg'); ?>
+ <?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['geb'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("geb", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="geb" name="wpsg[profil][geb]" value="<?php echo htmlspecialchars($this->view['data']['geb']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[profil][email]" value="<?php echo htmlspecialchars($this->view['data']['email']); ?>" />
+ </div>
+
+ <?php if ($this->view['pflicht']['emailconfirm'] == '1') { ?>
+
+ <div class="wpsg_checkoutblock">
+ <label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse (Wiederholung)", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[profil][email2]" value="<?php echo htmlspecialchars($this->view['data']['email2']); ?>" />
+ </div>
+
+ <?php } ?>
+
+ <div class="wpsg_checkoutblock">
+ <label for="fax" class="wpsg_checkout"><?php echo __("Fax.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['fax'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("fax", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="fax" name="wpsg[profil][fax]" value="<?php echo htmlspecialchars($this->view['data']['fax']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="tel" class="wpsg_checkout"><?php echo __("Tel.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['tel'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("tel", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="tel" name="wpsg[profil][tel]" value="<?php echo htmlspecialchars($this->view['data']['tel']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="strasse" class="wpsg_checkout"><?php echo __("Strasse Nr.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="strasse" name="wpsg[profil][strasse]" value="<?php echo htmlspecialchars($this->view['data']['strasse']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="plz" name="wpsg[profil][plz]" value="<?php echo htmlspecialchars($this->view['data']['plz']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="ort" class="wpsg_checkout"><?php echo __("Ort", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['ort'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="ort" name="wpsg[profil][ort]" value="<?php echo htmlspecialchars($this->view['data']['ort']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <select name="wpsg[profil][land]" class="wpsg_checkout <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach ($this->view['laender'] as $l) { ?>
+ <option value="<?php echo $l['id']; ?>" <?php echo (($l['id'] == $this->view['data']['land'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($l['name']); ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_ustidnr" class="wpsg_checkout"><?php echo __("UStIdNr.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['ustidnr'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ustidnr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_ustidnr" name="wpsg[profil][ustidnr]" value="<?php echo htmlspecialchars($this->view['data']['ustidnr']); ?>" />
+ </div>
+
+ <?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
+ <?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?>
+ <?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
+ <div class="wpsg_checkoutblock">
+ <label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>">
+ <?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
+ <?php if ($c['typ'] == '0') { // Textfeld ?>
+ <input class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[profil][custom][<?php echo $c_id; ?>]" type="text" value="<?php echo wpsg_hspc($this->view['data']['custom'][$c_id]); ?>" />
+ <?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
+ <select class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[profil][custom][<?php echo $c_id; ?>]">
+ <option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
+ <?php foreach ((array)$arAuswahl as $a) { ?>
+ <option value="<?php echo wpsg_hspc($a); ?>" <?php echo (($a == $this->view['data']['custom'][$c_id])?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($c['typ'] == '2') { // Checkbox ?>
+ <input type="hidden" name="wpsg[profil][custom][<?php echo $c_id; ?>]" value="0" />
+ <input id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[profil][custom][<?php echo $c_id; ?>]" value="1" <?php echo wpsg_hspc(($this->view['data']['custom'][$c_id] == '1')?'checked="checked"':''); ?> />
+ <span class="wpsg_clear"></span>
+ <?php } ?>
+ </label>
+ </div>
+ <?php } } ?>
+ <?php } ?>
+ <?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_pwd1"><?php echo __("Passwort", "wpsg"); ?>
+ <?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="mod_kundenverwaltung_pwd1" name="wpsg[mod_kundenverwaltung][register_pwd1]" value="" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_kundenverwaltung_pwd2"><?php echo __("Passwort wiederholen", "wpsg"); ?>
+ <?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pwd2" name="wpsg[mod_kundenverwaltung][register_pwd2]" value="" />
+ </div>
+
+ <div class="wpsg_clear"></div><br />
+
+ <div class="wpsg_mandatoryfield_hint">
+ <?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
+ </div>
+
+ <div class="wpsg_clear"></div><br />
+
+ <input type="submit" class="wpsg_button wpsg_saveButton" value="<?php echo __('Speichern', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_save" />
+
+ <?php $this->ClearSessionErrors(); ?>
+
+ </form>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/register.phtml b/views/mods/mod_kundenverwaltung/register.phtml
new file mode 100644
index 0000000..01c06ab
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/register.phtml
@@ -0,0 +1,235 @@
+<?php
+
+ /**
+ * Template für die Registrierungsseite
+ */
+
+?>
+<?php //wpsg_debug($this->view['error']) ?>
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ <?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
+
+ if (typeof jQuery.validationEngine == "object")
+ {
+
+ jQuery("#form-step2").validationEngine('attach', {promptPosition : "centerRight", scroll: false});
+
+ jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function(){
+ jQuery("#form-step2").validationEngine('detach');
+ });
+
+ }
+
+ <?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?>
+
+ jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
+ jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
+ jQuery("#form-step2").validate( {
+ ignore: '',
+ errorClass: 'wpsg_error',
+ onsubmit: false,
+ showErrors: function(errorMap, errorList) {
+
+ this.defaultShowErrors();
+
+ }
+ } );
+
+ jQuery('.wpsg_registerButton').bind('click', function() {
+
+ var bReturn = jQuery('#form-step2').validate().form();
+ if (jQuery('#form-step2 input.wpsg_error').length > 0) jQuery('#form-step2 input.wpsg_error')[0].focus();
+ return bReturn;
+
+ } );
+
+ <?php } ?>
+
+ } );
+
+ <?php
+ if ($_GET["wpsg_spam_email"] != "") {
+ echo "<p>Sie haben ein Feld ausgefüllt, das frei bleiben muss.</p>";
+ exit;
+ }
+ ?>
+
+</script>
+
+<div class="wpsg wpsg_checkout wpsg_register">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <form id="form-step2" method="post" action="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getRegisterURL'); ?>">
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['firma'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("firma", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_firma" name="wpsg[register][firma]" value="<?php echo htmlspecialchars($this->view['data']['firma']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
+ <?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
+ <select class="<?php echo (($this->view['pflicht']['anrede'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[register][title]">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
+ <option value="<?php echo $t; ?>" <?php echo (($this->view['data']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="vname" class="wpsg_register"><?php echo __("Vorname", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="vname" name="wpsg[register][vname]" value="<?php echo htmlspecialchars($this->view['data']['vname']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="name" class="wpsg_register"><?php echo __("Name", "wpsg"); ?>
+ <?php if ($this->data['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="name" name="wpsg[register][name]" value="<?php echo htmlspecialchars($this->view['data']['name']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="email" class="wpsg_register"><?php echo __("E-Mail Adresse", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[register][email]" value="<?php echo htmlspecialchars($this->view['data']['email']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="email" class="wpsg_register"><?php echo __("E-Mail Adresse (Wiederholung)", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[register][email2]" value="<?php echo htmlspecialchars($this->view['data']['register']['email2']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="pwd1" class="wpsg_register"><?php echo __("Passwort", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['pwd1'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['pwd1'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="pwd1" name="wpsg[register][register_pwd1]" value="" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="pwd2" class="wpsg_register"><?php echo __("Passwort (Wiederholung)", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['pwd2'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['pwd2'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="pwd2" name="wpsg[register][register_pwd2]" value="" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="geb" class="wpsg_register"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ)', 'wpsg'); ?>
+ <?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['geb'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("geb", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="geb" name="wpsg[register][geb]" value="<?php echo htmlspecialchars($this->view['data']['geb']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="fax" class="wpsg_register"><?php echo __("Fax.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['fax'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("fax", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="fax" name="wpsg[register][fax]" value="<?php echo htmlspecialchars($this->view['data']['fax']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="tel" class="wpsg_register"><?php echo __("Tel.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['tel'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("tel", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="tel" name="wpsg[register][tel]" value="<?php echo htmlspecialchars($this->view['data']['tel']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="strasse" class="wpsg_register"><?php echo __("Strasse Nr.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="strasse" name="wpsg[register][strasse]" value="<?php echo htmlspecialchars($this->view['data']['strasse']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="plz" class="wpsg_register"><?php echo __("Postleitzahl", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="plz" name="wpsg[register][plz]" value="<?php echo htmlspecialchars($this->view['data']['plz']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="ort" class="wpsg_register"><?php echo __("Ort", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['ort'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="ort" name="wpsg[register][ort]" value="<?php echo htmlspecialchars($this->view['data']['ort']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_land" class="wpsg_register"><?php echo __("Land", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <select name="wpsg[register][land]" class="<?php echo (($this->view['pflicht']['land'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach ($this->view['laender'] as $l) { ?>
+ <option value="<?php echo $l['id']; ?>" <?php echo (($l['id'] == $this->view['data']['land'])?'selected="selected"':(($this->get_option('wpsg_defaultland') == $l['id'])?'selected="selected"':'')); ?>><?php echo wpsg_hspc($l['name']); ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_ustidnr" class="wpsg_register"><?php echo __("UStIdNr.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['ustidnr'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("ustidnr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_ustidnr" name="wpsg[register][ustidnr]" value="<?php echo htmlspecialchars($this->view['data']['ustidnr']); ?>" />
+ </div>
+
+ <?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
+ <?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?>
+ <?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
+ <div class="wpsg_checkoutblock">
+ <label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>">
+ <?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
+ <?php if ($c['typ'] == '0') { // Textfeld ?>
+ <input class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[register][custom][<?php echo $c_id; ?>]" type="text" value="<?php echo wpsg_hspc($this->view['data']['custom'][$c_id]); ?>" />
+ <?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
+ <select class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[register][custom][<?php echo $c_id; ?>]">
+ <option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
+ <?php foreach ((array)$arAuswahl as $a) { ?>
+ <option value="<?php echo wpsg_hspc($a); ?>" <?php echo (($a == $this->view['data']['custom'][$c_id])?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($c['typ'] == '2') { // Checkbox ?>
+ <input type="hidden" name="wpsg[register][custom][<?php echo $c_id; ?>]" value="0" />
+ <input id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[register][custom][<?php echo $c_id; ?>]" value="1" <?php echo wpsg_hspc(($this->view['data']['custom'][$c_id] == '1')?'checked="checked"':''); ?> />
+ <span class="wpsg_clear"></span>
+ <?php } ?>
+ </label>
+ </div>
+ <?php } } ?>
+ <?php } ?>
+ <?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_mandatoryfield_hint">
+ <?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
+ </div>
+
+ <?php /* versteckte Sicherheitsabfrage als Bot-Schutz START*/ ?>
+ <span style="display:none">
+ <label for="wpsg_spam_email">Das Feld muss frei bleiben:</label>
+ <input type="text" name="wpsg_spam_email" id="wpsg_spam_email" title=" dieses Feld muss frei bleiben " />
+ </span>
+ <?php /* versteckte Sicherheitsabfrage als Bot-Schutz ENDE*/ ?>
+
+ <br />
+
+ <input type="submit" class="wpsg_button wpsg_registerButton" value="<?php echo __('Registrieren', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_register" />
+
+ <?php $this->ClearSessionErrors(); ?>
+
+ <div class="wpsg_clear"></div>
+ </form>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/settings_edit.phtml b/views/mods/mod_kundenverwaltung/settings_edit.phtml
new file mode 100644
index 0000000..aa472e2
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/settings_edit.phtml
@@ -0,0 +1,85 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Kundenverwaltungsdialoges
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung_perpage', __('Kunden pro Seite (Backend)', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_perpage'), array('help' => 'wpsg_mod_kundenverwaltung_perpage')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_showCheckoutLogin', __('Login in Checkout integrieren', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutLogin'), array('help' => 'wpsg_mod_kundenverwaltung_showCheckoutLogin')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_showCheckoutRegister', __('Registrierung im Checkout', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegister'), array('help' => 'wpsg_mod_kundenverwaltung_showCheckoutRegister')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand', __('Registrierungzwang im Checkout', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand'), array('help' => 'wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_loginZwang', __('Loginzwang im Checkout (für Neukunden)', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_loginZwang'), array('help' => 'wpsg_mod_kundenverwaltung_loginZwang')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung_redirectlogin', __('Weiterleitung nach Login', 'wpsg'), array(
+ '0' => __('Auf Profilseite leiten', 'wpsg'),
+ '1' => __('Auf aktueller Seite bleiben', 'wpsg')
+), $this->get_option('wpsg_mod_kundenverwaltung_redirectlogin'), array('help' => 'wpsg_mod_kundenverwaltung_redirectlogin')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung_redirectLogout', __('Weiterleitung nach Logout', 'wpsg'), array(
+ '0' => __('Auf Profilseite leiten', 'wpsg'),
+ '1' => __('Auf aktueller Seite bleiben', 'wpsg')
+), $this->get_option('wpsg_mod_kundenverwaltung_redirectLogout'), array('help' => 'wpsg_mod_kundenverwaltung_redirectLogout')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_status', __('Status nach Registrierung', 'wpsg'), array('inaktiv', 'aktiv'), $this->get_option('wpsg_page_mod_kundenverwaltung_status'), array('help' => 'wpsg_mod_kundenverwaltung_status')); ?>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="">&nbsp;</label>
+ </div>
+ <div class="wpsg_form_right">
+ <a onclick="if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie alle Kunden auf Aktiv setzen möchten?', 'wpsg'); ?>')) return false;" style="float:left;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_kundenverwaltung&wpsg_mod_kundenverwaltung_setActiv=1&noheader=1"><?php echo __('Alle Kunden auf Aktiv setzen.', 'wpsg'); ?></a>
+ <a onclick="if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie alle Kunden auf Inaktiv setzen möchten?', 'wpsg'); ?>')) return false;" style="float:right; margin-right:25px;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_kundenverwaltung&wpsg_mod_kundenverwaltung_setInactiv=1&noheader=1"><?php echo __('Alle Kunden auf Inaktiv setzen.', 'wpsg'); ?></a>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+
+<br />
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_profil', __('Profilseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_kundenverwaltung_profil')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_registrierung', __('Registrierungsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_kundenverwaltung_registrierung')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_weiterleitung_nach_registrierung', __('Weiterleitung nach Registrierung', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_kundenverwaltung_weiterleitung_nach_registrierung')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_kundenverwaltung_order', __('Bestellübersichtsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_kundenverwaltung_order')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_onlylogin', __('Bestellungen nur für registrierte Kunden zulassen', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_onlylogin'), array('help' => 'wpsg_mod_kundenverwaltung_onlylogin')); ?>
+<br />
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_wpuser', __('Wordpress User koppeln', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_wpuser'), array('help' => 'wpsg_mod_kundenverwaltung_wpuser_role')); ?>
+<div id="wpsg_mod_kundenverwaltung_wpuser_layer" style="display:none;">
+
+ <?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung_wpuser_role', __('Benutzerrolle', 'wpsg'), $this->view['arRoles'], $this->get_option('wpsg_mod_kundenverwaltung_wpuser_role')); ?>
+
+</div>
+
+<br />
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_aweber', __('AWeber Integration', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_aweber'), array('help' => 'wpsg_mod_kundenverwaltung_aweber')); ?>
+<div id="wpsg_mod_kundenverwaltung_aweber_layer" style="display:none;">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung_aweber_formid', __('AWeber meta_web_form_id', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_aweber_formid')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung_aweber_listname', __('AWeber listname', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_aweber_listname')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung_aweber_metaAdtracking', __('AWeber meta_adtracking', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_aweber_metaAdtracking')); ?>
+
+</div>
+
+<br />
+<div class="wpsg_hinweis">
+ <?php echo wpsg_translate(__('Die Einstellungen für die E-Mails (Betreff, Absender, CC) können in der <a href="#1#">E-Mail Konfiguration</a> durchgeführt werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf'); ?>
+</div>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_kundenverwaltung_wpuser').bind('change', function() {
+
+ if (jQuery(this).attr("checked") == "checked") jQuery('#wpsg_mod_kundenverwaltung_wpuser_layer').show();
+ else jQuery('#wpsg_mod_kundenverwaltung_wpuser_layer').hide();
+
+ } ).change();
+
+ jQuery('#wpsg_mod_kundenverwaltung_aweber').bind('change', function() {
+
+ if (jQuery(this).attr('checked') == 'checked') jQuery('#wpsg_mod_kundenverwaltung_aweber_layer').show();
+ else jQuery('#wpsg_mod_kundenverwaltung_aweber_layer').hide();
+
+ } ).change();
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_kundenverwaltung/widget.phtml b/views/mods/mod_kundenverwaltung/widget.phtml
new file mode 100644
index 0000000..71129d9
--- /dev/null
+++ b/views/mods/mod_kundenverwaltung/widget.phtml
@@ -0,0 +1,50 @@
+<?php
+
+ /**
+ * Template für das Login Widget
+ */
+
+?>
+<div class="wpsg_mod_kundenverwaltung_widget widget">
+
+
+ <?php if ($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn')) { ?>
+
+ <h2 class="widget-title widgettitle"><?php echo __('Login', 'wpsg'); ?></h2>
+
+ <p><?php echo wpsg_translate(__('Hallo #1# #2#', 'wpsg'), $_SESSION['wpsg']['checkout']['vname'], $_SESSION['wpsg']['checkout']['name']); ?></p>
+ <ul class="menu" id="wpsg_mod_kundenverwaltung_seitenmenu">
+ <li class="menu-item menu-item-object-page"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_PROFIL); ?>"><?php echo __('Profil bearbeiten', 'wpsg'); ?></a></li>
+ <li class="menu-item menu-item-object-page"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_ORDER); ?>"><?php echo __('Bestellungen', 'wpsg'); ?></a></li>
+ <li class="menu-item menu-item-object-page"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_LOGOUT); ?>"><?php echo __('Abmelden', 'wpsg'); ?></a></li>
+ </ul>
+ <br />
+
+ <div class="wpsg_clear"></div>
+
+ <?php } else { ?>
+
+ <form method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_PROFIL); ?>">
+
+ <h2 class="widget-title widgettitle"><?php echo __('Login', 'wpsg'); ?></h2>
+
+ <input type="text" value="<?php echo __('E-Mail', 'wpsg'); ?>" id="wpsg_mod_kundenverwaltung_widget_email" name="wpsg[mod_kundenverwaltung][email]" />
+ <input type="password" value="<?php echo __('Passwort', 'wpsg'); ?>" id="wpsg_mod_kundenverwaltung_widget_passwort" name="wpsg[mod_kundenverwaltung][password]" />
+
+ <br /><br />
+
+ <input type="submit" id="wpsg_mod_kundenverwaltung_widget_login" name="wpsg_mod_kundenverwaltung_login" value="<?php echo __('Anmelden', 'wpsg'); ?>" />
+
+ <input type="hidden" name="wpsg_referer" value="<?php echo $this->getCurrentURL(); ?>" />
+
+ <div class="wpsg_mod_kundenverwaltung_pwdlink">
+ <a href="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getPwdVergessenURL'); ?>"><?php echo __('Passwort vergessen?', 'wpsg'); ?></a>
+ </div>
+
+ <div class="wpsg_clear"></div>
+
+ </form>
+
+ <?php } ?>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_legaltexts/form_haendlerbund.phtml b/views/mods/mod_legaltexts/form_haendlerbund.phtml
new file mode 100644
index 0000000..dfb9663
--- /dev/null
+++ b/views/mods/mod_legaltexts/form_haendlerbund.phtml
@@ -0,0 +1,39 @@
+<?php
+
+ /**
+ * Template für die Integration des Händlerbund-Formulars in das Rechtstextmodul
+ */
+
+?>
+
+<style type="text/css">
+
+ .wphb_clear { clear:both; }
+ .wphb_form_field { width:770px; margin-bottom:5px; }
+ .wphb_form_field .wphb_form_left { line-height:24px; font-weight:bold; width:350px; float:left; }
+ .wphb_form_field .wphb_form_right { width:420px; float:left; position:relative; line-height:28px; }
+ .wphb_form_field .wphb_form_right select, .wphb_form_field .wphb_form_right input { width:95%; }
+ .wphb_form_field .wphb_form_right input.checkbox { width:auto !important; float:left; margin-left:2px; margin-top:5px; }
+ .wphb_form_field .wphb_form_right p { padding:4px 0px 4px 6px; margin:0px; }
+ .wphb_form { padding:10px; }
+ .wphb_date { float:right; padding-right:5%; }
+ .wphb_hinweis { font-style:italic; }
+
+</style>
+
+<?php if ($this->view['wpsg_mod_legaltexts']['form'] == false) { ?>
+
+ <p><?php echo __('wpShopGermany bietet eine Schnittstelle zum <a href="https://partner.haendlerbund.de/partnerdoor.php?partnerid=partner_wp&bannerid=18" target="_blank">Händlerbund</a> an.', 'wpsg'); ?></p>
+ <p><?php echo __('Händlerbund bietet Schutzpakete im Abo ("AGB-Rechtstext-Flatrate") für Onlineshop Betreiber an. Mit dem wpShopGermany-Händlerbund Plugin (ab Version 1.0), werden die angebotenen Rechtstexte auf die zugeordneten Blog-Seiten mittels Mausklick automatisch übernommen und aktualisiert.', 'wpsg'); ?></p>
+
+ <?php if (file_exists(WP_PLUGIN_DIR."/wpshopgermany-haendlerbund/wpshopgermany-haendlerbund.php")) { ?>
+ <p style="color:red;"><?php echo __('Das Plugin wurde bereits gefunden aber noch nicht aktiviert. Bitte aktivieren sie das Plugin in der <a href="plugins.php">Pluginverwaltung</a>.', 'wpsg'); ?></p>
+ <?php } ?>
+
+<?php } else { ?>
+
+ <?php echo $this->view['wpsg_mod_legaltexts']['form']; ?>
+
+ <input type="hidden" name="wpsg_mod_legaltexts_submitform" value="1" />
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_legaltexts/form_itrecht.phtml b/views/mods/mod_legaltexts/form_itrecht.phtml
new file mode 100644
index 0000000..3764df0
--- /dev/null
+++ b/views/mods/mod_legaltexts/form_itrecht.phtml
@@ -0,0 +1,37 @@
+<?php
+
+ /**
+ * Template des Rechtstext Moduls, welches ITRecht integriert
+ */
+
+?>
+
+<?php if ($this->view['wpsg_mod_legaltexts']['form'] == false) { ?>
+
+ <p><?php echo __('wpShopGermany bietet eine AGB-Schnittstelle zur <a href="http://www.it-recht-kanzlei.de/Service/rechtstexte_fuer_onlineshops.php?partner_id=150">IT-Recht Kanzlei</a> an.', 'wpsg'); ?></p>
+
+ <p><?php echo __('Die IT-Recht Kanzlei bietet für monatlich nur 9,99 Euro abmahnsichere Rechtstexte an - natürlich inkl. Haftung. Dazu gehören die AGB, die Widerrufsbelehrung, die Datenschutzerklärung sowie das Impressum. Mit dem wpShopGermany-IT-Recht Kanzlei Plugin (ab Version 1.0) werden die angebotenen Rechtstexte auf Ihre Blog-Seiten mittels Mausklick automatisch übernommen und künftig auch automatisch aktualisiert - inklusive permanenter AGB-Überwachung.', 'wpsg'); ?></p>
+
+ <p>
+
+ <?php echo __('Jetzt AGB Service buchen', 'wpsg'); ?>:<br />
+ <a href="http://www.it-recht-kanzlei.de/Service/rechtstexte_fuer_onlineshops.php?partner_id=150">http://www.it-recht-kanzlei.de/Service/rechtstexte_fuer_onlineshops.php</a>
+
+ <br /><br />
+
+ <?php echo __('Rechtstexte im günstigen Paketpreis finden Sie hier', 'wpsg'); ?>:<br />
+ <a href="http://www.agb-pakete.de/?partner_id=150">http://www.agb-pakete.de</a>
+
+ </p>
+
+ <?php if (file_exists(WP_PLUGIN_DIR."/wpshopgermany-itrecht/wpshopgermany-itrecht.php")) { ?>
+ <p style="color:red;"><?php echo __('Das Plugin wurde bereits gefunden aber noch nicht aktiviert. Bitte aktivieren sie das Plugin in der <a href="plugins.php">Pluginverwaltung</a>.', 'wpsg'); ?></p>
+ <?php } ?>
+
+<?php } else { ?>
+
+ <?php echo $this->view['wpsg_mod_legaltexts']['form']; ?>
+
+ <input type="hidden" name="wpsg_mod_legaltexts_submitform" value="1" />
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_legaltexts/form_protectedshops.phtml b/views/mods/mod_legaltexts/form_protectedshops.phtml
new file mode 100644
index 0000000..e4099c0
--- /dev/null
+++ b/views/mods/mod_legaltexts/form_protectedshops.phtml
@@ -0,0 +1,27 @@
+<?php
+
+ /**
+ * Template des Rechtstext Moduls, welches das ProtectedsShops-Formular oder den Hinweistext anzeigt
+ */
+
+?>
+
+<?php if ($this->view['wpsg_mod_legaltexts']['form'] == false) { ?>
+
+ <p><?php echo __('wpShopGermany bietet eine Schnittstelle zu <a href="http://www.protectedshops.de/" target="_blank">Protected Shops</a> an.', 'wpsg'); ?></p>
+ <p><?php echo __('Protected Shops bietet Schutzpakete im Abo ("AGB-Rechtstext-Flatrate") für Onlineshop Betreiber an. Mit dem wpShopGermany-ProtectedShops Plugin (ab Version 1.8), werden die angebotenen Rechtstexte auf die zugeordneten Blog-Seiten mittels Mausklick automatisch übernommen und aktualisiert.', 'wpsg'); ?></p>
+ <p><?php echo __('Erhalten Sie <strong>5% Rabatt</strong> auf das erste Protected Shops Jahresabo mit folgendem <strong>Gutscheincode</strong>: <span style="color:red;">WP-SHOP</span> (unbedingt bei der Erstregistrierung angeben!)', 'wpsg'); ?></p>
+
+ <?php if (file_exists(WP_PLUGIN_DIR."/wpshopgermany-protectedshops/wpshopgermany-protectedshops.php")) { ?>
+ <p style="color:red;"><?php echo __('Das Plugin wurde bereits gefunden aber noch nicht aktiviert. Bitte aktivieren sie das Plugin in der <a href="plugins.php">Pluginverwaltung</a>.', 'wpsg'); ?></p>
+ <?php } ?>
+
+<?php } else { ?>
+
+ <table class="wpsg_mod_legaltexts_protectedshops_table">
+ <?php echo $this->view['wpsg_mod_legaltexts']['form']; ?>
+ </table>
+
+ <input type="hidden" name="wpsg_mod_legaltexts_submitform" value="1" />
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_legaltexts/settings_edit.phtml b/views/mods/mod_legaltexts/settings_edit.phtml
new file mode 100644
index 0000000..96b3b93
--- /dev/null
+++ b/views/mods/mod_legaltexts/settings_edit.phtml
@@ -0,0 +1,43 @@
+<?php
+
+ /**
+ * Template für das Modul "Rechtstexte"
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_legaltexts_provider', __('Anbieter', 'wpsg'), array(
+ wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS => __('Protected Shops', 'wpsg'),
+ wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND => __('Händlerbund', 'wpsg'),
+ wpsg_mod_legaltexts::PROVIDER_ITRECHT => __('IT-Recht Kanzlei München', 'wpsg')
+), $this->get_option('wpsg_mod_legaltexts_provider')); ?>
+
+<br />
+
+<div id="wpsg_provider_target"></div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_legaltexts_provider').bind('change', function() {
+
+ jQuery('#wpsg_provider_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_legaltexts&noheader=1&do=add',
+ data: {
+ 'provider': jQuery('#wpsg_mod_legaltexts_provider').val()
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_provider_target').html(data);
+
+ }
+ } );
+
+ } ).change();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_micropayment/debugInfo.phtml b/views/mods/mod_micropayment/debugInfo.phtml
new file mode 100644
index 0000000..ce852df
--- /dev/null
+++ b/views/mods/mod_micropayment/debugInfo.phtml
@@ -0,0 +1,33 @@
+<?php
+
+ /**
+ * Template für die Ausgabe von Debug Informationen des Micropayment Moduls
+ */
+
+?>
+<h1>Modul "Micropayment"</h1>
+<pre class="wpsg_debug">
+Billing URL (cc): <?php echo ((array_key_exists('wpsg_mod_micropayment', $this->arModule))?$this->arModule['wpsg_mod_micropayment']->event_creditcard_url:''); ?>
+Billing URL (dbt): <?php echo ((array_key_exists('wpsg_mod_micropayment', $this->arModule))?$this->arModule['wpsg_mod_micropayment']->event_directdebit_url:''); ?>
+Billing URL (eb2p): <?php echo ((array_key_exists('wpsg_mod_micropayment', $this->arModule))?$this->arModule['wpsg_mod_micropayment']->event_ebank2pay_url:''); ?>
+Billing URL (pp): <?php echo ((array_key_exists('wpsg_mod_micropayment', $this->arModule))?$this->arModule['wpsg_mod_micropayment']->event_prepayment_url:''); ?>
+Billing URL (c2p): <?php echo ((array_key_exists('wpsg_mod_micropayment', $this->arModule))?$this->arModule['wpsg_mod_micropayment']->event_call2pay_url:''); ?>
+Billing URL (hp): <?php echo ((array_key_exists('wpsg_mod_micropayment', $this->arModule))?$this->arModule['wpsg_mod_micropayment']->event_handypay_url:''); ?>
+(Infoservice) Account-ID: <?php echo substr($this->get_option('wpsg_mod_micropayment_projectid'), 0, 1).'('.strlen($this->get_option('wpsg_mod_micropayment_handypay_activ')).')'; ?>
+Accesskey Länge: <?php echo strlen($this->get_option('wpsg_mod_micropayment_accesskey')); ?>
+Version: <?php echo WPSG_VERSION; ?>
+Aktivierte Bezahlmodule: <?php
+
+ $arPayment = array();
+ if ($this->get_option('wpsg_mod_micropayment_creditcard_activ') == '1') $arPayment[] = 'cc';
+ if ($this->get_option('wpsg_mod_micropayment_directdebit_activ') == '1') $arPayment[] = 'dbt';
+ if ($this->get_option('wpsg_mod_micropayment_ebank2pay_activ') == '1') $arPayment[] = 'eb2p';
+ if ($this->get_option('wpsg_mod_micropayment_prepayment_activ') == '1') $arPayment[] = 'pp';
+ if ($this->get_option('wpsg_mod_micropayment_call2pay_name') == '1') $arPayment[] = 'c2p';
+ if ($this->get_option('wpsg_mod_micropayment_handypay_activ') == '1') $arPayment[] = 'hp';
+
+ if (wpsg_isSizedArray($arPayment)) echo implode(',', $arPayment);
+ else echo 'Keine';
+
+?>
+</pre> \ No newline at end of file
diff --git a/views/mods/mod_micropayment/gfx/bank2pay.png b/views/mods/mod_micropayment/gfx/bank2pay.png
new file mode 100644
index 0000000..097f834
--- /dev/null
+++ b/views/mods/mod_micropayment/gfx/bank2pay.png
Binary files differ
diff --git a/views/mods/mod_micropayment/gfx/call2pay.png b/views/mods/mod_micropayment/gfx/call2pay.png
new file mode 100644
index 0000000..7e2ba85
--- /dev/null
+++ b/views/mods/mod_micropayment/gfx/call2pay.png
Binary files differ
diff --git a/views/mods/mod_micropayment/gfx/chip.png b/views/mods/mod_micropayment/gfx/chip.png
new file mode 100644
index 0000000..38e656f
--- /dev/null
+++ b/views/mods/mod_micropayment/gfx/chip.png
Binary files differ
diff --git a/views/mods/mod_micropayment/gfx/creditcard.png b/views/mods/mod_micropayment/gfx/creditcard.png
new file mode 100644
index 0000000..5ebac0c
--- /dev/null
+++ b/views/mods/mod_micropayment/gfx/creditcard.png
Binary files differ
diff --git a/views/mods/mod_micropayment/gfx/directdebit.png b/views/mods/mod_micropayment/gfx/directdebit.png
new file mode 100644
index 0000000..9951453
--- /dev/null
+++ b/views/mods/mod_micropayment/gfx/directdebit.png
Binary files differ
diff --git a/views/mods/mod_micropayment/gfx/handypay.png b/views/mods/mod_micropayment/gfx/handypay.png
new file mode 100644
index 0000000..8dcd83f
--- /dev/null
+++ b/views/mods/mod_micropayment/gfx/handypay.png
Binary files differ
diff --git a/views/mods/mod_micropayment/gfx/logo_100x25.png b/views/mods/mod_micropayment/gfx/logo_100x25.png
new file mode 100644
index 0000000..2e06ab9
--- /dev/null
+++ b/views/mods/mod_micropayment/gfx/logo_100x25.png
Binary files differ
diff --git a/views/mods/mod_micropayment/gfx/prepayment.png b/views/mods/mod_micropayment/gfx/prepayment.png
new file mode 100644
index 0000000..2668837
--- /dev/null
+++ b/views/mods/mod_micropayment/gfx/prepayment.png
Binary files differ
diff --git a/views/mods/mod_micropayment/order_done.phtml b/views/mods/mod_micropayment/order_done.phtml
new file mode 100644
index 0000000..33bc32b
--- /dev/null
+++ b/views/mods/mod_micropayment/order_done.phtml
@@ -0,0 +1,122 @@
+<?php
+
+ /**
+ * Template welches den Zahlungsdienstleister nach Bestellabschluß einbindet
+ */
+
+?>
+<?php if (wpsg_isSizedString($this->view['wpsg_mod_micropayment']['payLink'])) { ?>
+<?php echo __('Klicken Sie auf das folgende Logo um ihre Bestellung zu bezahlen.', 'wpsg'); ?>
+<br /><br />
+
+<a href="<?php echo $this->view['wpsg_mod_micropayment']['payLink']; ?>"><img src="<?php echo $this->view['wpsg_mod_micropayment']['logo']; ?>" alt="<?php echo $this->view['wpsg_mod_micropayment']['title']; ?>" /></a>
+
+ <?php if ($this->get_option('wpsg_mod_micropayment_paystart') == '1') { ?>
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+ window.setTimeout(function() {
+ location.href = "<?php echo $this->view['wpsg_mod_micropayment']['payLink']; ?>";
+ }, 1000);
+ } );
+
+ </script>
+ <?php } ?>
+
+<?php } else { ?>
+
+<p><?php echo __('Bitte geben Sie ihre Kreditkarteninformationen (Kartennummer, Gültigkeitsdatum und Prüfnummer) in folgende Felder ein. Die Daten werden an Micropayment übermittelt und nicht durch uns gespeichert oder ausgewertet.', 'wpsg'); ?></p>
+
+<form method="post" id="wpsg_mod_micropayment_creditcard">
+
+ <div class="micropayment_card">
+ <div class="front card">
+ <div class="chip"></div>
+ <div class="number"><input placeholder="<?php echo __('Kreditkartennummer', 'wpsg'); ?>" type="text" name="number" /></div>
+ <div class="bankname"><?php echo __('Kreditkarte - Vorderseite', 'wpsg'); ?></div>
+ <div class="name"><?php echo __('Max Mustermann', 'wpsg'); ?></div>
+ <div class="validthrough"><?php echo __('Gültig bis', 'wpsg'); ?>:</div>
+ <div class="valid">
+ <select name="expiryMonth">
+ <?php for ($i = 1; $i <= 12; $i ++) { ?>
+ <option value="<?php echo $i; ?>"><?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>
+ <?php } ?>
+ </select>
+ <span>/</span>
+ <select name="expiryYear">
+ <?php for ($i = date('Y'); $i <= date('Y') + 10; $i ++) { ?>
+ <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+ </div>
+
+ <div class="back card">
+ <div class="bankname"><?php echo __('Kreditkarte - Rückseite', 'wpsg'); ?></div>
+ <div class="blackmagnetic"></div>
+ <div class="number"><?php echo __('HC600214C', 'wpsg'); ?></div>
+ <div class="signature"><?php echo __('Unterschrift Max Mustermann', 'wpsg'); ?></div>
+ <div class="sign"><input type="text" name="cvc2" value="" placeholder="<?php echo __('Prüfnummer', 'wpsg'); ?>" /></div>
+ </div>
+
+ <input type="button" id="wpsg_mod_micropayment_pay_button" class="wpsg_button" value="<?php echo __('Zahlung starten', 'wpsg'); ?>" />
+
+ </div>
+
+</form>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_micropayment_pay_button').bind('click', function() {
+
+ var form_data = jQuery('#wpsg_mod_micropayment_creditcard').serialize();
+
+ jQuery('.micropayment_card input, .micropayment_card select').prop('disabled', true);
+
+ jQuery.ajax( {
+ url: wpsg_ajax.ajaxurl,
+ data: {
+ action: 'ajax',
+ wpsg_plugin: 'wpsg_mod_micropayment',
+ module_action: 'pay',
+ form_data: form_data,
+ order_id: <?php echo $this->view['o_id']; ?>
+ },
+ success: function(data) {
+
+ if (data === "1")
+ {
+
+ alert('<?php echo __('Vielen Dank für Ihre Zahlungsreservierung.', 'wpsg'); ?>');
+ location.href = '<?php echo get_permalink($this->get_option('wpsg_mod_micropayment_successPage')); ?>';
+
+ }
+ else
+ {
+
+ alert(data);
+
+ }
+
+ jQuery('.micropayment_card input, .micropayment_card select').prop('disabled', false);
+
+ },
+ error: function(rdata, data)
+ {
+
+ alert("<?php echo __('Unerwarteter Serverfehler!', 'wpsg'); ?>");
+
+ }
+ } );
+
+ return false;
+
+ } );
+
+ } );
+
+/* ]]> */</script>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_micropayment/settings_edit.phtml b/views/mods/mod_micropayment/settings_edit.phtml
new file mode 100644
index 0000000..c06c99d
--- /dev/null
+++ b/views/mods/mod_micropayment/settings_edit.phtml
@@ -0,0 +1,213 @@
+<?php
+
+ /**
+ * Template für die Einstellungen für das Micropayment Modul
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_accountid', __('Account ID', 'wpsg'), $this->get_option('wpsg_mod_micropayment_accountid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_projectid', __('Projekt ID', 'wpsg'), $this->get_option('wpsg_mod_micropayment_projectid'), array('help' => 'wpsg_mod_micropayment_projectid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_accesskey', __('AccessKey', 'wpsg'), $this->get_option('wpsg_mod_micropayment_accesskey'), array('help' => 'wpsg_mod_micropayment_accesskey')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_micropayment_successPage', __('Seite nach erfolgreicher Zahlung', 'wpsg'), $this->view['wpsg_mod_micropayment']['arPages'], $this->get_option('wpsg_mod_micropayment_successPage')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_paystart', __('Zahlungs sofort starten', 'wpsg'), $this->get_option('wpsg_mod_micropayment_paystart')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_apiURL', __('API URL', 'wpsg'), $this->view['wpsg_mod_micropayment']['apiURL'], array('readonly' => true, 'hint' => __('Muss im micropayment™ Interface hinterlegt werden.', 'wpsg'), 'help' => 'wpsg_mod_micropayment_apiURL')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_sandbox', __('Sandbox', 'wpsg'), $this->get_option('wpsg_mod_micropayment_sandbox')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_account', __('Account (Für Webmasterbewerbung)', 'wpsg'), $this->get_option('wpsg_mod_micropayment_account'), array('help' => 'wpsg_mod_micropayment_account')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_layout', __('Layout', 'wpsg'), $this->get_option('wpsg_mod_micropayment_layout'), array('help' => 'wpsg_mod_micropayment_layout')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_bgcolor', __('Hintergrundfarbe', 'wpsg'), $this->get_option('wpsg_mod_micropayment_bgcolor'), array('help' => 'wpsg_mod_micropayment_bgcolor')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_campaign', __('Kampagne des Projektinhabers', 'wpsg'), $this->get_option('wpsg_mod_micropayment_campaign'), array('help' => 'wpsg_mod_micropayment_campaign')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_bggfx', __('Hintergrundgrafik für Zahlfenster', 'wpsg'), $this->get_option('wpsg_mod_micropayment_bggfx')); ?>
+<br />
+<div class="wpsg_admin_box" id="wpsg_mod_micropayment_creditcard">
+ <div id="mail_global" class="head" style="border-bottom: 0px none;">
+ <div class="title">
+ <div class="fulltab"><?php echo __('CreditCard - Abrechnung per Creditkarte', 'wpsg'); ?></div>
+ </div>
+ <div class="content wpsg_admin_box_content" style="display: block;">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_creditcard_activ', __('Zahlungsart "Kreditkarte" aktiv', 'wpsg'), $this->get_option('wpsg_mod_micropayment_creditcard_activ'), array(
+ /* 'hint' => wpsg_translate(__('Für Abrechnungsbeträge zwischen #1# und #2#', 'wpsg'), wpsg_ff(2.50, $this->get_option('wpsg_currency')), wpsg_ff(500, $this->get_option('wpsg_currency'))) */
+ )); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_creditcard_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_micropayment_creditcard_name')); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_micropayment_creditcard_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_micropayment_creditcard_hint')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_creditcard_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_micropayment_creditcard_logo')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_creditcard_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_micropayment_creditcard_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_micropayment_creditcard_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_micropayment_creditcard_mwst')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_creditcard_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_micropayment_creditcard_mwstland')); ?>
+ </div>
+ </div>
+</div>
+<br />
+<div class="wpsg_admin_box" id="wpsg_mod_micropayment_creditcardreservation">
+ <div id="mail_global" class="head" style="border-bottom: 0px none;">
+ <div class="title">
+ <div class="fulltab"><?php echo __('CreditCard - Abrechnung per Creditkarte (Reservierung)', 'wpsg'); ?></div>
+ </div>
+ <div class="content wpsg_admin_box_content" style="display: block;">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_creditcardreservation_activ', __('Zahlungsart "Kreditkarte mit Reservierung" aktiv', 'wpsg'), $this->get_option('wpsg_mod_micropayment_creditcardreservation_activ'), array(
+ /* 'hint' => wpsg_translate(__('Für Abrechnungsbeträge zwischen #1# und #2#', 'wpsg'), wpsg_ff(2.50, $this->get_option('wpsg_currency')), wpsg_ff(500, $this->get_option('wpsg_currency'))) */
+ )); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_creditcardreservation_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_micropayment_creditcardreservation_name')); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_micropayment_creditcardreservation_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_micropayment_creditcardreservation_hint')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_creditcardreservation_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_micropayment_creditcardreservation_logo')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_creditcardreservation_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_micropayment_creditcardreservation_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_micropayment_creditcardreservation_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_micropayment_creditcardreservation_mwst')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_creditcardreservation_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_micropayment_creditcardreservation_mwstland')); ?>
+ </div>
+ </div>
+</div>
+<br />
+<div class="wpsg_admin_box" id="wpsg_mod_micropayment_directdebit">
+ <div id="mail_global" class="head" style="border-bottom: 0px none;">
+ <div class="title">
+ <div class="fulltab"><?php echo __('Lastschrift - Abrechnung per Lastschrift', 'wpsg'); ?></div>
+ </div>
+ <div class="content wpsg_admin_box_content" style="display: block;">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_directdebit_activ', __('Zahlungsart "Lastschrift" aktiv', 'wpsg'), $this->get_option('wpsg_mod_micropayment_directdebit_activ')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_directdebit_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_micropayment_directdebit_name')); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_micropayment_directdebit_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_micropayment_directdebit_hint')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_directdebit_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_micropayment_directdebit_logo')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_directdebit_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_micropayment_directdebit_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_micropayment_directdebit_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_micropayment_directdebit_mwst')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_directdebit_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_micropayment_directdebit_mwstland')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_directdebit_subject', __('Betreff der Zahlung', 'wpsg'), $this->get_option('wpsg_mod_micropayment_directdebit_subject')); ?>
+ </div>
+ </div>
+</div>
+<br />
+<div class="wpsg_admin_box" id="wpsg_mod_micropayment_ebank2pay">
+ <div id="mail_global" class="head" style="border-bottom: 0px none;">
+ <div class="title">
+ <div class="fulltab"><?php echo __('eBank2Pay - Abrechnung per Online Banking', 'wpsg'); ?></div>
+ </div>
+ <div class="content wpsg_admin_box_content" style="display: block;">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_ebank2pay_activ', __('Zahlungsart "eBank2Pay" aktiv', 'wpsg'), $this->get_option('wpsg_mod_micropayment_ebank2pay_activ'), array(
+ /* 'hint' => wpsg_translate(__('Für Abrechnungsbeträge zwischen #1# und #2#', 'wpsg'), wpsg_ff(0.50, $this->get_option('wpsg_currency')), wpsg_ff(500, $this->get_option('wpsg_currency'))) */
+ )); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_ebank2pay_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_micropayment_ebank2pay_name')); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_micropayment_ebank2pay_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_micropayment_ebank2pay_hint')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_ebank2pay_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_micropayment_ebank2pay_logo')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_ebank2pay_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_micropayment_ebank2pay_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_micropayment_ebank2pay_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_micropayment_ebank2pay_mwst')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_ebank2pay_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_micropayment_ebank2pay_mwstland')); ?>
+ </div>
+ </div>
+</div>
+<br />
+<div class="wpsg_admin_box" id="wpsg_mod_micropayment_prepayment">
+ <div id="mail_global" class="head" style="border-bottom: 0px none;">
+ <div class="title">
+ <div class="fulltab"><?php echo __('Vorkasse - Abrechnung per Vorkasse', 'wpsg'); ?></div>
+ </div>
+ <div class="content wpsg_admin_box_content" style="display: block;">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_prepayment_activ', __('Zahlungsart "Vorkasse" aktiv', 'wpsg'), $this->get_option('wpsg_mod_micropayment_prepayment_activ')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_prepayment_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_micropayment_prepayment_name')); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_micropayment_prepayment_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_micropayment_prepayment_hint')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_prepayment_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_micropayment_prepayment_logo')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_prepayment_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_micropayment_prepayment_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_micropayment_prepayment_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_micropayment_prepayment_mwst')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_prepayment_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_micropayment_prepayment_mwstland')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_prepayment_subject', __('Betreff der Zahlung', 'wpsg'), $this->get_option('wpsg_mod_micropayment_prepayment_subject')); ?>
+ </div>
+ </div>
+</div>
+<br />
+<div class="wpsg_admin_box" id="wpsg_mod_micropayment_call2pay">
+ <div id="mail_global" class="head" style="border-bottom: 0px none;">
+ <div class="title">
+ <div class="fulltab"><?php echo __('Call2Pay - Abrechnung per Anruf / Telefon', 'wpsg'); ?></div>
+ </div>
+ <div class="content wpsg_admin_box_content" style="display: block;">
+
+ <div id="wpsg_mod_micropayment_call2pay_layer" style="<?php echo (($this->get_option('wpsg_mod_micropayment_call2pay_activ') == '1')?'display:block;':'display:none;'); ?>">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_call2pay_activ', __('Zahlungsart "Call2Pay" aktiv', 'wpsg'), $this->get_option('wpsg_mod_micropayment_call2pay_activ'), array(
+ /* 'hint' => wpsg_translate(__('Für Abrechnungsbeträge zwischen #1# und #2#', 'wpsg'), wpsg_ff(0.05, $this->get_option('wpsg_currency')), wpsg_ff(50, $this->get_option('wpsg_currency'))) */
+ )); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_call2pay_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_micropayment_call2pay_name')); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_micropayment_call2pay_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_micropayment_call2pay_hint')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_call2pay_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_micropayment_call2pay_logo')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_call2pay_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_micropayment_call2pay_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_micropayment_call2pay_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_micropayment_call2pay_mwst')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_call2pay_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_micropayment_call2pay_mwstland')); ?>
+ </div>
+
+ <?php if ($this->get_option('wpsg_mod_micropayment_call2pay_activ') != '1') { ?>
+ <div id="wpsg_mod_micropayment_call2pay_infolayer">
+ <span style="color:red; font-weigh:bold;"><?php echo __('Bitte beachten Sie, dass es bei der Nutzung von Call2Pay folgende Einschränkungen gibt', 'wpsg'); ?>:</span><br />
+ <ul>
+ <li><?php echo __('Nur Abrechnung von telekommunikationsbasierten Mehrwertdiensten möglich', 'wpsg'); ?></li>
+ <li><?php echo __('Preisobergrenze von 30 Euro pro Transaktion', 'wpsg'); ?></li>
+ <li><?php echo __('National und international KEINE einheitliche Gebührenstruktur', 'wpsg'); ?></li>
+ <li><?php echo __('Teilweise abweichende Preise aus dem Mobilfunknetz', 'wpsg'); ?></li>
+ </ul>
+ <br />
+ <span style="font-weight:bold;"><?php echo __('Sollten Sie sich unsicher sein, ob Sie diese Zahlarten nutzen können oder dürfen, melden Sie sich einfach bei uns!', 'wpsg'); ?></span>
+ <ul>
+ <li><?php echo __('Ansprechpartner', 'wpsg'); ?>: Martin Eliason</li>
+ <li><?php echo __('Telefon (Festnetz)', 'wpsg'); ?>: +49 – (0)30 – 64904255</li>
+ <li><?php echo __('eMail', 'wpsg'); ?>: <a href="mailto:meliason@micropayment.de">meliason@micropayment.de</a></li>
+ <li><?php echo __('Stichwort', 'wpsg'); ?>: WordPress-Shopmodul</li>
+ </ul>
+ <br />
+ <input type="button" class="button" onclick="jQuery('#wpsg_mod_micropayment_call2pay_infolayer').hide(); jQuery('#wpsg_mod_micropayment_call2pay_layer').show();" value="<?php echo __('Ich habe einen entsprechenden Account und kann die Zahlungsart nutzen.', 'wpsg'); ?>" />
+ </div>
+ <?php } ?>
+
+ </div>
+ </div>
+</div>
+<br />
+<div class="wpsg_admin_box" id="wpsg_mod_micropayment_handypay">
+ <div id="mail_global" class="head" style="border-bottom: 0px none;">
+ <div class="title">
+ <div class="fulltab"><?php echo __('HandyPay - Abrechnung per SMS / Tan', 'wpsg'); ?></div>
+ </div>
+ <div class="content wpsg_admin_box_content" style="display: block;">
+
+ <div id="wpsg_mod_micropayment_handypay_layer" style="<?php echo (($this->get_option('wpsg_mod_micropayment_handypay_activ') == '1')?'display:block;':'display:none;'); ?>">
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_handypay_activ', __('Zahlungsart "Call2Pay" aktiv', 'wpsg'), $this->get_option('wpsg_mod_micropayment_handypay_activ'), array(
+ /* 'hint' => wpsg_translate(__('Für Abrechnungsbeträge zwischen #1# und #2#', 'wpsg'), wpsg_ff(0.50, $this->get_option('wpsg_currency')), wpsg_ff(5.00, $this->get_option('wpsg_currency'))) */
+ )); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_handypay_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_micropayment_handypay_name')); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_micropayment_handypay_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_micropayment_handypay_hint')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_handypay_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_micropayment_handypay_logo')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_micropayment_handypay_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_micropayment_handypay_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_micropayment_handypay_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_micropayment_handypay_mwst')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_micropayment_handypay_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_micropayment_handypay_mwstland')); ?>
+ </div>
+
+ <?php if ($this->get_option('wpsg_mod_micropayment_handypay_activ') != '1') { ?>
+ <div id="wpsg_mod_micropayment_handypay_infolayer">
+ <span style="color:red; font-weigh:bold;"><?php echo __('Bitte beachten Sie, dass es bei der Nutzung von HandyPay folgende Einschränkungen gibt', 'wpsg'); ?>:</span><br />
+ <ul>
+ <li><?php echo __('Nur Abrechnung von telekommunikationsbasierten Mehrwertdiensten möglich', 'wpsg'); ?></li>
+ <li><?php echo __('Preise nicht frei tarifierbar, nur vorgegebene Tarifstruktur nutzbar', 'wpsg'); ?></li>
+ <li><?php echo __('National und international KEINE einheitliche Gebührenstruktur', 'wpsg'); ?></li>
+ </ul>
+ <br />
+ <span style="font-weight:bold;"><?php echo __('Sollten Sie sich unsicher sein, ob Sie diese Zahlarten nutzen können oder dürfen, melden Sie sich einfach bei uns!', 'wpsg'); ?></span>
+ <ul>
+ <li><?php echo __('Ansprechpartner', 'wpsg'); ?>: Martin Eliason</li>
+ <li><?php echo __('Telefon (Festnetz)', 'wpsg'); ?>: +49 – (0)30 – 64904255</li>
+ <li><?php echo __('eMail', 'wpsg'); ?>: <a href="mailto:meliason@micropayment.de">meliason@micropayment.de</a></li>
+ <li><?php echo __('Stichwort', 'wpsg'); ?>: WordPress-Shopmodul</li>
+ </ul>
+ <br />
+ <input type="button" class="button" onclick="jQuery('#wpsg_mod_micropayment_handypay_infolayer').hide(); jQuery('#wpsg_mod_micropayment_handypay_layer').show();" value="<?php echo __('Ich habe einen entsprechenden Account und kann die Zahlungsart nutzen.', 'wpsg'); ?>" />
+ </div>
+ <?php } ?>
+
+ </div>
+ </div>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_admin_box').wpsg_adminbox();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_minquantity/produkt_edit_allgemein.phtml b/views/mods/mod_minquantity/produkt_edit_allgemein.phtml
new file mode 100644
index 0000000..17d18b3
--- /dev/null
+++ b/views/mods/mod_minquantity/produkt_edit_allgemein.phtml
@@ -0,0 +1,9 @@
+<?php
+
+ /**
+ * Integration des Moduls "Mindestbestellmenge" in die Produktverwaltung
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_minquantity[value]', __('Mindestbestellmenge', 'wpsg'), $this->view['wpsg_mod_minquantity']['value']); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_minquantity[valuemax]', __('Maximalbestellmenge', 'wpsg'), $this->view['wpsg_mod_minquantity']['valuemax']); ?> \ No newline at end of file
diff --git a/views/mods/mod_minquantity/settings_edit.phtml b/views/mods/mod_minquantity/settings_edit.phtml
new file mode 100644
index 0000000..9a99582
--- /dev/null
+++ b/views/mods/mod_minquantity/settings_edit.phtml
@@ -0,0 +1,7 @@
+<?php
+
+ /*
+ * Einstellungen des Moduls Mindestbestellmenge
+ */
+
+?> \ No newline at end of file
diff --git a/views/mods/mod_minrequest/settings_edit.phtml b/views/mods/mod_minrequest/settings_edit.phtml
new file mode 100644
index 0000000..83c63f1
--- /dev/null
+++ b/views/mods/mod_minrequest/settings_edit.phtml
@@ -0,0 +1,11 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Moduls "Mindestbestellwert"
+ * @author Daschmi
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_minrequest_basketamount', __('Minimaler Warenkorbwert', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_minrequest_basketamount')), array('hint' => __('Gilt für den Brutto Produktpreis. (Ohne Versand- und Zahlungskosten)', 'wpsg'), 'help' => 'wpsg_mod_minrequest_basketamount', 'unit' => $this->get_option('wpsg_currency'))); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_minrequest_basketmaxamount', __('Maximaler Warenkorbwert', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_minrequest_basketmaxamount')), array('hint' => __('Gilt für den Brutto Produktpreis. (Ohne Versand- und Zahlungskosten)', 'wpsg'), 'help' => 'wpsg_mod_minrequest_basketmaxamount', 'unit' => $this->get_option('wpsg_currency'))); ?> \ No newline at end of file
diff --git a/views/mods/mod_newsletter/checkout_customer_inner.phtml b/views/mods/mod_newsletter/checkout_customer_inner.phtml
new file mode 100644
index 0000000..8d8ac82
--- /dev/null
+++ b/views/mods/mod_newsletter/checkout_customer_inner.phtml
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Template für die Integration der optionalen Newsletteranmeldung in den Checkout
+ * Wird von der checkout.phtml aufgerufen
+ */
+
+?>
+<div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_newsletter">
+ <input class="wpsg_checkout" type="checkbox" id="wpsg_mod_newsletter" name="wpsg[checkout][wpsg_mod_newsletter]" value="1" <?php echo (($this->view['basket']['checkout']['wpsg_mod_newsletter'] == '1')?'checked="checked"':''); ?> /><?php echo __("Für Newsletter anmelden.", "wpsg"); ?>
+ </label>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_newsletter/customer_sidebar.phtml b/views/mods/mod_newsletter/customer_sidebar.phtml
new file mode 100644
index 0000000..417098a
--- /dev/null
+++ b/views/mods/mod_newsletter/customer_sidebar.phtml
@@ -0,0 +1,18 @@
+<div id="wpsg_customer_newsletter" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></span>
+ <span><?php echo __('Newsletter', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php if ($this->view['wpsg_mod_newsletter']['found'] === true) { ?>
+ <input type="hidden" name="wpsg_mod_newsletter[abo_id]" value="<?php echo $this->view['wpsg_mod_newsletter']['abo_id']; ?>" />
+ <?php echo wpsg_drawForm_Input('', __('Name', 'wpsg'), $this->view['wpsg_mod_newsletter']['name'], array('text' => true, 'nohspc' => true)); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_newsletter[status]', __('Status', 'wpsg'), $this->view['wpsg_mod_newsletter']['arStatus'], $this->view['wpsg_mod_newsletter']['status']); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_newsletter[group_id]', __('Abonnentengruppe', 'wpsg'), $this->view['wpsg_mod_newsletter']['arGroups'], $this->view['wpsg_mod_newsletter']['groupIds'], array('multiple' => ((sizeof($this->view['wpsg_mod_newsletter']['arGroups']) > 5)?5:sizeof($this->view['wpsg_mod_newsletter']['arGroups'])))); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_newsletter[update]', __('Daten übernehmen', 'wpsg'), false); ?>
+
+ <?php } else { ?>
+ <?php echo wpsg_drawForm_Input('', __('Status', 'wpsg'), $this->view['wpsg_mod_newsletter']['status'], array('text' => true, 'nohspc' => true)); ?>
+ <?php } ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_newsletter/settings_edit.phtml b/views/mods/mod_newsletter/settings_edit.phtml
new file mode 100644
index 0000000..85cba37
--- /dev/null
+++ b/views/mods/mod_newsletter/settings_edit.phtml
@@ -0,0 +1,63 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Newsletter Moduls
+ */
+
+?>
+<?php if ($this->view['plugin_active'] !== true) { ?>
+<div class="wpsg_error"><br /><?php echo __('Das Modul ist nur mit aktiviertem wpNewsletterGermany Plugin funktionsfähig.', 'wpsg'); ?><br /></div>
+<?php } else { ?>
+
+ <?php echo wpsg_drawForm_Select('wpsg_mod_newsletter_groups[]', __('Gruppenzuordnung nach Registrierung', 'wpsg'), $this->view['arGroup'], (array)explode(',', $this->get_option('wpsg_mod_newsletter_groups')), array('help' => 'wpsg_mod_newsletter_groups','multiple' => ((sizeof($this->view['arGroup']) > 5)?5:sizeof($this->view['arGroup'])))); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_newsletter_action', __('Aktion', 'wpsg'), array('0' => __('Opt-In Mail versenden', 'wpsg'), '1' => __('Direkt anmelden', 'wpsg')), $this->get_option('wpsg_mod_newsletter_action'), array('help' => 'wpsg_mod_newsletter_action')); ?>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_newsletter_imoprtgroups"><?php echo __('Gruppenimport aus wpShopGermany Kunden', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <select class="select " size="<?php echo ((sizeof($this->view['arGroup']) > 5)?5:sizeof($this->view['arGroup'])); ?>" multiple="multiple" name="wpsg_mod_newsletter_imoprtgroups[]" id="wpsg_mod_newsletter_imoprtgroups">
+ <?php foreach ($this->view['arGroup'] as $group_id => $group) { ?>
+ <option value="<?php echo $group_id; ?>"><?php echo $group; ?></option>
+ <?php } ?>
+ </select>
+ <input type="button" onclick="return wpsg_doImport();" value="<?php echo __('Kunden importieren', 'wpsg'); ?>" class="button" style="width:auto;" />
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Startet den Import
+ */
+ function wpsg_doImport()
+ {
+
+ nGroups = jQuery('#wpsg_mod_newsletter_imoprtgroups option:selected').length;
+
+ if (nGroups <= 0)
+ {
+
+ alert('<?php echo __('Bitte mindestens eine Gruppe wählen.', 'wpsg'); ?>');
+ return;
+
+ }
+
+ if (!confirm('<?php echo __('Die Shop Kunden werden in die ausgewählten Gruppen importiert. Bestehende E-Mail Adressen werden überschrieben.', 'wpsg'); ?>')) return;
+
+ var strGroups = '';
+ jQuery('#wpsg_mod_newsletter_imoprtgroups option:selected').each(function() {
+ strGroups += jQuery(this).attr('value') + ',';
+ } );
+
+ strGroups = strGroups.substring(0, strGroups.length - 1);
+
+ location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_newsletter&do=import&noheader=1&groups=' + strGroups;
+
+ } // function wpsg_doImport()
+
+ /* ]]> */</script>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_nlsatolo/checkout_customer_inner.phtml b/views/mods/mod_nlsatolo/checkout_customer_inner.phtml
new file mode 100644
index 0000000..95fb869
--- /dev/null
+++ b/views/mods/mod_nlsatolo/checkout_customer_inner.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Template für die Integration der optionalen Newsletteranmeldung in den Checkout
+ * Wird von der checkout.phtml aufgerufen
+ */
+
+?>
+<div class="wpsg_checkoutblock">
+ <input type="hidden" name="wpsg[checkout][wpsg_mod_nlsatolo]" value="0" />
+ <input class="wpsg_checkout" type="checkbox" id="wpsg_mod_nlsatolo" name="wpsg[checkout][wpsg_mod_nlsatolo]" value="1" <?php echo (($this->view['basket']['checkout']['wpsg_mod_nlsatolo'] == '1')?'checked="checked"':''); ?> />
+ <label for="wpsg_mod_nlsatolo">
+ <?php echo __("Für Newsletter anmelden.", "wpsg"); ?>
+ </label>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_onepagecheckout/onepage.phtml b/views/mods/mod_onepagecheckout/onepage.phtml
new file mode 100644
index 0000000..2fe1e26
--- /dev/null
+++ b/views/mods/mod_onepagecheckout/onepage.phtml
@@ -0,0 +1,402 @@
+<?php
+
+ /**
+ * Template für den Bestellablauf auf einer Seite
+ */
+
+?>
+<div class="wpsg wpsg_onepagecheckout wpsg_checkout wpsg_checkout2 <?php echo ((isset($_REQUEST['wpsg_basket_ajax']))?'wpsg_basket_ajax':''); ?>">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <form id="wpsg_basket_form" name="wpsg_basket_form" method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>" enctype="multipart/form-data">
+
+ <div class="wpsg_clear"></div>
+
+ <?php /* Einbindung des Logins im Checokut */ ?>
+ <?php $this->callMod('wpsg_mod_kundenverwaltung', 'checkout_login'); ?>
+
+ <div class="wpsg_box" id="wpsg_box_payship">
+
+ <div class="wpsg_inner">
+
+ <div class="wpsg_shipping">
+
+ <h2><?php echo __('Versandarten', 'wpsg'); ?></h2>
+
+ <div class="shippay_wrap">
+ <?php foreach ($this->view['arShipping'] as $s) { ?>
+ <div class="shippay_item_wrap">
+
+ <input <?php echo (($this->view['basket']['checkout']['shipping'] == $s['id'] || sizeof($this->view['arShipping']) == 1)?'checked="checked"':''); ?> type="radio" value="<?php echo $s['id']; ?>" name="wpsg[checkout][shipping]" id="shipping_<?php echo $s['id']; ?>" />
+
+ <?php if (wpsg_isSizedString($s['logo'])) { ?>
+ <img class="wpsg_payship_logo" src="<?php echo $s['logo']; ?>" alt="<?php echo $s['name']; ?>" />
+ <?php } else { ?>
+ <div class="wpsg_payship_name"><?php echo __($s['name'], 'wpsg'); ?></div>
+ <?php } ?>
+ <?php if ((isset($s['hint']) && trim($s['hint']) != '') || $s['price'] > 0) { ?>
+ <div id="shipping_<?php echo $s['id']; ?>_hint" class="shippay_hint">
+ <?php if ($s['price'] > 0) { ?>
+ <?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($s['price'], $this->get_option('wpsg_currency')); ?><br />
+ <?php } ?>
+ <?php echo $this->replaceUniversalPlatzhalter(__($s['hint'], 'wpsg')); ?>
+ </div>
+ <?php } ?>
+
+ <div class="shippay_checkmark"></div>
+
+ </div>
+ <?php } ?>
+ </div>
+
+ </div>
+
+ <?php if ($this->callMods('checkout_handlePayment') === true) { ?>
+
+ <?php if (!$this->hasMod('wpsg_mod_crefopay')) { ?>
+ <div class="wpsg_payment">
+
+ <h2><?php echo __('Zahlungsarten', 'wpsg'); ?></h2>
+
+ <div class="shippay_wrap">
+ <?php foreach ($this->view['arPayment'] as $p) { ?>
+ <div class="shippay_item_wrap">
+
+ <input <?php echo (($this->view['basket']['checkout']['payment'] == $p['id'] || sizeof($this->view['arPayment']) == 1)?'checked="checked"':''); ?> type="radio" value="<?php echo $p['id']; ?>" name="wpsg[checkout][payment]" id="payment_<?php echo $p['id']; ?>" />
+
+ <div class="wpsg_payship_name"><?php echo __($p['name'], 'wpsg'); ?></div>
+
+ <?php if (wpsg_isSizedString($p['logo'])) { ?>
+ <img class="wpsg_payship_logo" src="<?php echo $p['logo']; ?>" alt="<?php echo $p['name']; ?>" />
+ <?php } ?>
+
+ <?php if ((isset($p['hint']) && trim($p['hint']) != '') || $p['price'] > 0) { ?>
+ <div id="payment_<?php echo $p['id']; ?>_hint" class="shippay_hint">
+ <?php if ($p['price'] > 0) { ?>
+ <?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($p['price'], $this->get_option('wpsg_currency')); ?><br />
+ <?php } ?>
+ <?php echo $this->replaceUniversalPlatzhalter(__($p['hint'], 'wpsg')); ?>
+ </div>
+ <?php } ?>
+
+ <div class="shippay_checkmark"></div>
+
+ </div>
+ <?php } ?>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php } ?>
+
+ <div class="wpsg_clear"></div>
+
+ </div>
+
+ </div>
+
+ <div class="wpsg_box" id="wpsg_box_kundendaten">
+
+ <h2><?php echo __('Kundendaten', 'wpsg'); ?></h2>
+
+ <div class="wpsg_spacer"></div>
+
+ <div class="wpsg_inner">
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['firma'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("firma", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_firma" name="wpsg[checkout][firma]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['firma']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
+ <?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
+ <select class="<?php echo (($this->view['pflicht']['anrede'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[checkout][title]">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
+ <option value="<?php echo wpsg_hspc($t); ?>" <?php echo (($this->view['basket']['checkout']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="vname" name="wpsg[checkout][vname]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['vname']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="name" class="wpsg_checkout"><?php echo __("Name", "wpsg"); ?>
+ <?php if ($this->data['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="name" name="wpsg[checkout][name]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['name']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[checkout][email]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['email']); ?>" />
+ </div>
+
+ <?php if (isset($this->view['pflicht']['emailconfirm']) && $this->view['pflicht']['emailconfirm'] == '1') { ?>
+ <div class="wpsg_checkoutblock">
+ <label for="email" class="wpsg_checkout"><?php echo __("E-Mail (Wiederholung)", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[checkout][email2]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['email2']); ?>" />
+ </div>
+ <?php } ?>
+
+ <div class="wpsg_checkoutblock">
+ <label for="geb" class="wpsg_checkout"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ)',"wpsg"); ?>
+ <?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['geb'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("geb", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="geb" name="wpsg[checkout][geb]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['geb']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="fax" class="wpsg_checkout"><?php echo __("Fax.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['fax'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("fax", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="fax" name="wpsg[checkout][fax]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['fax']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="tel" class="wpsg_checkout"><?php echo __("Tel.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['tel'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("tel", (array)$this->view['error']))?'wpsg_error':''); ?>" type="tel" id="tel" name="wpsg[checkout][tel]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['tel']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="strasse" class="wpsg_checkout"><?php echo __("Strasse Nr.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="strasse" name="wpsg[checkout][strasse]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['strasse']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="wpsg_input_text <?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="number" id="plz" name="wpsg[checkout][plz]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['plz']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="ort" class="wpshopgermany_checkout"><?php echo __("Ort", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['ort'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="ort" name="wpsg[checkout][ort]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['ort']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <select name="wpsg[checkout][land]" class="<?php echo (($this->view['pflicht']['land'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach ($this->view['laender'] as $l) { ?>
+ <option value="<?php echo wpsg_hspc($l['id']); ?>" <?php echo (($l['id'] == $this->view['basket']['checkout']['land'])?'selected="selected"':(($this->get_option('wpsg_defaultland') == $l['id'])?'selected="selected"':'')); ?>><?php echo wpsg_hspc(__($l['name'], 'wpsg')); ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_ustidnr" class="wpshopgermany_checkout"><?php echo __("UStIdNr.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['ustidnr'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ustidnr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_ustidnr" name="wpsg[checkout][ustidnr]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['ustidnr']); ?>" />
+ </div>
+
+ <?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
+ <?php if ($this->get_option('wpsg_kundenvariablen_show') == '1') { ?>
+ <?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
+ <div class="wpsg_checkoutblock">
+ <label class="wpsg_cv" for="wpsg_cv_<?php echo $c_id; ?>">
+ <?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
+ <?php if ($c['typ'] == '0') { // Textfeld ?>
+ <input class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $c_id; ?>]" type="text" value="<?php echo wpsg_hspc($this->view['basket']['checkout']['custom'][$c_id]); ?>" />
+ <?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
+ <select class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $c_id; ?>]">
+ <option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
+ <?php foreach ((array)$arAuswahl as $a) { ?>
+ <option value="<?php echo wpsg_hspc($a); ?>" <?php echo (($a == $this->view['basket']['checkout']['custom'][$c_id])?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($c['typ'] == '2') { // Checkbox ?>
+ <input type="hidden" name="wpsg[checkout][custom][<?php echo $c_id; ?>]" value="0" />
+ <input class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[checkout][custom][<?php echo $c_id; ?>]" value="1" <?php echo wpsg_hspc(($this->view['basket']['checkout']['custom'][$c_id] == '1')?'checked="checked"':''); ?> />
+ <?php } ?>
+ </label>
+ </div>
+ <?php } } ?>
+ <?php } ?>
+ <?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
+
+ <div class="wpsg_clear"></div>
+
+ <?php $this->callMods('checkout_customer_inner'); ?>
+
+ </div>
+
+ </div>
+
+ <?php $this->callMods('checkout_inner_prebutton', array(&$this->view)); ?>
+
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_box">
+
+ <h2><?php echo __('Bestellkommentar', 'wpsg'); ?></h2>
+
+ <div class="wpsg_spacer"></div>
+
+ <div class="wpsg_inner wpsg_commentblock">
+ <textarea name="wpsg[checkout][comment]" id="wpsg_checkout_comment"><?php echo wpsg_hspc($this->view['basket']['checkout']['comment']); ?></textarea>
+ </div>
+ </div>
+
+ <div class="wpsg_mandatoryfield_hint">
+ <?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
+ </div>
+
+ <br />
+
+ <?php $this->ClearSessionErrors(); ?>
+
+ <br />
+
+ <input type="submit" onclick="location.href='<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>'; return false;" class="wpsg_button wpsg_basketbutton" value="<?php echo __('Zurück zum Warenkorb', 'wpsg'); ?>" name="wpsg_redirect_basket" />
+ <input type="submit" id="wpsg_checkout2button" class="wpsg_button wpsg_checkout2button" value="<?php echo __('Weiter', 'wpsg'); ?>" name="wpsg_checkout" />
+
+ <div class="wpsg_clear"></div>
+
+ <br />
+
+ </form>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_setShipPay(jqElement)
+ {
+
+ jqElement.parents('.shippay_wrap').find('.shippay_item_wrap').removeClass('shippay_active');
+ jqElement.addClass('shippay_active');
+
+ jqElement.find('input').prop('checked', true);
+
+ return true;
+
+ }
+
+ jQuery(document).ready(function() {
+
+ jQuery('.shippay_wrap .shippay_item_wrap').bind('click', function() {
+
+ wpsg_setShipPay(jQuery(this));
+
+ jQuery.ajax( {
+ 'url': wpsg_ajax.ajaxurl,
+ 'method': 'get',
+ 'data': {
+ 'wpsg[action]': 'updateCheckout',
+ 'wpsg_form_data': jQuery('#wpsg_checkout_form').serialize()
+ },
+ 'async': true,
+ 'success': function(data) { }
+ } );
+
+ } );
+
+ jQuery('.shippay_wrap .shippay_item_wrap').each(function() {
+
+ if (jQuery(this).find('input[type="radio"]').prop('checked')) wpsg_setShipPay(jQuery(this));
+
+ } );
+
+ jQuery('#wpsg_box_kundendaten input').bind('keypress', function(e) {
+
+ if(e.keyCode == 13)
+ {
+
+ jQuery('#wpsg_checkout2button').click();
+ return false;
+
+ }
+
+ } );
+
+ jQuery('.shippay input[type="radio"]').bind('change', function() {
+
+ jQuery(this).parents('.shippay_wrap').find('.shippay').removeClass('wpsg_hover');
+
+ if (jQuery(this).prop("checked"))
+ {
+
+ jQuery(this).parents('.shippay').addClass('wpsg_hover');
+
+ }
+
+ wpsg_showPaymentHint();
+ wpsg_showShippingHint();
+
+ } );
+
+ jQuery('.shippay input[type="radio"]:checked').change();
+ jQuery('.shippay').bind('click', function(e) {
+
+ if (jQuery(this).hasClass('wpsg_hover')) return true;
+
+ jQuery(this).find('input[type="radio"]').attr("checked", "checked");
+ jQuery(this).find('input[type="radio"]').change();
+
+ } );
+
+ <?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
+ if (typeof jQuery.validationEngine == "object")
+ {
+
+ jQuery("#wpsg_basket_form").validationEngine('attach', { promptPosition : "bottomLeft", scroll: false } );
+
+ jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function() {
+ jQuery("#wpsg_basket_form").validationEngine('detach');
+ });
+
+ }
+ <?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?>
+
+ jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
+ jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
+ jQuery("#wpsg_basket_form").validate( {
+ ignore: '',
+ errorClass: 'wpsg_error',
+ onsubmit: false,
+ showErrors: function(errorMap, errorList) {
+
+ this.defaultShowErrors();
+ var errors = this.numberOfInvalids();
+
+ }
+ } );
+
+ jQuery('.wpsg_checkout2button').bind('click', function() {
+
+ var bReturn = jQuery('#wpsg_basket_form').validate().form();
+ if (jQuery('#wpsg_basket_form input.wpsg_error').length > 0) jQuery('#wpsg_basket_form input.wpsg_error')[0].focus();
+ return bReturn;
+
+ } );
+
+ <?php } ?>
+
+ } );
+
+ /* ]]> */</script>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_onepagecheckout/settings_edit.phtml b/views/mods/mod_onepagecheckout/settings_edit.phtml
new file mode 100644
index 0000000..8979df3
--- /dev/null
+++ b/views/mods/mod_onepagecheckout/settings_edit.phtml
@@ -0,0 +1,8 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des "OnepageCheckout" Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_onepagecheckout_page', __('Seite für den "EinSeitenCheckout"', 'wpsg'), $this->view['arPages'], $this->get_option('wpsg_mod_onepagecheckout_page'), array('help' => 'wpsg_mod_onepagecheckout_page')); ?> \ No newline at end of file
diff --git a/views/mods/mod_ordercondition/list.phtml b/views/mods/mod_ordercondition/list.phtml
new file mode 100644
index 0000000..5594678
--- /dev/null
+++ b/views/mods/mod_ordercondition/list.phtml
@@ -0,0 +1,121 @@
+<?php
+
+ /**
+ * Template für die Liste der Bestellbedingungen im Backend
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_mod_ordercondition_edit_name').each(function() {
+
+ var oc_id = jQuery(this).attr("id").replace(/wpsg_mod_ordercondition_name_/, '');
+
+ jQuery(this).editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ oc_id: oc_id
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ } );
+
+ } );
+
+ jQuery('.wpsg_mod_ordercondition_edit_typ').bind('change', function() {
+
+ var oc_id = jQuery(this).attr("id").replace(/wpsg_mod_ordercondition_typ_/, '');
+ var value = jQuery(this).val();
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1',
+ data: {
+ field: 'typ',
+ value: value,
+ oc_id: oc_id
+ }
+ } );
+
+ } );
+
+ jQuery('#wpsg_oc_list .wpsg_icon_remove').bind('click', function() {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie diese Bestellbedingung entfernen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_oc_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=remove&noheader=1',
+ data: {
+ oc_id: jQuery(this).parent().attr("id")
+ },
+ success: function(data)
+ {
+
+ jQuery('#wpsg_oc_list').html(data);
+
+ }
+ } );
+
+ } );
+
+ } );
+
+/* ]]> */</script>
+<?php if (!is_array($this->view['wpsg_mod_ordercondition']['data']) || sizeof($this->view['wpsg_mod_ordercondition']['data']) <= 0) { ?>
+<?php echo __('Bisher keine Bestellbedingungen angelegt.', 'wpsg'); ?>
+<?php } else { ?>
+<?php $i = 0; foreach ($this->view['wpsg_mod_ordercondition']['data'] as $oc) { $i ++; ?>
+
+ <div id="wpsg_mod_ordercondition_row_<?php echo $oc['id']; ?>">
+
+ <?php echo wpsg_drawForm_Input($oc['id'], __('ID', 'wpsg'), $oc['id'], array('text' => true, 'remove' => '1')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_ordercondition_name_'.$oc['id'], __('Bezeichnung', 'wpsg'), $oc['name'], array('text' => true, 'class_text' => 'wpsg_mod_ordercondition_edit_name wpsg_editable')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_ordercondition_typ_'.$oc['id'], __('Wirkungsbereich', 'wpsg'), array('0' => __('Inaktiv', 'wpsg'), '1' => __('Jede Bestellung', 'wpsg'), '2' => __('Bestimmte Produkte', 'wpsg')), $oc['typ'], array('class_select' => 'wpsg_editable wpsg_mod_ordercondition_edit_typ')); ?>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_ordercondition_text_<?php echo $oc['id']; ?>"><?php echo __('Bedingungstext', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <a href="#" onclick="return wpsg_showOCText(<?php echo $oc['id']; ?>);"><?php echo __('Editor anzeigen/verbergen', 'wpsg'); ?></a>
+ </p>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_form_field wpsg_mod_ordercondition_editor wpsg_mod_ordercondition_editor_<?php echo $oc['id']; ?>" style="display:none; width:745px; min-height:225px;">
+ <textarea class="wpsg_mod_ordercondition_text" id="oc_<?php echo $oc['id']; ?>" name="oc[<?php echo $oc['id']; ?>]"><?php echo wpsg_hspc($oc['text']); ?></textarea>
+ <div class="wpsg_clear"></div><br />
+ <input class="button" type="button" onclick="wpsg_saveOCText(<?php echo $oc['id']; ?>);" value="<?php echo __('Text speichern', 'wpsg'); ?>" /><br /><br />
+ </div>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_ordercondition_errortext_<?php echo $oc['id']; ?>"><?php echo __('Fehlertext', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <a href="#" onclick="return wpsg_showOCErrorText(<?php echo $oc['id']; ?>);"><?php echo __('Editor anzeigen/verbergen', 'wpsg'); ?></a>
+ </p>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_form_field wpsg_mod_ordercondition_editor wpsg_mod_ordercondition_editor_errortext_<?php echo $oc['id']; ?>" style="display:none; width:745px; min-height:225px;">
+ <textarea class="wpsg_mod_ordercondition_text" id="oc_errortext_<?php echo $oc['id']; ?>" name="oc[<?php echo $oc['id']; ?>]"><?php echo wpsg_hspc($oc['errortext']); ?></textarea>
+ <div class="wpsg_clear"></div><br />
+ <input class="button" type="button" onclick="wpsg_saveOCErrorText(<?php echo $oc['id']; ?>);" value="<?php echo __('Text speichern', 'wpsg'); ?>" /><br />
+ </div>
+
+ <?php if ($i < sizeof($this->view['wpsg_mod_ordercondition']['data'])) { ?><br /><hr /><?php } ?>
+
+ </div>
+
+<?php } ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_ordercondition/overview_top.phtml b/views/mods/mod_ordercondition/overview_top.phtml
new file mode 100644
index 0000000..2ac9e44
--- /dev/null
+++ b/views/mods/mod_ordercondition/overview_top.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Template für die Integration der Bestellbedingungen in die Bestellzusammenfassung
+ */
+
+ // Die Mindestlänge, damit der Text in einer Scrollbox angezeigt wird
+ $minLength = 1000;
+
+?>
+<?php foreach ($this->view['wpsg_mod_ordercondition']['data'] as $oc) { ?>
+<div class="wpsg_agb">
+ <label>
+ <input type="checkbox" value="1" name="wpsg_mod_ordercondition[<?php echo $oc['id']; ?>]" />
+ <?php if (strlen($oc['text']) < $minLength) { ?>
+ <?php echo $oc['text']; ?>
+ <?php } else { ?>
+ <?php echo __($oc['name'], 'wpsg'); ?>
+ <?php } ?>
+ </label>
+ <?php if (strlen($oc['text']) >= $minLength) { ?>
+ <div class="wpsg_mod_ordercondition_hint"><?php echo $oc['text']; ?></div>
+ <?php } ?>
+</div>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_ordercondition/produkt_edit_sidebar.phtml b/views/mods/mod_ordercondition/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..fc70b85
--- /dev/null
+++ b/views/mods/mod_ordercondition/produkt_edit_sidebar.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Template für die Integration der Bestellbedingungen in die Produktverwaltung
+ */
+
+?>
+<div class="postbox" id="wpsg_ordercondition">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Bestellbedingungen', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php foreach ($this->view['wpsg_mod_ordercondition']['data'] as $oc) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_ordercondition['.$oc['id'].']', __($oc['name'], 'wpsg'), $oc['selected']); ?>
+ <?php } ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_ordercondition/settings_edit.phtml b/views/mods/mod_ordercondition/settings_edit.phtml
new file mode 100644
index 0000000..4bef845
--- /dev/null
+++ b/views/mods/mod_ordercondition/settings_edit.phtml
@@ -0,0 +1,168 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Bestellbedingungsmoduls
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Wird beim Anlegen einer neuen Bestellbedingung aufgerufen
+ */
+ function wpsg_addOC()
+ {
+
+ jQuery('#wpsg_oc_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&noheader=1&do=add',
+ success: function(data) {
+ jQuery('#wpsg_oc_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addZV()
+
+ /**
+ * Speichert den Text einer Bestellbedingung
+ */
+ function wpsg_saveOCText(oc_id)
+ {
+
+ var OCText = jQuery('#oc_' + oc_id).val();
+
+ window.setTimeout(function() {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1',
+ type: 'POST',
+ data: {
+ field: 'text',
+ value: OCText,
+ oc_id: oc_id
+ },
+ success: function(data) {
+
+ if (data != "1")
+ {
+
+ alert(data);
+
+ }
+ else
+ {
+
+ alert('<?php echo __('Text wurde erfolgreich gespeichert.', 'wpsg'); ?>');
+
+ }
+
+ }
+ } );
+
+
+
+ }, 10);
+
+ return false;
+
+ } // function wpsg_saveOCText(oc_id)
+
+ function wpsg_saveOCErrorText(oc_id)
+ {
+
+ var OCErrorText = jQuery('#oc_errortext_' + oc_id).val();
+
+ window.setTimeout(function() {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1',
+ type: 'POST',
+ data: {
+ field: 'errortext',
+ value: OCErrorText,
+ oc_id: oc_id
+ },
+ success: function(data) {
+
+ if (data != "1")
+ {
+
+ alert(data);
+
+ }
+
+ }
+ } );
+
+ }, 10);
+
+ return false;
+
+ } // function wpsg_saveOCErrorText(oc_id)
+
+ /**
+ * Blendet den Editor einer Bestellbedingung ein und die anderen aus
+ */
+ function wpsg_showOCText(oc_id)
+ {
+
+ jQuery('.wpsg_mod_ordercondition_editor').hide(500);
+
+ if (!jQuery('.wpsg_mod_ordercondition_editor_' + oc_id).is(':visible'))
+ {
+
+ jQuery('.wpsg_mod_ordercondition_editor_' + oc_id).show(500);
+
+ }
+
+ return false;
+
+ } // function wpsg_showOCText(oc_id)
+
+
+ /**
+ * Blendet den Editor einer Bestellbedingung ein und die anderen aus
+ */
+ function wpsg_showOCErrorText(oc_id)
+ {
+
+ jQuery('.wpsg_mod_ordercondition_editor').hide(500);
+
+ if (!jQuery('.wpsg_mod_ordercondition_editor_errortext_' + oc_id).is(':visible'))
+ {
+
+ jQuery('.wpsg_mod_ordercondition_editor_errortext_' + oc_id).show(500);
+
+ }
+
+ return false;
+
+ } // function wpsg_showOCErrorText(oc_id)
+
+/* ]]> */</script>
+
+<?php if ($this->hasMod('wpsg_mod_crefopay')) { ?>
+<p>
+ <span class="wpsg_error"><?php echo __('Aufgrund des für CrefoPay angepassten Bestellablaufs ist dieses Modul unwirksam.', 'wpsg'); ?></span>
+</p>
+<?php } ?>
+
+<div class="wpsg_admin_box">
+
+ <div class="head">
+ <div class="title">
+ <div class="fulltab">
+ <?php echo __('Bestellbedingungen', 'wpsg'); ?>
+ <a title="<?php echo __('Neue Bestellbedingung anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addOC();"></a>
+ </div>
+ </div>
+ </div>
+
+ <div class="content" id="wpsg_oc_list">
+ <?php echo $this->callMod('wpsg_mod_ordercondition', 'oc_list'); ?>
+ </div>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_orderupload/checkout_inner_prebutton.phtml b/views/mods/mod_orderupload/checkout_inner_prebutton.phtml
new file mode 100644
index 0000000..1c347b6
--- /dev/null
+++ b/views/mods/mod_orderupload/checkout_inner_prebutton.phtml
@@ -0,0 +1,26 @@
+<?php
+
+ /**
+ * Template für die Integration des Bestelluploads in den Bestellprozess
+ */
+
+?>
+<div class="wpsg_box wpsg_mod_orderupload">
+ <div class="wpsg_head"><?php echo __('Dateiupload', 'wpsg'); ?> <?php if ($this->get_option('wpsg_mod_orderupload_optional') != '1') { ?><span class="wpsg_required">*</span><?php } ?></div>
+ <div class="wpsg_inner">
+
+ <input type="file" name="wpsg_mod_orderupload_file" />
+
+ <?php if (wpsg_isSizedArray($_SESSION['wpsg']['checkout']['wpsg_mod_orderupload'])) { ?>
+ <br />
+ <label class="wpsg_checkout"><?php echo __('Bisher hochgeladene Dokumente', 'wpsg'); ?>:</label><br />
+ <?php foreach ($_SESSION['wpsg']['checkout']['wpsg_mod_orderupload'] as $ou_index => $ou) { ?>
+ <a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie dieses Dokument aus der Bestellung entfernen möchten?', 'wpsg'); ?>');" href="?wpsg_plugin=wpsg_mod_orderupload&wpsg_action=remove&file_index=<?php echo $ou_index; ?>" class="wpsg_mod_orderupload_removelink">
+ <?php echo __('Entfernen', 'wpsg'); ?>
+ </a>
+ <a href="<?php echo $ou[2]; ?>"><?php echo wpsg_hspc($ou[0]); ?></a>&nbsp;<?php echo '('.wpsg_formatSize($ou[3]).')'; ?><br />
+ <?php } ?>
+ <?php } ?>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_orderupload/order_view_sidebar.phtml b/views/mods/mod_orderupload/order_view_sidebar.phtml
new file mode 100644
index 0000000..759a153
--- /dev/null
+++ b/views/mods/mod_orderupload/order_view_sidebar.phtml
@@ -0,0 +1,22 @@
+<?php
+
+ /**
+ * Template für die Anzeige der Bestelluploads innerhalb der Bestellung
+ */
+
+?>
+<div class="postbox" id="wpsg_modorderupload">
+ <div title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br></div>
+ <h3 class="hndle">
+ <span><?php echo __('Bestelluploads', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php if (!wpsg_isSizedArray($this->view['arFiles'])) { ?>
+ <p><?php echo __('Keine Dateien hochgeladen.', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <?php foreach ($this->view['arFiles'] as $f) { ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1&action=ajax&mod=wpsg_mod_orderupload&wpsg_mod_orderupload_download=<?php echo rawurlencode($f); ?>"><?php echo $f; ?></a> (<?php echo wpsg_formatSize($this->callMod('wpsg_mod_orderupload', 'getSavePath', array($this->view['data']['id'])).$f); ?>)<br />
+ <?php } ?>
+ <?php } ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_orderupload/settings_edit.phtml b/views/mods/mod_orderupload/settings_edit.phtml
new file mode 100644
index 0000000..6750fba
--- /dev/null
+++ b/views/mods/mod_orderupload/settings_edit.phtml
@@ -0,0 +1,11 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Bestell Upload Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_orderupload_filename', __('Neuer Dateiname', 'wpsg'), $this->get_option('wpsg_mod_orderupload_filename'), array('help' => 'wpsg_mod_orderupload_filename')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_orderupload_allowedext', __('Erlaubte Endungen (kommagetrennt)', 'wpsg'), $this->get_option('wpsg_mod_orderupload_allowedext'), array('help' => 'wpsg_mod_orderupload_allowedext')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_orderupload_multifiles', __('Mehr als eine Datei erlauben', 'wpsg'), $this->get_option('wpsg_mod_orderupload_multifiles'), array('help' => 'wpsg_mod_orderupload_multifiles')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_orderupload_optional', __('Upload ist kein Pflichtfeld', 'wpsg'), $this->get_option('wpsg_mod_orderupload_optional'), array('help' => 'wpsg_mod_orderupload_optional')); ?> \ No newline at end of file
diff --git a/views/mods/mod_ordervars/checkout_inner_prebutton.phtml b/views/mods/mod_ordervars/checkout_inner_prebutton.phtml
new file mode 100644
index 0000000..20c3997
--- /dev/null
+++ b/views/mods/mod_ordervars/checkout_inner_prebutton.phtml
@@ -0,0 +1,44 @@
+<?php
+
+ /**
+ * Template für die Integration der Bestellvariablen innerhalb des Checkouts
+ */
+
+?>
+<div class="wpsg_box wpsg_mod_ordervars">
+
+ <h2><?php echo __('Bestellvariablen', 'wpsg'); ?></h2>
+
+ <div class="wpsg_spacer"></div>
+
+ <div class="wpsg_inner">
+ <?php foreach ((array)$this->view['wpsg_mod_ordervars']['data'] as $ov) { ?>
+ <div class="wpsg_checkoutblock">
+ <?php if ($ov['typ'] == '3') { // Checkbox ?>
+ <label class="wpshopgermany_checkout" for="wpsg_mod_ordervars_<?php echo $ov['id']; ?>">
+ <input type="hidden" value="0" name="wpsg_mod_ordervars[<?php echo $ov['id']; ?>]" />
+ <input class="<?php echo ((in_array("wpsg_mod_ordervars_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_mod_ordervars_<?php echo $ov['id']; ?>" <?php echo (($_SESSION['wpsg']['wpsg_mod_ordervars'][$ov['id']] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" name="wpsg_mod_ordervars[<?php echo $ov['id']; ?>]" /><?php echo $this->callMod('wpsg_mod_ordervars', 'getNameById', array($ov['id'])); ?><?php if ($ov['pflicht'] == '1') { ?><span class="wpsg_required">*</span><?php } ?>
+ </label>
+ <?php } else { ?>
+ <label class="wpshopgermany_checkout" for="wpsg_mod_ordervars_<?php echo $ov['id']; ?>">
+ <?php echo $this->callMod('wpsg_mod_ordervars', 'getNameById', array($ov['id'])); ?>
+ <?php if ($ov['pflicht'] == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <div class="wpsg_mod_ordervars_field">
+ <?php if ($ov['typ'] == '1') { // Auswahlfeld ?>
+ <select class="<?php echo ((in_array("wpsg_mod_ordervars_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?> <?php echo (($ov['pflicht'] == '1')?'validate[required]':''); ?>" name="wpsg_mod_ordervars[<?php echo $ov['id']; ?>]" id="wpsg_mod_ordervars_<?php echo $ov['id']; ?>">
+ <option value=""><?php echo __('Bitte wählen', 'wpsg'); ?></option>
+ <?php $ov['auswahl'] = explode('|', $ov['auswahl']); foreach ((array)$ov['auswahl'] as $option) { ?>
+ <option <?php echo (($_SESSION['wpsg']['wpsg_mod_ordervars'][$ov['id']] == $option)?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($option); ?>"><?php echo wpsg_hspc($option); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($ov['typ'] == '2') { // Textfeld ?>
+ <input class="<?php echo ((in_array("wpsg_mod_ordervars_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?> <?php echo (($ov['pflicht'] == '1')?'validate[required]':''); ?>" type="text" name="wpsg_mod_ordervars[<?php echo $ov['id']; ?>]" value="<?php echo wpsg_hspc($_SESSION['wpsg']['wpsg_mod_ordervars'][$ov['id']]); ?>" id="wpsg_mod_ordervars_<?php echo $ov['id']; ?>" />
+ <?php } ?>
+ </div>
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_ordervars/mail.phtml b/views/mods/mod_ordervars/mail.phtml
new file mode 100644
index 0000000..5d1f563
--- /dev/null
+++ b/views/mods/mod_ordervars/mail.phtml
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Template für die Integration der Bestellvariablen in die Mails
+ * dieses Template wird für die Adminmail, Kundenmail und Auftragsbestätigung verwendet
+ */
+
+?>
+<?php echo __('Bestellvariablen', 'wpsg'); ?>:
+
+<?php foreach ($this->view['wpsg_mod_ordervars']['data'] as $ov) { ?>
+<?php echo $ov['name']; ?>: <?php echo $ov['value']; ?>
+<?php } ?>
diff --git a/views/mods/mod_ordervars/mail_html.phtml b/views/mods/mod_ordervars/mail_html.phtml
new file mode 100644
index 0000000..8c2ee2f
--- /dev/null
+++ b/views/mods/mod_ordervars/mail_html.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Template für die Integration der Bestellvariablen in die HTML Mails
+ * dieses Template wird für die Adminmail, Kundenmail und Auftragsbestätigung verwendet
+ */
+
+?>
+<h2><?php echo __('Bestellvariablen', 'wpsg'); ?>:</h2>
+
+<table style="width:100%;">
+ <?php foreach ($this->view['wpsg_mod_ordervars']['data'] as $ov) { ?>
+ <tr>
+ <td style="padding-right:15px; text-align:left;"><?php echo __($ov['name'], 'wpsg'); ?>:</td>
+ <td style=""><?php echo $ov['value']; ?></td>
+ </tr>
+ <?php } ?>
+</table> \ No newline at end of file
diff --git a/views/mods/mod_ordervars/order_view_sidebar.phtml b/views/mods/mod_ordervars/order_view_sidebar.phtml
new file mode 100644
index 0000000..36f5394
--- /dev/null
+++ b/views/mods/mod_ordervars/order_view_sidebar.phtml
@@ -0,0 +1,63 @@
+<?php
+
+ /**
+ * Template für die Integration der Bestellvariablen in die Bestellverwaltung
+ */
+
+?>
+<div id="wpsg_ordervars" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br></span>
+ <span><?php echo __('Bestellvariablen', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php foreach ($this->view['wpsg_mod_ordervars']['data'] as $ov_id => $ov) { ?>
+
+ <?php echo wpsg_drawForm_Input('wpsg_ordervar_'.$ov_id, $this->callMod('wpsg_mod_ordervars', 'getNameById', array($ov['id'])), $this->callMod('wpsg_mod_ordervars', 'getValueByIdAndOrder', array($ov_id, $_REQUEST['edit_id'])), array('text' => true, 'class_text' => 'wpsg_editable')); ?>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ <?php if ($ov['typ'] == '1') { /* Auswahl */ ?>
+ jQuery('#wpsg_ordervar_<?php echo $ov_id; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
+ submitdata: {
+ order_id: <?php echo $_REQUEST['edit_id']; ?>,
+ ov_id: '<?php echo $ov['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ data : '<?php echo json_encode(wpsg_array_merge((array)$ov['auswahl'], array('not_set' => __('Keine Angabe', 'wpsg')))); ?>',
+ type : 'select',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+ <?php } else if ($ov['typ'] == '2') { /* Text */ ?>
+ jQuery('#wpsg_ordervar_<?php echo $ov_id; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
+ submitdata: {
+ order_id: <?php echo $_REQUEST['edit_id']; ?>,
+ ov_id: '<?php echo $ov['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+ <?php } else if ($ov['typ'] == '3') { /* Checkbox */ ?>
+ jQuery('#wpsg_ordervar_<?php echo $ov_id; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
+ submitdata: {
+ order_id: <?php echo $_REQUEST['edit_id']; ?>,
+ ov_id: '<?php echo $ov['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ data : '<?php echo json_encode(array('1' => __('Ja', 'wpsg'), '0' => __('Nein', 'wpsg'))); ?>',
+ type : 'select',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+ <?php } ?>
+
+ /* ]]> */</script>
+
+ <?php } ?>
+ </div>
+</div>
diff --git a/views/mods/mod_ordervars/ov_list.phtml b/views/mods/mod_ordervars/ov_list.phtml
new file mode 100644
index 0000000..4eaf955
--- /dev/null
+++ b/views/mods/mod_ordervars/ov_list.phtml
@@ -0,0 +1,121 @@
+<?php
+
+ /**
+ * Template für die Liste der Bestellvariablen
+ */
+
+?>
+<?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
+<table class="wpsg_ov_table">
+ <tr>
+ <th class="wpsg_id"><?php echo __('ID', 'wpsg'); ?></th>
+ <th class="wpsg_label"><?php echo __('Name', 'wpsg'); ?></th>
+ <th class="wpsg_typ"><?php echo __('Typ', 'wpsg'); ?></th>
+ <th class="wpsg_pflicht"><?php echo __('Pflicht', 'wpsg'); ?></th>
+ <th class="wpsg_delcol"></th>
+ </tr>
+ <?php $i = 0; foreach ($this->view['data'] as $ov) { $i ++; ?>
+ <tr class="wpsg_table wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="wpsg_id"><?php echo $ov['id']; ?></td>
+ <td id="wpsg_ov_name_<?php echo $ov['id']; ?>" class="wpsg_label wpsg_editable"><?php echo wpsg_hspc(__($ov['name'], 'wpsg')); ?></td>
+ <td id="wpsg_ov_typ_<?php echo $ov['id']; ?>" class="wpsg_typ wpsg_editable"><?php echo $this->mod->arTypen[$ov['typ']]; ?></td>
+ <td class="wpsg_pflicht"><input type="checkbox" <?php echo (($ov['pflicht'] == '1')?'checked="checked"':''); ?> id="wpsg_ov_pflicht_<?php echo $ov['id']; ?>" /></td>
+ <td class="wpsg_delcol">
+
+ <a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Bestellvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removeOV(<?php echo $ov['id']; ?>);"></a>
+
+ <script type="text/javascript">
+
+ jQuery('#wpsg_ov_name_<?php echo $ov['id']; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ ov_id: '<?php echo $ov['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#wpsg_ov_pflicht_<?php echo $ov['id']; ?>').bind('change', function() {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=inlinedit',
+ data: {
+ field: 'pflicht',
+ ov_id: '<?php echo $ov['id']; ?>',
+ value: ((jQuery(this).attr("checked") == "checked")?'1':'0')
+ }
+ } );
+
+ } );
+
+ jQuery('#wpsg_ov_typ_<?php echo $ov['id']; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'typ',
+ ov_id: '<?php echo $ov['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ data: '<?php echo json_encode($this->mod->arTypen); ?>',
+ type: 'select',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ callback: function(el) {
+ if (el == '<?php echo __('Auswahl', 'wpsg'); ?>')
+ {
+ jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').show();
+ }
+ else
+ {
+ jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').hide();
+ }
+ }
+ });
+
+ function wpsg_removeOV(id)
+ {
+ jQuery.ajax({
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=del',
+ data: {
+ ov_id: id
+ },
+ success: function(data){
+ if (data == 1)
+ {
+ location.reload();
+ }
+ }
+ });
+ }
+
+ </script>
+
+ </td>
+ </tr>
+ <tr class="wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>" id="wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>" style="<?php echo (($ov['typ'] != '1')?'display:none;':''); ?>">
+ <td class="wpsg_id"></td>
+ <td class="wpsg_select" colspan="4">
+ <?php echo __('Auswahl', 'wpsg'); ?>:
+ <span class="wpsg_editable" id="wpsg_ov_auswahl_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['auswahl']); ?></span>
+ <script type="text/javascript">
+
+ jQuery('#wpsg_ov_auswahl_<?php echo $ov['id']; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'auswahl',
+ ov_id: '<?php echo $ov['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ </script>
+ </td>
+ </tr>
+ <?php } ?>
+</table>
+<?php } else { ?>
+<?php echo __('Bisher noch keine Bestellvariablen angelegt.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_ordervars/settings_edit.phtml b/views/mods/mod_ordervars/settings_edit.phtml
new file mode 100644
index 0000000..6f6a82b
--- /dev/null
+++ b/views/mods/mod_ordervars/settings_edit.phtml
@@ -0,0 +1,49 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Bestellvariablen Moduls
+ */
+
+?>
+<script type="text/javascript">
+/* <![CDATA[ */
+
+ /**
+ * Wird beim anlegen einer neuen Bestellvariable aufgerufen
+ */
+ function wpsg_addOV()
+ {
+
+ jQuery('#wpsg_ov_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=add',
+ success: function(data) {
+ jQuery('#wpsg_ov_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addOV()
+
+/* ]]> */
+</script>
+<p><?php echo __('Wird eine Bestellvariable vom Type', 'wpsg') ?> <strong><?php echo __('"Auswahl"', 'wpsg') ?></strong> <?php echo __('angelegt, können die Optionen mit dem Pipe "|" Symbol getrennt angegeben werden.', 'wpsg') ?></p>
+<p><strong><?php echo __('Bsp.:', 'wpsg')?></strong> <?php echo __('Auswahl_1 | Auswahl_2 | Auswahl_3', 'wpsg') ?></p>
+<br />
+<div class="wpsg_admin_box">
+
+ <div class="head">
+ <div class="title">
+ <div class="fulltab">
+ <?php echo __('Bestellvariablen', 'wpsg'); ?>
+ <a title="<?php echo __('Neue Bestellvariable anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addOV();"></a>
+ </div>
+ </div>
+ </div>
+ <div class="content" id="wpsg_ov_list">
+ <?php echo $this->mod->ov_list(); ?>
+ </div>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_packagetracking/mail_status.phtml b/views/mods/mod_packagetracking/mail_status.phtml
new file mode 100644
index 0000000..acebfe6
--- /dev/null
+++ b/views/mods/mod_packagetracking/mail_status.phtml
@@ -0,0 +1,2 @@
+
+Paketverfolgung: <?php echo $this->view['wpsg_mod_packagetracking']['trackingURL']; ?>
diff --git a/views/mods/mod_packagetracking/mail_status_html.phtml b/views/mods/mod_packagetracking/mail_status_html.phtml
new file mode 100644
index 0000000..f303965
--- /dev/null
+++ b/views/mods/mod_packagetracking/mail_status_html.phtml
@@ -0,0 +1,3 @@
+<p>
+ <a href="<?php echo $this->view['wpsg_mod_packagetracking']['trackingURL']; ?>"><?php echo __('Paketverfolgung', 'wpsg'); ?></a>
+</p> \ No newline at end of file
diff --git a/views/mods/mod_packagetracking/order_view_switchStatus.phtml b/views/mods/mod_packagetracking/order_view_switchStatus.phtml
new file mode 100644
index 0000000..8cd79bc
--- /dev/null
+++ b/views/mods/mod_packagetracking/order_view_switchStatus.phtml
@@ -0,0 +1,53 @@
+<?php
+
+ /**
+ * Integration in das Formular für die Statusänderung einer Bestellung
+ */
+
+?>
+<div class="wpsg_form_field wpsg_mod_packagetracking">
+ <div class="wpsg_form_left">
+ <?php echo __('Paketverfolgung', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <input placeholder="<?php echo __('Tracking ID', 'wpsg'); ?>" type="text" id="wpsg_mod_packagetracking_code" value="<?php echo wpsg_hspc($this->view['wpsg_mod_packagetracking']['oOrder']->wpsg_mod_packagetracking_code); ?>" name="wpsg_mod_packagetracking_code" />
+ <select name="wpsg_mod_packagetracking_provider" id="wpsg_mod_packagetracking_provider">
+ <option value="0"><?php echo __('Keine Paketverfolgung', 'wpsg'); ?></option>
+ <?php if (wpsg_isSizedArray($this->view['wpsg_mod_packagetracking']['provider'])) { ?>
+ <?php foreach ($this->view['wpsg_mod_packagetracking']['provider'] as $p) { ?>
+ <option value="<?php echo wpsg_hspc($p['id']); ?>" <?php echo (($this->view['wpsg_mod_packagetracking']['preset'] == $p['id'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($p['name']); ?></option>
+ <?php } ?>
+ <?php } ?>
+ </select>
+ <div class="wpsg_clear"></div>
+ <?php if (wpsg_isSizedString($this->view['wpsg_mod_packagetracking']['oOrder']->wpsg_mod_packagetracking_code)) { ?>
+ <a href="<?php echo $this->callMod('wpsg_mod_packagetracking', 'getTrackingURL', array(&$_REQUEST['edit_id'])); ?>"><?php echo __('Paketverfolgung', 'wpsg'); ?></a>
+ <?php } ?>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#wpsg_order_view_status_submit').bind('click', function() {
+
+ if (new Number(jQuery('#wpsg_order_view_status').val()) == 250)
+ {
+
+ /* Wechsel auf "Ware versendet" */
+
+ if (new Number(jQuery('#wpsg_mod_packagetracking_provider').val()) > 0 && jQuery('#wpsg_mod_packagetracking_code').val().trim() == '')
+ {
+
+ alert('<?php echo __('Wenn sie auf den Status "Ware versendet" wechseln möchten und einen Anbieter für Paketverfolgung ausgewählt haben so muss auch eine Tracking ID hinterlegt werden.', 'wpsg'); ?>');
+
+ return false;
+
+ }
+
+ }
+
+ } );
+
+/* ]]> */</script>
+ \ No newline at end of file
diff --git a/views/mods/mod_packagetracking/settings_edit.phtml b/views/mods/mod_packagetracking/settings_edit.phtml
new file mode 100644
index 0000000..140de2e
--- /dev/null
+++ b/views/mods/mod_packagetracking/settings_edit.phtml
@@ -0,0 +1,70 @@
+<?php
+
+ /**
+ * Einstellungen für das Paketverfolgungsmodul
+ */
+
+?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Wird beim anlegen eines neuen Anbieters aufgerufen
+ */
+ function wpsg_mod_packagetracking_add()
+ {
+
+ jQuery('#wpsg_trackingprovider_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_packagetracking&noheader=1&do=add',
+ success: function(data) {
+ jQuery('#wpsg_trackingprovider_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_packagetracking_add()
+
+ /**
+ * Wird aufgerufen wenn ein Anbieter gelöscht werden soll
+ */
+ function wpsg_mod_packagetracking_delete(trackingprovider_id)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_trackingprovider_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_packagetracking&noheader=1&do=delete',
+ data: {
+ trackingprovider_id: trackingprovider_id
+ },
+ success: function(data) {
+ jQuery('#wpsg_trackingprovider_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_packagetracking_delete(trackingprovider_id)
+
+/* ]]> */</script>
+
+<div class="wpsg_admin_box wpsg_mod_packagetracking_settings_edit_list">
+
+ <div class="head">
+ <div class="title">
+ <div class="fulltab">
+ <?php echo __('Anbieter für Paketverfolgung', 'wpsg'); ?>
+ <a title="<?php echo __('Neuem Anbieter anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_mod_packagetracking_add();"></a>
+ </div>
+ </div>
+ </div>
+ <div class="content" id="wpsg_trackingprovider_list">
+ <?php echo $this->callMod('wpsg_mod_packagetracking', 'renderTrackingList'); ?>
+ </div>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_packagetracking/settings_edit_list.phtml b/views/mods/mod_packagetracking/settings_edit_list.phtml
new file mode 100644
index 0000000..e3b6d2f
--- /dev/null
+++ b/views/mods/mod_packagetracking/settings_edit_list.phtml
@@ -0,0 +1,87 @@
+<?php
+
+ /**
+ * Rendert die Liste der Paketverfolgungs Datensätze
+ */
+
+?>
+<?php if (wpsg_isSizedArray($this->view['wpsg_mod_packagetracking']['provider'])) { ?>
+<table class="trackingprovider_table">
+ <colgroup>
+ <col class="wpsg_label" />
+ <col class="wpsg_value" />
+ <col class="wpsg_delcol" />
+ </colgroup>
+ <?php $i = 0; foreach ($this->view['wpsg_mod_packagetracking']['provider'] as $p) { $i ++; ?>
+ <tr>
+ <td class="wpsg_label"><?php echo __('ID', 'wpsg'); ?>:</td>
+ <td class="wpsg_value"><?php echo $p['id']; ?></td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Anbieter löschen', 'wpsg'); ?>" onclick="return wpsg_mod_packagetracking_delete(<?php echo $p['id']; ?>);"></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Name', 'wpsg'); ?>:</td>
+ <td class="wpsg_value wpsg_editable" id="tp_<?php echo $p['id']; ?>_name"><?php echo wpsg_hspc(__($p['name'], 'wpsg')); ?></td>
+ <td class="wpsg_delcol">
+
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_packagetracking_name" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_packagetracking_name"></a>
+
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Url', 'wpsg'); ?>:</td>
+ <td class="wpsg_value wpsg_editable" id="tp_<?php echo $p['id']; ?>_url"><?php echo $p['url']; ?></td>
+ <td class="wpsg_delcol">
+
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_packagetracking_url" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_packagetracking_url"></a>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#tp_<?php echo $p['id']; ?>_name').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_packagetracking&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ trackingprovider_id: '<?php echo $p['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ } );
+
+ jQuery('#tp_<?php echo $p['id']; ?>_url').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_packagetracking&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'url',
+ trackingprovider_id: '<?php echo $p['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ } );
+
+ } );
+
+ /* ]]> */</script>
+
+ </td>
+ </tr>
+ <?php if ($i < sizeof($this->view['wpsg_mod_packagetracking']['provider'])) { ?>
+ <tr class="wpsg_spacer"><td colspan="3"><hr /></td></tr>
+ <?php } ?>
+ <?php } ?>
+</table>
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+/* ]]> */</script>
+<?php } else { ?>
+<p><?php echo __('Es wurden noch keine Anbieter für die Paketverfolgung angelegt.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_packagetracking/wpsg_mod_versandarten_listrow.phtml b/views/mods/mod_packagetracking/wpsg_mod_versandarten_listrow.phtml
new file mode 100644
index 0000000..24da962
--- /dev/null
+++ b/views/mods/mod_packagetracking/wpsg_mod_versandarten_listrow.phtml
@@ -0,0 +1,42 @@
+<?php
+
+ /**
+ * Erweiterung der Verwaltung der Versandarten
+ */
+
+?>
+
+<tr class="wpsg_mod_versandarten_packagetracking">
+ <td class="wpsg_label"><?php echo __('Anbieter für Paketverfolgung', 'wpsg'); ?>:</td>
+ <td class="wpsg_value">
+ <select name="wpsg_mod_packagetracking_provider" class="wpsg_mod_packagetracking_provider" id="wpsg_mod_packagetracking_providerselect_<?php echo $this->view['wpsg_mod_packagetracking']['va']['id']; ?>">
+ <option value="0"><?php echo __('Keine Vorauswahl', 'wpsg'); ?></option>
+ <?php if (wpsg_isSizedArray($this->view['wpsg_mod_packagetracking']['provider'])) { ?>
+ <?php foreach ($this->view['wpsg_mod_packagetracking']['provider'] as $p) { ?>
+ <option value="<?php echo wpsg_hspc($p['id']); ?>" <?php echo (($p['id'] == $this->view['wpsg_mod_packagetracking']['va']['wpsg_mod_packagetracking_provider'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($p['name']); ?></option>
+ <?php } ?>
+ <?php } ?>
+ </select>
+ </td>
+ <td class="wpsg_delcol">
+
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_packagetracking_versandarten" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_packagetracking_versandarten"></a>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#wpsg_mod_packagetracking_providerselect_<?php echo $this->view['wpsg_mod_packagetracking']['va']['id']; ?>').bind('change', function() {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_packagetracking&noheader=1&do=setDefaultProvider',
+ data: {
+ 'va_id': <?php echo $this->view['wpsg_mod_packagetracking']['va']['id']; ?>,
+ 'trackingprovider_id': jQuery(this).val()
+ }
+ } );
+
+ } );
+
+ /* ]]> */</script>
+
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_pap/settings_edit.phtml b/views/mods/mod_pap/settings_edit.phtml
new file mode 100644
index 0000000..64fdb30
--- /dev/null
+++ b/views/mods/mod_pap/settings_edit.phtml
@@ -0,0 +1,14 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des PAP Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_paplogin_pap_url', __('URL zur Initial Page (index.html) der PAP Installation', 'wpsg'), $this->get_option('wpsg_paplogin_pap_url'), array('help' => 'wpsg_paplogin_pap_url')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_paplogin_admin', __('PAP Admin Username', 'wpsg'), $this->get_option('wpsg_paplogin_admin'), array('help' => 'wpsg_paplogin_admin')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_paplogin_passwort', __('PAP Admin Passwd', 'wpsg'), $this->get_option('wpsg_paplogin_passwort'), array('help' => 'wpsg_paplogin_passwort')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_paplogin_register', __('PAP Account für jeden Neukunden (Bestellung) anlegen', 'wpsg'), $this->get_option('wpsg_paplogin_register'), array('help' => 'wpsg_paplogin_register')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_pap_registrierung', __('PAP Account für jeden Neukunden (Registrierung) anlegen', 'wpsg'), $this->get_option('wpsg_pap_registrierung'), array('help' => 'wpsg_pap_registrierung')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_pap_include_profil', __('PAP im Profil integrieren', 'wpsg'), array('-1' => __('Nicht integrieren', 'wpsg'), '1' => __('IFrame Lösung', 'wpsg'), '2' => __('Verlinkung', 'wpsg')), $this->get_option('wpsg_pap_include_profil'), array('help' => 'wpsg_pap_include_profil')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_pap_order_tracking', __('Tracking Code nach Bestellung einbinden', 'wpsg'), $this->get_option('wpsg_pap_order_tracking')); ?>
diff --git a/views/mods/mod_paypal/order_done.phtml b/views/mods/mod_paypal/order_done.phtml
new file mode 100644
index 0000000..6a226b5
--- /dev/null
+++ b/views/mods/mod_paypal/order_done.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Dieses Template wird nach einer PayPal Zahlung angezeigt
+ */
+
+?>
+
+<p><?php echo __('Um den Betrag mit PayPal zu bezahlen klicken Sie bitte auf folgendes Logo.', 'wpsg'); ?></p>
+<p>
+ <a title="<?php echo __('Mit PayPal bezahlen', 'wpsg'); ?>" href="<?php echo $this->view['paypalLink']; ?>">
+ <img src="<?php echo $this->getRessourceURL('gfx/pp-logo-big.png'); ?>" align="left" alt="<?php echo __('Mit PayPal bezahlen', 'wpsg'); ?>" style="margin-right:7px;">
+ </a>
+</p>
+<?php if ($this->get_option('wpsg_mod_paypal_autostart') == '1') { ?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+ window.setTimeout(function() {
+ location.href = "<?php echo $this->view['paypalLink']; ?>";
+ }, 1000);
+ } );
+
+/* ]]> */</script>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_paypal/order_view_afterpayment.phtml b/views/mods/mod_paypal/order_view_afterpayment.phtml
new file mode 100644
index 0000000..147de14
--- /dev/null
+++ b/views/mods/mod_paypal/order_view_afterpayment.phtml
@@ -0,0 +1,27 @@
+<?php
+
+ /**
+ * Template für die Integration der PayPal Zahlungsart in die Bestellverwaltung
+ */
+
+?>
+
+<?php if (wpsg_isSizedString($this->view['oOrder']->getMeta('wpsg_mod_paypal_paymentid'))) { ?>
+
+ <div class="wpsg_form_field ">
+ <div class="wpsg_form_left">
+ <label for=""><?php echo __('PaymentID', 'wpsg'); ?>: [<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_paypal&do=refresh&edit_id=<?php echo $this->view['oOrder']->id; ?>"><?php echo __('Status Aktualisieren', 'wpsg'); ?></a>]</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p class="" id=""><?php echo wpsg_translate(__('#1# (#2#)', 'wpsg'), $this->view['oOrder']->getMeta('wpsg_mod_paypal_paymentid'), $this->view['oOrder']->getMeta('wpsg_mod_paypal_paymentstate')); ?></p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+<?php } ?>
+
+<?php if (wpsg_isSizedString($this->view['oOrder']->getMeta('wpsg_mod_paypal_saleid'))) { ?>
+
+ <?php echo wpsg_drawForm_Input('', __('SaleID', 'wpsg'), $this->view['oOrder']->getMeta('wpsg_mod_paypal_saleid'), array('text' => true)); ?>
+
+<?php } ?>
diff --git a/views/mods/mod_paypal/settings_edit.phtml b/views/mods/mod_paypal/settings_edit.phtml
new file mode 100644
index 0000000..681959e
--- /dev/null
+++ b/views/mods/mod_paypal/settings_edit.phtml
@@ -0,0 +1,95 @@
+<?php
+
+ /**
+ * Templatedatei für die Einstellungen des PayPal Moduls
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_paypal_bezeichnung'), array('help' => 'wpsg_shippay_name')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_paypal_aktiv'), array('help' => 'wpsg_shippay_activ')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_paypal_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_paypal_hint'), array('help' => 'wpsg_shippay_hint')); ?>
+<br />
+<?php echo wpsg_drawForm_Select('wpsg_mod_paypal_mode', __('Integrationsmodus', 'wpsg'), array('0' => __('Classic API', 'wpsg'), '1' => __('REST API', 'wpsg')), $this->get_option('wpsg_mod_paypal_mode'), array('help' => 'wpsg_mod_paypal_mode')); ?>
+
+<div class="wpsg_mod_paypal_mode_layer wpsg_mod_paypal_mode_0">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypal_email', __('E-Mail (PayPal Konto)', 'wpsg'), $this->get_option('wpsg_mod_paypal_email'), array('help' => 'wpsg_mod_paypal_email')); ?>
+
+ <div class="wpsg_hinweis">
+ <?php echo __('Zur Anbindung an den PayPal Service wird <a href="https://www.paypalobjects.com/de_DE/html/IntegrationCenter/ic_pps_home.html">PayPal Starter</a> genutzt. Fortführende Details finden Sie im <a href="https://www.paypalobjects.com/de_DE/pdf/PayPal-Starter-Integrationshandbuch.pdf">Paypal Starter Integrationshandbuch.</a>', 'wpsg'); ?>
+ <?php echo __('Im Integrationshandbuch erfahren Sie auch, wie Sie die Sandbox nutzen, um den Zahlungsverkehr zu testen.', 'wpsg'); ?>
+ </div>
+
+</div>
+
+<div class="wpsg_mod_paypal_mode_layer wpsg_mod_paypal_mode_1">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypal_clientid', __('Client ID', 'wpsg'), $this->get_option('wpsg_mod_paypal_clientid'), array('hint' => wpsg_translate('nohspc_'.__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'), 'help' => 'wpsg_mod_paypal_clientid')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypal_secret', __('Secret', 'wpsg'), $this->get_option('wpsg_mod_paypal_secret'), array('hint' => wpsg_translate('nohspc_'.__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'), 'help' => 'wpsg_mod_paypal_secret')); ?>
+
+ <div class="wpsg_form_field ">
+ <div class="wpsg_form_left">
+ <label for=""><?php echo __('Stornierung bei Statuswechsel', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <a href="#" class="wpsg_mod_paypal_stornostate"><?php echo __('Bearbeiten', 'wpsg'); ?></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <div class="wpsg_mod_paypal_stornostate_layer" style="display:none;">
+
+ <?php foreach ($this->arStatus as $status_id => $status_label) { $arStornoStatus = (array)$this->get_option('wpsg_mod_paypal_stornostate'); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_stornostate['.$status_id.']', __($status_label, 'wpsg'), $arStornoStatus[$status_id], array('labelright' => true)); ?>
+ <?php } ?>
+
+ <br />
+
+ </div>
+
+ <?php echo wpsg_drawForm_Input('', __('WebHook URL', 'wpsg'), $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypal', 'webHook', array(), true), array('readonly' => true, 'help' => 'wpsg_mod_paypal_webhook_url')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_createwebhook', __('Beim speichern versuchen den WebHook anzumelden.', 'wpsg'), 0, array('labelright' => true, 'noDoubleDot' => true, 'help' => 'wpsg_mod_paypal_createwebhook')); ?>
+
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_paypal_mode').bind('change', function() {
+
+ jQuery('.wpsg_mod_paypal_mode_layer').hide();
+ jQuery('.wpsg_mod_paypal_mode_' + jQuery(this).val()).show();
+
+ } ).change();
+
+ jQuery('.wpsg_mod_paypal_stornostate').bind('click', function() {
+
+ jQuery('.wpsg_mod_paypal_stornostate_layer').toggle();
+
+ if (jQuery('.wpsg_mod_paypal_stornostate_layer').is(':visible')) jQuery(this).html('<?php echo __('Ausblenden', 'wpsg'); ?>');
+ else jQuery(this).html('<?php echo __('Bearbeiten', 'wpsg'); ?>');
+
+ return false;
+
+ } );
+
+ } );
+
+/* ]]> */</script>
+
+<br />
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_paypal_sandbox'), array('help' => 'wpsg_mod_paypal_sandbox')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_subject', __('Betreff der Überweisung', 'wpsg'), $this->get_option('wpsg_mod_paypal_subject'), array('help' => 'wpsg_mod_paypal_subject')); ?>
+
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_paypal_gebuehr'), true), array('help' => 'wpsg_shippay_gebuehr', 'unit' => $this->get_option('wpsg_currency').' / %')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_paypal_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_paypal_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_paypal_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
+
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_currency', __('Währungscode (Standard: EUR)', 'wpsg'), $this->get_option('wpsg_mod_paypal_currency')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_paypal_language', __('Sprache im PayPal Interface', 'wpsg'), array('DE' => __('Deutsch', 'wpsg'), 'US' => __('Englisch', 'wpsg'), 'FR' => __('Französisch', 'wpsg')), $this->get_option('wpsg_mod_paypal_language')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_paypal_autostart'), array('help' => 'wpsg_shippay_paystart')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_paypal_success', __('Erfolgsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_paypal_success'), array('help' => 'wpsg_page_mod_paypal_success')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_paypal_error', __('Fehlerseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_paypal_error'), array('help' => 'wpsg_page_mod_paypal_error')); ?>
diff --git a/views/mods/mod_paypalapi/basket_inner_prebutton.phtml b/views/mods/mod_paypalapi/basket_inner_prebutton.phtml
new file mode 100644
index 0000000..223eaa3
--- /dev/null
+++ b/views/mods/mod_paypalapi/basket_inner_prebutton.phtml
@@ -0,0 +1,16 @@
+<?php
+
+ /**
+ * Template für die Integration in den Warenkorb der PayPal API
+ */
+
+?>
+
+<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_paypalapi_paypalexpress'))) { ?>
+<div class="wpsg_mod_paypalapi_button_wrap">
+ <button type="submit" name="wpsg_mod_submit" value="wpsg_mod_paypalapi" class="wpsg_mod_paypalapi_button">
+ <img src="<?php echo $this->getRessourceURL('mods/mod_paypalapi/gfx/checkout-logo-small-de.png'); ?>" alt="<?php echo __('Direkt zu PayPal', 'wpsg'); ?>" />
+ </button>
+ <div class="wpsg_clear"></div>
+</div>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_paypalapi/checkout_handlePayment.phtml b/views/mods/mod_paypalapi/checkout_handlePayment.phtml
new file mode 100644
index 0000000..adb02e3
--- /dev/null
+++ b/views/mods/mod_paypalapi/checkout_handlePayment.phtml
@@ -0,0 +1,92 @@
+<?php
+
+ /**
+ * Template um die Zahlungsarten mittels PayPal PLUS im Checkout zu integrieren
+ */
+
+?>
+
+<?php if ($this->view['wpsg_mod_paypalapi']['show'] == 1) { ?>
+
+ <div class="wpsg_payment">
+ <h2><?php echo __('Zahlungsarten', 'wpsg'); ?></h2>
+ <div class="wpsg_payment_textwrap">
+ <p><?php echo __('Ihr PayPal Konto wird nach Bestellabschluß belastet.', 'wpsg'); ?></p>
+ </div>
+ </div>
+
+<?php } else if ($this->view['wpsg_mod_paypalapi']['show'] == 2) { ?>
+
+ <div class="wpsg_payment">
+ <h2><?php echo __('Zahlung erneut authorisieren', 'wpsg'); ?></h2>
+ <div class="wpsg_payment_textwrap">
+
+ <p><?php echo __('Der Betrag der Bestellung hat sich verändert. Sie müssen die Zahlung mit PayPal erneut authorisieren.', 'wpsg'); ?></p>
+ <p><?php echo __('Dies können Sie über folgenden Button erledigen oder nach Bestellabschluß. Alternativ können Sie unten auch eine andere Zahlungsart wählen.', 'wpsg'); ?>
+
+ <div class="wrap_paypalapi_expressbutton">
+ <a href="<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'startPayPalExpress'); ?>" title="<?php echo __('Direkt mit PayPal bezahlen', 'wpsg'); ?>"><img src="<?php echo $this->getRessourceURL('mods/mod_paypalapi/gfx/checkout-logo-small-de.png'); ?>" alt="<?php echo __('Direkt zu PayPal', 'wpsg'); ?>" /></a>
+ </div>
+ </div>
+ </div>
+
+<?php } else { ?>
+
+ <script src="https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js" type="text/javascript"></script>
+
+ <div class="wpsg_payment">
+
+ <h2><?php echo __('Zahlungsarten', 'wpsg'); ?></h2>
+
+ <div id="wpsg_ppplus"></div>
+
+ <?php if (wpsg_isSizedString($this->view['wpsg_mod_paypalapi']['error'])) { ?>
+ <div id="wpsg_error" class="published error">
+ <p><?php echo $this->view['wpsg_mod_paypalapi']['error']; ?>
+ </div>
+ <?php } ?>
+
+ </div>
+
+ <script type="application/javascript">/* <![CDATA[ */
+
+ var wpsg_mod_paypalapi_shipping_id = '<?php echo wpsg_getStr($this->view['basket']['checkout']['shipping']); ?>';
+
+ jQuery(document).ready(function() {
+
+ jQuery('input[name="wpsg_checkout2"], input[name="wpsg_checkout"]').hide();
+
+ jQuery('.wpsg_shipping input[type="radio"]').bind('change', function() {
+
+ if (jQuery(this).val() != wpsg_mod_paypalapi_shipping_id)
+ {
+
+ jQuery('input[name="wpsg_checkout2"]').hide()
+ jQuery('#wpsg_checkout_form').attr("action", "<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'ShippingSelect'); ?>").submit();
+
+ }
+
+ } );
+
+ } );
+
+ /**
+ * Wird vom PayPal PLUS IFrame aufgerufen wenn fertig geladen
+ */
+ function wpsg_mod_paypalapi_load()
+ {
+
+ jQuery('input[name="wpsg_checkout2"], input[name="wpsg_checkout"]').show().bind('click', function() {
+
+ var test = ppp.doContinue();
+ return false;
+
+ } );
+
+ }
+
+ <?php echo $this->render(WPSG_PATH_VIEW.'/mods/mod_paypalapi/paypalplus.phtml')?>
+
+ /* ]]> */</script>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_paypalapi/gfx/checkout-logo-large-alt-de-2x.png b/views/mods/mod_paypalapi/gfx/checkout-logo-large-alt-de-2x.png
new file mode 100644
index 0000000..01103c7
--- /dev/null
+++ b/views/mods/mod_paypalapi/gfx/checkout-logo-large-alt-de-2x.png
Binary files differ
diff --git a/views/mods/mod_paypalapi/gfx/checkout-logo-large-alt-de.png b/views/mods/mod_paypalapi/gfx/checkout-logo-large-alt-de.png
new file mode 100644
index 0000000..dfa010c
--- /dev/null
+++ b/views/mods/mod_paypalapi/gfx/checkout-logo-large-alt-de.png
Binary files differ
diff --git a/views/mods/mod_paypalapi/gfx/checkout-logo-large-de-2x.png b/views/mods/mod_paypalapi/gfx/checkout-logo-large-de-2x.png
new file mode 100644
index 0000000..90e2c55
--- /dev/null
+++ b/views/mods/mod_paypalapi/gfx/checkout-logo-large-de-2x.png
Binary files differ
diff --git a/views/mods/mod_paypalapi/gfx/checkout-logo-large-de.png b/views/mods/mod_paypalapi/gfx/checkout-logo-large-de.png
new file mode 100644
index 0000000..30e09d2
--- /dev/null
+++ b/views/mods/mod_paypalapi/gfx/checkout-logo-large-de.png
Binary files differ
diff --git a/views/mods/mod_paypalapi/gfx/checkout-logo-medium-alt-de-2x.png b/views/mods/mod_paypalapi/gfx/checkout-logo-medium-alt-de-2x.png
new file mode 100644
index 0000000..cea1d84
--- /dev/null
+++ b/views/mods/mod_paypalapi/gfx/checkout-logo-medium-alt-de-2x.png
Binary files differ
diff --git a/views/mods/mod_paypalapi/gfx/checkout-logo-medium-alt-de.png b/views/mods/mod_paypalapi/gfx/checkout-logo-medium-alt-de.png
new file mode 100644
index 0000000..7cba88c
--- /dev/null
+++ b/views/mods/mod_paypalapi/gfx/checkout-logo-medium-alt-de.png
Binary files differ
diff --git a/views/mods/mod_paypalapi/gfx/checkout-logo-medium-de-2x.png b/views/mods/mod_paypalapi/gfx/checkout-logo-medium-de-2x.png
new file mode 100644
index 0000000..236189c
--- /dev/null
+++ b/views/mods/mod_paypalapi/gfx/checkout-logo-medium-de-2x.png
Binary files differ
diff --git a/views/mods/mod_paypalapi/gfx/checkout-logo-medium-de.png b/views/mods/mod_paypalapi/gfx/checkout-logo-medium-de.png
new file mode 100644
index 0000000..17ff618
--- /dev/null
+++ b/views/mods/mod_paypalapi/gfx/checkout-logo-medium-de.png
Binary files differ
diff --git a/views/mods/mod_paypalapi/gfx/checkout-logo-small-alt-de-2x.png b/views/mods/mod_paypalapi/gfx/checkout-logo-small-alt-de-2x.png
new file mode 100644
index 0000000..c254d76
--- /dev/null
+++ b/views/mods/mod_paypalapi/gfx/checkout-logo-small-alt-de-2x.png
Binary files differ
diff --git a/views/mods/mod_paypalapi/gfx/checkout-logo-small-alt-de.png b/views/mods/mod_paypalapi/gfx/checkout-logo-small-alt-de.png
new file mode 100644
index 0000000..21119a7
--- /dev/null
+++ b/views/mods/mod_paypalapi/gfx/checkout-logo-small-alt-de.png
Binary files differ
diff --git a/views/mods/mod_paypalapi/gfx/checkout-logo-small-de-2x.png b/views/mods/mod_paypalapi/gfx/checkout-logo-small-de-2x.png
new file mode 100644
index 0000000..bf4bc4c
--- /dev/null
+++ b/views/mods/mod_paypalapi/gfx/checkout-logo-small-de-2x.png
Binary files differ
diff --git a/views/mods/mod_paypalapi/gfx/checkout-logo-small-de.png b/views/mods/mod_paypalapi/gfx/checkout-logo-small-de.png
new file mode 100644
index 0000000..66efb82
--- /dev/null
+++ b/views/mods/mod_paypalapi/gfx/checkout-logo-small-de.png
Binary files differ
diff --git a/views/mods/mod_paypalapi/order_done.phtml b/views/mods/mod_paypalapi/order_done.phtml
new file mode 100644
index 0000000..871da98
--- /dev/null
+++ b/views/mods/mod_paypalapi/order_done.phtml
@@ -0,0 +1,31 @@
+<?php
+
+ /**
+ * Dieses Template wird nach einer Bestellung vo der Weiterleitung zur PayPal Zahlung angezeigt
+ */
+
+?>
+
+<?php if (wpsg_isSizedString($this->view['wpsg_mod_paypalapi']['done'], '2')) { ?>
+
+ <p><?php echo __('Zahlung wurde erfolgreich durchgeführt.', 'wpsg'); ?></p>
+
+<?php } else if (wpsg_isSizedString($this->view['wpsg_mod_paypalapi']['done'], '1')) { ?>
+
+ <p><?php echo __('Zahlung wurde bereits ausgeführt.', 'wpsg'); ?></p>
+
+<?php } else { ?>
+
+ <?php echo __('Zahlung mittels der folgenden Zahlungsoption abschließen','wpsg'); ?>
+
+ <script src="https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js" type="text/javascript"></script>
+ <div id="wpsg_ppplus"></div>
+
+ <script type="application/javascript">/* <![CDATA[ */
+
+ <?php $this->view['wpsg_order_done'] = true; ?>
+ <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_paypalapi/paypalplus.phtml'); ?>
+
+ /* ]]> */</script>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_paypalapi/order_view_afterpayment.phtml b/views/mods/mod_paypalapi/order_view_afterpayment.phtml
new file mode 100644
index 0000000..fdd522a
--- /dev/null
+++ b/views/mods/mod_paypalapi/order_view_afterpayment.phtml
@@ -0,0 +1,40 @@
+<?php
+
+ /**
+ * Template für die Integration der PayPal Zahlungsart in die Bestellverwaltung
+ */
+
+?>
+
+<?php if (wpsg_isSizedString($this->view['oOrder']->getMeta('wpsg_mod_paypalapi_paymentid'))) { ?>
+
+ <div class="wpsg_form_field ">
+ <div class="wpsg_form_left">
+ <label for=""><?php echo __('PaymentID', 'wpsg'); ?>: [<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_paypalapi&do=refresh&edit_id=<?php echo $this->view['oOrder']->id; ?>"><?php echo __('Status Aktualisieren', 'wpsg'); ?></a>]</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p class="" id=""><?php echo wpsg_translate(__('#1# (#2#)', 'wpsg'), $this->view['oOrder']->getMeta('wpsg_mod_paypalapi_paymentid'), $this->view['oOrder']->getMeta('wpsg_mod_paypalapi_paymentstate')); ?></p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+<?php } ?>
+
+<?php if (wpsg_isSizedString($this->view['oOrder']->getMeta('wpsg_mod_paypalapi_saleid'))) { ?>
+
+ <div class="wpsg_form_field ">
+ <div class="wpsg_form_left">
+ <label for=""><?php echo __('SaleID', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p class="" id=""><?php echo wpsg_translate(__('#1# (#2#)', 'wpsg'), $this->view['oOrder']->getMeta('wpsg_mod_paypalapi_saleid'), $this->view['oOrder']->getMeta('wpsg_mod_paypalapi_salestate')); ?></p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <?php if ($this->view['oOrder']->getMeta('wpsg_mod_paypalapi_salestate') != 'refunded') { ?>
+ <br />
+ <a onclick="return confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>');" class="button" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_paypalapi&do=refund&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Zahlung rückerstatten (Refund Call)', 'wpsg'); ?></a>
+ <?php } ?>
+
+<?php } ?>
diff --git a/views/mods/mod_paypalapi/paypalplus.phtml b/views/mods/mod_paypalapi/paypalplus.phtml
new file mode 100644
index 0000000..2cecd3b
--- /dev/null
+++ b/views/mods/mod_paypalapi/paypalplus.phtml
@@ -0,0 +1,29 @@
+<?php
+
+ /**
+ * JS Teil für den PayPal PLUS Teil
+ */
+
+ // https://www.paypalobjects.com/webstatic/de_DE/downloads/PayPal-PLUS-IntegrationGuide.pdf
+
+?>
+
+ var ppp = PAYPAL.apps.PPP({
+ "approvalUrl": "<?php echo $this->view['wpsg_mod_paypalapi']['approval_url']; ?>",
+ "language": "de_DE",
+ "preselection": "<?php echo (($_SESSION['wpsg']['checkout']['payment'] == '10')?'paypal':'none')?>",
+ "country": "DE",
+ <?php if ($this->view['wpsg_order_done'] !== true) { ?>
+ "onLoad": function() { if (typeof wpsg_mod_paypalapi_load == 'function') wpsg_mod_paypalapi_load(); },
+ "buttonLocation": "outside",
+ "disableContinue": "wpsg_checkout2button",
+ "enableContinue": "wpsg_checkout2button",
+ <?php if (wpsg_isSizedArray($this->view['wpsg_mod_paypalapi']['ThirdPartyPayment'])) { ?>
+ "thirdPartyPaymentMethods": <?php echo json_encode($this->view['wpsg_mod_paypalapi']['ThirdPartyPayment']); ?>,
+ <?php } ?>
+ <?php } ?>
+ "placeholder": "wpsg_ppplus",
+ "mode": "<?php echo $this->view['wpsg_mod_paypalapi']['mode']; ?>",
+ } );
+
+ \ No newline at end of file
diff --git a/views/mods/mod_paypalapi/settings_edit.phtml b/views/mods/mod_paypalapi/settings_edit.phtml
new file mode 100644
index 0000000..7efb3d2
--- /dev/null
+++ b/views/mods/mod_paypalapi/settings_edit.phtml
@@ -0,0 +1,129 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des PayPal API Moduls
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_clientid', __('Client ID', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_clientid'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_clientid', 'hint' => wpsg_translate('nohspc_'.__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'))); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_secret', __('Secret', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_secret'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_secret', 'hint' => wpsg_translate('nohspc_'.__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'))); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_sandbox', __('Sandbox', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_sandbox'), array('help' => 'wpsg_mod_paypal_sandbox')); ?>
+
+<div class="wpsg_mod_sandbox_layer" style="display:none;">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_sandbox_clientid', __('Client ID (Sandbox)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_sandbox_clientid'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_clientid')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_sandbox_secret', __('Secret (Sandbox)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_sandbox_secret'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_secret')); ?>
+
+ <br />
+
+</div>
+
+<br />
+
+<?php echo wpsg_drawForm_Input('', __('WebHook URL', 'wpsg'), $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'webHook', array(), true), array('readonly' => true, 'help' => 'wpsg_mod_paypal_webhook_url')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_create', __('Beim speichern versuchen den WebHook anzumelden.', 'wpsg'), 0, array('labelright' => true, 'noDoubleDot' => true, 'help' => 'wpsg_mod_paypal_createwebhook')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_webhook_log', __('WebHook Anfragen protokollieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_webhook_log'), array('labelright' => true)); ?>
+<div class="layer_wpsg_mod_paypalapi_webhook_log layer_wpsg_mod_paypalapi_webhook_log_1">
+ <?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_webhook_logfile', '', $this->get_option('wpsg_mod_paypalapi_webhook_logfile'), array('hint' => __('Absoluter Pfad zur Protokolldatei, Schreibrechte beachten.', 'wpsg'))); ?>
+</div>
+
+<br />
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_paypalapi_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_paypalapi_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_paypalapi_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
+
+<br />
+
+<div class="wpsg_form_field ">
+ <div class="wpsg_form_left">
+ <label for=""><?php echo __('Stornierung bei Statuswechsel', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <a href="#" class="wpsg_mod_paypalapi_stornostate"><?php echo __('Bearbeiten', 'wpsg'); ?></a>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+<div class="wpsg_mod_paypalapi_stornostate_layer" style="display:none;">
+
+ <?php foreach ($this->arStatus as $status_id => $status_label) { $arStornoStatus = (array)$this->get_option('wpsg_mod_paypalapi_stornostate'); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_stornostate['.$status_id.']', __($status_label, 'wpsg'), $arStornoStatus[$status_id], array('labelright' => true)); ?>
+ <?php } ?>
+
+ <br />
+
+</div>
+
+<br />
+
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_paypalapi_success', __('Erfolgsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_paypalapi_success'), array('help' => 'wpsg_page_mod_paypal_success')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_paypalapi_error', __('Fehlerseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_paypalapi_error'), array('help' => 'wpsg_page_mod_paypal_error')); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_aktiv', __('PayPal für neue Bestellungen erlauben', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_aktiv'), array('help' => 'wpsg_shippay_activ')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress', __('PayPal Express aktivieren (Button im Warenkorb)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress'), array('help' => 'wpsg_mod_paypalapi_paypalexpress')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_plus_aktiv', __('PayPal Plus aktivieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_aktiv'), array('help' => 'wpsg_mod_paypalapi_plus_aktiv')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress_details', __('Warenkorbdetails übertragen', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_details'), array('help' => 'wpsg_mod_paypalapi_paypalexpress_details')); ?>
+
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_experience_label', __('Bezeichnung im PayPal Zahlungsinterface', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_experience_label'), array('help' => 'wpsg_mod_paypalapi_experience_label', 'hint' => __('Max. 127 Zeichen', 'wpsg'))); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_experience_logo', __('URL für ein Logo im PayPal Zahlungsinterface', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_experience_logo'), array('help' => 'wpsg_mod_paypalapi_experience_logo', 'hint' => __('gif|png|jpg, Max. 190x60', 'wpsg'))); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_paypalapi_experience_locale_code', __('Sprache im PayPal Zahlungsinterface', 'wpsg'), array(
+ 'DE' => __('Deutsch', 'wpsg'),
+ 'GB' => __('Englisch', 'wpsg'),
+ 'FR' => __('Französisch', 'wpsg')
+), $this->get_option('wpsg_mod_paypalapi_experience_locale_code'), array('help' => 'wpsg_mod_paypalapi_experience_locale_code')); ?>
+<br />
+
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_paypalexpress_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_name'), array('help' => 'wpsg_shippay_name')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_paypalexpress_subject', __('Betreff für Zahlung', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_subject'), array('help' => 'wpsg_mod_paypal_subject')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_paypalapi_plus_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_hint'), array('help' => 'wpsg_shippay_hint')); ?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_paypalapi_webhook_log').bind('change', function() {
+
+ jQuery('.layer_wpsg_mod_paypalapi_webhook_log').hide();
+
+ if (jQuery(this).is(':checked'))
+ {
+
+ jQuery('.layer_wpsg_mod_paypalapi_webhook_log_1').show();
+
+ }
+
+ } ).change();
+
+ jQuery('#wpsg_mod_paypalapi_sandbox').bind('change', function() {
+
+ if (jQuery(this).is(':checked')) jQuery('.wpsg_mod_sandbox_layer').show();
+ else jQuery('.wpsg_mod_sandbox_layer').hide();
+
+ } ).change();
+
+ jQuery('#wpsg_mod_paypalapi_plus_aktiv').bind('change', function() {
+
+ if (jQuery(this).is(':checked')) jQuery('.wpsg_mod_paypalapi_plus_aktiv').show();
+ else jQuery('.wpsg_mod_paypalapi_plus_aktiv').hide();
+
+ } ).change();
+
+ jQuery('.wpsg_mod_paypalapi_stornostate').bind('click', function() {
+
+ jQuery('.wpsg_mod_paypalapi_stornostate_layer').toggle();
+
+ if (jQuery('.wpsg_mod_paypalapi_stornostate_layer').is(':visible')) jQuery(this).html('<?php echo __('Ausblenden', 'wpsg'); ?>');
+ else jQuery(this).html('<?php echo __('Bearbeiten', 'wpsg'); ?>');
+
+ return false;
+
+ } );
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_prepayment/mail.phtml b/views/mods/mod_prepayment/mail.phtml
new file mode 100644
index 0000000..9bc4fab
--- /dev/null
+++ b/views/mods/mod_prepayment/mail.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Dieses Template dient zur Integration der Admin Kontodaten in eine Bestellung
+ */
+
+?>
+
+<?php echo wpsg_translate(__('Bitte überweisen Sie den Rechnungsbetrag in Höhe von #1# auf folgendes Konto und geben Sie als Betreff "#2#" an.', 'wpsg'), wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), $this->view['mod_prepayment']['subject']); ?>
+
+<?php echo wpsg_pad_right(__('Kontoinhaber', 'wpsg').':', 35); ?><?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?>
+<?php echo wpsg_pad_right(__('IBAN', 'wpsg').':', 35); ?><?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?>
+<?php echo wpsg_pad_right(__('Bank', 'wpsg').':', 35); ?><?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_bank')); ?>
+<?php echo wpsg_pad_right(__('BIC-/SWIFT-Code', 'wpsg').':', 35); ?><?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_swift')); ?>
+ \ No newline at end of file
diff --git a/views/mods/mod_prepayment/mail_html.phtml b/views/mods/mod_prepayment/mail_html.phtml
new file mode 100644
index 0000000..f56af6f
--- /dev/null
+++ b/views/mods/mod_prepayment/mail_html.phtml
@@ -0,0 +1,29 @@
+<?php
+
+ /**
+ * Dieses Template dient zur Integration der Admin Kontodaten in eine Bestellung (HTML)
+ */
+
+?>
+<p>
+ <?php echo wpsg_translate(__('Bitte überweisen Sie den Rechnungsbetrag in Höhe von #1# auf folgendes Konto und geben Sie als Betreff <strong>#2#</strong> an.', 'wpsg'), wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), $this->view['mod_prepayment']['subject']); ?>
+</p>
+
+<table style="width:100%;">
+ <tr>
+ <td><?php echo __('Kontoinhaber', 'wpsg'); ?>:</td>
+ <td style="text-align:right;"><?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?></td>
+ </tr>
+ <tr>
+ <td><?php echo __('IBAN', 'wpsg'); ?>:</td>
+ <td style="text-align:right;"><?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?></td>
+ </tr>
+ <tr>
+ <td><?php echo __('Bank', 'wpsg'); ?>:</td>
+ <td style="text-align:right;"><?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_bank')); ?></td>
+ </tr>
+ <tr>
+ <td><?php echo __('BIC-/SWIFT-Code', 'wpsg'); ?></td>
+ <td style="text-align:right;"><?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_swift')); ?></td>
+ </tr>
+ </table> \ No newline at end of file
diff --git a/views/mods/mod_prepayment/order_done.phtml b/views/mods/mod_prepayment/order_done.phtml
new file mode 100644
index 0000000..6d3de2b
--- /dev/null
+++ b/views/mods/mod_prepayment/order_done.phtml
@@ -0,0 +1,17 @@
+<?php
+
+ /**
+ * Template welches bei der Zahlungsart "Vorkasse" nach Abschluß einer Bestellung angezeigt wird
+ */
+
+ //wpsg_debug($this->view['wpsg_mod_prepayment']['subject']);
+
+?>
+<?php echo wpsg_translate(__('Sie haben die Zahlungsart "Vorkasse" gewählt. Überweisen Sie daher den Rechnungsbetrag von #1# auf folgendes Konto:', 'wpsg'), wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency'))); ?>
+<br /><br />
+<?php echo wpsg_translate(__('Kontoinhaber: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber'))); ?><br />
+<?php echo wpsg_translate(__('IBAN: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban'))); ?><br />
+<?php echo wpsg_translate(__('Bank: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_bank'))); ?><br />
+<?php echo wpsg_translate(__('BIC-/SWIFT-Code: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_swift'))); ?>
+<br /><br />
+<?php echo wpsg_translate(__('Bitte als Betreff angeben: "#1#"', 'wpsg'), $this->view['wpsg_mod_prepayment']['subject']); ?> \ No newline at end of file
diff --git a/views/mods/mod_prepayment/settings_edit.phtml b/views/mods/mod_prepayment/settings_edit.phtml
new file mode 100644
index 0000000..3cd1cea
--- /dev/null
+++ b/views/mods/mod_prepayment/settings_edit.phtml
@@ -0,0 +1,41 @@
+<?php
+
+ /**
+ * Templatedatei für die Einstellungen des Vorkasse Moduls
+ */
+
+?>
+
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __("Bezeichnung", "wpsg"); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <input type="text" name="wpsg_mod_prepayment_bezeichnung" value="<?php echo $this->get_option('wpsg_mod_prepayment_bezeichnung'); ?>" />
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_prepayment_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_prepayment_aktiv'), array('help' => 'wpsg_mod_prepayment_aktiv')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_prepayment_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_prepayment_hint'), array('help' => 'wpsg_mod_prepayment_hint')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_prepayment_subject', __('Betreff für Überweisungen', 'wpsg'), $this->get_option('wpsg_mod_prepayment_subject'), array('help' => 'mod_prepayment_subject')); ?>
+
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_prepayment_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_prepayment_gebuehr'), true), array('help' => 'wpsg_mod_prepayment_gebuehr','unit' => $this->get_option('wpsg_currency').' / %')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_prepayment_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_prepayment_mwst'), array('help' => 'wpsg_mod_prepayment_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_prepayment_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_prepayment_mwstland'), array('help' => 'wpsg_mod_prepayment_mwstland')); ?>
+
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_prepayment_kinhaber', __('Kontoinhaber', 'wpsg'), $this->get_option('wpsg_mod_prepayment_kinhaber'), array('help' => 'wpsg_mod_prepayment_kinhaber')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_prepayment_bank', __('Bank', 'wpsg'), $this->get_option('wpsg_mod_prepayment_bank'), array('help' => 'wpsg_mod_prepayment_bank')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_prepayment_iban', __('IBAN', 'wpsg'), $this->get_option('wpsg_mod_prepayment_iban'), array('help' => 'wpsg_mod_prepayment_iban')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_prepayment_swift', __('BIC-/SWIFT Code', 'wpsg'), $this->get_option('wpsg_mod_prepayment_swift'), array('help' => 'wpsg_mod_prepayment_swift')); ?>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_productfilter/settings_edit.phtml b/views/mods/mod_productfilter/settings_edit.phtml
new file mode 100644
index 0000000..8fc7f53
--- /dev/null
+++ b/views/mods/mod_productfilter/settings_edit.phtml
@@ -0,0 +1,75 @@
+<?php
+
+ /**
+ * Tempalte für die Einstellungen des Produktfilter Moduls
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_productfilter_page', __('Seite mit Produktfilter', 'wpsg'), $this->view['wpsg_mod_productfilter']['pages'], $this->get_option('wpsg_mod_productfilter_page'), array()); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_productfilter_showotherpage', __('Auf anderen Seiten anzeigen', 'wpsg'), $this->get_option('wpsg_mod_productfilter_showotherpage')); ?>
+
+<br />
+
+<?php if ($this->hasMod('wpsg_mod_produktattribute')) { ?>
+<div class="wpsg_admin_box" id="wpsg_mod_productfilter_pa_box">
+ <div id="wpsg_mod_productfilter_pa" class="head" style="border-bottom: 0px none;">
+ <div class="title">
+ <div class="fulltab"><?php echo __('Produktattribute', 'wpsg'); ?></div>
+ </div>
+ <div class="content wpsg_admin_box_content" style="display: block;">
+ <?php if (!wpsg_isSizedArray($this->view['wpsg_mod_productfilter']['arPA'])) { ?>
+ <?php echo wpsg_translate(__('Noch keine Produktattribute hinterlegt. Definieren Sie in der <a href="#1#">Verwaltung der Produktattribute</a> Ihre Produktattribute.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_produktattribute'); ?>
+ <?php } else { ?>
+ <?php $index = 0; foreach ($this->view['wpsg_mod_productfilter']['arPA'] as $k => $v) { $index ++; ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_productfilter[pa][]', __($v['name'], 'wpsg'), $v['set'], array('value' => $v['id'], 'id' => 'wpsg_mod_productfilter_pa_'.$index)); ?>
+ <?php } ?>
+ <?php } ?>
+ </div>
+ </div>
+</div>
+<?php } ?>
+
+<br />
+
+<div class="wpsg_admin_box" id="wpsg_mod_productfilter_preis_box">
+ <div id="wpsg_mod_productfilter_preis" class="head" style="border-bottom:0px none;">
+ <div class="title">
+ <div class="fulltab"><?php echo __('Preisfilter', 'wpsg'); ?></div>
+ </div>
+ <div class="content wpsg_admin_box_content" style="display:block">
+ <?php echo wpsg_drawForm_Input('wpsg_mod_productfilter_pricefilter', __('Preisgruppen', 'wpsg'), $this->get_option('wpsg_mod_productfilter_pricefilter'), array('hint' => __('Preisgruppenformat: 1-100|101-200|>200', 'wpsg'))); ?>
+ </div>
+ </div>
+</div>
+
+<br />
+
+<?php if ($this->hasMod('wpsg_mod_varianten')) { ?>
+<div class="wpsg_admin_box" id="wpsg_mod_productfilter_varianten_box">
+ <div id="wpsg_mod_productfilter_varianten" class="head" style="border-bottom:0px none;">
+ <div class="title">
+ <div class="fulltab"><?php echo __('Varianten', 'wpsg'); ?></div>
+ </div>
+ <div class="content wpsg_admin_box_content" style="display:block;">
+ <?php if (!wpsg_isSizedArray($this->view['wpsg_mod_productfilter']['arVarianten'])) { ?>
+ <?php echo wpsg_translate(__('Noch keine Varianten hinterlegt. Definieren Sie in der <a href="#1#">Variantenverwaltung</a> Ihre Varianten.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_varianten'); ?>
+ <?php } else { ?>
+ <?php $index = 0; foreach ($this->view['wpsg_mod_productfilter']['arVarianten'] as $var_name => $set) { $index ++; ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_productfilter[varianten][]', __($var_name, 'wpsg'), $set, array('value' => $var_name, 'id' => 'wpsg_mod_productfilter_varianten_'.$index)); ?>
+ <?php } ?>
+ <?php } ?>
+ </div>
+ </div>
+</div>
+<?php } ?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_admin_box').wpsg_adminbox();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_productfilter/widget.phtml b/views/mods/mod_productfilter/widget.phtml
new file mode 100644
index 0000000..9538365
--- /dev/null
+++ b/views/mods/mod_productfilter/widget.phtml
@@ -0,0 +1,7 @@
+<?php
+
+ /**
+ * Template für das Widget des Produktfilters
+ */
+
+?>WIDGET \ No newline at end of file
diff --git a/views/mods/mod_productgroups/add.phtml b/views/mods/mod_productgroups/add.phtml
new file mode 100644
index 0000000..c2cced8
--- /dev/null
+++ b/views/mods/mod_productgroups/add.phtml
@@ -0,0 +1,72 @@
+<?php
+
+ /**
+ * Template für das Anlegen/Bearbeiten einer Produktgruppe
+ */
+ //wpsg_debug($this->view['data']);
+?>
+<div class="wrap columns-2 wpsg_produkt_addedit">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
+ <h2>
+ <?php echo wpsg_translate(__('Produktgruppe #1#', 'wpsg'), $this->view['data']['name']); ?>
+ </h2>
+ <br />
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=save&noheader=1" enctype="multipart/form-data">
+
+ <div id="postbox" class="metabox-holder has-right-sidebar">
+
+ <div id="side-info-column" class="inner-sidebar">
+ <div id="side-sortables" class="meta-box-sortables ui-sortable">
+
+ <?php $this->callMods('wpsg_mod_productgroups_addedit_sidebar', array(&$this->view['data'])); ?>
+
+ </div>
+ </div>
+
+ <div id="post-body">
+ <div id="post-body-content">
+ <div class="postbox" id="postbox_kunde_anschrift">
+ <div title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></div>
+ <h3 class="hndle"><span><?php echo __('Name', 'wpsg'); ?></span></h3>
+ <div class="inside">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_productgroups_name', __('Name', 'wpsg'), $this->view['data']['name']); ?>
+
+ <?php if (wpsg_isSizedArray($this->view['languages'])) { ?>
+ <?php foreach ($this->view['languages'] as $l) { if ($l['locale'] != $this->getDefaultLanguage()) { ?>
+
+ <?php echo wpsg_drawForm_Input(
+ 'lang['.$l['locale'].'][name]',
+ __('Name', 'wpsg').'&nbsp;('.$l['name'].'&nbsp;<img src="'.$this->getFlagURL().$l['flag'].'" alt="'.$l['Name'].'" />)',
+ $this->view['data']['lang'][$l['locale']]['name']
+ ); ?>
+
+ <?php } } ?>
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_Select('wpsg_mod_productgroups_template', __('Template', 'wpsg'), $this->view['templates'], $this->view['data']['template_file']); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_productgroups_infopage', __('Info Seite', 'wpsg'), $this->view['pages'], $this->view['data']['infopage']); ?>
+
+ </div>
+ </div>
+
+ <p class="submit">
+ <input type="submit" value="<?php echo __('Produktgruppe speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
+ <input type="submit" value="<?php echo __('Produktgruppe speichern und zur Übersicht', 'wpsg'); ?>" class="button-primary" id="submit_index" name="submit_index" />
+ </p>
+
+ </div>
+ </div>
+
+ </div>
+
+ <?php if (isset($this->view['data']['id']) && $this->view['data']['id'] > 0) { ?>
+ <input type="hidden" name="edit_id" value="<?php echo $this->view['data']['id']; ?>" />
+ <?php } ?>
+
+ </form>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_productgroups/admin_setcapabilities.phtml b/views/mods/mod_productgroups/admin_setcapabilities.phtml
new file mode 100644
index 0000000..95bcd8d
--- /dev/null
+++ b/views/mods/mod_productgroups/admin_setcapabilities.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template für die Integration in die Verwaltung der Berechtigungen
+ */
+
+ global $wpdb; $arRoles = get_option($wpdb->prefix."user_roles");
+
+?>
+<tr>
+ <td class="wpsg_col_capname"><?php echo __('Statistik', 'wpsg'); ?></td>
+ <?php foreach ($arRoles as $role_key => $r) { ?>
+ <td class="wpsg_col_cap">
+ <input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_productgroup]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_productgroup']) && $r['capabilities']['wpsg_productgroup'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_productgroup]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_productgroups/index.phtml b/views/mods/mod_productgroups/index.phtml
new file mode 100644
index 0000000..312e73b
--- /dev/null
+++ b/views/mods/mod_productgroups/index.phtml
@@ -0,0 +1,61 @@
+<?php
+
+ /**
+ * Template für die Produktgruppenübersicht
+ */
+
+?>
+<div class="wrap">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
+ <h2>
+ <?php echo __('Produktgruppenverwaltung', 'wpsg'); ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=add" class="add-new-h2"><?php echo __("Hinzufügen", "wpsg"); ?></a>
+ </h2>
+
+ <br />
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <?php if (!is_array($this->view['data']) || sizeof($this->view['data']) == 0) { ?>
+ <p><?php echo __("Keine Produktgruppen hinterlegt.", "wpsg"); ?></p>
+ <?php } else { ?>
+ <div class="clear"></div>
+ <table cellspacing="0" class="widefat post fixed">
+ <thead>
+ <tr>
+ <th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Name", "wpsg"); ?></th>
+ <th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Template", "wpsg"); ?></th>
+ <th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Produkte", "wpsg"); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->view['data'] as $g) { ?>
+ <tr valign="top" class="alternate author-self status-draft iedit" id="post-<?php echo $g['id']; ?>">
+ <td class="post-title column-title">
+ <strong><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $g['id']; ?>" class="row-title"><?php echo $g['name']; ?></a></strong>
+ <div class="row-actions">
+ <span class="edit"><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $g['id']; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a>
+ |
+ <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sich sicher?", "wpsg"); ?>')) return false;" title="<?php echo __("Diese Produktgruppe löschen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=del&noheader=1&edit_id=<?php echo $g['id']; ?>"><?php echo __("Löschen", "wpsg"); ?></a>
+ <?php if ($g['countProdukte'] > 0) { ?>
+ |
+ <span class="edit"><a title="<?php echo __("Zur Produktliste", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&search[pgruppe]=<?php echo $g['id']; ?>"><?php echo __("Zur Produktliste", "wpsg"); ?></a>
+ <?php } ?>
+ </span>
+ </td>
+ <td><?php echo (($g['template_file'] == "0")?'Individuelle Produkttemplates':$g['template_file']); ?></td>
+ <td><?php echo $g['countProdukte']; ?></td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ <tfoot>
+ <tr>
+ <th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Name", "wpsg"); ?></th>
+ <th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Template", "wpsg"); ?></th>
+ <th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Produkte", "wpsg"); ?></th>
+ </tr>
+ </tfoot>
+ </table>
+ <?php } ?>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_productgroups/list.phtml b/views/mods/mod_productgroups/list.phtml
new file mode 100644
index 0000000..e52f3c1
--- /dev/null
+++ b/views/mods/mod_productgroups/list.phtml
@@ -0,0 +1,45 @@
+<?php
+
+ /*
+ *
+ * Template für die Produktgruppenansicht im Frontend
+ *
+ */
+
+ // Produkte die neben dem Namen angezeigt werden sollen
+ $showP = 4;
+
+ if (!$this->hasMod("wpsg_mod_produktbilder")) die(__("Dieses Template erfordert das Modul mod_produktbilder.", "wpsg"));
+
+ // Dimension der Bilder
+ $picW = 150;
+ $picH = 100;
+ $picMode = 's';
+
+?>
+<?php //wpsg_debug($this->view['data']) ?>
+<?php $c = 0; foreach ((array)$this->view['data'] as $k => $g) { ?>
+<?php //wpsg_debug($g) ?>
+<div class="wpsg_pgruppen_list_row">
+ <div class="wpsg_pgruppen_list_titel">
+ <a href="<?php echo WPSG_URL_WP ?>?page_id=<?php echo get_the_ID(); ?>&show=<?php echo $k ?>">
+ <?php echo $g['pgruppe_name'] ?>
+ </a>
+ </div>
+ <div class="wpsg_pgruppen_list_produkte">
+ <?php for ($i = 0; $i < $showP && $i < sizeof($g['produkte']); $i ++) { ?>
+ <?php $image = array_rand($g['produkte'][$i]['bilder']); ?>
+ <?php if ($image >= 0 && is_int($image)) { ?>
+ <div class="wpsg_pgruppen_list_image">
+ <?php $image_path = $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($g['produkte'][$i]['id'], $g['produkte'][$i]['bilder'][$image], $picW, $picH, $picMode)) ?>
+ <a href="<?php echo $g['produkte'][$i]['url'] ?>">
+ <img src="<?php echo $image_path; ?>" alt="<?php echo $g['produkte'][$i]['name']; ?>"/>
+ </a>
+ </div>
+ <?php } ?>
+ <?php } ?>
+ <div style="clear:both;"></div>
+ </div>
+</div>
+<?php $c++ ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_productgroups/productgroups_addedit_sidebar.phtml b/views/mods/mod_productgroups/productgroups_addedit_sidebar.phtml
new file mode 100644
index 0000000..0329938
--- /dev/null
+++ b/views/mods/mod_productgroups/productgroups_addedit_sidebar.phtml
@@ -0,0 +1,17 @@
+<?php
+
+ /**
+ * Template für die Lagerverwaltung innerhalb der Einstellungen der Produktgruppe
+ */
+ //wpsg_debug($this->view['wpsg_mod_productgroups']['data']);
+?>
+<div id="postbox_productgroupstock" class="postbox">
+ <div class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></div>
+ <h3 class="handle">
+ <span><?php echo __('Produktgruppen Lagerbestand', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_productgroups[stock_aktiv]', __('Lagerbestand zählen', 'wpsg'), $this->view['wpsg_mod_productgroups']['data']['stock_aktiv'], array()); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_productgroups[stock_value]', __('Bestand', 'wpsg'), wpsg_hspc($this->view['wpsg_mod_productgroups']['data']['stock_value']), array()); ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_productgroups/produkt_edit_sidebar.phtml b/views/mods/mod_productgroups/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..a7a90f4
--- /dev/null
+++ b/views/mods/mod_productgroups/produkt_edit_sidebar.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Template für die Konfiguration der Produktvariablen innerhalb der Produktverwaltung
+ */
+
+?>
+<div id="wpsg_productgroups" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Produktgruppen', 'wpsg'); ?> </span>
+ </h3>
+ <div class="inside">
+
+ <?php if (sizeof($this->view['wpsg_mod_productgroups']['data']) <= 0) { ?>
+ <p><?php echo __('Bisher wurden keine Produktgruppen angelegt.', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <?php echo wpsg_drawForm_Select('wpsg_productgroup', __('Produktgruppe', 'wpsg'), $this->view['wpsg_mod_productgroups']['data'], $this->view['wpsg_mod_productgroups']['produkt_data']['pgruppe']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_productgroup_sticky_von', __('Sticky von', 'wpsg'), $this->view['wpsg_mod_productgroups']['sticky_von']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_productgroup_sticky_bis', __('Sticky bis', 'wpsg'), $this->view['wpsg_mod_productgroups']['sticky_bis']); ?>
+ <?php } ?>
+
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;page=wpsg-Productgroups"><?php echo __('Produktgruppenverwaltung', 'wpsg'); ?></a>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_productgroups/produkt_index_filter.phtml b/views/mods/mod_productgroups/produkt_index_filter.phtml
new file mode 100644
index 0000000..c99fe29
--- /dev/null
+++ b/views/mods/mod_productgroups/produkt_index_filter.phtml
@@ -0,0 +1,45 @@
+<?php
+
+ /**
+ * Template für die Produktgruppenauswahl in der Produktübersicht
+ */
+
+?>
+
+<script type="text/javascript">
+
+ function wpsg_goGroup(group_id)
+ {
+
+ jQuery('#wpsg_seite').val('1');
+ jQuery('#wpsg_search_pgruppe').val(group_id);
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ }
+
+</script>
+
+<input type="hidden" id="wpsg_search_pgruppe" name="search[pgruppe]" value="<?php echo $_REQUEST['search']['pgruppe']; ?>" />
+
+<?php if (is_array($this->view['productgroups']) && sizeof($this->view['productgroups']) > 0) { ?>
+<ul class="subsubsub wpsg_order_index_status">
+ <?php foreach ($this->view['productgroups'] as $pg) { ?>
+ <li>
+ <?php if (isset($_REQUEST['search']['pgruppe']) && $_REQUEST['search']['pgruppe'] == $pg['id']) { ?>
+ <span class="akt"><?php echo wpsg_hspc($pg['name']); ?></span> <span class="count">(<?php echo $pg['countProdukte']; ?>) | </span>
+ <?php } else { ?>
+ <a onclick="return wpsg_goGroup(<?php echo $pg['id']; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&search[pgruppe]=<?php echo $pg['id']; ?>"><?php echo wpsg_hspc($pg['name']); ?> <span class="count">(<?php echo $pg['countProdukte']; ?>)</span></a> |
+ <?php } ?>
+ </li>
+ <?php } ?>
+ <li>
+ <?php if (isset($_REQUEST['search']['pgruppe']) && $_REQUEST['search']['pgruppe'] > 0) { ?>
+ <a onclick="return wpsg_goGroup(0);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt"><?php echo __('Alle', 'wpsg'); ?> <span class="count">(<?php echo $this->view['countProducts']; ?>)</span></a>
+ <?php } else { ?>
+ <span class="akt"><?php echo __('Alle', 'wpsg'); ?></span> <span class="count">(<?php echo $this->view['countProducts']; ?>)</span>
+ <?php } ?>
+ </li>
+</ul>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_productgroups/settings_edit.phtml b/views/mods/mod_productgroups/settings_edit.phtml
new file mode 100644
index 0000000..90aaba1
--- /dev/null
+++ b/views/mods/mod_productgroups/settings_edit.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Template für die Einstellungsseite der Produktgruppen
+ */
+
+?>
+<?php echo wpsg_drawForm_Select('wpsg_productgroups_page', __('Produktgruppenübersichtsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_productgroups_page'), array('help' => 'wpsg_mod_productgroups_page')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_productgroups_order', __('Sortierung innerhalb der Gruppe', 'wpsg'), array(
+ 'id' => __('Nach ID', 'wpsg'),
+ 'alphabetisch' => __('Alphabetisch', 'wpsg'),
+ 'buyed' => __('Anzahl Verkäufe', 'wpsg'),
+ 'erstellungsdatum' => __('Erstellungsdatum', 'wpsg'),
+ 'preis' => __('Preis', 'wpsg')
+), $this->get_option('wpsg_productgroups_order'), array('help' => 'wpsg_mod_productgroups_order')); ?> \ No newline at end of file
diff --git a/views/mods/mod_productgroups/show.phtml b/views/mods/mod_productgroups/show.phtml
new file mode 100644
index 0000000..0591381
--- /dev/null
+++ b/views/mods/mod_productgroups/show.phtml
@@ -0,0 +1,48 @@
+<?php
+
+ /*
+ *
+ * Template für die Ansicht einer einzelnen Produktgruppe
+ *
+ */
+
+ if (!$this->hasMod("wpsg_mod_produktbilder")) die(__("Dieses Template erfordert das Modul mod_produktbilder.", "wpsg"));
+
+ // Dimension der Bilder
+ $picW = 200;
+ $picH = 200;
+ $picMode = 'c';
+
+ //$p['produktattribute'][$index]['name']; Der Name des Attributs
+ //$p['produktattribute'][$index]['value']; Der Wert des Attributs
+ //$index ist die Nummer des Produktattributs
+
+ //Ausgabemöglichkeit bei aktiviertem Debug Modus
+ //wpsg_debug($this->view['data']);
+
+?>
+<div class="wpsg_pgruppen_single">
+ <div class="wpsg_pgruppen_single_produkte_wrap">
+ <div class="wpsg_pgruppen_single_produkte">
+ <?php foreach ((array)$this->view['data']['produkte'] as $p) { ?>
+ <?php //wpsg_debug($p) ?>
+ <?php if (sizeof($p['bilder']) > 0) { ?>
+ <?php $image = array_rand($p['bilder']); ?>
+ <div class="wpsg_pgruppen_single_list_image">
+ <?php $image_path = $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($p['id'], $p['bilder'][$image], $picW, $picH, $picMode)) ?>
+ <a href="<?php echo $p['url'] ?>">
+ <img src="<?php echo $image_path; ?>" alt="<?php echo $p['name']; ?>"/>
+ </a>
+ </div>
+ <?php } ?>
+ <?php } ?>
+ </div>
+ </div>
+ <div style="clear:both;"></div>
+ <div class="wpsg_pgruppen_single_titel"><?php echo $this->view['data']['name']; ?></div>
+ <?php if ($this->view['data']['infopage'] > 0) { ?>
+ <div class="wpsg_pgruppen_single_link">
+ <a href="<?php echo get_permalink($this->view['data']['infopage']); ?>"><?php echo __("Mehr zur Produktgruppe", "wpsg"); ?></a>
+ </div>
+ <?php } ?>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_productindex/css/productindex.css b/views/mods/mod_productindex/css/productindex.css
new file mode 100644
index 0000000..234209b
--- /dev/null
+++ b/views/mods/mod_productindex/css/productindex.css
@@ -0,0 +1,37 @@
+.wpsg_mod_productindex .wpsg_mod_productindex_toolbar { background: -moz-linear-gradient(center top , #F7F5E7, #D4D0BA) repeat scroll 0 0 transparent; border-left:1px solid #bbb; border-right:1px solid #bbb; -moz-box-shadow:inset 1px 1px 0 rgba(255,255,255,0.3); -webkit-box-shadow:inset 1px 1px 0 rgba(255,255,255,0.3); box-shadow:inset 1px 1px 0 rgba(255,255,255,0.3); padding:2px 15px 2px 15px; text-shadow:0 1px 0 #fff; }
+.wpsg_mod_productindex .wpsg_mod_productindex_toolbar_top { -moz-border-radius-topleft:4px; -moz-border-radius-topright:4px; -webkit-border-top-left-radius:4px; -webkit-border-top-right-radius:4px; border-top-right-radius:4px; border-top-left-radius:4px; border-top:2px solid #D4D0BA; }
+.wpsg_mod_productindex .wpsg_mod_productindex_toolbar_bottom { -moz-border-radius-bottomleft:4px; -moz-border-radius-bottomright:4px; -webkit-border-bottom-left-radius:4px; -webkit-border-bottom-right-radius:4px; border-bottom-right-radius:4px; border-bottom-left-radius:4px; border-top:2px solid #D4D0BA; border-bottom:2px solid #D4D0BA; }
+.wpsg_mod_productindex .wpsg_mod_productindex_toolbar ul { list-style:none; padding:0px; margin:0px; float:left; clear:none; }
+.wpsg_mod_productindex .wpsg_mod_productindex_toolbar .wpsg_mod_productindex_pager ul li, .wpsg_mod_productindex .wpsg_mod_productindex_toolbar .wpsg_mod_productindex_pager span { float:left; display:block; margin-left:5px; }
+.wpsg_mod_productindex .wpsg_mod_productindex_order { float:left;}
+.wpsg_mod_productindex .wpsg_mod_productindex_order select { margin-bottom:3px; }
+.wpsg_mod_productindex .wpsg_mod_productindex_viewselect { float:right; margin-top:3px; }
+.wpsg_mod_productindex .wpsg_mod_productindex_pager { float:right; margin-left:5px; }
+
+/* List Ansicht */
+.wpsg_mod_productindex_list .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_button { float:right; }
+.wpsg_mod_productindex_list .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_infos { float:right; line-height:1.5em; font-size:1em; text-align:right; }
+.wpsg_mod_productindex_list .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_infos div { clear:right; }
+.wpsg_mod_productindex_list .wpsg_mod_productindex_product { border-top:2px solid #D4D0BA; border-left:2px solid #D4D0BA; border-right:2px solid #D4D0BA; padding:15px; }
+.wpsg_mod_productindex_list .wpsg_mod_productindex_empty { border-top:2px solid #D4D0BA; border-left:2px solid #D4D0BA; border-right:2px solid #D4D0BA; padding:10px 15px 10px 15px; }
+.wpsg_mod_productindex_list .wpsg_mod_productindex_product .wpsg_mod_productindex_pic { float:left; margin-right:15px; }
+.wpsg_mod_productindex_list .wpsg_mod_productindex_product .wpsg_mod_productindex_content { margin-left:115px; }
+.wpsg_mod_productindex_list .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_title { font-size:1.2em; font-weight:bold; margin-bottom:5px; line-height:1.5em; }
+.wpsg_mod_productindex_list .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_price { font-size:1.4em; font-weight:normal; color:#000000; }
+.wpsg_mod_productindex_list .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_produkt_preishinweis { font-size:0.8em; font-weight:normal; font-style:italic; }
+.wpsg_mod_productindex_list .wpsg_mod_productindex_product .wpsg_produkt_soldout { color:#FF0000; }
+.wpsg_mod_productindex_kuhint { font-size:1em; line-height:125%; margin-top:20px; font-style:italic; }
+
+/* Grid Ansicht */
+.wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_button { width:100%; margin-top:15px; }
+.wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_button a { width:100%; padding:0px; }
+.wpsg_mod_productindex_grid .wpsg_mod_productindex_productrow { border-left:2px solid #D4D0BA; border-right:2px solid #D4D0BA; border-top:2px solid #D4D0BA; }
+.wpsg_mod_productindex_grid .wpsg_mod_productindex_product { padding-bottom:50px; float:left; font-size:0.8em; }
+.wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_product_inner { margin:15px; }
+.wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_pic { text-align:center; }
+.wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_infos { font-size:0.8em; }
+.wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_title { font-size:1.0em; font-weight:bold; margin-bottom:5px; line-height:1.5em; min-height:3em; }
+.wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_price { font-size:1.4em; font-weight:normal; color:#000000; }
+.wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_produkt_preishinweis { font-size:0.8em; font-weight:normal; font-style:italic; }
+.wpsg_mod_productindex_grid .wpsg_produkt_soldout { color:#FF0000; }
+.wpsg_mod_productindex_kuhint { font-size:1em; line-height:125%; margin-top:20px; font-style:italic; } \ No newline at end of file
diff --git a/views/mods/mod_productindex/gfx/icon_grid.png b/views/mods/mod_productindex/gfx/icon_grid.png
new file mode 100644
index 0000000..dfc33af
--- /dev/null
+++ b/views/mods/mod_productindex/gfx/icon_grid.png
Binary files differ
diff --git a/views/mods/mod_productindex/gfx/icon_list.png b/views/mods/mod_productindex/gfx/icon_list.png
new file mode 100644
index 0000000..b5da3ff
--- /dev/null
+++ b/views/mods/mod_productindex/gfx/icon_list.png
Binary files differ
diff --git a/views/mods/mod_productindex/layouts/grid.phtml b/views/mods/mod_productindex/layouts/grid.phtml
new file mode 100644
index 0000000..7316056
--- /dev/null
+++ b/views/mods/mod_productindex/layouts/grid.phtml
@@ -0,0 +1,279 @@
+<?php
+
+ /**
+ * Template für die Produktübersichtsseite (Gitteransicht)
+ */
+
+ /* Modus für das Vorschaubild */
+ $bPicMode = 'c';
+
+ /* Höhe und Breite für das Vorschaubild (CSS Layout muss entsprechend angepasst werden) */
+ $nPicWidth = 140;
+ $nPicHeight = 140;
+
+ /* Wenn es auf false gesetzt wird, wird das erste Bild als Vorschaubild verwendet */
+ $nPicRand = true;
+
+ $col = 4;
+
+?>
+
+<?php
+
+ remove_filter('the_content', array($GLOBALS['wpsg_sc'], 'content_filter'));
+ the_content();
+ add_filter('the_content', array($GLOBALS['wpsg_sc'], 'content_filter'));
+
+?>
+
+<div class="wpsg_mod_productindex wpsg_mod_productindex_grid">
+
+ <form method="get" id="wpsg_mod_productindex_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
+
+ <?php parse_str($_SERVER['QUERY_STRING'], $arGET); if (wpsg_isSizedArray($arGET)) { foreach ($arGET as $key => $value) { if (!wpsg_isSizedArray($value)) { ?>
+ <input type="hidden" name="<?php echo $key; ?>" value="<?php echo $value; ?>" />
+ <?php } } } ?>
+
+ <input type="hidden" id="wpsg_mod_productindex_filter_page" name="wpsg_mod_productindex[filter][page]" value="<?php echo $this->view['wpsg_mod_productindex']['filter']['page']; ?>" />
+ <input type="hidden" id="wpsg_mod_productindex_filter_order" name="wpsg_mod_productindex[filter][order]" value="<?php echo $this->view['wpsg_mod_productindex']['filter']['order']; ?>" />
+ <input type="hidden" id="wpsg_mod_productindex_template" name="wpsg_mod_productindex[template]" value="<?php echo $this->view['wpsg_mod_productindex']['template']; ?>" />
+
+ </form>
+
+ <div class="wpsg_mod_productindex_toolbar wpsg_mod_productindex_toolbar_top">
+
+ <?php if ($this->view['hideOrder'] != '1') { ?>
+ <div class="wpsg_mod_productindex_order">
+ <span><?php echo __('Sortierung:', 'wpsg'); ?></span>
+ <select name="wpsg_mod_productindex[filter][order]" class="wpsg_mod_productindex_filter_order">
+ <option value="price_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_asc')?'selected="selected"':''); ?>><?php echo __('Preis (Kleinster zuerst)', 'wpsg'); ?></option>
+ <option value="price_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_desc')?'selected="selected"':''); ?>><?php echo __('Preis (Größter zuerst)', 'wpsg'); ?></option>
+ <option value="name_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_asc')?'selected="selected"':''); ?>><?php echo __('Name Aufsteigend', 'wpsg'); ?></option>
+ <option value="name_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_desc')?'selected="selected"':''); ?>><?php echo __('Name Absteigend', 'wpsg'); ?></option>
+ <option value="cdate_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_asc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Älteste zuerst)', 'wpsg'); ?></option>
+ <option value="cdate_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_desc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Neueste zuerst)', 'wpsg'); ?></option>
+ <option value="anr_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_asc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Aufsteigend', 'wpsg'); ?></option>
+ <option value="anr_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_desc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Absteigend', 'wpsg'); ?></option>
+ </select>
+ </div>
+ <?php } ?>
+
+ <?php if ($this->view['wpsg_mod_productindex']['filter']['pages'] > 1) { ?>
+ <div class="wpsg_mod_productindex_pager">
+ <span><?php echo __('Seite:', 'wpsg'); ?></span>
+ <ul>
+ <?php for ($i = 1; $i <= $this->view['wpsg_mod_productindex']['filter']['pages']; $i ++) { ?>
+ <li>
+ <?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) { ?>
+ <span><?php echo $i; ?></span>
+ <?php } else { ?>
+ <a title="<?php echo wpsg_translate(__('Zu Seite #1# wechseln', 'wpsg'), $i); ?>" href="#" onclick="return wpsg_mod_productindex_goPage(<?php echo $i; ?>);"><?php echo $i; ?></a>
+ <?php } ?>
+ </li>
+ <?php } ?>
+ </ul>
+ </div>
+ <?php } ?>
+
+ <?php if ($this->view['hideViewSelect'] != '1') { ?>
+ <div class="wpsg_mod_productindex_viewselect">
+ <a href="#" onclick="return wpsg_mod_productindex_viewselect('list.phtml');" title="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>">
+ <img src="<?php echo $this->getRessourceURL('mods/mod_productindex/gfx/icon_list.png'); ?>" alt="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>" />
+ </a>
+ </div>
+ <?php } ?>
+
+ <div class="wpsg_clear"></div>
+
+ </div>
+
+ <?php if (wpsg_isSizedArray($this->view['arProducts'])) { ?>
+
+ <?php $i = 0; foreach ($this->view['arProducts'] as $p) { $i ++; ?>
+
+ <?php if (($i - 1) % $col == 0) { ?><div class="wpsg_mod_productindex_productrow"><?php } ?>
+
+ <div class="wpsg_mod_productindex_product <?php echo (($i == sizeof($this->view['arProducts']))?'wpsg_mod_productindex_product_last':''); ?> <?php echo (($i == 1)?'wpsg_mod_productindex_product_first':''); ?>" style="width:<?php echo round((100 / $col), 2) ?>%;">
+ <div class="wpsg_mod_productindex_product_inner">
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($p['id'])); ?>
+ <div class="wpsg_mod_productindex_pic">
+ <?php if (wpsg_isSizedArray($arBilder)) { ?>
+ <a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>">
+ <?php if ($nPicRand === true) $nPicIndex = array_rand($arBilder); else $nPicIndex = 0; ?>
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($p['id'], $arBilder[$nPicIndex], $nPicWidth, $nPicHeight, $bPicMode)); ?>" alt="<?php wpsg_hspc($p['name']); ?>" />
+ </a>
+ <?php } ?>
+ </div>
+ <?php } ?>
+ <div class="wpsg_mod_productindex_content">
+ <div class="wpsg_mod_productindex_title">
+ <a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo $this->getProductName($this->getProduktID($p['id']), true); ?></a>
+ </div>
+ <div class="wpsg_mod_productindex_infos">
+ <div class="wpsg_mod_productindex_weight">
+ <?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProductindex') == '1') { ?>
+ <?php if ($p['min_weight'] == $p['max_weight']) { ?>
+ <?php echo wpsg_translate(__('Gewicht: #1#', 'wpsg'), wpsg_ff($p['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('Gewicht: ab #1#', 'wpsg'), wpsg_ff($p['min_weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
+ <?php } ?>
+ <?php } ?>
+ </div>
+
+ <div class="wpsg_mod_productindex_fmenge">
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_fmenge') == '1') { ?>
+ <?php echo wpsg_translate(__('Füllmenge: #1#', 'wpsg'), wpsg_ff($p['fmenge'], $p['feinheit'])); ?>
+ <?php } ?>
+ </div>
+
+ <div class="wpsg_mod_productindex_gpreis">
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_grundpreis') == '1') { ?>
+ <?php echo wpsg_translate(__('Grundpreis: #1# / #2#', 'wpsg'),
+ wpsg_ff($p['fmenge_preis'], $this->get_option('wpsg_currency')),
+ wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $p['feinheit'])
+ ); ?>
+ <?php } ?>
+ </div>
+ </div>
+
+ <?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProductindex') == '1') { ?>
+ <div class="wpsg_mod_produktindex_stock">
+ <?php echo wpsg_translate(__('Lagerbestand: #1#','wpsg'), $p['stock']); ?>
+ </div>
+ <?php } ?>
+
+ <div class="wpsg_mod_productindex_price">
+ <?php if ($p['min_preis'] == $p['max_preis']) { ?>
+ <?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('ab #1#', 'wpsg'), wpsg_ff($p['min_preis'], $this->get_option('wpsg_currency'))); ?>
+ <?php } ?>
+ </div>
+ <?php if ($this->get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>
+ <div class="wpsg_produkt_preishinweis">
+ <?php echo wpsg_translate(__('#2# zzgl. #1#', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>', '<a href="#kkhint" title="'.wpsg_hspc($this->get_option('wpsg_kleinunternehmer_text')).'">Endpreis</a>'); ?>
+ </div>
+ <?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>
+ <div class="wpsg_produkt_preishinweis">
+ <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?>
+ <?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($p['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } else { /* Frontend = BRUTTO Preise */ ?>
+ <?php echo wpsg_translate(__('(inkl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($p['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } ?>
+ </div>
+ <?php } ?>
+
+ <div class="wpsg_mod_productindex_button">
+
+ <?php if ($this->hasMod('wpsg_mod_stock') && $this->callMod('wpsg_mod_stock', 'checkBestand', array($p['id'], 1)) === false) { ?>
+ <span class="wpsg_produkt_soldout"><?php echo __('Produkt ausverkauft', 'wpsg'); ?></span>
+ <?php } else { ?>
+ <a class="wpsg_button" title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo __('Zum Produkt', 'wpsg'); ?></a>
+ <?php } ?>
+
+ </div>
+
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+
+ <?php if (($i - 1) % $col == ($col - 1)) { ?><div class="wpsg_clear"></div></div><?php } ?>
+
+ <?php } ?>
+
+ <?php if (($i - 1) % $col != ($col - 1)) { ?><div class="wpsg_clear"></div></div><?php } ?>
+
+ <?php } else { ?>
+ <div class="wpsg_mod_productindex_empty"><?php echo __('Keine passenden Produkte gefunden.', 'wpsg'); ?></div>
+ <?php } ?>
+
+ <div class="wpsg_mod_productindex_toolbar wpsg_mod_productindex_toolbar_bottom">
+
+ <?php if ($this->view['hideOrder'] != '1') { ?>
+ <div class="wpsg_mod_productindex_order">
+ <span><?php echo __('Sortierung:', 'wpsg'); ?></span>
+ <select name="wpsg_mod_productindex[filter][order]" class="wpsg_mod_productindex_filter_order">
+ <option value="price_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_asc')?'selected="selected"':''); ?>><?php echo __('Preis (Kleinster zuerst)', 'wpsg'); ?></option>
+ <option value="price_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_desc')?'selected="selected"':''); ?>><?php echo __('Preis (Größter zuerst)', 'wpsg'); ?></option>
+ <option value="name_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_asc')?'selected="selected"':''); ?>><?php echo __('Name Aufsteigend', 'wpsg'); ?></option>
+ <option value="name_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_desc')?'selected="selected"':''); ?>><?php echo __('Name Absteigend', 'wpsg'); ?></option>
+ <option value="cdate_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_asc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Älteste zuerst)', 'wpsg'); ?></option>
+ <option value="cdate_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_desc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Neueste zuerst)', 'wpsg'); ?></option>
+ <option value="anr_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_asc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Aufsteigend', 'wpsg'); ?></option>
+ <option value="anr_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_desc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Absteigend', 'wpsg'); ?></option>
+ </select>
+ </div>
+ <?php } ?>
+
+ <?php if ($this->view['wpsg_mod_productindex']['filter']['pages'] > 1) { ?>
+ <div class="wpsg_mod_productindex_pager">
+ <span><?php echo __('Seite:', 'wpsg'); ?></span>
+ <ul>
+ <?php for ($i = 1; $i <= $this->view['wpsg_mod_productindex']['filter']['pages']; $i ++) { ?>
+ <li>
+ <?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) { ?>
+ <span><?php echo $i; ?></span>
+ <?php } else { ?>
+ <a title="<?php echo wpsg_translate(__('Zu Seite #1# wechseln', 'wpsg'), $i); ?>" href="#" onclick="return wpsg_mod_productindex_goPage(<?php echo $i; ?>);"><?php echo $i; ?></a>
+ <?php } ?>
+ </li>
+ <?php } ?>
+ </ul>
+ </div>
+ <?php } ?>
+
+ <?php if ($this->view['hideViewSelect'] != '1') { ?>
+ <div class="wpsg_mod_productindex_viewselect">
+ <a href="#" onclick="return wpsg_mod_productindex_viewselect('list.phtml');" title="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>">
+ <img src="<?php echo $this->getRessourceURL('mods/mod_productindex/gfx/icon_list.png'); ?>" alt="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>" />
+ </a>
+ </div>
+ <?php } ?>
+
+ <div class="wpsg_clear"></div>
+
+ </div>
+
+ <?php if ($this->get_option('wpsg_kleinunternehmer')) { ?>
+ <a name="kkhint"></a>
+ <div class="wpsg_mod_productindex_kuhint"><?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?></div>
+ <?php } ?>
+
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_mod_productindex_goPage(page)
+ {
+
+ jQuery('#wpsg_mod_productindex_filter_page').val(page);
+ jQuery('#wpsg_mod_productindex_form').submit();
+
+ return false;
+
+ } // function wpsg_mod_productindex_goPage(page)
+
+ function wpsg_mod_productindex_viewselect(template)
+ {
+
+ jQuery('#wpsg_mod_productindex_template').val(template);
+ jQuery('#wpsg_mod_productindex_form').submit();
+
+ return false;
+
+ } // function wpsg_mod_productindex_viewselect(template)
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_mod_productindex_filter_order').bind('change', function() {
+
+ jQuery('#wpsg_mod_productindex_filter_order').val(jQuery(this).find('option:selected').attr('value'));
+ jQuery('#wpsg_mod_productindex_filter_page').val('1');
+ jQuery('#wpsg_mod_productindex_form').submit();
+
+ } );
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_productindex/layouts/list.phtml b/views/mods/mod_productindex/layouts/list.phtml
new file mode 100644
index 0000000..e2b2f71
--- /dev/null
+++ b/views/mods/mod_productindex/layouts/list.phtml
@@ -0,0 +1,264 @@
+<?php
+
+ /**
+ * Template für die Produktübersichtsseite
+ */
+
+ /* Modus für das Vorschaubild */
+ $bPicMode = 'c';
+
+ /* Höhe und Breite für das Vorschaubild (CSS Layout muss entsprechend angepasst werden) */
+ $nPicWidth = 100;
+ $nPicHeight = 100;
+
+ /* Wenn es auf false gesetzt wird, wird das erste Bild als Vorschaubild verwendet */
+ $nPicRand = true;
+
+?>
+
+<?php
+
+ remove_filter('the_content', array($GLOBALS['wpsg_sc'], 'content_filter'));
+ the_content();
+ add_filter('the_content', array($GLOBALS['wpsg_sc'], 'content_filter'));
+
+?>
+
+<div class="wpsg_mod_productindex wpsg_mod_productindex_list">
+
+ <form method="get" id="wpsg_mod_productindex_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
+
+ <?php parse_str($_SERVER['QUERY_STRING'], $arGET); if (wpsg_isSizedArray($arGET)) { foreach ($arGET as $key => $value) { if (!wpsg_isSizedArray($value)) { ?>
+ <input type="hidden" name="<?php echo $key; ?>" value="<?php echo $value; ?>" />
+ <?php } } } ?>
+
+ <input type="hidden" id="wpsg_mod_productindex_filter_page" name="wpsg_mod_productindex[filter][page]" value="<?php echo $this->view['wpsg_mod_productindex']['filter']['page']; ?>" />
+ <input type="hidden" id="wpsg_mod_productindex_filter_order" name="wpsg_mod_productindex[filter][order]" value="<?php echo $this->view['wpsg_mod_productindex']['filter']['order']; ?>" />
+ <input type="hidden" id="wpsg_mod_productindex_template" name="wpsg_mod_productindex[template]" value="<?php echo $this->view['wpsg_mod_productindex']['template']; ?>" />
+
+ </form>
+
+ <div class="wpsg_mod_productindex_toolbar wpsg_mod_productindex_toolbar_top">
+
+ <?php if ($this->view['hideOrder'] != '1') { ?>
+ <div class="wpsg_mod_productindex_order">
+ <span><?php echo __('Sortierung:', 'wpsg'); ?></span>
+ <select name="wpsg_mod_productindex[filter][order]" class="wpsg_mod_productindex_filter_order">
+ <option value="price_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_asc')?'selected="selected"':''); ?>><?php echo __('Preis (Kleinster zuerst)', 'wpsg'); ?></option>
+ <option value="price_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_desc')?'selected="selected"':''); ?>><?php echo __('Preis (Größter zuerst)', 'wpsg'); ?></option>
+ <option value="name_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_asc')?'selected="selected"':''); ?>><?php echo __('Name Aufsteigend', 'wpsg'); ?></option>
+ <option value="name_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_desc')?'selected="selected"':''); ?>><?php echo __('Name Absteigend', 'wpsg'); ?></option>
+ <option value="cdate_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_asc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Älteste zuerst)', 'wpsg'); ?></option>
+ <option value="cdate_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_desc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Neueste zuerst)', 'wpsg'); ?></option>
+ <option value="anr_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_asc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Aufsteigend', 'wpsg'); ?></option>
+ <option value="anr_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_desc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Absteigend', 'wpsg'); ?></option>
+ </select>
+ </div>
+ <?php } ?>
+
+ <?php if ($this->view['wpsg_mod_productindex']['filter']['pages'] > 1) { ?>
+ <div class="wpsg_mod_productindex_pager">
+ <span><?php echo __('Seite:', 'wpsg'); ?></span>
+ <ul>
+ <?php for ($i = 1; $i <= $this->view['wpsg_mod_productindex']['filter']['pages']; $i ++) { ?>
+ <li>
+ <?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) { ?>
+ <span><?php echo $i; ?></span>
+ <?php } else { ?>
+ <a title="<?php echo wpsg_translate(__('Zu Seite #1# wechseln', 'wpsg'), $i); ?>" href="#" onclick="return wpsg_mod_productindex_goPage(<?php echo $i; ?>);"><?php echo $i; ?></a>
+ <?php } ?>
+ </li>
+ <?php } ?>
+ </ul>
+ </div>
+ <?php } ?>
+
+ <?php if ($this->view['hideViewSelect'] != '1') { ?>
+ <div class="wpsg_mod_productindex_viewselect">
+ <a href="#" onclick="return wpsg_mod_productindex_viewselect('grid.phtml');" title="<?php echo __('Zur Gitteransicht wechseln.', 'wpsg'); ?>">
+ <img src="<?php echo $this->getRessourceURL('mods/mod_productindex/gfx/icon_grid.png'); ?>" alt="<?php echo __('Zur Gitteransicht wechseln.', 'wpsg'); ?>" />
+ </a>
+ </div>
+ <?php } ?>
+
+ <div class="wpsg_clear"></div>
+
+ </div>
+
+ <?php if (wpsg_isSizedArray($this->view['arProducts'])) { ?>
+
+ <?php $i = 0; foreach ($this->view['arProducts'] as $p) { $i ++; ?>
+ <div class="wpsg_mod_productindex_product <?php echo (($i % 2 == 0)?'odd':'even'); ?> <?php echo (($i == sizeof($this->view['arProducts']))?'wpsg_mod_productindex_product_last':''); ?> <?php echo (($i == 1)?'wpsg_mod_productindex_product_first':''); ?>">
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($p['id'])); ?>
+ <div class="wpsg_mod_productindex_pic">
+ <?php if (wpsg_isSizedArray($arBilder)) { ?>
+ <a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>">
+ <?php if ($nPicRand === true) $nPicIndex = array_rand($arBilder); else $nPicIndex = 0; ?>
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($p['id'], $arBilder[$nPicIndex], $nPicWidth, $nPicHeight, $bPicMode)); ?>" alt="<?php wpsg_hspc($p['name']); ?>" />
+ </a>
+ <?php } ?>
+ </div>
+ <?php } ?>
+ <div class="wpsg_mod_productindex_content">
+ <div class="wpsg_mod_productindex_infos">
+ <div class="wpsg_mod_productindex_weight">
+ <?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProductindex') == '1') { ?>
+ <?php if ($p['min_weight'] == $p['max_weight']) { ?>
+ <?php echo wpsg_translate(__('Gewicht: #1#', 'wpsg'), wpsg_ff($p['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('Gewicht: ab #1#', 'wpsg'), wpsg_ff($p['min_weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
+ <?php } ?>
+ <?php } ?>
+ </div>
+
+ <div class="wpsg_mod_productindex_fmenge">
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_fmenge') == '1') { ?>
+ <?php echo wpsg_translate(__('Füllmenge: #1#', 'wpsg'), wpsg_ff($p['fmenge'], $p['feinheit'])); ?>
+ <?php } ?>
+ </div>
+
+ <?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProductindex') == '1') { ?>
+ <div class="wpsg_mod_produktindex_stock">
+ <?php echo wpsg_translate(__('Lagerbestand: #1#','wpsg'), $p['stock']); ?>
+ </div>
+ <?php } ?>
+
+ <div class="wpsg_mod_productindex_gpreis">
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_grundpreis') == '1') { ?>
+ <?php echo wpsg_translate(__('Grundpreis: #1# / #2#', 'wpsg'),
+ wpsg_ff($p['fmenge_preis'], $this->get_option('wpsg_currency')),
+ wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $p['feinheit'])
+ ); ?>
+ <?php } ?>
+ </div>
+ </div>
+ <div class="wpsg_mod_productindex_title">
+ <a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo $this->getProductName($this->getProduktID($p['id']), true); ?></a>
+ </div>
+ <div class="wpsg_mod_productindex_description"><?php echo $p['beschreibung']; ?></div>
+ <div class="wpsg_mod_productindex_price">
+ <?php if ($p['min_preis'] == $p['max_preis']) { ?>
+ <?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('ab #1#', 'wpsg'), wpsg_ff($p['min_preis'], $this->get_option('wpsg_currency'))); ?>
+ <?php } ?>
+ </div>
+ <?php if ($this->get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>
+ <div class="wpsg_produkt_preishinweis">
+ <?php echo wpsg_translate(__('#2# zzgl. #1#', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>', '<a href="#kkhint" title="'.wpsg_hspc($this->get_option('wpsg_kleinunternehmer_text')).'">Endpreis</a>'); ?>
+ </div>
+ <?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>
+ <div class="wpsg_produkt_preishinweis">
+ <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?>
+ <?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($p['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } else { /* Frontend = BRUTTO Preise */ ?>
+ <?php echo wpsg_translate(__('(inkl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($p['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } ?>
+ </div>
+ <?php } ?>
+ <div class="wpsg_mod_productindex_button">
+ <?php if ($this->hasMod('wpsg_mod_stock') && $this->callMod('wpsg_mod_stock', 'checkBestand', array($p['id'], 1)) === false) { ?>
+ <span class="wpsg_produkt_soldout"><?php echo __('Produkt ausverkauft', 'wpsg'); ?></span>
+ <?php } else { ?>
+ <a class="wpsg_button" title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo __('Zum Produkt', 'wpsg'); ?></a>
+ <?php } ?>
+ </div>
+
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+
+ <?php } else { ?>
+ <div class="wpsg_mod_productindex_empty"><?php echo __('Keine passenden Produkte gefunden.', 'wpsg'); ?></div>
+ <?php } ?>
+
+ <div class="wpsg_mod_productindex_toolbar wpsg_mod_productindex_toolbar_bottom">
+
+ <?php if ($this->view['hideOrder'] != '1') { ?>
+ <div class="wpsg_mod_productindex_order">
+ <span><?php echo __('Sortierung:', 'wpsg'); ?></span>
+ <select name="wpsg_mod_productindex[filter][order]" class="wpsg_mod_productindex_filter_order">
+ <option value="price_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_asc')?'selected="selected"':''); ?>><?php echo __('Preis (Kleinster zuerst)', 'wpsg'); ?></option>
+ <option value="price_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_desc')?'selected="selected"':''); ?>><?php echo __('Preis (Größter zuerst)', 'wpsg'); ?></option>
+ <option value="name_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_asc')?'selected="selected"':''); ?>><?php echo __('Name Aufsteigend', 'wpsg'); ?></option>
+ <option value="name_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_desc')?'selected="selected"':''); ?>><?php echo __('Name Absteigend', 'wpsg'); ?></option>
+ <option value="cdate_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_asc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Älteste zuerst)', 'wpsg'); ?></option>
+ <option value="cdate_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_desc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Neueste zuerst)', 'wpsg'); ?></option>
+ <option value="anr_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_asc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Aufsteigend', 'wpsg'); ?></option>
+ <option value="anr_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_desc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Absteigend', 'wpsg'); ?></option>
+ </select>
+ </div>
+ <?php } ?>
+
+ <?php if ($this->view['wpsg_mod_productindex']['filter']['pages'] > 1) { ?>
+ <div class="wpsg_mod_productindex_pager">
+ <span><?php echo __('Seite:', 'wpsg'); ?></span>
+ <ul>
+ <?php for ($i = 1; $i <= $this->view['wpsg_mod_productindex']['filter']['pages']; $i ++) { ?>
+ <li>
+ <?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) { ?>
+ <span><?php echo $i; ?></span>
+ <?php } else { ?>
+ <a title="<?php echo wpsg_translate(__('Zu Seite #1# wechseln', 'wpsg'), $i); ?>" href="#" onclick="return wpsg_mod_productindex_goPage(<?php echo $i; ?>);"><?php echo $i; ?></a>
+ <?php } ?>
+ </li>
+ <?php } ?>
+ </ul>
+ </div>
+ <?php } ?>
+
+ <?php if ($this->view['hideViewSelect'] != '1') { ?>
+ <div class="wpsg_mod_productindex_viewselect">
+ <a href="#" onclick="return wpsg_mod_productindex_viewselect('grid.phtml');" title="<?php echo __('Zur Gitteransicht wechseln.', 'wpsg'); ?>">
+ <img src="<?php echo $this->getRessourceURL('mods/mod_productindex/gfx/icon_grid.png'); ?>" alt="<?php echo __('Zur Gitteransicht wechseln.', 'wpsg'); ?>" />
+ </a>
+ </div>
+ <?php } ?>
+
+ <div class="wpsg_clear"></div>
+
+ </div>
+
+ <?php if ($this->get_option('wpsg_kleinunternehmer')) { ?>
+ <a name="kkhint"></a>
+ <div class="wpsg_mod_productindex_kuhint"><?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?></div>
+ <?php } ?>
+
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_mod_productindex_goPage(page)
+ {
+
+ jQuery('#wpsg_mod_productindex_filter_page').val(page);
+ jQuery('#wpsg_mod_productindex_form').submit();
+
+ return false;
+
+ } // function wpsg_mod_productindex_goPage(page)
+
+ function wpsg_mod_productindex_viewselect(template)
+ {
+
+ jQuery('#wpsg_mod_productindex_template').val(template);
+ jQuery('#wpsg_mod_productindex_form').submit();
+
+ return false;
+
+ } // function wpsg_mod_productindex_viewselect(template)
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_mod_productindex_filter_order').bind('change', function() {
+
+ jQuery('#wpsg_mod_productindex_filter_order').val(jQuery(this).find('option:selected').attr('value'));
+ jQuery('#wpsg_mod_productindex_filter_page').val('1');
+ jQuery('#wpsg_mod_productindex_form').submit();
+
+ } );
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_productindex/page_metabox.phtml b/views/mods/mod_productindex/page_metabox.phtml
new file mode 100644
index 0000000..ddf4d48
--- /dev/null
+++ b/views/mods/mod_productindex/page_metabox.phtml
@@ -0,0 +1,83 @@
+<?php
+
+ /**
+ * Template für die Einstellungen innerhalb des Posts
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_productindex_active', __('Seite als Produktseite verwenden', 'wpsg'), get_post_meta($this->view['wpsg_mod_productindex']['post_id'], 'wpsg_mod_productindex_active', true)); ?>
+
+<div id="wpsg_mod_productindex_layer" style="display:none;">
+
+ <?php echo wpsg_drawForm_Select('wpsg_mod_productindex_show', __('Produkte', 'wpsg'), $this->view['wpsg_mod_productindex']['arShow'], get_post_meta($this->view['wpsg_mod_productindex']['post_id'], 'wpsg_mod_productindex_show', true)); ?>
+ <div class="wpsg_mod_productindex_layershow wpsg_mod_productindex_layer_1" style="display:none;">
+ <?php echo wpsg_drawForm_Input('wpsg_mod_productindex_productids', __('Produktauswahl (Kommagetrennte IDs)', 'wpsg'), get_post_meta($this->view['wpsg_mod_productindex']['post_id'], 'wpsg_mod_productindex_productids', true)); ?>
+ </div>
+ <div class="wpsg_mod_productindex_layershow wpsg_mod_productindex_layer_2" style="display:none;">
+ <?php if (sizeof($this->view['wpsg_mod_productindex']['arProductGroups']) <= 0) { ?>
+ <?php echo wpsg_drawForm_Input('', __('Produktgruppen', 'wpsg'), __('Keine Produktgruppen angelegt.', 'wpsg'), array('text' => true)); ?>
+ <?php } else { ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_productindex_groups', __('Produktgruppen', 'wpsg'), $this->view['wpsg_mod_productindex']['arProductGroups'], get_post_meta($this->view['wpsg_mod_productindex']['post_id'], 'wpsg_mod_productindex_groups', true), array('multiple' => ((sizeof($this->view['wpsg_mod_productindex']['arProductGroups']) < 5)?sizeof($this->view['wpsg_mod_productindex']['arProductGroups']):5))); ?>
+ <?php } ?>
+ </div>
+ <div class="wpsg_mod_productindex_layershow wpsg_mod_productindex_layer_3" style="display:none;">
+ <?php if (sizeof($this->view['wpsg_mod_productindex']['arCategories']) <= 0) { ?>
+ <?php echo wpsg_drawForm_Input('', __('Kategorien', 'wpsg'), __('Keine Kategorien angelegt.', 'wpsg'), array('text' => true)); ?>
+ <?php } else { ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_productindex_categories', __('Kategorien', 'wpsg'), $this->view['wpsg_mod_productindex']['arCategories'], get_post_meta($this->view['wpsg_mod_productindex']['post_id'], 'wpsg_mod_productindex_categories', true), array('multiple' => ((sizeof($this->view['wpsg_mod_productindex']['arCategories']) < 5)?sizeof($this->view['wpsg_mod_productindex']['arCategories']):5))); ?>
+ <?php } ?>
+ </div>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_productindex_template', __('Template', 'wpsg'), $this->view['wpsg_mod_productindex']['arTemplates'], get_post_meta($this->view['wpsg_mod_productindex']['post_id'], 'wpsg_mod_productindex_template', true), array('noIndex' => true)); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_productindex_perPage', __('Pro Seite', 'wpsg'), get_post_meta($this->view['wpsg_mod_productindex']['post_id'], 'wpsg_mod_productindex_perPage', true)); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_productindex_hideOrder', __('Sortierungsauswahl ausblenden', 'wpsg'), get_post_meta($this->view['wpsg_mod_productindex']['post_id'], 'wpsg_mod_productindex_hideOrder', true)); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_productindex_hideViewSelect', __('Ansichtenwechsel ausblenden', 'wpsg'), get_post_meta($this->view['wpsg_mod_productindex']['post_id'], 'wpsg_mod_productindex_hideViewSelect', true)); ?>
+
+ <?php if ($this->hasMod('wpsg_mod_stock')) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_productindex_showAusverkauft', __('Ausverkaufte anzeigen', 'wpsg'), get_post_meta($this->view['wpsg_mod_productindex']['post_id'], 'wpsg_mod_productindex_showAusverkauft', true)); ?>
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_Select('wpsg_mod_productindex_order', __('Standardsortierung', 'wpsg'), $this->view['wpsg_mod_productindex']['arOrder'], get_post_meta($this->view['wpsg_mod_productindex']['post_id'], 'wpsg_mod_productindex_order', true)); ?>
+
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Zeigt / Versteckt die Optionen für die Produktübersichtsseite
+ */
+ function wpsg_mod_productindex_activate()
+ {
+
+ if (jQuery('#wpsg_mod_productindex_active').attr('checked'))
+ {
+ jQuery('#wpsg_mod_productindex_layer').show();
+ }
+ else
+ {
+ jQuery('#wpsg_mod_productindex_layer').hide();
+ }
+
+ } // wpsg_mod_productindex_activate()
+
+ function wpsg_mod_productindex_switchShow()
+ {
+
+ var show = jQuery('#wpsg_mod_productindex_show').val();
+
+ jQuery('.wpsg_mod_productindex_layershow').hide();
+ jQuery('.wpsg_mod_productindex_layer_' + show).show();
+
+ } // function wpsg_mod_productindex_switchShow()
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_productindex_active').bind('change', function() { wpsg_mod_productindex_activate(); } );
+ jQuery('#wpsg_mod_productindex_show').bind('change', function() { wpsg_mod_productindex_switchShow(); } );
+
+ wpsg_mod_productindex_activate();
+ wpsg_mod_productindex_switchShow();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_productpackage/productlist.phtml b/views/mods/mod_productpackage/productlist.phtml
new file mode 100644
index 0000000..299257d
--- /dev/null
+++ b/views/mods/mod_productpackage/productlist.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Template für die Liste der zugeordneten Produkte
+ */
+
+?>
+<?php if (!wpsg_isSizedArray($this->view['arProducts'])) { ?>
+<?php echo __('Bisher wurden keine Produkte ausgewählt', 'wpsg'); ?>
+<?php } else { ?>
+
+
+<?php } ?>
+<br /><br />
+<a href="" class="wpsg_link_add" onclick="return wpsg_mod_productpackage_add();"><?php echo __('Produkt auswählen', 'wpsg'); ?></a> \ No newline at end of file
diff --git a/views/mods/mod_productpackage/produkt_edit_sidebar.phtml b/views/mods/mod_productpackage/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..f71ab25
--- /dev/null
+++ b/views/mods/mod_productpackage/produkt_edit_sidebar.phtml
@@ -0,0 +1,77 @@
+<?php
+
+ /**
+ * Template für die Integration des Produktpaketes in die Produktverwaltung
+ */
+
+?>
+<div id="wpsg_mod_productpackage_dialog"></div>
+
+<div id="wpsg_productpackage" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></span>
+ <span><?php echo __('Produktpaket', 'wpsg'); ?> </span>
+ </h3>
+ <div class="inside">
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_productpackage_set', __('Produktpaket', 'wpsg'), $this->get_option('wpsg_mod_productpackage_set')); ?>
+
+ <div id="wpsg_mod_productpackage_layer">
+
+ <?php echo $this->callMod('wpsg_mod_productpackage', 'productlist', array($this->view['data']['id'])); ?>
+
+ </div>
+
+ </div>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_mod_productpackage_select(product_id)
+ {
+
+ alert(product_id);
+
+ } // function wpsg_mod_productpackage_select(product_id)
+
+ function wpsg_mod_productpackage_add()
+ {
+
+ jQuery('#wpsg_mod_productpackage_dialog').html('<img style="margin:15px;" src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery('#wpsg_mod_productpackage_dialog').dialog( {
+ 'dialogClass': 'wp-dialog',
+ 'modal': true,
+ 'width': 390,
+ 'height': 350,
+ 'title': '<?php echo __('Produktauswahl', 'wpsg'); ?>',
+ 'open': function() {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=select&wpsg_mode=filterDialog&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>&callback=wpsg_mod_productpackage_select',
+ success: function(data) {
+
+ jQuery('#wpsg_mod_productpackage_dialog').html(data);
+
+ }
+ } );
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_productpackage_select()
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_productpackage_set').bind('change', function() {
+
+ if (jQuery(this).attr("checked") == "checked") jQuery('#wpsg_mod_productpackage_layer').show();
+ else jQuery('#wpsg_mod_productpackage_layer').hide();
+
+ } ).click();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_productvars/basket_row.phtml b/views/mods/mod_productvars/basket_row.phtml
new file mode 100644
index 0000000..dc08c07
--- /dev/null
+++ b/views/mods/mod_productvars/basket_row.phtml
@@ -0,0 +1,27 @@
+<?php
+
+ /**
+ * Template für die Integration der Produktvariablen innerhalb des Warenkorbs
+ */
+
+?>
+<?php foreach ($this->view['wpsg_mod_productvars']['data'] as $pv) { ?>
+<tr class="wpsg_<?php echo (($this->view['wpsg_mod_productvars']['i'] == 0)?'odd':'even'); ?> wpsg_basket_productvars">
+ <td><?php echo __($pv['name'], 'wpsg'); ?> <?php if ($pv['pflicht'] == '1') { ?><span class="wpsg_required">*</span><?php } ?>:</td>
+ <td colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'3':'2'); ?>">
+ <?php if ($pv['typ'] == '1') { // Auswahlfeld ?>
+ <select class="<?php echo ((in_array("wpsg_mod_productvars_".$pv['id']."_".$this->view['wpsg_mod_productvars']['p']['product_index'], (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg_mod_productvars[<?php echo $pv['id']; ?>][<?php echo $this->view['wpsg_mod_productvars']['p']['product_index']; ?>]">
+ <option value="not_set"><?php echo __('Bitte wählen', 'wpsg'); ?></option>
+ <?php foreach ((array)$pv['auswahl'] as $option) { ?>
+ <option <?php echo (($this->view['wpsg_mod_productvars']['p']['wpsg_mod_productvars'][$pv['id']] == wpsg_hspc($option))?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($option); ?>"><?php echo wpsg_hspc($option); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($pv['typ'] == '2') { // Textfeld ?>
+ <input class="<?php echo ((in_array("wpsg_mod_productvars_".$pv['id']."_".$this->view['wpsg_mod_productvars']['p']['product_index'], (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_productvars[<?php echo $pv['id']; ?>][<?php echo $this->view['wpsg_mod_productvars']['p']['product_index']; ?>]" value="<?php echo @wpsg_hspc($this->view['wpsg_mod_productvars']['p']['wpsg_mod_productvars'][$pv['id']]); ?>" />
+ <?php } else if ($pv['typ'] == '3') { // Checkbox ?>
+ <input type="hidden" value="0" name="wpsg_mod_productvars[<?php echo $pv['id']; ?>][<?php echo $this->view['wpsg_mod_productvars']['p']['product_index']; ?>]" />
+ <input <?php echo (($this->view['wpsg_mod_productvars']['p']['wpsg_mod_productvars'][$pv['id']] == '1')?'checked="checked"':''); ?> class="<?php echo ((in_array("wpsg_mod_productvars_".$pv['id']."_".$this->view['wpsg_mod_productvars']['p']['product_index'], (array)$this->view['error']))?'wpsg_error':''); ?>" type="checkbox" value="1" name="wpsg_mod_productvars[<?php echo $pv['id']; ?>][<?php echo $this->view['wpsg_mod_productvars']['p']['product_index']; ?>]" />
+ <?php } ?>
+ </td>
+</tr>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_productvars/mail_row.phtml b/views/mods/mod_productvars/mail_row.phtml
new file mode 100644
index 0000000..04d9b95
--- /dev/null
+++ b/views/mods/mod_productvars/mail_row.phtml
@@ -0,0 +1,11 @@
+<?php
+
+ /**
+ * Template für die Anzeige der Produktvariablen in den Mails
+ */
+
+?><?php if (is_array($this->view['wpsg_mod_productvars']['data']) && sizeof($this->view['wpsg_mod_productvars']['data']) > 0) { ?>
+<?php foreach ($this->view['wpsg_mod_productvars']['data'] as $pv_id => $pv) { ?>
+ <?php echo wpsg_hspc($pv['name']); ?>: <?php echo wpsg_hspc($pv['value']); ?>
+<?php } ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_productvars/mail_row_html.phtml b/views/mods/mod_productvars/mail_row_html.phtml
new file mode 100644
index 0000000..f61f960
--- /dev/null
+++ b/views/mods/mod_productvars/mail_row_html.phtml
@@ -0,0 +1,14 @@
+<?php
+
+ /**
+ * Template für die Anzeige der Produktvariablen in den HTML Mails
+ */
+
+?>
+<?php foreach ($this->view['wpsg_mod_productvars']['data'] as $pv) { ?>
+ <tr class="productrow productrow2 <?php echo ((($this->view['i'] % 2) == 0)?'productrow_odd':'productrow_even'); ?>">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_pos">&nbsp;</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name"><?php echo wpsg_hspc($pv['name']); ?>:</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_productvars_value" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>"><?php echo wpsg_hspc($pv['value']); ?></td>
+ </tr>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_productvars/order_view_row.phtml b/views/mods/mod_productvars/order_view_row.phtml
new file mode 100644
index 0000000..d3b9809
--- /dev/null
+++ b/views/mods/mod_productvars/order_view_row.phtml
@@ -0,0 +1,65 @@
+<?php
+
+ /**
+ * Template für die Darstellung der Produktvariablen in der Bestellansicht
+ */
+
+ $product_index = $this->view['wpsg_mod_productvars']['p']['product_index'];
+
+?>
+<?php foreach ((array)$this->view['wpsg_mod_productvars']['data'] as $k => $pv) { ?>
+<tr class="wpsg_<?php echo (($this->view['wpsg_mod_productvars']['i'] == 0)?'odd':'even'); ?> wpsg_productvars">
+ <td class="wpsg_cell_name"><?php echo __($pv['name'], 'wpsg'); ?></td>
+ <td align="right" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
+
+ <div class="wpsg_editable" id="wpsg_productvar_<?php echo $k.'_'.$product_index; ?>"><?php echo wpsg_hspc($pv['value']); ?></div>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ <?php if ($pv['typ'] == 2) { /* Textfeld */ ?>
+ jQuery('#wpsg_productvar_<?php echo $k.'_'.$product_index; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_productvars&do=inlinedit&noheader=1', {
+ submitdata: {
+ order_id: <?php echo $_REQUEST['edit_id']; ?>,
+ pv_id: '<?php echo $k; ?>',
+ p_id: '<?php echo $this->view['wpsg_mod_productvars']['p']['product_index']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+ <?php } else if ($pv['typ'] == 1) { /* Auswahl */ ?>
+ jQuery('#wpsg_productvar_<?php echo $k.'_'.$product_index; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_productvars&do=inlinedit&noheader=1', {
+ submitdata: {
+ order_id: <?php echo $_REQUEST['edit_id']; ?>,
+ pv_id: '<?php echo $k; ?>',
+ p_id: '<?php echo $this->view['wpsg_mod_productvars']['p']['product_index']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ data : '<?php echo json_encode(wpsg_array_merge((array)$pv['auswahl'], array('not_set' => __('Keine Angabe', 'wpsg')))); ?>',
+ type : 'select',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+ <?php } else if ($pv['typ'] == 3) { /* Checkbox */ ?>
+ jQuery('#wpsg_productvar_<?php echo $k.'_'.$product_index; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_productvars&do=inlinedit&noheader=1', {
+ submitdata: {
+ order_id: <?php echo $_REQUEST['edit_id']; ?>,
+ pv_id: '<?php echo $k; ?>',
+ p_id: '<?php echo $this->view['wpsg_mod_productvars']['p']['product_index']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ data : '<?php echo json_encode(array('1' => __('Ja', 'wpsg'), '0' => __('Nein', 'wpsg'))); ?>',
+ type : 'select',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+ <?php } ?>
+
+ /* ]]> */</script>
+
+ </td>
+</tr>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_productvars/overview_row.phtml b/views/mods/mod_productvars/overview_row.phtml
new file mode 100644
index 0000000..b3cd82a
--- /dev/null
+++ b/views/mods/mod_productvars/overview_row.phtml
@@ -0,0 +1,31 @@
+<?php
+
+ /**
+ * Template für eine Produktzeile bei der Bestellzusammenfassung
+ */
+
+?>
+<?php if (is_array($this->view['wpsg_mod_productvars']['data']) && sizeof($this->view['wpsg_mod_productvars']['data']) > 0) { ?>
+<?php foreach ($this->view['wpsg_mod_productvars']['data'] as $pv) { ?>
+<tr class="wpsg_<?php echo (($this->view['wpsg_mod_productvars']['i'] == 0)?'odd':'even'); ?>">
+ <td><?php echo __($pv['name'], 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_gesamtpreis" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'2':'1'); ?>">
+ <?php if ($pv['typ'] == '1') { // Auswahl ?>
+ <?php if ($this->view['wpsg_mod_productvars']['p']['wpsg_mod_productvars'][$pv['id']] == 'not_set') { ?>
+ <?php echo __('Nicht angegeben', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo wpsg_hspc($this->view['wpsg_mod_productvars']['p']['wpsg_mod_productvars'][$pv['id']]); ?>
+ <?php } ?>
+ <?php } else if ($pv['typ'] == '2') { // Textfeld ?>
+ <?php echo wpsg_hspc($this->view['wpsg_mod_productvars']['p']['wpsg_mod_productvars'][$pv['id']]); ?>
+ <?php } else if ($pv['typ'] == '3') { // Checkbox ?>
+ <?php if ($this->view['wpsg_mod_productvars']['p']['wpsg_mod_productvars'][$pv['id']] == '1') { ?>
+ <?php echo __('Ja', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo __('Nein', 'wpsg'); ?>
+ <?php } ?>
+ <?php } ?>
+ </td>
+</tr>
+<?php } ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_productvars/produkt_edit_sidebar.phtml b/views/mods/mod_productvars/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..5e91c7d
--- /dev/null
+++ b/views/mods/mod_productvars/produkt_edit_sidebar.phtml
@@ -0,0 +1,24 @@
+<?php
+
+ /*
+ * Aktivierung der Produktvariablen in der Produktvarwaltung
+ */
+
+?>
+<div id="wpsg_productvars" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Produktvariablen', 'wpsg'); ?> </span>
+ </h3>
+ <div class="inside">
+ <?php if (is_array($this->view['wpsg_mod_productvars']['data']) && sizeof($this->view['wpsg_mod_productvars']['data']) > 0) { ?>
+ <?php foreach ($this->view['wpsg_mod_productvars']['data'] as $pv) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_pv['.$pv['id'].']', __($pv['name'], 'wpsg'), ((in_array($pv['id'], (array)$this->view['wpsg_mod_productvars']['productvars_set']))?true:false)); ?>
+ <?php } ?>
+ <?php } else { ?>
+ <?php echo __('Bisher keine Produktvariablen angelegt.', 'wpsg'); ?>
+ <?php } ?>
+ <br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module&amp;modul=wpsg_mod_productvars"><?php echo __('Zur Produktvariablenverwaltung', 'wpsg'); ?></a>
+ </div>
+</div>
diff --git a/views/mods/mod_productvars/pv_list.phtml b/views/mods/mod_productvars/pv_list.phtml
new file mode 100644
index 0000000..e046beb
--- /dev/null
+++ b/views/mods/mod_productvars/pv_list.phtml
@@ -0,0 +1,137 @@
+<?php
+
+ /**
+ * Template für die Liste der Produktvariablen
+ */
+
+?>
+<?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
+<table class="wpsg_pv_table">
+ <tr>
+ <th class="wpsg_id"><?php echo __('ID', 'wpsg'); ?></th>
+ <th class="wpsg_label"><?php echo __('Name', 'wpsg'); ?></th>
+ <th class="wpsg_typ"><?php echo __('Typ', 'wpsg'); ?></th>
+ <th class="wpsg_pflicht"><?php echo __('Pflicht', 'wpsg'); ?></th>
+ <th class="wpsg_delcol"></th>
+ </tr>
+ <?php $i = 0; foreach ($this->view['data'] as $pv) { $i ++; ?>
+ <tr class="wpsg_table wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>" id="pv_<?php echo $pv['id']; ?>">
+ <td class="wpsg_id"><?php echo $pv['id']; ?></td>
+ <td class="wpsg_label">
+ <span id="wpsg_pv_name_<?php echo $pv['id']; ?>" class="wpsg_editable"><?php echo wpsg_hspc(__($pv['name'], 'wpsg')); ?></span>
+ <div id="wpsg_pv_auswahlrow_<?php echo $pv['id']; ?>" style="<?php echo (($pv['typ'] != '1')?'display:none;':''); ?>">
+ <?php echo __('Auswahl', 'wpsg'); ?>:
+ <span class="wpsg_editable" id="wpsg_pv_auswahl_<?php echo $pv['id']; ?>"><?php echo wpsg_hspc($pv['auswahl']); ?></span>
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#wpsg_pv_auswahl_<?php echo $pv['id']; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvars&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'auswahl',
+ pv_id: '<?php echo $pv['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ /* ]]> */</script>
+ </div>
+ </td>
+ <td id="wpsg_pv_typ_<?php echo $pv['id']; ?>" class="wpsg_typ wpsg_editable"><?php echo $this->mod->arTypen[$pv['typ']]; ?></td>
+ <td class="wpsg_pflicht"><input type="checkbox" <?php echo (($pv['pflicht'] == '1')?'checked="checked"':''); ?> id="wpsg_pv_pflicht_<?php echo $pv['id']; ?>" /></td>
+ <td class="wpsg_delcol">
+
+ <a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Produktvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removePV(<?php echo $pv['id']; ?>);"></a>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#wpsg_pv_name_<?php echo $pv['id']; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvars&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ pv_id: '<?php echo $pv['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#wpsg_pv_pflicht_<?php echo $pv['id']; ?>').bind('change', function() {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvars&noheader=1&do=inlinedit',
+ data: {
+ field: 'pflicht',
+ pv_id: '<?php echo $pv['id']; ?>',
+ value: ((jQuery(this).attr("checked") == "checked")?'1':'0')
+ }
+ } );
+
+ } );
+
+ jQuery('#wpsg_pv_typ_<?php echo $pv['id']; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvars&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'typ',
+ pv_id: '<?php echo $pv['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ data: '<?php echo json_encode($this->mod->arTypen); ?>',
+ type: 'select',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ callback: function(el) {
+ if (el == '<?php echo __('Auswahl', 'wpsg'); ?>')
+ {
+ jQuery('#wpsg_pv_auswahlrow_<?php echo $pv['id']; ?>').show();
+ }
+ else
+ {
+ jQuery('#wpsg_pv_auswahlrow_<?php echo $pv['id']; ?>').hide();
+ }
+ }
+ });
+
+ /* ]]> */</script>
+
+ </td>
+ </tr>
+ <?php } ?>
+</table>
+<p class="wpsg_hinweis"><?php echo __('Die Reihenfolge lässt sich mittels Drag&Drop verändern.', 'wpsg'); ?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_pv_table').sortable( {
+ helper: wpsg_Tablefix,
+ items: 'tr.wpsg_tablerow',
+ handler: '.wpsg_id',
+ update: function(event, ui) {
+
+ var wpsg_reorder = jQuery(this).sortable('serialize');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvars&noheader=1&do=reorder',
+ data: {
+ wpsg_reorder: wpsg_reorder
+ },
+ success: function(data) {
+
+ if (data !== "1") alert(data);
+
+ }
+ } );
+
+ }
+ } );
+
+ } );
+
+/* ]]> */</script>
+
+<?php } else { ?>
+<?php echo __('Bisher noch keine Produktvariablen angelegt.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_productvars/renderTemplate.phtml b/views/mods/mod_productvars/renderTemplate.phtml
new file mode 100644
index 0000000..fb66a18
--- /dev/null
+++ b/views/mods/mod_productvars/renderTemplate.phtml
@@ -0,0 +1,32 @@
+<?php
+
+ /**
+ * Template für die Integration der Produktvariablen in das Template
+ */
+
+?>
+
+<div class="wpsg_mod_productvars">
+ <?php foreach ($this->view['wpsg_mod_productvars']['data'] as $pv) { ?>
+ <div class="wpsg_mod_productvars_row">
+ <div class="wpsg_mod_productvars_label">
+ <?php echo __($pv['name'], 'wpsg'); ?> <?php if ($pv['pflicht'] == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </div>
+ <div class="wpsg_mod_productvars_input">
+ <?php if ($pv['typ'] == '1') { // Auswahlfeld ?>
+ <select name="wpsg_mod_productvars[<?php echo $pv['id']; ?>]">
+ <option value="not_set"><?php echo __('Bitte wählen', 'wpsg'); ?></option>
+ <?php foreach ((array)$pv['auswahl'] as $option) { ?>
+ <option <?php echo ((wpsg_isSizedString($pv['value'], wpsg_hspc($option)))?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($option); ?>"><?php echo wpsg_hspc($option); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($pv['typ'] == '2') { // Textfeld ?>
+ <input type="text" name="wpsg_mod_productvars[<?php echo $pv['id']; ?>]" value="<?php echo wpsg_hspc(wpsg_getStr($pv['value'])); ?>" />
+ <?php } else if ($pv['typ'] == '3') { // Checkbox ?>
+ <input type="hidden" value="0" name="wpsg_mod_productvars[<?php echo $pv['id']; ?>]" />
+ <input <?php echo ((wpsg_isSizedString($pv['value'], '1'))?'checked="checked"':''); ?> type="checkbox" value="1" name="wpsg_mod_productvars[<?php echo $pv['id']; ?>]" />
+ <?php } ?>
+ </div>
+ </div>
+ <?php } ?>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_productvars/settings_edit.phtml b/views/mods/mod_productvars/settings_edit.phtml
new file mode 100644
index 0000000..c8c161d
--- /dev/null
+++ b/views/mods/mod_productvars/settings_edit.phtml
@@ -0,0 +1,61 @@
+<?php
+
+ /**
+ * Template für die Einstellungen der Produktvariablen
+ */
+
+?>
+<script type="text/javascript">
+
+ function wpsg_addPV()
+ {
+
+ jQuery('#wpsg_pv_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvars&noheader=1&do=add',
+ success: function(data) {
+ jQuery('#wpsg_pv_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addPV()
+
+ function wpsg_removePV(pv_id)
+ {
+
+ jQuery('#wpsg_pv_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvars&noheader=1&do=del',
+ data: {
+ pv_id: pv_id
+ },
+ success: function(data) {
+ jQuery('#wpsg_pv_list').html(data);
+ }
+ } );
+
+ return false;
+
+ }
+
+</script>
+
+<div class="wpsg_admin_box">
+
+ <div class="head">
+ <div class="title">
+ <div class="fulltab">
+ <?php echo __('Produktvariablen', 'wpsg'); ?>
+ <a title="<?php echo __('Neue Produktvariable anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addPV();"></a>
+ </div>
+ </div>
+ </div>
+ <div class="content" id="wpsg_pv_list">
+ <?php echo $this->mod->pv_list(); ?>
+ </div>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_produktartikel/header_facebook.phtml b/views/mods/mod_produktartikel/header_facebook.phtml
new file mode 100644
index 0000000..670923d
--- /dev/null
+++ b/views/mods/mod_produktartikel/header_facebook.phtml
@@ -0,0 +1,22 @@
+<?php
+
+ /**
+ * Template für die Facebook META Integration auf einer Produktseite
+ */
+
+?>
+
+<meta property="og:title" content="<?php echo $this->view['data']['name']; ?>" />
+<meta property="og:type" content="product" />
+<?php if ($this->hasMod('wpsg_mod_produktbilder') && isset($this->view['data']['bilder'][0])) { ?>
+<meta property="og:image" content="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array(
+ $this->view['data']['id'],
+ $this->view['data']['bilder'][0],
+ 100,
+ 100,
+ 's'
+)); ?>" />
+<?php } ?>
+<meta property="og:url" content="<?php echo $this->view['data']['url']; ?>" />
+<meta property="og:description" content="<?php echo $this->view['data']['beschreibung']; ?>" />
+ \ No newline at end of file
diff --git a/views/mods/mod_produktartikel/header_google.phtml b/views/mods/mod_produktartikel/header_google.phtml
new file mode 100644
index 0000000..c49420c
--- /dev/null
+++ b/views/mods/mod_produktartikel/header_google.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template für die Header Daten bei Google+ Einbindung
+ */
+
+?>
+
+<meta itemprop="name" content="<?php echo $this->view['data']['name']; ?>" />
+<meta itemprop="description" content="<?php echo $this->view['data']['beschreibung']; ?>" />
+<meta itemprop="url" content="<?php echo $this->view['data']['url']; ?>" />
+<meta itemprop="image" content="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array(
+ $this->view['data']['id'],
+ $this->view['data']['bilder'][0],
+ 100,
+ 100,
+ 's'
+)); ?>" />
+ \ No newline at end of file
diff --git a/views/mods/mod_produktartikel/produkt.phtml b/views/mods/mod_produktartikel/produkt.phtml
new file mode 100644
index 0000000..72548a2
--- /dev/null
+++ b/views/mods/mod_produktartikel/produkt.phtml
@@ -0,0 +1,41 @@
+<?php
+
+ /**
+ * Dieses Template wird in das Produkttemplate eingebunden und hat die Funktion die Social Media Links zu integrieren
+ */
+
+?>
+<?php if ($this->get_option('wpsg_mod_produktartikel_twitter') == '1' || $this->get_option('wpsg_mod_produktartikel_google') == '1' || $this->get_option('wpsg_mod_produktartikel_facebook') == '1') { ?>
+<div class="socialshareprivacy" id="socialshareprivacy_<?php echo $this->getTemplateIndex(); ?>"></div>
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ if (jQuery('#socialshareprivacy_<?php echo $this->getTemplateIndex(); ?>').length > 0)
+ {
+
+ jQuery('#socialshareprivacy_<?php echo $this->getTemplateIndex(); ?>').socialSharePrivacy( {
+ 'services': {
+ 'facebook': {
+ 'status': '<?php echo (($this->get_option('wpsg_mod_produktartikel_facebook') == '1')?'on':'off'); ?>',
+ 'dummy_img': '<?php echo WPSG_URL_CONTENT.'plugins/wpshopgermany/lib/socialshareprivacy/socialshareprivacy/images/dummy_facebook.png'; ?>'
+ },
+ 'twitter': {
+ 'status': '<?php echo (($this->get_option('wpsg_mod_produktartikel_twitter') == '1')?'on':'off'); ?>',
+ 'dummy_img': '<?php echo WPSG_URL_CONTENT.'plugins/wpshopgermany/lib/socialshareprivacy/socialshareprivacy/images/dummy_twitter.png'; ?>'
+ },
+ 'gplus': {
+ 'status': '<?php echo (($this->get_option('wpsg_mod_produktartikel_google') == '1')?'on':'off'); ?>',
+ 'dummy_img': '<?php echo WPSG_URL_CONTENT.'plugins/wpshopgermany/lib/socialshareprivacy/socialshareprivacy/images/dummy_gplus.png'; ?>'
+ }
+ },
+ 'uri': '<?php echo $this->view['data']['url']; ?>',
+ css_path: '<?php echo WPSG_URL_CONTENT; ?>plugins/wpshopgermany/lib/socialshareprivacy/socialshareprivacy/socialshareprivacy.css'
+ } );
+
+ }
+
+ } );
+
+ </script>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_produktartikel/produkt_edit_allgemein.phtml b/views/mods/mod_produktartikel/produkt_edit_allgemein.phtml
new file mode 100644
index 0000000..5de94cf
--- /dev/null
+++ b/views/mods/mod_produktartikel/produkt_edit_allgemein.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template für die Inhalte die beim Bearbeiten eines Produktes in die Allgemein-Box eingefügt werden
+ * sollte in der Regel nicht angepasst werden
+ */
+
+?>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_produktartikel_path"><?php echo __('URL Path Segment', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input id="wpsg_produktartikel_path" type="text"
+ name="wpsg_mod_produktartikel[path]"
+ value="<?php echo $this->view['data']['post_name']; ?>" />
+ </div>
+ <div class="wpsg_clear"></div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_produktartikel/produkt_edit_sidebar.phtml b/views/mods/mod_produktartikel/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..a2cd9e0
--- /dev/null
+++ b/views/mods/mod_produktartikel/produkt_edit_sidebar.phtml
@@ -0,0 +1,44 @@
+<?php
+
+/**
+ * Dieses Template wird in der Produktverwaltung in der rechten Spalte verwendet
+ */
+
+?>
+<div id="wpsg_produktartikel" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Produktartikel', 'wpsg'); ?> </span>
+ </h3>
+ <div class="inside">
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_produktartikel_kommentare"><?php echo __('Kommentare', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input id="wpsg_produktartikel_kommentare" type="checkbox"
+ class="checkbox" name="wpsg_mod_produktartikel[kommentare]"
+ value="1"
+ <?php echo (($this->view['data']['comment_status'] == 'open')?'checked="checked"':''); ?> />
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php echo wpsg_drawForm_Input('wpsg_produktartikel_menuorder', __('Position', 'wpsg'), $this->view['data']['menu_order']); ?>
+ </div>
+</div>
+
+<div id="categorydiv" class="postbox">
+ <div class="handlediv" title="<?php echo __('Zum Umschalten klicken', 'wpsg'); ?>"><br /></div>
+ <h3 class="hndle"><?php echo __('Kategorieauswahl', 'wpsg'); ?></h3>
+ <div class="inside">
+ <div id="taxonomy-category" class="categorydiv">
+
+ <div id="category-all" class="tabs-panel">
+ <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
+ <?php wp_terms_checklist($this->view['data']['post_id'], array('taxonomy' => 'category')); ?>
+ </ul>
+ </div>
+
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_produktartikel/schemaorg.phtml b/views/mods/mod_produktartikel/schemaorg.phtml
new file mode 100644
index 0000000..20cfd1e
--- /dev/null
+++ b/views/mods/mod_produktartikel/schemaorg.phtml
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Template für die Daten für Schema.org
+ * sollten normalerweise nicht angezeigt werden. Alternativ kann das Microformat auch direkt im Produkttemplate eingebaut werden.
+ */
+
+?>
+<div itemscope itemtype="http://schema.org/Product" style="display:none;">
+ <span itemprop="name"><?php echo wpsg_hspc($this->view['data']['name']); ?></span>
+ <img itemprop="image" src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array(
+ $this->view['data']['id'],
+ $this->view['data']['bilder'][0],
+ 100,
+ 100,
+ 's'
+ )); ?>" />
+ <a itemprop="url" href="<?php echo $this->view['data']['url']; ?>"><?php echo $this->view['data']['name']; ?></a>
+ <div itemprop="description"><?php echo $this->view['data']['beschreibung']; ?></div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_produktartikel/settings_edit.phtml b/views/mods/mod_produktartikel/settings_edit.phtml
new file mode 100644
index 0000000..9c59f78
--- /dev/null
+++ b/views/mods/mod_produktartikel/settings_edit.phtml
@@ -0,0 +1,99 @@
+<?php
+
+ /**
+ * Template für die Einstellungsseite des Produktartikel Moduls
+ */
+
+?>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left"><?php echo __('Path Key', 'wpsg'); ?>:</div>
+ <div class="wpsg_form_right">
+ <input type="text" name="wpsg_mod_produktartikel_pathkey" value="<?php echo $this->get_option('wpsg_mod_produktartikel_pathkey'); ?>" />
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_produktartikel_pathkey" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_produktartikel_pathkey" class="wpsg_form_help"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showui', __('Custom Post Type in Wordpress Menü sichtbar', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showui'), array('help' => 'wpsg_mod_produktartikel_showui'))?>
+
+<?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_postthumbnail', __('Produktbild als Beitragsbild übergeben', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_postthumbnail'), array('help' => 'wpsg_mod_produktartikel_postthumbnail')); ?>
+<?php } ?>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showHome', __('Direkt auf Startseitenansicht anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showHome'), array('help' => 'wpsg_mod_produktartikel_showHome')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showCategory', __('Direkt in den Kategorieansichten anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showCategory'), array('help' => 'wpsg_mod_produktartikel_showCategory')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showSearch', __('Direkt in den Suchergebnissen anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showSearch'), array('help' => 'wpsg_mod_produktartikel_showSearch')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showFeed', __('Direkt in den Feeds anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showFeed'), array('help' => 'wpsg_mod_produktartikel_showFeed')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_onlyMainQuery', __('Nur Main Query berücksichtigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_onlyMainQuery'), array('help' => 'wpsg_mod_produktartikel_onlyMainQuery')); ?>
+
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_produktartikel_hometemplate"><?php echo __('Produkttemplate für Ansicht auf Startseite', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <?php if (!is_array($this->view['arTemplates']) || sizeof($this->view['arTemplates']) <= 0) { ?>
+ <p class="wpsg_error"><?php echo __('Keine Templatedatein gefunden!', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <select name="wpsg_mod_produktartikel_hometemplate" id="wpsg_mod_produktartikel_hometemplate">
+ <option value="-1"><?php echo __('Wie Produkttemplate', 'wpsg'); ?></option>
+ <?php foreach ($this->view['arTemplates'] as $t) { ?>
+ <option <?php echo (($t == $this->get_option('wpsg_mod_produktartikel_hometemplate'))?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($t); ?>"><?php echo wpsg_hspc($t); ?></option>
+ <?php } ?>
+ </select>
+ <?php } ?>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_produktartikel_hometemplate" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_produktartikel_hometemplate"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_produktartikel_listtemplate"><?php echo __('Produkttemplate für List Ansicht', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <?php if (!is_array($this->view['arTemplates']) || sizeof($this->view['arTemplates']) <= 0) { ?>
+ <p class="wpsg_error"><?php echo __('Keine Templatedatein gefunden!', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <select name="wpsg_mod_produktartikel_listtemplate" id="wpsg_mod_produktartikel_listtemplate">
+ <option value="-1"><?php echo __('Wie Produkttemplate', 'wpsg'); ?></option>
+ <?php foreach ($this->view['arTemplates'] as $t) { ?>
+ <option <?php echo (($t == $this->get_option('wpsg_mod_produktartikel_listtemplate'))?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($t); ?>"><?php echo wpsg_hspc($t); ?></option>
+ <?php } ?>
+ </select>
+ <?php } ?>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_produktartikel_listtemplate" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_produktartikel_listtemplate"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_produktartikel_searchtemplate"><?php echo __('Produkttemplate für Such Ansicht', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <?php if (!is_array($this->view['arTemplates']) || sizeof($this->view['arTemplates']) <= 0) { ?>
+ <p class="wpsg_error"><?php echo __('Keine Templatedatein gefunden!', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <select name="wpsg_mod_produktartikel_searchtemplate" id="wpsg_mod_produktartikel_searchtemplate">
+ <option value="-1"><?php echo __('Wie Produkttemplate', 'wpsg'); ?></option>
+ <?php foreach ($this->view['arTemplates'] as $t) { ?>
+ <option <?php echo (($t == $this->get_option('wpsg_mod_produktartikel_searchtemplate'))?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($t); ?>"><?php echo wpsg_hspc($t); ?></option>
+ <?php } ?>
+ </select>
+ <?php } ?>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_produktartikel_searchtemplate" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_produktartikel_searchtemplate"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_facebook', __('Facebook Integration', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_facebook'), array('help' => 'wpsg_mod_produktartikel_facebook')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_google', __('Google+ Integration', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_google'), array('help' => 'wpsg_mod_produktartikel_google')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_twitter', __('Twitter Integration', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_twitter'), array('help' => 'wpsg_mod_produktartikel_twitter')); ?>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_produktattribute/basket_row.phtml b/views/mods/mod_produktattribute/basket_row.phtml
new file mode 100644
index 0000000..b53c5fa
--- /dev/null
+++ b/views/mods/mod_produktattribute/basket_row.phtml
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * Template für die Anzeige der Produktattribute im Warenkorb
+*/
+//wpsg_debug($this->view);
+?>
+
+<?php foreach ((array)$this->view['wpsg_mod_produktattribute']['data'] as $pa_id) { ?>
+
+<tr class="wpsg_<?php echo (($this->view['i'] % 2 == 0)?'odd':'even'); ?>">
+ <td colspan="1"><?php echo __('Attribut', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_produktattribute_value" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'3':'2'); ?>">
+ <?php echo $this->callMod('wpsg_mod_produktattribute', 'getAttributeValue', array($this->view['wpsg_mod_produktattribute']['id'], $pa_id)); ?>
+ </td>
+</tr>
+<?php }?>
diff --git a/views/mods/mod_produktattribute/genPACode.phtml b/views/mods/mod_produktattribute/genPACode.phtml
new file mode 100644
index 0000000..4189e1b
--- /dev/null
+++ b/views/mods/mod_produktattribute/genPACode.phtml
@@ -0,0 +1,17 @@
+<?php
+
+ /**
+ * Template für die Hilfe bei den Produktattributen
+ * Sollte nicht angepasst werden
+ */
+
+?>
+<?php echo wpsg_translate(__('Code für den Namen des Produktattributes mit der ID #1#', 'wpsg'), $this->view['id']); ?>
+<div class="wpsg_code">
+ <?php echo wpsg_hspc('<?php echo $this->callMod(\'wpsg_mod_produktattribute\', \'getAttributeLabel\', array('.$this->view['id'].')); ?>'); ?>
+</div>
+<?php echo wpsg_translate(__('Code für den Wert des Produktattributes mit der ID #1#', 'wpsg'), $this->view['id']); ?>
+<div class="wpsg_code">
+ <?php echo wpsg_hspc('<?php echo $this->callMod(\'wpsg_mod_produktattribute\', \'getAttributeValue\', array($this->view[\'data\'][\'id\'], '.$this->view['id'].')); ?>'); ?>
+</div>
+<?php echo __('Diese Code Schipsel können in die Produkttemplates oder in die Mailtemplates eingebaut werden.', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_produktattribute/list.phtml b/views/mods/mod_produktattribute/list.phtml
new file mode 100644
index 0000000..cb766e2
--- /dev/null
+++ b/views/mods/mod_produktattribute/list.phtml
@@ -0,0 +1,128 @@
+<?php
+
+ /**
+ * Template für die Liste der Produktattribute im Backend
+ */
+
+?>
+<?php if (sizeof($this->view['data']) <= 0) { ?>
+<p><?php echo __('Keine Produktattribute hinterlegt.', 'wpsg'); ?></p>
+<?php } else { ?>
+<table class="wpsg_mod_produktattribute_table">
+ <tr>
+ <th class="col_id"><?php echo __('ID', 'wpsg'); ?></th>
+ <th class="col_name" colspan="2"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
+ <th class="col_html"></th>
+ <th class="col_show"><a href="#" onclick="return false;" class="wpsg_icon wpsg_icon_lupe" title="<?php echo __('Werte direkt in jedem Template anzeigen wenn gesetzt.', 'wpsg'); ?>"></a></th>
+ <th class="col_typ"><?php echo __('Typ', 'wpsg'); ?></th>
+ <th class="col_action"></th>
+ </tr>
+ <?php foreach ($this->view['data'] as $pa) { ?>
+ <tr>
+ <td class="col_id"><?php echo $pa['id']; ?></td>
+ <td colspan="2" id="pa_<?php echo $pa['id']; ?>_name" class="col_name wpsg_editable"><?php echo wpsg_hspc($pa['name']); ?></td>
+ <td class="col_html">
+ <a class="wpsg_icon wpsg_icon_html wpsg_icon_center" href="#" title="<?php echo __('HTML Code generieren', 'wpsg'); ?>" onclick="return wpsg_genPACode(<?php echo $pa['id']; ?>);"></a>
+ </td>
+ <td class="col_show">
+ <input title="<?php echo __('Werte direkt in jedem Template anzeigen wenn gesetzt.', 'wpsg'); ?>" id="show_<?php echo $pa['id']; ?>" <?php echo (($pa['autoshow'] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" />
+ </td>
+ <td class="col_typ">
+ <select id="typ_<?php echo $pa['id']; ?>" name="pa[<?php echo $pa['id']; ?>][typ]" onchange="wpsg_mod_produktattribute_changeTyp(<?php echo $pa['id']; ?>);">
+ <option <?php echo (($pa['typ'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Textfeld', 'wpsg'); ?></option>
+ <option <?php echo (($pa['typ'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Textfeld (RTE)', 'wpsg'); ?></option>
+ <option <?php echo (($pa['typ'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Auswahlfeld', 'wpsg'); ?></option>
+ <option <?php echo (($pa['typ'] == '3')?'selected="selected"':''); ?> value="3"><?php echo __('Checkbox', 'wpsg'); ?></option>
+ </select>
+ </td>
+ <td class="col_action">
+
+ <a id="del_<?php echo $pa['id']; ?>" class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Produktvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removePV(<?php echo $pv['id']; ?>);"></a>
+
+ <script type="text/javascript">
+
+ jQuery('#del_<?php echo $pa['id']; ?>').bind('click', function() {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie dieses Produktattribute löschen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_pa_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=module&modul=wpsg_mod_produktattribute&do=inlinedit&noheader=1',
+ data: {
+ field: 'delete',
+ pa_id: '<?php echo $pa['id']; ?>'
+ },
+ success: function(data) {
+ jQuery('#wpsg_pa_list').html(data);
+ }
+ } );
+
+ } );
+
+ jQuery('#show_<?php echo $pa['id']; ?>').bind('change', function() {
+
+ if (jQuery(this).attr("checked")) value = 1; else value = 0;
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=module&modul=wpsg_mod_produktattribute&do=inlinedit&noheader=1',
+ data: {
+ field: 'show',
+ value: value,
+ pa_id: '<?php echo $pa['id']; ?>'
+ },
+ success: function(data) {
+ if (data != "1") alert(data);
+ }
+ } );
+
+ } );
+
+ jQuery('#pa_<?php echo $pa['id']; ?>_name').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=module&modul=wpsg_mod_produktattribute&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ pa_id: '<?php echo $pa['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ </script>
+
+ </td>
+ </tr>
+ <tr class="auswahlrow auswahlrow_<?php echo $pa['id']; ?>">
+ <td></td>
+ <td>
+ <label>
+ <?php echo __('Auswahl (| als Trenner)', 'wpsg'); ?>:
+ </label>
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('#pa_<?php echo $pa['id']; ?>_auswahl').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=module&modul=wpsg_mod_produktattribute&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'auswahl',
+ pa_id: '<?php echo $pa['id']; ?>'
+ },
+ data: '<?php echo $pa['auswahl']; ?>',
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ wpsg_mod_produktattribute_changeTyp(<?php echo $pa['id']; ?>);
+
+ } );
+
+ </script>
+ </td>
+ <td colspan="4" class="wpsg_editable" id="pa_<?php echo $pa['id']; ?>_auswahl"><?php echo wpsg_hspc(((trim($pa['auswahl']) == '')?__('Bitte anklicken um Auswahl kommagetrennt zu definieren', 'wpsg'):$pa['auswahl'])); ?></td>
+ </tr>
+ <?php } ?>
+</table>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_produktattribute/mail_row.phtml b/views/mods/mod_produktattribute/mail_row.phtml
new file mode 100644
index 0000000..aabf72e
--- /dev/null
+++ b/views/mods/mod_produktattribute/mail_row.phtml
@@ -0,0 +1,10 @@
+<?php
+
+ /**
+ * Template für die Anzeige der Produktattribute in der Mail, die bei einer neuen Bestellung an den Kunde geht (Text Mail)
+ */
+
+?><?php foreach ((array)$this->view['wpsg_mod_produktattribute']['data'] as $pa_id) { ?>
+<?php echo wpsg_pad_right(' ', 5); ?><?php echo $this->callMod('wpsg_mod_produktattribute', 'getAttributeLabel', array($pa_id)); ?>: <?php echo $this->callMod('wpsg_mod_produktattribute', 'getAttributeValue', array($this->view['wpsg_mod_produktattribute']['id'], $pa_id)); ?>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_produktattribute/mail_row_html.phtml b/views/mods/mod_produktattribute/mail_row_html.phtml
new file mode 100644
index 0000000..7f4dc15
--- /dev/null
+++ b/views/mods/mod_produktattribute/mail_row_html.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Template für die Anzeige der Produktattribute in der Mail, die bei einer neuen Bestellung an den Kunde geht (HTML Mail)
+ */
+
+?>
+
+<?php foreach ((array)$this->view['wpsg_mod_produktattribute']['data'] as $pa_id) { ?>
+<tr class="wpsg_<?php echo (($this->view['i'] % 2 == 0)?'odd':'even'); ?>">
+ <td colspan="1">
+ <?php echo $this->callMod('wpsg_mod_produktattribute', 'getAttributeLabel', array($pa_id)); ?>:
+ </td>
+ <td class="wpsg_cell_produktattribute_value" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'3':'2'); ?>">
+ <?php echo $this->callMod('wpsg_mod_produktattribute', 'getAttributeValue', array($this->view['wpsg_mod_produktattribute']['id'], $pa_id)); ?>
+ </td>
+</tr>
+<?php }?> \ No newline at end of file
diff --git a/views/mods/mod_produktattribute/overview_row.phtml b/views/mods/mod_produktattribute/overview_row.phtml
new file mode 100644
index 0000000..2059efb
--- /dev/null
+++ b/views/mods/mod_produktattribute/overview_row.phtml
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * Template für die Anzeige der Produktattribute in der Bestellzusammenfassung
+*/
+//wpsg_debug($this->view);
+?>
+
+<?php foreach ((array)$this->view['wpsg_mod_produktattribute']['data'] as $pa_id) { ?>
+
+<tr class="wpsg_<?php echo (($this->view['i'] % 2 == 0)?'odd':'even'); ?>">
+ <td colspan="1"><?php echo __('Attribut', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_produktattribute_value" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'2':'1'); ?>">
+ <?php echo $this->callMod('wpsg_mod_produktattribute', 'getAttributeValue', array($this->view['wpsg_mod_produktattribute']['id'], $pa_id)); ?>
+ </td>
+</tr>
+<?php }?> \ No newline at end of file
diff --git a/views/mods/mod_produktattribute/produkt_bottom.phtml b/views/mods/mod_produktattribute/produkt_bottom.phtml
new file mode 100644
index 0000000..e9f0fe0
--- /dev/null
+++ b/views/mods/mod_produktattribute/produkt_bottom.phtml
@@ -0,0 +1,22 @@
+<?php
+
+ /**
+ * Template um die Produktvariablen im unteren Bereich des Produkttemplates zu integrieren
+ */
+
+?>
+<?php foreach ((array)$this->view['wpsg_mod_produktattribute']['data'] as $a) { ?>
+<?php if (wpsg_isSizedString($a['value']) && $a['autoshow'] == '1') { ?>
+<div class="wpsg_mod_produktattribute_row">
+ <div class="wpsg_mod_produktattribute_label"><?php echo __($a['name'], 'wpsg'); ?>:</div>
+ <div class="wpsg_mod_produktattribute_value">
+ <?php if ($a['typ'] == 3) { // Checkbox ?>
+ <?php echo (($a['value'] == '1')?__('Ja', 'wpsg'):__('Nein', 'wpsg')); ?>
+ <?php } else { ?>
+ <?php echo $a['value']; ?>
+ <?php } ?>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+<?php } ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_produktattribute/produkt_edit_content.phtml b/views/mods/mod_produktattribute/produkt_edit_content.phtml
new file mode 100644
index 0000000..3d51b4c
--- /dev/null
+++ b/views/mods/mod_produktattribute/produkt_edit_content.phtml
@@ -0,0 +1,45 @@
+<?php
+
+ /**
+ * Template für die Eingabe der Produktattribute innerhalb der Produktverwaltung
+ */
+
+?>
+<?php if (sizeof($this->view['data']['pa']) > 0) { ?>
+<div class="postbox" id="wpsg_produktattribute">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Produktattribute', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+
+ <?php foreach ($this->view['data']['pa'] as $pa) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="produkt_pa_<?php echo $pa['id']; ?>"><?php echo __($pa['name'], 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <?php if ($pa['typ'] == '1') { /* RTE */ ?>
+
+ <?php wp_editor($pa['value'], 'pa_'.$pa['id'].''); ?>
+
+ <?php } else if ($pa['typ'] == '2') { /* Auswahl */ ?>
+ <select id="produkt_pa_<?php echo $pa['id']; ?>" name="pa_<?php echo $pa['id']; ?>">
+ <?php foreach ((array)explode("|", $pa['auswahl']) as $option) { ?>
+ <option <?php echo (($pa['value'] == $option)?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($option); ?>"><?php echo wpsg_hspc($option); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($pa['typ'] == '3') { /* Checkbox */ ?>
+ <input type="hidden" value="0" name="pa_<?php echo $pa['id']; ?>" />
+ <input id="produkt_pa_<?php echo $pa['id']; ?>" class="checkbox" type="checkbox" value="1" name="pa_<?php echo $pa['id']; ?>" <?php echo (($pa['value'] == '1')?'checked="checked"':''); ?> />
+ <?php } else { /* Normales Eingabefeld */ ?>
+ <input id="produkt_pa_<?php echo $pa['id']; ?>" type="text" name="pa_<?php echo $pa['id']; ?>" value="<?php echo wpsg_hspc($pa['value']); ?>" />
+ <?php } ?>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php } ?>
+
+ </div>
+</div>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_produktattribute/settings_edit.phtml b/views/mods/mod_produktattribute/settings_edit.phtml
new file mode 100644
index 0000000..4fe3417
--- /dev/null
+++ b/views/mods/mod_produktattribute/settings_edit.phtml
@@ -0,0 +1,116 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Moduls "Produktattribute"
+ */
+
+
+
+?>
+<script type="text/javascript">
+
+ /**
+ * Wird beim wechsel des Typs von der Selectbox aufgerufen
+ */
+ function wpsg_mod_produktattribute_changeTyp(pa_id)
+ {
+
+ if (jQuery('#typ_' + pa_id).val() == '2')
+ {
+ jQuery('.auswahlrow_' + pa_id).show();
+ }
+ else
+ {
+ jQuery('.auswahlrow_' + pa_id).hide();
+ }
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=module&modul=wpsg_mod_produktattribute&do=inlinedit&noheader=1',
+ data: {
+ field: 'typ',
+ value: jQuery('#typ_' + pa_id).val(),
+ pa_id: pa_id
+ },
+ success: function(data) {
+ if (data != "1") alert(data);
+ }
+ } );
+
+ } // function wpsg_mod_produktattribute_changeTyp(pa_id)
+
+ /**
+ * Wird beim hinzufügen eines neuen Produktattributes aufgerufen
+ */
+ function wpsg_addPA()
+ {
+
+ jQuery('#wpsg_pa_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=module&modul=wpsg_mod_produktattribute&do=add&noheader=1',
+ success: function(data) {
+ jQuery('#wpsg_pa_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addPA()
+
+ /**
+ * Zeigt den HTML Code, der das gewählte Produktattribute im Produkttemplate einbindet
+ */
+ function wpsg_genPACode(pa_id)
+ {
+
+ jQuery("#wpsg_pa_code_dialog").dialog( {
+ 'dialogClass': 'wp-dialog',
+ 'modal': true,
+ 'width': 600,
+ 'height': 300,
+ 'title': '<?php echo __('HTML Code Block', 'wpsg'); ?>',
+ open: function(event, ui) {
+
+ jQuery('#wpsg_pa_code_dialog .wpsg_dialog').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: 'admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_produktattribute&do=genPACode&noheader=1',
+ data: {
+ 'pa_id': pa_id
+ },
+ success: function(data)
+ {
+ jQuery('#wpsg_pa_code_dialog .wpsg_dialog').html(data);
+ }
+ } );
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_genPACode(pa_id)
+
+</script>
+
+<div id="wpsg_pa_code_dialog" style="display:none;"><div class="wpsg_dialog"></div></div>
+
+<div class="wpsg_admin_content">
+ <div class="wpsg_admin_box">
+
+ <div class="head">
+ <div class="title">
+ <div class="fulltab">
+ <?php echo __('Produktattribute', 'wpsg'); ?>
+ <a title="<?php echo __('Neues Produktattribut anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addPA();"></a>
+ </div>
+ </div>
+ </div>
+ <div class="content" id="wpsg_pa_list">
+ <?php $this->mod->pa_listAction(); ?>
+ </div>
+
+ </div>
+</div>
+
+<div class="clear"></div> \ No newline at end of file
diff --git a/views/mods/mod_produktbilder/produkt_edit_content.phtml b/views/mods/mod_produktbilder/produkt_edit_content.phtml
new file mode 100644
index 0000000..20435b8
--- /dev/null
+++ b/views/mods/mod_produktbilder/produkt_edit_content.phtml
@@ -0,0 +1,123 @@
+<?php
+
+ /**
+ * Template für die Integration der Produktbilder in das Backend der Produktverwaltung
+ * wird von Template /views/Produkt/addedit.phtml eingebunden
+ */
+
+?>
+<div class="postbox" id="wpsg_produktbilder">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Produktbilder', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+
+ <?php if ($this->view['data']['id'] > 0) { ?>
+
+ <div id="produktbilder_target"><?php echo $this->view['ProduktList']; ?></div>
+
+ <?php if (get_option("wpsg_classicupload") == "1") { ?>
+
+ <div class="wpsg_clear"></div><br />
+ <div><?php echo __("Um ein Bild zu löschen klicken Sie einfach auf das Bild.", "wpsg"); ?></div>
+ <div class="wpsg_clear"></div><br />
+
+ <input type="file" name="wpsg_mod_produktbilder_file" />
+
+ <?php } else { ?>
+
+ <div class="wpsg_clear"></div><br />
+ <div><?php echo __("Bitte klicken Sie auf Upload um ein Bild hochzuladen. Um ein Bild zu löschen klicken Sie einfach auf das Bild.", "wpsg"); ?></div>
+ <div class="wpsg_clear"></div><br />
+
+ <input value="Upload" type="text" style="text-align:center;" size="10" id="upload_button" />
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+ new AjaxUpload(
+ "upload_button", {
+ action: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=upload&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1",
+ onSubmit: function(file, extension) {
+
+ jQuery('#produktbilder_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ },
+ onComplete: function(file, response) {
+
+ if (response == '1')
+ {
+
+ jQuery("#produktbilder_target").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=produktbilder_liste&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1");
+
+ if (typeof wpsg_vp_refresh == "function") wpsg_vp_refresh();
+
+ }
+ else
+ {
+ alert(response);
+ }
+
+ }
+ }
+ );
+ });
+
+ /* ]]> */</script>
+
+ <?php } ?>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Wird beim löschen eines Bilds (anklicken) aufgerufen
+ */
+ function wpsg_remove_bild(strBild)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sicher, das Sie dieses Bild löschen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery('#produktbilder_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=remove&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
+ async: false,
+ data: {
+ file: strBild
+ },
+ success: function(data) {
+
+ jQuery('#produktbilder_target').html(data);
+
+ if (typeof wpsg_vp_refresh == "function") wpsg_vp_refresh();
+
+ }
+ } );
+
+ return false;
+
+ }
+
+ /* ]]> */</script>
+
+ <?php } else { ?>
+ <?php echo __('Das Hochladen von Produktbildern ist erst nach erstmaligem speichern möglich.', 'wpsg'); ?>
+ <?php } ?>
+
+ <br /><br />
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="feinheit"><?php echo __('FTP Pfad', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <a href="#" onclick="alert('<?php echo addslashes($this->callMod('wpsg_mod_produktbilder', 'getPicPath', array($this->view['data']['id']))); ?>'); return false;"><?php echo __('Anzeigen', 'wpsg'); ?></a>
+ </p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_produktbilder/produkt_edit_list.phtml b/views/mods/mod_produktbilder/produkt_edit_list.phtml
new file mode 100644
index 0000000..7250933
--- /dev/null
+++ b/views/mods/mod_produktbilder/produkt_edit_list.phtml
@@ -0,0 +1,23 @@
+<?php
+
+ /**
+ * Template für die Liste der Bilder eines Produkts
+ */
+
+?>
+<?php if (sizeof($this->view['ProduktBilder']) > 0) { ?>
+
+ <?php foreach ($this->view['ProduktBilder'] as $b) { ?>
+
+ <div class="wpsg_mod_produktbilder_admin_bild">
+ <a onclick="return wpsg_remove_bild('<?php echo $b; ?>');" href="#" title="<?php echo __('Dieses Bild löschen.', 'wpsg'); ?>">
+ <img src="<?php echo $this->view['modul']->makeTn($this->view['data']['id'], $b, 75, 75, 's'); ?>" alt="<?php echo wpsg_hspc($b); ?>" />
+ </a>
+ </div>
+
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+
+<?php } else { ?>
+<p><?php echo __('Bisher keine Produktbilder hochgeladen.', 'wpsg'); ?></p>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_produktbilder/produktbild.phtml b/views/mods/mod_produktbilder/produktbild.phtml
new file mode 100644
index 0000000..91737b1
--- /dev/null
+++ b/views/mods/mod_produktbilder/produktbild.phtml
@@ -0,0 +1,8 @@
+<?php
+
+ /**
+ * Template für ein Produktbild
+ */
+
+?>
+<a href="<?php echo $this->view['url_orginal']; ?>" class="wpsg_imagelink thickbox" rel="<?php echo $this->view['rel']; ?>-<?php echo $this->view['produkt']['id']; ?>" title="<?php echo wpsg_hspc($this->view['produkt']['name']); ?>"><img src="<?php echo $this->view['url_tn']; ?>" alt="<?php echo htmlspecialchars($this->view['produkt']['name']); ?>" /></a> \ No newline at end of file
diff --git a/views/mods/mod_produktbilder/settings_edit.phtml b/views/mods/mod_produktbilder/settings_edit.phtml
new file mode 100644
index 0000000..2b7ace8
--- /dev/null
+++ b/views/mods/mod_produktbilder/settings_edit.phtml
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Template für die Einstellungsseite des Produktbilder Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_produktbilder_width', __('Bildbreite (Vorschau)', 'wpsg'), $this->get_option('wpsg_mod_produktbilder_width'), array('help' => 'wpsg_mod_produktbilder_width')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_produktbilder_height', __('Bildhöhe (Vorschau)', 'wpsg'), $this->get_option('wpsg_mod_produktbilder_height'), array('help' => 'wpsg_mod_produktbilder_height')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_produktbilder_mode', __('Bildmodus (Vorschau)', 'wpsg'), $this->callMod('wpsg_mod_produktbilder', 'getImageModes'), $this->get_option('wpsg_mod_produktbilder_mode'), array('help' => 'wpsg_mod_produktbilder')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_produktbilder_quality', __('Bildqualität (PNG/JPG)', 'wpsg'), $this->get_option('wpsg_mod_produktbilder_quality'), array('help' => 'wpsg_mod_produktbilder_quality','hint' => __('0 = Schlechte Qualität, 100 = Gute Qualität', 'wpsg'))); ?>
+
+<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_produktbilder&wpsg_mod_produktbilder_clearcache=1&noheader=1"><?php echo __('Bildercache löschen', 'wpsg'); ?></a> \ No newline at end of file
diff --git a/views/mods/mod_rechnungen/copymail.phtml b/views/mods/mod_rechnungen/copymail.phtml
new file mode 100644
index 0000000..4cb612a
--- /dev/null
+++ b/views/mods/mod_rechnungen/copymail.phtml
@@ -0,0 +1,11 @@
+<?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['kunde']['vname']; ?> <?php echo $this->view['kunde']['name']; ?>,
+
+<?php if (isset($this->view['rnr'])) { ?>
+<?php echo __("hiermit erhalten Sie die Kopie der Rechnung", "wpsg"); ?> <?php echo $this->view['rnr']; ?>.
+<?php } else { ?>
+<?php echo __("hiermit erhalten Sie die Kopie der Rechnungskorrektur", "wpsg"); ?> <?php echo $this->view['gnr']; ?>.
+<?php } ?>
+
+<?php echo __("Mit freundlichen Grüßen", "wpsg"); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_rechnungen/copymail_html.phtml b/views/mods/mod_rechnungen/copymail_html.phtml
new file mode 100644
index 0000000..c7138d7
--- /dev/null
+++ b/views/mods/mod_rechnungen/copymail_html.phtml
@@ -0,0 +1,11 @@
+<p><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['kunde']['vname']; ?> <?php echo $this->view['kunde']['name']; ?>,</p>
+
+<?php if (isset($this->view['rnr'])) { ?>
+<p><?php echo __("hiermit erhalten Sie die Kopie der Rechnung", "wpsg"); ?> <?php echo $this->view['rnr']; ?>.</p>
+<?php } else { ?>
+<p><?php echo __("hiermit erhalten Sie die Kopie der Rechnungskorrektur", "wpsg"); ?> <?php echo $this->view['gnr']; ?>.</p>
+<?php } ?>
+
+<p><?php echo __("Mit freundlichen Grüßen", "wpsg"); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_rechnungen/foottext_list.phtml b/views/mods/mod_rechnungen/foottext_list.phtml
new file mode 100644
index 0000000..8a2d926
--- /dev/null
+++ b/views/mods/mod_rechnungen/foottext_list.phtml
@@ -0,0 +1,61 @@
+<?php
+
+ /**
+ * Template für die Liste der Fußtexte
+ */
+
+?>
+<?php if (sizeof($this->view['data']) <= 0) { ?>
+<p><?php echo __('Bisher keine Fußtexte angelegt!', 'wpsg'); ?></p>
+<?php } else { ?>
+<table class="wpsg_foottextlist">
+ <tr>
+ <th class="col_kuerzel"><?php echo __('Kürzel', 'wpsg'); ?></th>
+ <th class="col_text"><?php echo __('Text', 'wpsg'); ?></th>
+ <th class="col_standard"><?php echo __('Standard', 'wpsg'); ?></th>
+ <th class="col_aktion"></th>
+ </tr>
+ <?php foreach ((array)$this->view['data'] as $key => $d) { ?>
+ <tr>
+ <td class="col_kuerzel wpsg_editable" id="wpsg_foottext_0_<?php echo $key; ?>"><?php echo wpsg_hspc($d[0]); ?></td>
+ <td class="col_text wpsg_editable" id="wpsg_foottext_1_<?php echo $key; ?>"><?php echo wpsg_hspc($d[1]); ?></td>
+ <td class="col_standard"><input type="radio" value="<?php echo $key; ?>" <?php echo (($this->get_option('wpsg_rechnungen_foottext_standard') == $key)?'checked="checked"':''); ?> class="wpsg_rechnungen_foottext_standard" name="wpsg_rechnungen_foottext_standard" /></td>
+ <td class="col_aktion">
+
+ <a onclick="return wpsg_removeFooter(<?php echo $key; ?>);" title="<?php echo __('Fußtext löschen', 'wpsg'); ?>'" href="#" class="wpsg_icon wpsg_icon_center wpsg_icon_remove"></a>
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_foottext_0_<?php echo $key; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: '0',
+ field_id: '<?php echo $key; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#wpsg_foottext_1_<?php echo $key; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: '1',
+ field_id: '<?php echo $key; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ } );
+
+ </script>
+
+ </td>
+ </tr>
+ <?php } ?>
+</table>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_rechnungen/gutschriftmail.phtml b/views/mods/mod_rechnungen/gutschriftmail.phtml
new file mode 100644
index 0000000..dd18ba5
--- /dev/null
+++ b/views/mods/mod_rechnungen/gutschriftmail.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template für die Mail, die beim Schreiben einer Rechnungskorrektur optional an den Kunden versendet werden kann
+ */
+
+ //wpsg_debug($this->view);
+
+?><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['kunde']['vname']; ?> <?php echo $this->view['kunde']['name']; ?>,
+
+<?php echo __("Sie erhalten hiermit die Rechnungskorrektur in Höhe von", "wpsg"); ?> <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?> <?php echo __("für Ihre Bestellung mit der Bestellnummer", "wpsg"); ?> <?php echo ((trim($this->view['data']['onr']) != '')?$this->view['data']['onr']:$this->view['data']['o_id']); ?>.
+
+<?php if (wpsg_tf($this->view['storno_fee']) > 0) { ?>
+<?php echo wpsg_translate(__('Darin ist eine Gebühr von #1# #2# enthalten.', 'wpsg'), $this->view['storno_fee'], $this->get_option('wpsg_currency')); ?>
+
+<?php } ?>
+<?php echo __("Mit freundlichen Grüßen", "wpsg"); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_rechnungen/gutschriftmail_html.phtml b/views/mods/mod_rechnungen/gutschriftmail_html.phtml
new file mode 100644
index 0000000..cc3e23e
--- /dev/null
+++ b/views/mods/mod_rechnungen/gutschriftmail_html.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template für die Mail, die beim Schreiben einer Rechnungskorrektur optional an den Kunden versendet werden kann (HTML)
+ */
+
+ //wpsg_debug($this->view);
+
+?><p><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['kunde']['vname']; ?> <?php echo $this->view['kunde']['name']; ?>,</p>
+
+<p><?php echo __("Sie erhalten hiermit die Rechnungskorrektur in Höhe von", "wpsg"); ?> <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?> <?php echo __("für Ihre Bestellung mit der Bestellnummer", "wpsg"); ?> <?php echo ((trim($this->view['data']['onr']) != '')?$this->view['data']['onr']:$this->view['data']['o_id']); ?>.</p>
+
+<?php if (wpsg_tf($this->view['storno_fee']) > 0) { ?>
+<p><?php echo wpsg_translate(__('Darin ist eine Gebühr von #1# #2# enthalten.', 'wpsg'), $this->view['storno_fee'], $this->get_option('wpsg_currency')); ?></p>
+<?php } ?>
+
+<p><?php echo __("Mit freundlichen Grüßen", "wpsg"); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_rechnungen/order_view.phtml b/views/mods/mod_rechnungen/order_view.phtml
new file mode 100644
index 0000000..9551099
--- /dev/null
+++ b/views/mods/mod_rechnungen/order_view.phtml
@@ -0,0 +1,278 @@
+<?php
+
+ /**
+ * Template für die Rechnungsmodulansicht innerhalb der Bestellansicht
+ */
+
+?>
+
+<script type="text/javascript">
+
+ function wpsg_mod_rechnungen_storno()
+ {
+
+ if (jQuery('#wpsg_rechnungen_gutschrift1').attr('checked') || jQuery('#wpsg_rechnungen_gutschrift2').attr('checked'))
+ {
+
+ window.setTimeout(function() {
+ location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>';
+ }, 1000);
+
+ }
+
+ return true;
+
+ }
+
+ jQuery(document).ready(function() {
+
+ jQuery("#wpsg_rechnungen_postbox_title").bind("click", function() {
+ if (jQuery(this.parentNode).hasClass("closed"))
+ {
+
+ jQuery.cookie("wpsg_rechnungen_field", "0", { expires: 999999 } );
+
+ }
+ else
+ {
+
+ jQuery.cookie("wpsg_rechnungen_field", "1", { expires: 999999 } );
+
+ }
+ } );
+
+ if (jQuery.cookie("wpsg_rechnungen_field") == "1")
+ {
+
+ jQuery("#wpsg_rechnungen_postbox").removeClass("closed");
+ }
+
+ jQuery('.wpsg_rechnungen_gutschrift').bind('change', function() {
+
+ if (jQuery('#wpsg_rechnungen_gutschrift1').attr('checked') || jQuery('#wpsg_rechnungen_gutschrift2').attr('checked'))
+ {
+
+ jQuery('#wpsg_mod_rechnungen_fee_layer').show();
+ jQuery('#wpsg_mod_rechnungen_stornopreview').show();
+ jQuery('#wpsg_rechnungen_stornobutton').attr('value', '<?php echo __('Rechnungskorrektur erstellen', 'wpsg'); ?>');
+
+ }
+ else
+ {
+
+ jQuery('#wpsg_mod_rechnungen_fee_layer').hide();
+ jQuery('#wpsg_mod_rechnungen_stornopreview').hide();
+ jQuery('#wpsg_rechnungen_stornobutton').attr('value', '<?php echo __('Bestellung Stornieren', 'wpsg'); ?>');
+
+ }
+
+ } );
+
+ jQuery('#wpsg_rechnungen_gutschrift0').change();
+
+ } );
+
+</script>
+
+<div class="postbox" id="wpsg_rechnungen">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Rechnungen', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+
+ <?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) == 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_storno']) == 0) { ?>
+ <p><?php echo __('Bisher keine Rechnungen geschrieben.', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <table>
+ <?php foreach ($this->view['mod_rechnungen']['arRechnungen_gesamt'] as $r) { ?>
+ <tr>
+ <td>#<?php echo (($r['rnr'] != '')?$r['rnr']:$r['gnr']); ?>
+
+ <?php if ($r['storno'] == "0000-00-00 00:00:00") { ?>
+ <?php if ($r['gnr'] != "") { ?>
+ <?php echo wpsg_translate(__('Rechnungskorrektur vom #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('Rechnung geschrieben am #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>
+ <?php } ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__("Rechnung storniert am #1#", "wpsg"), date("d.m.Y", $r['ts_storno'])); ?>
+ <?php } ?>
+
+ </td>
+ <td style="text-align:right;">
+
+ <?php
+
+ if ($r['rnr'] != "")
+ {
+ $rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'R'.$r['rnr'].'.pdf';
+ }
+ else if ($r['gnr'] != "")
+ {
+ $rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'G'.$r['gnr'].'.pdf';
+ }
+
+ ?>
+
+ <a target="_blank" onclick="if (!confirm('<?php echo __('Sind Sie sicher, dass Sie eine Kopie dieser Rechnung/Rechnungskorrektur erneut an den Kunden senden möchten?', 'wpsg'); ?>')) return false;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>&do=copy"><?php echo __("Kopie senden", "wpsg"); ?></a>&nbsp;
+ <a target="_blank" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_rechnungen&do=getRechnung&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>"><?php echo __("Ansehen", "wpsg"); ?></a>
+
+ </td>
+ </tr>
+ <?php } ?>
+ </table>
+ <br />
+ <?php } ?>
+
+ <?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) > 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_gesamt']) != sizeof($this->view['mod_rechnungen']['arRechnungen_storno'])) { ?>
+ <fieldset style="border:1px solid #999999; width:100%;">
+ <legend style="margin-left:7px; margin-right:10px;"><?php echo __("Bestellstorno: Rechnungskorrektur erstellen", "wpsg"); ?></legend>
+ <div style="padding:10px;">
+ <form id="storno_form" target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno">
+
+ <input type="hidden" name="send" value="1" />
+
+ <label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '0');" type="radio" value="0" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift0" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnung komplett stornieren und keine Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
+ <label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '1');" type="radio" value="1" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift1" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
+ <label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '2');" type="radio" value="2" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift2" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnungskorrektur erstellen und an Kunden senden.", "wpsg"); ?></label><br />
+
+ <div id="wpsg_mod_rechnungen_fee_layer" style="display:none;">
+ <?php echo wpsg_drawForm_Input('wpsg_mod_rechnungen_fee', __('Gebühr für Rechnungskorrektur', 'wpsg'), ''); ?>
+ </div>
+
+ <div class="wpsg_clear"></div><br />
+
+ <input onclick="return wpsg_mod_rechnungen_storno();" id="wpsg_rechnungen_stornobutton" class="button" type="submit" name="form_submit" value="<?php echo __("Stornieren", "wpsg"); ?>" style="float:right;" />
+ <input id="wpsg_mod_rechnungen_stornopreview" class="button" type="submit" name="form_submit_preview" value="<?php echo __('Vorschau', 'wpsg'); ?>" style="float:right; margin-right:10px;" />
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery("[name=wpsg_rechnungen_gutschrift]").filter("[value=" + jQuery.cookie("wpsg_rechnungen_stornoradio") + "]").attr("checked","checked");
+
+ jQuery("#wpsg_rechnungen_stornobutton").bind("click", function() {
+
+ if (jQuery("#wpsg_rechnungen_gutschrift1").attr("checked") || jQuery("#wpsg_rechnungen_gutschrift2").attr("checked"))
+ {
+
+ //jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
+ jQuery("#storno_form").attr("target", "_blank");
+
+ window.setTimeout(function() {
+ location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>";
+ }, 1500);
+
+ }
+ else
+ {
+
+ //jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
+ jQuery("#storno_form").attr("target", "");
+
+ }
+
+ });
+
+ });
+
+ </script>
+
+ </form>
+ <div class="wpsg_hinweis"><?php echo __("Eine neue Rechnung kann erst geschrieben werden wenn alle bestehenden Rechnungen zu dieser Bestellung storniert wurden.", "wpsg"); ?></div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </fieldset>
+ <?php } else { ?>
+
+ <fieldset style="border:1px solid #999999; width:100%;">
+ <legend style="margin-left:10px; margin-right:10px;"><?php echo __("Neue Rechnung", "wpsg"); ?></legend>
+ <div style="padding:5px;">
+
+ <form target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&cmd=rechnung&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>">
+
+ <input type="hidden" name="send" value="1" />
+
+ <label style="height:25px; width:240px; float:left; margin-top:10px;">
+ <input onchange="if (this.checked) jQuery('#wpsg_rechnungen_email').show(); else jQuery('#wpsg_rechnungen_email').hide();" type="checkbox" checked="checked" value="1" name="wpsg_rechnungen_sendmail" />
+ &nbsp;<?php echo __("E-Mail an Kunden senden.", "wpsg"); ?>
+ </label>
+ <input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_email" name="wpsg_rechnungen_email" value="<?php echo wpsg_hspc($this->view['data']['email']); ?>" />
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label style="height:25px; width:240px; float:left;">
+ <input checked="checked" onchange="if (this.checked) jQuery('#wpsg_rechnungen_faelligkeitsdatum').show(); else jQuery('#wpsg_rechnungen_faelligkeitsdatum').hide();" type="checkbox" value="1" name="wpsg_rechnungen_faelligkeit" />
+ &nbsp;<?php echo __("Fälligkeit anzeigen.", "wpsg"); ?>
+ </label>
+ <input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_faelligkeitsdatum" name="wpsg_rechnungen_faelligkeitsdatum" value="<?php echo date("d.m.Y", time() + ($this->get_option("wpsg_rechnungen_faelligkeit") * 86400)); ?>" />
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label style="height:25px; width:220px; float:left;">
+ <input checked="checked" onchange="if (this.checked) jQuery('#wpsg_rechnungen_status').show(); else jQuery('#wpsg_rechnungen_status').hide();" type="checkbox" value="1" name="wpsg_rechnungen_status" />
+ &nbsp;<?php echo __("Neuer Status:", "wpsg"); ?>
+ </label>
+ <select style="width:300px; float:right;" id="wpsg_rechnungen_status_neu" name="wpsg_rechnungen_status_neu">
+ <?php foreach ($this->arStatus as $k => $v) { ?>
+ <option value="<?php echo $k; ?>" <?php echo (($k == 110)?'selected="selected"':''); ?>><?php echo $v; ?></option>
+ <?php } ?>
+ </select>
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label style="height:25px; width:240px; float:left;">
+ <input <?php echo (($this->get_option("wpsg_rechnungen_url_std") === "1")?'checked="checked"':''); ?> type="checkbox" value="1" name="wpsg_rechnungen_url" />
+ &nbsp;<?php echo __("URL Benachrichtigung", "wpsg"); ?>
+ </label>
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label style="height:25px; width:240px; float:left; padding-left:22px;">
+ <?php echo __("Rechnungsdatum", "wpsg"); ?>:
+ </label>
+ <input style="display:block;float:right; width:300px;" type="text" name="wpsg_rechnungen_datum" value="<?php echo date("d.m.Y", time()); ?>" />
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label for="wpsg_rechnungen_fusstext" style="height:25px; width:220px; padding-left:22px; float:left">
+ <?php echo __("Fußtext", "wpsg"); ?>
+ </label>
+
+ <?php
+
+ $wpsg_rechnungen_footer = $this->get_option("wpsg_rechnungen_footer");
+ if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = unserialize($this->get_option("wpsg_rechnungen_footer"));
+ if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = Array();
+
+ ?>
+
+ <?php if (sizeof($wpsg_rechnungen_footer) > 0) { ?>
+ <select style="width:300px; float:right;" id="wpsg_rechnungen_select" onchange="jQuery('#wpsg_rechnungen_fusstext').val(this.value);">
+ <?php foreach ($wpsg_rechnungen_footer as $k => $v) { ?>
+ <option value="<?php echo wpsg_hspc($v[1]); ?>"><?php echo wpsg_hspc($v[0]); ?></option>
+ <?php } ?>
+ </select>
+ <?php } ?>
+
+ <div style="clear:both; width:100%; height:5px;"></div>
+ <div style="padding-left:25px;"><input style="width:100%;" type="text" name="wpsg_rechnungen_fusstext" id="wpsg_rechnungen_fusstext" value="" /></div>
+ <div style="clear:both; width:100%; height:15px;"></div>
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+ jQuery('#wpsg_rechnungen_fusstext').val(jQuery("#wpsg_rechnungen_select").val());
+ });
+
+ </script>
+
+ <input class="button" style="float:right;" onclick="window.setTimeout(function() { location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>'; }, 1000);" name="wpsg_rechnungen_write" type="submit" value="<?php echo __("Rechnung schreiben", "wpsg"); ?>" />
+ <input class="button" style="float:right; margin-right:10px;" name="wpsg_rechnungen_preview" type="submit" value="<?php echo __("Vorschau", "wpsg"); ?>" />
+
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ </form>
+ </div>
+ </fieldset>
+
+ <?php } ?>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_rechnungen/rechnung_pdf.phtml b/views/mods/mod_rechnungen/rechnung_pdf.phtml
new file mode 100644
index 0000000..4e4b402
--- /dev/null
+++ b/views/mods/mod_rechnungen/rechnung_pdf.phtml
@@ -0,0 +1,919 @@
+<?php
+
+ /**
+ * Template für die PDF Rechnung
+ */
+
+ require_once WPSG_PATH_LIB.'fpdf/fpdf.php';
+ require_once WPSG_PATH_LIB.'fpdf/fpdi.php';
+ require_once WPSG_PATH_MOD.'mod_rechnungen/wpsg_fpdf.class.php';
+
+ global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top;
+
+ // Positionierung der Absenderadresszeile
+ $absender_left = 25;
+ $absender_top = 50;
+
+ // Positionierung der Zieladress
+ $adress_left = 25;
+ $adress_top = 55;
+
+ // Positionierund des Rechnungskopfes
+ $rdata_left = 25;
+ $rdata_top = 90;
+
+ // Positionierung der Produktdaten
+ $prod_left = 25;
+ $prod_top = 105;
+
+ // Anzahl an Produkten pro Seite
+ $prod_break = $this->get_option('wpsg_rechnungen_pdfperpage');
+
+ // Damit die Steuer bei der Kleinunternehmerregelung nicht angezeigt wird leer ich den Array sicherheitshalber
+ if ($this->get_option('wpsg_kleinunternehmer') == '1')
+ {
+
+ unset($this->view['basket']['mwst']);
+
+ }
+
+ if (!function_exists('AddRechnungPage'))
+ {
+
+ function AddRechnungPage($shop, $pdf)
+ {
+
+ global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top;
+
+ $pdf->AddPage();
+
+ if (file_exists($shop->callMod('wpsg_mod_rechnungen', getFilePath, array(''))."wpsg_rechnungen_bp.pdf"))
+ {
+
+ $pagecount = $pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', getFilePath, array(''))."wpsg_rechnungen_bp.pdf");
+ $tplidx = $pdf->importPage(1, '/MediaBox');
+ $pdf->useTemplate($tplidx, 0, 0, 210);
+
+ }
+ if (file_exists($shop->callMod('wpsg_mod_rechnungen', getFilePath, array(''))."wpsg_rechnungen_bp.jpg"))
+ {
+ $pdf->image($shop->callMod('wpsg_mod_rechnungen', getFilePath, array(''))."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
+ }
+
+
+ if (file_exists($shop->callMod('wpsg_mod_rechnungen', getFilePath, array(''))."wpsg_rechnungen_logo.jpg"))
+ {
+
+ list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', getFilePath, array(''))."wpsg_rechnungen_logo.jpg");
+
+ //wpsg_debug($width.":".$height);
+
+ $wPix = (25.4 * $width) / 96;
+ $hPix = (25.4 * $height) / 96;
+
+ $pdf->image($shop->callMod('wpsg_mod_rechnungen', getFilePath, array(''))."wpsg_rechnungen_logo.jpg", 210 - $wPix, 0, $wPix, $hPix);
+
+ }
+
+ // Absenderadresszeile (Wird in der Konfiguration hinterlegt)
+ $pdf->SetFont('Arial', '', 6);
+ $pdf->Text($absender_left, $absender_top, $shop->replaceUniversalPlatzhalter(__($shop->get_option("wpsg_rechnungen_adresszeile"), 'wpsg'), $shop->view['data']['id']));
+
+ if ($shop->view['kunde']['kuerzel'] != "") $shop->view['kunde']['kuerzel'] = $shop->view['kunde']['kuerzel'].'-';
+
+ // Adresse des Kunden
+ $pdf->SetFont('Arial', '', 12);
+ $pdf->Text($adress_left, $adress_top, $shop->view['kunde']['firma']);
+ $pdf->Text($adress_left, $adress_top + 5, $shop->view['kunde']['vname'].' '.$shop->view['kunde']['name']);
+ $pdf->Text($adress_left, $adress_top + 10, $shop->view['kunde']['strasse'].' '.$shop->view['kunde']['hausnr']);
+ $pdf->Text($adress_left, $adress_top + 15, $shop->view['kunde']['plz'].' '.$shop->view['kunde']['ort']);
+ $pdf->Text($adress_left, $adress_top + 20, strtoupper($shop->view['oOrder']->getInvoiceCountryName()));
+
+ // Rechnungsdaten
+ $pdf->SetFont('Arial', 'B', 16);
+ $pdf->Text($rdata_left, $rdata_top, $shop->view['title']);
+ $pdf->SetFont('Arial', 'B', 9);
+ $pdf->Text($rdata_left, $rdata_top + 6, $shop->view['rnr']);
+ $pdf->SetFont('Arial', '', 9);
+
+ if (isset($shop->view['faelligkeitdatum']))
+ {
+
+ $pdf->Text($rdata_left + 35, $rdata_top, __("Fällig am", "wpsg"));
+ $pdf->Text($rdata_left + 35, $rdata_top + 6, $shop->view['faelligkeitdatum']);
+
+ }
+
+ if (isset($shop->view['payment']))
+ {
+
+ $pdf->Text($rdata_left + 58, $rdata_top, __("Zahlungsbedingungen", "wpsg"));
+ $pdf->Text($rdata_left + 58, $rdata_top + 6, $shop->view['payment']);
+
+ }
+
+ $pdf->Text($rdata_left + 105, $rdata_top, __("Kunden-Nr", "wpsg"));
+ $pdf->Text($rdata_left + 105, $rdata_top + 6, (($shop->view['kunde']['knr'] != '')?$shop->view['kunde']['knr']:$shop->view['kunde']['id']));
+
+ $pdf->Text($rdata_left + 135, $rdata_top, __("Best. Nr.", "wpsg"));
+ $pdf->Text($rdata_left + 135, $rdata_top + 6, ((trim($shop->view['data']['onr']) != '')?$shop->view['data']['onr']:$shop->view['data']['id']));
+
+ $pdf->Text($rdata_left + 155, $rdata_top, __("Datum", "wpsg"));
+ $pdf->Text($rdata_left + 155, $rdata_top + 6, $shop->view['rDatum']);
+
+ if ($shop->view['oOrder']->isInnerEu())
+ {
+
+ $pdf->SetFont('Arial', '', 9);
+ $pdf->Text($adress_left, $rdata_top + 11.5, __("Innergemeinschaftliche Lieferung.", "wpsg"));
+
+ }
+
+ // Benutzerdefinierte Felder
+ $arTexte = $shop->callMod('wpsg_mod_rechnungen', 'getRechnungstexte', array($shop->view['data']['id']));
+
+ foreach ((array)$arTexte as $text)
+ {
+
+ if (isset($text['aktiv']) && $text['aktiv'] == 1)
+ {
+
+ $pdf->SetFont('Arial', 'B', ((intval($text['fontsize']) > 0)?intval($text['fontsize']):10));
+ $pdf->SetTextColor($text['color']);
+ $pdf->MultiCell($text['x'], $text['y'], 5, utf8_encode($text['text']));
+ $pdf->SetTextColor("#000000");
+
+ }
+
+ }
+
+ }
+
+ }
+ //wpsg_debug($this->view); die();
+ $pdf = new wpsg_fpdf();
+ $pdf->SetAutoPageBreak(true, 5);
+ AddRechnungPage($this, $pdf);
+
+ $summe = 0;
+
+ $bKopf = false; $pnr = 1; $offset = 0; $count = 0;
+ foreach ($this->view['basket']['produkte'] as $p)
+ {
+
+ if (!$bKopf)
+ {
+
+ $pdf->SetFont('Arial', 'B', 9);
+ $pdf->setXY($prod_left, $prod_top);
+ $pdf->Cell(10, 8, __("Nr.", "wpsg"), 1, 0, 'C');
+
+ $pdf->setXY($prod_left + 10, $prod_top);
+ $pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, "Name", 1, 0, 'L');
+
+ if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
+ {
+
+ $pdf->setXY($prod_left + 97, $prod_top);
+ $pdf->Cell(15, 8, __("MwSt.", "wpsg"), 1, 0, 'C');
+
+ }
+
+ $pdf->setXY($prod_left + 112, $prod_top);
+ $pdf->Cell(15, 8, __("Menge", "wpsg"), 1, 0, 'C');
+
+ $pdf->setXY($prod_left + 127, $prod_top);
+ $pdf->Cell(25, 8, __("Einzelpreis", "wpsg"), 1, 0, 'R');
+
+ $pdf->setXY($prod_left + 152, $prod_top);
+ $pdf->Cell(25, 8, __("Gesamtpreis", "wpsg"), 1, 0, 'R');
+
+ $offset = 8;
+ $bKopf = true;
+
+ }
+
+ $pdf->SetFont('Arial', '', 9);
+ $pdf->setXY($prod_left, $prod_top + $offset);
+
+ if ($this->get_option('wpsg_mod_rechnungen_showanr') == '1')
+ {
+
+ $pdf->Cell(10, 8, $p['anr'], 0, 0, 'C');
+
+ }
+ else
+ {
+
+ $pdf->Cell(10, 8, $pnr.".", 0, 0, 'C');
+
+ }
+
+ $produkt_text = $this->getProductName($this->getProduktID($p['id']), true);
+ $produktBeschreibung = trim(strip_tags($p['beschreibung']));
+
+ if ($this->isOtherLang())
+ {
+
+ $trans_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($this->getProduktID($p['id']))."' AND `lang_locale` = '".wpsg_q(get_locale())."'");
+
+ if (is_array($trans_db) && sizeof($trans_db) > 0)
+ {
+
+ $produkt_text = $trans_db['name'];
+ $produktBeschreibung = trim(strip_tags($trans_db['beschreibung']));
+
+ }
+
+ }
+
+ $height = 0; // Höhe der Zeile für den Rahmen
+
+ $pdf->setXY($prod_left + 10, $prod_top + $offset);
+
+ // Produktvariablen
+ if ($this->hasMod('wpsg_mod_productvars') && $this->get_option("wpsg_mod_rechnungen_showpv") == "1")
+ {
+
+ $arPV = $this->callMod('wpsg_mod_productvars', 'getAllProductVarValues', array($this->view['data']['id'], $p['product_index']));
+
+ if (wpsg_isSizedArray($arPV))
+ {
+
+ foreach ($arPV as $pv)
+ {
+
+ $produkt_text .= "\r\n".$pv['name'].': '.$pv['value'];
+ $height += 5;
+
+ }
+
+ }
+
+ }
+
+ $produkt_text_cell_width = 102;
+ if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
+ {
+ $produkt_text_cell_width = 87;
+ }
+
+ $produkt_text_width = $pdf->GetStringWidth($produkt_text);
+ //$produkt_text_cell_width = (($this->arMwSt == "-1")?87:102);
+
+ $height += 5 * ceil($produkt_text_width / $produkt_text_cell_width) + 3;
+
+ $height_y = $pdf->getY();
+ $height = 2 + $pdf->MultiCell($prod_left + 10, $prod_top + $offset + 1.5, 5, utf8_encode($produkt_text), 0, 'L', 0, $produkt_text_cell_width);
+
+ //$height += 3 + 5 + $pdf->getY() - $height_y;
+ //$pdf->Cell((($this->arMwSt == "-1")?102:87), 8, $produkt_text, 0, 0, 'L');
+
+ if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
+ {
+
+ $pdf->setXY($prod_left + 97, $prod_top + $offset);
+ $pdf->Cell(15, 8, (($this->view['basket']['noMwSt'] == '1')?'0.00 %':wpsg_ff($p['mwst_value'], '%')), 0, 0, 'C');
+
+ }
+
+ $pdf->setXY($prod_left + 112, $prod_top + $offset);
+ $pdf->Cell(15, 8, $p['menge'], 0, 0, 'C');
+
+ // Preis eines Produktes
+ if ($this->view['basket']['noMwSt'] == '1')
+ {
+
+ // Innergemeinschaftliche Lieferung, hier Netto Preis
+ $preis = $p['preis_netto'];
+
+ }
+ else
+ {
+
+ if ($this->getFrontendTaxview() == WPSG_BRUTTO || $this->get_option('wpsg_kleinunternehmer') == '1')
+ {
+ $preis = $p['preis_brutto'];
+ }
+ else
+ {
+ $preis = $p['preis_netto'];
+ }
+
+ }
+
+ $pdf->setXY($prod_left + 127, $prod_top + $offset);
+ $pdf->Cell(25, 8, wpsg_ff($preis, $this->get_option('wpsg_currency')), 0, 0, 'R');
+
+ $pdf->setXY($prod_left + 152, $prod_top + $offset);
+ $pdf->Cell(25, 8, wpsg_ff($preis * $p['menge'], $this->get_option('wpsg_currency')), 0, 0, 'R');
+
+ /**
+ * Produktbeschreibung anzeigen Ja/Nein
+ */
+ $pBeschreibungHeight = 0;
+ if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($p['beschreibung'])) != '')
+ {
+
+ $produktBeschreibung = nl2br($produktBeschreibung);
+ preg_match_all('/\<br \/\>/', $produktBeschreibung, $treffer);
+ $produktBeschreibung = strip_tags($produktBeschreibung);
+
+ $pBeschreibungWidth = $pdf->getStringWidth($produktBeschreibung);
+ $pBeschreibungHeight = 5 * (ceil($pBeschreibungWidth / $produkt_text_cell_width) + @sizeof($treffer[0]));
+
+ $pdf->SetFont('Arial', 'I', 9);
+
+ $cellY = $pdf->getY();
+ $pdf->MultiCell($prod_left + 10, $prod_top + $height + $offset - 1, 5, utf8_encode($produktBeschreibung), 0, 'L', 0, $produkt_text_cell_width);
+ $pBeschreibungHeight = $pdf->getY() - $cellY - $height + 1;
+ $pdf->SetFont('Arial', '', 9);
+
+ }
+
+ $height += $pBeschreibungHeight;
+
+ /**
+ * Variante ?
+ */
+ if (preg_match('/vp_(.*)/', $p['productkey']))
+ {
+
+ $variInfo = $this->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($p['productkey']));
+
+ $height += $pdf->MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, utf8_encode(wpsg_translate(__('Variante: #1#', 'wpsg'), $variInfo['key'])), 0, 'L', 0, $produkt_text_cell_width);
+
+ //$height += 5;
+
+ }
+
+ if ($this->hasMod('wpsg_mod_deliverynote'))
+ {
+
+ $arDN_order = $this->callMod('wpsg_mod_deliverynote', 'loadDeliveryNotesFromOrder', array($this->view['data']['id']));
+
+ if (sizeof($arDN_order) > 1)
+ {
+
+ $deliveryTimeProduct = $this->callMod('wpsg_mod_deliverynote', 'getProductDeliveryTime', array($this->view['data']['id'], $p['product_index']));
+
+ if ($deliveryTimeProduct !== false)
+ {
+
+ $height += $pdf->MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, utf8_encode(wpsg_translate(__('Lieferdatum: #1#', 'wpsg'), date('d.m.Y', $deliveryTimeProduct))), 0, 'L', 0, $produkt_text_cell_width);
+
+ }
+
+ }
+
+ }
+
+ // Jetzt die Rahmen zeichnen
+ $pdf->Rect($prod_left, $prod_top + $offset, 10, $height);
+
+ $pdf->Rect($prod_left + 10, $prod_top + $offset, ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), $height);
+
+ if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
+ {
+
+ $pdf->Rect($prod_left + 97, $prod_top + $offset, 15, $height);
+
+ }
+
+ $pdf->Rect($prod_left + 112, $prod_top + $offset, 15, $height);
+ $pdf->Rect($prod_left + 127, $prod_top + $offset, 25, $height);
+ $pdf->Rect($prod_left + 152, $prod_top + $offset, 25, $height);
+
+ $offset += $height;
+
+ $pnr ++;
+ $count ++;
+
+ $summe += $p['price'] * $p['menge'];
+
+ if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($this->view['basket']['produkte']) > ($pnr - 1)))
+ {
+
+ AddRechnungPage($this, $pdf);
+ $bKopf = false; $offset = 0; $count = 0;
+
+ }
+
+ } // produkte
+
+ // Gutschein
+ if (isset($this->view['basket']['gs']))
+ {
+
+ $pdf->SetFont('Arial', '', 9);
+ $pdf->setXY($prod_left, $prod_top + $offset);
+ $pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
+
+ $pdf->setXY($prod_left + 10, $prod_top + $offset);
+ $pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $this->view['basket']['gs']['code']), 1, 0, 'L');
+
+ if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
+ {
+
+ $mwst = __('anteilig', 'wpsg');
+
+ $pdf->setXY($prod_left + 97, $prod_top + $offset);
+ $pdf->Cell(15, 8, $mwst, 1, 0, 'C');
+
+ }
+
+ $pdf->setXY($prod_left + 112, $prod_top + $offset);
+ $pdf->Cell(15, 8, '1', 1, 0, 'C');
+
+ /*
+ if ($this->view['basket']['gs']['calc'] == 'w')
+ {
+
+ $gs_value_einzel = '-'.wpsg_ff($this->view['basket']['gs']['value'], $this->get_option('wpsg_currency'));
+ $gs_value_gesamt = '-'.wpsg_ff($this->view['basket']['gs']['value'], $this->get_option('wpsg_currency'));
+
+ }
+ else if ($this->view['basket']['gs']['calc'] == 'p')
+ {
+
+ $gs_value_einzel = '-'.wpsg_ff($this->view['basket']['gs']['value'], '%');
+ $gs_value_gesamt = '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
+
+ }
+ */
+
+ $gs_value_einzel = '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
+ $gs_value_gesamt = '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
+
+ $pdf->setXY($prod_left + 127, $prod_top + $offset);
+ $pdf->Cell(25, 8, $gs_value_einzel, 1, 0, 'R');
+
+ $pdf->setXY($prod_left + 152, $prod_top + $offset);
+ $pdf->Cell(25, 8, $gs_value_gesamt, 1, 0, 'R');
+
+ $offset += 8;
+
+ }
+
+ // Versandkosten
+ if ($this->view['basket']['sum']['preis_shipping'] != '' && $this->view['basket']['sum']['preis_shipping'] != 0)
+ {
+
+ $pdf->SetFont('Arial', '', 9);
+ $pdf->setXY($prod_left, $prod_top + $offset);
+ $pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
+
+ $pdf->setXY($prod_left + 10, $prod_top + $offset);
+ $pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingTypName()), 1, 0, 'L');
+
+ if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
+ {
+
+ if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $this->view['basket']['noMwSt'] == '1')
+ {
+
+ $mwst = 0;
+
+ }
+ else
+ {
+
+ if (isset($this->view['basket']['shipping']['tax_rata']) && $this->view['basket']['shipping']['tax_rata'] === true)
+ {
+
+ $mwst = __('anteilig', 'wpsg');
+
+ }
+ else
+ {
+
+ $mwst = wpsg_ff($this->arShipping[$this->view['basket']['checkout']['shipping']]['mwst_value'], '%');
+
+ }
+
+ /*
+ if ($this->arShipping[$this->view['data']['type_shipping']]['mwst'] == '0')
+ {
+
+ $mwst = __('anteilig', 'wpsg');
+
+ }
+ else
+ {
+
+ $mwst = wpsg_ff($this->arShipping[$this->view['data']['type_shipping']]['mwst_value'], '%');
+
+ }
+ */
+
+ }
+
+ $pdf->setXY($prod_left + 97, $prod_top + $offset);
+ $pdf->Cell(15, 8, $mwst, 1, 0, 'C');
+
+ }
+
+ $pdf->setXY($prod_left + 112, $prod_top + $offset);
+ $pdf->Cell(15, 8, '1', 1, 0, 'C');
+
+ $pdf->setXY($prod_left + 127, $prod_top + $offset);
+ $pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 1, 0, 'R');
+
+ $pdf->setXY($prod_left + 152, $prod_top + $offset);
+ $pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 1, 0, 'R');
+
+ $offset += 8;
+
+ // Zusammengesetzte Versandarten darstellen
+ /*
+ if (wpsg_isSizedArray($this->view['basket']['shipping']['methods'])) {
+
+ foreach ($this->view['basket']['shipping']['methods'] as $shipping) {
+
+ $pdf->SetFont('Arial', '', 9);
+ $pdf->setXY($prod_left, $prod_top + $offset);
+ $pdf->Cell(10, 8, '', 1, 0, 'C'); $pnr ++;
+
+ $pdf->setXY($prod_left + 10, $prod_top + $offset);
+ $pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $this->getShippingName($shipping), 1, 0, 'L');
+
+ if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
+ {
+
+ if ($this->view['basket']['shipping'][$shipping]['tax_rata'] == 1) { $mwst = __('Anteilig', 'wpsg'); }
+ else { $mwst = wpsg_ff($this->view['basket']['shipping'][$shipping]['mwst'], '%'); }
+
+ $pdf->setXY($prod_left + 97, $prod_top + $offset);
+ $pdf->Cell(15, 8, $mwst, 1, 0, 'C');
+
+ }
+
+ $pdf->setXY($prod_left + 112, $prod_top + $offset);
+ $pdf->Cell(15, 8, '1', 1, 0, 'C');
+
+ $pdf->setXY($prod_left + 127, $prod_top + $offset);
+ $pdf->Cell(25, 8, wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_brutto'], $this->get_option('wpsg_currency')), 1, 0, 'R');
+
+ $pdf->setXY($prod_left + 152, $prod_top + $offset);
+ $pdf->Cell(25, 8, wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_brutto'], $this->get_option('wpsg_currency')), 1, 0, 'R');
+
+ $offset += 8;
+
+ }
+
+ }
+ */
+
+
+ }
+
+ // Zahlungskosten
+ if ($this->view['basket']['sum']['preis_payment'] != '' && $this->view['basket']['sum']['preis_payment'] != 0)
+ {
+
+ $pdf->SetFont('Arial', '', 9);
+ $pdf->setXY($prod_left, $prod_top + $offset);
+ $pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
+
+ $pdf->setXY($prod_left + 10, $prod_top + $offset);
+ $pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
+
+ if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
+ {
+
+ if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $this->view['basket']['noMwSt'] == '1')
+ {
+ $mwst = 0;
+ }
+ else
+ {
+
+ if (isset($this->view['basket']['payment']['tax_rata']) && $this->view['basket']['payment']['tax_rata'] === true)
+ {
+
+ $mwst = __('anteilig', 'wpsg');
+
+ }
+ else
+ {
+
+ $mwst = wpsg_ff($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst_value'], '%');
+
+ }
+
+ /*
+ if ($this->arPayment[$this->view['data']['type_payment']]['mwst'] == '0')
+ {
+
+ $mwst = __('anteilig', 'wpsg');
+
+ }
+ else
+ {
+
+ $mwst = wpsg_ff($this->arPayment[$this->view['data']['type_payment']]['mwst_value'], '%');
+
+ }
+ */
+
+ }
+
+ $pdf->setXY($prod_left + 97, $prod_top + $offset);
+ $pdf->Cell(15, 8, $mwst, 1, 0, 'C');
+
+ }
+
+ $pdf->setXY($prod_left + 112, $prod_top + $offset);
+ $pdf->Cell(15, 8, '1', 1, 0, 'C');
+
+ $pdf->setXY($prod_left + 127, $prod_top + $offset);
+ $pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 1, 0, 'R');
+
+ $pdf->setXY($prod_left + 152, $prod_top + $offset);
+ $pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 1, 0, 'R');
+
+ $offset += 8;
+
+ }
+
+ // Gebühr
+ if (wpsg_tf($this->view['storno_fee']) > 0)
+ {
+
+ $pdf->SetFont('Arial', '', 9);
+ $pdf->setXY($prod_left, $prod_top + $offset);
+ $pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
+
+ $label = __('Bearbeitungsgebühr', 'wpsg');
+
+ if (strpos($this->view['storno_fee'], '%') !== false) $label .= ' ('.wpsg_ff($this->view['storno_fee'], '%').')';
+
+ $pdf->setXY($prod_left + 10, $prod_top + $offset);
+ $pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $label, 1, 0, 'L');
+
+ if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
+ {
+
+ if ($this->view['basket']['noMwSt'] == '1')
+ {
+ $mwst = 0;
+ }
+ else
+ {
+
+
+ $mwst = wpsg_ff($this->view['storno_fee_tax_value'], '%');
+
+ }
+
+ $pdf->setXY($prod_left + 97, $prod_top + $offset);
+ $pdf->Cell(15, 8, $mwst, 1, 0, 'C');
+
+ }
+
+ $pdf->setXY($prod_left + 112, $prod_top + $offset);
+ $pdf->Cell(15, 8, '1', 1, 0, 'C');
+
+ $pdf->setXY($prod_left + 127, $prod_top + $offset);
+ $pdf->Cell(25, 8, '-'.wpsg_ff($this->view['storno_fee_value'], $this->get_option('wpsg_currency')), 1, 0, 'R');
+
+ $pdf->setXY($prod_left + 152, $prod_top + $offset);
+ $pdf->Cell(25, 8, '-'.wpsg_ff($this->view['storno_fee_value'], $this->get_option('wpsg_currency')), 1, 0, 'R');
+
+ $offset += 8;
+
+ }
+
+ $pdf->SetFont('Arial', '', 9);
+
+ if ($this->view['kunde']['ustidnr'] != "")
+ {
+ $offset += 10;
+ $pdf->Text($prod_left, $prod_top + $offset, __("Ihre Umsatzsteuer-Identifikationsnummer:", "wpsg"));
+ $pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
+ $pdf->Cell(37, 8, $this->view['kunde']['ustidnr'], 0, 0, 'R');
+ }
+
+ $offset += 10;
+ if ($this->get_option('wpsg_kleinunternehmer'))
+ {
+
+ $pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
+ $pdf->Text($prod_left + 100, $prod_top + $offset, __("Summe", "wpsg"));
+ $pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
+ $pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'] + $this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
+ $offset += 5;
+
+ }
+ else
+ {
+
+ if ($this->view['basket']['noMwSt'] == '1')
+ {
+
+ $pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
+ $pdf->Text($prod_left + 100, $prod_top + $offset, __("BRUTTOBETRAG", "wpsg"));
+ $pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
+ $pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
+ $offset += 5;
+
+ $pdf->Text($prod_left + 100, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
+ $pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
+ $pdf->Cell(37, 8, wpsg_ff(0, $this->get_option('wpsg_currency')), 0, 0, 'R');
+
+ }
+ else
+ {
+
+ $pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg"));
+
+ $pdf->Text($prod_left + 100, $prod_top + $offset, __("NETTOBETRAG", "wpsg"));
+ $pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
+ $pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
+
+ if (sizeof($this->view['basket']['mwst']) >= 1)
+ {
+
+ foreach ($this->view['basket']['mwst'] as $mw)
+ {
+
+ $offset += 5;
+ $pdf->Text($prod_left + 100, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['value'], '%'));
+ $pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
+ $pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
+
+ }
+
+ }
+
+ if (sizeof($this->view['basket']['mwst']) > 1)
+ {
+
+ $offset += 5;
+ $pdf->Text($prod_left + 100, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
+ $pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
+ $pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'] - $this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
+
+ }
+
+ }
+
+ }
+
+ // Rabatt
+ if ($this->view['basket']['sum']['preis_rabatt'] > 0)
+ {
+
+ $offset += 5;
+
+ $pdf->Text($prod_left + 100, $prod_top + $offset, __("Rabatt", "wpsg"));
+ $pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
+ $pdf->Cell(37, 8, '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
+
+ }
+
+ $offset += 5;
+ $pdf->Text($prod_left + 100, $prod_top + $offset, __("SUMME", "wpsg"));
+ $pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
+ $pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
+
+ if ($this->get_option('wpsg_kleinunternehmer') == '1')
+ {
+
+ $pdf->MultiCell($prod_left - 1, $prod_top + $offset + 5, 5, utf8_encode($this->get_option('wpsg_kleinunternehmer_text')));
+ $offset += 15;
+
+ }
+
+ if ($this->hasMod('wpsg_mod_deliverynote'))
+ {
+
+ $arDN_order = $this->callMod('wpsg_mod_deliverynote', 'loadDeliveryNotesFromOrder', array($this->view['data']['id']));
+ $delivery_date = $this->callMod('wpsg_mod_deliverynote', 'getDeliveryTime', array($this->view['data']['id']));
+
+ // Wenn es ein Gesamtlieferdatum gibt und nur einen Lieferschein, dann unter der Bestellung anzeigen
+ if ($delivery_date !== false && sizeof($arDN_order) == 1)
+ {
+
+ $offset += 10;
+
+ $pdf->MultiCell($prod_left, $prod_top + $offset, 5, utf8_encode(
+ wpsg_translate(__('Lieferung: #1#', 'wpsg'), date('d.m.Y', $delivery_date))
+ ));
+
+ $offset += 5;
+
+ }
+
+ }
+
+ $offset += 5;
+
+ if ($this->view['fussText'] != "")
+ {
+
+ $pdf->MultiCell($prod_left - 1, $prod_top + $offset, 5, utf8_encode($this->view['fussText']));
+ $pdf->SetFont('Arial', 'B', 9);
+ $offset += 10;
+
+ }
+
+ $shipping_adress = false;
+
+ if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['data']['k_id'], 'o_id' => $this->view['data']['id'])))
+ {
+
+ $pdf->setFont('Arial', 'B', 9);
+ $pdf->Text($prod_left, $prod_top + $offset, __("Lieferanschrift", "wpsg").":");
+ $offset += 5;
+
+ $pdf->setFont('Arial', '', 9);
+
+ $shipping_adress = "";
+ if ($this->view['data']['shipping_firma'] != "")
+ {
+ $shipping_adress .= $this->view['data']['shipping_firma']."\r\n";
+ }
+ $shipping_adress .= $this->view['data']['shipping_vname'].' '.$this->view['data']['shipping_name']."\r\n";
+ $shipping_adress .= $this->view['data']['shipping_strasse']."\r\n";
+ //$shipping_adress .= $this->view['data']['shipping_land']['kuerzel'].'-';
+
+ $shipping_adress .= $this->view['data']['shipping_plz'].' '.$this->view['data']['shipping_ort']."\r\n";
+ $shipping_adress .= $this->view['data']['shipping_land']['name'];
+
+
+ $start = $pdf->getY();
+ $pdf->MultiCell($prod_left - 1, $prod_top + $offset, 5, utf8_encode($shipping_adress), 0, 'L', 0, 100);
+ $offset += $pdf->getY() - $start;
+
+ $shipping_adress = true;
+
+ }
+
+
+ $offset += 5;
+
+ // Bestellvariablen
+ if ($this->hasMod('wpsg_mod_ordervars') && $this->get_option('wpsg_mod_rechnungen_showov') == '1')
+ {
+
+ $bvars = @unserialize($this->view['data']['bvars']);
+ if (!is_array($bvars)) $bvars = array();
+
+ $strBVars = "";
+ foreach ($bvars as $bvars_id => $bvars_value)
+ {
+
+ $bvars = $this->db->fetchRow("SELECT * FROM `".wpsg_q(WPSG_TBL_ORDERVARS)."` WHERE `id` = '".wpsg_q($bvars_id)."'");
+
+ if ($bvars['typ'] == "1") // Auswahl
+ {
+ if ($bvars_value <= 0) $bvars_value = __("Keine Angabe", "wpsg");
+ }
+ else if ($bvars['typ'] == "2") // Texteingabe
+ {
+ if (trim($bvars_value) == "") $bvars_value = __("Keine Angabe", "wpsg");
+ }
+ else if ($bvars['typ'] == "3") // Checkbox
+ {
+ if ($bvars_value <= 0) $bvars_value = __("Keine Angabe", "wpsg");
+ }
+
+ $bvars_name = $this->callMod('wpsg_mod_ordervars', 'getNameById', array($bvars_id));
+ $strBVars .= "\r\n".$bvars_name.": ".$bvars_value;
+
+ }
+
+ $pdf->SetFont('Arial', 'B', 9);
+ $pdf->Text($prod_left, $prod_top + $offset, __("Angaben während der Bestellung", "wpsg").":");
+ $pdf->SetFont('Arial', '', 9);
+ $pdf->MultiCell($prod_left - 1, $prod_top + $offset, 5, utf8_encode($strBVars));
+
+ }
+
+ if (!file_exists($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id']))))
+ {
+
+ mkdir($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'])), 0777, true);
+
+ }
+
+ $this->callMods('wpsg_mod_rechnungen_pdf', array(&$pdf, &$this->view['data']['id'], &$this->view['preview'], &$this->view['invoice']));
+
+ $filename = $this->view['filename'].".pdf";
+
+ if ($this->view['preview'])
+ {
+ $pdf->Output($filename, 'I');
+ }
+ else
+ {
+
+ $pdf->Output($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'])).$filename, 'F');
+
+ // Hier wird der Dateiname an FPD übergeben. Er soll sich aus der Rechnungsnummer ergeben, auch wenn das Dokument über die ID gespeichert ist.
+ if ($this->view['output'] === true) $pdf->Output($this->view['filename_out'], 'I');
+
+ }
+
+?> \ No newline at end of file
diff --git a/views/mods/mod_rechnungen/rechnungsmail.phtml b/views/mods/mod_rechnungen/rechnungsmail.phtml
new file mode 100644
index 0000000..ac01fe7
--- /dev/null
+++ b/views/mods/mod_rechnungen/rechnungsmail.phtml
@@ -0,0 +1,16 @@
+<?php
+
+ /**
+ * Template für die Mail, die beim Schreiben einer Rechnung optional an den Kunden versendet werden kann
+ */
+
+ //wpsg_debug($this->view);
+
+?><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['kunde']['vname']; ?> <?php echo $this->view['kunde']['name']; ?>,
+
+<?php echo __("Sie erhalten hiermit die Rechnung in Höhe von", "wpsg"); ?> <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?> <?php echo __("für Ihre Bestellung mit der Bestellnummer", "wpsg"); ?> <?php echo ((trim($this->view['data']['onr']) != '')?$this->view['data']['onr']:$this->view['data']['o_id']); ?>.
+<?php $this->callMods('wpsg_mod_rechnungen_mail'); ?>
+
+<?php echo __("Mit freundlichen Grüßen", "wpsg"); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_rechnungen/rechnungsmail_html.phtml b/views/mods/mod_rechnungen/rechnungsmail_html.phtml
new file mode 100644
index 0000000..666035c
--- /dev/null
+++ b/views/mods/mod_rechnungen/rechnungsmail_html.phtml
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Template für die Mail, die beim Schreiben einer Rechnung optional an den Kunden versendet werden kann (HTML)
+ */
+
+ /* Wichtig, da die Module sonst kein HTML zurückgeben */
+ $this->htmlMail = true;
+
+ //wpsg_debug($this->view);
+
+?><p><?php echo __("Hallo", "wpsg"); ?> <?php echo $this->view['kunde']['vname']; ?> <?php echo $this->view['kunde']['name']; ?>,</p>
+
+<p><?php echo __("Sie erhalten hiermit die Rechnung in Höhe von", "wpsg"); ?> <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?> <?php echo __("für Ihre Bestellung mit der Bestellnummer", "wpsg"); ?> <?php echo ((trim($this->view['data']['onr']) != '')?$this->view['data']['onr']:$this->view['data']['o_id']); ?>.</p>
+
+<?php $this->callMods('wpsg_mod_rechnungen_mail'); ?>
+
+<p><?php echo __("Mit freundlichen Grüßen", "wpsg"); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_rechnungen/settings_edit.phtml b/views/mods/mod_rechnungen/settings_edit.phtml
new file mode 100644
index 0000000..433e0de
--- /dev/null
+++ b/views/mods/mod_rechnungen/settings_edit.phtml
@@ -0,0 +1,241 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Rechnungen Moduls
+ */
+
+?>
+<script type="text/javascript">
+
+ /**
+ * Wird beim anlegen einer neuen Fußzeile aufgerufen
+ */
+ function wpsg_addFooter()
+ {
+
+ jQuery('#foottext_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&do=add&noheader=1',
+ success: function(data) {
+ jQuery('#foottext_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addFooter()
+
+ /**
+ * Wird beim entfernen einer Fußzeile aufgerufen
+ */
+ function wpsg_removeFooter(foot_id)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Fußzeile löschen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery('#foottext_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&do=removeFooter&noheader=1',
+ data: {
+ foot_id: foot_id
+ },
+ success: function(data) {
+ jQuery('#foottext_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_removeFooter()
+
+</script>
+
+<br />
+<div class="wpsg_admin_box" id="wpsg_tab">
+ <div class="head">
+ <div class="title">
+ <div class="tab" id="tab1"><?php echo __('Vordefinierte Textfelder', 'wpsg'); ?></div>
+ <div class="tab" id="tab2"><?php echo __('Fußzeile', 'wpsg'); ?></div>
+ <div class="tab" id="tab3"><?php echo __('Sonstiges', 'wpsg'); ?></div>
+ <div class="tabcontent tablink">
+ <a href="" title="<?php echo __('Neues Feld für die Fußzeile hinzufügen', 'wpsg'); ?>" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addFooter();"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+ <div class="content" id="wpsg_mwst_list">
+
+ <div id="tabcontent1" class="tabcontent">
+
+ <?php echo wpsg_drawForm_Input('wpsg_rechnungen_adresszeile', __('Adresszeile', 'wpsg'), $this->get_option('wpsg_rechnungen_adresszeile')); ?>
+ <div class="wpsg_hinweis"><?php echo __('Diese Zeile wird klein oberhalb der Kundenadresse platziert', 'wpsg'); ?></div>
+ <br />
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Briefpapier (PDF/JPG)', 'wpsg'); ?>:</label><br />
+ <?php if ($this->view['bp'] !== false) { ?>
+ <label>
+ <input type="checkbox" name="wpsg_rechnungen_bp_del" value="1" />&nbsp;<?php echo __('Löschen', 'wpsg'); ?>
+ </label>
+ <?php } ?>
+ </div>
+ <div class="wpsg_form_right">
+ <?php if ($this->view['bp'] === false) { ?>
+ <p><?php echo __('Es wurde bisher kein Briefpapier hochgeladen', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <a href="<?php echo $this->view['bp']; ?>" target="_blank"><?php echo __('Derzeitiges Briefpapier', 'wpsg'); ?></a>
+ <?php } ?>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_bp" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_bp"></a>
+ <input type="file" name="wpsg_rechnungen_bp">
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Logo (JPG)', 'wpsg'); ?>:</label><br />
+ <?php if ($this->view['logo'] !== false) { ?>
+ <label>
+ <input type="checkbox" name="wpsg_rechnungen_logo_del" value="1" />&nbsp;<?php echo __('Löschen', 'wpsg'); ?>
+ </label>
+ <?php } ?>
+ </div>
+ <div class="wpsg_form_right">
+ <?php if ($this->view['logo'] === false) { ?>
+ <p><?php echo __('Es wurde bisher kein Logo hochgeladen', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <a href="<?php echo $this->view['logo']; ?>" target="_blank"><?php echo __('Derzeitiges Logo', 'wpsg'); ?></a>
+ <?php } ?>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_logo" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_logo"></a>
+ <input type="file" name="wpsg_rechnungen_logo">
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <div class="wpsg_hinweis"><?php echo __('Das Briefpapier wird hinter die gesamte Seite gelegt, das Logo wird rechts oben auf jeder Seite platziert. (96 dpi)', 'wpsg'); ?></div>
+ <br />
+
+ <table class="wpsg_mod_rechnungen_fieldtable">
+ <tr>
+ <th class="col_bezeichnung"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
+ <th class="col_freitext"><?php echo __('Freitext', 'wpsg'); ?></th>
+ <th class="col_x"><?php echo __('X', 'wpsg'); ?></th>
+ <th class="col_y"><?php echo __('Y', 'wpsg'); ?></th>
+ <th class="col_color"><?php echo __('Farbe', 'wpsg'); ?></th>
+ <th class="col_groesse"><?php echo __('Größe', 'wpsg'); ?></th>
+ <th class="col_action"></th>
+ </tr>
+ <?php foreach ($this->view['fields'] as $f => $field_name) { ?>
+ <tr>
+ <td><?php echo wpsg_hspc($field_name); ?></td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][text]" value="<?php echo wpsg_hspc($this->view['arTexte'][$f]['text']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][x]" value="<?php echo wpsg_hspc($this->view['arTexte'][$f]['x']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][y]" value="<?php echo wpsg_hspc($this->view['arTexte'][$f]['y']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][color]" value="<?php echo wpsg_hspc($this->view['arTexte'][$f]['color']); ?>" />
+ </td>
+ <td>
+ <select name="text[<?php echo $f; ?>][fontsize]" style="width:100%;">
+ <option <?php echo (($this->view['arTexte'][$f]['fontsize'] == "8")?'selected="selected"':''); ?> value="8">8</option>
+ <option <?php echo (($this->view['arTexte'][$f]['fontsize'] == "9")?'selected="selected"':''); ?> value="9">9</option>
+ <option <?php echo (($this->view['arTexte'][$f]['fontsize'] == "10")?'selected="selected"':''); ?> value="10">10</option>
+ <option <?php echo (($this->view['arTexte'][$f]['fontsize'] == "11")?'selected="selected"':''); ?> value="11">11</option>
+ <option <?php echo (($this->view['arTexte'][$f]['fontsize'] == "12")?'selected="selected"':''); ?> value="12">12</option>
+ <option <?php echo (($this->view['arTexte'][$f]['fontsize'] == "13")?'selected="selected"':''); ?> value="13">13</option>
+ <option <?php echo (($this->view['arTexte'][$f]['fontsize'] == "14")?'selected="selected"':''); ?> value="14">14</option>
+ </select>
+ </td>
+ <td>
+ <label><input type="checkbox" value="1" name="text[<?php echo $f; ?>][aktiv]" <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$f]['aktiv']))?'checked="checked"':''); ?> />&nbsp;<?php echo __("Aktiv", "wpsg"); ?></label>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_fieldconfig" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_rechnung_fieldconfig"></a>
+ </td>
+ </tr>
+ <?php } ?>
+ </table>
+
+ <br />
+
+ <input style="float:right;" class="button" onclick="if (!confirm('<?php echo __('Sind Sie sich sicher? Ihre bisherigen Einstellungen gehen verloren!', 'wpsg'); ?>')) return false; else location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module&amp;modul=<?php echo $_REQUEST['modul']; ?>&amp;do=reset&amp;noheader=1';" type="button" value="<?php echo __('Standardeinstellungen laden', 'wpsg'); ?>" />
+
+ <div class="wpsg_hinweis">
+ <?php echo __('Die Angaben für X (Abstand von Links) und Y (Abstand von Oben) werden in mm eingetragen.', 'wpsg'); ?><br />
+ <?php echo __('Die Farbe wird im Hexadezimalformat angegeben (#FFFFF für weiß, #000000 für schwarz).', 'wpsg'); ?>
+ </div>
+ <br />
+
+ </div>
+ <div id="tabcontent2" class="tabcontent">
+
+ <div id="foottext_list"><?php echo $this->view['foottext_list']; ?></div>
+ <br />
+
+ <div class="wpsg_hinweis">
+ <?php echo __('Hier können Sie Texte vordefinieren, die sie unter die Rechnung setzen können.', 'wpsg'); ?>
+ </div>
+
+ </div>
+ <div id="tabcontent3" class="tabcontent">
+
+ <?php echo wpsg_drawForm_Input('wpsg_rechnungen_url', __('URL Benachrichtigung', 'wpsg'), $this->get_option('wpsg_rechnungen_url'), array('help' => 'wpsg_rechnung_url')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_rechnungen_auto', __('Rechnungserstellung', 'wpsg'), array(
+ '0' => __('Manuell', 'wpsg'),
+ '1' => __('Bei Bestellung', 'wpsg'),
+ '2' => __('Bei Zahlung', 'wpsg')
+ ), $this->get_option('wpsg_mod_rechnungen_auto'), array('help' => 'wpsg_mod_rechnungen_auto')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_rechnungen_faelligkeit', __('Fälligkeit in Tagen', 'wpsg'), $this->get_option('wpsg_rechnungen_faelligkeit'), array('help' => 'wpsg_rechnungen_faelligkeit')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_rechnungen_pdfperpage', __('Anzahl an Produkten pro Seite (PDF)', 'wpsg'), $this->get_option('wpsg_rechnungen_pdfperpage'), array('help' => 'wpsg_rechnungen_pdfperpage')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_rechnungen_pbeschreibung', __('Produktbeschreibung auf Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_rechnungen_pbeschreibung'), array('help' => 'wpsg_rechnungen_pbeschreibung')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_showgutschriftrechnung', __('Rechnungsnummer auf Rechnungskorrektur anzeigen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_showgutschriftrechnung'), array('help' => 'wpsg_mod_rechnungen_showgutschriftrechnung')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_showpv', __('Produktvariablen auf Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_showpv'), array('help' => 'wpsg_mod_rechnungen_showpv')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_showov', __('Bestellvariablen auf Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_showov'), array('help' => 'wpsg_mod_rechnungen_showov')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_showanr', __('Artikelnummer auf Rechnung als Nr. verwenden', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_showanr'), array('help' => 'wpsg_mod_rechnungen_showanr')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_hideCountry', __('Land auf Lieferschein verbergen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_hideCountry'), array('help' => 'wpsg_mod_rechnungen_hideCountry')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_rechnungen_start', __('Startnummer (Rechnungen)', 'wpsg'), $this->get_option('wpsg_rechnungen_start'), array('help' => 'wpsg_rechnungen_start')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_gutschrift_start', __('Startnummer (Rechnungskorrektur)', 'wpsg'), $this->get_option('wpsg_gutschrift_start'), array('help' => 'wpsg_gutschrift_start')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_rechnungen_gutschrifttax', __('Mehrwertsteuersatz für Bearbeitungsgebühr', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_rechnungen_gutschrifttax'), array('help' => 'wpsg_mod_rechnungen_gutschrifttax')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_rechnungen_format', __('Format (Rechnungen)', 'wpsg'), $this->get_option('wpsg_rechnungen_format'), array('help' => 'wpsg_rechnungen_format')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_gutschrift_format', __('Format (Rechnungskorrektur)', 'wpsg'), $this->get_option('wpsg_gutschrift_format'), array('help' => 'wpsg_gutschrift_format')); ?>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Mögliche Platzhalter für Rechnungen und Rechnungskorrektur', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ %nr% - <?php echo __('Fortlaufende Rechnungs- bzw. Rechnungskorrekturnummer', 'wpsg'); ?><br />
+ %Jahr% - <?php echo __('Das aktuelle Jahr (4 Stellig)', 'wpsg'); ?><br />
+ %Monat% - <?php echo __('Der aktuelle Monat (01 - 12)', 'wpsg'); ?><br />
+ %Tag% - <?php echo __('Der Tag des Monats (01 - 31)', 'wpsg'); ?><br />
+ </p>
+ <div class="wpsg_hinweis"><?php echo __('Die Platzhalter können bei den Formatfeldern und dem Dateinamen verwendet werden. Der Platzhalter %nr% sollte dabei immer Verwendung finden.', 'wpsg'); ?></div>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ </div>
+
+ </div>
+</div>
+
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+ jQuery('#wpsg_tab').wpsg_tab( {
+ 'cookiename': 'wpsg_rechnungen_tab',
+ 'tab2': function() {
+ jQuery('.tablink').show();
+ }
+ } );
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_relatedproducts/basket_after.phtml b/views/mods/mod_relatedproducts/basket_after.phtml
new file mode 100644
index 0000000..64a3ca6
--- /dev/null
+++ b/views/mods/mod_relatedproducts/basket_after.phtml
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Template für die Integration der Zubehörprodukte in den Warenkorb
+ */
+
+?>
+<?php if (wpsg_isSizedArray($this->view['wpsg_mod_relatedproducts']['data'])) { ?>
+<div class="wpsg_mod_relatedproducts_basket">
+
+ <h2><?php echo __('Das könnte Ihnen auch gefallen:', 'wpsg'); ?></h2>
+
+ <?php foreach ($this->view['wpsg_mod_relatedproducts']['data'] as $rp_data) { ?>
+
+ <?php echo $this->callMod('wpsg_mod_relatedproducts', 'renderRelatedProduct', array(&$rp_data, $this->get_option('wpsg_mod_relatedproducts_showBasketTemplate'))); ?>
+
+ <?php } ?>
+
+</div>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_relatedproducts/list.phtml b/views/mods/mod_relatedproducts/list.phtml
new file mode 100644
index 0000000..e123559
--- /dev/null
+++ b/views/mods/mod_relatedproducts/list.phtml
@@ -0,0 +1,52 @@
+<?php
+
+ /**
+ * Template für die Liste der gewählten Zubehörprodukte (Backend)
+ */
+
+?>
+<br />
+<?php if (sizeof($this->view['wpsg_mod_relatedproducts']['data']) <= 0) { ?>
+<p><?php echo __('Noch keine Produkte zugeordnet', 'wpsg'); ?></p>
+<?php } else { ?>
+<?php foreach ($this->view['wpsg_mod_relatedproducts']['data'] as $p) { ?>
+ <span id="wpsg_rp_<?php echo $p['id']; ?>">
+ <?php if (!wpsg_isSizedString($this->get_option('wpsg_mod_relatedproducts_template')) || $this->get_option('wpsg_mod_relatedproducts_template') == '0') { ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_relatedproduct['.$p['id'].']', $p['name'], $this->view['wpsg_mod_relatedproducts']['arTemplates'], $p['template'], array('remove' => __('Zuordnung löschen', 'wpsg'), 'labellink' => WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$p['id'])); ?>
+ <?php } else { ?>
+ <a class="wpsg_icon wpsg_icon_right wpsg_icon_remove" href="#" title="<?php echo __('Zuordnung löschen', 'wpsg'); ?>"></a>
+ <span style="line-height:25px;">
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id=<?php echo $p['id']; ?>">
+ <?php echo wpsg_hspc($p['name']); ?>
+ </a>
+ </span>
+ <?php } ?>
+ </span>
+ <div class="wpsg_clear"></div>
+<?php } ?>
+<?php } ?>
+
+<script type="text/javascript">
+
+ jQuery('#relatedproducts_list a.wpsg_icon_remove').bind('click', function() {
+
+ var rel_id = jQuery(this).parents('span').attr('id').replace(/wpsg_rp_/, '');
+
+ jQuery('#relatedproducts_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_relatedproducts&cmd=wpsg_rp_remove&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_relatedproducts']['product_id']; ?>',
+ data: {
+ 'rel_id': rel_id
+ },
+ success: function(data) {
+
+ jQuery('#relatedproducts_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } );
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_relatedproducts/produkt_edit_sidebar.phtml b/views/mods/mod_relatedproducts/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..ff0f487
--- /dev/null
+++ b/views/mods/mod_relatedproducts/produkt_edit_sidebar.phtml
@@ -0,0 +1,52 @@
+<?php
+
+ /**
+ * Template für die Zuweisung von Zubehörprodukten
+ */
+
+?>
+<div id="wpsg_relatedproducts" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Zubehörprodukte', 'wpsg'); ?> </span>
+ </h3>
+ <div class="inside">
+ <a title="<?php echo __('Neuens Produkt zuordnen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_relatedproducts_add();"></a>
+ <div class="wpsg_clear"></div>
+ <div id="relatedproducts_list"><?php echo $this->callMod('wpsg_mod_relatedproducts', 'drawList', array($this->view['data']['id'])); ?></div>
+ </div>
+</div>
+
+<script type="text/javascript">
+
+ /**
+ * Wird aufgerufen wenn ein Produkt zugeordnet werden soll
+ */
+ function wpsg_relatedproducts_add()
+ {
+
+ jQuery('#wpsg_relatedproducts_produktauswahl').html('<img style="margin:15px;" src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery('#wpsg_relatedproducts_produktauswahl').dialog( {
+ 'dialogClass': 'wp-dialog',
+ 'modal': true,
+ 'width': 390,
+ 'height': 350,
+ 'title': '<?php echo __('Produktauswahl', 'wpsg'); ?>',
+ 'open': function() {
+
+ jQuery.ajax( {
+ url: 'admin.php?page=wpsg-Produkt&action=select&noheader=1&wpsg_mode=wpsg_mod_relatedproducts&edit_id=<?php echo $this->view['data']['id']; ?>',
+ success: function(data) {
+ jQuery('#wpsg_relatedproducts_produktauswahl').html(data);
+ }
+ } );
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_relatedproducts_add()
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_relatedproducts/relatedproducts.phtml b/views/mods/mod_relatedproducts/relatedproducts.phtml
new file mode 100644
index 0000000..89b99e0
--- /dev/null
+++ b/views/mods/mod_relatedproducts/relatedproducts.phtml
@@ -0,0 +1,14 @@
+<?php
+
+ /**
+ * Dieses Template wird um die Zubehörprodukte aufgerufen
+ */
+
+?>
+<h2><?php echo __('Ähnliche Produkte', 'wpsg'); ?></h2>
+
+<div class="wpsg_relatedproducts">
+ <?php echo $this->view['wpsg_mod_relatedproducts']['content']; ?>
+</div>
+
+<div class="wpsg_clear"></div> \ No newline at end of file
diff --git a/views/mods/mod_relatedproducts/settings_edit.phtml b/views/mods/mod_relatedproducts/settings_edit.phtml
new file mode 100644
index 0000000..fb5e0bc
--- /dev/null
+++ b/views/mods/mod_relatedproducts/settings_edit.phtml
@@ -0,0 +1,30 @@
+<?php
+
+ /**
+ * Tempalte für die Einstellungen des Moduls "Zubehörprodukte"
+ */
+
+?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_relatedproducts_template', __('Produkttemplate für die Zubehörprodukte', 'wpsg'), $this->view['wpsg_mod_relatedproducts']['arTemplates'], $this->get_option('wpsg_mod_relatedproducts_template'), array('help' => 'wpsg_mod_relatedproducts_template')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_relatedproducts_synchron', __('Synchrone Verknüpfung der Produkte', 'wpsg'), $this->get_option('wpsg_mod_relatedproducts_synchron'), array('help' => 'wpsg_mod_relatedproducts_synchron')); ?>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_relatedproducts_showBasket', __('Zubehörprodukte im Warenkorb anpreisen', 'wpsg'), $this->get_option('wpsg_mod_relatedproducts_showBasket'), array('hint' => __('Wird unterhalb des Warenkorbes dargestellt. Alternativ kann [wpsg_relatedproducts_basket limit="5"] verwendet werden.', 'wpsg'), 'help' => 'wpsg_relatedproducts_basket')); ?>
+<div class="wpsg_mod_relatedproducts_showBasket_activ" style="display:none;">
+<?php echo wpsg_drawForm_Input('wpsg_mod_relatedproducts_showBasketLimit', __('Maximale Anzahl an angezeigten Produkten', 'wpsg'), $this->get_option('wpsg_mod_relatedproducts_showBasketLimit'), array('help' => 'wpsg_mod_relatedproducts_showBasketLimits')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_relatedproducts_showBasketTemplate', __('Tempalte für die Zubehörprodukte im Warenkorn', 'wpsg'), $this->view['wpsg_mod_relatedproducts']['arTemplates'], $this->get_option('wpsg_mod_relatedproducts_showBasketTemplate'), array('help' => 'wpsg_mod_relatedproducts_showBasketTemplate')); ?>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_relatedproducts_showBasket').bind('change', function() {
+
+ if (jQuery(this).is(':checked')) jQuery('.wpsg_mod_relatedproducts_showBasket_activ').show();
+ else jQuery('.wpsg_mod_relatedproducts_showBasket_activ').hide();
+
+ } ).change();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_request/adminmail.phtml b/views/mods/mod_request/adminmail.phtml
new file mode 100644
index 0000000..c577018
--- /dev/null
+++ b/views/mods/mod_request/adminmail.phtml
@@ -0,0 +1,22 @@
+<?php
+
+ /**
+ * Text E-Mail Template für die Admin Mail bei einer neuen Anfrage
+ */
+
+ $this->htmlMail = false;
+ $time = time();
+
+?><?php echo __('Hallo Administrator,', 'wpsg'); ?>
+
+<?php echo wpsg_translate(__('Das Anfrageformular auf der Homepage wurde am #1# um #2# Uhr', 'wpsg'), date('d.m.Y', $time), date('H:i', $time)); ?>
+<?php echo __('mit folgenden Daten ausgefüllt:', 'wspg'); ?>
+
+<?php echo __('Produktdaten', 'wpsg'); ?>:
+<?php echo $this->render(WPSG_PATH_VIEW.'/mods/mod_request/requestmail.phtml'); ?>
+
+<?php echo __('Weitere Informationen', 'wpsg'); ?>:
+
+<?php echo wpsg_pad_right(__('REMOTE IP', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left($_SERVER['REMOTE_ADDR'], 46); ?>
+<?php echo wpsg_pad_right(__('UserAgent', 'wpsg').':', 30); ?>
+<?php echo wpsg_getStr($_SERVER['HTTP_USER_AGENT']); ?> \ No newline at end of file
diff --git a/views/mods/mod_request/adminmail_html.phtml b/views/mods/mod_request/adminmail_html.phtml
new file mode 100644
index 0000000..60de79f
--- /dev/null
+++ b/views/mods/mod_request/adminmail_html.phtml
@@ -0,0 +1,21 @@
+<?php
+
+ /**
+ * HTML E-Mail Template für die Admin Mail bei einer neuen Anfrage
+ */
+
+ $this->htmlMail = true;
+ $time = time();
+
+?>
+<p><?php echo __('Hallo Administrator', 'wpsg'); ?>,</p>
+<p><?php echo wpsg_translate(__('Das Anfrageformular auf der Homepage wurde am #1# um #2# Uhr', 'wpsg'), date('d.m.Y', $time), date('H:i', $time)); ?></p>
+
+<h2><?php echo __('Produktdaten', 'wpsg'); ?>:</h2>
+<?php echo $this->render(WPSG_PATH_VIEW.'/mods/mod_request/requestmail_html.phtml'); ?>
+
+<h2><?php echo __('Weitere Informationen', 'wpsg'); ?>:</h2>
+<p>
+ <strong><?php echo __('REMOTE IP', 'wpsg'); ?>:</strong>&nbsp;<?php echo wpsg_pad_left($_SERVER['REMOTE_ADDR'], 46); ?><br />
+ <strong><?php echo __('UserAgent', 'wpsg'); ?>:</strong>&nbsp;<?php echo wpsg_getStr($_SERVER['HTTP_USER_AGENT']); ?>
+</p> \ No newline at end of file
diff --git a/views/mods/mod_request/customermail.phtml b/views/mods/mod_request/customermail.phtml
new file mode 100644
index 0000000..f75f6fc
--- /dev/null
+++ b/views/mods/mod_request/customermail.phtml
@@ -0,0 +1,16 @@
+<?php
+
+ /**
+ * HTML E-Mail Template für die Admin Mail bei einer neuen Anfrage
+ */
+
+ $this->htmlMail = true;
+ $time = time();
+
+?>
+<?php echo wpsg_translate(__('Hallo #1# #2#', 'wpsg'), wpsg_getStr($this->view['requestlist']['customer']['vname']), wpsg_getStr($this->view['requestlist']['customer']['name'])); ?>,
+
+<?php echo wpsg_translate(__('Vielen Dank für Ihre Anfrage. Wir werden uns umgehend bei ihnen melden.', 'wpsg')); ?>
+
+<?php echo __('Produktdaten', 'wpsg'); ?>:
+<?php echo $this->render(WPSG_PATH_VIEW.'/mods/mod_request/requestmail.phtml'); ?> \ No newline at end of file
diff --git a/views/mods/mod_request/customermail_html.phtml b/views/mods/mod_request/customermail_html.phtml
new file mode 100644
index 0000000..388ad1a
--- /dev/null
+++ b/views/mods/mod_request/customermail_html.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * HTML E-Mail Template für die Admin Mail bei einer neuen Anfrage
+ */
+
+ $this->htmlMail = true;
+ $time = time();
+
+?>
+<p><?php echo wpsg_translate(__('Hallo #1# #2#', 'wpsg'), wpsg_getStr($this->view['requestlist']['customer']['vname']), wpsg_getStr($this->view['requestlist']['customer']['name'])); ?>,</p>
+<p><?php echo wpsg_translate(__('Vielen Dank für Ihre Anfrage. Wir werden uns umgehend bei ihnen melden.', 'wpsg')); ?></p>
+
+<h2><?php echo __('Produktdaten', 'wpsg'); ?>:</h2>
+<?php echo $this->render(WPSG_PATH_VIEW.'/mods/mod_request/requestmail_html.phtml'); ?> \ No newline at end of file
diff --git a/views/mods/mod_request/product_bottom.phtml b/views/mods/mod_request/product_bottom.phtml
new file mode 100644
index 0000000..314a8ac
--- /dev/null
+++ b/views/mods/mod_request/product_bottom.phtml
@@ -0,0 +1,43 @@
+<?php
+
+ /**
+ * Integration des Anfragemoduls in die Produkttemplates
+ * Hier wird nicht der Button eingebunden sondern lediglich der JS Teil für die Anzeige im Fenster
+ */
+
+?>
+<?php if ($this->get_option('wpsg_mod_request_afterinsert') == wpsg_mod_request::ACTION_SHOWREQUESTPAGELB) { ?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_add_requestlist_<?php echo $this->view['wpsg_mod_request']['template_index']; ?>').bind('click', function() {
+
+ jQuery.ajax( {
+ url: '<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>',
+ data:
+ {
+ wpsg_form_data: jQuery('#wpsg_produktform_<?php echo $this->getTemplateIndex(); ?>').serialize(),
+ 'wpsg[ajax]': '1',
+ 'wpsg[submit_request]': '1'
+ },
+ success: function(data)
+ {
+
+ if (jQuery('#wpsg_requestdiv').length <= 0) jQuery('body').append('<div id="wpsg_requestdiv" style="display:none;"></div>');
+
+ jQuery('#wpsg_requestdiv').html(data);
+
+ tb_show('<?php echo __('Ihre Anfrageliste', 'wpsg'); ?>', '#TB_inline?inlineId=wpsg_requestdiv&height=500');
+
+ }
+ } );
+
+ return false;
+
+ } );
+
+ } );
+
+/* ]]> */</script>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_request/produkt_edit_allgemein.phtml b/views/mods/mod_request/produkt_edit_allgemein.phtml
new file mode 100644
index 0000000..3d97432
--- /dev/null
+++ b/views/mods/mod_request/produkt_edit_allgemein.phtml
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Template für die Integration des Anfragemoduls in die Produktverwaltung
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_request_set', __('AnfrageProdukt', 'wpsg'), array(
+ wpsg_mod_request::TYP_NO => __('Nein', 'wpsg'),
+ wpsg_mod_request::TYP_YES => __('Ja, ohne Warenkorbfunktion', 'wpsg'),
+ wpsg_mod_request::TYP_YESWITHBASKET => __('Ja, mit zusätzlicher Warenkorbfunktion', 'wpsg')
+), $this->view['oProduct']->getMeta('wpsg_mod_request_set'), array('help' => 'wpsg_mod_request_set')); ?> \ No newline at end of file
diff --git a/views/mods/mod_request/requestmail.phtml b/views/mods/mod_request/requestmail.phtml
new file mode 100644
index 0000000..fb98558
--- /dev/null
+++ b/views/mods/mod_request/requestmail.phtml
@@ -0,0 +1,116 @@
+<?php
+
+ /**
+ * Text E-Mail Template für die Daten der Anfrage
+ * wird von adminmail.phtml und customermail.phtml verwendet
+ */
+
+?><?php if (sizeof($this->view['requestlist']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { $prod_col = 25; } else { $prod_col = 35; } ?>
+
+<?php echo wpsg_pad_right(__('Pos', 'wpsg'), 5); ?>
+<?php echo wpsg_pad_right(__('Produkt', 'wpsg'), $prod_col); ?>
+<?php echo wpsg_pad_left(__('Stückpreis', 'wpsg').' ', 15); ?>
+<?php if (sizeof($this->view['requestlist']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+<?php echo wpsg_pad_left(__('MwSt.', 'wpsg').' ', 10); ?>
+<?php } ?>
+<?php echo wpsg_pad_right(__('Anzahl', 'wpsg'), 6); ?>
+<?php echo wpsg_pad_left(__('Summe', 'wpsg'), 15); ?>
+----------------------------------------------------------------------------
+<?php $i = 0; foreach ((array)$this->view['requestlist']['products'] as $product_index => $request_product) { $i ++; ?>
+<?php echo wpsg_pad_right($i.'.', 5); ?>
+<?php echo wpsg_pad_right(((wpsg_isSizedString($request_product['product_data']['detailname']))?$request_product['product_data']['detailname']:$request_product['product_data']['name']), $prod_col); ?>
+<?php echo wpsg_pad_left(wpsg_ff($request_product['price'], $this->get_option('wpsg_currency')).' ', 15); ?>
+<?php if (sizeof($this->view['requestlist']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+<?php echo wpsg_pad_left(wpsg_ff($request_product['product_data']['mwst_value'], '%').' ', 10); ?>
+<?php } ?>
+<?php echo wpsg_pad_left($request_product['amount'], 6); ?>
+<?php echo wpsg_pad_left(wpsg_ff($request_product['price'] * $request_product['amount'], $this->get_option('wpsg_currency')), 15); ?>
+<?php /* Variantenanzeige im Produkt BEGIN */ ?>
+<?php if ($this->hasMod('wpsg_mod_varianten') && $this->callMod('wpsg_mod_varianten', 'isVariantsProductKey', array($request_product['product_key']))) { ?>
+<?php echo wpsg_pad_right(' ', 5); ?>
+<?php echo __('Variante', 'wpsg'); ?>: <?php echo wpsg_hspc($request_product['variantenInfo']['key']); ?>
+<?php } ?>
+<?php /* Variantenanzeige im Produkt ENDE */ ?>
+<?php /* Gewichtsanzeige im Produkt BEGIN */ ?>
+<?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPageProduct'))) { ?>
+
+<?php echo wpsg_pad_right(' ', 5); ?>
+<?php echo __('Gewicht', 'wpsg'); ?>: <?php echo wpsg_ff($request_product['product_data']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?>
+<?php } ?>
+<?php /* Gewichtsanzeige im Produkt ENDE */ ?>
+<?php /* Produktvariablen BEGIN */ ?>
+<?php if ($this->hasMod('wpsg_mod_productvars') && wpsg_isSizedInt($this->get_option('wpsg_mod_request_productvars')) && wpsg_isSizedArray($request_product['pv'])) { ?>
+<?php foreach ($request_product['product_data']['pv'] as $pv) { ?>
+<?php echo wpsg_pad_right(' ', 5); ?>
+<?php echo wpsg_hspc($pv['name']); ?>: <?php if ($pv['typ'] === '3') { ?>
+<?php if (wpsg_isSizedInt($request_product['pv'][$pv['id']])) { ?><?php echo __('Ja', 'wpsg'); ?><?php } else { ?><?php echo __('Nein', 'wpsg'); ?><?php } ?>
+<?php } else { ?>
+<?php echo $request_product['pv'][$pv['id']]; ?>
+<?php } ?>
+<?php } ?>
+<?php } ?>
+<?php /* Produktvariablen ENDE */ ?>
+<?php } ?>
+
+<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+<?php echo wpsg_pad_right(__('Gesamtpreis (Netto)', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')), 46); ?>
+<?php foreach ((array)$this->view['requestlist']['tax'] as $tax_key => $tax) { ?>
+<?php echo wpsg_pad_right(wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg').':', $tax['name']), 45); ?><?php echo wpsg_pad_left(wpsg_ff($tax['tax_calc_value'], $this->get_option('wpsg_currency')), 31); ?>
+<?php } ?>
+<?php echo wpsg_pad_right(__('Gesamtpreis (Brutto)', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')), 46); ?>
+<?php } else { ?>
+<?php echo wpsg_pad_right(__('Gesamtpreis (Brutto)', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')), 46); ?>
+<?php foreach ((array)$this->view['requestlist']['tax'] as $tax_key => $tax) { ?>
+<?php echo wpsg_pad_right(wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg').':', $tax['name']), 45); ?><?php echo wpsg_pad_left(wpsg_ff($tax['tax_calc_value'], $this->get_option('wpsg_currency')), 31); ?>
+<?php } ?>
+<?php echo wpsg_pad_right(__('Gesamtpreis (Netto)', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')), 46); ?>
+<?php } ?>
+<?php /* Gewichtsanzeige BEGIN */ ?>
+<?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPage'))) { ?>
+
+<?php echo wpsg_pad_right(__('Gesamtgewicht', 'wpsg').': ', 26 + $prod_col); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['weight'], $this->get_option('wpsg_mod_weight_unit')), 15); ?>
+<?php } ?>
+<?php /* Gewichtsanzeige ENDE */ ?>
+<?php /* Bestellvariablen BEGIN */ ?>
+<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_ordervars')) && wpsg_isSizedArray($this->view['orderVars'])) { ?>
+<?php echo __('Zusätzliche Angaben', 'wpsg'); ?>:
+
+<?php foreach ($this->view['orderVars'] as $ov_index => $ov) { ?>
+<?php echo wpsg_pad_right(wpsg_hspc($ov['name']).': ', 30); ?><?php if ($ov['typ'] === '3') { ?>
+<?php if (wpsg_isSizedInt($this->view['requestlist']['ov'][$ov['id']])) { ?><?php echo wpsg_pad_left(__('Ja', 'wpsg'), 46); ?><?php } else { ?><?php echo wpsg_pad_left(__('Nein', 'wpsg'), 46); ?><?php } ?>
+<?php } else { ?>
+<?php echo wpsg_pad_left($this->view['requestlist']['ov'][$ov['id']], 46); ?>
+<?php } ?>
+<?php } ?>
+<?php } ?>
+<?php /* Bestellvariablen ENDE */ ?>
+
+
+<?php if (wpsg_isSizedString($this->view['requestlist']['customer']['comment'])) { ?>
+<?php echo __('Kommentar', 'wpsg'); ?>:
+<?php echo wpsg_getStr($this->view['requestlist']['customer']['comment']); ?>
+<?php }?>
+<?php echo __('Kontaktdaten', 'wpsg'); ?>:
+
+<?php echo wpsg_pad_right(__('Firma', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['firma']), 46); ?>
+<?php echo wpsg_pad_right(__('Anrede', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['title']), 46); ?>
+<?php echo wpsg_pad_right(__('Vorname', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['vname']), 46); ?>
+<?php echo wpsg_pad_right(__('Name', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['name']), 46); ?>
+<?php echo wpsg_pad_right(__('E-Mail', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['email']), 46); ?>
+<?php echo wpsg_pad_right(__('Fax', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['fax']), 46); ?>
+<?php echo wpsg_pad_right(__('Tel.', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['tel']), 46); ?>
+<?php echo wpsg_pad_right(__('Strasse', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['strasse']), 46); ?>
+<?php echo wpsg_pad_right(__('PLZ', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['plz']), 46); ?>
+<?php echo wpsg_pad_right(__('Ort', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['ort']), 46); ?>
+<?php echo wpsg_pad_right(__('UStIdNr.', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['ustidnr']), 46); ?>
+<?php /* Automatische Einbindung der benutzerdefinierten Felder BEGIN */ ?>
+<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_customerdata'))) { ?>
+<?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
+<?php echo wpsg_pad_right(__($c['name'], 'wpsg').': ', 30); ?><?php if ($c['typ'] == '2') { ?>
+<?php if (wpsg_isSizedInt($this->view['requestlist']['customer']['custom'][$c_id])) { ?><?php echo wpsg_pad_left(__('Ja', 'wpsg'), 46); ?><?php } else { ?><?php echo wpsg_pad_left(__('Nein', 'wpsg'), 46); ?><?php } ?>
+<?php } else { ?>
+<?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['custom'][$c_id]), 46); ?>
+<?php } ?>
+<?php } } ?>
+<?php } ?>
+<?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?> \ No newline at end of file
diff --git a/views/mods/mod_request/requestmail_html.phtml b/views/mods/mod_request/requestmail_html.phtml
new file mode 100644
index 0000000..6fc20fa
--- /dev/null
+++ b/views/mods/mod_request/requestmail_html.phtml
@@ -0,0 +1,202 @@
+<?php
+
+ /**
+ * HTML E-Mail Template für die Daten der Anfrage
+ * wird von adminmail_html.phtml und customermail_html.phtml verwendet
+ */
+
+?>
+<div class="baskettable_wrap">
+ <table class="baskettable" cellpadding="2" cellspacing="0" style="cell-padding:4px;">
+ <tr>
+ <td><?php echo __('Pos', 'wpsg'); ?></td>
+ <td><?php echo __('Produkt', 'wpsg'); ?></td>
+ <td><?php echo __('Stückpreis', 'wpsg'); ?></td>
+ <?php if (sizeof($this->view['requestlist']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td><?php echo __('MwSt.', 'wpsg'); ?></td>
+ <?php } ?>
+ <td><?php echo __('Anzahl', 'wpsg'); ?></td>
+ <td class="col_sum"><?php echo __('Summe', 'wpsg'); ?></td>
+ </tr>
+ <?php $i = 0; foreach ((array)$this->view['requestlist']['products'] as $product_index => $request_product) { $i ++; ?>
+ <tr>
+ <td><?php echo $i; ?>.</td>
+ <td><?php echo ((wpsg_isSizedString($request_product['product_data']['detailname']))?$request_product['product_data']['detailname']:$request_product['product_data']['name']); ?></td>
+ <td><?php echo wpsg_ff($request_product['price'], $this->get_option('wpsg_currency')); ?></td>
+ <?php if (sizeof($this->view['requestlist']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td><?php echo wpsg_ff($request_product['product_data']['mwst_value'], '%'); ?></td>
+ <?php } ?>
+ <td><?php echo $request_product['amount']; ?></td>
+ <td class="col_sum"><?php echo wpsg_ff($request_product['price'] * $request_product['amount'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+
+ <?php /* Variantenanzeige im Produkt BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_varianten') && $this->callMod('wpsg_mod_varianten', 'isVariantsProductKey', array($request_product['product_key']))) { ?>
+ <tr>
+ <td colspan="2"><?php echo __('Variante', 'wpsg'); ?>:</td>
+ <td colspan="<?php echo (3 + $this->view['addColspan']); ?>"><?php echo wpsg_hspc($request_product['variantenInfo']['key']); ?></td>
+ </tr>
+ <?php } ?>
+ <?php /* Variantenanzeige im Produkt ENDE */ ?>
+
+ <?php /* Gewichtsanzeige im Produkt BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPageProduct'))) { ?>
+ <tr>
+ <td colspan="2"><?php echo __('Gewicht', 'wpsg'); ?>:</td>
+ <td colspan="<?php echo (3 + $this->view['addColspan']); ?>"><?php echo wpsg_ff($request_product['product_data']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?></td>
+ </tr>
+ <?php } ?>
+ <?php /* Gewichtsanzeige im Produkt ENDE */ ?>
+
+ <?php /* Produktvariablen BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_productvars') && wpsg_isSizedInt($this->get_option('wpsg_mod_request_productvars')) && wpsg_isSizedArray($request_product['pv'])) { ?>
+ <?php foreach ($request_product['product_data']['pv'] as $pv) { ?>
+ <tr>
+ <td colspan="2"><?php echo wpsg_hspc($pv['name']); ?>:</td>
+ <td colspan="<?php echo (3 + $this->view['addColspan']); ?>">
+ <?php if ($pv['typ'] === '3') { ?>
+ <?php if (wpsg_isSizedInt($request_product['pv'][$pv['id']])) { ?><?php echo __('Ja', 'wpsg'); ?><?php } else { ?><?php echo __('Nein', 'wpsg'); ?><?php } ?>
+ <?php } else { ?>
+ <?php echo wpsg_hspc($request_product['pv'][$pv['id']]); ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php } ?>
+ <?php /* Produktvariablen ENDE */ ?>
+
+ <?php } ?>
+ <tr><td colspan="<?php echo (5 + $this->view['addColspan']); ?>">&nbsp;</td></tr>
+
+ <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo __('Gesamtpreis (Netto)', 'wpsg'); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php foreach ((array)$this->view['requestlist']['tax'] as $tax_key => $tax) { ?>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $tax['name']); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($tax['tax_calc_value'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo __('Gesamtpreis (Brutto)', 'wpsg'); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } else { ?>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo __('Gesamtpreis (Brutto)', 'wpsg'); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php foreach ((array)$this->view['requestlist']['tax'] as $tax_key => $tax) { ?>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $tax['name']); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($tax['tax_calc_value'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo __('Gesamtpreis (Netto)', 'wpsg'); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+
+ <?php /* Gewichtsanzeige BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPage'))) { ?>
+ <tr><td colspan="<?php echo (5 + $this->view['addColspan']); ?>">&nbsp;</td></tr>
+ <tr>
+ <td colspan="<?php echo (4 + $this->view['addColspan']); ?>"><?php echo __('Gesamtgewicht', 'wpsg'); ?>:</td>
+ <td class="col_sum"><?php echo wpsg_ff($this->view['requestlist']['sum']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?></td>
+ </tr>
+ <?php } ?>
+ <?php /* Gewichtsanzeige ENDE */ ?>
+
+ </table>
+</div>
+
+<?php /* Bestellvariablen BEGIN */ ?>
+<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_ordervars')) && wpsg_isSizedArray($this->view['orderVars'])) { ?>
+<h2><?php echo __('Zusätzliche Angaben', 'wpsg'); ?>:</h2>
+
+<table class="contenttable">
+ <?php foreach ($this->view['orderVars'] as $ov_index => $ov) { ?>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo wpsg_hspc($ov['name']); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1">
+ <?php if ($ov['typ'] === '3') { ?>
+ <?php if (wpsg_isSizedInt($this->view['requestlist']['ov'][$ov['id']])) { ?><?php echo __('Ja', 'wpsg'); ?><?php } else { ?><?php echo __('Nein', 'wpsg'); ?><?php } ?>
+ <?php } else { ?>
+ <?php echo wpsg_hspc($this->view['requestlist']['ov'][$ov['id']]); ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+</table>
+<?php } ?>
+<?php /* Bestellvariablen ENDE */ ?>
+
+<?php if (wpsg_isSizedString($this->view['requestlist']['customer']['comment'])) { ?>
+<h2><?php echo __('Kommentar', 'wpsg'); ?>:</h2>
+<p><?php echo wpsg_getStr($this->view['requestlist']['customer']['comment']); ?></p>
+<?php } ?>
+
+<h2><?php echo __('Kontaktdaten', 'wpsg'); ?>:</h2>
+
+<table class="contenttable">
+ <?php
+
+ // Hilfsarray, damit ich nicht so viel schreiben muss
+ $arFields = array(
+ 'firma' => __('Firma', 'wpsg'),
+ 'title' => __('Anrede', 'wpsg'),
+ 'vname' => __('Vorname', 'wpsg'),
+ 'name' => __('Name', 'wpsg'),
+ 'email' => __('E-Mail', 'wpsg'),
+ 'fax' => __('Fax', 'wpsg'),
+ 'tel' => __('Tel.', 'wpsg'),
+ 'strasse' => __('Strasse', 'wpsg'),
+ 'plz' => __('PLZ', 'wpsg'),
+ 'ort' => __('Ort', 'wpsg'),
+ 'ustidnr' => __('UStIdNr.', 'wpsg')
+ );
+
+ ?>
+ <?php foreach ($arFields as $field_name => $label) { ?>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo wpsg_hspc($label); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php
+
+ if ($field_name == "email")
+ {
+
+ echo '<a href="mailto:'.wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer'][$field_name])).'">'.wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer'][$field_name])).'</a>';
+
+ }
+ else
+ {
+
+ echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer'][$field_name]));
+
+ }
+
+ ?></td>
+ </tr>
+ <?php } ?>
+
+ <?php /* Automatische Einbindung der benutzerdefinierten Felder BEGIN */ ?>
+ <?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_customerdata'))) { ?>
+ <?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __($c['name'], 'wpsg'); ?></td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1">
+ <?php if ($c['typ'] == '2') { ?>
+ <?php if (wpsg_isSizedInt($this->view['requestlist']['customer']['custom'][$c_id])) { ?><?php echo __('Ja', 'wpsg'); ?><?php } else { ?><?php echo __('Nein', 'wpsg'); ?><?php } ?>
+ <?php } else { ?>
+ <?php echo wpsg_getStr($this->view['requestlist']['customer']['custom'][$c_id]); ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } } ?>
+ <?php } ?>
+ <?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
+
+</table> \ No newline at end of file
diff --git a/views/mods/mod_request/requestpage.phtml b/views/mods/mod_request/requestpage.phtml
new file mode 100644
index 0000000..1060635
--- /dev/null
+++ b/views/mods/mod_request/requestpage.phtml
@@ -0,0 +1,412 @@
+<?php
+
+ /**
+ * Template für die Anfrageseite
+ */
+
+
+ //wpsg_debug($this->view['requestlist']);
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ <?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
+
+ if (typeof jQuery.validationEngine == "object")
+ {
+
+ jQuery("#form-step2").validationEngine('attach', {promptPosition : "bottomLeft", scroll: false});
+
+ jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function(){
+ jQuery("#form-step2").validationEngine('detach');
+ });
+
+ }
+
+ <?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?>
+
+ jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
+ jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
+ jQuery("#form-step2").validate( {
+ ignore: '',
+ errorClass: 'wpsg_error',
+ onsubmit: false,
+ showErrors: function(errorMap, errorList) {
+
+ this.defaultShowErrors();
+
+ }
+ } );
+
+ jQuery('#wpsg_requestbutton').bind('click', function() {
+
+ var bReturn = jQuery('#form-step2').validate().form();
+ if (jQuery('#form-step2 input.wpsg_error').length > 0) jQuery('#form-step2 input.wpsg_error')[0].focus();
+ return bReturn;
+
+ } );
+
+ <?php } ?>
+
+ jQuery('.wpsg_checkout input').bind('keyup', function(e) {
+
+ if(e.keyCode == 13)
+ {
+ jQuery('#wpsg_checkout2button').click();
+ }
+
+ } );
+
+ } );
+
+/* ]]> */</script>
+<div class="wpsg_mod_request_requestpage">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <?php if (wpsg_isSizedArray($this->view['requestlist']['products'])) { ?>
+
+ <form id="wpsg_requestpage_form" name="wpsg_requestpage_form" method="post" action="<?php echo $this->callMod('wpsg_mod_request', 'getRequestPageUrl'); ?>">
+
+ <h2><?php echo __('Produkte auf Ihrer Anfrageliste', 'wpsg'); ?></h2>
+
+ <div class="wpsg_spacer"></div>
+
+ <table>
+ <thead>
+ <tr>
+ <th class="wpsg_cell_action">&nbsp;</th>
+ <th class="wpsg_cell_amount"><?php echo __('Anzahl', 'wpsg'); ?></th>
+ <th class="wpsg_cell_price"><?php echo __('Einzelpreis', 'wpsg'); ?></th>
+ <?php if (wpsg_isSizedInt($this->view['addColspan'])) { ?>
+ <th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
+ <?php } ?>
+ <th class="wpsg_cell_sumprice"><?php echo __('Gesamtpreis', 'wpsg'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <?php foreach ($this->view['requestlist']['products'] as $request_product) { ?>
+ <tr class="wpsg_row_product1">
+ <td class="wpsg_cell_action" rowspan="<?php echo (2 + $request_product['addRowspan']); ?>">
+
+ <a class="wpsg_requestpage_removelink" href="<?php echo $this->callMod('wpsg_mod_request', 'getRemoveLinkURL', array($request_product['product_index'])); ?>" title="<?php echo __('Produkt von Anfrageliste entfernen', 'wpsg'); ?>" onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass sie das Produkt aus der Anfrageliste entfernen möchten?', 'wpsg'); ?>');">
+ <img src="<?php echo WPSG_URL; ?>views/gfx/bin_x.png" alt="<?php echo __('Löschen', 'wpsg'); ?>" />
+ </a>
+
+ </td>
+ <td class="wpsg_cell_name" colspan="<?php echo $this->view['addColspan'] + 3; ?>">
+
+ <?php /* Produktbild BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder') && $this->get_option('wpsg_mod_request_requestpageimage') == '1') {
+
+ if (wpsg_isSizedString($request_product['product_data']['varianten_image'])) $arBilder = array($request_product['product_data']['varianten_image']);
+ else $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($request_product['product_id']));
+
+ ?>
+ <?php if (wpsg_isSizedArray($arBilder)) { ?>
+ <div class="wpsg_basket_productimage">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($request_product['product_id'], array_shift($arBilder), 30, 30, 'c')); ?>" alt="<?php echo wpsg_hspc((($request_product['product_data']['detailname'] != '')?$request_product['product_data']['detailname']:$request_product['product_data']['name'])); ?>" />
+ </div>
+ <?php } ?>
+ <?php } ?>
+ <?php /* Produktbild ENDE */ ?>
+
+ <?php if ($this->getProduktLink($request_product)) { ?><a href="<?php echo $this->getProduktLink($request_product); ?>"><?php } ?>
+ <?php echo wpsg_hspc((($request_product['product_data']['detailname'] != '')?$request_product['product_data']['detailname']:$request_product['product_data']['name'])); ?>
+ <?php if ($this->getProduktLink($request_product)) { ?></a><?php } ?>
+ </td>
+ </tr>
+ <tr class="wpsg_row_product2">
+ <td class="wpsg_cell_amount">
+ <input type="text" name="wpsg[amount][<?php echo $request_product['product_index']; ?>]" value="<?php echo wpsg_hspc($request_product['amount']); ?>" size="3" />
+ </td>
+ <td class="wpsg_cell_price">
+ <?php echo wpsg_ff($request_product['price'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ <?php if (wpsg_isSizedInt($this->view['addColspan'])) { ?>
+ <td class="wpsg_cell_mwst">
+ <?php echo wpsg_ff($request_product['product_data']['mwst_value'], '%'); ?>
+ </td>
+ <?php } ?>
+ <td class="wpsg_cell_sumprice">
+ <?php echo wpsg_ff($request_product['price'] * $request_product['amount'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+
+ <?php /* Variantenanzeige im Produkt BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_varianten') && $this->callMod('wpsg_mod_varianten', 'isVariantsProductKey', array($request_product['product_key']))) { ?>
+ <tr class="wpsg_row_product_varianten">
+ <td class="wpsg_cell_label"><?php echo __('Variante', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_value" colspan="<?php echo (2 + $this->view['addColspan']); ?>"><?php echo wpsg_hspc($request_product['variantenInfo']['key']); ?></td>
+ </tr>
+ <?php } ?>
+ <?php /* Variantenanzeige im Produkt ENDE */ ?>
+
+ <?php /* Gewichtsanzeige im Produkt BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPageProduct'))) { ?>
+ <tr class="wpsg_row_product_weight">
+ <td class="wpsg_cell_label"><?php echo __('Gewicht', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_value" colspan="<?php echo (2 + $this->view['addColspan']); ?>"><?php echo wpsg_ff($request_product['product_data']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?></td>
+ </tr>
+ <?php } ?>
+ <?php /* Gewichtsanzeige im Produkt ENDE */ ?>
+
+
+ <?php /* Produktvariablen BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_productvars') && wpsg_isSizedInt($this->get_option('wpsg_mod_request_productvars')) && wpsg_isSizedArray($request_product['product_data']['pv'])) { ?>
+ <?php foreach ($request_product['product_data']['pv'] as $pv) { ?>
+ <tr class="wpsg_row_product_pv">
+ <td class="wpsg_cell_label">
+ <label class="wpsg_checkout" for="wpsg_request_pv_<?php echo $pv['id']; ?>_<?php echo $request_product['product_index']; ?>">
+ <?php echo wpsg_hspc($pv['name']); ?>
+ <?php if (wpsg_isSizedInt($pv['pflicht'])) { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ </td>
+ <td class="wpsg_cell_value" colspan="<?php echo (2 + $this->view['addColspan']); ?>">
+
+ <?php if ($pv['typ'] === '1') { $possible_options = explode('|', $pv['auswahl']); /* Auswahl */ ?>
+ <select id="wpsg_request_pv_<?php echo $pv['id']; ?>_<?php echo $request_product['product_index']; ?>" name="wpsg[request][pv][<?php echo $request_product['product_index']; ?>][<?php echo $pv['id']; ?>]">
+ <option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
+ <?php foreach ((array)$possible_options as $option) { ?>
+ <option value="<?php echo wpsg_hspc($option) ?>" <?php echo (($option == wpsg_hspc(wpsg_getStr($request_product['pv'][$pv['id']])))?'selected="selected"':''); ?>><?php echo wpsg_hspc($option); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($pv['typ'] === '2') { /* Text */ ?>
+ <input id="wpsg_request_pv_<?php echo $pv['id']; ?>_<?php echo $request_product['product_index']; ?>" type="text" name="wpsg[request][pv][<?php echo $request_product['product_index']; ?>][<?php echo $pv['id']; ?>]" value="<?php echo wpsg_hspc(wpsg_getStr($request_product['pv'][$pv['id']])); ?>" />
+ <?php } else if ($pv['typ'] === '3') { /* Checkbox */ ?>
+ <input type="hidden" name="wpsg[request][pv][<?php echo $request_product['product_index']; ?>][<?php echo $pv['id']; ?>]" value="0" />
+ <input id="wpsg_request_pv_<?php echo $pv['id']; ?>_<?php echo $request_product['product_index']; ?>" type="checkbox" name="wpsg[request][pv][<?php echo $request_product['product_index']; ?>][<?php echo $pv['id']; ?>]" value="1" <?php echo ((wpsg_isSizedInt($request_product['pv'][$pv['id']]))?'checked="checked"':''); ?>/>
+ <?php } ?>
+
+ </td>
+ </tr>
+ <?php } ?>
+ <?php } ?>
+ <?php /* Produktvariablen ENDE */ ?>
+
+ <?php } ?>
+
+ </tbody>
+ <tfoot>
+ <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <tr class="wpsg_cell_total_price">
+ <td class="wpsg_cell_total_label" colspan="<?php echo $this->view['addColspan'] + 3; ?>"><?php echo __('Gesamtpreis (Netto)', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_total_netto"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <tr class="wpsg_cell_total_price">
+ <td class="wpsg_cell_total_label" colspan="<?php echo $this->view['addColspan'] + 3; ?>"><?php echo __('Gesamtpreis (Brutto)', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_total_brutto"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } else { ?>
+ <tr class="wpsg_cell_total_price">
+ <td class="wpsg_cell_total_label" colspan="<?php echo $this->view['addColspan'] + 3; ?>"><?php echo __('Gesamtpreis (Brutto)', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_total_brutto"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <tr class="wpsg_cell_total_price">
+ <td class="wpsg_cell_total_label" colspan="<?php echo $this->view['addColspan'] + 3; ?>"><?php echo __('Gesamtpreis (Netto)', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_total_netto"><?php echo wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+
+ <?php /* Gewichtsanzeige BEGIN */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPage'))) { ?>
+ <tr class="wpsg_cell_total_weight">
+ <td class="wpsg_cell_total_label" colspan="<?php echo $this->view['addColspan'] + 3; ?>"><?php echo __('Gesamtgewicht', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_total_netto"><?php echo wpsg_ff($this->view['requestlist']['sum']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?>
+ </tr>
+ <?php } ?>
+ <?php /* Gewichtsanzeige ENDE */ ?>
+
+ </tfoot>
+ </table>
+
+ <input type="submit" name="submit_requestpage_refresh" id="wpsg_requestbutton" class="wpsg_mod_request_button_refresh" value="<?php echo __('Anfrageliste aktualisieren', 'wpsg'); ?>" />
+
+ <?php /* Anfang Bestellvariablen */ ?>
+ <?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_ordervars')) && wpsg_isSizedArray($this->view['orderVars'])) { ?>
+ <h2><?php echo __('Zusätzliche Angaben', 'wpsg'); ?></h2>
+ <?php foreach ($this->view['orderVars'] as $ov_index => $ov) { ?>
+ <div class="wpsg_checkoutblock" id="wpsg_checkoutblock_<?php echo $ov['id']; ?>">
+ <?php if ($ov['typ'] === '1') { $possible_options = explode('|', $ov['auswahl']); /* Auswahl */ ?>
+ <label class="wpsg_checkout_typ_<?php echo $ov['typ']; ?> wpsg_checkout" for="wpsg_ov_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['name']); ?><?php if (wpsg_isSizedInt($ov['pflicht'])) { ?>&nbsp;<span class="wpsg_required">*</span><?php } ?></label>:
+ <select name="wpsg[request][ov][<?php echo $ov['id']; ?>]" class="<?php echo ((wpsg_isSizedInt($ov['pflicht']))?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ov_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_ov_<?php echo $ov['id']; ?>">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach ($possible_options as $option) { ?>
+ <option value="<?php echo wpsg_hspc($option) ?>" <?php echo (($option == wpsg_hspc(wpsg_getStr($this->view['requestlist']['ov'][$ov['id']])))?'selected="selected"':''); ?>><?php echo wpsg_hspc($option); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($ov['typ'] === '2') { /* Textfeld */ ?>
+ <label class="wpsg_checkout_typ_<?php echo $ov['typ']; ?> wpsg_checkout" for="wpsg_ov_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['name']); ?><?php if (wpsg_isSizedInt($ov['pflicht'])) { ?> <span class="wpsg_required">*</span><?php } ?>:</label>
+ <input type="text" class="<?php echo ((wpsg_isSizedInt($ov['pflicht']))?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ov_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_ov_<?php echo $ov['id']; ?>" name="wpsg[request][ov][<?php echo $ov['id']; ?>]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['ov'][$ov['id']])); ?>" />
+ <?php } else if ($ov['typ'] === '3') { /* Checkbox */ ?>
+ <input type="hidden" value="0" name="wpsg[request][ov][<?php echo $ov['id']; ?>]" />
+ <input type="checkbox" <?php echo ((wpsg_isSizedInt($this->view['requestlist']['ov'][$ov['id']]))?'checked="checked"':''); ?> class="<?php echo ((wpsg_isSizedInt($ov['pflicht']))?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ov_".$ov['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_ov_<?php echo $ov['id']; ?>" name="wpsg[request][ov][<?php echo $ov['id']; ?>]" value="1" />
+ <label class="wpsg_checkout_typ_<?php echo $ov['typ']; ?> wpsg_checkout" for="wpsg_ov_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['name']); ?><?php if (wpsg_isSizedInt($ov['pflicht'])) { ?> <span class="wpsg_required">*</span><?php } ?></label>
+ <?php } ?>
+ </div>
+ <?php } ?>
+ <?php } ?>
+ <?php /* Ende Bestellvariablen */ ?>
+
+ <h2><?php echo __('Kontaktdaten', 'wpsg'); ?></h2>
+
+ <div class="wpsg_checkoutblock" id="wpsg_firma">
+ <label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['firma'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("firma", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_firma" name="wpsg[request][customer][firma]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['firma'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_anrede">
+ <label for="wpsg_title"><?php echo __('Anrede', 'wpsg'); ?>
+ <?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
+ <select class="<?php echo (($this->view['pflicht']['anrede'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[request][customer][title]">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
+ <option value="<?php echo wpsg_hspc($t); ?>" <?php echo (($this->view['requestlist']['customer']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_vorname">
+ <label for="vname" class="wpsg_checkout"><?php echo __("Vorname", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="vname" name="wpsg[request][customer][vname]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['vname'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_name">
+ <label for="name" class="wpsg_checkout"><?php echo __("Name", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="name" name="wpsg[request][customer][name]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['name'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_email">
+ <label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="email" name="wpsg[request][customer][email]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['email'])); ?>" />
+ </div>
+
+ <?php if (wpsg_isSizedInt($this->view['pflicht']['emailconfirm'])) { ?>
+ <div class="wpsg_checkoutblock" id="wpsg_email2">
+ <label for="email" class="wpsg_checkout"><?php echo __("E-Mail (Wiederholung)", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="email2" name="wpsg[request][customer][email2]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['email2'])); ?>" />
+ </div>
+ <?php } ?>
+
+ <div class="wpsg_checkoutblock" id="wpsg_geburtsdatum">
+ <label for="geb" class="wpsg_checkout"><?php echo __('Geburtsdatum',"wpsg"); ?>
+ <?php if ($this->view['pflicht']['geb'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['geb'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("geb", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="geb" name="wpsg[request][customer][geb]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['geb'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_fax">
+ <label for="fax" class="wpsg_checkout"><?php echo __("Fax.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['fax'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['fax'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("fax", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="fax" name="wpsg[request][customer][fax]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['fax'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_telefon">
+ <label for="tel" class="wpsg_checkout"><?php echo __("Tel.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['tel'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['tel'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("tel", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="tel" name="wpsg[request][customer][tel]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['tel'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_strasse">
+ <label for="strasse" class="wpsg_checkout"><?php echo __("Strasse Nr.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="strasse" name="wpsg[request][customer][strasse]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['strasse'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_postleitzahl">
+ <label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="plz" name="wpsg[request][customer][plz]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['plz'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_ort">
+ <label for="ort" class="wpsg_checkout"><?php echo __("Ort", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['ort'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="ort" name="wpsg[request][customer][ort]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['ort'])); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_land">
+ <label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <select name="wpsg[request][customer][land]" class="<?php echo (($this->view['pflicht']['land'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach ($this->view['countries'] as $oCountry) { ?>
+ <option value="<?php echo wpsg_hspc($oCountry->id); ?>" <?php echo (($oCountry->id == $this->view['requestlist']['customer']['land'])?'selected="selected"':((!wpsg_isSizedInt($this->view['requestlist']['customer']['land']) && $this->get_option('wpsg_defaultland') == $oCountry->id)?'selected="selected"':'')); ?>><?php echo wpsg_hspc($oCountry->getName()); ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock" id="wpsg_ustidnr">
+ <label for="wpsg_ustidnr" class="wpshopgermany_checkout"><?php echo __("UStIdNr.", "wpsg"); ?>
+ <?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+ </label>
+ <input class="<?php echo (($this->view['pflicht']['ustidnr'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("ustidnr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_ustidnr" name="wpsg[request][customer][ustidnr]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['ustidnr'])); ?>" />
+ </div>
+
+ <?php /* Automatische Einbindung der benutzerdefinierten Felder */ ?>
+ <?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_customerdata'))) { ?>
+ <?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
+ <div class="wpsg_checkoutblock">
+ <label class="wpsg_cv wpsg_checkout" for="wpsg_cv_<?php echo $c_id; ?>">
+ <?php if ($c['typ'] == '0') { // Textfeld ?>
+ <?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
+ <input id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[request][customer][custom][<?php echo $c_id; ?>]" type="text" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['custom'][$c_id])); ?>" />
+ <?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
+ <?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
+ <select id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[request][customer][custom][<?php echo $c_id; ?>]">
+ <option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
+ <?php foreach ((array)$arAuswahl as $a) { ?>
+ <option value="<?php echo wpsg_hspc($a); ?>" <?php echo (($a == wpsg_getStr($this->view['requestlist']['customer']['custom'][$c_id]))?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($c['typ'] == '2') { // Checkbox ?>
+ <input type="hidden" name="wpsg[request][customer][custom][<?php echo $c_id; ?>]" value="0" />
+ <input id="wpsg_cv_<?php echo $c_id; ?>" class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[request][customer][custom][<?php echo $c_id; ?>]" value="1" <?php echo ((wpsg_getStr($this->view['requestlist']['customer']['custom'][$c_id]) == '1')?'checked="checked"':''); ?> />
+ <?php echo wpsg_hspc(__($c['name'], 'wpsg')); ?><?php if ($c['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>
+ <?php } ?>
+ </label>
+ </div>
+ <?php } } ?>
+ <?php } ?>
+ <?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
+
+ <h2><?php echo __('Kommentar', 'wpsg'); ?></h2>
+
+ <div class="wpsg_spacer"></div>
+
+ <div class="wpsg_inner wpsg_commentblock">
+ <textarea name="wpsg[request][customer][comment]" id="wpsg_request_comment"><?php echo wpsg_hspc(wpsg_getStr($this->view['requestlist']['customer']['comment'])); ?></textarea>
+ </div>
+
+ <br />
+
+ <input type="submit" name="submit_requestpage" class="wpsg_mod_request_button_submit" value="<?php echo __('Anfrage starten', 'wpsg'); ?>" />
+
+ <br />
+
+ </form>
+
+ <?php } else { ?>
+ <p class="wpsg_mod_request_requestpage_noentrys"><?php echo __('Es befinden sich keine Produkte auf der Anfrageliste.', 'wpsg'); ?>
+ <?php } ?>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_request/settings_edit.phtml b/views/mods/mod_request/settings_edit.phtml
new file mode 100644
index 0000000..174cbf1
--- /dev/null
+++ b/views/mods/mod_request/settings_edit.phtml
@@ -0,0 +1,23 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Moduls "AnfrageProdukte"
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_request_page', __('Anfrageseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_request_page'), array ('help' => 'wpsg_mod_request_page')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_request_redirect', __('Weiterleitung nach Anfrage', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_request_redirect'), array ('help' => 'wpsg_mod_request_redirect')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_request_afterinsert', __('Nach neuem Produkt auf Merkliste', 'wpsg'), array(
+ wpsg_mod_request::ACTION_STAYONPAGE => __('Auf Seite bleiben', 'wpsg'),
+ wpsg_mod_request::ACTION_GOTOREQUESTPAGE => __('Zur Anfrageseite leiten', 'wpsg'),
+ wpsg_mod_request::ACTION_SHOWREQUESTPAGELB => __('Anfrageseite im Fenster anzeigen', 'wpsg')
+), $this->get_option('wpsg_mod_request_afterinsert'), array ('help' => 'wpsg_mod_request_afterinsert')); ?>
+<br />
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_request_customerdata', __('Zusätzliche Kundendaten mit abfragen', 'wpsg'), $this->get_option('wpsg_mod_request_customerdata'), array('help' => 'wpsg_mod_request_customerdata')); ?>
+<?php if ($this->hasMod('wpsg_mod_ordervars')) { ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_request_ordervars', __('Bestellvariablen mit abfragen', 'wpsg'), $this->get_option('wpsg_mod_request_ordervars'), array('help' => 'wpsg_mod_request_ordersvar')); ?>
+<?php } ?>
+<?php if ($this->hasMod('wpsg_mod_productvars')) { ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_request_productvars', __('Produktvariablen mit abfragen', 'wpsg'), $this->get_option('wpsg_mod_request_productvars'), array('help' => 'wpsg_mod_request_productvars')); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_scaleprice/product_bottom.phtml b/views/mods/mod_scaleprice/product_bottom.phtml
new file mode 100644
index 0000000..44618d0
--- /dev/null
+++ b/views/mods/mod_scaleprice/product_bottom.phtml
@@ -0,0 +1,45 @@
+<?php
+
+ /**
+ * Template für die Integration der Staffelanzeige in das Produkttemplate
+ * Muss in den Darstellungsoptionen aktiviert werden
+ */
+
+?>
+<div class="wpsg_mod_scaleprice_producttemplate">
+ <?php if ($this->view['wpsg_mod_scaleprice']['typ'] == wpsg_mod_scaleprice::TYP_QUANTITY) { ?>
+ <?php echo __('Das Produkt hat einen gestaffelten Preis, dieser ergibt sich Anhand der Menge wie folgt:', 'wpsg'); ?><br />
+ <?php } else if ($this->view['wpsg_mod_scaleprice']['typ'] == wpsg_mod_scaleprice::TYP_WEIGHT) { ?>
+ <?php echo __('Das Produkt hat einen gestaffelten Preis, dieser ergibt sich Anhand des Gewichts wie folgt:', 'wpsg'); ?><br />
+ <?php } ?>
+ <ul>
+
+ <?php if ($this->view['wpsg_mod_scaleprice']['typ'] != wpsg_mod_scaleprice::TYP_QUANTITY || $this->view['wpsg_mod_scaleprice']['scale'][0]['scale'] != '1') { ?>
+ <li>
+ <?php echo __('Bis ', 'wpsg'); ?>
+ <?php if ($this->view['wpsg_mod_scaleprice']['typ'] == wpsg_mod_scaleprice::TYP_QUANTITY) { ?>
+ <?php echo wpsg_ff($this->view['wpsg_mod_scaleprice']['scale'][0]['scale'], __('Stück', 'wpsg')); ?>
+ <?php } else if ($this->view['wpsg_mod_scaleprice']['typ'] == wpsg_mod_scaleprice::TYP_WEIGHT) { ?>
+ <?php echo wpsg_ff($this->view['wpsg_mod_scaleprice']['scale'][0]['scale'], $this->get_option('wpsg_mod_weight_unit')); ?>
+ <?php } ?>
+ <?php echo __(' kostet das Produkt ', 'wpsg'); ?>
+ <?php echo wpsg_ff($this->view['wpsg_mod_scaleprice']['base'], $this->get_option('wpsg_currency')); ?> <?php echo __('je Stück', 'wpsg'); ?>
+ <?php $this->callMod('wpsg_mod_fuellmenge', 'renderPriceInfo', array($this->view['wpsg_mod_scaleprice']['base'], $this->view['data']['fmenge'], $this->view['data']['feinheit'])); ?>
+ </li>
+ <?php } ?>
+
+ <?php foreach ((array)$this->view['wpsg_mod_scaleprice']['scale'] as $scale) { ?>
+ <li>
+ <?php echo __('Ab ', 'wpsg'); ?>
+ <?php if ($this->view['wpsg_mod_scaleprice']['typ'] == wpsg_mod_scaleprice::TYP_QUANTITY) { ?>
+ <?php echo wpsg_ff($scale['scale'], __('Stück', 'wpsg')); ?>
+ <?php } else if ($this->view['wpsg_mod_scaleprice']['typ'] == wpsg_mod_scaleprice::TYP_WEIGHT) { ?>
+ <?php echo wpsg_ff($scale['scale'], $this->get_option('wpsg_mod_weight_unit')); ?>
+ <?php } ?>
+ <?php echo __(' kostet das Produkt ', 'wpsg'); ?>
+ <?php echo wpsg_ff($scale['value'], $this->get_option('wpsg_currency')); ?> <?php echo __('je Stück', 'wpsg'); ?>
+ <?php $this->callMod('wpsg_mod_fuellmenge', 'renderPriceInfo', array($scale['value'], $this->view['data']['fmenge'] , $this->view['data']['feinheit'])); ?>
+ </li>
+ <?php } ?>
+ </ul>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_scaleprice/produkt_edit_sidebar.phtml b/views/mods/mod_scaleprice/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..f220dc1
--- /dev/null
+++ b/views/mods/mod_scaleprice/produkt_edit_sidebar.phtml
@@ -0,0 +1,202 @@
+<?php
+
+ /**
+ * Template für die Integration der Staffelpreise in die Produktverwaltung
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_scaleprice_activ').bind('change', function() {
+
+ if (jQuery(this).attr('checked') == 'checked') jQuery('#wpsg_mod_scaleprice_layer').show();
+ else jQuery('#wpsg_mod_scaleprice_layer').hide();
+
+ } ).change();
+
+ jQuery('#wpsg_mod_scaleprice_typ').bind('change', function() { wpsg_mod_scaleprice_refresh(); } );
+ jQuery('#wpsg_mod_scaleprice_calc').bind('change', function() { wpsg_mod_scaleprice_saveAjax(); } );
+
+ <?php /* echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadprodukte&edit_id=<?php echo $this->view['data']['id'] ?>&noheader=1&cmd=upload_file*/?>
+
+ } );
+
+ function wpsg_mod_scaleprice_add()
+ {
+
+ var wpsg_scale = jQuery('#wpsg_mod_scaleprice_scale').val();
+ var wpsg_value = jQuery('#wpsg_mod_scaleprice_value').val();
+
+ jQuery('#wpsg_mod_scaleprice_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=add',
+ data: {
+ 'scale': wpsg_scale,
+ 'value': wpsg_value
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_mod_scaleprice_target').html(data);
+ wpsg_mod_scaleprice_clearErrorField();
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_scaleprice_add()
+
+ function wpsg_mod_scaleprice_refresh()
+ {
+
+ jQuery('#wpsg_mod_scaleprice_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=refresh',
+ data: {
+ typ: jQuery('#wpsg_mod_scaleprice_typ').val(),
+ calc: jQuery('#wpsg_mod_scaleprice_calc').val()
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_mod_scaleprice_target').html(data);
+ wpsg_mod_scaleprice_clearErrorField();
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_scaleprice_refresh()
+
+ function wpsg_mod_scaleprice_saveAjax()
+ {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=ajaxSave',
+ data: {
+ typ: jQuery('#wpsg_mod_scaleprice_typ').val(),
+ calc: jQuery('#wpsg_mod_scaleprice_calc').val()
+ },
+ success: function(data) {
+
+ wpsg_mod_scaleprice_clearErrorField();
+
+ }
+ } );
+
+ } // function wpsg_mod_scaleprice_saveAjax()
+
+ function wpsg_mod_scaleprice_clearErrorField()
+ {
+
+ var wpsg_product_edit_change_new = Array();
+
+ for (var i = 0; i < wpsg_product_edit_change.length; i++)
+ {
+
+ if (!wpsg_product_edit_change[i].match(/^wpsg_mod_scaleprice/))
+ {
+
+ wpsg_product_edit_change_new.push(wpsg_product_edit_change[i]);
+
+ }
+
+ }
+
+ wpsg_product_edit_change = wpsg_product_edit_change_new;
+
+ }
+
+ function wpsg_mod_scaleprice_change(ev)
+ {
+
+ if (!wpsg_in_array(ev.target.id, wpsg_product_edit_change) && jQuery(ev.target).val() != "")
+ {
+
+ wpsg_product_edit_change.push(ev.target.id);
+
+ }
+ else if (jQuery(ev.target).val() == "" && wpsg_in_array(ev.target.id, wpsg_product_edit_change))
+ {
+
+ for (var i = 0; i < wpsg_product_edit_change.length; i++)
+ {
+
+ if (wpsg_product_edit_change[i] == ev.target.id)
+ {
+
+ wpsg_product_edit_change.splice(i, 1);
+ jQuery('#' + ev.target.id).removeClass('wpsg_change_error');
+
+ }
+
+ }
+
+ }
+
+ } // function wpsg_mod_scaleprice_change(ev)
+
+ function wpsg_mod_scaleprice_remove(scale_id)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie diese Staffel entfernen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=remove',
+ data: {
+ scale_id: scale_id
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_mod_scaleprice_row_' + scale_id).remove();
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_scaleprice_remove(scale_id)
+
+/* ]]> */</script>
+
+<div class="postbox" id="wpsg_scaleprice">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Staffelpreise', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+
+ <?php if ($this->view['wpsg_mod_scaleprice']['product']['id'] <= 0) { ?>
+ <p><?php echo __('Staffelpreise können erst nach einmaligem Speichern des Produktes definiert werden.', 'wpsg'); ?>
+ <?php } else { ?>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_scaleprice_activ', __('Staffelpreise aktiv', 'wpsg'), $this->view['wpsg_mod_scaleprice']['product']['wpsg_mod_scaleprice_activ']); ?>
+
+ <div id="wpsg_mod_scaleprice_layer">
+
+ <?php if (wpsg_isSizedArray($this->view['wpsg_mod_scaleprice']['arTyp']) && sizeof($this->view['wpsg_mod_scaleprice']['arTyp']) > 0) { ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_scaleprice_typ', __('Bezugsgröße', 'wpsg'), array(
+ wpsg_mod_scaleprice::TYP_QUANTITY => __('Menge', 'wpsg'),
+ wpsg_mod_scaleprice::TYP_WEIGHT => __('Gewicht', 'wpsg')
+ ), $this->view['wpsg_mod_scaleprice']['product']['wpsg_mod_scaleprice_typ']); ?>
+ <?php } else { ?>
+ <input type="hidden" name="wpsg_mod_scaleprice_typ" id="wpsg_mod_scaleprice_typ" value="0" />
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_Select('wpsg_mod_scaleprice_calc', __('Berechnung', 'wpsg'), array(
+ wpsg_mod_scaleprice::CALC_REPLACE => __('Ersetzung', 'wpsg'),
+ wpsg_mod_scaleprice::CALC_ADD => __('Addition', 'wpsg')
+ ), $this->view['wpsg_mod_scaleprice']['product']['wpsg_mod_scaleprice_calc']); ?>
+
+ <div id="wpsg_mod_scaleprice_target"><?php echo $this->view['wpsg_mod_scaleprice']['list']; ?></div>
+
+ </div>
+
+ <?php } ?>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_scaleprice/scaleList.phtml b/views/mods/mod_scaleprice/scaleList.phtml
new file mode 100644
index 0000000..f08aaf9
--- /dev/null
+++ b/views/mods/mod_scaleprice/scaleList.phtml
@@ -0,0 +1,84 @@
+<?php
+
+ /**
+ * Template für die Liste der Staffelpreise innerhalb der Produktverwaltung
+ */
+
+?>
+<?php foreach ((array)$this->view['wpsg_mod_scaleprice']['arScale'] as $k => $scale) { ?>
+<div class="wpsg_form_field wpsg_mod_scaleprice_row" id="wpsg_mod_scaleprice_row_<?php echo $scale['id']; ?>">
+ <div class="wpsg_form_left">
+ <div class="wpsg_mod_scaleprice_label_scale"><?php echo __('ab', 'wpsg'); ?></div>
+ <div class="wpsg_editable" id="wpsg_mod_scaleprice_<?php echo $scale['id']; ?>_scale"><?php echo wpsg_ff($scale['scale']); ?></div>
+ <div class="wpsg_mod_scaleprice_label_value">
+ <?php if ($this->view['wpsg_mod_scaleprice']['typ'] == wpsg_mod_scaleprice::TYP_WEIGHT) { ?>
+ <?php echo $this->get_option('wpsg_mod_weight_unit'); ?>
+ <?php } else if ($this->view['wpsg_mod_scaleprice']['typ'] == wpsg_mod_scaleprice::TYP_QUANTITY) { ?>
+ <?php echo __('Stück', 'wpsg'); ?>
+ <?php } ?>
+ </div>
+ </div>
+ <div class="wpsg_form_right">
+ <div class="wpsg_editable" id="wpsg_mod_scaleprice_<?php echo $scale['id']; ?>_value"><?php echo wpsg_ff($scale['value']); ?></div>
+ <p class="waehrung"><?php echo $this->get_option('wpsg_currency'); ?></p>
+ <a class="wpsg_icon wpsg_icon_right wpsg_icon_remove" href="" onclick="return wpsg_mod_scaleprice_remove(<?php echo $scale['id']; ?>);" title=""></a>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+
+<script type="text/javascript">
+/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_scaleprice_<?php echo $scale['id']; ?>_scale').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=inlineEdit', {
+ submitdata: {
+ field: 'scale',
+ scale_id: '<?php echo $scale['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#wpsg_mod_scaleprice_<?php echo $scale['id']; ?>_value').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=inlineEdit', {
+ submitdata: {
+ field: 'value',
+ scale_id: '<?php echo $scale['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#wpsg_mod_scaleprice_scale').bind('blur', wpsg_mod_scaleprice_change);
+ jQuery('#wpsg_mod_scaleprice_value').bind('blur', wpsg_mod_scaleprice_change);
+
+ } );
+
+/* ]]> */
+</script>
+
+<?php } ?>
+
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <div class="wpsg_mod_scaleprice_label_scale"><?php echo __('ab', 'wpsg'); ?></div>
+ <input type="text" class="wpsg_mod_scaleprice_scale" name="wpsg_mod_scaleprice_scale" value="" id="wpsg_mod_scaleprice_scale" />
+ <div class="wpsg_mod_scaleprice_label_value">
+ <?php if ($this->view['wpsg_mod_scaleprice']['typ'] == wpsg_mod_scaleprice::TYP_WEIGHT) { ?>
+ <?php echo $this->get_option('wpsg_mod_weight_unit'); ?>
+ <?php } else if ($this->view['wpsg_mod_scaleprice']['typ'] == wpsg_mod_scaleprice::TYP_QUANTITY) { ?>
+ <?php echo __('Stück', 'wpsg'); ?>
+ <?php } ?>
+ </div>
+ </div>
+ <div class="wpsg_form_right">
+ <input type="text" class="wpsg_mod_scaleprice_value" name="wpsg_mod_scaleprice_value" value="" id="wpsg_mod_scaleprice_value">
+ <p class="waehrung"><?php echo $this->get_option('wpsg_currency'); ?></p>
+ <a class="wpsg_icon wpsg_icon_right wpsg_icon_add" href="" onclick="return wpsg_mod_scaleprice_add();" title=""></a>
+ </div>
+ <div class="wpsg_clear"></div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_securepay/gfx/logo_100x25.png b/views/mods/mod_securepay/gfx/logo_100x25.png
new file mode 100644
index 0000000..ad6a0f5
--- /dev/null
+++ b/views/mods/mod_securepay/gfx/logo_100x25.png
Binary files differ
diff --git a/views/mods/mod_securepay/gfx/securepay.png b/views/mods/mod_securepay/gfx/securepay.png
new file mode 100644
index 0000000..86b13aa
--- /dev/null
+++ b/views/mods/mod_securepay/gfx/securepay.png
Binary files differ
diff --git a/views/mods/mod_securepay/order_done.phtml b/views/mods/mod_securepay/order_done.phtml
new file mode 100644
index 0000000..6bc29eb
--- /dev/null
+++ b/views/mods/mod_securepay/order_done.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Template für die Bestellabschlußseite mit SecurePay
+ */
+
+?>
+<?php if (wpsg_isSizedString($this->view['wpsg_mod_securepay']['ident'])) { ?>
+<script src="<?php echo $this->view['wpsg_mod_securepay']['widgetjs']; ?>"></script>
+
+<p><?php echo wpsg_translate(__('Sie bezahlen Ihre Bestellung mit der Nummer #1# in Höhe von #2#.', 'wpsg'), $this->view['order']['onr'], wpsg_ff($this->view['order']['price_gesamt'], $this->get_option('wpsg_currency'))); ?></p>
+
+<form action="<?php echo $this->view['wpsg_mod_securepay']['statusURL']; ?>" id="<?php echo $this->view['wpsg_mod_securepay']['ident']; ?>"><?php echo $this->view['wpsg_mod_securepay']['paymenttypes']; ?></form>
+<?php } else { ?>
+
+<p><?php echo __('SecurePay Zahlung konnte nicht gestartet werden, wenden Sie sich an den Betreiber des Shops.', 'wpsg'); ?></p>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_securepay/settings_edit.phtml b/views/mods/mod_securepay/settings_edit.phtml
new file mode 100644
index 0000000..37501c8
--- /dev/null
+++ b/views/mods/mod_securepay/settings_edit.phtml
@@ -0,0 +1,75 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des SecurePay Moduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_securepay_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_securepay_sandbox'), array('help' => 'wpsg_mod_securepay_sandbox')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_securepay_sender', __('Sender ID', 'wpsg'), $this->get_option('wpsg_mod_securepay_sender'), array('help' => 'wpsg_mod_securepay_sender')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_securepay_channelid', __('Channel ID', 'wpsg'), $this->get_option('wpsg_mod_securepay_channelid'), array('help' => 'wpsg_mod_securepay_channelid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_securepay_userid', __('UserID', 'wpsg'), $this->get_option('wpsg_mod_securepay_userid'), array('help' => 'wpsg_mod_securepay_userid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_securepay_password', __('Passwort', 'wpsg'), $this->get_option('wpsg_mod_securepay_password'), array('help' => 'wpsg_mod_securepay_password')); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_securepay_activ', __('Zahlungsart aktiv', 'wpsg'), $this->get_option('wpsg_mod_securepay_activ')); ?>
+<?php /* echo wpsg_drawForm_Select('wpsg_mod_securepay_paymenttypes', __('Zahlungsarten', 'wpsg'), array(
+// 'AMEX' => 'American Express',
+// 'BARPAY' => 'BarPay',
+// 'BOLETO' => 'Boleto',
+// 'CARTEBLEUE' => 'Carte Bleue',
+// 'CHINAUNIONPAY' => 'China UnionPay',
+// 'DANKORT' => 'Dankort',
+// 'DINERS' => 'Diners',
+ 'DIRECTDEBIT_SEPA' => 'Direct Debit Sepa',
+// 'DIRECTDEBIT_SEPA_MIX_DE' => 'Direct Debit Germany and Sepa',
+// 'DIRECTDEBIT_SEPA_MIX_AT' => 'Direct Debit Austria and Sepa',
+// 'DIRECTDEBIT_DE' => 'Direct Debit Germany',
+// 'DIRECTDEBIT_AT' => 'Direct Debit Austria',
+// 'DISCOVER' => 'Discover',
+// 'GIROPAY' => 'Giropay',
+// 'IDEAL' => 'iDeal',
+// 'INVOICE' => 'Invoice',
+// 'JCB' => 'JCB',
+// 'MAESTRO' => 'Maestro',
+ 'MASTER' => 'MasterCard',
+// 'PASTEANDPAY_V' => 'PasteAndPay',
+// 'PAYPAL' => 'PayPal',
+// 'POSTEPAY' => 'PostePay',
+// 'SOFORTUEBERWEISUNG' => 'sofort Überweisung',
+// 'UKASH' => 'Ukash',
+ 'VISA' => 'Visa',
+// 'VISADEBIT' => 'Visa Debit',
+// 'VISAELECTRON' => 'Visa Electron',
+// 'VPAY' => 'V PAY',
+// 'VSTATION_V' => 'Voucher Station',
+// 'AXESS' => 'AXESS',
+// 'BONUS' => 'Bonus',
+// 'MAXIMUM' => 'Maximum',
+// 'WORLD' => 'World',
+// 'CARDFINANS' => 'CardFinans',
+// 'ADVANTAGE' => 'Advantage',
+// 'QOOQO' => 'Qooqo',
+// 'KLARNA_INVOICE' => 'Klarna Invoice',
+// 'KLARNA_INSTALLMENTS' => 'Klarna Installments',
+// 'ASYACARD' => 'AsyaCard'
+), @explode(' ', $this->get_option('wpsg_mod_securepay_paymenttypes')), array('multiple' => '3', 'help' => 'wpsg_mod_securepay_paymenttypes', 'hint' => __('STRG für Mehrfachauswahl', 'wpsg'))); */ ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_securepay_paymenttypes', __('Zahlungsarten', 'wpsg'), $this->get_option('wpsg_mod_securepay_paymenttypes'), array('help' => 'wpsg_mod_securepay_paymenttypes')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_securepay_name', __('Bezeichnung der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_securepay_name'), array('help' => 'wpsg_mod_securepay_name')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_securepay_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_securepay_hint'), array('help' => 'wpsg_mod_securepay_hint')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_securepay_logo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_securepay_logo'), array('help' => 'wpsg_mod_securepay_logo')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_securepay_language', __('Sprache', 'wpsg'), array(
+ 'auto' => __('Automatisch', 'wpsg'),
+ 'de' => __('Deutsch', 'wpsg'),
+ 'en' => __('Englisch', 'wpsg')
+), $this->get_option('wpsg_mod_securepay_language'), array('help' => 'wpsg_mod_securepay_language')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_securepay_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_securepay_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_securepay_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_securepay_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_securepay_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_securepay_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
+<br />
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_securepay_successPage', __('Seite nach erfolgreicher Zahlung', 'wpsg'), $this->view['wpsg_mod_securepay']['arPages'], $this->get_option('wpsg_mod_securepay_successPage'), array('help' => 'wpsg_mod_securepay_successPage')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_securepay_errorPage', __('Seite nach fehlgeschlagener Zahlung', 'wpsg'), $this->view['wpsg_mod_securepay']['arPages'], $this->get_option('wpsg_mod_securepay_errorPage'), array('help' => 'wpsg_mod_securepay_errorPage')); ?>
+
+<br /><div class="wpsg_hinweis"><?php echo __('Die verfügbaren Zahlungsarten müssen mit <a href="http://www.iw-systeme.de">IW Systeme</a> vereinbart werden.', 'wpsg'); ?></div>
diff --git a/views/mods/mod_shippingadress/checkout_inner_prebutton.phtml b/views/mods/mod_shippingadress/checkout_inner_prebutton.phtml
new file mode 100644
index 0000000..dbdb5fc
--- /dev/null
+++ b/views/mods/mod_shippingadress/checkout_inner_prebutton.phtml
@@ -0,0 +1,126 @@
+<div class="wpsg_mod_shippingadress">
+
+ <h2><?php echo __('Gesonderte Lieferadresse', 'wpsg'); ?></h2>
+
+ <div class="wpsg_spacer"></div>
+
+ <div class="wpsg_inner">
+
+ <div class="wpsg_checkoutblock">
+ <label for="act_checkout_shippingadress">
+ <input id="act_checkout_shippingadress" class="wpsg_checkout formfield_checkbox" type="checkbox" name="wpsg[checkout][diff_shippingadress]" value="" <?php echo ($_SESSION['wpsg']['checkout']['diff_shippingadress'] == 1)? 'checked="checked"':'' ?> onclick="view_checkout_shippingadresss()" />
+ <?php echo __('Gesonderte Lieferadresse abweichend von der Rechnungsadresse verwenden', 'wpsg') ?>
+ </label>
+ </div>
+
+ <div class="wpsg_clear"></div>
+
+ <div class="checkout_shippingadress" style="display:none;">
+
+ <div class="wpsg_checkoutblock">
+ <label for="firma" class="wpsg_checkout"><?php echo __("Firma:", "wpsg"); ?></label>
+ <input class="wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_name" name="wpsg[checkout][shipping_firma]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['shipping_firma']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="title" class="wpsg_checkout"><?php echo __("Anrede:", "wpsg"); ?>
+ <span class="wpsg_required">*</span>
+ </label>
+ <select class="validate[required_shipping] wpsg_checkout <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" type="select" name="wpsg[checkout][shipping_title]" id="shipping_title" >
+ <?php foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
+ <option value="<?php echo $t; ?>" <?php echo (($this->view['basket']['checkout']['shipping_title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="vname" class="wpsg_checkout"><?php echo __("Vorname:", "wpsg"); ?>
+ <span class="wpsg_required">*</span>
+ </label>
+ <input class="validate[required_shipping] wpsg_checkout <?php echo ((in_array("shipping_vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_vname" name="wpsg[checkout][shipping_vname]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['shipping_vname']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="name" class="wpsg_checkout"><?php echo __("Name:", "wpsg"); ?>
+ <span class="wpsg_required">*</span>
+ </label>
+ <input class="validate[required_shipping] wpsg_checkout <?php echo ((in_array("shipping_name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_name" name="wpsg[checkout][shipping_name]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['shipping_name']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="strasse" class="wpsg_checkout"><?php echo __("Strasse, Nr.:", "wpsg"); ?>
+ <span class="wpsg_required">*</span>
+ </label>
+ <input class="validate[required_shipping] wpsg_checkout <?php echo ((in_array("shipping_strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_strasse" name="wpsg[checkout][shipping_strasse]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['shipping_strasse']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl:", "wpsg"); ?>
+ <span class="wpsg_required">*</span>
+ </label>
+ <input class="validate[required_shipping] wpsg_checkout <?php echo ((in_array("shipping_plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="number" id="shipping_plz" name="wpsg[checkout][shipping_plz]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['shipping_plz']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="ort" class="wpshopgermany_checkout"><?php echo __("Ort:", "wpsg"); ?>
+ <span class="wpsg_required">*</span>
+ </label>
+ <input class="validate[required_shipping] wpsg_checkout <?php echo ((in_array("shipping_ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_ort" name="wpsg[checkout][shipping_ort]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['shipping_ort']); ?>" />
+ </div>
+
+ <div class="wpsg_checkoutblock">
+ <label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land:", "wpsg"); ?>
+ <span class="wpsg_required">*</span>
+ </label>
+ <select name="wpsg[checkout][shipping_land]" class="wpsg_checkout <?php echo ((in_array("shipping_land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="shipping_land">
+ <option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+ <?php foreach ($this->view['laender'] as $l) { ?>
+ <option value="<?php echo $l['id']; ?>" <?php echo (($l['id'] == $this->view['basket']['checkout']['shipping_land'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($l['name']); ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ function view_checkout_shippingadresss()
+ {
+
+ if (jQuery('#act_checkout_shippingadress').prop('checked') != true)
+ {
+
+ jQuery('.checkout_shippingadress').attr('style', 'display:none;');
+ jQuery('#act_checkout_shippingadress').attr('value', null);
+
+ <?php if ($this->get_option('wpsg_form_validation') == '2') { ?>
+ jQuery.validator.removeClassRules('validate[required_shipping]', { cRequired: true } );
+ <?php } ?>
+
+ }
+
+ if (jQuery('#act_checkout_shippingadress').prop('checked') == true)
+ {
+
+ jQuery('.checkout_shippingadress').attr('style', 'display:display;');
+ jQuery('#act_checkout_shippingadress').attr('value', 1);
+
+ <?php if ($this->get_option('wpsg_form_validation') == '2') { ?>
+ jQuery.validator.addClassRules('validate[required_shipping]', { cRequired: true } );
+ <?php } ?>
+
+ }
+
+ return false;
+
+ }
+
+ jQuery(document).ready(function()
+ {
+
+ view_checkout_shippingadresss();
+
+ });
+
+ /* ]]> */</script>
+ </div>
+ </div>
+</div>
diff --git a/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml b/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml
new file mode 100644
index 0000000..6301aba
--- /dev/null
+++ b/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml
@@ -0,0 +1,77 @@
+<?php
+
+ /**
+ * Template für die Integration der Versandadresse in die Bestellansicht
+ */
+ //wpsg_debug($this->view);
+?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_editShippingAdress()
+ {
+
+ jQuery('#wpsg_ShippingDialog').dialog( {
+ 'dialogClass': 'wp-dialog',
+ 'modal': true,
+ 'width': 600,
+ 'title': '<?php echo __('Lieferanschrift ändern', 'wpsg'); ?>',
+ 'autoOpen': true,
+ 'closeOnEscape': true,
+ 'buttons': {
+ "<?php echo __('Speichern', 'wpsg'); ?>": function() {
+
+ jQuery('#wpsg_backend_loading').show();
+ jQuery(this).dialog('close');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_shippingadress&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
+ data: {
+ form_data: jQuery('#wpsg_ShippingDialog input, #wpsg_ShippingDialog select').serialize()
+ },
+ success: function(data) {
+
+ location.href = location.href;
+
+ }
+ } );
+
+ }
+ }
+ } );
+
+ return false;
+
+ }
+
+/* ]]> */</script>
+
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Lieferadresse', 'wpsg'); ?>:
+ <a style="float:none; display:inline-block;" onclick="return wpsg_editShippingAdress();" class="wpsg_icon wpsg_icon_edit" href="#" title="<?php echo __('Rechnungsanschrift ändern', 'wpsg'); ?>"></a>
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <?php if (trim($this->view['wpsg_mod_shippingadress']['shipping_firma']) != '') { ?>
+ <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_firma']); ?><br />
+ <?php } ?>
+ <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_title']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_vname']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_name']); ?><br />
+ <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?><br />
+ <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_plz']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_ort']); ?> <?php echo wpsg_hspc($this->view['shipping_country']['kuerzel']); ?><br />
+ </p>
+ </div>
+
+ <div id="wpsg_ShippingDialog" class="wpsg_dialog" style="display:none;">
+ <?php echo wpsg_drawForm_Input('dialog_shipping_firma', __('Firma', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_firma']); ?>
+ <?php echo wpsg_drawForm_Select('dialog_shipping_title', __('Anschrift', 'wpsg'), $this->view['arTitles'], $this->view['wpsg_mod_shippingadress']['shipping_title'], array('noIndex' => true)); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_vname', __('Vorname', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_vname']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_name', __('Name', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_name']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_strasse', __('Straße', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_plz', __('Postleitzahl', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_plz']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_ort', __('Ort', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_ort']); ?>
+ <?php echo wpsg_drawForm_Select('dialog_shipping_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['wpsg_mod_shippingadress']['shipping_land']); ?>
+ </div>
+
+</div>
+<div class="wpsg_clear"></div>
diff --git a/views/mods/mod_shs/gfx/internetkasse-logo.png b/views/mods/mod_shs/gfx/internetkasse-logo.png
new file mode 100644
index 0000000..bdd660a
--- /dev/null
+++ b/views/mods/mod_shs/gfx/internetkasse-logo.png
Binary files differ
diff --git a/views/mods/mod_shs/gfx/internetkasse-logo_creditcard.png b/views/mods/mod_shs/gfx/internetkasse-logo_creditcard.png
new file mode 100644
index 0000000..4f04e8b
--- /dev/null
+++ b/views/mods/mod_shs/gfx/internetkasse-logo_creditcard.png
Binary files differ
diff --git a/views/mods/mod_shs/gfx/internetkasse-logo_directdebit.png b/views/mods/mod_shs/gfx/internetkasse-logo_directdebit.png
new file mode 100644
index 0000000..02f8775
--- /dev/null
+++ b/views/mods/mod_shs/gfx/internetkasse-logo_directdebit.png
Binary files differ
diff --git a/views/mods/mod_shs/gfx/internetkasse-logo_maestro.png b/views/mods/mod_shs/gfx/internetkasse-logo_maestro.png
new file mode 100644
index 0000000..b9eab47
--- /dev/null
+++ b/views/mods/mod_shs/gfx/internetkasse-logo_maestro.png
Binary files differ
diff --git a/views/mods/mod_shs/gfx/logo_100x25.png b/views/mods/mod_shs/gfx/logo_100x25.png
new file mode 100644
index 0000000..70a387a
--- /dev/null
+++ b/views/mods/mod_shs/gfx/logo_100x25.png
Binary files differ
diff --git a/views/mods/mod_shs/order_done.phtml b/views/mods/mod_shs/order_done.phtml
new file mode 100644
index 0000000..6f1e82f
--- /dev/null
+++ b/views/mods/mod_shs/order_done.phtml
@@ -0,0 +1,24 @@
+<?php
+
+ /**
+ * Dieses Template wird nach einer Sparkassen Internetkasse Zahlung angezeigt
+ */
+
+?>
+<p><?php echo __('Um den Betrag zu bezahlen klicken Sie bitte auf folgendes Logo.', 'wpsg'); ?></p>
+<p>
+ <a title="<?php echo __('Mit der Sparkassen Internetkasse bezahlen', 'wpsg'); ?>" href="<?php echo $this->view['payLink']; ?>">
+ <img src="<?php echo $this->getRessourceURL('mods/mod_shs/gfx/internetkasse-logo.png'); ?>" align="left" alt="<?php echo __('Mit der Sparkassen Internetkasse bezahlen', 'wpsg'); ?>" style="margin-right:7px;">
+ </a>
+</p>
+<?php if ($this->get_option('wpsg_mod_shs_autostart') == '1') { ?>
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+ window.setTimeout(function() {
+ location.href = "<?php echo $this->view['payLink']; ?>";
+ }, 1000);
+ } );
+
+</script>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_shs/settings_edit.phtml b/views/mods/mod_shs/settings_edit.phtml
new file mode 100644
index 0000000..f546b3f
--- /dev/null
+++ b/views/mods/mod_shs/settings_edit.phtml
@@ -0,0 +1,82 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Sparkassen Internet Moduls
+ */
+
+?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_shs_bezeichnung_creditcard', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_shs_bezeichnung_creditcard'), array('help' => 'wpsg_mod_shs_bezeichnung_creditcard')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_aktiv_creditcard', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_shs_aktiv_creditcard'), array('help' => 'wpsg_mod_shs_aktiv_creditcard')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_shs_hint_creditcard', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_shs_hint_creditcard'), array('help' => 'wpsg_mod_shs_hint_creditcard')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_shs_bezeichnung_maestro', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_shs_bezeichnung_maestro'), array('help' => 'wpsg_mod_shs_bezeichnung_maestro')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_aktiv_maestro', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_shs_aktiv_maestro'), array('help' => 'wpsg_mod_shs_aktiv_maestro')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_shs_hint_maestro', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_shs_hint_maestro'), array('help' => 'wpsg_mod_shs_hint_maestro')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_shs_bezeichnung_directdebit', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_shs_bezeichnung_directdebit'), array('help' => 'wpsg_mod_shs_bezeichnung_directdebit')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_aktiv_directdebit', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_shs_aktiv_directdebit'), array('help' => 'wpsg_mod_shs_aktiv_directdebit')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_shs_hint_directdebit', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_shs_hint_directdebit'), array('help' => 'wpsg_mod_shs_hint_directdebit')); ?>
+<br />
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_shs_sandbox'), array('help' => 'wpsg_mod_shs_sandbox')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_shs_sslmerchant', __('SSL Händlerkennung (S-Internetkasse-SSL-User)', 'wpsg'), $this->get_option('wpsg_mod_shs_sslmerchant'), array('help' => 'wpsg_mod_shs_sslmerchant')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_shs_sslpw', __('MAC-Schlüssel', 'wpsg'), $this->get_option('wpsg_mod_shs_sslpw'), array(
+ 'help'=>'wpsg_mod_shs_sslpw',
+ 'pwd' => true,
+ /*'hint' => __('Muss mit dem Passwort im S-Interface unter Konfiguration -> Formularservice übereinstimmen.', 'wpsg') */
+)); ?>
+<?php echo wpsg_drawForm_Input('', __('URL für Shopbenachrichtigung', 'wpsg'), $this->view['wpsg_mod_notify_url'], array(
+ 'help' => 'wpsg_mod_notify_url',
+ /*'hint' => __('Muss im S-Interface unter Konfiguration -> Formularservice hinterlegt werden.', 'wpsg') */
+)); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_shs_apiurl', __('URL für Anfragen', 'wpsg'), $this->get_option('wpsg_mod_shs_apiurl'), array('help' => 'wpsg_mod_shs_apiurl')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_shs_apiversion', __('API Version', 'wpsg'), $this->view['api_version'], array('help' => 'wpsg_mod_shs_apiversion','readonly' => true, 'text' => true)); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_shs_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_shs_gebuehr'), true), array('help' => 'wpsg_mod_shs_gebuehr','unit' => $this->get_option('wpsg_currency').' / %')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_shs_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_shs_mwst'), array('help' => 'wpsg_mod_shs_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_shs_mwstland'), array('help' => 'wpsg_mod_shs_mwstland')); ?>
+<br />
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Formularoptionen', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <label>
+ <input <?php echo (($this->get_option('wpsg_mod_shs_mobileversion') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_mobileversion" name="wpsg_mod_shs_mobileversion" /><?php echo __('Mobile Version nutzen', 'wpsg'); ?>
+ </label><br />
+ <label>
+ <input <?php echo (($this->get_option('wpsg_mod_shs_creditcard_cardholder') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_creditcard_cardholder" name="wpsg_mod_shs_creditcard_cardholder" /><?php echo __('Kartenhinhaber ist Pflichtfeld (Nur Kreditkarte)', 'wpsg'); ?>
+ </label><br />
+ <label>
+ <input <?php echo (($this->get_option('wpsg_mod_shs_creditcard_optionalcardholder') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_creditcard_optionalcardholder" name="wpsg_mod_shs_creditcard_optionalcardholder" /><?php echo __('Kartenhinhaber ist Optional (Nur Kreditkarte)', 'wpsg'); ?>
+ </label><br />
+ <label>
+ <input <?php echo (($this->get_option('wpsg_mod_shs_creditcard_sslifvisaenrolledu') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_creditcard_sslifvisaenrolledu" name="wpsg_mod_shs_creditcard_sslifvisaenrolledu" /><?php echo __('Bei VISA ohne Autorisierung zahlung erlauben (Nur Kreditkarte / VISA)', 'wpsg'); ?>
+ </label><br />
+ <label>
+ <input <?php echo (($this->get_option('wpsg_mod_shs_directdebit_accountholder') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_directdebit_accountholder" name="wpsg_mod_shs_directdebit_accountholder" /><?php echo __('Kontoinhaber ist Pflichtfeld (Nur Lastschrift)', 'wpsg'); ?>
+ </label><br />
+ <label>
+ <input <?php echo (($this->get_option('wpsg_mod_shs_directdebit_optionalaccountholder') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_directdebit_optionalaccountholder" name="wpsg_mod_shs_directdebit_optionalaccountholder" /><?php echo __('Kontoinhaber ist Optional (Nur Lastschrift)', 'wpsg'); ?>
+ </label><br />
+ <label>
+ <input <?php echo (($this->get_option('wpsg_mod_shs_directdebit_checklist') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_directdebit_checklist" name="wpsg_mod_shs_directdebit_checklist" /><?php echo __('Sperrlistenabfrage (Nur Lastschrift, muss freigeschaltet sein)', 'wpsg'); ?>
+ </label>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+<br />
+<?php echo wpsg_drawForm_Select('wpsg_mod_shs_transactiontype', __('Autorisierung', 'wpsg'), array('preauthorization', 'authorization'), $this->get_option('wpsg_mod_shs_transactiontype'), array('help' => 'wpsg_mod_shs_transactiontype')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_shs_autostart'), array('help' => 'wpsg_mod_shs_autostart')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_autoend', __('Nach Abschluß direkt auf Fehler- bzw. Erfolgsseite leiten', 'wpsg'), $this->get_option('wpsg_mod_shs_autoend'), array('help' => 'wpsg_mod_shs_autoend')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_shs_success', __('Erfolgsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_shs_success'), array('help' => 'wpsg_mod_shs_success')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_shs_error', __('Fehlerseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_shs_error'), array('help' => 'wpsg_mod_shs_error')); ?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#wpsg_mod_shs_creditcard_cardholder').bind('click', function() { if (jQuery(this).attr('checked')) jQuery('#wpsg_mod_shs_creditcard_optionalcardholder').attr('checked', false); } );
+ jQuery('#wpsg_mod_shs_creditcard_optionalcardholder').bind('click', function() { if (jQuery(this).attr('checked')) jQuery('#wpsg_mod_shs_creditcard_cardholder').attr('checked', false); } );
+ jQuery('#wpsg_mod_shs_directdebit_accountholder').bind('click', function() { if (jQuery(this).attr('checked')) jQuery('#wpsg_mod_shs_directdebit_optionalaccountholder').attr('checked', false); } );
+ jQuery('#wpsg_mod_shs_directdebit_optionalaccountholder').bind('click', function() { if (jQuery(this).attr('checked')) jQuery('#wpsg_mod_shs_directdebit_accountholder').attr('checked', false); } );
+
+/* ]]> */</script>
diff --git a/views/mods/mod_skrill/gfx/logo_100x25.png b/views/mods/mod_skrill/gfx/logo_100x25.png
new file mode 100644
index 0000000..04f417f
--- /dev/null
+++ b/views/mods/mod_skrill/gfx/logo_100x25.png
Binary files differ
diff --git a/views/mods/mod_skrill/order_done.phtml b/views/mods/mod_skrill/order_done.phtml
new file mode 100644
index 0000000..d960073
--- /dev/null
+++ b/views/mods/mod_skrill/order_done.phtml
@@ -0,0 +1,60 @@
+<?php
+
+ /*
+ * Template für das Zahlungsformular nach Bestellablauf
+ */
+
+?>
+<form id="wpsg_skrill_payform" method="POST" action="<?php echo $this->view['wpsg_mod_skrill']['url']; ?>">
+
+ <input type="hidden" name="pay_to_email" value="<?php echo wpsg_hspc($this->get_option('wpsg_mod_skrill_email')); ?>" />
+ <input type="hidden" name="recipient_description" value="<?php echo wpsg_hspc($this->get_option('wpsg_mod_skrill_recipient_description')); ?>" />
+ <input type="hidden" name="transaction_id" value="<?php echo wpsg_hspc($this->view['wpsg_mod_skrill']['transaction_id']); ?>" />
+
+ <input type="hidden" name="return_url" value="<?php echo wpsg_hspc($this->view['wpsg_mod_skrill']['return_url']); ?>" />
+ <input type="hidden" name="return_url_text" value="<?php echo __('Zurück zum Shop', 'wpsg'); ?>" />
+ <input type="hidden" name="return_url_target" value="_self" />
+
+ <input type="hidden" name="cancel_url" value="<?php echo wpsg_hspc($this->view['wpsg_mod_skrill']['cancel_url']); ?>" />
+ <input type="hidden" name="cancel_url_target" value="_self" />
+
+ <input type="hidden" name="status_url" value="<?php echo wpsg_hspc($this->view['wpsg_mod_skrill']['status_url']); ?>" />
+ <input type="hidden" name="language" value="DE" />
+ <input type="hidden" name="logo_url" value="<?php echo wpsg_hspc($this->get_option('wpsg_mod_skrill_logo_url')); ?>" />
+
+ <!-- <input type="hidden" name="pay_from_email" value="<?php echo wpsg_hspc($this->view['kunde']['email']); ?>" />-->
+ <input type="hidden" name="firstname" value="<?php echo wpsg_hspc($this->view['kunde']['vname']); ?>" />
+ <input type="hidden" name="lastname" value="<?php echo wpsg_hspc($this->view['kunde']['name']); ?>" />
+ <input type="hidden" name="date_of_birth" value="<?php echo wpsg_hspc(date('dmY', strtotime($this->view['kunde']['geb']))); ?>" />
+ <input type="hidden" name="address" value="<?php echo wpsg_hspc($this->view['kunde']['strasse']); ?>" />
+ <input type="hidden" name="phone_number" value="<?php echo wpsg_hspc($this->view['kunde']['tel']); ?>" />
+ <input type="hidden" name="postal_code" value="<?php echo wpsg_hspc($this->view['kunde']['plz']); ?>" />
+ <input type="hidden" name="city" value="<?php echo wpsg_hspc($this->view['kunde']['ort']); ?>" />
+ <input type="hidden" name="country" value="<?php echo wpsg_hspc($this->view['kunde']['land']['kuerzel']); ?>" />
+
+ <input type="hidden" name="amount" value="<?php echo number_format(wpsg_tf($this->view['basket']['sum']['preis_gesamt_brutto']), 2, '.', ''); ?>" />
+ <input type="hidden" name="currency" value="<?php echo wpsg_hspc($this->get_option('wpsg_mod_skrill_currency')); ?>" />
+
+ <input type="hidden" name="platform" value="32888040" />
+
+ <!-- 5 Felder -->
+ <input type="hidden" name="detail1_description" value="<?php echo __('Bestellnummer', 'wpsg'); ?>:" />
+ <input type="hidden" name="detail1_text" value="<?php echo wpsg_hspc($this->view['order']['onr']); ?>" />
+
+ <input type="image" src="<?php echo WPSG_URL_CONTENT; ?>plugins/wpshopgermany/views/mods/mod_skrill/skrill-moneybookers-payby-border_de_150x106.png" alt="<?php echo __('Bezahlen mit Skrill', 'wpsg'); ?>" />
+
+ <p>
+ <?php echo __('Klicken Sie auf das Logo, um die Zahlung mit Skrill (Moneybookers) zu starten.', 'wpsg'); ?>
+ </p>
+
+</form>
+
+<?php if ($this->get_option('wpsg_mod_skrill_autostart') == '1') { ?>
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+ jQuery('#wpsg_skrill_payform').submit();
+ } );
+
+</script>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_skrill/settings_edit.phtml b/views/mods/mod_skrill/settings_edit.phtml
new file mode 100644
index 0000000..0db9ade
--- /dev/null
+++ b/views/mods/mod_skrill/settings_edit.phtml
@@ -0,0 +1,27 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Zahlungsmoduls "Skrill"
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_skrill_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_skrill_bezeichnung'), array('help' => 'wpsg_mod_skrill_bezeichnung')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_skrill_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_skrill_aktiv'), array('help' => 'wpsg_mod_skrill_aktiv')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_skrill_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_skrill_hint'), array('help' => 'wpsg_mod_skrill_hint')); ?>
+
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_skrill_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_skrill_gebuehr'), true), array('help' => 'wpsg_mod_skrill_gebuehr','unit' => $this->get_option('wpsg_currency'), ' / %')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_skrill_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_skrill_mwst'), array('help' => 'wpsg_mod_skrill_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_skrill_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_skrill_mwstland'), array('help' => 'wpsg_mod_skrill_mwstland')); ?>
+
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_skrill_currency', __('Währungscode (Standard: EUR)', 'wpsg'), $this->get_option('wpsg_mod_skrill_currency'), array('help' => 'wpsg_mod_skrill_curreny')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_skrill_recipient_description', __('Händlerbeschreibung (Max. 30 Zeichen)', 'wpsg'), $this->get_option('wpsg_mod_skrill_recipient_description'), array('help' => 'wpsg_mod_skrill_recipient_description')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_skrill_code', __('Geheimwort', 'wpsg'), $this->get_option('wpsg_mod_skrill_code'), array('help' => 'wpsg_mod_skrill_code')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_skrill_email', __('E-Mail (Skrill Konto)', 'wpsg'), $this->get_option('wpsg_mod_skrill_email'), array('help' => 'wpsg_mod_skrill_email')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_skrill_id', __('Händler ID', 'wpsg'), $this->get_option('wpsg_mod_skrill_id'), array('help' => 'wpsg_mod_skrill_id')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_skrill_logo_url', __('Logo URL des Shops (200x50)', 'wpsg'), $this->get_option('wpsg_mod_skrill_logo_url'), array('help' => 'wpsg_mod_skrill_logo_url')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_skrill_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_skrill_autostart'), array('help' => 'wpsg_mod_skrill_autostart')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_skrill_success', __('Erfolgsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_skrill_success'), array('help' => 'wpsg_mod_skrill_success')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_skrill_error', __('Fehlerseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_skrill_error'), array('help' => 'wpsg_mod_skrill_error')); ?>
+
diff --git a/views/mods/mod_skrill/skrill-moneybookers-payby-border_de_150x106.png b/views/mods/mod_skrill/skrill-moneybookers-payby-border_de_150x106.png
new file mode 100644
index 0000000..908e241
--- /dev/null
+++ b/views/mods/mod_skrill/skrill-moneybookers-payby-border_de_150x106.png
Binary files differ
diff --git a/views/mods/mod_spconditions/conditionList.phtml b/views/mods/mod_spconditions/conditionList.phtml
new file mode 100644
index 0000000..262ef90
--- /dev/null
+++ b/views/mods/mod_spconditions/conditionList.phtml
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Zeichnet die Liste der bereits definierten Versand- und Zahlungsbedingunen
+ */
+
+?>
+<?php if (wpsg_isSizedArray($this->view['data'])) { ?>
+
+ <?php foreach ($this->view['data'] as $k => $v) { ?>
+
+ <?php echo wpsg_drawForm_Input('', __('Id', 'wpsg'), $v['id'], array('text' => true)); ?>
+ <?php echo wpsg_drawForm_Select('shipping_id', __('Versandart', 'wpsg'), $this->view['arShipping'], $v['shipping_id']); ?>
+ <hr />
+
+ <?php } ?>
+
+<?php } else { ?>
+ <?php echo __('Es sind noch keine Versand- oder Zahlungsbedingungen angelegt.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_spconditions/settings_edit.phtml b/views/mods/mod_spconditions/settings_edit.phtml
new file mode 100644
index 0000000..b83401b
--- /dev/null
+++ b/views/mods/mod_spconditions/settings_edit.phtml
@@ -0,0 +1,42 @@
+<?php
+
+ /**
+ * Template für das Modul "Versand- und Zahlungsbedingungen"
+ */
+
+?>
+<div class="wpsg_admin_box">
+
+ <div class="head">
+ <div class="title">
+ <div class="fulltab">
+ <?php echo __('Versand- und Zahlungsbedingungen', 'wpsg'); ?>
+ <a title="<?php echo __('Neue Versand- und Zahlungsbedingung anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addSPCondition();"></a>
+ </div>
+ </div>
+ </div>
+ <div class="content" id="wpsg_mod_spconditions_list">
+ <?php echo $this->view['conditionList']; ?>
+ </div>
+
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_addSPCondition()
+ {
+
+ jQuery('#wpsg_mod_spconditions_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_spconditions&noheader=1&do=add',
+ success: function(data) {
+ jQuery('#wpsg_mod_spconditions_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addSPCondition()
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_statistics/admin_setcapabilities.phtml b/views/mods/mod_statistics/admin_setcapabilities.phtml
new file mode 100644
index 0000000..cf31ee6
--- /dev/null
+++ b/views/mods/mod_statistics/admin_setcapabilities.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Template für die Integration in die Verwaltung der Berechtigungen
+ */
+
+ global $wpdb; $arRoles = get_option($wpdb->prefix."user_roles");
+
+?>
+<tr>
+ <td class="wpsg_col_capname"><?php echo __('Statistik', 'wpsg'); ?></td>
+ <?php foreach ($arRoles as $role_key => $r) { ?>
+ <td class="wpsg_col_cap">
+ <input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_statistics]" value="0" />
+ <input type="checkbox" <?php echo (($r['capabilities']['wpsg_statistics'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_statistics]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_statistics/chartsalestopaymentmethod/all.phtml b/views/mods/mod_statistics/chartsalestopaymentmethod/all.phtml
new file mode 100644
index 0000000..c519090
--- /dev/null
+++ b/views/mods/mod_statistics/chartsalestopaymentmethod/all.phtml
@@ -0,0 +1,91 @@
+<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
+
+<?php if (wpsg_isSizedArray($this->view['chart']['data']['records'])) { ?>
+
+<div id="chartsalestopaymentmethod-bar" style="height:<?php echo $this->get_option('wpsg_mod_statistics_bar_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_bar_chart_width'); ?>px;"></div>
+
+<br/>
+<h3><?php echo __('Anteile (prozentual)', 'wpsg'); ?></h3>
+<div id="chartsalestopaymentmethod-pie" style="height:<?php echo $this->get_option('wpsg_mod_statistics_pie_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_bar_chart_width'); ?>px;"></div>
+
+<br/>
+
+<div id="table-data">
+ <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartsalestopaymentmethod/data.phtml'); ?>
+</div>
+
+<div class="wpsg_clearer"></div>
+
+<?php
+
+ foreach ($this->view['chart']['data']['records'] as $data)
+ {
+ $barChartJS['payment'] .= "'".wpsg_hspc($data['name'])."', ";
+ $barChartJS['total'] .= wpsg_hspc($data['total']).", ";
+ $pieChartJS .= "['".wpsg_hspc($data['name'])."', ".wpsg_hspc($data['percent'])."], ";
+ }
+
+ $barChartJS['payment'] = substr($barChartJS['payment'], 0, -2);
+ $barChartJS['total'] = substr($barChartJS['total'], 0, -2);
+ $pieChartJS = substr($pieChartJS, 0, -2);
+
+?>
+
+<script type="text/javascript">
+ jQuery(document).ready(function()
+ {
+
+ jQuery.jqplot.config.enablePlugins = true;
+ var totals = [<?php echo $barChartJS['total']; ?>];
+ var payment = [<?php echo $barChartJS['payment']; ?>];
+
+ var chartsalestopaymentmethodBar = jQuery.jqplot('chartsalestopaymentmethod-bar', [totals], {
+ animate: !jQuery.jqplot.use_excanvas,
+ seriesDefaults:{
+ renderer:jQuery.jqplot.BarRenderer,
+ rendererOptions: {
+ varyBarColor: true
+ },
+ pointLabels: { show: true }
+ },
+ axesDefaults: {
+ labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
+ },
+ axes: {
+ xaxis: {
+ renderer: jQuery.jqplot.CategoryAxisRenderer,
+ ticks: payment,
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['xaxis']['label']); ?>'
+ },
+ yaxis:{
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
+ tickOptions: {
+ formatter: wpsg_statistics_number_format
+ },
+ min:0
+ }
+ },
+ highlighter: { show: false }
+ });
+
+ var data = [<?php echo $pieChartJS; ?>];
+
+ var chartsalestopaymentmethodPie = jQuery.jqplot ('chartsalestopaymentmethod-pie', [data],
+ {
+ seriesDefaults: {
+ renderer: jQuery.jqplot.PieRenderer,
+ rendererOptions: { padding: 50, sliceMargin: 4, showDataLabels: true }
+ },
+ legend: { show:true, location: 'e' }
+ }
+ );
+
+ wpsg_statistic_addExportButton();
+
+ });
+</script>
+
+
+<?php } else { ?>
+<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_statistics/chartsalestopaymentmethod/data.phtml b/views/mods/mod_statistics/chartsalestopaymentmethod/data.phtml
new file mode 100644
index 0000000..f65ad5a
--- /dev/null
+++ b/views/mods/mod_statistics/chartsalestopaymentmethod/data.phtml
@@ -0,0 +1,68 @@
+<table style="width:auto !important;" class="widefat fixed tags" border="0" cellspacing="0" cellpadding="0">
+ <thead>
+ <tr>
+ <th class="manage-column sortable">
+ <a id="name" class="sortable <?php if($this->view['filter']['sort'] == 'name' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'name' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Zahlungsart', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column th-right">
+ <a id="total" class="sortable <?php if($this->view['filter']['sort'] == 'total' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'total' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Umsatz in', 'wpsg').' '.$this->get_option('wpsg_currency'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column th-right">
+ <a id="percent" class="sortable <?php if($this->view['filter']['sort'] == 'percent' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'percent' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Prozent', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </thead>
+ <tbody class="the-list">
+ <?php foreach ($this->view['chart']['data']['records'] as $data) { ?>
+ <tr class="alternate">
+ <td><strong><?php echo wpsg_hspc($data['name']); ?></strong></td>
+ <td class="td-right"><?php echo wpsg_ff($data['total']); ?></td>
+ <td class="td-right"><?php echo wpsg_ff($data['percent']); ?></td>
+ </tr>
+ <?php } ?>
+ </tbody>
+</table>
+
+<script type="text/javascript">
+
+jQuery(document).ready(function(){
+
+ jQuery('.sortable').bind('click', function(){
+
+ var order = '';
+ if(jQuery(this).hasClass('orderup'))
+ {
+ jQuery('#wpsg_statistics_order').val('orderup');
+ }
+ else
+ {
+ jQuery('#wpsg_statistics_order').val('orderdown');
+ }
+
+ jQuery('#wpsg_statistics_sort').val(jQuery(this).attr('id'));
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_statistics&noheader=1&do=sorting',
+ type: 'post',
+ data: jQuery('#wpsg_statistics_form').serialize(),
+ success: function(data) {
+ jQuery('#table-data').html(data);
+
+ }
+ } );
+
+ return false;
+ });
+
+});
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_statistics/charttopsellertosales/all.phtml b/views/mods/mod_statistics/charttopsellertosales/all.phtml
new file mode 100644
index 0000000..dfff484
--- /dev/null
+++ b/views/mods/mod_statistics/charttopsellertosales/all.phtml
@@ -0,0 +1,171 @@
+<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
+
+<?php if (wpsg_isSizedArray($this->view['chart']['data']['records'])) { ?>
+<div id="charttopsellertosales-bar" style="height:<?php echo $this->get_option('wpsg_mod_statistics_bar_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_bar_chart_width'); ?>px;"></div>
+
+<br />
+<h3><?php echo __('Umsatz (prozentual)', 'wpsg'); ?><h3>
+<div id="charttopsellertosales-pie-sales" style="height:<?php echo $this->get_option('wpsg_mod_statistics_pie_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_pie_chart_width'); ?>px;"></div>
+
+<br />
+<h3><?php echo __('Menge (prozentual)', 'wpsg'); ?><h3>
+<div id="charttopsellertosales-pie-amount" style="height:<?php echo $this->get_option('wpsg_mod_statistics_pie_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_pie_chart_width'); ?>px;"></div>
+
+<br/>
+
+<div id="table-data">
+ <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/charttopsellertosales/data.phtml'); ?>
+</div>
+
+<div class="wpsg_clearer"></div>
+
+<?php
+
+ foreach ($this->view['chart']['data']['records'] as $data)
+ {
+ $barChartJS['payment'] .= "'".wpsg_hspc($data['name'])."', ";
+ $barChartJS['amount'] .= "['".wpsg_hspc($data['name'])."','".wpsg_hspc($data['amount'])."'], ";
+ $barChartJS['total'] .= wpsg_hspc($data['total']).", ";
+ $pieChartJS['amount'] .= "['".wpsg_hspc($data['name'])."', ".wpsg_hspc($data['percent-amount'])."], ";
+ $pieChartJS['sales'] .= "['".wpsg_hspc($data['name'])."', ".wpsg_hspc($data['percent-sales'])."], ";
+ }
+
+ $barChartJS['amount'] = substr($barChartJS['amount'], 0, -2);
+ $barChartJS['payment'] = substr($barChartJS['payment'], 0, -2);
+ $barChartJS['total'] = substr($barChartJS['total'], 0, -2);
+
+ $pieChartJS['amount'] = substr($pieChartJS['amount'], 0, -2);
+ $pieChartJS['sales'] = substr($pieChartJS['sales'], 0, -2);
+
+?>
+
+<script type="text/javascript">
+ jQuery(document).ready(function(){
+ jQuery.jqplot.config.enablePlugins = true;
+ var totals = [<?php echo $barChartJS['total']; ?>];
+ var payment = [<?php echo $barChartJS['payment']; ?>];
+ var amount = [<?php echo $barChartJS['amount']; ?>];
+
+ //eries:[{renderer:jQuery.jqplot.BarRenderer}, {xaxis:'x2axis', yaxis:'y2axis'}],
+
+ var charttopsellertosalesBar = jQuery.jqplot('charttopsellertosales-bar', [totals, amount], {
+ animate: !jQuery.jqplot.use_excanvas,
+ axesDefaults: {
+ labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
+ },
+ /*{Each series has same options as seriesDefaults},
+ {You can override each series individually here}*/
+ series:[
+ {
+ renderer:jQuery.jqplot.BarRenderer,
+ rendererOptions: {
+ varyBarColor: true
+ },
+ pointLabels: { show: true }
+ },
+ {
+ xaxis:'x2axis',
+ yaxis:'y2axis'
+ }
+ ],
+ grid: {
+ drawGridLines: false
+ },
+ axes: {
+ xaxis: {
+ renderer: jQuery.jqplot.CategoryAxisRenderer,
+ ticks: payment,
+ tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
+ tickOptions: {
+ angle: -50,
+ fontFamily: 'Arial',
+ fontSize: '10pt',
+ fontWeight: 'normal',
+ textColor: '#666666'
+ },
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['xaxis']['label']); ?>',
+ labelOptions: {
+ fontFamily: 'Arial',
+ fontSize: '14pt',
+ fontWeight: 'bold',
+ textColor: '#666666'
+ }
+ },
+ x2axis: {
+ renderer: jQuery.jqplot.CategoryAxisRenderer,
+ label: '',
+ labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer,
+ tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
+ showMarker: false,
+ showTickMarks:false,
+ showticks: false,
+ tickOptions: {
+ }
+ },
+ yaxis:{
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
+ tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
+ tickOptions: {
+ fontFamily: 'Arial',
+ fontSize: '8pt',
+ fontWeight: 'normal',
+ textColor: '#666666',
+ formatter: wpsg_statistics_number_format
+ },
+ min:0
+ },
+ y2axis: {
+ label: '<?php echo __('Menge', 'wpsg'); ?>',
+ labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer,
+ tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
+ tickOptions: {
+ showGridline: false,
+ fontFamily: 'Arial',
+ fontSize: '8pt',
+ fontWeight: 'normal',
+ textColor: '#666666',
+ formatter: wpsg_statistics_integer_format
+ },
+ min:0,
+ max: <?php echo $this->view['chart']['data']['y2max']; ?>,
+ }
+ },
+ highlighter: { show: false }
+ });
+
+ var data = [<?php echo $pieChartJS['sales']; ?>];
+
+ var charttopsellertosalesPieSales = jQuery.jqplot ('charttopsellertosales-pie-sales', [data],
+ {
+ seriesDefaults: {
+ renderer: jQuery.jqplot.PieRenderer,
+ rendererOptions: { padding: 50, sliceMargin: 4, showDataLabels: true }
+ },
+ legend: { show:true, location: 'e' }
+ }
+ );
+
+ var data = [<?php echo $pieChartJS['amount']; ?>];
+
+ var charttopsellertosalesPieAmount = jQuery.jqplot ('charttopsellertosales-pie-amount', [data],
+ {
+ seriesDefaults: {
+ renderer: jQuery.jqplot.PieRenderer,
+ rendererOptions: { padding: 50, sliceMargin: 4, showDataLabels: true }
+ },
+ legend: { show:true, location: 'e' }
+ }
+ );
+
+ wpsg_statistic_addExportButton();
+
+ });
+</script>
+
+<style type="text/css">
+ .jqplot-x2axis { display:none; }
+</style>
+
+<?php } else { ?>
+<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
+<?php } ?>
diff --git a/views/mods/mod_statistics/charttopsellertosales/data.phtml b/views/mods/mod_statistics/charttopsellertosales/data.phtml
new file mode 100644
index 0000000..b13119b
--- /dev/null
+++ b/views/mods/mod_statistics/charttopsellertosales/data.phtml
@@ -0,0 +1,82 @@
+<table style="width:auto !important;" class="widefat fixed tags" border="0" cellspacing="0" cellpadding="0">
+ <thead>
+ <tr>
+ <th class="manage-column">
+ <a id="name" class="sortable <?php if($this->view['filter']['sort'] == 'name' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'name' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Produkt', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column th-right">
+ <a id="total" class="sortable <?php if($this->view['filter']['sort'] == 'total' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'total' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Umsatz in', 'wpsg').' '.$this->get_option('wpsg_currency'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column th-right">
+ <a id="percent-sales" class="sortable <?php if($this->view['filter']['sort'] == 'percent-sales' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'percent-sales' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Prozent (Umsatz)', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column th-right">
+ <a id="amount" class="sortable <?php if($this->view['filter']['sort'] == 'amount' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'amount' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Menge', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column th-right">
+ <a id="percent-amount" class="sortable <?php if($this->view['filter']['sort'] == 'percent-amount' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'percent-amount' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Prozent (Menge)', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </thead>
+ <tbody class="the-list">
+ <?php foreach ($this->view['chart']['data']['records'] as $data) { ?>
+ <tr class="alternate">
+ <td><strong><?php echo wpsg_hspc($data['name']); ?></strong></td>
+ <td class="td-right"><?php echo wpsg_ff($data['total']); ?></td>
+ <td class="td-right"><?php echo wpsg_ff($data['percent-sales']); ?></td>
+ <td class="td-right"><?php echo wpsg_hspc($data['amount']); ?></td>
+ <td class="td-right"><?php echo wpsg_ff($data['percent-amount']); ?></td>
+ </tr>
+ <?php } ?>
+ </tbody>
+</table>
+
+<script type="text/javascript">
+
+jQuery(document).ready(function(){
+
+ jQuery('.sortable').bind('click', function(){
+
+ var order = '';
+ if(jQuery(this).hasClass('orderup'))
+ {
+ jQuery('#wpsg_statistics_order').val('orderup');
+ }
+ else
+ {
+ jQuery('#wpsg_statistics_order').val('orderdown');
+ }
+
+ jQuery('#wpsg_statistics_sort').val(jQuery(this).attr('id'));
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_statistics&noheader=1&do=sorting',
+ type: 'post',
+ data: jQuery('#wpsg_statistics_form').serialize(),
+ success: function(data) {
+ jQuery('#table-data').html(data);
+
+ }
+ } );
+
+ return false;
+ });
+
+});
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_statistics/chartturnover/all.phtml b/views/mods/mod_statistics/chartturnover/all.phtml
new file mode 100644
index 0000000..c9e7181
--- /dev/null
+++ b/views/mods/mod_statistics/chartturnover/all.phtml
@@ -0,0 +1,123 @@
+<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
+
+<?php
+
+ if (wpsg_isSizedArray($this->view['chart']['data']))
+ {
+
+ for ($i = 0; $i < count($this->view['chart']['data']); $i++)
+ {
+
+ $chartJS['legend'][$i] = "{";
+
+ if (isset($this->view['chart']['data'][$i]['label']))
+ {
+ $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',";
+ }
+
+ $chartJS['legend'][$i] .= " highlighter: {";
+
+ $chartJS['legend'][$i] .= " formatString: '<table><tr><td>%s, %s ".$this->get_option('wpsg_currency')."</td></tr></table>'";
+
+ $chartJS['legend'][$i] .= " }";
+
+ $chartJS['legend'][$i] .= "}";
+
+ $j = 0;
+
+ foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record)
+ {
+
+ //immer das Datum vom Rootelement nutzen
+ $k = 0 ;
+
+ foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord)
+ {
+ if ($j == $k)
+ {
+ if ($record['year'] <= date_i18n('Y'))
+ {
+ $chartJS['area']['area'.$i][] = "['".$rrecord['year'].'/'."1".'/'."1"."', ".wpsg_hspc($record['total'])."]";
+ }
+ }
+ $k++;
+ }
+
+ if ($j == count($this->view['chart']['data'][$i]['records']) - 1) {
+ $chartJS['area']['area'.$i] = '['.implode(',', $chartJS['area']['area'.$i]).']';
+ }
+
+ $j++;
+ }
+
+ }
+
+ }
+
+?>
+
+<?php if ($chartJS['area'] != '') { ?>
+<div id="chartannualturnover-line" style="height:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_width'); ?>px;"></div>
+
+<br />
+
+<div id="table-data">
+ <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?>
+</div>
+
+<div class="wpsg_clearer"></div>
+
+<script type="text/javascript">
+
+function tooltipContentEditor(str, seriesIndex, pointIndex, plot) {
+ // display series_label, x-axis_tick, y-axis value
+ return plot.series[seriesIndex]["label"] + ", " + plot.data[seriesIndex][pointIndex];
+}
+
+
+jQuery(document).ready(function(){
+ <?php foreach ($chartJS['area'] as $index => $area) { ?>
+ var <?php echo $index; ?> = <?php echo $area; ?>;
+ <?php } ?>
+
+ var chartannualturnoverLine = jQuery.jqplot('chartannualturnover-line', [<?php echo implode(',', array_keys($chartJS['area'])); ?>], {
+ animate: true,
+ axesDefaults: {
+ labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
+ },
+ series:[
+ <?php echo implode(', ', $chartJS['legend']); ?>
+ ],
+ legend: {
+ show: true,
+ placement: 'outside'
+ },
+ axes:{
+ xaxis:{
+ renderer:jQuery.jqplot.DateAxisRenderer,
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['xaxis']['label']); ?>',
+ tickOptions:{formatString:'%Y'},
+ tickInterval: '1 year',
+ min:'<?php echo date('Y', $this->view['chart']['data'][0]['min']); ?>/01/01',
+ max:'<?php echo date('Y', $this->view['chart']['data'][0]['max']); ?>/01/01'
+ },
+ yaxis:{
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
+ tickOptions: {
+ formatter: wpsg_statistics_number_format
+ },
+ min:0
+ }
+ },
+ highlighter: {
+ show: true
+ }
+ });
+
+ wpsg_statistic_addExportButton();
+
+});
+</script>
+<?php } else { ?>
+<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_statistics/chartturnover/customrange.phtml b/views/mods/mod_statistics/chartturnover/customrange.phtml
new file mode 100644
index 0000000..3f046ae
--- /dev/null
+++ b/views/mods/mod_statistics/chartturnover/customrange.phtml
@@ -0,0 +1,112 @@
+<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
+
+<?php
+
+ if (wpsg_isSizedArray($this->view['chart']['data']['records'])) {
+
+ $i = 0;
+ $j = 0;
+
+ foreach ($this->view['chart']['data']['records'] as $data)
+ {
+
+ $series = "{";
+
+ if (isset($this->view['chart']['data']['label']))
+ {
+ $series .= "label:'".$this->view['chart']['data']['label'].' '.$data['year']."',";
+ }
+ else
+ {
+ $series .= "label:'".date_i18n('F', strtotime($data['day'].'.'.$data['month'].'.'.$data['year'])).' '.$data['year']."', ";
+ }
+
+ $series .= " highlighter: {";
+
+ $series .= " formatString: '<table><tr><td>%s ".$data['month']." ".$data['year'].", %s. ".$this->get_option('wpsg_currency')."</td></tr></table>'";
+
+ $series .= " }";
+
+ $series .= "}";
+
+ if (!in_array($series, (array)$chartJS['legend']) || !isset($chartJS['legend'][$i]))
+ {
+ $chartJS['legend'][$i] = $series;
+ }
+
+ $chartJS['year'] .= "['".$data['year'].'/'.$data['month'].'/'."1"."', ".wpsg_hspc($data['total'])."], ";
+
+ if ($j == count($this->view['chart']['data']['records']) - 1) {
+ $chartJS['year'] = 'var year = ['.substr($chartJS['year'], 0, -2).'];';
+ }
+
+ $j++;
+
+ }
+
+ }
+?>
+
+<?php if ($chartJS['year'] != '') { ?>
+<div id="chartannualturnover-line" style="height:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_width'); ?>px;"></div>
+
+<br />
+
+<div id="table-data">
+ <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?>
+</div>
+
+<div class="wpsg_clearer"></div>
+
+<script type="text/javascript">
+
+function tooltipContentEditor(str, seriesIndex, pointIndex, plot) {
+ // display series_label, x-axis_tick, y-axis value
+ return plot.series[seriesIndex]["label"] + ", " + plot.data[seriesIndex][pointIndex];
+}
+
+
+jQuery(document).ready(function(){
+ <?php echo $chartJS['year']; ?>
+
+ var chartannualturnoverLine = jQuery.jqplot('chartannualturnover-line', [year], {
+ animate: true,
+ axesDefaults: {
+ labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
+ },
+ series:[
+ <?php echo implode(', ', $chartJS['legend']); ?>
+ ],
+ legend: {
+ show: true,
+ placement: 'outside'
+ },
+ axes:{
+ xaxis:{
+ renderer:jQuery.jqplot.DateAxisRenderer,
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['xaxis']['label']); ?>',
+ tickOptions:{formatString:'%b'},
+ tickInterval: '1 month',
+ min:'<?php echo date('Y', $this->view['chart']['data']['min']); ?>/<?php echo date('m', $this->view['chart']['data']['min']); ?>/<?php echo date('d', $this->view['chart']['data']['min']); ?>',
+ max:'<?php echo date('Y', $this->view['chart']['data']['max']); ?>/<?php echo date('m', $this->view['chart']['data']['max']); ?>/<?php echo date('d', $this->view['chart']['data']['max']); ?>'
+ },
+ yaxis:{
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
+ tickOptions: {
+ formatter: wpsg_statistics_number_format
+ },
+ min:0
+ }
+ },
+ highlighter: {
+ show: true
+ }
+ });
+
+ wpsg_statistic_addExportButton();
+
+});
+</script>
+<?php } else { ?>
+<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_statistics/chartturnover/data.phtml b/views/mods/mod_statistics/chartturnover/data.phtml
new file mode 100644
index 0000000..7d5e89c
--- /dev/null
+++ b/views/mods/mod_statistics/chartturnover/data.phtml
@@ -0,0 +1,111 @@
+<?php foreach ($this->view['chart']['data'] as $index => $data) { ?>
+<?php if (is_numeric($index)) { ?>
+<div class="wpsg-table-data-wrapper">
+ <table style="width:auto !important;" class="widefat fixed tags" border="0" cellspacing="0" cellpadding="0">
+ <thead>
+ <tr>
+ <th colspan="4">
+ <?php
+
+ $i = 0;
+
+ foreach ((array)$data['records'] as $record)
+ {
+ if ($i == 0)
+ {
+ echo wpsg_hspc($data['label']);
+ }
+ $i++;
+ }
+ ?>
+ </th>
+ </tr>
+ <!-- Spaltensortierung -->
+ <tr>
+ <th class="manage-column">
+ <a id="tstamp" class="sortable <?php if($this->view['filter']['sort'] == 'tstamp' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'tstamp' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Zeitpunkt', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="th-right manage-column">
+ <a id="total" class="sortable <?php if($this->view['filter']['sort'] == 'total' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'total' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Umsatz in', 'wpsg').' '.$this->get_option('wpsg_currency'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="th-right manage-column">
+ <a id="orders" class="sortable <?php if($this->view['filter']['sort'] == 'orders' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'orders' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Bestellungen', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="th-right manage-column">
+ <a id="avg_total" class="sortable <?php if($this->view['filter']['sort'] == 'avg_total' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'avg_total' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('&oslash; in ', 'wpsg').' '.$this->get_option('wpsg_currency'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </thead>
+ <tbody class="the-list">
+ <?php
+
+ $i = 0;
+
+ foreach ((array)$data['records'] as $record)
+ {
+ if ($i%2 == 0) { $class = 'alternate'; } else { $class = ''; }
+ ?>
+ <tr class="<?php echo $class; ?>">
+ <td><strong><?php echo wpsg_hspc($record['label']); ?></strong></td>
+ <td class="td-right"><?php echo wpsg_ff($record['total']); ?></td>
+ <td class="td-right"><?php echo wpsg_hspc($record['orders']); ?></td>
+ <td class="td-right"><?php echo wpsg_ff($record['avg_total']); ?></td>
+ </tr>
+ <?php
+ $i++;
+ }
+ ?>
+ </tbody>
+ </table>
+</div>
+<?php } ?>
+<?php } ?>
+
+<div class="clearer"></div>
+
+<script type="text/javascript">
+
+jQuery(document).ready(function(){
+
+ jQuery('.sortable').bind('click', function(){
+
+ var order = '';
+ if(jQuery(this).hasClass('orderup'))
+ {
+ jQuery('#wpsg_statistics_order').val('orderup');
+ }
+ else
+ {
+ jQuery('#wpsg_statistics_order').val('orderdown');
+ }
+
+ jQuery('#wpsg_statistics_sort').val(jQuery(this).attr('id'));
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_statistics&noheader=1&do=sorting',
+ type: 'post',
+ data: jQuery('#wpsg_statistics_form').serialize(),
+ success: function(data) {
+ jQuery('#table-data').html(data);
+
+ }
+ } );
+
+ return false;
+ });
+
+});
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_statistics/chartturnover/day.phtml b/views/mods/mod_statistics/chartturnover/day.phtml
new file mode 100644
index 0000000..18c1b4c
--- /dev/null
+++ b/views/mods/mod_statistics/chartturnover/day.phtml
@@ -0,0 +1,118 @@
+<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
+
+<?php
+
+ if (wpsg_isSizedArray($this->view['chart']['data']))
+ {
+
+ for ($i = 0; $i < count($this->view['chart']['data']); $i++)
+ {
+
+ $chartJS['legend'][$i] = "{";
+
+ if (isset($this->view['chart']['data'][$i]['label']))
+ {
+ $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',";
+ }
+
+ $chartJS['legend'][$i] .= " highlighter: {";
+
+ $chartJS['legend'][$i] .= " formatString: '<table><tr><td>%s Uhr, %s ".$this->get_option('wpsg_currency')."</td></tr></table>'";
+
+ $chartJS['legend'][$i] .= " }";
+
+ $chartJS['legend'][$i] .= "}";
+
+ $j = 0;
+
+ foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record)
+ {
+
+ //immer das Datum vom Rootelement nutzen
+ $k = 0 ;
+
+ foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord)
+ {
+ if ($j == $k)
+ {
+ if (mktime($record['hour'], 0, 0, $record['month'], $record['day'], $record['year']) <= mktime(date_i18n('H'), 0, 0, date_i18n('m'), date_i18n('d'), date_i18n('Y')))
+ {
+ $chartJS['area']['area'.$i][] = "['".$rrecord['year'].'/'.$rrecord['month'].'/'.$rrecord['day']." ".$rrecord['hour'].":00:00', ".wpsg_hspc($record['total'])."]";
+ }
+ }
+ $k++;
+ }
+
+ if ($j == count($this->view['chart']['data'][$i]['records']) - 1) {
+ $chartJS['area']['area'.$i] = '['.implode(',', (array)$chartJS['area']['area'.$i]).']';
+ }
+
+ $j++;
+ }
+
+ }
+
+ }
+
+?>
+
+<?php if ($chartJS['area'] != '') { ?>
+<div id="chartannualturnover-line" style="height:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_width'); ?>px;"></div>
+
+<br />
+
+<div id="table-data">
+ <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?>
+</div>
+
+<div class="wpsg_clearer"></div>
+
+<script type="text/javascript">
+
+
+jQuery(document).ready(function(){
+ <?php foreach ($chartJS['area'] as $index => $area) { ?>
+ var <?php echo $index; ?> = <?php echo $area; ?>;
+ <?php } ?>
+
+ var chartannualturnoverLine = jQuery.jqplot('chartannualturnover-line', [<?php echo implode(',', array_keys($chartJS['area'])); ?>], {
+ animate: true,
+ axesDefaults: {
+ labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
+ },
+ series:[
+ <?php echo implode(', ', $chartJS['legend']); ?>
+ ],
+ legend: {
+ show: true,
+ placement: 'outside'
+ },
+ axes:{
+ xaxis:{
+ renderer:jQuery.jqplot.DateAxisRenderer,
+ label:'<?php echo __('Uhrzeit', 'wpsg'); ?>',
+ tickOptions:{formatString:"%#H:%M"},
+ min:'<?php echo $this->view['chart']['data'][0]['year']; ?>/<?php echo $this->view['chart']['data'][0]['month']; ?>/<?php echo $this->view['chart']['data'][0]['day']; ?> 00:00',
+ max:'<?php echo $this->view['chart']['data'][0]['year']; ?>/<?php echo $this->view['chart']['data'][0]['month']; ?>/<?php echo $this->view['chart']['data'][0]['day']; ?> 23:00',
+ tickInterval: '1 hours'
+ },
+ yaxis:{
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
+ tickOptions: {
+ formatter: wpsg_statistics_number_format
+ },
+ min:0
+ }
+ },
+ highlighter: {
+ show: true
+ }
+ });
+
+ wpsg_statistic_addExportButton();
+
+});
+</script>
+<?php } else { ?>
+<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_statistics/chartturnover/month.phtml b/views/mods/mod_statistics/chartturnover/month.phtml
new file mode 100644
index 0000000..5ef077a
--- /dev/null
+++ b/views/mods/mod_statistics/chartturnover/month.phtml
@@ -0,0 +1,117 @@
+<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
+
+<?php
+
+ if (wpsg_isSizedArray($this->view['chart']['data']))
+ {
+
+ for ($i = 0; $i < count($this->view['chart']['data']); $i++)
+ {
+
+ $chartJS['legend'][$i] = "{";
+
+ if (isset($this->view['chart']['data'][$i]['label']))
+ {
+ $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',";
+ }
+
+ $chartJS['legend'][$i] .= " highlighter: {";
+
+ $chartJS['legend'][$i] .= " formatString: '<table><tr><td>%s ".$this->view['chart']['data'][$i]['year'].", %s ".$this->get_option('wpsg_currency')."</td></tr></table>'";
+
+ $chartJS['legend'][$i] .= " }";
+
+ $chartJS['legend'][$i] .= "}";
+
+ $j = 0;
+
+ foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record)
+ {
+
+ //immer das Datum vom Rootelement nutzen
+ $k = 0 ;
+
+ foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord)
+ {
+ if ($j == $k)
+ {
+ if (mktime(0, 0, 0, $record['month'], $record['day'], $record['year']) <= mktime(0, 0, 0, date_i18n('m'), date_i18n('d'), date_i18n('Y')))
+ {
+ $chartJS['area']['area'.$i][] = "['".$rrecord['year'].'/'.$rrecord['month'].'/'.$rrecord['day']."', ".wpsg_hspc($record['total'])."]";
+ }
+ }
+ $k++;
+ }
+
+ if ($j == count($this->view['chart']['data'][$i]['records']) - 1) {
+ $chartJS['area']['area'.$i] = '['.implode(',', $chartJS['area']['area'.$i]).']';
+ }
+
+ $j++;
+ }
+
+ }
+
+ }
+
+?>
+<?php if ($chartJS['area'] != '') { ?>
+<div id="chartannualturnover-line" style="height:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_width'); ?>px;"></div>
+
+<br />
+
+<div id="table-data">
+ <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?>
+</div>
+
+<div class="wpsg_clearer"></div>
+
+<script type="text/javascript">
+
+
+jQuery(document).ready(function(){
+ <?php foreach ($chartJS['area'] as $index => $area) { ?>
+ var <?php echo $index; ?> = <?php echo $area; ?>;
+ <?php } ?>
+
+ var chartannualturnoverLine = jQuery.jqplot('chartannualturnover-line', [<?php echo implode(',', array_keys($chartJS['area'])); ?>], {
+ animate: true,
+ axesDefaults: {
+ labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
+ },
+ series:[
+ <?php echo implode(', ', $chartJS['legend']); ?>
+ ],
+ legend: {
+ show: true,
+ placement: 'outside'
+ },
+ axes:{
+ xaxis:{
+ renderer:jQuery.jqplot.DateAxisRenderer,
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['xaxis']['label']); ?>',
+ tickOptions:{formatString:'%d'},
+ tickInterval: '1 day',
+ min:'<?php echo date('Y', $this->view['chart']['data'][0]['min']); ?>/<?php echo date('m', $this->view['chart']['data'][0]['min']); ?>/<?php echo date('d', $this->view['chart']['data'][0]['min']); ?>',
+ max:'<?php echo date('Y', $this->view['chart']['data'][0]['max']); ?>/<?php echo date('m', $this->view['chart']['data'][0]['max']); ?>/<?php echo date('d', $this->view['chart']['data'][0]['max']); ?>'
+ },
+ yaxis:{
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
+ tickOptions: {
+ formatter: wpsg_statistics_number_format
+ },
+ min:0
+ }
+ },
+ highlighter: {
+ show: true
+ }
+ });
+
+ wpsg_statistic_addExportButton();
+
+});
+</script>
+<?php } else { ?>
+<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_statistics/chartturnover/quarter.phtml b/views/mods/mod_statistics/chartturnover/quarter.phtml
new file mode 100644
index 0000000..36fc4cf
--- /dev/null
+++ b/views/mods/mod_statistics/chartturnover/quarter.phtml
@@ -0,0 +1,120 @@
+<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
+
+<br /><br />
+<?php
+
+ if (wpsg_isSizedArray($this->view['chart']['data']))
+ {
+
+ for ($i = 0; $i < count($this->view['chart']['data']); $i++)
+ {
+
+ $chartJS['legend'][$i] = "{";
+
+ if (isset($this->view['chart']['data'][$i]['label']))
+ {
+ $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',";
+ }
+
+ $chartJS['legend'][$i] .= " highlighter: {";
+
+ $chartJS['legend'][$i] .= " formatString: '<table><tr><td>KW %s ".$this->view['chart']['data'][$i]['year'].", %s ".$this->get_option('wpsg_currency')."</td></tr></table>'";
+
+ $chartJS['legend'][$i] .= " }";
+
+ $chartJS['legend'][$i] .= "}";
+
+ $j = 0;
+
+ foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record)
+ {
+
+ //immer das Datum vom Rootelement nutzen
+ $k = 0 ;
+
+ foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord)
+ {
+ if ($j == $k)
+ {
+ if ($record['week'] <= (int)date_i18n('W') || $record['year'] < date_i18n('Y'))
+ {
+ $chartJS['area']['area'.$i][] = "['".$j."', ".wpsg_hspc($record['total'])."]";
+
+
+ }
+ $chartJS['ticks']['ticks'.$i][] = '['.$j.', \'KW '.$record['week'].'\']';
+ }
+ $k++;
+ }
+
+ if ($j == count($this->view['chart']['data'][$i]['records']) - 1) {
+ $chartJS['area']['area'.$i] = '['.implode(',', (array)$chartJS['area']['area'.$i]).']';
+ }
+
+ $j++;
+ }
+
+ }
+
+ }
+
+?>
+
+<?php if ($chartJS['area'] != '') { ?>
+<div id="chartannualturnover-line" style="height:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_width'); ?>px;"></div>
+
+<br />
+
+<div id="table-data">
+ <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?>
+</div>
+
+<div class="wpsg_clearer"></div>
+
+<script type="text/javascript">
+
+
+jQuery(document).ready(function(){
+ <?php foreach ($chartJS['area'] as $index => $area) { ?>
+ var <?php echo $index; ?> = <?php echo $area; ?>;
+ <?php } ?>
+
+ var chartannualturnoverLine = jQuery.jqplot('chartannualturnover-line', [<?php echo implode(',', array_keys($chartJS['area'])); ?>], {
+ animate: true,
+ axesDefaults: {
+ labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
+ },
+ series:[
+ <?php echo implode(', ', $chartJS['legend']); ?>
+ ],
+ legend: {
+ show: true,
+ placement: 'outside'
+ },
+ axes:{
+ xaxis:{
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['xaxis']['label']); ?>',
+ syncTicks: false,
+ tickOptions:{formatString:'KW %d'},
+ ticks: [<?php echo implode(',', $chartJS['ticks']['ticks0']); ?>]
+ },
+ yaxis:{
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
+ tickOptions: {
+ formatter: wpsg_statistics_number_format
+ },
+ min:0
+ }
+ },
+ highlighter: {
+ show: true
+ }
+ });
+
+ wpsg_statistic_addExportButton();
+
+});
+</script>
+<?php } else { ?>
+<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_statistics/chartturnover/week.phtml b/views/mods/mod_statistics/chartturnover/week.phtml
new file mode 100644
index 0000000..57dd4a5
--- /dev/null
+++ b/views/mods/mod_statistics/chartturnover/week.phtml
@@ -0,0 +1,118 @@
+<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
+
+<?php
+
+ if (wpsg_isSizedArray($this->view['chart']['data']))
+ {
+
+ $series = '';
+
+ for ($i = 0; $i < count($this->view['chart']['data']); $i++)
+ {
+
+ $chartJS['legend'][$i] = "{";
+
+ if (isset($this->view['chart']['data'][$i]['label']))
+ {
+ $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',";
+ }
+
+ $chartJS['legend'][$i] .= " highlighter: {";
+
+ $chartJS['legend'][$i] .= " formatString: '<table><tr><td>%s ".$this->view['chart']['data'][$i]['year'].", %s ".$this->get_option('wpsg_currency')."</td></tr></table>'";
+
+ $chartJS['legend'][$i] .= " }";
+
+ $chartJS['legend'][$i] .= "}";
+
+ $j = 0;
+
+ foreach ($this->view['chart']['data'][$i]['records'] as $index => $record)
+ {
+
+ //immer das Datum vom Rootelement nutzen
+ $k = 0 ;
+
+ foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord)
+ {
+ if ($j == $k)
+ {
+ if (mktime(0, 0, 0, $record['month'], $record['day'], $record['year']) <= mktime(0, 0, 0, date_i18n('m'), date_i18n('d'), date_i18n('Y')))
+ {
+ $chartJS['area']['area'.$i][] = "['".$rrecord['year'].'/'.$rrecord['month'].'/'.$rrecord['day']."', ".wpsg_hspc($record['total'])."]";
+ }
+ }
+ $k++;
+ }
+
+ if ($j == count($this->view['chart']['data'][$i]['records']) - 1) {
+ $chartJS['area']['area'.$i] = '['.implode(',', $chartJS['area']['area'.$i]).']';
+ }
+
+ $j++;
+ }
+
+ }
+
+ }
+
+?>
+<?php if ($chartJS['area'] != '') { ?>
+<div id="chartannualturnover-line" style="height:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_width'); ?>px;"></div>
+
+<br />
+
+<div id="table-data">
+ <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?>
+</div>
+
+<div class="wpsg_clearer"></div>
+
+<script type="text/javascript">
+
+jQuery(document).ready(function(){
+ <?php foreach ($chartJS['area'] as $index => $area) { ?>
+ var <?php echo $index; ?> = <?php echo $area; ?>;
+ <?php } ?>
+
+ var chartannualturnoverLine = jQuery.jqplot('chartannualturnover-line', [<?php echo implode(',', array_keys($chartJS['area'])); ?>], {
+ animate: true,
+ axesDefaults: {
+ labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
+ },
+ series:[
+ <?php echo implode(', ', $chartJS['legend']); ?>
+ ],
+ legend: {
+ show: true,
+ placement: 'outside'
+ },
+ axes:{
+ xaxis:{
+ renderer:jQuery.jqplot.DateAxisRenderer,
+ label:'<?php echo __('Tag', 'wpsg'); ?>',
+ tickOptions:{formatString:'%d.%m.%Y'},
+ tickInterval: '1 day',
+ min:'<?php echo date('Y', $this->view['chart']['data'][0]['firstdayofweek']); ?>/<?php echo date('m', $this->view['chart']['data'][0]['firstdayofweek']); ?>/<?php echo date('d', $this->view['chart']['data'][0]['firstdayofweek']); ?>',
+ max:'<?php echo date('Y', $this->view['chart']['data'][0]['lastdayofweek']); ?>/<?php echo date('m', $this->view['chart']['data'][0]['lastdayofweek']); ?>/<?php echo date('d', $this->view['chart']['data'][0]['lastdayofweek']); ?>'
+ },
+ yaxis:{
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
+ tickOptions: {
+ formatter: wpsg_statistics_number_format
+ },
+ min:0
+ }
+ },
+ highlighter: {
+ show: true
+ }
+ });
+
+ wpsg_statistic_addExportButton();
+
+});
+</script>
+<?php } else { ?>
+<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_statistics/chartturnover/year.phtml b/views/mods/mod_statistics/chartturnover/year.phtml
new file mode 100644
index 0000000..2be39aa
--- /dev/null
+++ b/views/mods/mod_statistics/chartturnover/year.phtml
@@ -0,0 +1,127 @@
+<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
+
+<?php
+
+ if (wpsg_isSizedArray($this->view['chart']['data']))
+ {
+
+ for ($i = 0; $i < count($this->view['chart']['data']); $i++)
+ {
+
+ $chartJS['legend'][$i] = "{";
+
+ if (isset($this->view['chart']['data'][$i]['label']))
+ {
+ $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',";
+ }
+
+ $chartJS['legend'][$i] .= " highlighter: { useXTickMarks: true, ";
+
+ $chartJS['legend'][$i] .= " formatString: '<table><tr><td>%s, %s. ".$this->get_option('wpsg_currency')."</td></tr></table>'";
+
+ $chartJS['legend'][$i] .= " }";
+
+ $chartJS['legend'][$i] .= "}";
+
+ $j = 0;
+
+ foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record)
+ {
+
+ //immer das Datum vom Rootelement nutzen
+ $k = 0 ;
+
+ foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord)
+ {
+ if ($j == $k)
+ {
+ if (mktime(0, 0, 0, $record['month'], 1, $record['year']) <= mktime(0, 0, 0, date_i18n('m'), 1, date_i18n('Y')))
+ {
+ $chartJS['area']['area'.$i][] .= "['".$j."', ".wpsg_hspc($record['total'])."]";
+ }
+ $chartJS['ticks']['ticks'.$i][] = '['.$j.', \''.$record['tick'].'\']';
+ }
+ $k++;
+ }
+
+ if ($j == count($this->view['chart']['data'][$i]['records']) - 1) {
+ $chartJS['area']['area'.$i] = '['.implode(',', (array)$chartJS['area']['area'.$i]).']';
+ }
+
+ $j++;
+ }
+
+ }
+
+ }
+
+?>
+
+<?php if ($chartJS['area'] != '') { ?>
+<div id="chartannualturnover-line" style="height:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_width'); ?>px;"></div>
+
+<br />
+
+<div id="table-data">
+ <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?>
+</div>
+
+<div class="wpsg_clearer"></div>
+
+<script type="text/javascript">
+
+function tooltipContentEditor(str, seriesIndex, pointIndex, plot) {
+ // display series_label, x-axis_tick, y-axis value
+ return plot.series[seriesIndex]["label"] + ", " + plot.data[seriesIndex][pointIndex];
+}
+
+
+jQuery(document).ready(function(){
+ <?php foreach ($chartJS['area'] as $index => $area) { ?>
+ var <?php echo $index; ?> = <?php echo $area; ?>;
+ <?php } ?>
+
+ var chartannualturnoverLine = jQuery.jqplot('chartannualturnover-line', [<?php echo implode(',', array_keys($chartJS['area'])); ?>], {
+ animate: true,
+ axesDefaults: {
+ labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
+ },
+ series:[
+ <?php echo implode(', ', $chartJS['legend']); ?>
+ ],
+ legend: {
+ show: true,
+ placement: 'outside'
+ },
+ axes:{
+ xaxis:{
+ rendererOptions:{tickRenderer:
+ jQuery.jqplot.CanvasAxisTickRenderer},
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['xaxis']['label']); ?>',
+ syncTicks: false,
+ tickOptions:{formatString:'%d'},
+ ticks: [<?php echo implode(',', $chartJS['ticks']['ticks0']); ?>]
+ /*tickInterval: '1 month'
+ min:'<?php echo date('Y', $this->view['chart']['data'][0]['min']); ?>/<?php echo date('m', $this->view['chart']['data'][0]['min']); ?>/<?php echo date('d', $this->view['chart']['data'][0]['min']); ?>',
+ max:'<?php echo date('Y', $this->view['chart']['data'][0]['max']); ?>/<?php echo date('m', $this->view['chart']['data'][0]['max']); ?>/1'*/
+ },
+ yaxis:{
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
+ tickOptions: {
+ formatter: wpsg_statistics_number_format
+ },
+ min:0
+ }
+ },
+ highlighter: {
+ show: true
+ }
+ });
+
+ wpsg_statistic_addExportButton();
+
+});
+</script>
+<?php } else { ?>
+<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_statistics/chartturnoverperhour/all.phtml b/views/mods/mod_statistics/chartturnoverperhour/all.phtml
new file mode 100644
index 0000000..1698126
--- /dev/null
+++ b/views/mods/mod_statistics/chartturnoverperhour/all.phtml
@@ -0,0 +1,117 @@
+<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
+
+<?php
+
+ if (wpsg_isSizedArray($this->view['chart']['data']))
+ {
+
+ for ($i = 0; $i < count($this->view['chart']['data']); $i++)
+ {
+
+ $chartJS['legend'][$i] = "{";
+
+ if (isset($this->view['chart']['data'][$i]['label']))
+ {
+ $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',";
+ }
+
+ $chartJS['legend'][$i] .= " highlighter: {";
+
+ $chartJS['legend'][$i] .= " formatString: '<table><tr><td>%s Uhr, %s ".$this->get_option('wpsg_currency')."</td></tr></table>'";
+
+ $chartJS['legend'][$i] .= " }";
+
+ $chartJS['legend'][$i] .= "}";
+
+ $j = 0;
+
+ foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record)
+ {
+ //immer das Datum vom Rootelement nutzen
+ $k = 0 ;
+
+ foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord)
+ {
+ if ($j == $k)
+ {
+ //if (mktime($record['hour'], 0, 0, $record['month'], $record['day'], $record['year']) <= mktime(date('H'), 0, 0, date('m'), date('d'), date('Y')))
+ //{
+ $chartJS['area']['area'.$i][] = "['".$rrecord['year'].'/'.$rrecord['month'].'/'.$rrecord['day']." ".$rrecord['hour'].":00:00', ".wpsg_hspc($record['total'])."]";
+ //}
+ }
+ $k++;
+ }
+
+ if ($j == count($this->view['chart']['data'][$i]['records']) - 1) {
+ $chartJS['area']['area'.$i] = '['.implode(',', (array)$chartJS['area']['area'.$i]).']';
+ }
+
+ $j++;
+ }
+
+ }
+
+ }
+
+?>
+
+<?php if ($chartJS['area'] != '') { ?>
+<div id="chartannualturnover-line" style="height:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_width'); ?>px;"></div>
+
+<br/>
+
+<div id="table-data">
+ <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnoverperhour/data.phtml'); ?>
+</div>
+
+<div class="wpsg_clearer"></div>
+
+<script type="text/javascript">
+
+
+jQuery(document).ready(function(){
+ <?php foreach ($chartJS['area'] as $index => $area) { ?>
+ var <?php echo $index; ?> = <?php echo $area; ?>;
+ <?php } ?>
+
+ var chartannualturnoverLine = jQuery.jqplot('chartannualturnover-line', [<?php echo implode(',', array_keys($chartJS['area'])); ?>], {
+ animate: true,
+ axesDefaults: {
+ labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
+ },
+ series:[
+ <?php echo implode(', ', $chartJS['legend']); ?>
+ ],
+ legend: {
+ show: true,
+ placement: 'outside'
+ },
+ axes:{
+ xaxis:{
+ renderer:jQuery.jqplot.DateAxisRenderer,
+ label:'<?php echo __('Uhrzeit', 'wpsg'); ?>',
+ tickOptions:{formatString:"%#H:%M"},
+ min:'<?php echo $this->view['chart']['data'][0]['year']; ?>/<?php echo $this->view['chart']['data'][0]['month']; ?>/<?php echo $this->view['chart']['data'][0]['day']; ?> 00:00',
+ max:'<?php echo $this->view['chart']['data'][0]['year']; ?>/<?php echo $this->view['chart']['data'][0]['month']; ?>/<?php echo $this->view['chart']['data'][0]['day']; ?> 23:00',
+ tickInterval: '1 hours'
+ },
+ yaxis:{
+ label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
+ tickOptions: {
+ formatter: wpsg_statistics_number_format
+ },
+ min:0
+ }
+ },
+ highlighter: {
+ show: true
+ }
+ });
+
+ wpsg_statistic_addExportButton();
+
+});
+</script>
+<?php } else { ?>
+<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_statistics/chartturnoverperhour/data.phtml b/views/mods/mod_statistics/chartturnoverperhour/data.phtml
new file mode 100644
index 0000000..3e98ee4
--- /dev/null
+++ b/views/mods/mod_statistics/chartturnoverperhour/data.phtml
@@ -0,0 +1,103 @@
+<?php foreach ($this->view['chart']['data'] as $index => $data) { ?>
+<?php if (is_numeric($index)) { ?>
+<div class="wpsg-table-data-wrapper">
+ <table style="width:auto !important;" class="widefat fixed tags" border="0" cellspacing="0" cellpadding="0">
+ <thead>
+ <tr>
+ <th colspan="3">
+ <?php
+
+ $i = 0;
+
+ foreach ((array)$data['records'] as $record)
+ {
+ if ($i == 0)
+ {
+ echo wpsg_hspc($data['label']);
+ }
+ $i++;
+ }
+ ?>
+ </th>
+ </tr>
+ <tr>
+ <th class="manage-column">
+ <a id="tstamp" class="sortable <?php if($this->view['filter']['sort'] == 'tstamp' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'tstamp' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Uhrzeit', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column th-right">
+ <a id="total" class="sortable <?php if($this->view['filter']['sort'] == 'total' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'total' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Umsatz in', 'wpsg').' '.$this->get_option('wpsg_currency'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column th-right">
+ <a id="orders" class="sortable <?php if($this->view['filter']['sort'] == 'orders' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'orders' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
+ <span><?php echo __('Bestellungen', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </thead>
+ <tbody class="the-list">
+ <?php
+
+ $i = 0;
+
+ foreach ((array)$data['records'] as $record)
+ {
+ if ($i%2 == 0) { $class = 'alternate'; } else { $class = ''; }
+ ?>
+ <tr class="<?php echo $class; ?>">
+ <td><strong><?php echo wpsg_hspc($record['hour']); ?></strong></td>
+ <td class="td-right"><?php echo wpsg_ff($record['total']); ?></td>
+ <td class="td-right"><?php echo (($record['orders'] > 0)?wpsg_hspc($record['orders']):'0'); ?></td>
+ </tr>
+ <?php
+ $i++;
+ }
+ ?>
+ </tbody>
+ </table>
+</div>
+<?php } ?>
+<?php } ?>
+
+<div class="clearer"></div>
+
+<script type="text/javascript">
+
+jQuery(document).ready(function(){
+
+ jQuery('.sortable').bind('click', function(){
+
+ var order = '';
+ if(jQuery(this).hasClass('orderup'))
+ {
+ jQuery('#wpsg_statistics_order').val('orderup');
+ }
+ else
+ {
+ jQuery('#wpsg_statistics_order').val('orderdown');
+ }
+
+ jQuery('#wpsg_statistics_sort').val(jQuery(this).attr('id'));
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_statistics&noheader=1&do=sorting',
+ type: 'post',
+ data: jQuery('#wpsg_statistics_form').serialize(),
+ success: function(data) {
+ jQuery('#table-data').html(data);
+
+ }
+ } );
+
+ return false;
+ });
+
+});
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_statistics/customermap/all.phtml b/views/mods/mod_statistics/customermap/all.phtml
new file mode 100644
index 0000000..b35624c
--- /dev/null
+++ b/views/mods/mod_statistics/customermap/all.phtml
@@ -0,0 +1,48 @@
+<?php
+
+ /**
+ * Template für die Anzeige der Kundenkarte innerhalb des Statistikmoduls
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_mod_statistics_initialize()
+ {
+
+ var mapOptions = {
+ center: new google.maps.LatLng(-34.397, 150.644),
+ zoom: 5,
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ };
+
+ var map = new google.maps.Map(document.getElementById("wpsg_mod_statistics_map"), mapOptions);
+ var bounds = new google.maps.LatLngBounds();
+
+ <?php $i = 1; foreach ($this->view['wpsg_mod_statistics']['marker'] as $m) { ?>
+ var marker<?php echo $i; ?> = new google.maps.Marker({
+ position: new google.maps.LatLng(<?php echo $m['long']; ?>, <?php echo $m['lat']; ?>),
+ map: map
+ } );
+ google.maps.event.addListener(marker<?php echo $i; ?>, 'click', function() {
+ location.href = '<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id='.$m['customer']['id']; ?>';
+ } );
+ bounds.extend(marker<?php echo $i; ?>.getPosition());
+ <?php $i ++; } ?>
+
+ map.fitBounds(bounds);
+ map.setZoom(15);
+
+ } // function wpsg_mod_statistics_initialize()
+
+ google.maps.event.addDomListener(window, 'load', wpsg_mod_statistics_initialize);
+
+/* ]]> */</script>
+
+<div style="" id="wpsg_mod_customermap_layer">
+ <div class="postbox" id="wpsg_modcustomermap">
+ <div style="height:500px;">
+ <div style="width:100%; height:100%" id="wpsg_mod_statistics_map"></div>
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_statistics/settings_edit.phtml b/views/mods/mod_statistics/settings_edit.phtml
new file mode 100644
index 0000000..eaa1d87
--- /dev/null
+++ b/views/mods/mod_statistics/settings_edit.phtml
@@ -0,0 +1,133 @@
+<br/>
+
+<div class="wpsg_admin_box" id="wpsg_tab">
+ <div class="head">
+ <div class="title">
+ <div class="tab" id="tab1"><?php echo __('Auswertung Bestellstatus', 'wpsg'); ?></div>
+ <div class="tab" id="tab2"><?php echo __('Piwik', 'wpsg'); ?></div>
+ <div class="tab" id="tab3"><?php echo __('Google', 'wpsg'); ?></div>
+ <div class="tab" id="tab4"><?php echo __('Sonstiges', 'wpsg'); ?></div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+ <div class="content" id="wpsg_statistics_list">
+
+ <div id="tabcontent1" class="tabcontent">
+
+ <br/>
+
+ <?php
+
+ $arSelectedStatus = explode(',', $this->get_option('wpsg_mod_statistics_status'));
+
+ echo __('Bitte wählen Sie die Zustände aus unter welchen die Bestellung eines Produktes als abgeschlossen Gültigkeit besitzt.', 'wpsg');
+ ?>
+ <br/><br/>
+ <?php
+ foreach ($this->arStatus as $statusCode => $statusName)
+ {
+ echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_status['.$statusCode.']', $statusName, (is_array($arSelectedStatus) && is_string($arSelectedStatus[0]) && strlen($arSelectedStatus[0]) && in_array($statusCode, $arSelectedStatus)?true:false));
+ }
+ ?>
+ <div class="wpsg_clearer"></div>
+ </div>
+
+ <div id="tabcontent2" class="tabcontent">
+
+ <br/>
+
+ <?php echo __('Ermöglicht die Integration des Trackintools "Piwik".', 'wpsg'); ?>
+
+ <br/><br/>
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_url', __('URL zur Piwik Installation', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_url'), array('hint' => __('Ohne Protokoll, Beispiel: piwik.domain.de', 'wpsg'))); ?>
+ <br />
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_generel', __('Allgemeine Protokollierung', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_generel')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_SiteId', __('Piwik Seiten ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_SiteId'), array('help' => 'wpsg_mod_statistics_piwik_SiteId')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_ecommerce', __('Käufe (eCommerce) tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_ecommerce')); ?>
+ <br /><br />
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_basket', __('Warenkorb tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_basket')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_basket_target', __('Ziel ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_basket_target')); ?>
+ <br />
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_checkout', __('Checkout tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_checkout')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_checkout_target', __('Ziel ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_checkout_target')); ?>
+ <br />
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_checkout2', __('Checkout2 tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_checkout2')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_checkout2_target', __('Ziel ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_checkout2_target')); ?>
+ <br />
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_overview', __('Overview tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_overview')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_overview_target', __('Ziel ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_overview_target')); ?>
+ <br />
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_done', __('Done tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_done')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_done_target', __('Ziel ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_done_target')); ?>
+ <div class="wpsg_clearer"></div>
+ </div>
+
+ <div id="tabcontent3" class="tabcontent">
+ <?php
+
+ echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_google_active', __('Google Analytics aktivieren', 'wpsg'), $this->get_option('wpsg_mod_statistics_google_active'), array('help' => 'wpsg_mod_statistics_google_active'));
+
+ echo wpsg_drawForm_Input('wpsg_mod_statistics_google_tracking_code', __('Tracking-Code', 'wpsg'), $this->get_option('wpsg_mod_statistics_google_tracking_code'), array('help' => 'wpsg_mod_statistics_google_tracking_code'));
+
+ echo wpsg_drawForm_Input('wpsg_mod_statistics_google_domainname', __('Domainname', 'wpsg'), $this->get_option('wpsg_mod_statistics_google_domainname'), array('help' => 'wpsg_mod_statistics_google_domainname'));
+
+ echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_google_anonymise_ip_address', __('IP Adresse anonymisieren', 'wpsg'), $this->get_option('wpsg_mod_statistics_google_anonymise_ip_address'), array('help' => 'wpsg_mod_statistics_google_anonymise_ip_address'));
+
+ //echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_google_enable_first_touch_tracking', __('Enable First Touch Tracking', 'wpsg'), $this->get_option('wpsg_mod_statistics_google_enable_first_touch_tracking'));
+
+ echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_google_track_page_load_time', __('Ladegeschwindigkeit der Website erfassen', 'wpsg'), $this->get_option('wpsg_mod_statistics_google_track_page_load_time'), array('help' => 'wpsg_mod_statistics_google_track_page_load_time'));
+ ?>
+ <h3><?php echo __('Zieleinrichtung in Google Analytics', 'wpsg'); ?></h3>
+
+ <?php echo __('Ziel', 'wpsg'); ?>&nbsp;:
+ <ul>
+ <li>
+ <?php
+
+ echo wpsg_drawForm_Input('wpsg_mod_statistics_google_done', __('Bestellabschluss', 'wpsg'), trim(str_replace(get_site_url(), '', $this->getURL(wpsg_ShopController::URL_BASKET).'?wpsg_done')).'=', array('text' => true));
+
+ ?>
+ </li>
+ </ul>
+ <?php echo __('Trichter (optional)', 'wpsg'); ?>:
+ <ul>
+
+ <li><?php echo wpsg_drawForm_Input('wpsg_mod_statistics_google_basket', __('Warenkorb', 'wpsg'), trim(str_replace(get_site_url(), '', $this->getURL(wpsg_ShopController::URL_BASKET))), array('text' => true)); ?></li>
+ <li><?php echo wpsg_drawForm_Input('wpsg_mod_statistics_google_checkout', __('Adresse', 'wpsg'), trim(str_replace(get_site_url(), '', $this->getURL(wpsg_ShopController::URL_CHECKOUT))).'=', array('text' => true)); ?></li>
+ <li><?php echo wpsg_drawForm_Input('wpsg_mod_statistics_google_checkout2', __('Versand', 'wpsg'), trim(str_replace(get_site_url(), '', $this->getURL(wpsg_ShopController::URL_CHECKOUT2))).'=', array('text' => true)); ?></li>
+ <li><?php echo wpsg_drawForm_Input('wpsg_mod_statistics_google_overview', __('Warenkorbübersicht', 'wpsg'), trim(str_replace(get_site_url(), '', $this->getURL(wpsg_ShopController::URL_OVERVIEW))).'=', array('text' => true)); ?></li>
+
+ </ul>
+
+ <div class="wpsg_clearer"></div>
+ </div>
+
+ <div id="tabcontent4" class="tabcontent">
+ <?php
+ echo wpsg_drawForm_Input('wpsg_mod_statistics_line_chart_width', __('Liniendiagramm (Breite in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_line_chart_width'), array('help' => 'wpsg_mod_statistics_line_chart_width'));
+ echo wpsg_drawForm_Input('wpsg_mod_statistics_line_chart_height', __('Liniendiagramm (Hoehe in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_line_chart_height'), array('help' => 'wpsg_mod_statistics_line_chart_height'));
+
+ echo wpsg_drawForm_Input('wpsg_mod_statistics_pie_chart_width', __('Kuchendiagramm (Breite in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_pie_chart_width'), array('help' => 'wpsg_mod_statistics_pie_chart_width'));
+ echo wpsg_drawForm_Input('wpsg_mod_statistics_pie_chart_height', __('Kuchendiagramm (Höhe in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_pie_chart_height'), array('help' => 'wpsg_mod_statistics_pie_chart_height'));
+
+ echo wpsg_drawForm_Input('wpsg_mod_statistics_bar_chart_width', __('Balkendiagramm (Breite in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_bar_chart_width'), array('help' => 'wpsg_mod_statistics_bar_chart_width'));
+ echo wpsg_drawForm_Input('wpsg_mod_statistics_bar_chart_height', __('Balkendiagramm (Höhe in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_bar_chart_height'), array('help' => 'wpsg_mod_statistics_bar_chart_height'));
+
+ echo wpsg_drawForm_Input('wpsg_mod_statistics_topproductcount', __('Anzeige Top-Produkte', 'wpsg'), $this->get_option('wpsg_mod_statistics_topproductcount'), array('help' => 'wpsg_mod_statistics_topproductcount'));
+ ?>
+ <div class="wpsg_clearer"></div>
+ </div>
+
+ </div>
+</div>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+ jQuery('#wpsg_tab').wpsg_tab( {
+ 'cookiename': 'wpsg_statistics_tab'
+ } );
+ } );
+
+</script>
diff --git a/views/mods/mod_statistics/simplefilter.phtml b/views/mods/mod_statistics/simplefilter.phtml
new file mode 100644
index 0000000..306befc
--- /dev/null
+++ b/views/mods/mod_statistics/simplefilter.phtml
@@ -0,0 +1,104 @@
+<script type="text/javascript">
+
+ function checkForRelated(el)
+ {
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_statistics&noheader=1&do=related&selection='+jQuery(el).val(),
+ dataType: 'json',
+ success: function(data) {
+
+ jQuery('#filter-related-wrapper').empty();
+
+ if (!jQuery.isEmptyObject(data))
+ {
+ jQuery('#filter-related-wrapper').html('<label style="width:8em; margin-left:10px; height:2em; line-height:2em; padding:2px; display:block; float:left;" for="filter-related"><?php echo __('im Vergleich zu', 'wpsg'); ?></label><select name="filter[related]" id="filter-related" size="1"><option value=""><?php echo __('-- Bitte wählen ---', 'wpsg'); ?></option></select>');
+ jQuery.each(data, function(i, item) {
+ jQuery('#filter-related').append('<option value="' + item.value + '">' + item.name + '</option>');
+ });
+ }
+
+ <?php
+ if ($this->view['filter']['related'] > 0)
+ {
+ ?>
+ jQuery("#filter-related").val("<?php echo $this->view['filter']['related']; ?>");
+ <?php
+ }
+ ?>
+ }
+ } );
+ }
+
+</script>
+
+<?php foreach ($this->view['charts'][$_REQUEST['id']]['type'] as $type => $data) { ?>
+<a class="<?php echo (($_REQUEST['type'] == $type)?'current':''); ?>" href="admin.php?page=wpsg-Statistics&amp;id=<?php echo $_REQUEST['id']; ?>&amp;type=<?php echo $type; ?>"><?php echo wpsg_hspc($data['name']); ?></a>
+<?php } ?>
+
+<br />
+
+<form name="wpsg_statistics_form" id="wpsg_statistics_form" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Statistics">
+
+ <label style="width:5em; height:2em; line-height:2em; padding:2px; display:block; float:left;" for="filter-standard"><?php echo __('Auswahl', 'wpsg'); ?></label>
+
+ <div style="float:left;" id="filter-standard-wrapper">
+ <select name="filter[standard]" id="filter-standard" size="1" onchange="<?php if ($_REQUEST['id'] == 0 || $_REQUEST['id'] == 1) { ?>checkForRelated(this);<?php } ?>">
+ <?php foreach ($this->view['standardFilter'] as $index => $filter) { ?>
+ <option value="<?php echo wpsg_hspc($index)?>" <?php if ($index == $this->view['filter']['standard']) { ?>selected="selected"<?php } ?>><?php echo wpsg_hspc($filter['name']); ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div style="float:left;" id="filter-related-wrapper">
+
+ </div>
+
+ <input style="float:left; margin-left:25px;" type="submit" class="button-secondary" value="<?php echo __('Anzeigen', 'wpsg'); ?>" />
+
+ <div class="wpsg_clear"></div><br/>
+
+ <div class="customfilter" style="display:none;">
+ <?php echo wpsg_drawForm_Date('filter[day][0]', __('von', 'wpsg'), $this->view['filter']['day'][0]['d'].'.'.$this->view['filter']['day'][0]['m'].'.'.$this->view['filter']['day'][0]['Y'], array('time' => false)); ?>
+ <?php echo wpsg_drawForm_Date('filter[day][1]', __('bis', 'wpsg'), $this->view['filter']['day'][1]['d'].'.'.$this->view['filter']['day'][1]['m'].'.'.$this->view['filter']['day'][1]['Y'], array('time' => false)); ?>
+ </div>
+
+ <input type="hidden" id="wpsg_statistics_order" name="filter[order]" value="<?php echo wpsg_hspc($this->view['filter']['order']); ?>" />
+ <input type="hidden" id="wpsg_statistics_sort" name="filter[sort]" value="<?php echo wpsg_hspc($this->view['filter']['sort']); ?>" />
+
+ <input type="hidden" id="wpsg_statistics_type" name="type" value="<?php echo wpsg_hspc($_REQUEST['type']); ?>" />
+
+ <input type="hidden" name="id" value="<?php echo wpsg_hspc($_REQUEST['id']); ?>" />
+
+</form>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function(){
+
+
+ jQuery('#filter-standard').bind('change', function(){
+
+ if (parseInt(jQuery(this).val()) == 11)
+ {
+ jQuery('.customfilter').css('display', 'block');
+ jQuery('.customfilter .customfilter-input').each(function(index, value) {
+ jQuery(this).removeAttr('disabled');
+ });
+ }
+ else
+ {
+ jQuery('.customfilter').css('display', 'none');
+ jQuery('.customfilter .customfilter-input').each(function(index, value) {
+ jQuery(this).attr('disabled', 'disabled');
+ });
+ }
+
+ });
+
+ jQuery('#filter-standard').trigger('change');
+
+ });
+
+</script>
+
+<br /><br /> \ No newline at end of file
diff --git a/views/mods/mod_statistics/statistics.phtml b/views/mods/mod_statistics/statistics.phtml
new file mode 100644
index 0000000..8f64b62
--- /dev/null
+++ b/views/mods/mod_statistics/statistics.phtml
@@ -0,0 +1,128 @@
+<!-- Root-Template für Statistikdaten -->
+
+ <script type="text/javascript">
+
+ function wpsg_statistic_addExportButton()
+ {
+
+ var z = 0;
+
+ if (!jQuery.jqplot.use_excanvas) {
+ jQuery('div.jqplot-target').each(function(){
+ var outerDiv = jQuery(document.createElement('div'));
+ var header = jQuery(document.createElement('div'));
+ var div = jQuery(document.createElement('div'));
+
+ outerDiv.append(header);
+ outerDiv.append(div);
+
+ outerDiv.addClass('jqplot-image-container' + z);
+ header.addClass('jqplot-image-container-header');
+ div.addClass('jqplot-image-container-content');
+
+ header.html('<?php echo '<span style="font-size:11px;">'.__('Um das Bild auf Ihrer Festplatte zu speichern, klicken Sie mit der rechten Maustaste auf das Bild und wählen Sie "Bild speichern unter..."', 'wpsg').'</span>'; ?>');
+ header.append('<br /><br />');
+
+ jQuery(this).after(outerDiv);
+ outerDiv.hide();
+
+ outerDiv = header = div = close = null;
+
+ if (!jQuery.jqplot._noToImageButton) {
+ var btn = jQuery(document.createElement('button'));
+ btn.addClass('button');
+ btn.text('Bild exportieren');
+ btn.css('margin-top', '25px');
+ btn.addClass('jqplot-image-button');
+ btn.attr('id', 'exportbtn-'+z);
+
+ btn.bind('click', {chart: jQuery(this)}, function(evt) {
+
+ var btnId = jQuery(this).attr('id');
+ btnId = btnId.split('-');
+ btnId = btnId[1];
+
+ var imgelem = evt.data.chart.jqplotToImageElem();
+ var div = jQuery(this).nextAll('div.jqplot-image-container' + btnId).first();
+ div.children('div.jqplot-image-container-content').empty();
+ div.children('div.jqplot-image-container-content').append(imgelem);
+
+
+
+ jQuery('div.jqplot-image-container' + btnId).dialog( {
+ 'modal': true,
+ 'width': 650,
+ 'height': 620,
+ 'title': '<?php echo __('Export', 'wpsg'); ?>'
+ } );
+ div = null;
+
+ });
+ z++;
+ jQuery(this).after(btn);
+ btn.after('<br />');
+ btn = null;
+ }
+ });
+ }
+
+ }
+
+ </script>
+
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
+ <h2>
+ <?php echo __('Statistik', 'wpsg'); ?>
+ </h2>
+
+ <br/>
+
+ <div class="wpsg_admin_submenu" style="margin-top:8px;">
+
+ <div class="head">
+ <div class="title"><?php echo __('Auswahl', 'wpsg'); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['charts'] as $index => $chart) { ?>
+
+ <li class="<?php echo ((strtolower($index) == $_REQUEST['id'])?'current':''); ?>"><a href="admin.php?page=wpsg-Statistics&amp;id=<?php echo wpsg_hspc($index); ?>"><?php echo wpsg_hspc($chart['name']); ?></a></li>
+
+ <?php } ?>
+ </ul>
+ <div style="clear:both; margin-bottom:10px; margin-left:0px; margin-right:8px;"></div>
+
+ </div>
+
+ <div style="padding-right:10px; margin-left:210px; float:none;" class="subsubsub">
+
+ <?php
+
+ if (wpsg_isSizedString($this->view['chart']['data']['template']))
+ {
+ $templateFile = $this->view['chart']['data']['template'].'.phtml';
+ }
+ else
+ {
+ $templateFile = str_replace('get', '', strtolower($this->view['standardFilter'][$this->view['filter']['standard']]['func']).'.phtml');
+ }
+
+ $templatePath = WPSG_PATH_VIEW.'/mods/mod_statistics/'.strtolower($this->view['charts'][$_REQUEST['id']]['func']).'/'.$templateFile;
+
+ if (is_file($templatePath))
+ {
+ $this->render($templatePath);
+ }
+ else
+ {
+
+ wpsg_debug($templatePath);
+ echo '<strong>'.__('Ungültige Anfrage', 'wpsg').'</strong>';
+
+ }
+ ?>
+
+ </div>
+
+ <div style="clear:both; margin-bottom:10px; margin-left:0px; margin-right:8px;"></div> \ No newline at end of file
diff --git a/views/mods/mod_statistics/totals.phtml b/views/mods/mod_statistics/totals.phtml
new file mode 100644
index 0000000..f07ffcd
--- /dev/null
+++ b/views/mods/mod_statistics/totals.phtml
@@ -0,0 +1,21 @@
+<!-- Dashboard Widget -->
+
+<div id="<?php echo $this->view['modul_name']; ?>_totals">
+
+ <?php foreach((array)$this->view['rows'] as $rows) { ?>
+ <div class="<?php echo $this->view['modul_name']; ?>_totals_row">
+ <?php foreach ($rows as $index => $value) { ?>
+ <div class="<?php echo $this->view['modul_name']; ?>_totals_block" style="width:<?php echo 100/count($rows); ?>%">
+ <?php if (!preg_match('/####/', $index)) { ?>
+ <span class="label"><a href="/" onclick="return false;"><?php echo $index; ?></a></span>
+ <?php } ?>
+ <?php if (wpsg_isSizedString($value)) { ?>
+ <span class="number"><?php echo $value; ?></span>
+ <?php } ?>
+ </div>
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+
+</div>
diff --git a/views/mods/mod_stock/produkt_edit_sidebar.phtml b/views/mods/mod_stock/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..dfeb12b
--- /dev/null
+++ b/views/mods/mod_stock/produkt_edit_sidebar.phtml
@@ -0,0 +1,33 @@
+<?php
+
+ /**
+ * Template für die Lagerbestands Einstellungen innerhalb des Produkts
+ */
+
+?>
+<div id="wpsg_stock" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Lagerbestand', 'wpsg'); ?> </span>
+ </h3>
+ <div class="inside">
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_stock_stock"><?php echo __('Lagerbestand', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input id="wpsg_mod_stock_stock" type="text" name="wpsg_mod_stock_stock" value="<?php echo $this->view['data']['stock']; ?>" />
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_stock_stock_count"><?php echo __('Lagerbestand zählen', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input id="wpsg_mod_stock_stock_count" type="checkbox" class="checkbox" name="wpsg_mod_stock_stock_count" value="1" <?php echo (($this->view['data']['stock_count'] == '1')?'checked="checked"':''); ?> />
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_stock/settings_edit.phtml b/views/mods/mod_stock/settings_edit.phtml
new file mode 100644
index 0000000..62e9119
--- /dev/null
+++ b/views/mods/mod_stock/settings_edit.phtml
@@ -0,0 +1,59 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Lagerbestandsmoduls
+ */
+
+?>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_stock_template"><?php echo __('Template für ausverkaufte Produkte', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <?php if (!is_array($this->view['arTemplates']) || sizeof($this->view['arTemplates']) <= 0) { ?>
+ <p class="wpsg_error"><?php echo __('Keine Templatedatein gefunden!', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <input type="hidden" name="wpsg_mod_stock_template" value="<?php echo $this->get_option('wpsg_mod_stock_template'); ?>" />
+ <select name="wpsg_mod_stock_template" id="wpsg_mod_stock_template">
+ <option value="-1"><?php echo __('Wie Produkttemplate', 'wpsg'); ?></option>
+ <?php foreach ($this->view['arTemplates'] as $t) { ?>
+ <option <?php echo (($t == $this->get_option('wpsg_mod_stock_template'))?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($t); ?>"><?php echo wpsg_hspc($t); ?></option>
+ <?php } ?>
+ </select>
+ <?php } ?>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_stock_notemplateswitch', __('Template nicht wechseln', 'wpsg'), $this->get_option('wpsg_mod_stock_notemplateswitch'), array('help' => 'wpsg_mod_stock_notemplateswitch')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_stock_allow', __('Bestellungen bei negtiven Bestand verhindern', 'wpsg'), $this->get_option('wpsg_mod_stock_allow'), array('help' => 'wpsg_mod_stock_allow')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_stock_showBackendStock', __('Bestand in Produktübersicht (Backend) anzeigen', 'wpsg'), $this->get_option('wpsg_mod_stock_showBackendStock'), array('help' => 'wpsg_mod_stock_showBackendStock')); ?>
+<?php if ($this->hasMod('wpsg_mod_productindex')) { ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_stock_showProductindex', __('Bestand in Produktübersicht (Frontend) anzeigen', 'wpsg'), $this->get_option('wpsg_mod_stock_showProductindex'), array('help' => 'wpsg_mod_stock_showProductindex')); ?>
+<?php } ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_stock_showProduct', __('Bestand in Produkt (Frontend) anzeigen', 'wpsg'), $this->get_option('wpsg_mod_stock_showProduct'), array('help' => 'wpsg_mod_stock_showProduct')); ?>
+
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_stock_notemplateswitch').bind('change', function() {
+
+ if (jQuery(this).attr("checked"))
+ {
+
+ jQuery('#wpsg_mod_stock_template').attr('disabled', true);
+
+ }
+ else
+ {
+
+ jQuery('#wpsg_mod_stock_template').attr('disabled', false);
+
+ }
+
+ } ).change();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_su/gfx/logo_100x25.png b/views/mods/mod_su/gfx/logo_100x25.png
new file mode 100644
index 0000000..bf13495
--- /dev/null
+++ b/views/mods/mod_su/gfx/logo_100x25.png
Binary files differ
diff --git a/views/mods/mod_su/order_done.phtml b/views/mods/mod_su/order_done.phtml
new file mode 100644
index 0000000..2569592
--- /dev/null
+++ b/views/mods/mod_su/order_done.phtml
@@ -0,0 +1,24 @@
+<?php
+
+ /**
+ * Dieses Template wird nach einer Sofortüberweisungs Zahlung angezeigt
+ */
+
+?>
+<p><?php echo __('Um den Betrag mit Sofortüberweisung zu bezahlen klicken Sie bitte auf folgendes Logo.', 'wpsg'); ?></p>
+<p>
+ <a title="<?php echo __('Mit Sofortüberweisung bezahlen', 'wpsg'); ?>" href="<?php echo $this->view['suLink']; ?>">
+ <img src="<?php echo WPSG_URL_CONTENT.'plugins/wpshopgermany/views/gfx/'; ?>banner_300x100.png" align="left" alt="<?php echo __('Mit Sofortüberweisung bezahlen', 'wpsg'); ?>" style="margin-right:7px;">
+ </a>
+</p>
+<?php if ($this->get_option('wpsg_mod_su_autostart') == '1') { ?>
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+ window.setTimeout(function() {
+ location.href = "<?php echo $this->view['suLink']; ?>";
+ }, 1000);
+ } );
+
+</script>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_su/settings_edit.phtml b/views/mods/mod_su/settings_edit.phtml
new file mode 100644
index 0000000..0b4dd92
--- /dev/null
+++ b/views/mods/mod_su/settings_edit.phtml
@@ -0,0 +1,68 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Moduls "Sofortüberweisung"
+ */
+
+?>
+<script type="text/javascript">
+
+ var arPagesURL = jQuery.parseJSON('<?php echo json_encode($this->view['pagesurl']); ?>');
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_page_mod_paypal_success').bind('change', function() {
+ if (jQuery(this).val() > 0)
+ {
+ jQuery('#wpsg_mod_su_successurl').val(arPagesURL[jQuery(this).val()]);
+ }
+ else
+ {
+ jQuery('#wpsg_mod_su_successurl').val('');
+ }
+ } );
+
+ jQuery('#wpsg_page_mod_paypal_error').bind('change', function() {
+ if (jQuery(this).val() > 0)
+ {
+ jQuery('#wpsg_mod_su_errorurl').val(arPagesURL[jQuery(this).val()]);
+ }
+ else
+ {
+ jQuery('#wpsg_mod_su_errorurl').val('');
+ }
+ } );
+
+ } );
+
+</script>
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_su_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_su_bezeichnung')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_su_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_su_aktiv')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_su_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_su_hint')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_su_subject1', __('Betreff für Überweisung (Zeile 1)', 'wpsg'), $this->get_option('wpsg_mod_su_subject1')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_su_subject2', __('Betreff für Überweisung (Zeile 2)', 'wpsg'), $this->get_option('wpsg_mod_su_subject2')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_su_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_su_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_su_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_su_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_su_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_su_mwstland')); ?>
+
+<br />
+<?php echo wpsg_drawForm_Select('wpsg_mod_su_currency', __('Verwendete Währung', 'wpsg'), array('EUR' => __('Euro', 'wpsg'), 'CHF' => __('Schweizer Franken', 'wpsg'), 'GBP' => __('Britische Pfund', 'wpsg')), $this->get_option('wpsg_mod_su_currency')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_su_userid', __('Kunden-Nr für Sofortüberweisung.de', 'wpsg'), $this->get_option('wpsg_mod_su_userid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_su_projectid', __('Projekt ID für Sofortüberweisung.de', 'wpsg'), $this->get_option('wpsg_mod_su_projectid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_su_projectpassword', __('Projekt Passwort', 'wpsg'), $this->get_option('wpsg_mod_su_projectpassword')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_su_noticepassword', __('Benachrichtigungs Passwort', 'wpsg'), $this->get_option('wpsg_mod_su_noticepassword')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_su_language', __('Sprache bei Sofortüberweisung.de', 'wpsg'), array('DE' => __('deutsch', 'wpsg'), 'EN' => __('englisch', 'wpsg'), 'FR' => __('französisch', 'wpsg'), 'NL' => __('niederländisch', 'wpsg')), $this->get_option('wpsg_mod_su_language')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_su_hash', __('Verwendetes HASH Verfahren', 'wpsg'), array('md5' => 'MD5', 'sha1' => 'SHA1', 'sha256' => 'SHA256', 'sha512' => 'SHA512'), $this->get_option('wpsg_mod_su_hash')); ?>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_su_confirmurl"><?php echo __('URL für HTTP Benachrichtigung', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input id="wpsg_mod_su_confirmurl" type="text" class="text" name="" value="<?php echo wpsg_hspc($this->view['wpsg_mod_su_confirmurl']); ?>" />
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_su_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_su_autostart')); ?>
+
diff --git a/views/mods/mod_test/settings_edit.phtml b/views/mods/mod_test/settings_edit.phtml
new file mode 100644
index 0000000..ae0e8b1
--- /dev/null
+++ b/views/mods/mod_test/settings_edit.phtml
@@ -0,0 +1,77 @@
+<?php
+
+ /**
+ * Template für die Modulkonfiguration des Testmoduls
+ */
+
+?>
+
+<br />
+
+<?php foreach ((array)$this->view['test'] as $test_index => $test) { ?>
+<div class="wpsg_admin_box" id="wpsg_mod_test_<?php echo $test_index; ?>" style="width:1000px;">
+ <div id="test_1" class="head" style="border-bottom: 0px none;">
+ <div class="title">
+ <div class="fulltab">
+ <?php echo ($test_index + 1); ?>. Test - <?php echo $test['label']; ?>
+ <?php if ($this->callMod('wpsg_mod_test', 'checkTest', array($test)) === true) { ?>
+ <img src="<?php echo WPSG_URL_CONTENT; ?>plugins/wpshopgermany/views/css/../gfx/tick.png" alt="" style="float:right;" />
+ <?php } ?>
+ </div>
+ </div>
+ <div class="content wpsg_mod_test_table wpsg_admin_box_content" style="display: block;">
+
+ <?php echo $test['config']; ?>
+
+ <table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Erwarteter Wert</th>
+ <th>Getesteter Wert</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($test['tests'] as $key => $t) { ?>
+ <tr>
+ <td>
+ <?php if ($t[0] === false) { ?>
+ <?php echo $this->view['arKeyLabel'][$key]; ?>
+ <?php } else { ?>
+ <?php echo $t[0]; ?>
+ <?php } ?>
+ </td>
+ <td><?php echo $t[1]; ?></td>
+ <td><?php echo $this->callMod('wpsg_mod_test', 'getValue', array($key, $test['array'])); ?></td>
+ <td>
+ <?php if ($this->callMod('wpsg_mod_test', 'checkValue', array($key, $t[1], $test['array'])) === true) { ?>
+ <img src="<?php echo WPSG_URL_CONTENT; ?>plugins/wpshopgermany/views/css/../gfx/tick.png" alt="" />
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ </table>
+
+ <?php if (wpsg_isSizedArray($test['array'])) { ?>
+ <br /><a href="" onclick="jQuery(this).next().toggle(); return false;">Array anzeigen/verbergen</a>
+ <div style="display:none; border:1px solid #CCCCCC; background-color:#FFFFFF; margin-top:15px;">
+ <pre><?php print_r($test['array']); ?></pre>
+ </div>
+ <?php } ?>
+
+ </div>
+ </div>
+</div><br />
+<?php } ?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_admin_box').wpsg_adminbox();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_test/showConfiguration.phtml b/views/mods/mod_test/showConfiguration.phtml
new file mode 100644
index 0000000..1d86bea
--- /dev/null
+++ b/views/mods/mod_test/showConfiguration.phtml
@@ -0,0 +1,11 @@
+<?php
+
+ /**
+ * Zeigt wichtige Einstellungen an, die für den Test wichtig sind
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('', 'Preise im Backend', (($this->get_option('wpsg_preisangaben') == WPSG_NETTO)?'Netto':'Brutto'), array('text' => true)); ?>
+<?php echo wpsg_drawForm_Input('', 'Preise im Frontend', (($this->getFrontendTaxview() == WPSG_NETTO)?'Netto':'Brutto'), array('text' => true)); ?>
+<?php echo wpsg_drawForm_Input('', 'Kleinunternehmerregelung', (($this->get_option('wpsg_kleinunternehmer') == '1')?'An':'Aus'), array('text' => true)); ?>
+<br /> \ No newline at end of file
diff --git a/views/mods/mod_topseller/produkt_edit_allgemein.phtml b/views/mods/mod_topseller/produkt_edit_allgemein.phtml
new file mode 100644
index 0000000..58112cb
--- /dev/null
+++ b/views/mods/mod_topseller/produkt_edit_allgemein.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Template für die Konfiguration der Topseller innerhalb der Produktverwaltung
+ */
+
+?>
+<?php if ($this->get_option('wpsg_mod_topseller_auto') == '1') { ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_topseller[status]', __('TopSeller Status', 'wpsg'), array(
+ '0' => __('Einbeziehen', 'wpsg'),
+ '1' => __('Ausschließen', 'wpsg')
+), $this->view['wpsg_mod_topseller']['status']); ?>
+<?php } else { ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_topseller[status]', __('TopSeller Status', 'wpsg'), array(
+ '0' => __('Nicht anzeigen', 'wpsg'),
+ '1' => __('Anzeigen', 'wpsg')
+), $this->view['wpsg_mod_topseller']['status']); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_topseller/settings_edit.phtml b/views/mods/mod_topseller/settings_edit.phtml
new file mode 100644
index 0000000..0722195
--- /dev/null
+++ b/views/mods/mod_topseller/settings_edit.phtml
@@ -0,0 +1,12 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des "TopSeller" Moduls
+ */
+
+?>
+<?php if ($this->hasMod('wpsg_mod_statistics')) { ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_topseller_auto', __('Alle Produkte einbeziehen', 'wpsg'), $this->get_option('wpsg_mod_topseller_auto'), array('help' => 'wpsg_mod_topseller_auto')); ?>
+<?php } ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_topseller_limit', __('Maximale Anzahl (Standard)', 'wpsg'), $this->get_option('wpsg_mod_topseller_limit'), array('help' => 'wpsg_mod_topseller_limit')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_topseller_template', __('Template', 'wpsg'), $this->view['arTemplates'], $this->get_option('wpsg_mod_topseller_template'), array('noIndex' => true, 'help' => 'wpsg_mod_topseller_template')); ?> \ No newline at end of file
diff --git a/views/mods/mod_topseller/topseller.phtml b/views/mods/mod_topseller/topseller.phtml
new file mode 100644
index 0000000..47da016
--- /dev/null
+++ b/views/mods/mod_topseller/topseller.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Template für die Anzeige der TopSeller im Frontend
+ */
+
+?>
+<?php if (wpsg_isSizedArray($this->view['topseller'])) { ?>
+<div class="wpsg_mod_topseller">
+ <?php foreach ($this->view['topseller'] as $p) { ?>
+ <?php echo $this->renderProdukt($p['id'], $this->view['template']); ?>
+ <?php } ?>
+</div>
+<div class="wpsg_clear"></div>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_topseller/widget_form.phtml b/views/mods/mod_topseller/widget_form.phtml
new file mode 100644
index 0000000..dbffc81
--- /dev/null
+++ b/views/mods/mod_topseller/widget_form.phtml
@@ -0,0 +1,23 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des TopSeller Widgets
+ */
+
+?>
+<?php echo wpsg_drawForm_Select(
+ $this->view['wpsg_mod_topseller_template']['name'],
+ __('Template', 'wpsg'),
+ $this->view['arTemplates'],
+ $this->view['wpsg_mod_topseller_template']['value'], array(
+ 'id' => $this->view['wpsg_mod_topseller_template']['id'],
+ 'noIndex' => true
+ )
+); ?>
+<?php echo wpsg_drawForm_Input(
+ $this->view['wpsg_mod_topseller_limit']['name'],
+ __('Limit', 'wpsg'),
+ $this->view['wpsg_mod_topseller_limit']['value'], array(
+ 'id' => $this->view['wpsg_mod_topseller_limit']['id']
+ )
+); ?> \ No newline at end of file
diff --git a/views/mods/mod_trustedshops/checkout_customer_inner.phtml b/views/mods/mod_trustedshops/checkout_customer_inner.phtml
new file mode 100644
index 0000000..ae4d94a
--- /dev/null
+++ b/views/mods/mod_trustedshops/checkout_customer_inner.phtml
@@ -0,0 +1,12 @@
+<?php
+
+ /**
+ * Template für die Abfrage ob der Kunde an der Bewertung teilnehmen möchte im Checkout
+ */
+
+?>
+<div class="wpsg_checkoutblock">
+ <label for="wpsg_mod_trustedshops_set">
+ <input class="wpsg_checkout" type="checkbox" id="wpsg_mod_trustedshops_set" name="wpsg[checkout][wpsg_mod_trustedshops_set]" value="1" <?php echo (($this->view['basket']['checkout']['wpsg_mod_trustedshops_set'] == '1' || ($this->get_option('wpsg_mod_trustedshops_customerset_preset') == '1' && !isset($this->view['basket']['checkout']['wpsg_mod_trustedshops_set'])))?'checked="checked"':''); ?> /><?php echo __('Ich bin damit einverstanden, eine separate und unverbindliche Bewertungsaufforderung (<a href="https://www.trustedshops.com/" target="_blank">Trusted Shops</a>) per Mail zu erhalten.', 'wpsg'); ?>
+ </label>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_trustedshops/gfx/rate_now_button_de.png b/views/mods/mod_trustedshops/gfx/rate_now_button_de.png
new file mode 100644
index 0000000..b05afcc
--- /dev/null
+++ b/views/mods/mod_trustedshops/gfx/rate_now_button_de.png
Binary files differ
diff --git a/views/mods/mod_trustedshops/gfx/siegel.gif b/views/mods/mod_trustedshops/gfx/siegel.gif
new file mode 100644
index 0000000..6d264d6
--- /dev/null
+++ b/views/mods/mod_trustedshops/gfx/siegel.gif
Binary files differ
diff --git a/views/mods/mod_trustedshops/invoicemail.phtml b/views/mods/mod_trustedshops/invoicemail.phtml
new file mode 100644
index 0000000..9e2261e
--- /dev/null
+++ b/views/mods/mod_trustedshops/invoicemail.phtml
@@ -0,0 +1,10 @@
+<?php
+
+ /**
+ * Template für den Trusted Shops Bewertungs Link in der Rechnungs - Email
+ */
+
+?>
+<?php echo $this->get_option('wpsg_mod_trustedshops_invoicemailtitle'); ?>
+https://www.trustedshops.de/bewertung/bewerten_<?php echo $this->get_option('wpsg_mod_trustedshops_shopid'); ?>.html&buyerEmail=<?php echo urlencode(base64_encode($this->view['customer']['email'])); ?>&shopOrderID=<?php echo urlencode(base64_encode($this->view['order']['onr'])); ?>
+ \ No newline at end of file
diff --git a/views/mods/mod_trustedshops/invoicemail_html.phtml b/views/mods/mod_trustedshops/invoicemail_html.phtml
new file mode 100644
index 0000000..38235a1
--- /dev/null
+++ b/views/mods/mod_trustedshops/invoicemail_html.phtml
@@ -0,0 +1,11 @@
+<?php
+
+ /**
+ * Template für den Trusted Shops Bewertungs Link in der Rechnungs - E-mail (HTML)
+ */
+
+?>
+<p>
+ <a href="https://www.trustedshops.de/bewertung/bewerten_<?php echo $this->get_option('wpsg_mod_trustedshops_shopid'); ?>.html&buyerEmail=<?php echo urlencode(base64_encode($this->view['customer']['email'])); ?>&shopOrderID=<?php echo urlencode(base64_encode($this->view['order']['onr'])); ?>"><?php echo $this->get_option('wpsg_mod_trustedshops_invoicemailtitle'); ?></a>
+</p>
+ \ No newline at end of file
diff --git a/views/mods/mod_trustedshops/mail.phtml b/views/mods/mod_trustedshops/mail.phtml
new file mode 100644
index 0000000..8177a8a
--- /dev/null
+++ b/views/mods/mod_trustedshops/mail.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Template für die Mail an den Kunden, die manuell aus der Bestellansicht versendet werden kann
+ */
+
+?><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['customer']['vname'], $this->view['customer']['name']); ?>
+
+<?php echo __('wir hoffen Sie waren mit dem Bestellablauf zufrieden, um unseren Service und unsere Dienstleistung zu verbessern können Sie uns über Trusted Shops bewerten. Dies können Sie kostenlos unter folgendem Link durchführen: ', 'wpsg')?>
+
+https://www.trustedshops.de/bewertung/bewerten_<?php echo $this->get_option('wpsg_mod_trustedshops_shopid'); ?>.html&buyerEmail=<?php echo urlencode(base64_encode($this->view['customer']['email'])); ?>&shopOrderID=<?php echo urlencode(base64_encode($this->view['order']['onr'])); ?>
+
+<?php echo __("Mit freundlichen Grüßen", "wpsg"); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_trustedshops/mail_aftercalculation.phtml b/views/mods/mod_trustedshops/mail_aftercalculation.phtml
new file mode 100644
index 0000000..ed1faa0
--- /dev/null
+++ b/views/mods/mod_trustedshops/mail_aftercalculation.phtml
@@ -0,0 +1,10 @@
+<?php
+
+ /**
+ * Template für die Integration des Bewertungslinkes in die Kundenmail
+ */
+
+
+?><?php echo $this->get_option('wpsg_mod_trustedshops_customermailtitle'); ?>
+https://www.trustedshops.de/bewertung/bewerten_<?php echo $this->get_option('wpsg_mod_trustedshops_shopid'); ?>.html&buyerEmail=<?php echo urlencode(base64_encode($this->view['customer']['email'])); ?>&shopOrderID=<?php echo urlencode(base64_encode($this->view['order']['onr'])); ?>
+ \ No newline at end of file
diff --git a/views/mods/mod_trustedshops/mail_aftercalculation_html.phtml b/views/mods/mod_trustedshops/mail_aftercalculation_html.phtml
new file mode 100644
index 0000000..f0b0a05
--- /dev/null
+++ b/views/mods/mod_trustedshops/mail_aftercalculation_html.phtml
@@ -0,0 +1,11 @@
+<?php
+
+ /**
+ * Template für die Integration des Bewertungslinkes in die Kundenmail
+ */
+
+
+?>
+<p>
+ <a href="https://www.trustedshops.de/bewertung/bewerten_<?php echo $this->get_option('wpsg_mod_trustedshops_shopid'); ?>.html&buyerEmail=<?php echo urlencode(base64_encode($this->view['customer']['email'])); ?>&shopOrderID=<?php echo urlencode(base64_encode($this->view['order']['onr'])); ?>"><?php echo __($this->get_option('wpsg_mod_trustedshops_customermailtitle'), 'wpsg'); ?></a>
+</p> \ No newline at end of file
diff --git a/views/mods/mod_trustedshops/mail_html.phtml b/views/mods/mod_trustedshops/mail_html.phtml
new file mode 100644
index 0000000..6d5157c
--- /dev/null
+++ b/views/mods/mod_trustedshops/mail_html.phtml
@@ -0,0 +1,17 @@
+<?php
+
+ /**
+ * Template für die Mail an den Kunden, die manuell aus der Bestellansicht versendet werden kann (HTML)
+ */
+
+?><p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['customer']['vname'], $this->view['customer']['name']); ?></p>
+
+<p><?php echo __('wir hoffen Sie waren mit dem Bestellablauf zufrieden, um unseren Service und unsere Dienstleistung zu verbessern können Sie uns über Trusted Shops bewerten. Dies können Sie kostenlos unter folgendem Link durchführen: ', 'wpsg')?></p>
+
+<p>
+ <a href="https://www.trustedshops.de/bewertung/bewerten_<?php echo $this->get_option('wpsg_mod_trustedshops_shopid'); ?>.html&buyerEmail=<?php echo urlencode(base64_encode($this->view['customer']['email'])); ?>&shopOrderID=<?php echo urlencode(base64_encode($this->view['order']['onr'])); ?>"><?php echo __('Bewertung durchführen', 'wpsg'); ?></a>
+</p>
+
+<p><?php echo __("Mit freundlichen Grüßen", "wpsg"); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_trustedshops/order_done.phtml b/views/mods/mod_trustedshops/order_done.phtml
new file mode 100644
index 0000000..9b761ff
--- /dev/null
+++ b/views/mods/mod_trustedshops/order_done.phtml
@@ -0,0 +1,17 @@
+<?php
+
+ /**
+ * Template für die Einbindung des Trusted Shops Bewertungs Links nach Bestellabschluß
+ */
+
+?>
+
+<?php if ($this->view['wpsg_mod_trustedshops']['vote'] == '1' || $this->get_option('wpsg_mod_trustedshops_warranty') == '1') { ?>
+<div id="trustedShopsCheckout" style="display: none;">
+ <span id="tsCheckoutOrderNr"><?php echo wpsg_hspc($this->view['order']['onr']); ?></span>
+ <span id="tsCheckoutBuyerEmail"><?php echo wpsg_hspc($this->view['basket']['checkout']['email']); ?></span>
+ <span id="tsCheckoutOrderAmount"><?php echo wpsg_hspc($this->view['basket']['sum']['preis_gesamt_brutto']); ?></span>
+ <span id="tsCheckoutOrderCurrency"><?php echo wpsg_hspc($this->get_option('wpsg_currency')); ?></span>
+ <span id="tsCheckoutOrderPaymentType"><?php echo wpsg_hspc($this->arPayment[$this->view['basket']['checkout']['payment']]['name']); ?></span>
+</div>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_trustedshops/order_view_sidebar.phtml b/views/mods/mod_trustedshops/order_view_sidebar.phtml
new file mode 100644
index 0000000..9675bef
--- /dev/null
+++ b/views/mods/mod_trustedshops/order_view_sidebar.phtml
@@ -0,0 +1,28 @@
+<?php
+
+ /**
+ * Template für die Trusted Shops Integration in die Bestellverwaltung
+ */
+
+?>
+<div class="postbox" id="wpsg_trustedshops">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Trusted Shops', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_set', __('Einwilligung', 'wpsg'), (($this->view['data']['wpsg_mod_trustedshops_set'] == '1')?__('Ja', 'wpsg'):__('Nein', 'wpsg')), array('text' => true, 'help' => 'wpsg_mod_trustedshops_set')); ?>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+
+ </div>
+ <div class="wpsg_form_right">
+ <a onclick="if (!confirm('<?php echo __('Der Kunde erhält eine Mail mit einem Link zur Bewertung der Bestellung. Sind Sie sich sicher?', 'wpsg'); ?>')) return false;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_trustedshops&edit_id=<?php echo $this->view['data']['id']; ?>&do=mail"><?php echo __('E-Mail mit Bewertungslink senden', 'wpsg'); ?></a>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_trustedshops/settings_edit.phtml b/views/mods/mod_trustedshops/settings_edit.phtml
new file mode 100644
index 0000000..3a89a03
--- /dev/null
+++ b/views/mods/mod_trustedshops/settings_edit.phtml
@@ -0,0 +1,199 @@
+<?php
+
+ /**
+ * Tempalte für die Einstellungen des Trusted Shops Moduls
+ */
+
+?>
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_shopid', __('Shop-ID', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_shopid')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_customerset', __('Abfrage Bewertungseinwilligung (im Checkout)', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_customerset'), array('help' => 'wpsg_mod_trustedshops_customerset')); ?>
+
+<div id="wpsg_mod_trustedshops_customerset_preset_layer">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_customerset_preset', __('Als Vorauswahl aktiv', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_customerset_preset'), array('help' => 'wpsg_mod_trustedshops_customerset_preset')); ?>
+</div>
+
+<br />
+
+<div class="wpsg_mod_protectedshops">
+ <div class="wpsg_admin_box" id="wpsg_tab">
+ <div class="head">
+ <div class="title">
+ <div class="tab" id="tab1"><?php echo __('Trusted Shops Widget', 'wpsg'); ?></div>
+ <div class="tab" id="tab2"><?php echo __('Bestellabschluss', 'wpsg'); ?></div>
+ <div class="tab" id="tab3"><?php echo __('Bewertungslinks', 'wpsg'); ?></div>
+ <div class="tab" id="tab4"><?php echo __('Review Collector', 'wpsg'); ?></div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+ <div class="content">
+
+ <div id="tabcontent1" class="tabcontent">
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_siegelcache', __('Bewertungsbild zwischenspeichern (empfohlen)', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_siegelcache'), array('help' => 'wpsg_mod_trustedshops_siegelcache')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_siegeltitle', __('Titel des Bewertungsbildes', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_siegeltitle'), array('help' => 'wpsg_mod_trustedshops_siegeltitle')); ?>
+
+ <?php if (wpsg_isSizedString($this->view['siegelURL'])) { ?>
+ <br />
+ <div class="wpsg_hinweis"><?php echo wpsg_translate(__('Das Trusted Shops Widget muss in einen <a href="#1#">Widgetbereich</a> eingefügt werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/widgets.php'); ?></div><br />
+ <?php echo __('Vorschau:', 'wpsg'); ?><br />
+ <img class="bewertung" alt="<?php echo wpsg_hspc($this->get_option('wpsg_mod_trustedshops_siegeltitle')); ?>" border="0" src="<?php echo $this->view['siegelURL']; ?>"/>
+ <?php } ?>
+
+ </div>
+
+ <div id="tabcontent2" class="tabcontent">
+
+ <?php echo wpsg_drawForm_Select('wpsg_mod_trustedshops_orderdone', __('Link zur Bewertung', 'wpsg'), array(
+ '0' => __('Nicht anzeigen', 'wpsg'),
+ '1' => __('Immer anzeigen', 'wpsg'),
+ '2' => __('Nur anzeigen, wenn Kunde bewerten möchte', 'wpsg')
+ ), $this->get_option('wpsg_mod_trustedshops_orderdone'), array('help' => 'wpsg_mod_trustedshops_orderdone')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_orderdonetitle', __('Titel des Links', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_orderdonetitle'), array('help' => 'wpsg_mod_trustedshops_orderdonetitle')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_orderdonelogo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_orderdonelogo'), array('help' => 'wpsg_mod_trustedshops_orderdonelogo')); ?>
+
+ <br />
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_warranty', __('Trusted Shops Käuferschutz (Garantie)', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_warranty'), array('help' => 'wpsg_mod_trustedshops_warranty')); ?>
+
+ </div>
+
+ <div id="tabcontent3" class="tabcontent">
+
+ <?php echo wpsg_drawForm_Select('wpsg_mod_trustedshops_customermail', __('Link zur Bewertung in Kundenmail nach Bestellabschluss', 'wpsg'), array(
+ '0' => __('Nicht anzeigen', 'wpsg'),
+ '1' => __('Immer anzeigen', 'wpsg'),
+ '2' => __('Nur anzeigen, wenn Kunde bewerten möchte', 'wpsg')
+ ), $this->get_option('wpsg_mod_trustedshops_customermail'), array('help' => 'wpsg_mod_trustedshops_customermail')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_customermailtitle', __('Text des Links', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_customermailtitle'), array('help' => 'wpsg_mod_trustedshops_customermailtitle')); ?>
+
+ <br />
+
+ <?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
+
+ <br />
+ <?php echo wpsg_drawForm_Select('wpsg_mod_trustedshops_invoicemail', __('Link zur Bewertung in Rechnungsmail', 'wpsg'), array(
+ '0' => __('Nicht anzeigen', 'wpsg'),
+ '1' => __('Immer anzeigen', 'wpsg'),
+ '2' => __('Nur anzeigen, wenn Kunde bewerten möchte', 'wpsg')
+ ), $this->get_option('wpsg_mod_trustedshops_invoicemail'), array('help' => 'wpsg_mod_trustedshops_invoicemail')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_invoicemailtitle', __('Text des Links', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_invoicemailtitle'), array('help' => 'wpsg_mod_trustedshops_invoicemailtitle')); ?>
+
+ <?php } ?>
+
+ </div>
+
+ <div id="tabcontent4" class="tabcontent">
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_trustedshops_reminder"><?php echo __('Erinnerung', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+
+ <input type="hidden" name="wpsg_mod_trustedshops_reminder" value="0">
+ <input id="wpsg_mod_trustedshops_reminder" type="checkbox" class="checkbox" <?php echo ((wpsg_isSizedInt($this->get_option('wpsg_mod_trustedshops_reminder')))?'checked="checked"':''); ?> tabindex="14" name="wpsg_mod_trustedshops_reminder" value="1">
+
+ <div id="wpsg_mod_trustedshops_reminder_layer" class="wpsg_form_trustedshops_reminderDays">
+
+ <p><?php echo __('Nach', 'wpsg'); ?></p>
+ <input id="wpsg_mod_trustedshops_reminderDays" type="text" class="text" tabindex="15" name="wpsg_mod_trustedshops_reminderDays" value="<?php echo $this->get_option('wpsg_mod_trustedshops_reminderDays'); ?>">
+ <p><?php echo __('Tagen', 'wpsg'); ?></p>
+
+ </div>
+
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_trustedshops_reminder"><?php echo __('Bestellzustände', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+
+ <?php foreach ($this->arStatus as $state_id => $state_label) { ?>
+ <label>
+ <input type="checkbox" class="checkbox" name="wpsg_mod_trustedshops_state[]" <?php echo ((in_array($state_id, (array)$this->get_option('wpsg_mod_trustedshops_state')))?'checked="checked"':''); ?> value="<?php echo $state_id; ?>" />
+ <?php echo $state_label; ?><br />
+ </label>
+ <?php } ?>
+
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <?php echo wpsg_drawForm_Input('', __('Letzter Export', 'wpsg'), $this->view['lastExport'], array('text' => true)); ?>
+
+ <br />
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">&nbsp;</div>
+ <div class="wpsg_form_right wpsg_form_right_unit">
+ <?php if (wpsg_isSizedArray($this->callMod('wpsg_mod_trustedshops', 'getExportData'))) { ?>
+ <a target="_blank" onclick="location.href=location.href;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_trustedshops&do=export&noheader=1" class="button"><?php echo __('CSV-Export-Datei erstellen', 'wpsg'); ?></a>
+ <?php } else { ?>
+ <p><?php echo __('Derzeit keine Daten zum Export verfügbar.', 'wpsg'); ?></p>
+ <?php } ?>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <br />
+
+ <a href="https://www.trustedshops.com/tsb2b/sa/ratings/batchRatingRequest.seam"><?php echo __('Trusted Shops Review Collector', 'wpsg'); ?></a>
+
+ </div>
+
+ </div>
+ </div>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_trustedshops_reminder').bind('change', function() {
+
+ if (jQuery('#wpsg_mod_trustedshops_reminder').is(':checked'))
+ {
+
+ jQuery('#wpsg_mod_trustedshops_reminder_layer').show(250);
+
+ }
+ else
+ {
+
+ jQuery('#wpsg_mod_trustedshops_reminder_layer').hide(250);
+
+ }
+
+ } ).change();
+
+ jQuery('#wpsg_tab').wpsg_tab( {
+ 'cookiename': 'wpsg_trustedshop_tab',
+ 'tab2': function() {
+ jQuery('.tablink').show();
+ }
+ } );
+
+ jQuery('#wpsg_mod_trustedshops_customerset').bind('change', function() {
+
+ if (jQuery(this).attr('checked') === true || jQuery(this).attr('checked') == 'checked')
+ {
+
+ jQuery('#wpsg_mod_trustedshops_customerset_preset_layer').show();
+
+ }
+ else
+ {
+
+ jQuery('#wpsg_mod_trustedshops_customerset_preset_layer').hide();
+
+ }
+
+ } ).change();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_trustedshops/widget.phtml b/views/mods/mod_trustedshops/widget.phtml
new file mode 100644
index 0000000..b7057ec
--- /dev/null
+++ b/views/mods/mod_trustedshops/widget.phtml
@@ -0,0 +1,51 @@
+<?php
+
+ /**
+ * Template für die Ausgabe des Trusted Shops Widgets im Frontend
+ */
+
+?>
+
+<?php if ($this->view['settings']['wpsg_mod_trustedshops_siegel'] == '1') { ?>
+<div class="wpsg_mod_trustedshops_siegel">
+
+</div>
+<?php } ?>
+
+<?php if ($this->view['settings']['wpsg_mod_trustedshops_vote'] == '1') { ?>
+<div class="wpsg_mod_trustedshops_vote">
+ <a target="_blank" href="https://www.trustedshops.de/bewertung/info_<?php echo $this->get_option('wpsg_mod_trustedshops_shopid'); ?>.html" title="<?php echo wpsg_hspc($this->get_option('wpsg_mod_trustedshops_siegeltitle')); ?>">
+ <img class="bewertung" alt="<?php echo wpsg_hspc($this->get_option('wpsg_mod_trustedshops_siegeltitle')); ?>" border="0" src="<?php echo $this->view['siegelURL']; ?>"/>
+ </a>
+</div>
+<?php } ?>
+
+<?php if ($this->view['settings']['wpsg_mod_trustedshops_badge'] == '1') { ?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ (function () {
+ var _tsid = '<?php echo $this->get_option('wpsg_mod_trustedshops_shopid'); ?>';
+ _tsConfig = {
+ 'yOffset': '0', /* offset from page bottom */
+ 'variant': 'reviews', /* text, default, small, reviews, custom, custom_reviews */
+ 'customElementId': '', /* required for variants custom and custom_reviews */
+ 'trustcardDirection': '', /* for custom variants: topRight, topLeft, bottomRight, bottomLeft */
+ 'customBadgeWidth': '', /* for custom variants: 40 - 90 (in pixels) */
+ 'customBadgeHeight': '', /* for custom variants: 40 - 90 (in pixels) */
+ 'disableResponsive': 'false', /* deactivate responsive behaviour */
+ 'disableTrustbadge': 'false', /* deactivate trustbadge */
+ 'trustCardTrigger': 'mouseenter' /* set to 'click' if you want the trustcard to be opened on click instead */
+ };
+ var _ts = document.createElement('script');
+ _ts.type = 'text/javascript';
+ _ts.charset = 'utf-8';
+ _ts.async = true;
+ _ts.src = '//widgets.trustedshops.com/js/' + _tsid + '.js';
+ var __ts = document.getElementsByTagName('script')[0];
+ __ts.parentNode.insertBefore(_ts, __ts);
+ })();
+
+/* ]]> */</script>
+<noscript><a href="https://www.trustedshops.de/shop/certificate.php?shop_id=<?php echo $this->get_option('wpsg_mod_trustedshops_shopid'); ?>"><img title="<?php echo __('Klicken Sie auf das Gütesiegel, um die Gültigkeit zu prüfen!', 'wpsg'); ?>" src="//widgets.trustedshops.com/images/badge.png" style="position:fixed;bottom:0;right:0;" /></a></noscript>
+ <?php } ?>
+
diff --git a/views/mods/mod_trustedshops/widget_form.phtml b/views/mods/mod_trustedshops/widget_form.phtml
new file mode 100644
index 0000000..f02e326
--- /dev/null
+++ b/views/mods/mod_trustedshops/widget_form.phtml
@@ -0,0 +1,30 @@
+<?php
+
+ /**
+ * Template für das Trusted Shops Widget im Backend
+ */
+
+?>
+
+<label>
+ <input type="checkbox" value="1" <?php echo (($this->view['wpsg_mod_trustedshops_vote'] == '1')?'checked="checked"':''); ?> name="<?php echo $this->view['widget']->get_field_name('wpsg_mod_trustedshops_vote'); ?>" id="<?php echo $this->view['widget']->get_field_id('wpsg_mod_trustedshops_vote'); ?>" />&nbsp;<?php echo __('Bewertungen anzeigen', 'wpsg'); ?>
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_trustedshops_vote" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_trustedshops_vote"></a><br />
+</label>
+<label>
+ <input type="checkbox" value="1" <?php echo (($this->view['wpsg_mod_trustedshops_badge'] == '1')?'checked="checked"':''); ?> name="<?php echo $this->view['widget']->get_field_name('wpsg_mod_trustedshops_badge'); ?>" id="<?php echo $this->view['widget']->get_field_id('wpsg_mod_trustedshops_badge'); ?>" />&nbsp;<?php echo __('Badge anzeigen', 'wpsg'); ?>
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_trustedshops_badge" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_mod_trustedshops_vote"></a><br />
+</label>
+
+<br />
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+/* ]]> */</script>
+
+<?php echo wpsg_translate(__('Die weitere Konfiguration des Widgets erfolgt in den <a href="#1#">Moduleinstellungen.</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_trustedshops'); ?> \ No newline at end of file
diff --git a/views/mods/mod_userpayment/list.phtml b/views/mods/mod_userpayment/list.phtml
new file mode 100644
index 0000000..31b9b33
--- /dev/null
+++ b/views/mods/mod_userpayment/list.phtml
@@ -0,0 +1,165 @@
+<?php
+
+ /**
+ * Template für die Liste von Zahlungsarten
+ */
+
+?>
+<?php if (!is_array($this->view['wpsg_mod_userpayment']['data']) || sizeof($this->view['wpsg_mod_userpayment']['data']) <= 0) { ?>
+<?php echo __('Bisher keine Zahlvarianten angelegt.', 'wpsg'); ?>
+<?php } else { ?>
+ <table class="zv_table">
+ <colgroup>
+ <col class="wpsg_label" />
+ <col class="wpsg_value" />
+ <col class="wpsg_delcol" />
+ </colgroup>
+ <?php $i = 0; foreach ($this->view['wpsg_mod_userpayment']['data'] as $zv) { $i ++; ?>
+ <tr>
+ <td class="wpsg_label"><?php echo __('ID', 'wpsg'); ?>:</td>
+ <td class="wpsg_value"><?php echo $zv['id']; ?></td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Zahlvariante löschen', 'wpsg'); ?>" onclick="return wpsg_removeZV(<?php echo $zv['id']; ?>);"></a>
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('#zv_<?php echo $zv['id']; ?>_name').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ zv_id: '<?php echo $zv['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ } );
+
+ jQuery('#zv_<?php echo $zv['id']; ?>_hint').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'hint',
+ zv_id: '<?php echo $zv['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ } );
+
+ jQuery('#zv_<?php echo $zv['id']; ?>_rabgeb').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'rabgeb',
+ zv_id: '<?php echo $zv['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Definieren ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ } );
+
+ jQuery('#zv_<?php echo $zv['id']; ?>_mwst').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'mwst_key',
+ zv_id: '<?php echo $zv['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ data: '<?php echo json_encode(wpsg_tax_groups()); ?>',
+ type: 'select',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#zv_<?php echo $zv['id']; ?>_aktiv').bind('change', function() {
+
+ var value = 0;
+ if (jQuery(this).attr("checked") == "checked") value = 1;
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1',
+ data: {
+ field: 'aktiv',
+ zv_id: '<?php echo $zv['id']; ?>',
+ value: value
+ }
+ } );
+
+ } );
+
+ } );
+
+ </script>
+
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Bezeichnung', 'wpsg'); ?>:</td>
+ <td class="wpsg_value" id="zv_<?php echo $zv['id']; ?>_name"><?php echo wpsg_hspc($zv['name']); ?></td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name"></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Aktiv', 'wpsg'); ?>:</td>
+ <td class="wpsg_value">
+ <input type="checkbox" value="1" <?php echo (($zv['aktiv'] == '1')?'checked="checked"':''); ?> id="zv_<?php echo $zv['id']; ?>_aktiv" />
+ </td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ"></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Hinweistext', 'wpsg'); ?>:</td>
+ <td class="wpsg_value" id="zv_<?php echo $zv['id']; ?>_hint"><?php echo wpsg_hspc($zv['hint']); ?></td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint"></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Gebühr/Rabatt', 'wpsg'); ?>:</td>
+ <td class="wpsg_value">
+ <div style="float:left; width:70%" id="zv_<?php echo $zv['id']; ?>_rabgeb" class="editable"><?php echo wpsg_hspc(wpsg_ff($zv['rabgeb'], true)); ?></div>
+ <div style="float:right;"><?php echo $this->get_option('wpsg_currency'); ?> / %</div>
+ </td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_gebuehr" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_gebuehr"></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Steuersatz', 'wpsg'); ?>:</td>
+ <td id="zv_<?php echo $zv['id']; ?>_mwst" class="wpsg_value wpsg_editable"><?php
+
+ $tax_groups = wpsg_tax_groups();
+ echo wpsg_hspc($tax_groups[$zv['mwst_key']]);
+
+ ?></td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_gebuehr" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_gebuehr"></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Keine MwSt. wenn Land steuerfrei', 'wpsg'); ?>:</td>
+ <td class="wpsg_value">
+ <input onchange="wpsg_saveZVMwSt(this, <?php echo $zv['id']; ?>);" <?php echo (($zv['mwst_laender'] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" />
+ </td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland"></a>
+ </td>
+ </tr>
+ <?php if ($i < sizeof($this->view['wpsg_mod_userpayment']['data'])) { ?>
+ <tr class="wpsg_spacer"><td colspan="3"><hr /></td></tr>
+ <?php } ?>
+ <?php } ?>
+ </table>
+<?php } ?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_userpayment/settings_edit.phtml b/views/mods/mod_userpayment/settings_edit.phtml
new file mode 100644
index 0000000..93b21f6
--- /dev/null
+++ b/views/mods/mod_userpayment/settings_edit.phtml
@@ -0,0 +1,82 @@
+<?php
+
+ /**
+ * Template für die Einstellungsseite des Zahlungsvarianten Moduls
+ */
+
+?>
+<script type="text/javascript">
+
+ /**
+ * Speichert die Änderung in der Checkbox der MwSt.
+ */
+ function wpsg_saveZVMwSt(oElement, zv_id)
+ {
+
+ if (jQuery(oElement).attr("checked")) value = '1'; else value = '0';
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1',
+ data: {
+ field: 'mwst_laender',
+ zv_id: zv_id,
+ value: value
+ }
+ } );
+
+ } // function wpsg_saveZVMwSt(oElement, va_id)
+
+ function wpsg_addZV()
+ {
+
+ jQuery('#wpsg_zv_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&noheader=1&do=add',
+ success: function(data) {
+ jQuery('#wpsg_zv_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addZV()
+
+ function wpsg_removeZV(zv_id)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie die Zahlvariante löschen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_zv_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&noheader=1&do=remove',
+ data: {
+ zv_id: zv_id
+ },
+ success: function(data) {
+ jQuery('#wpsg_zv_list').html(data);
+ }
+ } );
+
+ } // function wpsg_removeZV(zv_id)
+
+</script>
+
+<div class="wpsg_admin_box">
+
+ <div class="head">
+ <div class="title">
+ <div class="fulltab">
+ <?php echo __('Zahlvarianten', 'wpsg'); ?>
+ <a title="<?php echo __('Neue Zahlvariante anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addZV();"></a>
+ </div>
+ </div>
+ </div>
+ <div class="content" id="wpsg_zv_list">
+ <?php echo $this->callMod('wpsg_mod_userpayment', 'zv_list'); ?>
+ </div>
+
+</div>
+
+<p class="wpsg_hinweis"><?php echo __('Um eine Zahlvariante zu bearbeiten klicken Sie einfach auf den Namen oder den Rabattwert.', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_varianten/basket_row.phtml b/views/mods/mod_varianten/basket_row.phtml
new file mode 100644
index 0000000..ba8063e
--- /dev/null
+++ b/views/mods/mod_varianten/basket_row.phtml
@@ -0,0 +1,23 @@
+ <?php
+
+ /**
+ * Render ein Variantenprodukt im Warenkorb (basket.phtml)
+ */
+
+?>
+<?php //wpsg_debug($this->view['variante']) ?>
+<tr class="wpsg_<?php echo (($this->view['i'] % 2 == 0)?'odd':'even'); ?>">
+ <td><?php echo __('Variante', 'wpsg'); ?>:</td>
+ <td colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'3':'2'); ?>">
+ <?php if (get_option('wpsg_vp_detailview') == 1) { ?>
+ <?php foreach ($this->view['variante'] as $vari => $value) { ?>
+ <?php if (is_numeric($vari)) { ?>
+ <?php echo $value['name'] ?>: <?php echo $value['value'] ?>; <?php echo __('Art. Nr.', 'wpsg').': '.$value['artnr'] ?>; <?php echo $value['preis'] ?> <?php echo $this->get_option('wpsg_currency') ?>
+ <br />
+ <?php } ?>
+ <?php } ?>
+ <?php } else { ?>
+ <?php echo $this->view['variante']['key']; ?>
+ <?php } ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_varianten/drawVarianten.phtml b/views/mods/mod_varianten/drawVarianten.phtml
new file mode 100644
index 0000000..ccd3185
--- /dev/null
+++ b/views/mods/mod_varianten/drawVarianten.phtml
@@ -0,0 +1,535 @@
+<?php
+
+ /**
+ * Template für das Interface der Varianten im Produktbackend
+ * Sollte nicht angepasst werden
+ */
+
+?>
+<?php if (isset($this->view['message'])) { ?>
+<?php if ($this->view['message'][0] == "1") { ?>
+<span style="color:red;"><?php echo $this->view['message'][1]; ?></span><br /><br />
+<?php } else { ?>
+<span style="color:green;"><?php echo $this->view['message'][1]; ?></span><br /><br />
+<?php } ?>
+<?php } ?>
+
+<?php if (sizeof($this->view['vp_data']) <= 0) { ?>
+<p><?php echo __("Es wurden noch keine Varianten zu diesem Produkt angelegt.", "wpsg"); ?></p>
+<?php } else { ?>
+
+ <div class="var_order_wrap">
+ <?php $i = 0; foreach ($this->view['vp_data'] as $k => $var) { $i ++; ?>
+ <div id="variante_<?php echo $k; ?>" class="var_order">
+
+ <div style="font-weight:bold; display:inline;">
+ <span class="sortable_handler"><?php echo $k.": "; ?></span>
+ <div class="wpsg_editable" id="varname_<?php echo $k; ?>" style="font-weight:bold;"><?php echo $this->callMod('wpsg_mod_varianten', 'getVariantenName', array($this->view['vp_data'], $k)); ?></div>
+ <?php if ($var['typ'] == "checkbox") { ?>
+ (<?php echo __("Checkbox", "wpsg"); ?>)
+ <?php } else if ($var['typ'] == "select") { ?>
+ (<?php echo __("Selectbox", "wpsg"); ?>)
+ <?php } else if ($var['typ'] == "radio") { ?>
+ (<?php echo __("Radio Auswahl", "wpsg"); ?>)
+ <?php } else if ($var['typ'] == 'image') { ?>
+ (<?php echo __('Grafikauswahl', 'wpsg'); ?>)
+ <?php } ?>
+ </div>
+
+ <?php if (!wpsg_isSizedString($_REQUEST['wpsg_lang'])) { ?>
+ <a href="#" title="<?php echo __('Variante löschen', 'wpsg'); ?>" onclick="return wpsg_vp_del(<?php echo $k; ?>);" style="float:right; margin-left:10px;"><img src="<?php echo $this->getRessourceURL('gfx/bin.png'); ?>" alt="<?php echo __("Variante löschen", "wpsg"); ?>" /></a>
+ <?php if ($var['aktiv'] == "1") { ?>
+ <a href="#" title="<?php echo __('Variante deaktivieren', 'wpsg'); ?>" onclick="return wpsg_vp_deaktiv(<?php echo $k; ?>, 0);" style="float:right; margin-left:10px;"><img src="<?php echo $this->getRessourceURL('gfx/hide.png'); ?>" alt="<?php echo __('Variante deaktivieren', 'wpsg'); ?>" /></a>
+ <?php } else { ?>
+ <a href="#" title="<?php echo __('Variante aktivieren', 'wpsg'); ?>" onclick="return wpsg_vp_deaktiv(<?php echo $k; ?>, 1);" style="float:right; margin-left:10px;"><img src="<?php echo $this->getRessourceURL('gfx/show.png'); ?>" alt="<?php echo __('Variante aktivieren', 'wpsg'); ?>" /></a>
+ <?php } ?><br />
+ <?php } ?>
+
+ <script type="text/javascript">
+
+ jQuery("#varname_<?php echo $k; ?>").editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+ submitdata: {
+ typ: "var_name",
+ var_id: <?php echo $k; ?>,
+ edit_id: <?php echo $this->view['data']['id']; ?>,
+ <?php if (wpsg_isSizedString($_REQUEST['wpsg_lang'])) { ?>
+ wpsg_lang: "<?php echo $_REQUEST['wpsg_lang']; ?>",
+ <?php } ?>
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ </script>
+
+ <?php if ($var['typ'] == "checkbox") { ?>
+
+ <table style="width:100%;">
+ <tr>
+ <th style="width:34px;">&nbsp;</th>
+ <th class="col_variname"></th>
+ <!--<th class="col_variartnr"><?php echo __("Varianten Art. Nr.", "wpsg"); ?></th> -->
+ <th class="col_preis"><?php echo __("Preis", "wpsg"); ?></th>
+ <?php if ($this->hasMod('wpsg_mod_weight')) { ?>
+ <th class="col_weight" style="width:75px; text-align:left;"><?php echo __("Gewicht", "wpsg"); ?></th>
+ <?php } ?>
+ <?php if ($this->hasMod('wpsg_mod_stock') && $var['typ'] != 'checkbox') { ?>
+ <th class="col_stock"><?php echo __("Bestand", "wpsg"); ?></th>
+ <?php } ?>
+ <th></th>
+ </tr>
+ <tr style="line-height:25px;">
+ <td></td>
+ <td></td>
+ <!-- <td class="wpsg_editable col_variartnr" id="variartnr_<?php echo $k; ?>"><?php echo ($var['artnr'] != "")? $var['artnr']:''; ?></td> -->
+ <td class="wpsg_editable col_preis" id="varpreis_<?php echo $k; ?>"><?php echo (($var['preis'] != "")?wpsg_ff($var['preis'], $this->get_option('wpsg_currency')):wpsg_ff(0, $this->get_option('wpsg_currency'))); ?></td>
+ <?php if ($this->hasMod('wpsg_mod_weight')) { $ModCol ++; ?>
+ <td class="wpsg_editable col_weight" id="varweight_<?php echo $k; ?>"><?php echo (($var['weight'] != "")?$var['weight']:"0"); ?></td>
+ <?php } ?>
+ <?php if ($this->hasMod('wpsg_mod_stock') && $var['typ'] != 'checkbox') { $ModCol ++; ?>
+ <td class="wpsg_editable col_stock" id="varstock_<?php echo $k; ?>">
+ <?php echo (($var['stock'] != "")?intval($var['stock']):"0"); ?>
+ </td>
+ <?php } ?>
+ </tr>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <tr class="wpsg_mod_varianten_productimage_row">
+ <td colspan="2">&nbsp;</td>
+ <td style="padding-bottom:10px;" colspan="<?php echo $ModCol + 3; ?>" id="wpsg_mod_varianten_productimage_<?php echo $k; ?>">
+
+ <?php $j = 0; foreach ((array)$this->callMod('wpsg_mod_varianten', 'getVariImages', array($this->view['data']['id'], $k, -1)) as $file) { $j ++; $url_tn = $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $file, 25, 25, 's')); ?>
+ <a class="<?php echo ((in_array($file, explode(",", $var['pic'])))?'mark':''); ?> pic" id="<?php echo $file; ?>" onclick="return wpsg_vp_vari_setPic(this, <?php echo $k; ?>, -1, '<?php echo $file; ?>', <?php echo $j; ?>);" href=""><img src="<?php echo $url_tn; ?>" alt="" /></a>
+ <?php } ?>
+
+ </td>
+ <td>
+
+ <?php if (wpsg_isSizedInt($j)) { ?>
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_varianten_productimage_<?php echo $k; ?>').sortable( {
+ items: 'a',
+ helper : 'clone',
+ update: function(event, ui) {
+
+ wpsg_vp_ajaxloading_show();
+
+ var wpsg_reorder = jQuery(this).sortable('toArray');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_var_setImageOrder&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
+ async: false,
+ data: {
+ 'var_id': <?php echo $k; ?>,
+ 'vari_id': -1,
+ 'wpsg_reorder': wpsg_reorder
+ },
+ success: function(data) {
+
+ if (data != '1') alert(data);
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ }
+ } ).disableSelection();
+
+ } );
+
+ /* ]]> */</script>
+
+ <?php } ?>
+
+ </td>
+ </tr>
+ <?php } ?>
+ </table>
+
+ <?php if (!wpsg_isSizedString($_REQUEST['wpsg_lang'])) { ?>
+ <script type="text/javascript">
+
+ jQuery("#variartnr_<?php echo $k; ?>").editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+ submitdata: {
+ typ: "var_artnr",
+ edit_id: <?php echo $this->view['data']['id']; ?>,
+ var_id: <?php echo $k; ?>,
+ <?php if (wpsg_isSizedString($_REQUEST['wpsg_lang'])) { ?>
+ wpsg_lang: "<?php echo $_REQUEST['wpsg_lang']; ?>",
+ <?php } ?>
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery("#varpreis_<?php echo $k; ?>").editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+ submitdata: {
+ typ: "var_preis",
+ edit_id: <?php echo $this->view['data']['id']; ?>,
+ var_id: <?php echo $k; ?>
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ <?php if ($this->hasMod('wpsg_mod_weight')) { ?>
+
+ jQuery("#varweight_<?php echo $k; ?>").editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+ submitdata: {
+ typ: "var_weight",
+ edit_id: <?php echo $this->view['data']['id']; ?>,
+ var_id: <?php echo $k; ?>
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_stock') && $var['typ'] != 'checkbox') { ?>
+
+ jQuery("#varstock_<?php echo $k; ?>").editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+ submitdata: {
+ typ: "var_stock",
+ edit_id: <?php echo $this->view['data']['id']; ?>,
+ var_id: <?php echo $k; ?>
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ <?php } ?>
+
+ </script>
+ <?php } ?>
+
+ <?php } else { ?>
+ <table style="width:100%;" class="wpsg_mod_varianten_orderwrap wpsg_mod_varianten_orderwrap_<?php echo $var['typ']; ?>">
+ <tbody>
+ <?php if (sizeof((array)$var['vari']) > 0) { ?>
+ <tr>
+ <th style="width:15px;">&nbsp;</th>
+ <th style="width:15px;">&nbsp;</th>
+ <th class="col_variname"></th>
+ <th class="col_variartnr"><?php echo __("Varianten Art. Nr.", "wpsg"); ?></th>
+ <th class="col_preis"><?php echo __("Preis", "wpsg"); ?></th>
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+ <th class="col_fmenge"><?php echo __('Füllmenge', 'wpsg'); ?></th>
+ <?php } ?>
+ <?php if ($this->hasMod('wpsg_mod_weight')) { ?>
+ <th style="width:75px; text-align:left;"><?php echo __("Gewicht", "wpsg"); ?></th>
+ <?php } ?>
+ <?php if ($this->hasMod('wpsg_mod_stock')) { ?>
+ <th class="col_stock"><?php echo __("Bestand", "wpsg"); ?></th>
+ <?php } ?>
+ <th></th>
+ <th></th>
+ </tr>
+ <?php } ?>
+ <?php foreach ((array)$var['vari'] as $kv => $vari) { $ModCol = 0; ?>
+ <tr style="line-height:25px;" id="<?php echo 'variorder_'.$k.'_'.$kv; ?>" class="wpsg_mod_varianten_order">
+ <td></td>
+ <td class="sortable_handler"><?php echo $kv.": "; ?></td>
+ <td class="wpsg_editable col_variname" id="variname_<?php echo $k; ?>_<?php echo $kv; ?>"><?php
+ echo $this->callMod('wpsg_mod_varianten', 'getVariName', array($this->view['vp_data'], $k, $kv));
+ ?></td>
+ <td class="wpsg_editable col_variartnr" id="variartnr_<?php echo $k; ?>_<?php echo $kv; ?>"><?php echo (wpsg_isSizedString($vari['artnr']))? $vari['artnr']:''; ?></td>
+ <td class="col_preis wpsg_editable" id="varipreis_<?php echo $k; ?>_<?php echo $kv; ?>"><?php echo (($vari['preis'] != "")?wpsg_ff($vari['preis'], $this->get_option('wpsg_currency')):wpsg_ff(0, $this->get_option('wpsg_currency'))); ?></td>
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { $ModCol ++; ?>
+ <td class="col_fmenge wpsg_editable" id="varifmenge_<?php echo $k; ?>_<?php echo $kv; ?>"><?php echo (($vari['fmenge'] != "")?wpsg_ff($vari['fmenge'], $this->view['vp_arFeinheiten'][$this->view['vp_productdata']['feinheit']]):"0"); ?></td>
+ <?php } ?>
+ <?php if ($this->hasMod('wpsg_mod_weight')) { $ModCol ++; ?>
+ <td class="col_variweight wpsg_editable" id="variweight_<?php echo $k; ?>_<?php echo $kv; ?>"><?php echo ((wpsg_isSizedString($vari['weight']))?$vari['weight']:'0'); ?></td>
+ <?php } ?>
+ <?php if ($this->hasMod('wpsg_mod_stock')) { $ModCol ++; ?>
+ <td class="col_stock wpsg_editable" id="varistock_<?php echo $k; ?>_<?php echo $kv; ?>"><?php echo (($vari['stock'] != "")?intval($vari['stock']):'0'); ?></td>
+ <?php } ?>
+ <td>
+
+ <?php if (!wpsg_isSizedString($_REQUEST['wpsg_lang'])) { ?>
+ <a href="#" title="<?php echo __("Variation löschen", "wpsg"); ?>" style="float:right; margin-left:10px;" onclick="return wpsg_vp_vari_del(<?php echo $k; ?>, <?php echo $kv; ?>);"><img src="<?php echo $this->getRessourceURL('gfx/bin.png'); ?>" alt="<?php echo __("Variation löschen", "wpsg"); ?>" /></a>
+ <?php if ($vari['aktiv'] == "1") { ?>
+ <a href="#" title="<?php echo __("Variation deaktivieren", "wpsg"); ?>" style="float:right; margin-left:10px;" onclick="return wpsg_vp_vari_deaktiv(<?php echo $k; ?>, <?php echo $kv; ?>, 0);"><img src="<?php echo $this->getRessourceURL('gfx/hide.png'); ?>" alt="<?php echo __("Variation deaktivieren", "wpsg"); ?>" /></a>
+ <?php } else { ?>
+ <a href="#" title="<?php echo __("Variation aktivieren", "wpsg"); ?>" style="float:right; margin-left:10px;" onclick="return wpsg_vp_vari_deaktiv(<?php echo $k; ?>, <?php echo $kv; ?>, 1);"><img src="<?php echo $this->getRessourceURL('gfx/show.png'); ?>" alt="<?php echo __("Variation aktivieren", "wpsg"); ?>" /></a>
+ <?php } ?>
+ <?php } ?>
+
+ <script type="text/javascript">
+
+ jQuery("#variname_<?php echo $k; ?>_<?php echo $kv; ?>").editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+ submitdata: {
+ typ: "vari_name",
+ edit_id: <?php echo $this->view['data']['id']; ?>,
+ var_id: <?php echo $k; ?>,
+ <?php if (wpsg_isSizedString($_REQUEST['wpsg_lang'])) { ?>
+ wpsg_lang: "<?php echo $_REQUEST['wpsg_lang']; ?>",
+ <?php } ?>
+ vari_id: <?php echo $kv; ?>
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ <?php if (!wpsg_isSizedString($_REQUEST['wpsg_lang'])) { ?>
+ jQuery("#variartnr_<?php echo $k; ?>_<?php echo $kv; ?>").editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+ submitdata: {
+ typ: "vari_artnr",
+ edit_id: <?php echo $this->view['data']['id']; ?>,
+ var_id: <?php echo $k; ?>,
+ <?php if (wpsg_isSizedString($_REQUEST['wpsg_lang'])) { ?>
+ wpsg_lang: "<?php echo $_REQUEST['wpsg_lang']; ?>",
+ <?php } ?>
+ vari_id: <?php echo $kv; ?>
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery("#varipreis_<?php echo $k; ?>_<?php echo $kv; ?>").editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+ submitdata: {
+ typ: "vari_preis",
+ edit_id: <?php echo $this->view['data']['id']; ?>,
+ var_id: <?php echo $k; ?>,
+ vari_id: <?php echo $kv; ?>
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+ jQuery("#varifmenge_<?php echo $k; ?>_<?php echo $kv; ?>").editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+ submitdata: {
+ typ: "vari_fmenge",
+ edit_id: <?php echo $this->view['data']['id']; ?>,
+ var_id: <?php echo $k; ?>,
+ vari_id: <?php echo $kv; ?>
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_weight')) { ?>
+
+ jQuery("#variweight_<?php echo $k; ?>_<?php echo $kv; ?>").editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+ submitdata: {
+ typ: "vari_weight",
+ edit_id: <?php echo $this->view['data']['id']; ?>,
+ var_id: <?php echo $k; ?>,
+ vari_id: <?php echo $kv; ?>
+ },
+ indicator: "<?php echo __("Speicher...", "wpsg"); ?>",
+ tooltip: "<?php echo __("Zum Bearbeiten anklicken und mit Enter bestätigen ...", "wpsg"); ?>"
+ });
+
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_stock')) { ?>
+
+ jQuery("#varistock_<?php echo $k; ?>_<?php echo $kv; ?>").editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+ submitdata: {
+ typ: "vari_stock",
+ edit_id: <?php echo $this->view['data']['id']; ?>,
+ var_id: <?php echo $k; ?>,
+ vari_id: <?php echo $kv; ?>
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ <?php } ?>
+ <?php } ?>
+
+ </script>
+
+ </td>
+ </tr>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <tr class="wpsg_mod_varianten_productimage_row">
+ <td colspan="2">&nbsp;</td>
+ <td style="padding-bottom:10px;" colspan="<?php echo $ModCol + 3; ?>" id="wpsg_mod_varianten_productimage_<?php echo $k; ?>_<?php echo $kv; ?>">
+
+ <?php $j = 0; foreach ((array)$this->callMod('wpsg_mod_varianten', 'getVariImages', array($this->view['data']['id'], $k, $kv)) as $file) { $j ++; $url_tn = $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $file, 25, 25, 's')); ?>
+ <a class="<?php echo ((in_array($file, explode(",", $vari['pic'])))?'mark':''); ?> pic" id="<?php echo $file; ?>" onclick="return wpsg_vp_vari_setPic(this, <?php echo $k; ?>, <?php echo $kv; ?>, '<?php echo $file; ?>', <?php echo $j; ?>);" href=""><img src="<?php echo $url_tn; ?>" alt="" /></a>
+ <?php } ?>
+
+ </td>
+ <td>
+
+ <?php if (wpsg_isSizedInt($j)) { ?>
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_varianten_productimage_<?php echo $k; ?>_<?php echo $kv; ?>').sortable( {
+ items: 'a',
+ helper : 'clone',
+ update: function(event, ui) {
+
+ wpsg_vp_ajaxloading_show();
+
+ var wpsg_reorder = jQuery(this).sortable('toArray');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_var_setImageOrder&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
+ async: false,
+ data: {
+ 'var_id': <?php echo $k; ?>,
+ 'vari_id': <?php echo $kv; ?>,
+ 'wpsg_reorder': wpsg_reorder
+ },
+ success: function(data) {
+
+ if (data != '1') alert(data);
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ }
+ } ).disableSelection();
+
+ } );
+
+ /* ]]> */</script>
+
+ <?php } ?>
+
+ </td>
+ </tr>
+ <?php } ?>
+ <?php } ?>
+
+ <?php if (!wpsg_isSizedString($_REQUEST['wpsg_lang'])) { ?>
+ <tr>
+ <td colspan="2"></td>
+ <td><?php echo __("Neue Variation", "wpsg"); ?>: <input type="text" onkeypress="return wpsg_vp_addVariation_input(event, <?php echo $k; ?>);" class="variation_neu" value="" /></td>
+ <td colspan="5">
+ <input type="button" onclick="return wpsg_vp_addVariation(<?php echo $k; ?>);" value="<?php echo __("Anlegen", "wpsg"); ?>" class="button" />
+ </td>
+ </tr>
+ <?php } ?>
+
+ </tbody>
+ </table>
+ <?php } ?>
+
+ </div>
+ <hr />
+ <?php } ?>
+
+ </div>
+
+<?php } ?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ <?php if (!wpsg_isSizedString($_REQUEST['wpsg_lang'])) { ?>
+ jQuery('.var_order_wrap').sortable( {
+ items: 'div.var_order',
+ helper: wpsg_Tablefix,
+ handler: '.sortable_handler',
+ update: function(event, ui) {
+
+ var wpsg_reorder = jQuery(this).sortable('serialize');
+
+ wpsg_vp_ajaxloading_show();
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_var_reorder&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
+ async: false,
+ data: {
+ 'wpsg_lang': '<?php echo @$_REQUEST['wpsg_lang']; ?>',
+ 'wpsg_reorder': wpsg_reorder
+ },
+ success: function(data) {
+
+ jQuery("#wpsg_vp_drawVarianten").html(data);
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ }
+ } );
+
+ jQuery('.wpsg_mod_varianten_orderwrap tbody').sortable( {
+ helper: wpsg_Tablefix,
+ items: 'tr.wpsg_mod_varianten_order',
+ handler: '.sortable_handler',
+ update: function(event, ui) {
+
+ var wpsg_reorder = jQuery(this).sortable('serialize');
+
+ wpsg_vp_ajaxloading_show();
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vari_reorder&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
+ async: false,
+ data: {
+ 'wpsg_lang': '<?php echo @$_REQUEST['wpsg_lang']; ?>',
+ 'wpsg_reorder': wpsg_reorder
+ },
+ success: function(data) {
+
+ jQuery("#wpsg_vp_drawVarianten").html(data);
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ }
+ } );
+
+ jQuery('.wpsg_mod_varianten_orderwrap tbody tr.wpsg_mod_varianten_order').disableSelection();
+ <?php } ?>
+
+ } );
+
+/* ]]> */</script>
+
+<br />
+
+<?php if (!wpsg_isSizedString($_REQUEST['wpsg_lang'])) { ?>
+<label for="wpsg_vp_vartyp">
+ <?php echo __("Neue Variante", "wpsg"); ?>
+</label>
+<input type="text" id="wpsg_vp_varneu" onkeypress="return wpsg_vp_add_input(event);" value="" />
+<select id="wpsg_vp_vartyp">
+ <option value="radio"><?php echo __("Auswahl durch Radio Buttons", "wpsg"); ?></option>
+ <option value="select"><?php echo __("Auswahl über eine Selectbox", "wpsg"); ?></option>
+ <option value="checkbox"><?php echo __("Über eine Checkbox aktivierbar", "wpsg"); ?></option>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <option value="image"><?php echo __("Grafikauswahl", "wpsg"); ?></option>
+ <?php } ?>
+</select>
+<input type="button" onclick="wpsg_vp_add();" value="<?php echo __("Anlegen", "wpsg"); ?>" class="button" />
+<br />
+<?php } ?>
+
+<div class="wpsg_mod_varianten_ajaxloading" style="display:none;"><img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="<?php echo __('Bitte warten', 'wpsg'); ?>" /></div> \ No newline at end of file
diff --git a/views/mods/mod_varianten/mail_row.phtml b/views/mods/mod_varianten/mail_row.phtml
new file mode 100644
index 0000000..1ee4d48
--- /dev/null
+++ b/views/mods/mod_varianten/mail_row.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Mit diesem Template kann die Zeile eines Produktes im Mailtemplate erweitert werden
+ */
+
+?>
+<?php //wpsg_debug($this->view['variante']) ?>
+<?php if (get_option('wpsg_vp_detailview') == 1) { ?>
+<?php echo wpsg_pad_left($p['menge'], 5); ?><?php echo wpsg_translate(__('Variante:', 'wpsg'), "")."\n" ?>
+<?php foreach ($this->view['variante'] as $vari => $value) { ?>
+<?php if (is_numeric($vari)) { ?>
+<?php echo wpsg_pad_left($p['menge'], 8); ?> <?php echo '- '.$value['name'] ?>: <?php echo $value['value'] ?>; <?php echo __('Art. Nr.', 'wpsg').': '.$value['artnr'] ?>; <?php echo $value['preis'] ?> <?php echo $this->get_option('wpsg_currency')."\n" ?>
+<?php } ?>
+<?php } ?>
+<?php } else { ?>
+<?php echo wpsg_pad_right(' ', 5); ?><?php echo __('Variante', 'wpsg'); ?>: <?php echo $this->view['variante']['key']; ?>
+<?php } ?>
diff --git a/views/mods/mod_varianten/mail_row_html.phtml b/views/mods/mod_varianten/mail_row_html.phtml
new file mode 100644
index 0000000..29221d6
--- /dev/null
+++ b/views/mods/mod_varianten/mail_row_html.phtml
@@ -0,0 +1,22 @@
+<?php
+
+ /**
+ * Mit diesem Template kann die Zeile eines Produktes im Mailtemplate HTML erweitert werden
+ */
+
+?>
+<tr class="productrow productrow2 <?php echo ((($this->view['i'] % 2) == 0)?'productrow_odd':'productrow_even'); ?>">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_pos">&nbsp;</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name"><?php echo __('Variante', 'wpsg'); ?>:</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_variant_value" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
+ <?php if (get_option('wpsg_vp_detailview') == 1) { ?>
+ <?php foreach ($this->view['variante'] as $vari => $value) { ?>
+ <?php if (is_numeric($vari)) { ?>
+ <?php echo wpsg_pad_left($p['menge'], 8); ?> <?php echo '- '.$value['name'] ?>: <?php echo $value['value'] ?>; <?php echo __('Art. Nr.', 'wpsg').': '.$value['artnr'] ?>; <?php echo $value['preis'] ?> <?php echo $this->get_option('wpsg_currency'); ?><br />
+ <?php } ?>
+ <?php } ?>
+ <?php } else { ?>
+ <?php echo $this->view['variante']['key']; ?>
+ <?php } ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_varianten/order_view_row.phtml b/views/mods/mod_varianten/order_view_row.phtml
new file mode 100644
index 0000000..37c1ec9
--- /dev/null
+++ b/views/mods/mod_varianten/order_view_row.phtml
@@ -0,0 +1,22 @@
+<?php
+
+ /**
+ * Template für die Zeile eines Variantenprodukts bei der Produktansicht in der Bestellverwaltung
+ */
+
+?>
+<tr class="wpsg_<?php echo (($this->view['i'] == 0)?'odd':'even'); ?>">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;"><?php echo __('Variante', 'wpsg'); ?>:</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" align="right" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
+ <?php if ($this->get_option('wpsg_vp_detailview') == 1) { ?>
+ <?php foreach ($this->view['variante'] as $vari => $value) { ?>
+ <?php if (is_numeric($vari)) { ?>
+ <?php echo $value['name'] ?>: <?php echo $value['value'] ?>; <?php echo __('Art. Nr.', 'wpsg').': '.$value['artnr'] ?>; <?php echo $value['preis'] ?> <?php echo $this->get_option('wpsg_currency') ?>
+ <br />
+ <?php } ?>
+ <?php } ?>
+ <?php } else { ?>
+ <?php echo $this->view['variante']['key']; ?>
+ <?php } ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_varianten/overview_row.phtml b/views/mods/mod_varianten/overview_row.phtml
new file mode 100644
index 0000000..ed20591
--- /dev/null
+++ b/views/mods/mod_varianten/overview_row.phtml
@@ -0,0 +1,22 @@
+<?php
+
+ /**
+ * Wird nach den Produkten in der Bestellzusammenfassung (overview) bei Variantenprodukten verwendet
+ */
+
+?>
+<tr class="wpsg_<?php echo (($this->view['i'] == 0)?'odd':'even'); ?>">
+ <td><?php echo __('Variante', 'wpsg'); ?>:</td>
+ <td colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'2':'1'); ?>" class="wpsg_mod_varianten_value">
+ <?php if (get_option('wpsg_vp_detailview') == 1) { ?>
+ <?php foreach ($this->view['variante'] as $vari => $value) { ?>
+ <?php if (is_numeric($vari)) { ?>
+ <?php echo $value['name'] ?>: <?php echo $value['value'] ?>; <?php echo __('Art. Nr.', 'wpsg').': '.$value['artnr'] ?>; <?php echo $value['preis'] ?> <?php echo $this->get_option('wpsg_currency') ?>
+ <br />
+ <?php } ?>
+ <?php } ?>
+ <?php } else { ?>
+ <?php echo $this->view['variante']['key']; ?>
+ <?php } ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_varianten/produkt.phtml b/views/mods/mod_varianten/produkt.phtml
new file mode 100644
index 0000000..0f9f895
--- /dev/null
+++ b/views/mods/mod_varianten/produkt.phtml
@@ -0,0 +1,148 @@
+<?php
+
+ /**
+ * Template für die Varianten wird vom Produkttemplate z.B. standard.phtml geladen
+ */
+
+?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ wpsg_vp_vari[<?php echo $this->getProduktId($this->view['data']['id']); ?>] = new Array();
+
+/* ]]> */</script>
+
+<?php $vAktiv = false; if (is_array($this->view['data']['vp_data']) && sizeof($this->view['data']['vp_data']) > 0) { ?>
+ <?php foreach ($this->view['data']['vp_data'] as $k => $var) { if ($var['aktiv'] == "1") { $vAktiv = true; ?>
+
+ <div class="wpsg_vp_field wpsg_vp_field_<?php echo $this->getProduktId($this->view['data']['id']); ?>">
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ wpsg_vp_vari[<?php echo $this->getProduktId($this->view['data']['id']); ?>][<?php echo $k; ?>] = "<?php echo $var['typ']; ?>";
+
+ /* ]]> */</script>
+
+ <?php if ($var['typ'] != 'radio') { ?>
+ <label class="wpsg_vp_field_label" for="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>">
+ <?php echo $var['name']; ?>
+ </label>
+ <?php } else { ?>
+ <span class="wpsg_vp_field"><?php echo $var['name']; ?></span>
+ <?php } ?>
+
+ <div class="wpsg_vp_field_typ_<?php echo $var['typ']; ?>">
+
+ <?php if ($var['typ'] == "select") { ?>
+ <label>
+ <select onchange="wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>);" name="wpsg_vp[<?php echo $k; ?>]" id="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>">
+ <?php foreach ($var['vari'] as $kv => $vari) { if ($vari['aktiv'] == "1" && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { ?>
+ <option value="<?php echo $kv; ?>" <?php echo (($this->view['wpsg_mod_varianten']['set'][$k] == $kv)?'selected="selected"':''); ?>>
+ <?php echo $vari['name']; ?>
+ <?php if ($this->callMod('wpsg_mod_varianten', 'showVariPrice', array($vari['preis']))) { ?>
+ (<?php echo wpsg_ff($vari['preis'], $this->get_option('wpsg_currency')); ?>)
+ <?php } ?>
+ </option>
+ <?php } } ?>
+ </select>
+ <?php if ($this->get_option("wpsg_vp_showpic") == "1" && $this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <span class="wpsg_vp_field_image">
+ <?php foreach ($var['vari'] as $kv => $vari) { if ($vari['aktiv'] == "1" && isset($vari['showpic'])) { ?>
+ <span class="wpsg_vp_image wpsg_vp_image_<?php echo $kv; ?>" style="display:<?php echo (($this->view['wpsg_mod_varianten']['set'][$k] == $kv)?'block':'none'); ?>;">
+
+ <?php
+
+ $img_src = $this->callMod('wpsg_mod_produktbilder', 'makeTn', array(
+ $this->getProduktId($this->view['data']['id']),
+ $vari['showpic'],
+ $this->get_option("wpsg_vp_showpic_width"),
+ $this->get_option("wpsg_vp_showpic_height"),
+ 's'
+ ));
+
+ ?><img src="<?php echo $img_src; ?>" alt="" />
+
+ </span>
+ <?php } } ?>
+ </span>
+ <?php } ?>
+ </label>
+ <?php } ?>
+
+ <?php if ($var['typ'] == 'image' && $this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <div class="wpsg_mod_varianten_imageselect wpsg_mod_varianten_imageselect_<?php echo $k; ?>">
+ <input type="hidden" name="wpsg_vp[<?php echo $k; ?>]" value="<?php echo $this->view['wpsg_mod_varianten']['set'][$k]; ?>" />
+ <?php foreach ($var['vari'] as $kv => $vari) { if ($vari['aktiv'] == '1' && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { ?>
+ <?php $img = $this->callMod('wpsg_mod_varianten', 'getImageSelectImage', array($this->getProduktId($this->view['data']['id']), $k, $kv, $this->view['data']['product_key'])); ?>
+ <?php if (wpsg_isSizedString($img)) { ?>
+ <a data-wpsg-id="<?php echo $kv; ?>" class="image <?php echo (($this->view['wpsg_mod_varianten']['set'][$k] == $kv)?'akt':''); ?>" onclick="jQuery(this).parent().find('a').removeClass('akt'); jQuery(this).addClass('akt'); wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>); return false;" href="#">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->getProduktId($this->view['data']['id']), $img, $this->get_option('wpsg_vp_imageselect_width'), $this->get_option('wpsg_vp_imageselect_height'), $this->get_option('wpsg_vp_imageselect_mode'))); ?>" />
+ </a>
+ <?php } ?>
+ <?php } } ?>
+ </div>
+ <?php } ?>
+
+ <?php if ($var['typ'] == "radio") { ?>
+ <?php $j = 0; foreach ($var['vari'] as $kv => $vari) { if ($vari['aktiv'] == "1" && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { $j ++; ?>
+ <label>
+ <input <?php echo (($this->view['wpsg_mod_varianten']['set'][$k] == $kv)?'checked="checked"':''); ?> id="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>_<?php echo $j; ?>" onclick="wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>);" type="radio" name="wpsg_vp[<?php echo $k; ?>]" value="<?php echo $kv; ?>" />&nbsp;<?php echo $vari['name']; ?>
+ <?php if ($this->callMod('wpsg_mod_varianten', 'showVariPrice', array($vari['preis']))) { ?>
+ <span class="wpsg_vp_vari_preisinfo">(<?php echo wpsg_ff($vari['preis'], $this->get_option('wpsg_currency')); ?>)</span>
+ <?php } ?>
+ <?php if ($this->get_option("wpsg_vp_showpic") == "1" && isset($vari['showpic']) && $vari['showpic'] != false) { ?>
+ <span class="wpsg_vp_field_image">
+
+ <?php
+
+ $img_src = $this->callMod('wpsg_mod_produktbilder', 'makeTn', array(
+ $this->getProduktId($this->view['data']['id']),
+ $vari['showpic'],
+ $this->get_option("wpsg_vp_showpic_width"),
+ $this->get_option("wpsg_vp_showpic_height"),
+ 's'
+ ));
+
+ ?><img src="<?php echo $img_src; ?>" alt="" />
+
+ </span>
+ <?php } ?>
+ </label>
+ <?php } } ?>
+ <?php } ?>
+
+ <?php if ($var['typ'] == "checkbox" && $var['aktiv'] == 1) { ?>
+ <label>
+ <input onchange="wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>);" type="hidden" value="0" name="wpsg_vp[<?php echo $k; ?>]" />
+ <input <?php echo (($this->view['wpsg_mod_varianten']['set'][$k] == '1')?'checked="checked"':''); ?> onchange="wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>);" type="checkbox" value="1" name="wpsg_vp[<?php echo $k; ?>]" />
+ <?php if ($this->callMod('wpsg_mod_varianten', 'showVariPrice', array($var['preis']))) { ?>
+ <span class="wpsg_vp_vari_preisinfo">(<?php echo wpsg_ff($var['preis'], $this->get_option('wpsg_currency')); ?>)</span>
+ <?php } ?>
+ <?php if ($this->get_option("wpsg_vp_showpic") == "1" && $var['showpic'] != false) { ?>
+ <span class="wpsg_vp_field_image">
+
+ <?php
+
+ $img_src = $this->callMod('wpsg_mod_produktbilder', 'makeTn', array(
+ $this->getProduktId($this->view['data']['id']),
+ $var['showpic'],
+ $this->get_option("wpsg_vp_showpic_width"),
+ $this->get_option("wpsg_vp_showpic_height"),
+ 's'
+ ));
+
+ ?><img src="<?php echo $img_src; ?>" alt="" />
+ </span>
+ <?php } ?>
+ </label>
+ <?php } ?>
+
+ </div>
+
+ <div style="clear:both;"></div>
+
+ </div>
+
+ <?php } } ?>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_varianten/produkt_edit_content.phtml b/views/mods/mod_varianten/produkt_edit_content.phtml
new file mode 100644
index 0000000..bcaec6d
--- /dev/null
+++ b/views/mods/mod_varianten/produkt_edit_content.phtml
@@ -0,0 +1,297 @@
+<?php
+
+ /**
+ * Template für die Varianten innerhalb der Produktverwaltung
+ */
+
+?>
+<script type="text/javascript">
+
+ <?php if (!isset($_REQUEST['wpsg_lang'])) { ?>
+ function wpsg_vp_add()
+ {
+
+ if (jQuery('#wpsg_vp_varneu').val() == '') { alert('<?php echo __('Bitte einen Namen für die neue Variante angeben!', 'wpsg'); ?>'); return; }
+
+ var val_name = jQuery("#wpsg_vp_varneu").val();
+ var val_typ = jQuery("#wpsg_vp_vartyp").val();
+
+ wpsg_vp_ajaxloading_show();
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_add&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_varianten']['data']['id']; ?>',
+ async: false,
+ data: {
+ name: val_name,
+ typ: val_typ
+ },
+ success: function(data) {
+
+ jQuery("#wpsg_vp_drawVarianten").html(data);
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ } // function wpsg_vp_add()
+
+ /**
+ * Wird von dem Input Feld bei neuen Varianten aufgerufen (onkeypress) um
+ */
+ function wpsg_vp_add_input(ev)
+ {
+
+ if (ev && ev.which == 13)
+ {
+
+ wpsg_vp_add();
+
+ }
+
+ } // function wpsg_vp_add_input(ev)
+
+ function wpsg_vp_addVariation_input(ev, k)
+ {
+
+ if (ev && ev.which == 13)
+ {
+
+ wpsg_vp_addVariation(k);
+
+ }
+
+ }
+
+ function wpsg_vp_refresh()
+ {
+
+ wpsg_vp_ajaxloading_show();
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_refreh&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_varianten']['data']['id']; ?>',
+ success: function(data) {
+
+ jQuery("#wpsg_vp_drawVarianten").html(data);
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ return false;
+
+ }
+
+ function wpsg_vp_del(var_id)
+ {
+
+ if (!confirm("<?php echo __("Sind Sie sich sicher, dass Sie die Variante und alle Variationen löschen möchten?", "wpsg"); ?>")) return false;
+
+ wpsg_vp_ajaxloading_show();
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_del&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_varianten']['data']['id']; ?>',
+ async: false,
+ data: {
+ var_id: var_id
+ },
+ success: function(data) {
+
+ jQuery("#wpsg_vp_drawVarianten").html(data);
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_vp_del(var_id)
+
+ function wpsg_vp_deaktiv(var_id, status)
+ {
+
+ wpsg_vp_ajaxloading_show();
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_deaktiv&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_varianten']['data']['id']; ?>',
+ async: false,
+ data: {
+ var_id: var_id,
+ status: status
+ },
+ success: function(data) {
+
+ jQuery("#wpsg_vp_drawVarianten").html(data);
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_vp_deaktiv(var_id, status)
+
+ function wpsg_vp_addVariation(var_id)
+ {
+
+ var vari_name = jQuery("#variante_" + var_id).find(".variation_neu").val();
+ var vari_preis = jQuery("#variante_" + var_id).find(".variation_preis").val();
+
+ wpsg_vp_ajaxloading_show();
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_addVariation&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_varianten']['data']['id']; ?>',
+ async: false,
+ data: {
+ var_id: var_id,
+ vari_name: vari_name,
+ vari_preis: vari_preis
+ },
+ success: function(data) {
+
+ jQuery("#wpsg_vp_drawVarianten").html(data);
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ return false;
+
+ }
+
+ function wpsg_vp_vari_del(var_id, vari_id)
+ {
+
+ if (!confirm("<?php echo __("Sind Sie sich sicher, dass Sie die Variation löschen möchten?", "wpsg"); ?>")) return false;
+
+ wpsg_vp_ajaxloading_show();
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_del&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_varianten']['data']['id']; ?>',
+ async: false,
+ data: {
+ var_id: var_id,
+ vari_id: vari_id
+ },
+ success: function(data) {
+
+ jQuery("#wpsg_vp_drawVarianten").html(data);
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ return false;
+
+ }
+
+ function wpsg_vp_vari_deaktiv(var_id, vari_id, status)
+ {
+
+ wpsg_vp_ajaxloading_show();
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_deaktiv&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_varianten']['data']['id']; ?>',
+ async: false,
+ data: {
+ var_id: var_id,
+ vari_id: vari_id,
+ status: status
+ },
+ success: function(data) {
+
+ jQuery("#wpsg_vp_drawVarianten").html(data);
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ return false;
+
+ }
+ <?php } ?>
+
+ function wpsg_vp_ajaxloading_show()
+ {
+
+ jQuery('.wpsg_mod_varianten_ajaxloading').show();
+
+ }
+
+ function wpsg_vp_ajaxloading_hide()
+ {
+
+ jQuery('.wpsg_mod_varianten_ajaxloading').hide();
+
+ }
+
+ function wpsg_vp_vari_setPic(htmlElement, var_id, vari_id, pic, pic_index)
+ {
+
+ <?php if (!isset($_REQUEST['wpsg_lang'])) { ?>
+
+ wpsg_vp_ajaxloading_show();
+
+ jQuery.ajax( {
+ url: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_setPic&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_varianten']['data']['id']; ?>",
+ async: false,
+ data: {
+ var_id: var_id,
+ vari_id: vari_id,
+ pic: pic
+ },
+ success: function(data) {
+
+ if (vari_id >= 0)
+ {
+
+ if (jQuery(htmlElement).hasClass('mark'))
+ {
+ jQuery(htmlElement).removeClass('mark');
+ }
+ else
+ {
+ jQuery(htmlElement).addClass('mark');
+ }
+
+ }
+ else
+ {
+
+ if (jQuery(htmlElement).hasClass('mark'))
+ {
+ jQuery(htmlElement).removeClass('mark');
+ }
+ else
+ {
+ jQuery(htmlElement).addClass('mark');
+ }
+
+ }
+
+ wpsg_vp_ajaxloading_hide();
+
+ }
+ } );
+
+ <?php } ?>
+
+ return false;
+
+ }
+
+</script>
+
+
+<div class="postbox" id="wpsg_varianten">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Varianten', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside" id="wpsg_vp_drawVarianten">
+ <?php if ($this->view['data']['id'] > 0) { ?>
+ <?php echo $this->callMod('wpsg_mod_varianten', 'drawVarianten', array(&$this->view['wpsg_mod_varianten']['data']['id'])); ?>
+ <?php } else { ?>
+ <p><?php echo __('Varianten können erst nach einmaligem Speichern des Produkts angelegt werden.', 'wpsg'); ?></p>
+ <?php } ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_varianten/settings_edit.phtml b/views/mods/mod_varianten/settings_edit.phtml
new file mode 100644
index 0000000..aee4b68
--- /dev/null
+++ b/views/mods/mod_varianten/settings_edit.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Einstellungen des Variantenmoduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_vp_showpic', __('Direkte Anzeige eines Variantenbildes', 'wpsg'), $this->get_option('wpsg_vp_showpic'), array('help' => 'wpsg_vp_showpic')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_vp_detailview', __('Erweiterte Variantenanzeige aktivieren', 'wpsg'), $this->get_option('wpsg_vp_detailview'), array('help' => 'wpsg_vp_detailview')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_vp_showpic_width', __('Breite des Vorschaubildes', 'wpsg'), $this->get_option('wpsg_vp_showpic_width'), array('help' => 'wpsg_vp_showpic_width')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_vp_showpic_height', __('Höhe des Vorschaubildes', 'wpsg'), $this->get_option('wpsg_vp_showpic_height'), array('help' => 'wpsg_vp_showpic_height')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_vp_replaceanr', __('Produktartikelnummer ersetzen', 'wpsg'), $this->get_option('wpsg_vp_replaceanr'), array('hint' => __('Ersetzt die Produktartikelnummer durch die zusammengesetzte Artikelnummern der Varianten.', 'wpsg'), 'help' => 'wpsg_vp_replaceanr')); ?>
+
+<?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+<br />
+<h3><?php echo __('Bild für Varianten mit "Grafikauswahl"', 'wpsg'); ?></h3>
+<?php echo wpsg_drawForm_Input('wpsg_vp_imageselect_width', __('Breite des Vorschaubildes', 'wpsg'), $this->get_option('wpsg_vp_imageselect_width'), array('help' => 'wpsg_vp_imageselect_width')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_vp_imageselect_height', __('Höhe des Vorschaubildes', 'wpsg'), $this->get_option('wpsg_vp_imageselect_height'), array('help' => 'wpsg_vp_imageselect_height')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_vp_imageselect_mode', __('Bild Modus', 'wpsg'), $this->callMod('wpsg_mod_produktbilder', 'getImageModes'), $this->get_option('wpsg_vp_imageselect_mode'), array('help' => 'wpsg_vp_imageselect_mode')); ?>
+<br />
+<?php } ?>
+
+<div class="wpsg_hinweis">
+ <?php echo __('Die direkte Anzeige, zeigt die Bilder direkt an. Es wird dabei für jede Variation ein Bild angezeigt. Bei Selectboxen erfolgt die Anzeige über den Wechsel der Selectbox. ', 'wpsg'); ?>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_varianten/varianten.js b/views/mods/mod_varianten/varianten.js
new file mode 100644
index 0000000..f87c626
--- /dev/null
+++ b/views/mods/mod_varianten/varianten.js
@@ -0,0 +1,58 @@
+
+ var wpsg_vp_vari = new Array();
+
+ function wpsg_vp_switch(product_id, product_index)
+ {
+
+ var var_key = 'vp_' + product_id + "/";
+
+ for (var i = 0; i < wpsg_vp_vari[product_id].length; i ++)
+ {
+
+ var_key += i + "_";
+
+ if (wpsg_vp_vari[product_id][i] == "select")
+ {
+ var_key += jQuery('#wpsg_produktform_' + product_index + ' .wpsg_produkt_' + product_id + " #wpsg_vpfield_" + product_id + "_" + i).val();
+ }
+ else if (wpsg_vp_vari[product_id][i] == "radio")
+ {
+ var_key += jQuery('#wpsg_produktform_' + product_index + ' .wpsg_produkt_' + product_id + ' input[name="wpsg_vp[' + i + ']"]:checked').val();
+ }
+ else if (wpsg_vp_vari[product_id][i] == "checkbox")
+ {
+ var_key += jQuery('#wpsg_produktform_' + product_index + ' .wpsg_produkt_' + product_id + ' input[name="wpsg_vp[' + i + ']"]:checked').length;
+ }
+ else if (wpsg_vp_vari[product_id][i] == "image")
+ {
+ var_key += jQuery('#wpsg_produktform_' + product_index + ' .wpsg_produkt_' + product_id + ' .wpsg_mod_varianten_imageselect_' + i + ' .akt').attr("data-wpsg-id");
+ }
+
+ if (i < (wpsg_vp_vari[product_id].length - 1)) var_key += ":";
+
+ }
+
+ jQuery('#wpsg_produktform_' + product_index).append('<div class="wpsg_product_layer"><img src="' + wpsg_ajax.img_ajaxloading + '" alt="' + wpsg_ajax.label_pleasewait + '" /></div>');
+
+ jQuery.ajax( {
+ 'url': wpsg_ajax.ajaxurl,
+ 'method': 'get',
+ 'data': {
+ 'action': 'wpsg_varianten_switch',
+ 'wpsg_post_id': jQuery('#wpsg_produktform_' + product_index + ' input[name="wpsg_post_id"]').val(),
+ 'quantity': jQuery('#wpsg_menge_' + product_index).val(),
+ 'template': jQuery('#wpsg_produktform_' + product_index + ' input[name="wpsg[template]"]').val(),
+ 'referer': jQuery('#wpsg_produktform_' + product_index + ' input[name="myReferer"]').val(),
+ 'form_data': jQuery('#wpsg_produktform_' + product_index).serialize(),
+ 'product_key': var_key,
+ 'product_index': product_index
+ },
+ 'success': function(data) {
+
+ jQuery('#wpsg_produktform_' + product_index).replaceWith(data);
+
+ }
+ } );
+
+ } // function wpsg_vp_switch(produkt_id)
+ \ No newline at end of file
diff --git a/views/mods/mod_versandarten/list.phtml b/views/mods/mod_versandarten/list.phtml
new file mode 100644
index 0000000..f060014
--- /dev/null
+++ b/views/mods/mod_versandarten/list.phtml
@@ -0,0 +1,248 @@
+<?php
+
+ /**
+ * Template für die Liste der Versandarten
+ */
+
+?>
+<?php if (!is_array($this->view['data']) || sizeof($this->view['data']) <= 0) { ?>
+<?php echo __('Bisher keine Versandarten angelegt.', 'wpsg'); ?>
+<?php } else { ?>
+<table class="va_table">
+ <colgroup>
+ <col class="wpsg_label" />
+ <col class="wpsg_value" />
+ <col class="wpsg_delcol" />
+ </colgroup>
+ <?php $i = 0; foreach ($this->view['data'] as $va) { $i ++; ?>
+ <tr>
+ <td class="wpsg_label"><?php echo __('ID', 'wpsg'); ?>:</td>
+ <td class="wpsg_value"><?php echo $va['id']; ?></td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Versandart löschen', 'wpsg'); ?>" onclick="return wpsg_removeVA(<?php echo $va['id']; ?>);"></a>
+ <?php foreach ($this->view['arVZ'] as $k=>$vz) { $arVzNamen[$k] = $vz['name']; } ?>
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('#va_<?php echo $va['id']; ?>_name').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ va_id: '<?php echo $va['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#va_<?php echo $va['id']; ?>_kosten').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'kosten',
+ va_id: '<?php echo $va['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#va_<?php echo $va['id']; ?>_hint').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'hint',
+ va_id: '<?php echo $va['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#va_<?php echo $va['id']; ?>_typ').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'typ',
+ va_id: '<?php echo $va['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ data : '<?php echo json_encode($this->view['arTypen']); ?>',
+ type : 'select',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#va_<?php echo $va['id']; ?>_vz').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'vz',
+ va_id: '<?php echo $va['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ data : '<?php echo json_encode($arVzNamen) ?>',
+ type : 'select',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ callback: function(data)
+ {
+ location.reload();
+ }
+
+ } );
+
+ jQuery('#va_<?php echo $va['id']; ?>_mwst').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'mwst_key',
+ va_id: '<?php echo $va['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ data: '<?php echo json_encode(wpsg_tax_groups()); ?>',
+ type: 'select',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#va_<?php echo $va['id']; ?>_aktiv').bind('change', function() {
+
+ var value = 0;
+
+ if (jQuery(this).attr("checked") == "checked") value = 1;
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1',
+ data: {
+ field: 'aktiv',
+ va_id: '<?php echo $va['id']; ?>',
+ value: value
+ }
+ } );
+
+ } );
+
+ } );
+
+ </script>
+
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Bezeichnung', 'wpsg'); ?>:</td>
+ <td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_name"><?php echo wpsg_hspc($va['name']); ?></td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name"></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><label for="va_<?php echo $va['id']; ?>_aktiv"><?php echo __('Aktiv', 'wpsg'); ?>:</label></td>
+ <td class="wpsg_value">
+ <input type="checkbox" value="1" <?php echo (($va['aktiv'] === '1')?'checked="checked"':''); ?> id="va_<?php echo $va['id']; ?>_aktiv" />
+ </td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ"></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Hinweistext', 'wpsg'); ?>:</td>
+ <td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_hint" ><?php echo wpsg_hspc($va['hint']); ?></td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint"></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Grundlage', 'wpsg'); ?>:</td>
+ <td id="va_<?php echo $va['id']; ?>_typ" class="wpsg_value wpsg_editable"><?php echo wpsg_hspc($this->view['arTypen'][$va['typ']]); ?></td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_grundlage" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_grundlage"></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Versandzone', 'wpsg'); ?>:</td>
+ <td id="va_<?php echo $va['id']; ?>_vz" class="wpsg_value wpsg_editable">
+ <?php if ($va['vz'] > 0) { ?>
+ <?php echo wpsg_hspc($this->view['arVZ'][$va['vz']]['name']); ?>
+ <?php } else { ?>
+ <?php echo __('Alle Versandzonen', 'wpsg'); ?>
+ <?php } ?>
+ </td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_versandzone" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_versandzone"></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Kostenschlüssel', 'wpsg'); ?>:</td>
+ <td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_kosten"><?php echo wpsg_hspc($va['kosten']); ?></td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_kostenschluessel" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_kostenschluessel"></a>
+ </td>
+ </tr>
+ <?php if (wpsg_isSizedArray($this->view['arVZ'][$va['vz']]['arPLZ'])) { ?>
+ <?php $index = 1; foreach ((array)$this->view['arVZ'][$va['vz']]['arPLZ'] as $plz_key => $plz) { ?>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Kostenschlüssel PLZ', 'wpsg'); ?> [ <?php echo $plz ?> ]:</td>
+ <td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id'] ?>_plz_<?php echo $index ?>"><?php echo wpsg_hspc($va['kosten_plz'][$plz_key]); ?></td>
+ <td class="wpsg_delcol">
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('#va_<?php echo $va['id']; ?>_plz_<?php echo $index ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'kosten_plz',
+ va_id: '<?php echo $va['id']; ?>',
+ key: '<?php echo $index; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ callback: function(data)
+ {
+ //location.reload();
+ }
+ } );
+
+ } );
+
+ </script>
+ </td>
+ </tr>
+ <?php $index++; } ?>
+ <?php } ?>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Steuersatz', 'wpsg'); ?>:</td>
+ <td id="va_<?php echo $va['id']; ?>_mwst" class="wpsg_value wpsg_editable"><?php
+
+ $tax_groups = wpsg_tax_groups();
+ echo wpsg_hspc($tax_groups[$va['mwst_key']]);
+
+ ?></td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst"></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="wpsg_label"><?php echo __('Keine MwSt. wenn Land steuerfrei', 'wpsg'); ?>:</td>
+ <td class="wpsg_value">
+ <input onchange="wpsg_saveVAMwSt(this, <?php echo $va['id']; ?>);" <?php echo (($va['mwst_laender'] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" />
+ </td>
+ <td class="wpsg_delcol">
+ <a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland"></a>
+ </td>
+ </tr>
+ <?php $this->callMods('wpsg_mod_versandarten_listrow', array(&$va)); ?>
+ <?php if ($i < sizeof($this->view['data'])) { ?>
+ <tr class="wpsg_spacer"><td colspan="3"><hr /></td></tr>
+ <?php } ?>
+ <?php } ?>
+</table>
+<?php } ?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_versandarten/settings_edit.phtml b/views/mods/mod_versandarten/settings_edit.phtml
new file mode 100644
index 0000000..bfe95c3
--- /dev/null
+++ b/views/mods/mod_versandarten/settings_edit.phtml
@@ -0,0 +1,100 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Versandarten/Lieferanten Moduls
+ */
+
+?>
+<p>
+ <?php echo __('Mit diesem Modul ist es möglich beliebig viele Lieferanten zu konfigurieren.', 'wpsg'); ?><br />
+ <?php echo __('Unter Lieferanten verstehen wir den Dienstleister, der die Ware zu dem Kunden bringt und dafür die Versandkosten berechnet.', 'wpsg'); ?><br />
+ <?php echo __('Wird ein Wert angegeben, so wird dieser Wert als Pauschale verwendet.', 'wpsg'); ?><br />
+</p>
+<p>
+ <?php echo __('Sollen die Kosten nach Bestellwert, Stückzahl oder Gewicht (Wenn Modul Produktgewicht aktiviert) gestaffelt werden so gilt folgendes Format:15:15,00|10:10,00|5,00. Es ist auch möglich nur einen Wert anzugeben (Bsp. 5,00), so wird generell dieser Wert für diese Versandart berechnet.', 'wpsg'); ?><br />
+ <br />
+ <?php echo __('ab 15 Stück 15,00 EUR Versandkosten', 'wpsg'); ?><br />
+ <?php echo __('ab 10 Stück 10,00 EUR Versandkosten', 'wpsg'); ?><br />
+ <?php echo __('bis 10 Stück 5,00 EUR Versandkosten', 'wpsg'); ?><br />
+ <br />
+ <?php echo __('Bietet man Beispielsweise den Versand als DHL Paket an, so kann man bei Bezeichnung "DHL Paket" eintragen und als Preis z.B. 6,90. Dieser Preis wird dann als Pauschale unabhängig von Stückzahl oder Gesamtgewicht verwendet.', 'wpsg'); ?>
+</p>
+
+<script type="text/javascript">
+
+ /**
+ * Legt eine neue Versandart an und aktualisiert die Liste
+ */
+ function wpsg_addVA()
+ {
+
+ jQuery('#wpsg_va_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&noheader=1&do=add',
+ success: function(data) {
+ jQuery('#wpsg_va_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addVA()
+
+ /**
+ * Speichert die Änderung in der Checkbox der MwSt.
+ */
+ function wpsg_saveVAMwSt(oElement, va_id)
+ {
+
+ if (jQuery(oElement).attr("checked")) value = '1'; else value = '0';
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1',
+ data: {
+ field: 'mwst_laender',
+ va_id: va_id,
+ value: value
+ }
+ } );
+
+ } // function wpsg_saveVAMwSt(oElement, va_id)
+
+ /**
+ * Wird aufgerufen wenn eine Versandart entfernt werden soll
+ */
+ function wpsg_removeVA(va_id)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie die Versandart löschen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_va_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&noheader=1&do=remove&va_id=' + va_id,
+ success: function(data) {
+ jQuery('#wpsg_va_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_removeVA()
+
+</script>
+
+<div class="wpsg_admin_box">
+
+ <div class="head">
+ <div class="title">
+ <div class="fulltab">
+ <?php echo __('Versandarten', 'wpsg'); ?>
+ <a title="<?php echo __('Neue Versandart anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addVA();"></a>
+ </div>
+ </div>
+ </div>
+ <div class="content" id="wpsg_va_list">
+ <?php echo $this->mod->va_list(); ?>
+ </div>
+
+</div>
diff --git a/views/mods/mod_videodownload/cronmail.phtml b/views/mods/mod_videodownload/cronmail.phtml
new file mode 100644
index 0000000..a251438
--- /dev/null
+++ b/views/mods/mod_videodownload/cronmail.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Template für die Mail, die bei erfolgreicher Individualisierung an den Admin gesendet wird
+ */
+
+?>
+<?php echo __('Hallo Administrator,', 'wpsg'); ?>
+
+<?php echo __('Es wurden Videos von folgenden Bestellungen individualisiert:', 'wpsg'); ?>
+
+<?php foreach ($this->view['arOrder'] as $k => $o) { ?>
+<?php echo wpsg_translate(__('Bestellung ##1#: #2# Dateien', 'wpsg'), $o[1]['onr'], $o[0]); ?>
+<?php if ($this->get_option('wpsg_mod_videodownload_autosend') != '1') { ?>
+<?php echo __('Links versenden: ', 'wpsg'); ?><?php echo get_site_url(); ?>?wpsg_action=wpsg_mod_videodownload_send&hash=<?php echo $o[2]; ?>&order=<?php echo $k; ?>
+<?php } ?>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_videodownload/cronmail_html.phtml b/views/mods/mod_videodownload/cronmail_html.phtml
new file mode 100644
index 0000000..8375341
--- /dev/null
+++ b/views/mods/mod_videodownload/cronmail_html.phtml
@@ -0,0 +1,21 @@
+<?php
+
+ /**
+ * Template für die Mail, die bei erfolgreicher Individualisierung an den Admin gesendet wird (HTML)
+ */
+
+?>
+<p><?php echo __('Hallo Administrator,', 'wpsg'); ?></p>
+
+<p><?php echo __('Es wurden Videos von folgenden Bestellungen individualisiert:', 'wpsg'); ?></p>
+
+<ul>
+<?php foreach ($this->view['arOrder'] as $k => $o) { ?>
+ <li>
+ <?php echo wpsg_translate(__('Bestellung ##1#: #2# Dateien', 'wpsg'), $o[1]['onr'], $o[0]); ?>&nbsp;
+ <?php if ($this->get_option('wpsg_mod_videodownload_autosend') != '1') { ?>
+ <a href="<?php echo get_site_url(); ?>?wpsg_action=wpsg_mod_videodownload_send&hash=<?php echo $o[2]; ?>&order=<?php echo $k; ?>"><?php echo __('Links versenden', 'wpsg'); ?></a>
+ <?php } ?>
+ </li>
+<?php } ?>
+</ul> \ No newline at end of file
diff --git a/views/mods/mod_videodownload/filelist.phtml b/views/mods/mod_videodownload/filelist.phtml
new file mode 100644
index 0000000..9655918
--- /dev/null
+++ b/views/mods/mod_videodownload/filelist.phtml
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Template für die Liste der Dateien im Backend
+ */
+
+?>
+<?php if (!wpsg_isSizedArray($this->view['files'])) { ?>
+<p><?php echo __('Bisher keine Videos hochgeladen.', 'wpsg'); ?></p>
+<?php } else { ?>
+ <?php foreach ($this->view['files'] as $v) { ?>
+ <div class="wpsg_mod_videodownload_file">
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_videodownload&noheader=1&cmd=download_file&file=<?php echo rawurlencode($v); ?>&edit_id=<?php echo $_REQUEST['edit_id']; ?>" title="<?php echo wpsg_hspc($v); ?>"><?php echo wpsg_hspc(substr($v, 0, 25)); ?></a>
+ (<?php echo wpsg_formatSize($this->callMod('wpsg_mod_videodownload', 'getVideoPath', array($_REQUEST['edit_id'])).'/'.$v); ?>)
+ <div class="wpsg_mod_videodownload_admin_delete" title="<?php echo __('Video löschen', 'wpsg'); ?>" onclick="return wpsg_videodownload_removeVideo('<?php echo rawurlencode($v); ?>');"></div>
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php } ?>
+ <br />
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_videodownload/fonts/Default.ttf b/views/mods/mod_videodownload/fonts/Default.ttf
new file mode 100644
index 0000000..067b898
--- /dev/null
+++ b/views/mods/mod_videodownload/fonts/Default.ttf
Binary files differ
diff --git a/views/mods/mod_videodownload/order_view_sidebar.phtml b/views/mods/mod_videodownload/order_view_sidebar.phtml
new file mode 100644
index 0000000..21df96a
--- /dev/null
+++ b/views/mods/mod_videodownload/order_view_sidebar.phtml
@@ -0,0 +1,110 @@
+<?php
+
+ /**
+ * Template für die Integration des Videodownload Moduls in die Bestellverwaltung
+ * Sollte nicht verändert werden
+ */
+
+?>
+<script type="text/javascript">
+/* <![CDATA[ */
+
+ function wpsg_mod_videodownload_schedule(file)
+ {
+
+ jQuery('#wpsg_mod_videodownload_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_videodownload&edit_id=<?php echo $this->view['order_id']; ?>&noheader=1&cmd=schedule_file&file=' + file,
+ success: function(data) {
+ jQuery('#wpsg_mod_videodownload_target').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_videodownload_schedule(file)
+
+ function wpsg_mod_videodownload_reindiv()
+ {
+
+ jQuery('#wpsg_mod_videodownload_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_videodownload&edit_id=<?php echo $this->view['order_id']; ?>&noheader=1&cmd=reindiv',
+ success: function(data) {
+
+ jQuery('#wpsg_mod_videodownload_target').html(data);
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_videodownload_reindiv()
+
+ function wpsg_mod_videodownload_reset()
+ {
+
+ jQuery('#wpsg_mod_videodownload_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_videodownload&edit_id=<?php echo $this->view['order_id']; ?>&noheader=1&cmd=reset',
+ success: function(data) {
+
+ jQuery('#wpsg_mod_videodownload_target').html(data);
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_videodownload_reset()
+
+ function wpsg_mod_videodownload_send()
+ {
+
+ jQuery('#wpsg_mod_videodownload_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_videodownload&edit_id=<?php echo $this->view['order_id']; ?>&noheader=1&cmd=send_files',
+ success: function(data) {
+
+ jQuery('#wpsg_mod_videodownload_target').html(data);
+ wpsg_reloadOrderLog();
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_videodownload_send()
+
+ function wpsg_mod_videodownload_cangelschedule(file)
+ {
+
+ jQuery('#wpsg_mod_videodownload_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_videodownload&edit_id=<?php echo $this->view['order_id']; ?>&noheader=1&cmd=cancelschedule_file&file=' + file,
+ success: function(data) {
+ jQuery('#wpsg_mod_videodownload_target').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_videodownload_cangelschedule(file)
+
+/* ]]> */
+</script>
+
+<div class="postbox" id="wpsg_videodownloadbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Videoprodukte', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside" id="wpsg_mod_videodownload_target">
+ <?php echo $this->callMod('wpsg_mod_videodownload', 'order_view_sidebar_renderList', array($this->view['order_id'])); ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_videodownload/order_view_sidebar_renderlist.phtml b/views/mods/mod_videodownload/order_view_sidebar_renderlist.phtml
new file mode 100644
index 0000000..4d87285
--- /dev/null
+++ b/views/mods/mod_videodownload/order_view_sidebar_renderlist.phtml
@@ -0,0 +1,59 @@
+<?php
+
+ /**
+ * Template für die Liste der Produkte innerhalb der Bestellansicht, wird per Ajax neu geladen
+ */
+
+?>
+<?php if (wpsg_isSizedArray($this->view['messages'])) { ?>
+<?php foreach ($this->view['messages'] as $m) { ?>
+<div class="updated"><p><?php echo wpsg_hspc($m); ?></p></div>
+<?php } ?>
+<?php } ?>
+<?php if (wpsg_isSizedArray($this->view['errors'])) { ?>
+<?php foreach ($this->view['errors'] as $e) { ?>
+<div class="error"><p><?php echo wpsg_hspc($e); ?></p></div>
+<?php } ?>
+<?php } ?>
+<table class="wpsg_mod_videodownload_order_view_filelist">
+ <tr>
+ <th class="col_file"><?php echo __('Datei', 'wpsg'); ?></th>
+ <th class="col_status"><?php echo __('Status', 'wpsg'); ?></th>
+ <th class="col_counter">#</th>
+ <th class="col_action"></th>
+ </tr>
+ <?php foreach ($this->view['arFiles'] as $f) { ?>
+ <tr class="<?php echo (($f[1] !== false && $f[1]['raid'] === true)?'row_raid':''); ?>">
+ <td class="col_file">
+ <?php if ($f[1] !== false && strtotime($f[1]['done']) > 0) { ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_videodownload&cmd=download_indivfile&edit_id=<?php echo $f[1]['o_id']; ?>&file=<?php echo rawurlencode($f[1]['out_file']); ?>&noheader=1">
+ <?php } ?>
+ <?php echo wpsg_hspc(substr($this->callMod('wpsg_mod_videodownload', 'getNewName', array($f[0], $_REQUEST['edit_id'])), 0, 25)); ?>
+ <?php if ($f[1] !== false && strtotime($f[1]['done']) > 0) { ?>
+ </a>
+ <?php } ?>
+ </td>
+ <td class="col_status">
+ <?php if ($f[1] === false) { ?>
+ <?php echo __('Noch nicht geplant.', 'wpsg'); ?>
+ <?php } else if (strtotime($f[1]['scheduled']) > 0 && strtotime($f[1]['done']) <= 0) { ?>
+ <?php echo wpsg_translate(__('Geplant am #1#', 'wpsg'), wpsg_fromDate($f[1]['scheduled'])); ?>
+ <?php } else if (strtotime($f[1]['done']) > 0) { ?>
+ <?php echo wpsg_translate(__('Durchgeführt am #1#', 'wpsg'), wpsg_fromDate($f[1]['done'])); ?>
+ <?php } ?>
+ </td>
+ <td class="col_counter"><?php echo (($f[1] !== false)?$f[1]['counter']:'0'); ?></td>
+ <td class="col_action">
+ <?php if ($f[1] === false) { ?>
+ <a href="#" onclick="return wpsg_mod_videodownload_schedule('<?php echo rawurldecode($f[0]); ?>');"><?php echo __('Planen', 'wpsg'); ?></a>
+ <?php } else if (strtotime($f[1]['scheduled']) > 0 && strtotime($f[1]['done']) <= 0) { ?>
+ <a href="#" onclick="return wpsg_mod_videodownload_cangelschedule('<?php echo rawurldecode($f[0]); ?>');"><?php echo __('Abbrechen', 'wpsg'); ?></a>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+</table>
+<br />
+<input type="button" onclick="return wpsg_mod_videodownload_send();" value="<?php echo __('Fertige Downloads an Kunden senden', 'wpsg'); ?>" /><br />
+<input type="button" onclick="return wpsg_mod_videodownload_reindiv();" value="<?php echo __('Alle Dokumente neu planen', 'wpsg'); ?>" />
+<input type="button" onclick="return wpsg_mod_videodownload_reset();" value="<?php echo __('Zähler zurücksetzen', 'wpsg'); ?>" /> \ No newline at end of file
diff --git a/views/mods/mod_videodownload/produkt_edit_sidebar.phtml b/views/mods/mod_videodownload/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..741f9aa
--- /dev/null
+++ b/views/mods/mod_videodownload/produkt_edit_sidebar.phtml
@@ -0,0 +1,96 @@
+<?php
+
+ /**
+ * Template für die Integration des Uploadformulars im rechten Bereich
+ * Sollte nicht verändert werden
+ */
+
+?>
+<script type="text/javascript">
+/* <![CDATA[ */
+
+ function wpsg_videodownload_removeVideo(file)
+ {
+
+ if (!confirm('<?php echo __('Sind sie sich sicher, dass sie die Datei löschen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_mod_videodownload_files').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_videodownload&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1&cmd=delete_file&file=' + file,
+ success: function(response) {
+
+ if (response == '1')
+ {
+ jQuery("#wpsg_mod_videodownload_files").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_videodownload&cmd=videofiles_list&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1");
+ }
+ else
+ {
+
+ alert(response);
+ jQuery("#wpsg_mod_videodownload_files").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_videodownload&cmd=videofiles_list&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1");
+
+ }
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_videodownload_removeVideo($video)
+
+ jQuery(document).ready(function() {
+
+ new AjaxUpload(
+ "wpsg_mod_videodownload_upload", {
+ name: "videofiles",
+ action: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_videodownload&edit_id=<?php echo $this->view['data']['id'] ?>&noheader=1&cmd=upload_file",
+ onSubmit: function(file, extension) {
+
+ jQuery('#wpsg_mod_videodownload_files').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ },
+ onComplete: function(file, response) {
+
+ if (response == '1')
+ {
+ jQuery("#wpsg_mod_videodownload_files").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_videodownload&cmd=videofiles_list&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1");
+ }
+ else
+ {
+
+ alert(response);
+ jQuery("#wpsg_mod_videodownload_files").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_videodownload&cmd=videofiles_list&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1");
+
+ }
+ }
+ }
+ );
+ });
+
+/* ]]> */
+</script>
+
+<div id="wpsg_videodownload" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Videoprodukt', 'wpsg'); ?> </span>
+ </h3>
+ <div class="inside">
+ <div id="wpsg_mod_videodownload_files"><?php echo $this->view['filesList']; ?></div>
+ <input value="<?php echo __("Upload", "wpsg"); ?>" type="text" style="text-align:center;" size="10" id="wpsg_mod_videodownload_upload" />
+ <div class="wpsg_clear"></div><br />
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left" style="width:75px;">
+ <label for="feinheit"><?php echo __('FTP Pfad', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <a href="#" onclick="alert('<?php echo addslashes($this->callMod('wpsg_mod_videodownload', 'getVideoPath', array($this->view['data']['id'], true))); ?>'); return false;"><?php echo __('Anzeigen', 'wpsg'); ?></a>
+ </p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+ <div class="clear"></div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_videodownload/settings_edit.phtml b/views/mods/mod_videodownload/settings_edit.phtml
new file mode 100644
index 0000000..384a249
--- /dev/null
+++ b/views/mods/mod_videodownload/settings_edit.phtml
@@ -0,0 +1,188 @@
+<?php
+
+ /**
+ * Template für die Einstellungsseite des Videodownloadproduktmoduls
+ */
+
+?>
+<br />
+<div class="wpsg_admin_box" id="wpsg_tab">
+ <div class="head">
+ <div class="title">
+ <div class="tab" id="tab1"><?php echo __('Einstellungen', 'wpsg'); ?></div>
+ <div class="tab" id="tab2"><?php echo __('Textfelder', 'wpsg'); ?></div>
+ <div class="tab tabright tabright-last" id="tab3"><?php echo __('Info', 'wpsg'); ?></div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+ <div class="content">
+
+ <div id="tabcontent1" class="tabcontent">
+ <?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_command', __('Programmaufruf', 'wpsg'), $this->get_option('wpsg_mod_videodownload_command'), array('help' => 'mod_videodownload_einstellungen_programmaufruf')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_infocommand', __('Programmaufruf (ffmpeg -i)', 'wpsg'), $this->get_option('wpsg_mod_videodownload_infocommand'), array('help' => 'mod_videodownload_einstellungen_programminfoaufruf')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_filename', __('Personalisierter Dateiname', 'wpsg'), $this->get_option('wpsg_mod_videodownload_filename'), array('help' => 'mod_videodownload_einstellungen_filename')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_videodownload_indiv_mode', __('Individualisierung planen', 'wpsg'), array(0 => __('Manuell', 'wpsg'), 1 => __('Nach Zahlung', 'wpsg'), 2 => __('Nach Bestellung', 'wpsg')), $this->get_option('wpsg_mod_videodownload_indiv_mode'), array('help' => 'mod_videodownload_einstellungen_individualisierungsmodus')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_videodownload_autosend', __('Videos nach Individualisierung sofort senden', 'wpsg'), $this->get_option('wpsg_mod_videodownload_autosend'), array('help' => 'mod_videodownload_einstellungen_autosend')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_videodownload_accepted', __('Gültigkeit von Links', 'wpsg'), array(0 => __('Unbegrenzt', 'wpsg'), 1 => __('Nach Downloads', 'wpsg'), 2 => __('Nach Tagen', 'wpsg')), $this->get_option('wpsg_mod_videodownload_accepted'), array('help' => 'mod_videodownload_einstellungen_accepted')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_days', __('Gültigkeit in Tagen', 'wpsg'), $this->get_option('wpsg_mod_videodownload_days')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_downloads', __('Anzahl an möglichen Downloads', 'wpsg'), $this->get_option('wpsg_mod_videodownload_downloads')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_videodownload_cleanraiddownloads', __('Abgelaufene Downloads bereinigen', 'wpsg'), $this->get_option('wpsg_mod_videodownload_cleanraiddownloads')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_cleanolddownloads', __('Downloads nach X Tagen löschen', 'wpsg'), $this->get_option('wpsg_mod_videodownload_cleanolddownloads')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_videopath', __('Pfad für die Videos der Produkte', 'wpsg'), $this->get_option('wpsg_mod_videodownload_videopath'), array('hint' => __('Standard: uploads/wpsg_videoprodukte/', 'wpsg'))); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_videoindivpath', __('Pfad für die Individualisierten Videos', 'wpsg'), $this->get_option('wpsg_mod_videodownload_videoindivpath'), array('hint' => __('Standard: uploads/wpsg_videoprodukte_order/', 'wpsg'))); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_videodownload_format', __('Auslieferungsformat', 'wpsg'), array(0 => __('Direkt', 'wpsg'), 1 => __('Gezippt (intern)', 'wpsg'), 2 => __('Gezippt (extern)', 'wpsg')), $this->get_option('wpsg_mod_videodownload_format')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_fontpath', __('Pfad für die weitere Schriftarten', 'wpsg'), $this->get_option('wpsg_mod_videodownload_fontpath'), array('hint' => __('Standard: user_views/mods/mod_videodownload/fonts/', 'wpsg'))); ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Mail für Individualisierungsbericht', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p><?php echo wpsg_translate(__('Kann <a href="#1#">hier</a> konfiguriert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#videodownloadcronmail'); ?></p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Mail für Downloads an Kunden', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p><?php echo wpsg_translate(__('Kann <a href="#1#">hier</a> konfiguriert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#videodownloadfiles'); ?></p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Letzte Ausführung des Crons', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p><?php echo (($this->get_option('wpsg_lastCron') > 0)?wpsg_formatTimestamp($this->get_option('wpsg_lastCron')):__('Noch nicht ausgeführt', 'wpsg')); ?></p>
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_videodownload_einstellungen_cron" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_videodownload_einstellungen_cron"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+
+ <div id="tabcontent2" class="tabcontent">
+
+ <table class="wpsg_mod_videodownload_fieldtable">
+ <tr>
+ <th class="col_bezeichnung"></th>
+ <th class="col_font"><?php echo __('Schriftart', 'wpsg'); ?></th>
+ <th class="col_x"><?php echo __('X', 'wpsg'); ?></th>
+ <th class="col_y"><?php echo __('Y', 'wpsg'); ?></th>
+ <th class="col_align"><?php echo __('Zentriert', 'wpsg'); ?></th>
+ <th class="col_color"><?php echo __('Farbe', 'wpsg'); ?></th>
+ <th class="col_alpha"><?php echo __('Opaque', 'wpsg'); ?></th>
+ <th class="col_angle"><?php echo __('Winkel', 'wpsg'); ?></th>
+ <th class="col_groesse"><?php echo __('Größe', 'wpsg'); ?></th>
+ <th class="col_action"></th>
+ </tr>
+ <?php for ($i = 0; $i < 5; $i ++) { ?>
+ <tr>
+ <td><?php echo '#'.($i + 1); ?></td>
+ <td class="col_font">
+ <?php if (!wpsg_isSizedArray($this->view['arFonts'])) { ?>
+ <span class="wpsg_error"><?php echo __('Keine Fonts!', 'wpsg'); ?></span>
+ <?php } else { ?>
+ <select name="text[<?php echo $i; ?>][font]">
+ <?php foreach ($this->view['arFonts'] as $font) { ?>
+ <option value="<?php echo rawurlencode($font); ?>" <?php echo ((rawurlencode($font) === $this->view['arTexte'][$i]['font'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($font); ?></option>
+ <?php } ?>
+ </select>
+ <?php } ?>
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][x]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['x']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][y]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['y']); ?>" />
+ </td>
+ <td class="col_align">
+ <input type="hidden" name="text[<?php echo $i; ?>][align]" value="0" />
+ <input type="checkbox" name="text[<?php echo $i; ?>][align]" value="1" <?php echo (($this->view['arTexte'][$i]['align'] == '1')?'checked="checked"':''); ?> />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][color]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['color']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][alpha]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['alpha']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][angle]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['angle']); ?>" />
+ </td>
+ <td>
+ <select name="text[<?php echo $i; ?>][fontsize]" style="width:100%;">
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "8")?'selected="selected"':''); ?> value="8">8</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "9")?'selected="selected"':''); ?> value="9">9</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "10")?'selected="selected"':''); ?> value="10">10</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "11")?'selected="selected"':''); ?> value="11">11</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "12")?'selected="selected"':''); ?> value="12">12</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "13")?'selected="selected"':''); ?> value="13">13</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "14")?'selected="selected"':''); ?> value="14">14</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "16")?'selected="selected"':''); ?> value="16">16</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "18")?'selected="selected"':''); ?> value="18">18</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "20")?'selected="selected"':''); ?> value="20">20</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "22")?'selected="selected"':''); ?> value="22">22</option>
+ <option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "24")?'selected="selected"':''); ?> value="24">24</option>
+ </select>
+ </td>
+ <td>
+ <label><input type="checkbox" value="1" name="text[<?php echo $i; ?>][aktiv]" <?php echo (($this->view['arTexte'][$i]['aktiv'] == 1)?'checked="checked"':''); ?> />&nbsp;<?php echo __("Aktiv", "wpsg"); ?></label>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_videodownload_fieldconfig" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_videodownload_fieldconfig"></a>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="col_freitext_label"><?php echo __('Freitext', 'wpsg'); ?>:</td>
+ <td colspan="8" class="col_freitext">
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][text]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['text']); ?>" />
+ </td>
+ </tr>
+ <?php } ?>
+ </table>
+
+ </div>
+
+ <div id="tabcontent3" class="tabcontent">
+
+ <p><?php echo __('Mit dem Videodownload Modul ist es möglich Videos zu verkaufen die pro Bestellung individuell angepasst werden.', 'wpsg'); ?>
+
+ </div>
+
+ </div>
+</div>
+
+<script type="text/javascript">
+
+ function wpsg_mod_videodownload_switchAccepted()
+ {
+
+ if (jQuery('#wpsg_mod_videodownload_accepted').val() == '1')
+ jQuery('#wpsg_mod_videodownload_downloads').parent().parent().show();
+ else
+ jQuery('#wpsg_mod_videodownload_downloads').parent().parent().hide();
+
+ if (jQuery('#wpsg_mod_videodownload_accepted').val() == '2')
+ jQuery('#wpsg_mod_videodownload_days').parent().parent().show();
+ else
+ jQuery('#wpsg_mod_videodownload_days').parent().parent().hide();
+
+ } // function wpsg_mod_videodownload_switchAccepted()
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ jQuery('#wpsg_mod_videodownload_accepted').bind('change', function() { wpsg_mod_videodownload_switchAccepted(); } );
+
+ wpsg_mod_videodownload_switchAccepted();
+
+ jQuery('#wpsg_tab').wpsg_tab( {
+ 'cookiename': 'wpsg_videodownload_tab',
+ 'tab2': function() {
+ jQuery('.tablink').show();
+ }
+ } );
+ } );
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_videodownload/videodownloadmail.phtml b/views/mods/mod_videodownload/videodownloadmail.phtml
new file mode 100644
index 0000000..e0d6d88
--- /dev/null
+++ b/views/mods/mod_videodownload/videodownloadmail.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Mail, die die Videodownloads an den Kunden sendet
+ */
+
+?>
+<?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?>
+
+<?php echo __('hiermit erhalt Sie die Downloadlinks für Ihre gekauften Videos:', 'wpsg'); ?>
+
+<?php foreach ($this->view['arVideos'] as $v) { ?>
+<?php echo $v['out_file']; ?>: <?php echo site_url(); ?>?wpsg_action=wpsg_mod_videodownload_download&hash=<?php echo $v['hash']; ?>&indi=<?php echo $v['id']; ?>
+<?php } ?>
+
+<?php echo __("Mit freundlichen Grüßen", "wpsg"); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_videodownload/videodownloadmail_html.phtml b/views/mods/mod_videodownload/videodownloadmail_html.phtml
new file mode 100644
index 0000000..7f5ddb2
--- /dev/null
+++ b/views/mods/mod_videodownload/videodownloadmail_html.phtml
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Mail, die die Videodownloads an den Kunden sendet (HTML)
+ */
+
+?>
+<p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?></p>
+
+<p><?php echo __('hiermit erhalt Sie die Downloadlinks für Ihre gekauften Videos:', 'wpsg'); ?></p>
+
+<ul>
+ <?php foreach ($this->view['arVideos'] as $v) { ?>
+ <li><?php echo $v['out_file']; ?>:&nbsp;<a href="<?php echo site_url(); ?>?wpsg_action=wpsg_mod_videodownload_download&hash=<?php echo $v['hash']; ?>&indi=<?php echo $v['id']; ?>"><?php echo __('Download', 'wpsg'); ?></a></li>
+ <?php } ?>
+</ul>
+
+<p><?php echo __("Mit freundlichen Grüßen", "wpsg"); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_voucherproduct/gutschein_mail.phtml b/views/mods/mod_voucherproduct/gutschein_mail.phtml
new file mode 100644
index 0000000..0e56beb
--- /dev/null
+++ b/views/mods/mod_voucherproduct/gutschein_mail.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Template für die Mail, der die gekauften Gutscheine versendet
+ */
+
+?>
+<?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['customer']['vname'], $this->view['customer']['name']); ?>
+
+<?php echo __('hiermit erhalt Sie ihre gekauften Gutscheine.', 'wpsg'); ?>
+
+<?php foreach ($this->view['arGS'] as $gs) { ?>
+<?php echo $gs['product_data']['name']; ?>: <?php echo $gs['code']; ?>
+<?php } ?>
+
+<?php echo __("Mit freundlichen Grüßen", "wpsg"); ?>
+
+<?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> \ No newline at end of file
diff --git a/views/mods/mod_voucherproduct/gutschein_mail_html.phtml b/views/mods/mod_voucherproduct/gutschein_mail_html.phtml
new file mode 100644
index 0000000..c05679f
--- /dev/null
+++ b/views/mods/mod_voucherproduct/gutschein_mail_html.phtml
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Template für die Mail, der die gekauften Gutscheine versendet (HTML)
+ */
+
+?>
+<p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['customer']['vname'], $this->view['customer']['name']); ?></p>
+
+<p><?php echo __('hiermit erhalt Sie ihre gekauften Gutscheine.', 'wpsg'); ?></p>
+
+<ul>
+ <?php foreach ($this->view['arGS'] as $gs) { ?>
+ <li><?php echo $gs['product_data']['name']; ?>: <?php echo $gs['code']; ?></li>
+ <?php } ?>
+</ul>
+
+<p><?php echo __("Mit freundlichen Grüßen", "wpsg"); ?></p>
+
+<p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> \ No newline at end of file
diff --git a/views/mods/mod_voucherproduct/order_view_sidebar.phtml b/views/mods/mod_voucherproduct/order_view_sidebar.phtml
new file mode 100644
index 0000000..82991b3
--- /dev/null
+++ b/views/mods/mod_voucherproduct/order_view_sidebar.phtml
@@ -0,0 +1,195 @@
+<?php
+
+ /**
+ * Template für die Integration des Gutscheinprodukt Moduls in die Bestellverwaltung
+ */
+
+?>
+<div id="wpsg_mod_voucher_createDialog" style="display:none;" class="wpsg_dialog">
+ <div class="wpsg_dialog_content">
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_value', __('Wert', 'wpsg'), ''); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_calc', __('Berechnung', 'wpsg'), array(
+ 'w' => __('Absoluter Betrag', 'wpsg'),
+ 'p' => __('Prozentual', 'wpsg')
+ ), 'w'); ?>
+ <?php echo wpsg_drawForm_Date('wpsg_mod_gutschein_start', __('Gültig ab', 'wpsg'), ''); ?>
+ <?php echo wpsg_drawForm_Date('wpsg_mod_gutschein_end', __('Gültig bis', 'wpsg'), ''); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_gutschein_nodoc', __('Kein Dokument generieren', 'wpsg'), ''); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_gutschein_comment', __('Kommentar', 'wpsg'), ''); ?>
+
+ <p class="wpsg_hinweis">
+ <?php echo __('Beachten Sie das keine Produktspezifischen Platzhalter ersetzt werden!', 'wpsg'); ?>
+ </p>
+
+ <p class="submit">
+ <input type="button" onclick="return wpsg_mod_voucher_save();" value="<?php echo __('Gutschein anlegen', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
+ </p>
+
+ </div>
+</div>
+
+<script type="text/javascript">
+/* <![CDATA[ */
+
+ /**
+ * Setzt die Felder in dem Gutscheindialog zurück
+ */
+ function wpsg_mod_voucher_reset()
+ {
+
+ jQuery('#wpsg_mod_voucher_createDialog input[type=text]').val('');
+ jQuery('#wpsg_mod_voucher_createDialog input[type=checkbox]').attr('checked', false);
+ jQuery('#wpsg_mod_voucher_createDialog textarea').val('');
+ jQuery('#wpsg_mod_voucher_createDialog select').prop('selectedIndex', 0);
+
+ var jetzt = new Date();
+
+ var nMonat = jetzt.getMonth() + 1; var strMonat = nMonat;
+ if (nMonat < 10) var strMonat = "0" + strMonat;
+
+ var nTag = jetzt.getDate(); var strTag = nTag;
+ if (nTag < 10) var strTag = "0" + strTag;
+
+ var nJahr = jetzt.getFullYear(); var strJahr = nJahr;
+
+ var nHour = jetzt.getHours(); var strHour = nHour;
+ if (nHour < 10) var strHour = "0" + strHour;
+
+ var nMinutes = jetzt.getMinutes(); var strMinutes = nMinutes;
+ if (nMinutes < 10) var strMinutes = "0" + strMinutes;
+
+ // Gültig von
+ jQuery('#wpsg_mod_gutschein_start .wpsg_month').val(strMonat);
+ jQuery('#wpsg_mod_gutschein_start .wpsg_day').val(strTag);
+ jQuery('#wpsg_mod_gutschein_start .wpsg_year').val(strJahr);
+ jQuery('#wpsg_mod_gutschein_start .wpsg_hour').val(strHour);
+ jQuery('#wpsg_mod_gutschein_start .wpsg_minute').val(strMinutes);
+
+ // Gültig bis
+ strJahr = nJahr + 1;
+
+ jQuery('#wpsg_mod_gutschein_end .wpsg_month').val(strMonat);
+ jQuery('#wpsg_mod_gutschein_end .wpsg_day').val(strTag);
+ jQuery('#wpsg_mod_gutschein_end .wpsg_year').val(strJahr);
+ jQuery('#wpsg_mod_gutschein_end .wpsg_hour').val(strHour);
+ jQuery('#wpsg_mod_gutschein_end .wpsg_minute').val(strMinutes);
+
+ } // function wpsg_mod_voucher_reset()
+
+ /**
+ * Generiert einen Gutschein
+ */
+ function wpsg_mod_voucher_greate()
+ {
+
+ wpsg_mod_voucher_reset();
+
+ jQuery('#wpsg_mod_voucher_createDialog').dialog( {
+ 'modal': true,
+ 'dialogClass': 'wp-dialog',
+ 'width': 600,
+ 'height': 410,
+ 'title': '<?php echo __('Gutschein generieren', 'wpsg'); ?>'
+ } );
+
+ return false;
+
+ } // function wpsg_mod_voucher_greate()
+
+ /**
+ * Wird vom Dialog aufgerufen wenn der Gutschein gespeichert werden soll
+ */
+ function wpsg_mod_voucher_save()
+ {
+
+ if (jQuery('#wpsg_mod_gutschein_value').val().trim() == '')
+ {
+
+ alert('<?php echo __('Bitte einen Wert angeben!', 'wpsg'); ?>'); return;
+
+ }
+
+ jQuery('#wpsg_voucherproduct_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery('#wpsg_mod_voucher_createDialog').dialog('destroy');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_voucherproduct&order_id=<?php echo $this->view['wpsg_mod_voucherproduct']['order_id']; ?>&noheader=1&cmd=create',
+ data: {
+ 'gs_value': jQuery('#wpsg_mod_gutschein_value').val(),
+ 'gs_calc': jQuery('#wpsg_mod_gutschein_calc').val(),
+ 'wpsg_mod_gutschein_start[m]': jQuery('#wpsg_mod_gutschein_start .wpsg_month').val(),
+ 'wpsg_mod_gutschein_start[d]': jQuery('#wpsg_mod_gutschein_start .wpsg_day').val(),
+ 'wpsg_mod_gutschein_start[Y]': jQuery('#wpsg_mod_gutschein_start .wpsg_year').val(),
+ 'wpsg_mod_gutschein_start[H]': jQuery('#wpsg_mod_gutschein_start .wpsg_hour').val(),
+ 'wpsg_mod_gutschein_start[i]': jQuery('#wpsg_mod_gutschein_start .wpsg_minute').val(),
+ 'wpsg_mod_gutschein_end[m]': jQuery('#wpsg_mod_gutschein_end .wpsg_month').val(),
+ 'wpsg_mod_gutschein_end[d]': jQuery('#wpsg_mod_gutschein_end .wpsg_day').val(),
+ 'wpsg_mod_gutschein_end[Y]': jQuery('#wpsg_mod_gutschein_end .wpsg_year').val(),
+ 'wpsg_mod_gutschein_end[H]': jQuery('#wpsg_mod_gutschein_end .wpsg_hour').val(),
+ 'wpsg_mod_gutschein_end[i]': jQuery('#wpsg_mod_gutschein_end .wpsg_minute').val(),
+ 'gs_comment': jQuery('#wpsg_mod_gutschein_comment').val(),
+ 'gs_nodoc': ((jQuery('#wpsg_mod_gutschein_nodoc').attr("checked") == 'checked')?'1':'0')
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_voucherproduct_target').html(data);
+
+ }
+ } );
+
+ } // function wpsg_mod_voucher_save()
+
+ /**
+ * Läd die Informationen über die Gutscheine neu
+ */
+ function wpsg_mod_voucher_reload()
+ {
+
+ jQuery('#wpsg_voucherproduct_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_voucherproduct&order_id=<?php echo $this->view['wpsg_mod_voucherproduct']['order_id']; ?>&noheader=1&cmd=content',
+ success: function(data) {
+ jQuery('#wpsg_voucherproduct_target').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_voucher_reload()
+
+ /**
+ * Sendet die Gutscheine an den Kunden
+ */
+ function wpsg_mod_voucher_send()
+ {
+
+ if (!confirm('<?php echo __('Die Gutscheine werden per Mail an den Kunden gesendet, sind Sie sich sicher?', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_voucherproduct_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_voucherproduct&order_id=<?php echo $this->view['wpsg_mod_voucherproduct']['order_id']; ?>&noheader=1&cmd=sendVoucher',
+ success: function(data) {
+ jQuery('#wpsg_voucherproduct_target').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_voucher_send()
+
+/* ]]> */
+</script>
+
+<div class="postbox" id="wpsg_voucherproduct">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Gutscheine', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside" id="wpsg_voucherproduct_target">
+ <?php echo $this->callMod('wpsg_mod_voucherproduct', 'order_view_sidebar_content', array($this->view['wpsg_mod_voucherproduct']['order_id'])); ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_voucherproduct/order_view_sidebar_content.phtml b/views/mods/mod_voucherproduct/order_view_sidebar_content.phtml
new file mode 100644
index 0000000..69ab3a2
--- /dev/null
+++ b/views/mods/mod_voucherproduct/order_view_sidebar_content.phtml
@@ -0,0 +1,38 @@
+<?php
+
+ /**
+ * Template für die Ausgabe des Gutscheinproduktmoduls innerhalb der Bestellverwaltung
+ */
+
+?>
+<?php echo $this->writeBackendMessage(); ?>
+
+<?php if (wpsg_isSizedArray($this->view['wpsg_mod_voucherproduct']['data'])) { ?>
+<div class="wpsg_mod_voucherproduct_list">
+ <?php foreach ($this->view['wpsg_mod_voucherproduct']['data'] as $d) { ?>
+ <div class="wpsg_mod_voucherproduct_code">
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&amp;wpsg_search=<?php echo $d['code']; ?>"><?php echo wpsg_hspc($d['code']); ?></a>
+ <?php if ($this->callMod('wpsg_mod_voucherproduct', 'hasFile', array($this->view['wpsg_mod_voucherproduct']['order_id'], $d['id']))) { ?>
+ &nbsp;/&nbsp;<a target="_blank" href="<?php echo $this->callMod('wpsg_mod_voucherproduct', 'getBackendDownloadURL', array($this->view['wpsg_mod_voucherproduct']['order_id'], $d['id'])); ?>"><?php echo __('Download', 'wpsg'); ?></a>
+ <?php } ?>
+ <?php if ($d['calc_typ'] == 'w') { ?>
+ &nbsp;(<?php echo wpsg_ff($d['value'], $this->get_option('wpsg_currency'))?>)
+ <?php } else if ($d['calc_typ'] == 'p') { ?>
+ &nbsp;(<?php echo wpsg_ff($d['value'], '%')?>)
+ <?php } ?>
+ </div>
+ <div class="wpsg_mod_voucherproduct_status"><?php echo wpsg_hspc($d['status']); ?></div>
+ <div class="wpsg_clear"></div>
+ <?php } ?>
+</div>
+<br />
+<input onclick="return wpsg_mod_voucher_send();" type="button" class="wpsg_button" value="<?php echo __('Gutscheine versenden', 'wpsg'); ?>" />
+<?php } else { ?>
+<p><?php echo __('Noch keine Gutscheine für diese Bestellung generiert.', 'wpsg'); ?></p>
+<?php if ($this->callMod('wpsg_mod_voucherproduct', 'hasVocherProducts', array($this->view['wpsg_mod_voucherproduct']['order_id']))) { ?>
+<p class="wpsg_hinweis"><?php echo __('Gutscheine aus Gutscheinprodukten werden beim Wechsel auf "Zahlung aktzeptiert" generiert.', 'wpsg'); ?>
+<?php } ?>
+<br /><br />
+<?php } ?>
+<?php /*<input onclick="return wpsg_mod_voucher_greate();" type="button" class="wpsg_button" value="<?php echo __('Neuen Gutschein generieren', 'wpsg'); ?>" />*/ ?>
+<div class="wpsg_clear"></div> \ No newline at end of file
diff --git a/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml b/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml
new file mode 100644
index 0000000..5fd79b0
--- /dev/null
+++ b/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Gutscheinproduktes innerhalb der Produktverwaltung
+ */
+
+?>
+<div id="wpsg_voucherproduct" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></span>
+ <span><?php echo __('Gutscheinprodukt', 'wpsg'); ?> </span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_voucherproduct_gs', __('Gutschein generieren', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_gs']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_gslaenge', __('Länge des Gutscheincodes', 'wpsg'), (($this->view['data']['wpsg_mod_voucherproduct_gslaenge'] > 0)?$this->view['data']['wpsg_mod_voucherproduct_gslaenge']:10)); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_available', __('Gültigkeit (Tage)', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_available']); ?>
+ </div>
+</div>
diff --git a/views/mods/mod_voucherproduct/settings_edit.phtml b/views/mods/mod_voucherproduct/settings_edit.phtml
new file mode 100644
index 0000000..d32b42b
--- /dev/null
+++ b/views/mods/mod_voucherproduct/settings_edit.phtml
@@ -0,0 +1,173 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Gutscheinprodukt Moduls
+ */
+
+?>
+<?php if (!$this->hasMod('wpsg_mod_gutschein')) { ?>
+<p class="wpsg_error"><?php echo __('Bitte aktivieren Sie das Gutscheinmodul, damit dieses Modul korrekt funktioniert!', 'wpsg'); ?></p>
+<?php } ?>
+<div class="wpsg_admin_box" id="wpsg_tab">
+ <div class="head">
+ <div class="title">
+ <div class="tab" id="tab1"><?php echo __('Einstellungen', 'wpsg'); ?></div>
+ <div class="tab" id="tab2"><?php echo __('Textfelder', 'wpsg'); ?></div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+ <div class="content">
+
+ <div id="tabcontent1" class="tabcontent">
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Briefpapier (PDF/JPG)', 'wpsg'); ?>:</label><br />
+ <?php if (isset($this->view['bp']) && $this->view['bp'] !== false) { ?>
+ <label>
+ <input type="checkbox" name="wpsg_mod_voucherproduct_bp_del" value="1" />&nbsp;<?php echo __('Löschen', 'wpsg'); ?>
+ </label>
+ <?php } ?>
+ </div>
+ <div class="wpsg_form_right">
+ <?php if (!isset($this->view['bp']) || $this->view['bp'] === false) { ?>
+ <p><?php echo __('Es wurde bisher kein Briefpapier hochgeladen', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <a href="<?php echo $this->view['bp']; ?>" target="_blank"><?php echo __('Derzeitiges Briefpapier', 'wpsg'); ?></a>
+ <?php } ?>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_voucherproduct_paper" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_voucherproduct_paper"></a>
+ <input type="file" name="wpsg_mod_voucherproduct_bp">
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php echo wpsg_drawForm_Input('wpsg_voucherproduct_width', __('Breite des PDFs in mm', 'wpsg'), $this->get_option('wpsg_voucherproduct_width'), array ('help' => 'wpsg_voucherproduct_width')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_voucherproduct_height', __('Höhe des PDFs in mm', 'wpsg'), $this->get_option('wpsg_voucherproduct_height'), array ('help' => 'wpsg_voucherproduct_height')); ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label><?php echo __('Gutscheinmail an Kunden', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p><?php echo wpsg_translate(__('Kann <a href="#1#">hier</a> konfiguriert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#gutscheinproductmail'); ?>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_voucherproduct_mail" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_voucherproduct_mail"></a></p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ </div>
+
+ <div id="tabcontent2" class="tabcontent">
+ <table class="wpsg_mod_downloadplus_fieldtable">
+ <tr>
+ <th class="col_bezeichnung"></th>
+ <th class="col_x"><?php echo __('X', 'wpsg'); ?></th>
+ <th class="col_y"><?php echo __('Y', 'wpsg'); ?></th>
+ <th class="col_align"><?php echo __('Zentriert', 'wpsg'); ?></th>
+ <th class="col_bg"><?php echo __('Hintergrund', 'wpsg'); ?></th>
+ <th class="col_color"><?php echo __('Farbe', 'wpsg'); ?></th>
+ <th class="col_alpha"><?php echo __('Opaque', 'wpsg'); ?></th>
+ <th class="col_angle"><?php echo __('Winkel', 'wpsg'); ?></th>
+ <th class="col_groesse"><?php echo __('Größe', 'wpsg'); ?></th>
+ <th class="col_action"></th>
+ </tr>
+ <?php for ($i = 0; $i < 10; $i ++) { ?>
+ <tr>
+ <td><?php echo '#'.($i + 1); ?></td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][x]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['arTexte'][$i]['x'])); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][y]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['arTexte'][$i]['y'])); ?>" />
+ </td>
+ <td class="col_align">
+ <input type="hidden" name="text[<?php echo $i; ?>][align]" value="0" />
+ <input type="checkbox" name="text[<?php echo $i; ?>][align]" value="1" <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['align']))?'checked="checked"':''); ?> />
+ </td>
+ <td class="col_bg">
+ <input type="hidden" name="text[<?php echo $i; ?>][bg]" value="0" />
+ <input type="checkbox" name="text[<?php echo $i; ?>][bg]" value="1" <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['bg']))?'checked="checked"':''); ?> />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][color]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['arTexte'][$i]['color'])); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][alpha]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['arTexte'][$i]['alpha'])); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][angle]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['arTexte'][$i]['angle'])); ?>" />
+ </td>
+ <td>
+ <select name="text[<?php echo $i; ?>][fontsize]" style="width:100%;">
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 4))?'selected="selected"':''); ?> value="4">4</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 5))?'selected="selected"':''); ?> value="5">5</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 6))?'selected="selected"':''); ?> value="6">6</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 7))?'selected="selected"':''); ?> value="7">7</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 8))?'selected="selected"':''); ?> value="8">8</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 9))?'selected="selected"':''); ?> value="9">9</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 10))?'selected="selected"':''); ?> value="10">10</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 11))?'selected="selected"':''); ?> value="11">11</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 12))?'selected="selected"':''); ?> value="12">12</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 13))?'selected="selected"':''); ?> value="13">13</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 14))?'selected="selected"':''); ?> value="14">14</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 16))?'selected="selected"':''); ?> value="16">16</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 18))?'selected="selected"':''); ?> value="18">18</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 20))?'selected="selected"':''); ?> value="20">20</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 22))?'selected="selected"':''); ?> value="22">22</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 24))?'selected="selected"':''); ?> value="24">24</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 26))?'selected="selected"':''); ?> value="26">26</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 28))?'selected="selected"':''); ?> value="28">28</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 30))?'selected="selected"':''); ?> value="30">30</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 32))?'selected="selected"':''); ?> value="32">32</option>
+ <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 34))?'selected="selected"':''); ?> value="34">34</option>
+ </select>
+ </td>
+ <td>
+ <label><input type="checkbox" value="1" name="text[<?php echo $i; ?>][aktiv]" <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['aktiv']))?'checked="checked"':''); ?> />&nbsp;<?php echo __("Aktiv", "wpsg"); ?></label>
+ <a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_pdfdownload_fieldconfig" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_pdfdownload_fieldconfig"></a>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="col_freitext_label"><?php echo __('Freitext', 'wpsg'); ?>:</td>
+ <td colspan="8" class="col_freitext">
+ <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][text]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['arTexte'][$i]['text'])); ?>" />
+ </td>
+ </tr>
+ <?php } ?>
+ </table>
+
+ <input type="hidden" name="" id="wpsg-PreviewSubmit" />
+
+ <br />
+ <input type="submit" name="submit" onclick="wpsg_showPreview(); return false;" class="button" value="<?php echo __('Speichern und Vorschau anzeigen', 'wpsg'); ?>" />
+ <br /><br />
+
+ </div>
+ </div>
+</div>
+
+<script type="text/javascript">
+
+ function wpsg_showPreview()
+ {
+
+ jQuery('form[name="form1"]').attr('target', 'voucherprview');
+ jQuery('#wpsg-PreviewSubmit').attr('name', 'submit-preview');
+
+ jQuery('input[name="submit"]:last').click();
+
+ jQuery('#wpsg-PreviewSubmit').attr('name', '');
+ jQuery('form[name="form1"]').attr('target', '');
+
+ } // function wpsg_showPreview()
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_tab').wpsg_tab( {
+ 'cookiename': 'wpsg_pdfdownload_tab',
+ 'tab2': function() {
+ jQuery('.tablink').show();
+ }
+ } );
+
+ } );
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_voucherproduct/voucher_pdf.phtml b/views/mods/mod_voucherproduct/voucher_pdf.phtml
new file mode 100644
index 0000000..ba94ab1
--- /dev/null
+++ b/views/mods/mod_voucherproduct/voucher_pdf.phtml
@@ -0,0 +1,104 @@
+<?php
+
+ /**
+ * Template für den PDF Gutschein
+ */
+
+ require_once WPSG_PATH_LIB.'fpdf/fpdf.php';
+ require_once WPSG_PATH_LIB.'fpdf/fpdi.php';
+ require_once WPSG_PATH_LIB.'wpsg_fpdf.class.php';
+
+ if ($this->get_option('wpsg_voucherproduct_width') > $this->get_option('wpsg_voucherproduct_height'))
+ {
+ $pageMode = 'L';
+ }
+ else
+ {
+ $pageMode = 'P';
+ }
+
+ $pdf = new wpsg_fpdf($pageMode, 'mm', array($this->get_option('wpsg_voucherproduct_width'), $this->get_option('wpsg_voucherproduct_height')));
+
+ $pdf->SetAutoPageBreak(true, 5);
+ $pdf->AddPage();
+
+ foreach ($this->view['texte'] as $t)
+ {
+
+ if ($t['bg'] == '1' && $t['aktiv'] == '1')
+ {
+
+ $t['text'] = $this->replaceUniversalPlatzhalter($t['text'], $this->view['order_id'], false, false, $this->view['product_id'], $this->view['customReplace'], $this->view['product_index']);
+
+ if ($t['alpha'] > 0) $pdf->setAlpha($t['alpha']);
+
+ list($r, $g, $b) = wpsg_getColor($t["color"]);
+ $pdf->SetTextColor($r, $g, $b);
+
+ $pdf->SetFont('Arial', '', $t['fontsize']);
+ $pdf->RotatedText(
+ $t['x'], $t['y'],
+ $t['text'],
+ $t['angle'],
+ $t['align']
+ );
+
+ $pdf->setAlpha(1);
+
+ }
+
+ }
+
+ if (isset($this->view['bp_pdf']) && file_exists($this->view['bp_pdf']))
+ {
+
+ $pagecount = $pdf->setSourceFile($this->view['bp_pdf']);
+ $tplidx = $pdf->importPage(1, '/MediaBox');
+ $pdf->useTemplate($tplidx, 0, 0, $this->get_option('wpsg_voucherproduct_width'), $this->get_option('wpsg_voucherproduct_height'));
+
+ }
+ else if (isset($this->view['bp_jpg']) && file_exists($this->view['bp_jpg']))
+ {
+ $pdf->image($this->view['bp_jpg'], 0, 0, $this->get_option('wpsg_voucherproduct_width'), $this->get_option('wpsg_voucherproduct_height'), 'jpg');
+ }
+
+ foreach ($this->view['texte'] as $t)
+ {
+
+ if ($t['aktiv'] == '1')
+ {
+
+ $t['text'] = $this->replaceUniversalPlatzhalter($t['text'], $this->view['order_id'], false, false, $this->view['product_id'], $this->view['customReplace'], $this->view['product_index']);
+
+ if ($t['alpha'] > 0) $pdf->setAlpha($t['alpha']);
+
+ $pdf->SetFont('Arial', '', $t['fontsize']);
+ $pdf->SetTextColor($t["color"]);
+
+ $pdf->RotatedText(
+ $t['x'], $t['y'],
+ $t['text'],
+ $t['angle'],
+ $t['align']
+ );
+
+ $pdf->setAlpha(1);
+
+ }
+
+ }
+
+ if ($this->view['preview'] !== true)
+ {
+
+ $pdf->Output($this->view['filename'], 'F');
+
+ }
+ else
+ {
+
+ $pdf->Output($this->view['filename'], 'I');
+ die();
+ }
+
+?> \ No newline at end of file
diff --git a/views/mods/mod_weight/basket_row.phtml b/views/mods/mod_weight/basket_row.phtml
new file mode 100644
index 0000000..f8739c4
--- /dev/null
+++ b/views/mods/mod_weight/basket_row.phtml
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Template für die Anzeige des Produktgewichts im Warenkorb
+ */
+ //wpsg_debug($this->view);
+?>
+<tr class="wpsg_<?php echo (($this->view['i'] % 2 == 0)?'odd':'even'); ?>">
+ <td colspan="1"><?php echo __('Gewicht', 'wpsg'); ?>:</td>
+ <td class="wpsg_cell_weight_value" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'3':'2'); ?>">
+ <?php echo wpsg_ff($this->view['weight'], $this->get_option('wpsg_mod_weight_unit')); ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_weight/basket_row_end.phtml b/views/mods/mod_weight/basket_row_end.phtml
new file mode 100644
index 0000000..97da5bf
--- /dev/null
+++ b/views/mods/mod_weight/basket_row_end.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Template für die Anzeige des Gesamtgewichts innerhalb des Warenkorbs
+ */
+
+?>
+<tr class="wpsg_row_weight wpsg_row_small">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_weight_label">
+ <?php echo __('Gesamtgewicht', 'wpsg'); ?>:
+ </td>
+ <td class="wpsg_cell_weight_value">
+ <?php echo wpsg_ff($this->view['wpsg_mod_weight']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_weight/overview_row.phtml b/views/mods/mod_weight/overview_row.phtml
new file mode 100644
index 0000000..921f387
--- /dev/null
+++ b/views/mods/mod_weight/overview_row.phtml
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Template für die Integration des Produktgewichts in die Bestellzusammenfassung
+ */
+
+?>
+<tr class="wpsg_<?php echo (($this->view['i'] % 2 == 0)?'odd':'even'); ?>">
+ <td ><?php echo __('Gewicht', 'wpsg'); ?>:</td>
+ <td colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'2':'1'); ?>" class="wpsg_cell_weight_value">
+ <?php echo wpsg_ff($this->view['weight'], $this->get_option('wpsg_mod_weight_unit')); ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_weight/overview_row_end.phtml b/views/mods/mod_weight/overview_row_end.phtml
new file mode 100644
index 0000000..12da77e
--- /dev/null
+++ b/views/mods/mod_weight/overview_row_end.phtml
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Template für die Integration des Produktgewichts in die Bestellzusammenfassung
+ */
+
+?>
+<tr class="wpsg_row_weight wpsg_row_small">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_weight_label">
+ <?php echo __('Gesamtgewicht', 'wpsg'); ?>:
+ </td>
+ <td class="wpsg_cell_weight_value">
+ <?php echo wpsg_ff($this->view['wpsg_mod_weight']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?>
+ </td>
+</tr> \ No newline at end of file
diff --git a/views/mods/mod_weight/produkt_edit_allgemein.phtml b/views/mods/mod_weight/produkt_edit_allgemein.phtml
new file mode 100644
index 0000000..76f9271
--- /dev/null
+++ b/views/mods/mod_weight/produkt_edit_allgemein.phtml
@@ -0,0 +1,8 @@
+<?php
+
+ /**
+ * Template für die Integration des Produktgewichts in die Produktverwaltung
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_weight[weight]', __('Produktgewicht', 'wpsg'), wpsg_ff($this->view['wpsg_mod_weight']['weight']), array('unit' => $this->get_option('wpsg_mod_weight_unit'))); ?> \ No newline at end of file
diff --git a/views/mods/mod_weight/settings_edit.phtml b/views/mods/mod_weight/settings_edit.phtml
new file mode 100644
index 0000000..7a3fbc9
--- /dev/null
+++ b/views/mods/mod_weight/settings_edit.phtml
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Gewichtsmoduls
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_weight_unit', __('Gewichtseinheit', 'wpsg'), $this->get_option('wpsg_mod_weight_unit'), array('help' => 'wpsg_mod_weight_unit')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showProduct', __('Im Produkt anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showProduct'), array('help' => 'wpsg_mod_weight_showProduct')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showBasket', __('Im Warenkorb anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showBasket'), array('help' => 'wpsg_mod_weight_showBasket')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showBasketProduct', __('Im Warenkorb im Produkt anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showBasketProduct'), array('help' => 'wpsg_mod_weight_showBasketProduct')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showOverview', __('In Zusammenfassung anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showOverview'), array('help' => 'wpsg_mod_weight_showOverview')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showOverviewProduct', __('In Zusammenfassung im Produkt anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showOverviewProduct'), array('help' => 'wpsg_mod_weight_showOverviewProduct')); ?>
+<?php if ($this->hasMod('wpsg_mod_productindex')) { ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showProductindex', __('Auf Produktübersichtsseiten anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showProductindex'), array('help' => 'wpsg_mod_weight_showProductindex')); ?>
+<?php } ?>
+<?php if ($this->hasMod('wpsg_mod_request')) { ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showRequestPage', __('Auf Anfrageseite anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showRequestPage'), array('help' => 'wpsg_mod_weight_showRequestPage')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showRequestPageProduct', __('Auf Anfrageseite im Produkt anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showRequestPageProduct'), array('help' => 'wpsg_mod_weight_showRequestPageProduct')); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_willcollect/mail.phtml b/views/mods/mod_willcollect/mail.phtml
new file mode 100644
index 0000000..8c1804e
--- /dev/null
+++ b/views/mods/mod_willcollect/mail.phtml
@@ -0,0 +1,14 @@
+<?php
+
+ /**
+ * Dieses Template integriert die Adresse bei der Zahlungsart "Selbstabholung" in die Mail
+ */
+
+?>
+
+<?php echo __('Bitte vereinbaren Sie mit uns einen Termin an dem Sie die Ware abholen.', 'wpsg'); ?>
+
+<?php echo wpsg_pad_right(__('Abholadresse', 'wpsg').':', 35); ?><?php echo $this->view['wpsg_mod_willcollect']['adress']; ?>
+<?php echo wpsg_pad_right('', 35); ?><?php echo $this->view['wpsg_mod_willcollect']['street']; ?>
+<?php echo wpsg_pad_right('', 35); ?><?php echo $this->view['wpsg_mod_willcollect']['plzort']; ?>
+ \ No newline at end of file
diff --git a/views/mods/mod_willcollect/mail_html.phtml b/views/mods/mod_willcollect/mail_html.phtml
new file mode 100644
index 0000000..ec7500f
--- /dev/null
+++ b/views/mods/mod_willcollect/mail_html.phtml
@@ -0,0 +1,22 @@
+<?php
+
+ /**
+ * Dieses Template integriert die Adresse bei der Zahlungsart "Selbstabholung" in die Mail
+ */
+
+?>
+<p>
+ <?php echo __('Bitte vereinbaren Sie mit uns einen Termin an dem Sie die Ware abholen.', 'wpsg'); ?>
+</p>
+
+<table style="width:100%;">
+ <tr>
+ <td style="vertical-align:top; padding-right:15px;"><?php echo __('Abholadresse', 'wpsg'); ?></td>
+ <td style="">
+ <?php echo $this->view['wpsg_mod_willcollect']['adress']; ?><br />
+ <?php echo $this->view['wpsg_mod_willcollect']['street']; ?><br />
+ <?php echo $this->view['wpsg_mod_willcollect']['plzort']; ?>
+ </td>
+ </tr>
+</table>
+ \ No newline at end of file
diff --git a/views/mods/mod_willcollect/settings_edit.phtml b/views/mods/mod_willcollect/settings_edit.phtml
new file mode 100644
index 0000000..1a5fd1b
--- /dev/null
+++ b/views/mods/mod_willcollect/settings_edit.phtml
@@ -0,0 +1,24 @@
+<?php
+
+ /**
+ * Template für die Einstellungen der Versandart "Selbstabholung"
+ */
+
+?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_willcollect_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_willcollect_aktiv'), array('help' => 'wpsg_mod_willcollect_aktiv')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_willcollect_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_willcollect_bezeichnung'), array('help' => 'wpsg_mod_willcollect_bezeichnung')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_willcollect_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_willcollect_hint'), array('help' => 'wpsg_mod_willcollect_hint')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_willcollect_paymentneed', __('Selbstabholung erfordert Barzahlung', 'wpsg'), $this->get_option('wpsg_mod_willcollect_paymentneed'), array('help' => 'wpsg_mod_willcollect_paymentneed')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_willcollect_adress', __('Anschrift', 'wpsg'), $this->get_option('wpsg_mod_willcollect_adress'), array('help' => 'wpsg_mod_willcollect_adress')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_willcollect_street', __('Straße', 'wpsg'), $this->get_option('wpsg_mod_willcollect_street'), array('help' => 'wpsg_mod_willcollect_street')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_willcollect_plzort', __('PLZ/Ort', 'wpsg'), $this->get_option('wpsg_mod_willcollect_plzort'), array('help' => 'wpsg_mod_willcollect_plzort')); ?>
+<br />
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_willcollect_payment', __('Zahlungsart "Barzahlung" aktivieren', 'wpsg'), $this->get_option('wpsg_mod_willcollect_payment'), array('help' => 'wpsg_mod_willcollect_payment')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_willcollect_payment_bezeichnung', __('Bezeichung der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_willcollect_payment_bezeichnung'), array('help' => 'wpsg_mod_willcollect_payment_bezeichnung')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_willcollect_payment_hint', __('Hinweistext der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_willcollect_payment_hint'), array('help' => 'wpsg_mod_willcollect_payment_hint')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_willcollect_gebuehr', __('Gebühr/Rabatt (Versandart)', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_willcollect_gebuehr'), true), array('help' => 'wpsg_mod_willcollect_gebuehr','unit' => $this->get_option('wpsg_currency').' / %')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_willcollect_payment_gebuehr', __('Gebühr/Rabatt (Zahlungsart)', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_willcollect_payment_gebuehr'), true), array('help' => 'wpsg_mod_willcollect_payment_gebuehr','unit' => $this->get_option('wpsg_currency').' / %')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_willcollect_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_willcollect_mwst'), array('help' => 'wpsg_mod_willcollect_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_willcollect_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_willcollect_mwstland'), array('help' => 'wpsg_mod_willcollect_mwstland')); ?> \ No newline at end of file
diff --git a/views/mods/mod_willcollect/shippinghint.phtml b/views/mods/mod_willcollect/shippinghint.phtml
new file mode 100644
index 0000000..c6369b6
--- /dev/null
+++ b/views/mods/mod_willcollect/shippinghint.phtml
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Template für die Erweiterung des Hinweistextes bei der Versandart. Es wird standardmäßig die Zieladresse aus dem Backend dort noch einmal angezeigt
+ */
+
+?>
+<?php echo __('Die Ware kann dann an folgender Adresse abgeholt werden:', 'wpsg'); ?><br /><br />
+<span class="wpsg_mod_willcollect_adress">
+<?php echo wpsg_hspc($this->view['wpsg_mod_willcollect']['adress']); ?><br />
+<?php echo wpsg_hspc($this->view['wpsg_mod_willcollect']['street']); ?><br />
+<?php echo wpsg_hspc($this->view['wpsg_mod_willcollect']['plzort']); ?>
+</span> \ No newline at end of file
diff --git a/views/mods/mod_wirecard/gfx/logo_100x25.png b/views/mods/mod_wirecard/gfx/logo_100x25.png
new file mode 100644
index 0000000..a18276d
--- /dev/null
+++ b/views/mods/mod_wirecard/gfx/logo_100x25.png
Binary files differ
diff --git a/views/mods/mod_wirecard/gfx/wirecard.png b/views/mods/mod_wirecard/gfx/wirecard.png
new file mode 100644
index 0000000..b668410
--- /dev/null
+++ b/views/mods/mod_wirecard/gfx/wirecard.png
Binary files differ
diff --git a/views/mods/mod_wirecard/order_done.phtml b/views/mods/mod_wirecard/order_done.phtml
new file mode 100644
index 0000000..f8869eb
--- /dev/null
+++ b/views/mods/mod_wirecard/order_done.phtml
@@ -0,0 +1,35 @@
+<?php
+
+ /**
+ * Template für die Integration von wirecard in die Bestellabschlußseite
+ */
+
+?>
+<?php if ($this->get_option('wpsg_mod_wirecard_mode') == '0') { ?>
+
+<iframe id="wpsg_mod_wirecard_iframe" src="<?php echo $this->view['wpsg_mod_wirecard']['redirectUrl']; ?>"></iframe>
+
+<?php } else if ($this->get_option('wpsg_mod_wirecard_mode') == '1') { ?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wirecard_openPopup()
+ {
+
+ wirecard_popup = window.open('<?php echo $this->view['wpsg_mod_wirecard']['redirectUrl']; ?>', '<?php echo __('Zahlung mit wirecard', 'wpsg'); ?>', 'width=600,height=600,resizable=yes');
+
+ }
+
+ jQuery(document).ready(function() { wirecard_openPopup(); } );
+
+/* ]]> */</script>
+
+<?php echo __('Sollte sich kein Fenster für die Zahlung öffnen liegt dies möglicherweise an Ihrem PopUp Blocker. Klicken sie <a href="#" onclick="wirecard_openPopup(); return false">hier</a> um das Fenster erneut zu öffnen.', 'wpsg'); ?>
+
+<?php } else if ($this->get_option('wpsg_mod_wirecard_mode') == '2') { ?>
+
+<a href="<?php echo $this->view['wpsg_mod_wirecard']['redirectUrl']; ?>">
+ <img src="<?php echo $this->arPayment[12]['logo']; ?>" alt="<?php echo __('Zahlung mit wirecard starten.', 'wpsg'); ?>" />
+</a>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_wirecard/paymenthint.phtml b/views/mods/mod_wirecard/paymenthint.phtml
new file mode 100644
index 0000000..7d5b912
--- /dev/null
+++ b/views/mods/mod_wirecard/paymenthint.phtml
@@ -0,0 +1,14 @@
+<div class="wpsg_mod_wirecard_hint">
+ <?php echo __($this->get_option('wpsg_mod_wirecard_hint'), 'wpsg'); ?>
+ <?php if (wpsg_isSizedArray($this->view['wpsg_mod_wirecard']['arPaymentTypes']) && sizeof($this->view['wpsg_mod_wirecard']['arPaymentTypes']) > 1) { ?>
+ <br /><br />
+ <label for="wpsg_mod_wirecard_paymentType"><?php echo __('Zahlungsart', 'wpsg'); ?>:</label>
+ <select name="wpsg_mod_wirecard_paymentType" class="wpsg_mod_wirecard_paymentType">
+ <?php foreach ($this->view['wpsg_mod_wirecard']['arPaymentTypes'] as $payment_key => $payment_name) { ?>
+ <option <?php echo (($this->view['wpsg_mod_wirecard']['paymentTypeSet'] == $payment_key)?'selected="selected"':''); ?> value="<?php echo $payment_key; ?>"><?php echo $payment_name; ?></option>
+ <?php } ?>
+ </select><br />
+ <?php } else { ?>
+ <input type="hidden" name="wpsg_mod_wirecard_paymentType" value="<?php $arTypeKeys = array_keys($this->view['wpsg_mod_wirecard']['arPaymentTypes']); echo $arTypeKeys[0]; ?>" />
+ <?php } ?>
+</div>
diff --git a/views/mods/mod_wirecard/settings_edit.phtml b/views/mods/mod_wirecard/settings_edit.phtml
new file mode 100644
index 0000000..302e279
--- /dev/null
+++ b/views/mods/mod_wirecard/settings_edit.phtml
@@ -0,0 +1,125 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Moduls "wirecard"
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_wirecard_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_wirecard_name'), array('help' => 'wpsg_shippay_name')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_wirecard_activ', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_wirecard_activ'), array('help' => 'wpsg_shippay_activ')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_wirecard_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_wirecard_hint'), array('help' => 'wpsg_shippay_hint')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_wirecard_logo', __('Logo URL', 'wpsg'), $this->get_option('wpsg_mod_wirecard_logo'), array('help' => 'wpsg_mod_wirecard_logo', 'hint' => __('Auflösung: 95x65 Pixel (GIF/JPG/PNG)', 'wpsg'))); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_wirecard_customerid', __('Kunden ID', 'wpsg'), $this->get_option('wpsg_mod_wirecard_customerid'), array('help' => 'wpsg_mod_wirecard_customerid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_wirecard_shopid', __('Shop ID', 'wpsg'), $this->get_option('wpsg_mod_wirecard_shopid'), array('help' => 'wpsg_mod_wirecard_shopid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_wirecard_secret', __('Geheimer Schlüssel', 'wpsg'), $this->get_option('wpsg_mod_wirecard_secret'), array('help' => 'wpsg_mod_wirecard_secret')); ?>
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_wirecard_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_wirecard_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_wirecard_mwst"><?php echo __('Steuersatz', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <select id="wpsg_mod_wirecard_mwst" name="wpsg_mod_wirecard_mwst">
+ <option value="0"><?php echo __('anteilig', 'wpsg'); ?></option>
+ <?php foreach ($this->view['mwst'] as $mwst) { ?>
+ <option value="<?php echo $mwst['id']; ?>" <?php echo (($mwst['id'] == $this->get_option('wpsg_mod_wirecard_mwst'))?'selected="selected"':''); ?>><?php echo wpsg_ff($mwst['value']).'%'; ?></option>
+ <?php } ?>
+ </select>
+ <a href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst" class="wpsg_form_help"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_wirecard_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_wirecard_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_wirecard_currency', __('Währung', 'wpsg'), array(
+ 'EUR' => __('Euro', 'wpsg'),
+ 'CHF' => __('Schweizer Franken', 'wpsg'),
+ 'GBP' => __('Pfund Sterling', 'wpsg'),
+ 'USD' => __('US Dollar', 'wpsg')
+), $this->get_option('wpsg_mod_wirecard_currency'), array('help' => 'wpsg_mod_wirecard_currency')); ?>
+<br />
+
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_mod_wirecard_paymenttype"><?php echo __('Verfügbare Zahlungsarten', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <ul class="wpsg_mod_wirecard_paymenttypeselect">
+ <?php foreach ($this->view['paymentTypes'] as $pt_key => $pt) { ?>
+ <li>
+ <input type="hidden" name="wpsg_mod_wirecard_paymentorder[]" value="<?php echo wpsg_hspc($pt_key); ?>" />
+ <input type="checkbox" value="<?php echo wpsg_hspc($pt_key); ?>" <?php echo ((in_array($pt_key, (array)explode(',', $this->get_option('wpsg_mod_wirecard_paymenttype'))))?'checked="checked"':''); ?> name="wpsg_mod_wirecard_paymenttype[]" />&nbsp;<?php echo wpsg_hspc($pt); ?>
+ </li>
+ <?php } ?>
+ </ul>
+ <p class="wpsg_hinweis"><?php echo __('Reihenfolge kann mittels Drag&Drop verändert werden.', 'wpsg'); ?></p>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_wirecard_submitadress', __('Adressdaten an wirecard übermitteln?', 'wpsg'), $this->get_option('wpsg_mod_wirecard_submitadress'), array('help' => 'wpsg_mod_wirecard_submitadress')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_wirecard_minValue', __('Minimaler Betrag bei Rechnungskauf', 'wpsg'), $this->get_option('wpsg_mod_wirecard_minValue'), array('help' => 'wpsg_mod_wirecard_minValue')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_wirecard_maxValue', __('Maximaler Betrag bei Rechnungskauf', 'wpsg'), $this->get_option('wpsg_mod_wirecard_maxValue'), array('help' => 'wpsg_mod_wirecard_maxValue')); ?>
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_wirecard_language', __('Sprache innerhalb wirecard', 'wpsg'), array(
+ 'auto' => __('Automatisch', 'wpsg'),
+ 'de' => __('Deutsch', 'wpsg'),
+ 'en' => __('Englisch', 'wpsg'),
+ 'fr' => __('Französisch', 'wpsg')
+), $this->get_option('wpsg_mod_wirecard_language')); ?>
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_wirecard_subject', __('Bestellbeschreibung', 'wpsg'), $this->get_option('wpsg_mod_wirecard_subject'), array('help' => 'wpsg_mod_wirecard_subject')); ?>
+
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_wirecard_success', __('Erfolgsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_wirecard_success')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_wirecard_cancel', __('Seite bei Abbruch', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_wirecard_cancel')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_wirecard_error', __('Fehlerseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_wirecard_error')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_page_mod_wirecard_pending', __('Seite bei keinem Ergebnis', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_mod_wirecard_pending')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_wirecard_mode', __('Integrationsmodus', 'wpsg'), array('0' => __('IFrame', 'wpsg'), '1' => __('Popup', 'wpsg'), '2' => __('Weiterleitung', 'wpsg')), $this->get_option('wpsg_mod_wirecard_mode'), array('help' => 'wpsg_mod_wirecard_mode')); ?>
+<div id="wpsg_mod_wirecard_mode_2" style="display:none;">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_wirecard_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_wirecard_autostart'), array('help' => 'wpsg_shippay_paystart')); ?>
+</div>
+<br />
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery(".wpsg_mod_wirecard_paymenttypeselect").sortable().disableSelection();
+
+ jQuery('#wpsg_mod_wirecard_paymenttype').bind('change', function() {
+
+ if (jQuery(this).val() == "1")
+ {
+
+ jQuery('.wpsg_mod_wirecard_paymentselect_0').show();
+
+ }
+ else
+ {
+
+ jQuery('.wpsg_mod_wirecard_paymentselect_0').hide();
+
+ }
+
+ } ).change();
+
+ jQuery('#wpsg_mod_wirecard_mode').bind('change', function() {
+
+ if (jQuery(this).val() == "2")
+ {
+
+ jQuery('#wpsg_mod_wirecard_mode_2').show();
+
+ }
+ else
+ {
+
+ jQuery('#wpsg_mod_wirecard_mode_2').hide();
+
+ }
+
+ } ).change();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file