summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/admin/access.phtml95
-rw-r--r--views/admin/blognetzwerk.phtml48
-rw-r--r--views/admin/customerpreset.phtml43
-rw-r--r--views/admin/debugInfo.phtml16
-rw-r--r--views/admin/deinstall.phtml80
-rw-r--r--views/admin/emailconf.phtml132
-rw-r--r--views/admin/extended.phtml62
-rw-r--r--views/admin/hilfe.phtml86
-rw-r--r--views/admin/includes.phtml50
-rw-r--r--views/admin/index.phtml43
-rw-r--r--views/admin/kalkulation.phtml91
-rw-r--r--views/admin/konfiguration.phtml167
-rw-r--r--views/admin/kundendaten.phtml88
-rw-r--r--views/admin/kundendaten_codeinfo.phtml26
-rw-r--r--views/admin/kundendaten_renderfield.phtml25
-rw-r--r--views/admin/kundendaten_tab1.phtml146
-rw-r--r--views/admin/kundendaten_tab2.phtml117
-rw-r--r--views/admin/laender.phtml244
-rw-r--r--views/admin/laender_edit.phtml29
-rw-r--r--views/admin/loadsavesettings.phtml48
-rw-r--r--views/admin/migratemwst.phtml62
-rw-r--r--views/admin/module.phtml137
-rw-r--r--views/admin/musterwiderruf.pdf.phtml60
-rw-r--r--views/admin/news.phtml42
-rw-r--r--views/admin/path.phtml37
-rw-r--r--views/admin/presentation.phtml50
-rw-r--r--views/admin/seiten.phtml41
-rw-r--r--views/admin/shopdata.phtml60
-rw-r--r--views/admin/ueber.phtml72
-rw-r--r--views/admin/versandzonen.phtml130
-rw-r--r--views/admin/versandzonen_list.phtml89
-rw-r--r--views/admin/widerrufsbelehrung.phtml73
-rw-r--r--views/css/admin.css681
-rw-r--r--views/css/frontend.css335
-rw-r--r--views/css/tooltip.css121
-rw-r--r--views/css/validationEngine.jquery.css247
-rw-r--r--views/gfx/action_save.gifbin0 -> 279 bytes
-rw-r--r--views/gfx/add.pngbin0 -> 733 bytes
-rw-r--r--views/gfx/ajax-loader.gifbin0 -> 723 bytes
-rw-r--r--views/gfx/arrow_left.pngbin0 -> 345 bytes
-rw-r--r--views/gfx/arrow_refresh_small.pngbin0 -> 506 bytes
-rw-r--r--views/gfx/arrow_right.pngbin0 -> 3031 bytes
-rw-r--r--views/gfx/banner_300x100.pngbin0 -> 16083 bytes
-rw-r--r--views/gfx/basket.pngbin0 -> 3399 bytes
-rw-r--r--views/gfx/basket_add.pngbin0 -> 797 bytes
-rw-r--r--views/gfx/basket_go.pngbin0 -> 814 bytes
-rw-r--r--views/gfx/basket_select.pngbin0 -> 766 bytes
-rw-r--r--views/gfx/bg_wpsg_produkt_additional_information.gifbin0 -> 1113 bytes
-rw-r--r--views/gfx/billsafe.pngbin0 -> 4838 bytes
-rw-r--r--views/gfx/bin.pngbin0 -> 476 bytes
-rw-r--r--views/gfx/bin_x.pngbin0 -> 655 bytes
-rw-r--r--views/gfx/cab.pngbin0 -> 9533 bytes
-rw-r--r--views/gfx/checkmark.pngbin0 -> 3100 bytes
-rw-r--r--views/gfx/comment.pngbin0 -> 413 bytes
-rw-r--r--views/gfx/comment_admin.pngbin0 -> 743 bytes
-rw-r--r--views/gfx/control_play.pngbin0 -> 677 bytes
-rw-r--r--views/gfx/darrowleft.gifbin0 -> 1126 bytes
-rw-r--r--views/gfx/darrowright.gifbin0 -> 1127 bytes
-rw-r--r--views/gfx/delete.pngbin0 -> 715 bytes
-rw-r--r--views/gfx/disk.pngbin0 -> 620 bytes
-rw-r--r--views/gfx/edit.pngbin0 -> 450 bytes
-rw-r--r--views/gfx/help.pngbin0 -> 786 bytes
-rw-r--r--views/gfx/hide.pngbin0 -> 782 bytes
-rw-r--r--views/gfx/html.pngbin0 -> 578 bytes
-rw-r--r--views/gfx/lupe.pngbin0 -> 1247 bytes
-rw-r--r--views/gfx/magnifier.gifbin0 -> 553 bytes
-rw-r--r--views/gfx/money.pngbin0 -> 3430 bytes
-rw-r--r--views/gfx/paypal.pngbin0 -> 2952 bytes
-rw-r--r--views/gfx/pp-logo-big.pngbin0 -> 3195 bytes
-rw-r--r--views/gfx/show.pngbin0 -> 700 bytes
-rw-r--r--views/gfx/skrill.pngbin0 -> 3376 bytes
-rw-r--r--views/gfx/su.pngbin0 -> 11279 bytes
-rw-r--r--views/gfx/tab_top.gifbin0 -> 262 bytes
-rw-r--r--views/gfx/tick.pngbin0 -> 537 bytes
-rw-r--r--views/gfx/world_edit.pngbin0 -> 945 bytes
-rw-r--r--views/js/admin.js193
-rw-r--r--views/js/ajax.js0
-rw-r--r--views/js/ajaxupload.js672
-rw-r--r--views/js/editable.js576
-rw-r--r--views/js/frontend.js121
-rw-r--r--views/js/jquery-cluetip-master/.gitignore2
-rw-r--r--views/js/jquery-cluetip-master/images/darrowdown.gifbin0 -> 69 bytes
-rw-r--r--views/js/jquery-cluetip-master/images/darrowleft.gifbin0 -> 76 bytes
-rw-r--r--views/js/jquery-cluetip-master/images/darrowright.gifbin0 -> 77 bytes
-rw-r--r--views/js/jquery-cluetip-master/images/darrowup.gifbin0 -> 69 bytes
-rw-r--r--views/js/jquery-cluetip-master/jquery.cluetip.css241
-rw-r--r--views/js/jquery-cluetip-master/jquery.cluetip.js880
-rw-r--r--views/js/jquery-cluetip-master/jquery.cluetip.min.js7
-rw-r--r--views/js/jquery-validation-1.11.1/dist/additional-methods.js617
-rw-r--r--views/js/jquery-validation-1.11.1/dist/additional-methods.min.js2
-rw-r--r--views/js/jquery-validation-1.11.1/dist/jquery.validate.js1235
-rw-r--r--views/js/jquery-validation-1.11.1/dist/jquery.validate.min.js1237
-rw-r--r--views/js/jquery.cookie.js117
-rw-r--r--views/js/jquery.validationEngine-de.js131
-rw-r--r--views/js/jquery.validationEngine.js2077
-rw-r--r--views/js/mce_plugin.js45
-rw-r--r--views/js/wpsg_staffel.js117
-rw-r--r--views/mailtemplates/adminmail.phtml81
-rw-r--r--views/mailtemplates/html/adminmail.phtml25
-rw-r--r--views/mailtemplates/html/customer.phtml170
-rw-r--r--views/mailtemplates/html/html_foot.phtml6
-rw-r--r--views/mailtemplates/html/html_head.phtml47
-rw-r--r--views/mailtemplates/html/kundenmail.phtml44
-rw-r--r--views/mailtemplates/html/order.phtml185
-rw-r--r--views/mailtemplates/html/status.phtml23
-rw-r--r--views/mailtemplates/kundenmail.phtml107
-rw-r--r--views/mailtemplates/order.phtml107
-rw-r--r--views/mailtemplates/status.phtml19
-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
-rw-r--r--views/order/index.phtml564
-rw-r--r--views/order/orderlog.phtml32
-rw-r--r--views/order/view.phtml581
-rw-r--r--views/produkt/addedit.phtml524
-rw-r--r--views/produkt/import.phtml30
-rw-r--r--views/produkt/index.phtml353
-rw-r--r--views/produkt/mapimport.phtml43
-rw-r--r--views/produkt/select.phtml160
-rw-r--r--views/produkt/select_filter.phtml43
-rw-r--r--views/produkt/select_filter_productlist.phtml12
-rw-r--r--views/produkttemplates/ausverkauft.phtml130
-rw-r--r--views/produkttemplates/bildertest.phtml42
-rw-r--r--views/produkttemplates/produktseite.phtml135
-rw-r--r--views/produkttemplates/standard.phtml225
-rw-r--r--views/produkttemplates/standard2.phtml211
-rw-r--r--views/produkttemplates/standard_1544.phtml435
-rw-r--r--views/produkttemplates/standard_ajax.phtml196
-rw-r--r--views/produkttemplates/standard_login.phtml177
-rw-r--r--views/warenkorb/ajaxDialog.phtml62
-rw-r--r--views/warenkorb/basket.phtml331
-rw-r--r--views/warenkorb/checkout.phtml269
-rw-r--r--views/warenkorb/checkout2.phtml148
-rw-r--r--views/warenkorb/customerquestion.phtml91
-rw-r--r--views/warenkorb/done.phtml48
-rw-r--r--views/warenkorb/index.phtml118
-rw-r--r--views/warenkorb/overview.phtml307
-rw-r--r--views/warenkorb/progress.phtml60
546 files changed, 40383 insertions, 0 deletions
diff --git a/views/admin/access.phtml b/views/admin/access.phtml
new file mode 100644
index 0000000..89af85d
--- /dev/null
+++ b/views/admin/access.phtml
@@ -0,0 +1,95 @@
+<?php
+
+ /**
+ * Template für die Verwaltung der Berechtigunen
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction='.$_REQUEST['subaction'].'&noheader=1'); ?>">
+
+ <?php global $wpdb; $arRoles = get_option($wpdb->prefix."user_roles"); ?>
+
+ <table class="wpsg_access_table" cellpadding="0" cellspacing="0">
+ <tr>
+ <th class="wpsg_col_capname"></th>
+ <?php foreach ($arRoles as $role_key => $r) { ?>
+ <th class="wpsg_col_cap"><?php echo $r['name']; ?></th>
+ <?php } ?>
+ <th></th>
+ </tr>
+ <tr>
+ <td class="wpsg_col_capname"><?php echo __('Menüpunkt sichtbar', '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_menu]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_menu']) && $r['capabilities']['wpsg_menu'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_menu]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+ </tr>
+ <tr>
+ <td class="wpsg_col_capname"><?php echo __('Konfiguration', '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_conf]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_conf']) && $r['capabilities']['wpsg_conf'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_conf]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+ </tr>
+ <?php if ($this->hasMod('wpsg_mod_core')) { ?>
+ <tr>
+ <td class="wpsg_col_capname"><?php echo __('Lizenzverwaltung', '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_lizence]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_lizence']) && $r['capabilities']['wpsg_lizence'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_lizence]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td class="wpsg_col_capname"><?php echo __('Bestellverwaltung', '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_order]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_order']) && $r['capabilities']['wpsg_order'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_order]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+ </tr>
+ <tr>
+ <td class="wpsg_col_capname"><?php echo __('Produktverwaltung', '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_produkt]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_produkt']) && $r['capabilities']['wpsg_produkt'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_produkt]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+ </tr>
+ <?php $this->callMods('admin_setcapabilities'); ?>
+ </table>
+
+ <br />
+ <input type="submit" value="<?php echo __('Berechtigungen Speichern', 'wpsg'); ?>" name="submit" id="submit" class="button-primary" />
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/blognetzwerk.phtml b/views/admin/blognetzwerk.phtml
new file mode 100644
index 0000000..78b1830
--- /dev/null
+++ b/views/admin/blognetzwerk.phtml
@@ -0,0 +1,48 @@
+<?php
+
+ /**
+ * Template für die Einstellungen in einem Blognetzwerk
+ */
+
+?>
+
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>&amp;noheader=1">
+ <div class="wpsg_admin_box">
+
+ <div class="wpsg_hinweis">
+ <?php echo __('Sie befinden sich in einer Multiblog Umgebung.', 'wpsg'); ?>
+ </div>
+ <br />
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_multiblog_standalone', __('Jeden Blog getrennt behandeln', 'wpsg'), $this->get_option('wpsg_multiblog_standalone', true)); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_multiblog_sessionPath', __('Session auf Verzeichnis einschränken', 'wpsg'), $this->get_option('wpsg_multiblog_sessionPath', true), array('help' => 'wpsg_multiblog_sessionPath')); ?>
+
+ <input type="hidden" name="subaction" value="blognetzwerk" />
+
+ <br />
+
+ <div class="wpsg_hinweis">
+ <?php echo __('Nach der Umstellung dieser Option sollte in den Blogs in denen der Shop noch verwendet wird die Shop Datenbank aktualisiert werden. (Einstellungen -> Allgemein)', 'wpsg'); ?>
+ </div>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </div>
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/customerpreset.phtml b/views/admin/customerpreset.phtml
new file mode 100644
index 0000000..4f8fab1
--- /dev/null
+++ b/views/admin/customerpreset.phtml
@@ -0,0 +1,43 @@
+<?php
+
+ /**
+ * Template für die Kundenvoreinstellungen im Backend
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;noheader=1&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
+
+ <?php echo wpsg_drawForm_Select('wpsg_customerpreset_shipping', __('Standard Versandart', 'wpsg'), $this->view['arShipping'], $this->get_option('wpsg_customerpreset_shipping')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_customerpreset_payment', __('Standard Zahlungsart', 'wpsg'), $this->view['arPayment'], $this->get_option('wpsg_customerpreset_payment')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_defaultland', __('Standardland', 'wpsg'), $this->view['arLander'], $this->get_option('wpsg_defaultland'), array('hint' =>
+ 'nohspc_'.wpsg_translate(__('Die Länder können in der <a href="#1#">Länderverwaltung</a> definiert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender')
+ )); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_customerpreset_title', __('Standardanrede', 'wpsg'), $this->view['arTitle'], $this->get_option('wpsg_customerpreset_title'), array(
+ 'hint' => 'nohspc_'.wpsg_translate(__('Die Auswahl kann in den <a href="#1#">Kundendaten</a> definiert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten'),
+ 'noIndex' => true
+ )); ?>
+
+ <br />
+
+ <input class="button-primary" type="submit" name="wpsg-submit" value="<?php echo __('Speichern', 'wpsg'); ?>" />
+
+ </form>
+
+</div> \ No newline at end of file
diff --git a/views/admin/debugInfo.phtml b/views/admin/debugInfo.phtml
new file mode 100644
index 0000000..82bf55a
--- /dev/null
+++ b/views/admin/debugInfo.phtml
@@ -0,0 +1,16 @@
+<?php
+
+ /**
+ * Template für die Ausgabe der DEBUG Informationen die über die Admin Bar erreichbar sind
+ */
+
+ require_once WPSG_PATH_WP.'/wp-admin/includes/plugin.php';
+
+?>
+<?php $this->callMods('admin_debugInfo'); ?>
+
+<?php
+
+ $arPlugins = $this->get_option('active_plugins');
+
+?> \ No newline at end of file
diff --git a/views/admin/deinstall.phtml b/views/admin/deinstall.phtml
new file mode 100644
index 0000000..fae4d98
--- /dev/null
+++ b/views/admin/deinstall.phtml
@@ -0,0 +1,80 @@
+<?php
+
+ /**
+ * Template für die Einstellungen der Deinstallation
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;noheader=1&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
+
+ <p><?php echo __('Bitte wählen Sie aus, was Sie entfernen möchten?', 'wpsg'); ?></p>
+
+ <label>
+ <input type="checkbox" value="1" name="wpsg_deinstall_products" />&nbsp;<?php echo wpsg_translate(__('Produkte (#1# Datensätze)', 'wpsg'), (($this->view['count_products'] > 0)?$this->view['count_products']:0)); ?>
+ </label><br />
+ <label>
+ <input type="checkbox" value="1" name="wpsg_deinstall_customer" />&nbsp;<?php echo wpsg_translate(__('Kunden (#1# Datensätze)', 'wpsg'), (($this->view['count_customer'] > 0)?$this->view['count_customer']:0)); ?>
+ </label><br />
+ <label>
+ <input type="checkbox" value="1" name="wpsg_deinstall_order" />&nbsp;<?php echo wpsg_translate(__('Bestellungen (#1# Datensätze)', 'wpsg'), (($this->view['count_order'] > 0)?$this->view['count_order']:0)); ?>
+ </label><br />
+ <label>
+ <input type="checkbox" value="1" name="wpsg_deinstall_incompleteorder" />&nbsp;<?php echo wpsg_translate(__('Unvollständige Bestellungen (#1# Datensätze)', 'wpsg'), (($this->view['count_order_incomplete'] > 0)?$this->view['count_order_incomplete']:0)); ?>
+ </label><br />
+
+ <br />
+ <label>
+ <input type="checkbox" value="1" name="wpsg_deinstall_core" />&nbsp;<?php echo __('Plugin, Programmdateien, Moduldateien und Datenbanktabellen', 'wpsg'); ?>
+ </label>
+
+ <p class="submit"><input onclick="return wpsg_check_deinstall();" type="submit" value="<?php echo __('Deinstallation durchführen', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ <div class="wpsg_hinweis">
+ <?php echo __('Hinweis: Es werden hier auch bereits gelöschte Datensätze angezeigt, da diese noch im System hinterlegt bleiben.', 'wpsg'); ?><br /><br />
+ <strong><?php echo __('Das Deinstallieren ist aber nicht umkehrbar!', 'wpsg'); ?></strong>
+ </div>
+
+ </form>
+</div>
+
+<script type="text/javascript">
+
+ function wpsg_check_deinstall()
+ {
+
+ if (jQuery('.wpsg_admin_content input:checked').length <= 0)
+ {
+
+ alert('<?php echo __('Bitte mindestens eine Option wählen.', 'wpsg'); ?>'); return false;
+
+ }
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher? Der Vorgang ist nicht umkehrbar!', 'wpsg'); ?>'))
+ {
+
+ return false;
+
+ }
+
+ return true;
+
+ } // function wpsg_check_deinstall()
+
+</script> \ No newline at end of file
diff --git a/views/admin/emailconf.phtml b/views/admin/emailconf.phtml
new file mode 100644
index 0000000..315e7ac
--- /dev/null
+++ b/views/admin/emailconf.phtml
@@ -0,0 +1,132 @@
+<?php
+
+ /**
+ * Template für die E-Mail Konfiguration
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+
+ <h3>
+ <?php echo __('E-Mail Konfiguration', 'wpsg'); ?>
+ <a title="<?php echo __('Hilfeseite zur E-Mail Konfiguration', 'wpsg'); ?>" class="wpsg_form_help_notip" href="http://wpshopgermany.maennchen1.de/?p=3284" target="_blank"></a>
+ </h3>
+
+ <p><?php echo __('Hier können die Betreffs, Empfänger und BCC/CC der E-Mails konfiguriert werden.', 'wpsg')?></p>
+
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_htmlmail', __('HTML Mails versenden', 'wpsg'), $this->get_option('wpsg_htmlmail')); ?>
+
+ <br />
+
+ <div class="wpsg_admin_box">
+
+ <?php echo wpsg_drawEMailConfig(
+ 'global',
+ __('Globale Vorgaben', 'wpsg'),
+ __('Werden keine Angaben für die folgenden E-Mails gemacht, so gelten die globalen Angaben.', 'wpsg')); ?>
+
+ <?php echo wpsg_drawEMailConfig(
+ 'adminmail',
+ __('Bestellbestätigung (Admin)', 'wpsg'),
+ __('Diese Mail bekommt der Admin beim Eingang einer neuen Bestellung.', 'wpsg'),
+ true); ?>
+
+ <?php echo wpsg_drawEMailConfig(
+ 'kundenmail',
+ __('Bestellbestätigung (Kunde)', 'wpsg'),
+ __('Diese Mail bekommt der Kunde nach Durchführung der Bestellung.', 'wpsg'),
+ false,
+ true); ?>
+
+ <?php echo wpsg_drawEMailConfig(
+ 'status',
+ __('Statusänderung (Kunde)', 'wpsg'),
+ __('Diese Mail bekommt der Kunde bei der Änderung des Bestellstatus.', 'wpsg')); ?>
+
+ <?php $this->callMods('admin_emailconf'); ?>
+
+ </div>
+
+ <div class="wpsg_hinweis"><?php echo __('Klicken Sie auf die jeweilige Mail um die Einstellungen angezeigt zu bekommen bzw. zu ändern.', 'wpsg'); ?></div>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Speichert die Informationen ob die Mailboxen auf oder zugeklappt sind in dem Cookie
+ */
+ function wpsg_mail_save_cookie()
+ {
+
+ var wpsg_mail_open = Array();
+
+ jQuery('.wpsg_admin_box .wpsg_mail_content:visible').each(function() {
+
+ wpsg_mail_open.push(jQuery(this).prev().attr("id"));
+
+ } );
+
+ jQuery.cookie('wpsg_mail', wpsg_mail_open.join(','));
+
+ } // function wpsg_mail_save_cookie()
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_admin_box .wpsg_mail_head').bind('click', function() {
+
+ jQuery(this).next().toggle();
+
+ if (!jQuery(this).next().is(":visible"))
+ {
+ jQuery(this).css('border-bottom', '1px solid #AAAAAA');
+ }
+ else
+ {
+ jQuery(this).css('border-bottom', '0px');
+ }
+
+ wpsg_mail_save_cookie();
+
+ } );
+
+ jQuery('.wpsg_admin_box .wpsg_mail_head').disableSelection();
+
+ if (jQuery.cookie('wpsg_mail') != null)
+ {
+
+ var arOpen = jQuery.cookie('wpsg_mail').split(',');
+
+ for (var i = 0; i < arOpen.length; i ++)
+ {
+
+ jQuery('#' + arOpen[i]).next().show();
+ jQuery('#' + arOpen[i]).css('border-bottom', '0px');
+
+ }
+
+ }
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/admin/extended.phtml b/views/admin/extended.phtml
new file mode 100644
index 0000000..235143a
--- /dev/null
+++ b/views/admin/extended.phtml
@@ -0,0 +1,62 @@
+<?php
+
+ /**
+ * Template für die erweiterten Einstellungen des Shops
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=extended&noheader=1'); ?>">
+
+ <?php echo wpsg_drawForm_Input('wpsg_salt', __('SALT Schlüssel', 'wpsg'), $this->get_option('wpsg_salt')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_options_nl2br', __('RTE Felder mit nl2br speichern', 'wpsg'), $this->get_option('wpsg_options_nl2br')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_debugModus', __('Debug Modus', 'wpsg'), $this->get_option('wpsg_debugModus')); ?>
+
+ <?php if ($this->hasMod('wpsg_mod_core')) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_debugURL', __('Beta Updates laden', 'wpsg'), $this->get_option('wpsg_debugURL')); ?>
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_referer_requesturi', __('RequestURI als ProduktURL verwenden', 'wpsg'), $this->get_option('wpsg_referer_requesturi')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_ignoreuserview', __('User Views ignorieren', 'wpsg'), $this->get_option('wpsg_ignoreuserview')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_classicupload', __('Klassisches Upload Formular', 'wpsg'), $this->get_option('wpsg_classicupload')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_content_filter_direct', __('Ausgaben im Warenkorb direkt ausgeben', 'wpsg'), $this->get_option('wpsg_content_filter_direct')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_options_no_rte_apply_filter', __('ApplyFilter Funktion nicht anwenden', 'wpsg'), $this->get_option('wpsg_options_no_rte_apply_filter')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_options_nl2br_out', __('RTE Felder mit nl2br ausgeben', 'wpsg'), $this->get_option('wpsg_options_nl2br_out')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_impexp_clearlinebreak', __('Zeilenumbrüche im Export entfernen', 'wpsg'), $this->get_option('wpsg_impexp_clearlinebreak')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_removeWpAutoOp', __('wpautop deaktivieren', 'wpsg'), $this->get_option('wpsg_removeWpAutoOp'), array('help' => 'wpsg_removeWpAutoOp')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_removeWpTrimExcerpt', __('wp_trim_excerpt nicht verwenden', 'wpsg'), $this->get_option('wpsg_removeWpTrimExcerpt'), array('help' => 'wpsg_removeWpTrimExcerpt')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_autoraw', __('[raw] und [/raw] um Templates ausgeben (Frontend)', 'wpsg'), $this->get_option('wpsg_autoraw')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_nocache', __('Cachen von dynamischen Shopseiten verhindern', 'wpsg'), $this->get_option('wpsg_nocache')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_autolineending', __('MAC Kompatibilität bei Dateiimporten', 'wpsg'), $this->get_option('wpsg_autolineending')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_geo_determination', __('Abfrage des Kundenstandortes (EU-Leistungsortregel)', 'wpsg'), $this->view['arGeoMode'], $this->get_option('wpsg_geo_determination'), array('help' => 'wpsg_geo_determination')); ?>
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+ </script>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div>
+ \ No newline at end of file
diff --git a/views/admin/hilfe.phtml b/views/admin/hilfe.phtml
new file mode 100644
index 0000000..2f24636
--- /dev/null
+++ b/views/admin/hilfe.phtml
@@ -0,0 +1,86 @@
+<?php
+
+ /**
+ * Templatedatei für die Hilfe im Backend
+ * Normalerweise sollte hier nichts angepasst werden
+ */
+
+?>
+<div class="wpsg_hilfe" style="padding:5px; width:790px;">
+
+ <h1><?php echo __("Hilfe", "wpsg"); ?></h1>
+
+ <p><?php echo __("Hier ein kleiner Überblick, wo welche Information zu finden ist:", "wpsg"); ?></p>
+
+ <h2><?php echo __("Tutorials", "wpsg"); ?></h2>
+ <p><?php echo __("In den Tutorial haben wir praxisnahe Beispiele verwendet, um die einzelnen Funktionen näher zu erklären. Rechts im Menü können die Kategorien näher ausgewählt werden, ganz oben gibt es ein Suchfenster, was ganz sehr gut funktioniert ;)", "wpsg"); ?></p>
+ <a href="http://wpshopgermany.maennchen1.de/category/tutorials/">http://wpshopgermany.maennchen1.de/category/tutorials/</a>
+
+ <h2><?php echo __("Forum", "wpsg"); ?></h2>
+ <p><?php echo __("Alle Anfragen hinsichtlich Fehler, Inbetriebnahme und Administration beantworten wir zeitnah (während unserer Geschäftszeiten). Vielleicht ist deine Frage bereits im Forum gestellt und beantwortet worden? Das Suchformular dort ist auch sehr mächtig, probiere es doch mal aus!", "wpsg"); ?></p>
+ <p><?php echo __("Bitte nutze generell das Forum für eine Support-Anfrage, <u>nicht</u> unser Kontaktformular oder Telefon.", "wpsg"); ?></p>
+ <a href="http://forum.maennchen1.de/">http://forum.maennchen1.de/</a>
+
+ <h2><?php echo __("Feature Wunschliste", "wpsg"); ?></h2>
+ <p><?php echo __("Wir orientieren uns direkt am Markt. Insofern geben wir dir als User die Möglichkeit mitzuentscheiden, welches Feature wpShopGermany zukünftig haben wird. Du kannst selber einen Feature-Wunsch anlegen, oder für einen bestehenden Wunsch deine Stimme abgeben.", "wpsg"); ?></p>
+ <a href="https://wpshopgermany.uservoice.com/">https://wpshopgermany.uservoice.com/</a>
+
+ <h2><?php echo __('Import aus wpShopGermany 2.5.8', 'wpsg'); ?></h2>
+ <p><?php echo __('Mit dieser Funktion können sie den Export aus einem wpShopGermany 2.5.8 in diese Version importieren', 'wpsg'); ?></p>
+ <strong class="wpsg_error"><?php echo __('Sichern Sie in jedem Fall vorher ihre Daten!', 'wpsg'); ?></strong>
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=importV2&amp;noheader=1" enctype="multipart/form-data">
+
+ <p><?php echo wpsg_translate(__('Für den Import der Daten aus der Version 2 gibt es 3 Wege, beachten Sie dazu unsere <a href="#1#">Upgrade Anleitung</a>.', 'wpsg'), 'http://wpshopgermany.de/?p=2508'); ?>:</p>
+
+ <ol>
+ <li>
+ <strong><?php echo __('Update innerhalb der Datenbank', 'wpsg'); ?>:</strong><br />
+ <?php if ($this->get_option('wpshopgermany_version_installed') == '2.5.8') { ?>
+
+ <?php echo __('Wählen Sie diese Option wenn sie das Plugin direkt in diesem Wordpress mit der Version2 ausgetauscht haben.', 'wpsg'); ?><br />
+ <?php echo __('Sie können diesen Import mehrfach durchführen. Starten Sie einen Testlauf und prüfen Sie anschließend die Daten. Sollte alles OK sein, so können Sie den Durchlauf ein zweites mal durchführen und die Tabellen und Daten löschen.', 'wpsg'); ?><br /><br />
+
+ <label>
+ <input type="checkbox" name="tabledel" value="1" />&nbsp;<?php echo __('Alte Tabellen und Daten nach Import löschen.', 'wpsg'); ?>
+ </label>
+ <input name="submit_import_db" type="submit" onclick="return confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>');" value="<?php echo __('Import durchführen', 'wpsg'); ?>" /><br />
+
+ <?php } else if ($this->get_option('wpshopgermany_version_installed') !== false) { ?>
+
+ <p><?php echo __('Die vorher installierte wpShopGermany Version ist nicht kompatibel', 'wpsg'); ?></p>
+
+ <?php } else { ?>
+
+ <p><?php echo __('Diese Option steht ihnen nur zur Verfügung wenn sie vorher eine Version 2.5.8 des wpShopGermany installiert hatten.', 'wpsg'); ?></p>
+
+ <?php } ?>
+ </li>
+ <li>
+ <strong><?php echo __('Import aus der exportierten Datendatei über Datei Upload (Aus Version 2.5.8)', 'wpsg'); ?></strong><br />
+ <input type="file" name="datei" /><br />
+ <input type="submit" onclick="return confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>');" value="<?php echo __('Hochladen', 'wpsg'); ?>" />
+ </li>
+ <li>
+ <strong><?php echo __('Import einer per FTP hochgeladenen Datendatei (Aus Version 2.5.8)', 'wpsg'); ?>:</strong><br />
+ <?php echo __('Dazu muss die Datei unter folgendem Pfad abgelegt werden:', 'wpsg'); ?><br />
+ <pre><?php echo WPSG_PATH_CONTENT; ?>uploads/wpsg_upgrade.zip</pre>
+ <?php if (file_exists(WPSG_PATH_CONTENT.'uploads/wpsg_upgrade.zip')) { ?>
+ <strong class="wpsg_erfolg"><?php echo __('Datei erkannt, klicken Sie auf "Importieren" um den Import zu starten.', 'wpsg'); ?></strong><br /><br />
+ <input name="submit_import" type="submit" onclick="return confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>');" value="<?php echo __('Importieren', 'wpsg'); ?>" />
+ <?php } else { ?>
+ <strong class=wpsg_error><?php echo __('Keine Datei an dieser Stelle gefunden.', 'wpsg'); ?></strong>
+ <?php } ?>
+ </li>
+ </ol>
+
+ </form>
+
+ <h2><?php echo __('Migration der alten Mehrwertsteuersätze', 'wpsg'); ?></h2>
+ <p><?php echo wpsg_translate(
+ __('Ab Version 3.5 wurden die Mehrwertsteuersätze den Ländern zugeordnet. Die alten Mehrwertsteuersätze können <a href="#1#">hier</a> umgewandelt werden.', 'wpsg'),
+ WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=migratemwst'
+ ); ?>
+
+</div>
+ \ No newline at end of file
diff --git a/views/admin/includes.phtml b/views/admin/includes.phtml
new file mode 100644
index 0000000..b5b8201
--- /dev/null
+++ b/views/admin/includes.phtml
@@ -0,0 +1,50 @@
+<?php
+
+ /**
+ * Template für den Admin Bereich der eingebundenen Bibliotheken/Styles
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>&amp;noheader=1">
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_load_css', __('Shop CSS styles nicht einbinden', 'wpsg'), $this->get_option('wpsg_load_css')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_load_jquery', __('JQuery einbinden', 'wpsg'), $this->get_option('wpsg_load_jquery'), array('help' => 'wpsg_load_jquery')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_load_thickbox_js', __('Thickbox einbinden (JavaScript)', 'wpsg'), $this->get_option('wpsg_load_thickbox_js'), array('help' => 'wpsg_load_thickbox')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_load_thickbox_css', __('Thickbox einbinden (Styles)', 'wpsg'), $this->get_option('wpsg_load_thickbox_css'), array('help' => 'wpsg_load_thickbox')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_load_validierung_js', __('Javascript Validierung laden', 'wpsg'), $this->get_option('wpsg_load_validierung_js')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_load_validierung_css', __('CSS der Javascript Validierung laden', 'wpsg'), $this->get_option('wpsg_load_validierung_css')); ?>
+
+ <?php $this->callMods('admin_includes'); ?>
+
+ <input type="hidden" name="subaction" value="includes" />
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+</script> \ No newline at end of file
diff --git a/views/admin/index.phtml b/views/admin/index.phtml
new file mode 100644
index 0000000..b6594ec
--- /dev/null
+++ b/views/admin/index.phtml
@@ -0,0 +1,43 @@
+<?php
+
+ /**
+ * Templatedatei für die Startseite/Konfiguration im Backend
+ * Normalerweise sollte hier nichts angepasst werden
+ */
+
+?>
+
+<div class="wpsg_admin">
+
+ <div class="wrap">
+ <h2><?php echo __('wpShopGermany', 'wpsg'); ?></h2>
+ </div>
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <div class="wpsg_admin_topmenu">
+ <ul>
+ <li class="<?php echo (($this->view['actionName'] == "index")?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin"><?php echo __("Einstellungen", "wpsg"); ?></a></li>
+ <li class="<?php echo (($this->view['actionName'] == "module")?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module"><?php echo __("Module", "wpsg"); ?></a></li>
+ <?php if (current_user_can('wpsg_lizence') && $this->hasMod('wpsg_mod_core')) { ?>
+ <li class="<?php echo (($this->view['actionName'] == "registrierung")?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=registrierung"><?php echo __("Lizenzverwaltung", "wpsg"); ?></a></li>
+ <?php } ?>
+ <li class="<?php echo (($this->view['actionName'] == 'news')?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=news">
+ <?php echo __('Aktuelles', 'wpsg'); ?>
+ <?php if (wpsg_isSizedInt($wpsg_news_unread = wpsg_news::countUnreadNews())) { ?>
+ <span class="wpsg_news_unreadhint"><?php echo $wpsg_news_unread; ?></span>
+ <?php } ?>
+ </a></li>
+ <li class="<?php echo (($this->view['actionName'] == "hilfe")?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=hilfe"><?php echo __("Hilfe", "wpsg"); ?></a></li>
+ <li class="<?php echo (($this->view['actionName'] == "ueber")?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=ueber"><?php echo __("Über", "wpsg"); ?></a></li>
+ </ul>
+ </div>
+ <div style="clear:both;"></div>
+
+ <div class="wpsg_admin_wrap">
+ <?php if (wpsg_isSizedString($this->view['subTemplate'])) { ?>
+ <?php $this->render($this->view['subTemplate']); ?>
+ <?php } ?>
+ </div>
+
+</div> \ No newline at end of file
diff --git a/views/admin/kalkulation.phtml b/views/admin/kalkulation.phtml
new file mode 100644
index 0000000..e41888a
--- /dev/null
+++ b/views/admin/kalkulation.phtml
@@ -0,0 +1,91 @@
+<?php
+
+ /**
+ * Template für den Admin Bereich der Preiskalkulation
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>&amp;noheader=1">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_kleinunternehmer', __('Kleinunternehmerregelung', 'wpsg'), $this->get_option('wpsg_kleinunternehmer'), array('help' => 'Preiskalkulation_wpsg_kleinunternehmer')); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_kleinunternehmer_text', __('Kleinunternehmerregelung Text', 'wpsg'), $this->get_option('wpsg_kleinunternehmer_text'), array()) ?>
+ <div class="wpsg_preisangaben_layer">
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __("Preisangaben im Shop (Backend)", "wpsg"); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <select name="wpsg_preisangaben">
+ <option value="<?php echo WPSG_BRUTTO; ?>" <?php echo (($this->get_option('wpsg_preisangaben') == WPSG_BRUTTO)?'selected="selected"':''); ?>><?php echo __('Brutto (inkl. Steuer)', 'wpsg'); ?></option>
+ <option value="<?php echo WPSG_NETTO; ?>" <?php echo (($this->get_option('wpsg_preisangaben') == WPSG_NETTO)?'selected="selected"':''); ?>><?php echo __('Netto (zzgl. Steuer)', 'wpsg'); ?></option>
+ </select>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php echo wpsg_drawForm_Select('wpsg_preisangaben_frontend', __('Preisangaben im Shop (Frontend)', 'wpsg'), array(WPSG_BRUTTO => __('Brutto (inkl. Steuer)', 'wpsg'), WPSG_NETTO => __('Netto (zzgl. Steuer)', 'wpsg')), $this->get_option('wpsg_preisangaben_frontend')); ?>
+ </div>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_hideemptyshipping', __('Versandkosten bei 0 ausblenden', 'wpsg'), $this->get_option('wpsg_hideemptyshipping'), array('help' => 'Preiskalkulation_wpsg_hideemptyshipping')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_hideemptypayment', __('Zahlungskosten bei 0 ausblenden', 'wpsg'), $this->get_option('wpsg_hideemptypayment'), array('help' => 'Preiskalkulation_wpsg_hideemptypayment')); ?>
+
+ <input type="hidden" name="subaction" value="kalkulation" />
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ <script type="text/javascript">
+
+ /**
+ * Wird beim ändern der Kleinunternehmerregelung aufgerufen
+ */
+ function wpsg_setKleinunternehmer()
+ {
+
+ return;
+
+ if (jQuery('#wpsg_kleinunternehmer').attr('checked'))
+ {
+
+ jQuery('.wpsg_preisangaben_layer').hide();
+
+ }
+ else
+ {
+
+ jQuery('.wpsg_preisangaben_layer').show();
+
+ }
+
+ } // function wpsg_setKleinunternehmer()
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_kleinunternehmer').bind('change', function() {
+
+ wpsg_setKleinunternehmer();
+
+ } );
+
+ jQuery('.wpsg_form_help').tipTip();
+ wpsg_setKleinunternehmer();
+
+ } );
+
+ </script>
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/konfiguration.phtml b/views/admin/konfiguration.phtml
new file mode 100644
index 0000000..a93cd79
--- /dev/null
+++ b/views/admin/konfiguration.phtml
@@ -0,0 +1,167 @@
+<?php
+
+ /**
+ * Templatedatei für die Einstellungsseite im Backend
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=konfiguration&noheader=1'); ?>">
+
+ <?php if ($this->hasMod('wpsg_mod_core')) { ?>
+ <?php if ($this->arLizenz['l'] == 0) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __("Lizenzende", "wpsg"); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <?php if ($this->getDemoDays() < 0) { ?>
+ <p><?php echo wpsg_translate(__('Vor #1# Tage(n) abgelaufen.', 'wpsg'), abs($this->getDemoDays())); ?></p>
+ <?php } else { ?>
+ <p><?php echo wpsg_translate(__('#1# Tage verbleibend.', 'wpsg'), $this->getDemoDays()); ?></p>
+ <?php } ?>
+ <a rel="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DemoMode" title="DemoMode" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DemoMode" class="wpsg_form_help"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } else { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Lizenzstatus', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <?php
+
+ switch ($this->arLizenz['l'])
+ {
+
+ case '1': echo __('Light Version', 'wpsg'); break;
+ case '2': echo __('Pro Version', 'wpsg'); break;
+ case '3': echo __('Enterprise Version', 'wpsg'); break;
+ default: die();
+
+ }
+
+ ?>
+ </p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <?php } else { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">&nbsp;</div>
+ <div class="wpsg_form_right">
+ <?php echo wpsg_translate(
+ __('<span style="color:red; font-weight:bold;">Weitere Funktionen in der Vollversion.</span><br />[ <a target="_blank" href="#1#">Vollversion kaufen</a> ] [ <a target="_blank" href="#2#">Weitere Infos</a> ]', 'wpsg'),
+ 'http://shop.maennchen1.de/produkte/wpshopgermany-lizenzkey/',
+ 'http://wpshopgermany.de/'
+ ); ?>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+
+ <?php if ($this->get_option("wpsg_version_installed", true) != WPSG_VERSION) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <span style="color:red;"><?php echo __("Update", "wpsg"); ?>:</span>
+ </div>
+ <div class="wpsg_form_right">
+ <p><?php echo __("Die Version der Datenbank stimmt nicht mit der installierten Version überein!<br />Bitte klicken Sie auf ", "wpsg").'<a href="'.WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&amp;subaction=allgemein&amp;do=update&amp;submit=1&amp;noheader=1">'.__("Aktualisieren", "wpsg").'</a>&nbsp;('.__("Produkte etc. werden dabei nicht gelöscht.", "wpsg"); ?>)</p>
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DBUpdate" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DBUpdate" class="wpsg_form_help"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } else { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __("Installierte DB Version", "wpsg"); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p><?php echo WPSG_VERSION; ?>&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=allgemein&amp;do=update&amp;submit=1&amp;noheader=1"><?php echo __("Aktualisieren", "wpsg"); ?></a></p>
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DBUpdate" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DBUpdate" class="wpsg_form_help"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <br />
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __("Währung", "wpsg"); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <input type="text" value="<?php echo wpsg_hspc($this->get_option('wpsg_currency')); ?>" name="wpsg_currency" />
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=Einstellungen_Allgemein_Waehrung" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=Einstellungen_Allgemein_Waehrung" class="wpsg_form_help"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <?php if (wpsg_isSizedArray($this->view['arLanguages'])) { ?>
+ <?php echo wpsg_drawForm_Select('wpsg_backend_language', __('Standardsprache (Backend)', 'wpsg'), $this->view['arLanguages'], $this->get_option('wpsg_backend_language'), array('help' => 'Einstellungen_Allgemein_Standardsprachebackend')); ?>
+ <?php } ?>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Produkte pro Seite', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <input type="text" value="<?php echo wpsg_hspc($this->get_option('wpsg_produkte_perpage')); ?>" name="wpsg_produkte_perpage" />
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=ProduktePerPage" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=ProduktePerPage" class="wpsg_form_help"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <?php echo wpsg_drawForm_Input('wpsg_order_perpage', __('Bestellungen pro Seite', 'wpsg'), $this->get_option('wpsg_order_perpage')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_showincompleteorder', __('Unvollständige Best. in Bestellverwaltung anzeigen', 'wpsg'), $this->get_option('wpsg_showincompleteorder')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_emptyorder_clear', wpsg_translate(__('Bestellungen für 0 #1# direkt abschließen', 'wpsg'), $this->get_option('wpsg_currency')), $this->get_option('wpsg_emptyorder_clear')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_afterinsert', __('Nach neuem Produkt im Warenkorb', 'wpsg'), array(
+ '0' => __('Auf Seite bleiben', 'wpsg'),
+ '1' => __('Zum Warenkorb leiten', 'wpsg'),
+ '2' => __('Warenkorb im Fenster anzeigen', 'wpsg'),
+ '3' => __('Lightbox Meldung', 'wpsg')
+ ), $this->get_option('wpsg_afterinsert')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_skip_checkout2', __('Auswahl der Zahlung/Versandart überspringen wenn möglich', 'wpsg'), $this->get_option('wpsg_skip_checkout2')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_afterorder', __('Kundendaten nach Bestellung', 'wpsg'), array(
+ '0' => __('In Session belassen', 'wpsg'),
+ '1' => __('Löschen', 'wpsg')
+ ), $this->get_option('wpsg_afterorder')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_format_knr', __('Formatierung Kundennummer', 'wpsg'), $this->get_option('wpsg_format_knr'), array('help' => 'Formatierung_Kundennummer')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_order_knr', __('Sortierung Kundennummer (Backend)', 'wpsg'), array('0' => __('Numerisch', 'wpsg'), '1' => __('Alphabetisch', 'wpsg')), $this->get_option('wpsg_order_knr')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_customer_start', __('Start für Kundennummer', 'wpsg'), $this->get_option('wpsg_customer_start')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_format_onr', __('Formatierung Bestellnummer', 'wpsg'), $this->get_option('wpsg_format_onr'), array('help' => 'Formatierung_Bestellnummer')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_order_start', __('Start für Bestellnummer', 'wpsg'), $this->get_option('wpsg_order_start')); ?>
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+ </script>
+
+ <input type="hidden" name="subaction" value="konfiguration" />
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/kundendaten.phtml b/views/admin/kundendaten.phtml
new file mode 100644
index 0000000..6896577
--- /dev/null
+++ b/views/admin/kundendaten.phtml
@@ -0,0 +1,88 @@
+<?php
+
+ /**
+ * Template für die Verwaltung der Kundendaten
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+ <div class="wpsg_admin_box" id="wpsg_tab">
+
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
+
+ <div class="head">
+ <div class="title">
+ <div class="tab" id="tab1"><?php echo __('Pfllichtfelder', 'wpsg'); ?></div>
+ <div class="tab" id="tab2"><?php echo __('Weitere Kundendaten', 'wpsg'); ?></div>
+ <div class="tabcontent tablink">
+ <a href="" title="<?php echo __('Neues Kundenfeld hinzufügen', 'wpsg'); ?>" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addCustomField();"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+ <div class="content" id="wpsg_mwst_list">
+
+ <div id="tabcontent1" class="tabcontent">
+ <?php echo $this->render(WPSG_PATH_VIEW.'/admin/kundendaten_tab1.phtml'); ?>
+ </div>
+ <div id="tabcontent2" class="tabcontent">
+
+ <?php echo $this->render(WPSG_PATH_VIEW.'/admin/kundendaten_tab2.phtml'); ?>
+
+ </div>
+
+ </div>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+
+ <script type="text/javascript">
+
+ /**
+ * Wird beim hinzufügen eines benutzerdefinierten Kundenfeldes aufgerufen
+ */
+ function wpsg_addCustomField()
+ {
+
+ jQuery('#tabcontent2').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=kundendaten&do=add&noheader=1',
+ success: function(data) {
+ jQuery('#tabcontent2').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addCustomField()
+
+ jQuery(document).ready(function() {
+ jQuery('#wpsg_tab').wpsg_tab( {
+ 'cookiename': 'wpsg_kundendaten_tab',
+ 'tab2': function() {
+ jQuery('.tablink').show();
+ }
+ } );
+ } );
+
+ </script>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/admin/kundendaten_codeinfo.phtml b/views/admin/kundendaten_codeinfo.phtml
new file mode 100644
index 0000000..322f36a
--- /dev/null
+++ b/views/admin/kundendaten_codeinfo.phtml
@@ -0,0 +1,26 @@
+<?php
+
+ /**
+ * Dieses Template wird bei den Kundenvariablen angezeigt und zeigt den Code für benutzerdefinierte Kundenvariablen an
+ */
+
+?>
+<?php echo wpsg_translate(__('Code für die Abfrage der Kundenvariable mit der ID #1# (Muss im checkout2.phtml verwendet werden)', 'wpsg'), $this->view['id']); ?>
+<div class="wpsg_code">
+
+ &lt;?php echo $this-&gt;renderKundenField($this-&gt;view, <?php echo $this->view['id'] ?>); ?&gt;
+
+</div><br />
+<?php echo wpsg_translate(__('Code für die Ausgabe der Kundenvariable mit der ID #1# (Während die Bestellung noch nicht übertragen wurde)', 'wpsg'), $this->view['id']); ?>
+<div class="wpsg_code">
+
+ &lt;?php echo $this-&gt;getCustomerFieldFromSession(<?php echo $this->view['id'] ?>); ?&gt;
+
+</div><br />
+<?php echo wpsg_translate(__('Code für die Ausgabe der Kundenvariable mit der ID #1# (Nachdem der Kunde in der Datenbank angelegt ist)', 'wpsg'), $this->view['id']); ?>
+<div class="wpsg_code">
+
+ &lt;?php echo $this-&gt;getCustomFieldFromDB(%kunde_id%, <?php echo $this->view['id'] ?>); ?&gt;
+
+</div>
+<div class="wpsg_hinweis"><?php echo __('%kunde_id% muss durch die ID des Kunden in der Datenbank ersetzt werden', 'wpsg'); ?></div> \ No newline at end of file
diff --git a/views/admin/kundendaten_renderfield.phtml b/views/admin/kundendaten_renderfield.phtml
new file mode 100644
index 0000000..d3cddf3
--- /dev/null
+++ b/views/admin/kundendaten_renderfield.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Zeichnet eine einzelne Kundenvariable innerhalb des checkout.phtml
+ */
+
+?>
+<div class="wpsg_checkoutblock">
+ <label class="wpsg_cv" for="wpsg_cv_<?php echo $this->view['field']['id']; ?>">
+ <?php echo wpsg_hspc(__($this->view['field']['name'], 'wpsg')); ?><?php if ($this->view['field']['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
+ <?php if ($this->view['field']['typ'] == '0') { // Textfeld ?>
+ <input class="<?php echo (($this->view['field']['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$this->view['field']['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $this->view['field']['id']; ?>]" type="text" value="<?php echo $this->view['basket']['checkout']['custom'][$this->view['field']['id']]; ?>" />
+ <?php } else if ($this->view['field']['typ'] == '1') { $arAuswahl = explode("|", $this->view['field']['auswahl']); // Auswahlfeld ?>
+ <select class="<?php echo (($this->view['field']['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$this->view['field']['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $this->view['field']['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'][$this->view['field']['id']])?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($this->view['field']['typ'] == '2') { // Checkbox ?>
+ <input type="hidden" name="wpsg[checkout][custom][<?php echo $this->view['field']['id']; ?>]" value="0" />
+ <input class="<?php echo (($this->view['field']['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[checkout][custom][<?php echo $this->view['field']['id']; ?>]" value="1" <?php echo (($this->view['basket']['checkout']['custom'][$this->view['field']['id']] == '1')?'checked="checked"':''); ?> />
+ <?php } ?>
+ </label>
+</div> \ No newline at end of file
diff --git a/views/admin/kundendaten_tab1.phtml b/views/admin/kundendaten_tab1.phtml
new file mode 100644
index 0000000..6fe5425
--- /dev/null
+++ b/views/admin/kundendaten_tab1.phtml
@@ -0,0 +1,146 @@
+<?php
+
+ /**
+ * Template für den ersten Karteireiter der Kundendaten
+ */
+
+?>
+<table class="wpsg_pflichtfelder">
+ <tr>
+ <th class="col0"><?php echo __("Feldbezeichnung", "wpsg"); ?></th>
+ <th class="col1"><?php echo __("Pflichtfeld", "wpsg"); ?></th>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Anrede', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[anrede]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['anrede'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Mögliche Werte für Auswahl getrennt mit |', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <input type="text" style="width:100%;" name="pflicht[anrede_auswahl]" value="<?php echo $this->view['pflicht']['anrede_auswahl']; ?>" />
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"><?php echo __('Firma', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[firma]">
+ <option value="0"><?php echo __("Ja", "wpsg"); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['firma'] == '1')?'selected="selected"':''); ?>><?php echo __("Nein", "wpsg"); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Vorname', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[vname]">
+ <option value="0"><?php echo __("Ja", "wpsg"); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['vname'] == '1')?'selected="selected"':''); ?>><?php echo __("Nein", "wpsg"); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"><?php echo __('Name', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[name]">
+ <option value="0"><?php echo __("Ja", "wpsg"); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['name'] == '1')?'selected="selected"':''); ?>><?php echo __("Nein", "wpsg"); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Geburtsdatum', 'wpsg'); ?></td>
+ <td class="col1">
+ <select name="pflicht[geb]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['geb'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"><?php echo __('E-Mail Adresse', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[email]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['email'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"></td>
+ <td class="col1">
+ <label style="line-height:24px;">
+ <input type="hidden" name="pflicht[emailconfirm]" value="0" />
+ <input type="checkbox" value="1" <?php echo (($this->view['pflicht']['emailconfirm'] == '1')?'checked="checked"':''); ?> name="pflicht[emailconfirm]" style="width:auto; margin-left:5px;" />&nbsp;
+ <?php echo __('E-Mail Adresse (Wiederholung)', 'wpsg'); ?>
+ </label>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Telefon', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[tel]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['tel'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"><?php echo __('Fax', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[fax]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['fax'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Straße', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[strasse]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['strasse'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"><?php echo __('Postleitzahl', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[plz]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['plz'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Ort', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[ort]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['ort'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"><?php echo __('Land', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[land]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['land'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('UStIdNr.', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[ustidnr]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['ustidnr'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+</table>
diff --git a/views/admin/kundendaten_tab2.phtml b/views/admin/kundendaten_tab2.phtml
new file mode 100644
index 0000000..e506f2e
--- /dev/null
+++ b/views/admin/kundendaten_tab2.phtml
@@ -0,0 +1,117 @@
+<?php
+
+ /**
+ * Template für die erweiteren Kundendaten
+ */
+
+?>
+<?php if (wpsg_isSizedArray($this->view['pflicht']['custom'])) { ?>
+
+<script type="text/javascript">
+
+ /**
+ * Zeigt den HTML Code, der die gewählte Kundenvariablen in die Templates einbaut
+ */
+ function wpsg_genKVCode(kv_id)
+ {
+
+ jQuery("#wpsg_kv_code_dialog").dialog( {
+ 'dialogClass': 'wp-dialog',
+ 'modal': true,
+ 'width': 700,
+ 'height': 300,
+ 'title': '<?php echo __('HTML Code Block', 'wpsg'); ?>',
+ open: function(event, ui) {
+
+ jQuery('#wpsg_kv_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&subaction=kundendaten&noheader=1&show=code',
+ data: {
+ 'kv_id': kv_id
+ },
+ success: function(data)
+ {
+
+ jQuery('#wpsg_kv_code_dialog .wpsg_dialog').html(data);
+
+ }
+ } );
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_genPACode(pa_id)
+
+</script>
+
+<div id="wpsg_kv_code_dialog" style="display:none;"><div class="wpsg_dialog"></div></div>
+
+<table class="wpsg_customfields">
+ <tr>
+ <th class="col0"><?php echo __('Index', 'wpsg'); ?></th>
+ <th class="col1"><?php echo __('Kundenvariablen', 'wpsg'); ?></th>
+ <th class="col2"><?php echo __('Pflichtfeld', 'wpsg'); ?></th>
+ <th class="col3"><?php echo __('Typ', 'wpsg'); ?></th>
+ <th class="col4"></th>
+ <th class="col5">
+ <a class="wpsg_icon wpsg_icon_center wpsg_icon_remove" href="#" title="<?php echo __('Kundenvariable löschen', 'wpsg'); ?>" onclick="return false;"></a>
+ </th>
+ </tr>
+ <?php foreach ($this->view['pflicht']['custom'] as $c_id => $c) { ?>
+ <tr>
+ <td class="col0"><?php echo $c_id; ?></td>
+ <td class="col2 wpsg_editable" id="kundenvariable_name_<?php echo $c_id; ?>"><?php echo wpsg_hspc($c['name']); ?></td>
+ <td class="col3">
+ <select name="pflicht[custom][<?php echo $c_id; ?>][show]">
+ <option <?php echo (($c['show'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option <?php echo (($c['show'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Nein', 'wpsg'); ?></option>
+ <option <?php echo (($c['show'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Nicht zeigen', 'wpsg'); ?></option>
+ </select>
+ </td>
+ <td class="col3">
+ <select onchange="if (jQuery(this).val() == '1') jQuery('#row_auswahl_<?php echo $c_id; ?>').show(); else jQuery('#row_auswahl_<?php echo $c_id; ?>').hide();" name="pflicht[custom][<?php echo $c_id; ?>][typ]">
+ <option <?php echo (($c['typ'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Textfeld', 'wpsg'); ?></option>
+ <option <?php echo (($c['typ'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Auswahlfeld', 'wpsg'); ?></option>
+ <option <?php echo (($c['typ'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Checkbox', 'wpsg'); ?></option>
+ </select>
+ </td>
+ <td class="col4">
+ <a class="wpsg_icon wpsg_icon_html wpsg_icon_center" href="#" title="<?php echo __('HTML Code generieren', 'wpsg'); ?>" onclick="return wpsg_genKVCode(<?php echo $c_id; ?>);"></a>
+ </td>
+ <td class="col5">
+ <input type="checkbox" value="1" name="pflicht[custom][<?php echo $c_id; ?>][del]" />
+
+ <script type="text/javascript">
+
+ jQuery('#kundenvariable_name_<?php echo $c_id; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ field_id: '<?php echo $c_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 id="row_auswahl_<?php echo $c_id; ?>" style="<?php echo (($c['typ'] == '1')?'':'display:none;'); ?>">
+ <td class="col0"></td>
+ <td class="col1"><?php echo __('Auswahlmöglichkeiten ("|" als Trenner)', 'wpsg'); ?></td>
+ <td class="col2345" colspan="4">
+ <input type="text" name="pflicht[custom][<?php echo $c_id; ?>][auswahl]" value="<?php echo wpsg_hspc($c['auswahl']); ?>" />
+ </td>
+ </tr>
+ <?php } ?>
+</table>
+<br />
+<?php echo wpsg_drawForm_Checkbox('wpsg_kundenvariablen_show', __('Kundenvariablen direkt abfragen', 'wpsg'), $this->get_option('wpsg_kundenvariablen_show')); ?>
+<?php } else { ?>
+<p><?php echo __('Keine benutzerdefinierten Kundenfelder angelegt.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/admin/laender.phtml b/views/admin/laender.phtml
new file mode 100644
index 0000000..e3fef52
--- /dev/null
+++ b/views/admin/laender.phtml
@@ -0,0 +1,244 @@
+<?php
+
+ /**
+ * Template für die Länderverwaltung
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+
+ <div class="wpsg_admin_box">
+
+ <h3>
+ <?php echo __('Neues Land hinzufügen', 'wpsg'); ?>
+ <a target="_blank" href="http://wpshopgermany.maennchen1.de/?p=839037" class="wpsg_form_help_notip"></a>
+ </h3>
+
+ <?php echo $this->render(WPSG_PATH_VIEW.'/admin/laender_edit.phtml'); ?>
+
+ <h3><?php echo __('Bestehende Länder', 'wpsg'); ?></h3>
+
+ <?php if (wpsg_isSizedArray($this->view['data'])) { ?>
+ <table class="wpsg_admin_laender_list wpsg_admin_table" cellpadding="0" cellspacing="0">
+ <tr>
+ <th class="col_name"><?php echo __('Ländername', 'wpsg'); ?></th>
+ <th class="col_vz"><?php echo __('Versandzone', 'wpsg'); ?></th>
+ <th class="col_mwstsetting"><?php echo __('MwSt.', 'wpsg'); ?></th>
+ <th class="col_mwst"><?php echo __('MwSt. A', 'wpsg'); ?></th>
+ <th class="col_mwst"><?php echo __('MwSt. B', 'wpsg'); ?></th>
+ <th class="col_mwst"><?php echo __('MwSt. C', 'wpsg'); ?></th>
+ <th class="col_mwst"><?php echo __('MwSt. D', 'wpsg'); ?></th>
+ <th class="col_action"></th>
+ </tr>
+ <?php $i = 0; foreach ($this->view['data'] as $l) { $i ++; ?>
+ <tr id="wpsg_laenderrow_<?php echo $l['id']; ?>" class="<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="col_name data_name"><?php echo wpsg_hspc($l['name'].((wpsg_isSizedString($l['kuerzel']))?' ('.$l['kuerzel'].')':'')); ?></td>
+ <td class="col_vz data_vz">
+ <?php if (wpsg_isSizedInt($l['vz']) && wpsg_isSizedString($this->view['vz'][$l['vz']])) { ?>
+ <?php echo wpsg_hspc($this->view['vz'][$l['vz']]); ?>
+ <?php } ?>
+ </td>
+ <td class="col_mwstsetting data_mwst">
+ <?php if ($l['mwst'] == '2') { ?>
+ <?php echo __('keine MwSt. bei USt.IdNr.', 'wpsg'); ?>
+ <?php } else if ($l['mwst'] == '1') { ?>
+ <?php echo __('keine MwSt.', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo __('mit MwSt.', 'wpsg'); ?>
+ <?php } ?>
+ </td>
+ <td class="col_mwst data_mwst_a">
+ <?php if (wpsg_tf($l['mwst_a']) != NULL) { ?>
+ <?php echo wpsg_ff(wpsg_tf($l['mwst_a']), '%'); ?>
+ <?php } ?>
+ </td>
+ <td class="col_mwst data_mwst_b">
+ <?php if (wpsg_tf($l['mwst_b']) != NULL) { ?>
+ <?php echo wpsg_ff(wpsg_tf($l['mwst_b']), '%'); ?>
+ <?php } ?>
+ </td>
+ <td class="col_mwst data_mwst_c">
+ <?php if (wpsg_tf($l['mwst_c']) != NULL) { ?>
+ <?php echo wpsg_ff(wpsg_tf($l['mwst_c']), '%'); ?>
+ <?php } ?>
+ </td>
+ <td class="col_mwst data_mwst_d">
+ <?php if (wpsg_tf($l['mwst_d']) != NULL) { ?>
+ <?php echo wpsg_ff(wpsg_tf($l['mwst_d']), '%'); ?>
+ <?php } ?>
+ </td>
+ <td class="col_action">
+
+ <a class="wpsg_icon wpsg_icon_edit" href="#" onclick="return wpsg_laender_edit(<?php echo $l['id']; ?>);"></a>
+ <a class="wpsg_icon wpsg_icon_remove" href="#" onclick="return wpsg_laender_remove(<?php echo $l['id']; ?>);"></a>
+
+ </td>
+ </tr>
+ <?php } ?>
+ </table>
+ <?php } else { ?>
+ <p><?php echo __('Noch keine Länder angelegt.', 'wpsg'); ?>
+ <?php } ?>
+
+ <br /><br />
+
+ <input type="button" onclick="return wpsg_laender_import();" value="<?php echo __('Standardländer importieren', 'wpsg'); ?>" class="button" />
+ <input type="button" onclick="return wpsg_eu_laender_import();" value="<?php echo __('Standard EU-Länder importieren', 'wpsg'); ?>" class="button" />
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ var land_load = false;
+
+ function wpsg_laender_import()
+ {
+
+ if (!confirm('<?php echo __('Sind sie sich sicher ?', 'wpsg'); ?>')) return false;
+
+ location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=import&noheader=1";
+
+ return false;
+
+ }
+
+ function wpsg_eu_laender_import()
+ {
+
+ if (!confirm('<?php echo __('Sind sie sich sicher ?', 'wpsg'); ?>')) return false;
+
+ location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=eu_import&noheader=1";
+
+ return false;
+
+ }
+
+ function wpsg_laender_save()
+ {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=saveEdit&noheader=1',
+ data: {
+ form_data: jQuery('#wpsg_land_edit_form_edit').serialize()
+ },
+ success: function(data) {
+
+ if (typeof data === 'object')
+ {
+
+ land_load = true;
+
+ for (var i in data)
+ {
+
+ jQuery('#wpsg_laenderrow_' + data['id']).find('.data_' + i).html(data[i]);
+
+ }
+
+ jQuery('#wpsg_laenderrow_edit > td > div').slideUp(100, function() {
+
+ jQuery('#wpsg_laenderrow_edit').remove();
+ land_load = false;
+
+ } );
+
+ }
+ else alert(data);
+
+ }
+ } );
+
+ return false;
+
+ }
+
+ function wpsg_laender_edit(land_id)
+ {
+
+ if (land_load == true) return; land_load = true;
+
+ var edit_timeout = 0;
+
+ if (jQuery('#wpsg_laenderrow_edit > td > div').is(':visible'))
+ {
+
+ edit_timeout = 150;
+
+ jQuery('#wpsg_laenderrow_edit > td > div').slideUp(100, function() {
+
+ jQuery('#wpsg_laenderrow_edit').remove();
+
+ } );
+
+ }
+
+ window.setTimeout(function() {
+
+ jQuery('#wpsg_laenderrow_' + land_id).after('<tr id="wpsg_laenderrow_edit"><td colspan="8"><img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" /><div style="display:none;"></div></td></tr>');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=edit&noheader=1',
+ data: {
+ land_id: land_id
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_laenderrow_edit > td > div').html(data);
+ jQuery('#wpsg_laenderrow_edit > td > img').hide();
+ jQuery('#wpsg_laenderrow_edit > td > div').slideDown(300, function() { land_load = false; } );
+
+ }
+ } );
+
+ }, edit_timeout);
+
+ return false;
+
+ }
+
+ function wpsg_laender_remove(land_id)
+ {
+
+ 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&subaction=laender&do=remove&noheader=1',
+ data: {
+ land_id: land_id
+ },
+ success: function(data) {
+
+ if (data === "1") jQuery('#wpsg_laenderrow_' + land_id).remove();
+ else alert(data);
+
+ }
+ } );
+
+ return false;
+
+ }
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+ /* ]]> */</script>
+
+ </div>
+
+</div> \ No newline at end of file
diff --git a/views/admin/laender_edit.phtml b/views/admin/laender_edit.phtml
new file mode 100644
index 0000000..421ed79
--- /dev/null
+++ b/views/admin/laender_edit.phtml
@@ -0,0 +1,29 @@
+<form method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=saveNew&noheader=1" id="<?php echo ((wpsg_isSizedInt($this->view['land']['id']))?'wpsg_land_edit_form_edit':'wpsg_land_edit_form_new'); ?>">
+
+ <?php if (wpsg_isSizedInt($this->view['land']['id'])) $prefix = 'land'; else $prefix = 'newland'; ?>
+
+ <?php echo wpsg_drawForm_Input($prefix.'[name]', __('Ländername', 'wpsg'), wpsg_getStr($this->view['land']['name']), array('help' => 'wpsg_land_name')); ?>
+ <?php echo wpsg_drawForm_Input($prefix.'[kuerzel]', __('Kürzel', 'wpsg'), wpsg_getStr($this->view['land']['kuerzel']), array('help' => 'wpsg_land_kuerzel')); ?>
+ <?php echo wpsg_drawForm_Select($prefix.'[vz]', __('Versandzone', 'wpsg'), $this->view['vz'], wpsg_getStr($this->view['land']['vz']), array('help' => 'wpsg_land_vz')); ?>
+ <?php echo wpsg_drawForm_Select($prefix.'[mwst]', __('MwSt. Grundlage', 'wpsg'), array(
+ '0' => __('mit MwSt.', 'wpsg'),
+ '1' => __('keine MwSt.', 'wpsg'),
+ '2' => __('keine MwSt. bei USt.IdNr.', 'wpsg')
+ ), wpsg_getStr($this->view['land']['mwst']), array('help' => 'wpsg_land_mwst')); ?>
+ <?php echo wpsg_drawForm_Input($prefix.'[mwst_a]', __('MwSt. Satz A (stark ermäßigter Satz)', 'wpsg'), wpsg_getStr($this->view['land']['mwst_a']), array('help' => 'wpsg_land_mwst_a')); ?>
+ <?php echo wpsg_drawForm_Input($prefix.'[mwst_b]', __('MwSt. Satz B (ermäßigter Satz)', 'wpsg'), wpsg_getStr($this->view['land']['mwst_b']), array('help' => 'wpsg_land_mwst_b')); ?>
+ <?php echo wpsg_drawForm_Input($prefix.'[mwst_c]', __('MwSt. Satz C (Normalsatz)', 'wpsg'), wpsg_getStr($this->view['land']['mwst_c']), array('help' => 'wpsg_land_mwst_c')); ?>
+ <?php echo wpsg_drawForm_Input($prefix.'[mwst_d]', __('MwSt. Satz D (Zwischensatz)', 'wpsg'), wpsg_getStr($this->view['land']['mwst_d']), array('help' => 'wpsg_land_mwst_d')); ?>
+ <?php echo wpsg_drawForm_Checkbox($prefix.'[standard]', __('Standardland', 'wpsg'), wpsg_getStr($this->view['land']['standard']), array('disabled' => ((isset($this->view['land']['standard']) && $this->view['land']['standard'] == '1')?true:false), 'help' => 'wpsg_land_standard')); ?>
+
+ <?php if (wpsg_isSizedInt($this->view['land']['id'])) { ?>
+ <input type="hidden" name="<?php echo $prefix; ?>[id]" value="<?php echo wpsg_hspc($this->view['land']['id']); ?>" />
+ <?php } ?>
+
+ <br />
+
+ <input class="button" type="submit" onclick="return <?php echo ((wpsg_isSizedInt($this->view['land']['id']))?'wpsg_laender_save();':''); ?>" value="<?php echo __('Speichern', 'wpsg'); ?>" />
+
+ <br /><br ><hr />
+
+</form> \ No newline at end of file
diff --git a/views/admin/loadsavesettings.phtml b/views/admin/loadsavesettings.phtml
new file mode 100644
index 0000000..4ff2599
--- /dev/null
+++ b/views/admin/loadsavesettings.phtml
@@ -0,0 +1,48 @@
+<?php
+
+ /**
+ * Template für den Menüpunkt "Backup/Restore"
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=loadsavesettings&noheader=1'); ?>">
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_debugModus"><?php echo __('Einstellungen speichern', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <a href="<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=loadsavesettings&noheader=1&wpsg_do=downloadsettings&submit=1'; ?>" title="<?php echo __('Einstellungen als XML Datei downloaden', 'wpsg'); ?>"><?php echo __('Download', 'wpsg'); ?></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_debugModus"><?php echo __('Einstellungen laden', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input type="file" name="wpsg_settings" />
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen übernehmen', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+ <p class="wpsg_hinweis">
+ <?php echo __('Derzeit werden nur die Einstellungen gespeichert. Produkte/Kunden/Bestellungen etc. sind nicht enthalten!', 'wpsg'); ?>
+ </p>
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/migratemwst.phtml b/views/admin/migratemwst.phtml
new file mode 100644
index 0000000..8267059
--- /dev/null
+++ b/views/admin/migratemwst.phtml
@@ -0,0 +1,62 @@
+<?php
+
+ /**
+ * Template für die Migration der alten MwSt. Sätze in die Länder
+ */
+
+?>
+<form method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=migratemwst&noheader=1">
+
+ <h3><?php echo __('Standardland', 'wpsg'); ?></h3>
+
+ <?php echo wpsg_drawForm_Input('', __('Name', 'wpsg'), $this->view['defaultCountry']->name, array('text' => true)); ?>
+
+ <br />
+
+ <h3><?php echo __('Produkte im Datenbestand', 'wpsg'); ?></h3>
+ <?php if (wpsg_isSizedArray($this->view['distinctProductTax'])) { ?>
+ <?php foreach ($this->view['distinctProductTax'] as $dp) { ?>
+
+ <?php if (wpsg_isSizedInt($dp['id'])) { ?>
+ <?php echo wpsg_drawForm_Select('mwst['.$dp['id'].']', wpsg_translate(__('#1# Produkte mit #2# Mehrwertsteuer (#3#)', 'wpsg'), $dp['count_product'], wpsg_ff($dp['value'], '%'), $dp['name']), wpsg_tax_groups(true), 'c'); ?>
+ <?php } else { ?>
+ <?php echo wpsg_drawForm_Select('mwst['.$dp['id'].']', wpsg_translate(__('#1# Produkte mit ungültigem Steuersatz', 'wpsg'), $dp['count_product']), wpsg_tax_groups(true), 'c'); ?>
+ <?php } ?>
+
+ <?php } ?>
+ <?php } else { ?>
+ <p><?php echo __('Keine Produkte die noch keiner Mehrwertsteuergruppe zugewiesen wurden im Datenbestand.', 'wpsg'); ?>
+ <?php } ?>
+
+ <?php if (wpsg_isSizedArray($this->view['arConf'])) { ?>
+ <h3><?php echo __('Modulkonfigurationen', 'wpsg'); ?></h3>
+
+ <?php foreach ($this->view['arConf'] as $key => $label) { ?>
+ <?php echo wpsg_drawForm_Select('conf['.$key.']', $label, wpsg_tax_groups(), 'c'); ?>
+ <?php } ?>
+
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_userpayment')) { ?>
+ <?php if (wpsg_isSizedArray($this->view['arPaymentMethods'])) { ?>
+ <h3><?php echo __('Zahlvarianten', 'wpsg'); ?></h3>
+ <?php foreach ($this->view['arPaymentMethods'] as $pm) { ?>
+ <?php echo wpsg_drawForm_Select('pv['.$pm['id'].']', __($pm['name'], 'wpsg'), wpsg_tax_groups(), 'c'); ?>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_versandarten')) { ?>
+ <?php if (wpsg_isSizedArray($this->view['arShippingMethods'])) { ?>
+ <h3><?php echo __('Versandarten', 'wpsg'); ?></h3>
+ <?php foreach ($this->view['arShippingMethods'] as $sm) { ?>
+ <?php echo wpsg_drawForm_Select('sv['.$sm['id'].']', __($sm['name'], 'wpsg'), wpsg_tax_groups(), 'c'); ?>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+
+ <br />
+
+ <input type="submit" name="submit" class="button-primary" value="<?php echo __('Mehrwertsteuersätze zuweisen', 'wpsg'); ?>" />
+
+</form> \ No newline at end of file
diff --git a/views/admin/module.phtml b/views/admin/module.phtml
new file mode 100644
index 0000000..faa84d2
--- /dev/null
+++ b/views/admin/module.phtml
@@ -0,0 +1,137 @@
+<?php
+
+ /**
+ * Templatedatei für die Modulseite des Backend
+ * Sollte nicht angepasst werden
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <?php foreach ($this->view['groups'] as $group_name => $g) { ?>
+ <div class="head">
+ <div class="title"><?php echo $group_name; ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($g as $mod_key => $m) { ?>
+ <li class="<?php echo (($this->get_option($mod_key, $this->view['global']) > 0)?'modul_akt':''); ?> <?php echo (($mod_key == $_REQUEST['modul'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module&amp;modul=<?php echo $mod_key; ?>"><?php echo $m->name; ?></a></li>
+ <?php } ?>
+ </ul>
+ <div style="clear:both; height:10px; margin-left:0px; margin-right:8px;"></div>
+ <?php } ?>
+
+</div>
+
+<?php if (isset($_REQUEST['modul'])) { ?>
+<div class="wpsg_admin_content">
+ <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">
+
+ <h3>
+ <?php echo $this->arAllModule[$_REQUEST['modul']]->name; ?>
+ <?php if (isset($this->arAllModule[$_REQUEST['modul']]->hilfeURL) && $this->arAllModule[$_REQUEST['modul']]->hilfeURL != '') { ?>
+ <a target="_blank" href="<?php echo $this->arAllModule[$_REQUEST['modul']]->hilfeURL; ?>" class="wpsg_form_help_notip"></a>
+ <?php } ?>
+ </h3>
+
+ <p><?php echo $this->arAllModule[$_REQUEST['modul']]->desc; ?></p>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __("Modul aktiviert", "wpsg"); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <select name="aktiv">
+ <option value="0"><?php echo __('Nein', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->get_option($_REQUEST['modul'], $this->view['global']) > 0)?'selected="selected"':''); ?>><?php echo __('Ja', 'wpsg'); ?></option>
+ </select>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <?php if (isset($this->arAllModule[$_REQUEST['modul']]->version)) { ?>
+ <?php echo wpsg_drawForm_Input('', __('Version', 'wpsg'), $this->arAllModule[$_REQUEST['modul']]->version, array('text' => true)); ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __("Lizenz", "wpsg"); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <?php if (isset($this->arAllModule[$_REQUEST['modul']]->free) && $this->arAllModule[$_REQUEST['modul']]->free === true) { ?>
+ <?php echo __('Kostenfrei', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php if (is_array($this->arLizenz) && in_array($_REQUEST['modul'], (array)$this->arLizenz['mods'])) { ?>
+ <?php echo __('Aktiviert', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php if ($this->arAllModule[$_REQUEST['modul']]->getDemoDays() > 0) { ?>
+ <?php echo wpsg_translate(__('Demo Modus noch #1# Tage verbleibend.', 'wpsg'), $this->arAllModule[$_REQUEST['modul']]->getDemoDays()); ?>
+ <?php } else { ?>
+ <?php echo __('Demo Modus abgelaufen.', 'wpsg'); ?>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ </p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+
+ <?php if (!isset($this->arAllModule[$_REQUEST['modul']]->version) || (($this->arAllModule[$_REQUEST['modul']]->free === true || (is_array($this->arLizenz) && in_array($_REQUEST['modul'], (array)$this->arLizenz['mods'])) || $this->arAllModule[$_REQUEST['modul']]->getDemoDays() > 0))) { ?>
+ <?php if ($this->arAllModule[$_REQUEST['modul']]->inline === true) { ?>
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
+ <?php } ?>
+
+ <input type="hidden" name="subaction" value="module" />
+
+ <?php if ($this->arAllModule[$_REQUEST['modul']]->inline == true) { ?>
+ </form>
+ <?php } ?>
+
+ <?php if ($this->get_option($_REQUEST['modul'], $this->view['global']) > 0) { ?>
+ <?php echo $this->arModule[$_REQUEST['modul']]->settings_edit(); ?>
+ <?php } ?>
+
+ <?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
+ <?php } ?>
+ <?php } else { ?>
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
+ <?php } ?>
+
+ <?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
+ </form>
+ <?php } ?>
+</div>
+<?php } else { ?>
+
+ <?php if ($this->hasMod('wpsg_mod_core')) { ?>
+ <?php echo $this->callMod('wpsg_mod_core', 'module_index'); ?>
+ <?php } else { ?>
+
+ <div class="wpsg_admin_content">
+
+ <h3><?php echo __('Modulverwaltung', 'wpsg'); ?></h3>
+ <p><?php echo __('wpShopGermany ist Modular aufgebaut, wählen Sie links das Modul aus, welches Sie konfigurieren möchten. ', 'wpsg'); ?></p>
+
+ <p><?php echo wpsg_translate(
+ __('<span style="color:red; font-weight:bold;">wpShopGermany Vollversion erwerben und weitere Funktionen freischalten.</span> [ <a target="_blank" href="#1#">Vollversion kaufen</a> ] [ <a target="_blank" href="#2#">Weitere Infos</a> ]', 'wpsg'),
+ 'http://shop.maennchen1.de/produkte/wpshopgermany-lizenzkey/',
+ 'http://wpshopgermany.de/'
+ ); ?></p>
+
+ </div>
+
+ <?php } ?>
+
+<?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/admin/musterwiderruf.pdf.phtml b/views/admin/musterwiderruf.pdf.phtml
new file mode 100644
index 0000000..a5815e2
--- /dev/null
+++ b/views/admin/musterwiderruf.pdf.phtml
@@ -0,0 +1,60 @@
+<?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_LIB.'wpsg_fpdf.class.php';
+
+ // Positionierung der Zieladress
+ $adress_left = 25;
+ $adress_top = 55;
+
+ // Positionierund des Textes
+ $tdata_left = 25;
+ $tdata_top = 90;
+
+ $pdf = new wpsg_fpdf();
+
+ $pdf->SetAutoPageBreak(true, 5);
+ $pdf->AddPage();
+
+ // Adresse des Kunden
+ $pdf->SetFont('Arial', '', 12);
+ $pdf->Text($adress_left, $adress_top, $this->get_option('wpsg_shopdata_name'));
+ $pdf->Text($adress_left, $adress_top + 5, $this->get_option('wpsg_shopdata_owner'));
+ $pdf->Text($adress_left, $adress_top + 10, $this->get_option('wpsg_shopdata_street'));
+ $pdf->Text($adress_left, $adress_top + 15, $this->get_option('wpsg_shopdata_zip').' '.$this->get_option('wpsg_shopdata_city'));
+
+ // Rechnungsdaten
+ $pdf->SetFont('Arial', 'B', 16);
+ $pdf->Text($tdata_left, $tdata_top, 'Widerruf');
+
+ // Text
+ $pdf->SetFont('Arial', '', 12);
+ $pdf->Text($tdata_left, $tdata_top + 10, __('Hiermit widerrufe(n) ich/wir (*) den von mir/uns (*) abgeschlossenen Vertrag über den Kauf', 'wpsg'));
+ $pdf->Text($tdata_left, $tdata_top + 15, __('der folgenden Waren (*)/die Erbringung der folgenden Dienstleistung.', 'wpsg'));
+
+ $pdf->Text($tdata_left, $tdata_top + 25, __('Artikelname', 'wpsg'));
+ $pdf->Text($tdata_left + 115, $tdata_top + 25, __('Bestellt am (*)/erhalten am (*)', 'wpsg'));
+
+ $pdf->Line($tdata_left, $tdata_top + 40, $tdata_left + 170, $tdata_top + 40);
+ $pdf->Line($tdata_left, $tdata_top + 50, $tdata_left + 170, $tdata_top + 50);
+ $pdf->Line($tdata_left, $tdata_top + 60, $tdata_left + 170, $tdata_top + 60);
+ $pdf->Line($tdata_left, $tdata_top + 70, $tdata_left + 170, $tdata_top + 70);
+ $pdf->Line($tdata_left, $tdata_top + 80, $tdata_left + 170, $tdata_top + 80);
+
+ $pdf->Text($tdata_left, $tdata_top + 100, __('Meine Anschrift', 'wpsg'));
+ $pdf->Text($tdata_left, $tdata_top + 110, __('Name', 'wpsg').':'); $pdf->Line($tdata_left + 30, $tdata_top + 110, $tdata_left + 100, $tdata_top + 110);
+ $pdf->Text($tdata_left, $tdata_top + 118, __('Straße', 'wpsg').':'); $pdf->Line($tdata_left + 30, $tdata_top + 118, $tdata_left + 100, $tdata_top + 118);
+ $pdf->Text($tdata_left, $tdata_top + 126, __('PLZ/Ort', 'wpsg').':'); $pdf->Line($tdata_left + 30, $tdata_top + 126, $tdata_left + 100, $tdata_top + 126);
+
+ $pdf->Line($tdata_left, $tdata_top + 152, $tdata_left + 100, $tdata_top + 152);
+ $pdf->SetFont('Arial', '', 6);
+ $pdf->Text($tdata_left, $tdata_top + 155, __('Datum, Unterschrift', 'wpsg').':');
+
+ $pdf->Output($this->view['filename'], 'F');
+
+?> \ No newline at end of file
diff --git a/views/admin/news.phtml b/views/admin/news.phtml
new file mode 100644
index 0000000..aceb183
--- /dev/null
+++ b/views/admin/news.phtml
@@ -0,0 +1,42 @@
+<?php
+
+ /**
+ * Template für den Karteireiter "News" der Konfiguration
+ */
+
+?>
+
+<?php if (wpsg_isSizedArray($this->view['news'])) { ?>
+
+ <br />
+
+ <div class="wpsg_news_wrap">
+
+ <?php foreach ($this->view['news'] as $news) { ?>
+ <div class="wpsg_news <?php echo ((wpsg_news::isRead($news['id']))?'wpsg_news_read':''); ?>">
+
+ <h2><a target="_blank" onclick="setTimeout(function() { location.href = location.href; }, 1000); return true;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=news&read=<?php echo rawurlencode($news['id']); ?>&noheader=1"><?php echo wpsg_hspc(wpsg_formatTimestamp($news['date'], true).' - '.$news['title']); ?></a></h2>
+
+ <div class="markRead">
+ <?php echo __('gelesen', 'wpsg'); ?> <img src="<?php echo $this->getRessourceURL('gfx/tick.png'); ?>" title="<?php echo __('gelesen', 'wpsg'); ?>" alt="<?php echo __('gelesen', 'wpsg'); ?>" />
+ </div>
+ <div class="wpsg_news_content"><?php echo wpsg_news::prepareContent($news); ?></div>
+
+ </div>
+
+ <?php } ?>
+
+ </div>
+
+<?php } else { ?>
+
+ <p><?php echo __('Derzeit stehen keine News zum Lesen bereit.', 'wpsg'); ?>
+
+<?php } ?>
+
+<hr />
+
+<?php echo wpsg_translate(__('Letzte Aktualisierung: #1# [<a href="#2#">Aktualisieren</a>]', 'wpsg'),
+ ((wpsg_isSizedInt($this->get_option('wpsg_news_cache_refresh')))?wpsg_formatTimestamp(wpsg_timestamp($this->get_option('wpsg_news_cache_refresh'))):'n.A.'),
+ WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=news&reload=1&noheader=1'
+); ?> \ No newline at end of file
diff --git a/views/admin/path.phtml b/views/admin/path.phtml
new file mode 100644
index 0000000..315e7a2
--- /dev/null
+++ b/views/admin/path.phtml
@@ -0,0 +1,37 @@
+<?php
+
+ /**
+ * Template für die Einstellungen der Pfade im Backend
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=konfiguration&noheader=1'); ?>">
+
+ <h3><?php echo __('Pfadeinstellungen', 'wpsg'); ?></h3>
+
+ <p><?php echo __('Hier können die Pfade definiert werden, in denen der Shop seine Daten ablegt.', 'wpsg'); ?></p>
+
+ <?php echo wpsg_drawForm_Input('wpsg_path_upload_multiblog', __('Multiblog Upload Path (relativ zu wp-content)', 'wpsg'), $this->get_option('wpsg_path_upload_multiblog', true), array('hint' => __('Sollte den Platzhalter %blog_id% enthalten, dieser zeigt auf die ID des jeweiligen Blockes sonst kann es bei dem Betrieb von mehreren Shops zu Überschreibungen kommen.', 'wpsg'))); ?>
+
+ <input type="hidden" name="subaction" value="path" />
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/presentation.phtml b/views/admin/presentation.phtml
new file mode 100644
index 0000000..10958eb
--- /dev/null
+++ b/views/admin/presentation.phtml
@@ -0,0 +1,50 @@
+<?php
+
+ /**
+ * Template für die Darstellungsoptionen des Shops
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=presentation&noheader=1'); ?>">
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_showMwstAlways', __('MwSt. Spalte auch bei einem Satz zeigen', 'wpsg'), $this->get_option('wpsg_showMwstAlways')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_showArticelnumber', __('Artikelnummer im Produkttemplate anzeigen', 'wpsg'), $this->get_option('wpsg_showArticelnumber')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_form_validation', __('Formular Validierung', 'wpsg'), array(
+ '0' => __('Serverseitig', 'wpsg'),
+ '1' => __('Serverseitig + Javascript V1', 'wpsg'),
+ '2' => __('Serverseitig + Javascript V2', 'wpsg')
+ ), $this->get_option('wpsg_form_validation')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_hideBasketCountrySelect', __('Länderauswahl im Warenkorb verbergen', 'wpsg'), $this->get_option('wpsg_hideBasketCountrySelect')); ?>
+
+ <?php $this->callMods('admin_presentation'); ?>
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+ </script>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/seiten.phtml b/views/admin/seiten.phtml
new file mode 100644
index 0000000..39e16ca
--- /dev/null
+++ b/views/admin/seiten.phtml
@@ -0,0 +1,41 @@
+<?php
+
+ /**
+ * Template für die verwaltung der Seiten im Backend
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+ <div class="wpsg_admin_box">
+
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>&amp;noheader=1">
+
+ <?php echo wpsg_drawForm_Select('wpsg_page_basket', __('Warenkorbseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_basket')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_page_versand', __('Versandkosten', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_versand')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_page_agb', __('AGB', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_agb')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_page_datenschutz', __('Datenschutz', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_datenschutz')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_page_widerrufsbelehrung', __('Widerrufsbelehrung', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_widerrufsbelehrung')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_page_onlinedisputeresolution', __('Online Streitbeilegung', 'wpsg'), $this->get_option('wpsg_page_onlinedisputeresolution')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_page_impressum', __('Impressum', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_impressum')); ?>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/admin/shopdata.phtml b/views/admin/shopdata.phtml
new file mode 100644
index 0000000..e2340c6
--- /dev/null
+++ b/views/admin/shopdata.phtml
@@ -0,0 +1,60 @@
+<?php
+
+ /**
+ * Template für die allgemeinen Shopdaten
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>&amp;noheader=1">
+
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_name', __('Name des Shops / Firma', 'wpsg'), $this->get_option('wpsg_shopdata_name'), array('help' => 'wpsg_shopdata_name')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_owner', __('Inhaber des Shops', 'wpsg'), $this->get_option('wpsg_shopdata_owner'), array('help' => 'wpsg_shopdata_owner')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_tel', __('Telefonnummer', 'wpsg'), $this->get_option('wpsg_shopdata_tel'), array('help' => 'wpsg_shopdata_tel')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_fax', __('Faxnummer', 'wpsg'), $this->get_option('wpsg_shopdata_fax'), array('help' => 'wpsg_shopdata_fax')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_email', __('E-Mail', 'wpsg'), $this->get_option('wpsg_shopdata_email'), array('help' => 'wpsg_shopdata_email')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_taxnr', __('Steuernummer', 'wpsg'), $this->get_option('wpsg_shopdata_taxnr'), array('help' => 'wpsg_shopdata_taxnr')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_ustidnr', __('USt-IdNr.', 'wpsg'), $this->get_option('wpsg_shopdata_ustidnr'), array('help' => 'wpsg_shopdata_ustidnr')); ?>
+
+ <h4><?php echo __('Anschrift', 'wpsg'); ?></h4>
+
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_street', __('Straße', 'wpsg'), $this->get_option('wpsg_shopdata_street'), array('help' => 'wpsg_shopdata_street')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_zip', __('Postleitzahl', 'wpsg'), $this->get_option('wpsg_shopdata_zip'), array('help' => 'wpsg_shopdata_zip')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_city', __('Ort', 'wpsg'), $this->get_option('wpsg_shopdata_city'), array('help' => 'wpsg_shopdata_city')); ?>
+
+ <h4><?php echo __('Bankdaten', 'wpsg'); ?></h4>
+
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_name', __('Name der Bank', 'wpsg'), $this->get_option('wpsg_shopdata_bank_name'), array('help' => 'wpsg_shopdata_bank_name')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_owner', __('Kontoinhaber', 'wpsg'), $this->get_option('wpsg_shopdata_bank_owner'), array('help' => 'wpsg_shopdata_bank_owner')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_iban', __('IBAN Nummer', 'wpsg'), $this->get_option('wpsg_shopdata_bank_iban'), array('help' => 'wpsg_shopdata_bank_iban')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_bic', __('BIC Nummer', 'wpsg'), $this->get_option('wpsg_shopdata_bank_bic'), array('help' => 'wpsg_shopdata_bank_bic')); ?>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div>
+
+<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/admin/ueber.phtml b/views/admin/ueber.phtml
new file mode 100644
index 0000000..f5cfc01
--- /dev/null
+++ b/views/admin/ueber.phtml
@@ -0,0 +1,72 @@
+<?php
+
+ /**
+ * Template für den Karteireiter "Über" der Konfiguration
+ */
+
+?>
+<h2><?php echo __('Systemcheck', 'wpsg'); ?></h2>
+
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Template Pfad:', 'wpsg'); ?>
+ </div>
+ <div class="wpsg_form_right">
+ <?php echo WPSG_PATH_USERVIEW; ?>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Sprachdatei:', 'wpsg'); ?>
+ </div>
+ <div class="wpsg_form_right">
+ <?php echo WPSG_PATH_TRANSLATION; ?>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+
+<h2><?php echo __("über diese Installation", "wpsg"); ?></h2>
+
+<?php
+
+$arModule = array();
+foreach ($this->arModule as $m_key => $m)
+{
+
+ $arModule[] = $m_key.((isset($m->version))?' '.$m->version:'');
+
+}
+
+?>
+
+<?php echo wpsg_drawForm_Input('', __('wpShopGermany Version', 'wpsg'), WPSG_VERSION, array('text' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('aktivierte wpShopGermany-Module', 'wpsg'), implode(', ', $arModule), array('text' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('WordPress Version', 'wpsg'), get_bloginfo('version'), array('text' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('PHP Version', 'wpsg'), phpversion(), array('text' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('php.ini Einstellungen', 'wpsg'), "post_max_size: ". ini_get('post_max_size') . "<br />". "max_input_time: ". ini_get('max_input_time') . "<br />". "max_execution_time: ". ini_get('max_execution_time') . "<br />". "max_input_vars: ". ini_get('max_input_vars') . "<br />". "upload_max_filesize: ". ini_get('upload_max_filesize') . "<br />". "register_globals: ". ini_get('register_globals') . "<br />". "memory_limit: ". ini_get('memory_limit') . "<br />". "safe_mode: ". ini_get('safe_mode') . "<br />". "include_path: ". ini_get('include_path') . "<br />". "soap.wsdl_cache: ". ini_get('soap.wsdl_cache') . "<br />", array('text' => true, 'nohspc' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('geladene PHP Erweiterungen', 'wpsg'), implode(', ', get_loaded_extensions()), array('text' => true)); ?>
+
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for=""><?php echo __('aktive Wordpress Plugins', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <?php $arPlugins = $this->get_option('active_plugins'); ?>
+ <p>
+ <?php foreach ((array)$arPlugins as $plugin) { $plugin_data = get_plugin_data(WPSG_PATH_CONTENT.'plugins/'.$plugin); ?>
+ <?php echo $plugin_data['Name']; ?> / <?php echo $plugin_data['Version']; ?><br />
+ <?php } ?>
+ </p>
+ <br />
+ <p>
+ <?php if (wpsg_isSizedArray($this->get_option('wpsg_plugintest_active_plugins'))) { ?>
+ <a href="<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=plugintest_restore&noheader=1'; ?>"><?php echo __('Vormals aktivierte Module wieder herstellen aus Kompatibilitätstest', 'wpsg'); ?></a>
+ <?php } else { ?>
+ <a href="<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=plugintest_disable&noheader=1'; ?>"><?php echo __('Alle Plugins außer wpShopGermany deaktivieren (Kompatibilitätstest)', 'wpsg'); ?></a>
+ <?php } ?>
+ </p>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
diff --git a/views/admin/versandzonen.phtml b/views/admin/versandzonen.phtml
new file mode 100644
index 0000000..46dbc28
--- /dev/null
+++ b/views/admin/versandzonen.phtml
@@ -0,0 +1,130 @@
+<?php
+
+ /**
+ * Template für die Verwaltung der Versandzonen
+ */
+
+?>
+<script type="text/javascript">
+
+ /**
+ * Wird aufgerufen um einen neuen Satz hinzuzufügen und die Liste neu zu lasen.
+ */
+ function wpsg_addVZ()
+ {
+
+ jQuery('#wpsg_vz_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=vz&do=add&noheader=1',
+ success: function(data) {
+ jQuery('#wpsg_vz_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addVZ()
+
+ /**
+ * Wird aufgerufen wenn eine Versandzone gelöscht werden soll
+ */
+ function wpsg_removeVZ(vz_id)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie diese Versandzone löschen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_vz_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=vz&do=remove&noheader=1',
+ data: {
+ vz_id: vz_id
+ },
+ success: function(data) {
+ jQuery('#wpsg_vz_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_removeVZ(vz_id)
+
+ function wpsg_editPLZ(vz_id)
+ {
+ jQuery('#vz_' + vz_id + '_plz').attr('style', 'display:display');
+
+ return false;
+ }
+
+ function wpsg_savePLZ(vz_id)
+ {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=save_plz&noheader=1',
+ data: {
+ vz_id: vz_id,
+ textarea: jQuery('#vz_' + vz_id + '_plz textarea').val()
+ },
+ success: function(data) {
+ jQuery('#vz_' + vz_id + '_plz').attr('style', 'display:none');
+ }
+ } );
+
+ return false;
+
+ }
+
+ function wpsg_loadStandard()
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie die Standard Versandzonen und Länder laden möchten? Die alten Versandzonen und Länder gehen verloren.', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_vz_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=vz&do=loadStandard&noheader=1',
+ success: function(data) {
+ jQuery('#wpsg_vz_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_loadStandard()
+
+</script>
+
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+
+ <div class="wpsg_admin_box">
+
+ <div class="head">
+ <div class="title">
+ <div class="fulltab">
+ <?php echo __('Versandzonen', 'wpsg'); ?>
+ <a title="<?php echo __('Neue Versandzone anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addVZ();"></a>
+ </div>
+ </div>
+ </div>
+ <div class="content">
+ <span id="wpsg_vz_list"><?php $this->view['adminController']->vz_listAction(); ?></span>
+ </div>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/admin/versandzonen_list.phtml b/views/admin/versandzonen_list.phtml
new file mode 100644
index 0000000..5e15862
--- /dev/null
+++ b/views/admin/versandzonen_list.phtml
@@ -0,0 +1,89 @@
+<?php
+
+ /**
+ * Template für die Liste der Versandzonen
+ */
+
+?>
+<?php if (!is_array($this->view['data']) || sizeof($this->view['data']) <= 0) { ?>
+<?php echo __('Bisher keine Versandzonen hinterlegt.', 'wpsg'); ?>
+<?php } else { ?>
+<table class="wpsg_admin_vz_list wpsg_admin_table">
+ <tr>
+ <th class="col_name"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
+ <th class="col_innereu"><?php echo __('Inner- gemeinschaftlich', 'wpsg'); ?></th>
+ <th class="col_aktion"></th>
+ </tr>
+ <?php foreach ($this->view['data'] as $vz) { ?>
+ <tr>
+ <td class="wpsg_editable col_name">
+ <span id="vz_<?php echo $vz['id']; ?>_name" ><?php echo wpsg_hspc($vz['name']); ?></span>
+ <br />
+ <?php if (!empty($vz['param'])) { $arPLZ = unserialize($vz['param']); } ?>
+ <div id="vz_<?php echo $vz['id']; ?>_plz" style="display:none">
+ <textarea style="float:left; width:100%;"><?php echo wpsg_hspc($vz['param']); ?></textarea>
+ <input style="width:75px;" class="" type="submit" name="wpsg_mod_vz_submitsave" value="<?php echo __('Speichern', 'wpsg'); ?>" onclick="return wpsg_savePLZ(<?php echo $vz['id']; ?>);" />
+ </div>
+ </td>
+ <td class="col_innereu">
+ <input class="wpsg_innereu" <?php echo (($vz['innereu'] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" name="innereu_<?php echo $vz['id']; ?>" id="innereu_<?php echo $vz['id']; ?>" />
+ </td>
+ <td class="col_aktion">
+
+ <a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Versandzone löschen', 'wpsg'); ?>" onclick="return wpsg_removeVZ(<?php echo $vz['id']; ?>);"></a>
+ <span><a class="wpsg_icon wpsg_icon_right wpsg_icon_plzedit" href="#" title="<?php echo __('Versandzonen PLZ bearbeiten', 'wpsg'); ?>" onclick="return wpsg_editPLZ(<?php echo $vz['id']; ?>);"></a></span>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#vz_<?php echo $vz['id']; ?>_name').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ vz_id: '<?php echo $vz['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('#vz_<?php echo $vz['id']; ?>_value').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'value',
+ vz_id: '<?php echo $vz['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>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_innereu').bind('click', function() {
+
+ var checked = "0"; if (jQuery(this).prop("checked")) checked = "1";
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1',
+ data: {
+ field: 'innereu',
+ vz_id: jQuery(this).attr("id").substr(8),
+ value: checked
+ }
+ } );
+
+ } );
+
+ } );
+
+/* ]]> */</script>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/admin/widerrufsbelehrung.phtml b/views/admin/widerrufsbelehrung.phtml
new file mode 100644
index 0000000..8a184d6
--- /dev/null
+++ b/views/admin/widerrufsbelehrung.phtml
@@ -0,0 +1,73 @@
+<?php
+
+ /**
+ * Template für die Eingabe der Widerrufsbelehrung im Backend
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>&amp;noheader=1">
+
+ <div class="wpsg_widerrufstext">
+
+ <?php echo wpsg_drawForm_Textarea('wpsg_ps_mailwiderruf', __('Widerrufsbelehrung', 'wpsg'), $this->get_option('wpsg_ps_mailwiderruf'), array(
+ 'hint' => 'nohspc_'.__('Dieser Text wird in die Mail eingebunden, die der Kunde als Bestellbestätigung erhält.', 'wpsg').'<br />'.__('Das Template für die Mail finden Sie unter: <b>views/mailtemplates/kundenmail.phtml</b> bzw. <b>views/mailtemplates/html/kundenmail.phtml</b>.', 'wpsg')
+ )); ?>
+
+ <?php echo wpsg_drawForm_Upload('wpsg_widerrufsformular', __('Widerrufsformular', 'wpsg')); ?>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">&nbsp;</div>
+ <div class="wpsg_form_right">
+
+ <?php if (wpsg_isSizedString($this->view['revocationform'])) { ?>
+
+ <a target="_blank" href="<?php echo WPSG_URL_UPLOADS.'wpsg_revocation/'.$this->get_option('wpsg_revocationform'); ?>"><?php echo $this->view['revocationform']; ?></a>
+ <a onclick="if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie das Widerrufsformular löschen möchten?', 'wpsg'); ?>')) return false;" style="float:right;" href="<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=widerrufsbelehrung&noheader=1&do=removeWiderrufsformular'; ?>"><?php echo __('Widerrufsformular löschen', 'wpsg'); ?></a>
+
+ <?php } else { ?>
+
+ <p><?php echo __('Bisher wurde kein Widerrufsformular hinterlegt.', 'wpsg'); ?></p>
+
+ <?php } ?>
+
+ <div style="clear:both;"><br />
+
+ <a href="<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=widerrufsbelehrung&noheader=1&do=generateWiderrufsformular'; ?>" class="button"><?php echo __('Standardformular aus Shopinfo erstellen', 'wpsg'); ?></a>
+ <br /><br />
+
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_widerrufsformular_kundenmail', __('Anhang an Bestellbestätigung', 'wpsg'), $this->get_option('wpsg_widerrufsformular_kundenmail')); ?>
+
+ <?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_widerrufsformular_invoice', __('Anhang an Rechnung', 'wpsg'), $this->get_option('wpsg_widerrufsformular_invoice')); ?>
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_auftragsbestaetigung')) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_widerrufsformular_orderconfirm', __('Anhang an Auftragsbestätigung', 'wpsg'), $this->get_option('wpsg_widerrufsformular_orderconfirm')); ?>
+ <?php } ?>
+
+ </div>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/css/admin.css b/views/css/admin.css
new file mode 100644
index 0000000..1049541
--- /dev/null
+++ b/views/css/admin.css
@@ -0,0 +1,681 @@
+/*
+ * Diese Datei wird immer im Backend geladen. Hier sollten die Admin CSS Einstellungen rein, die nichts mit den Themes zu tun haben
+ */
+
+/*
+ * Allgemein
+ */
+.msg_wrap img { margin-bottom:1rem; margin-top:1rem; max-width:100%; height:auto; }
+.wpsg_error { color:#FF0000; font-weight:bold; }
+.wpsg_developer { color:#FF0000; }
+.wpsg_change_error { background-color:#EE3B3B !important; }
+.wpsg_erfolg { color:green; }
+.wpsg_hinweis { font-style:italic; }
+.wpsg_table .odd td { background-color:#DEDEDE; }
+.wpsg_table .even td { }
+.wpsg_message img { float:right; }
+#wikipage h1 { line-height:100%; font-size:13px; }
+.wpsg_placeholder { border-style: dashed; border-width: 1px; height: 26px; margin: 0 auto 20px; }
+#icon-wpsg-Admin { background-image:url("../../../../../wp-admin/images/icons32.png"); background-position: -370px -5px; }
+/*.tablenav-pages-wrap { width:300px !important; }*/
+.tooltip { text-decoration:none; color:inherit; cursor:inherit; }
+.tooltip:hover { color:inherit; }
+.sortable_handler { cursor:move; }
+
+/*
+ * Datepicker
+ */
+.ui-datepicker { width: 17em; padding:0; display: none; border:1px solid #444444; background-color:#F1F1F1; }
+.ui-datepicker-header { color:#FFFFFF; background-color:#444444; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-icon { width: 16px; height: 16px; background-image: url('../../lib/ui/smoothness/images/ui-icons_888888_256x240.png'); }
+.ui-datepicker .ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-datepicker .ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/*
+ * Allgemein Icons ...
+ */
+ .branch-3-8 #adminmenu .toplevel_page_wpsg-Admin .wp-menu-image:before { content: "\f174"; }
+ .branch-3-8 #adminmenu .toplevel_page_wpsg-Admin .wp-menu-image img { position:absolute; left:-100px; top:-100px; height:1px; width:1px; }
+
+.wpsg_icon { display:block; width:16px; height:16px; float:left; margin-right:4px; background-repeat:no-repeat; background-position:50% 50%; }
+.wpsg_icon_center { margin:auto; }
+.wpsg_icon_right { float:right; }
+.wpsg_icon_add { background-image:url('../gfx/add.png'); }
+.wpsg_icon_edit { background-image:url('../gfx/edit.png'); }
+.wpsg_icon_html { background-image:url('../gfx/html.png'); }
+.wpsg_icon_remove { background-image:url('../gfx/delete.png'); }
+.wpsg_icon_plzedit { background-image:url('../gfx/edit.png'); width:32px; margin-right:5px; }
+.wpsg_form_language img { margin-left:2px; margin-top:5px; margin-right:5px; }
+.wpsg_form_language a { text-decoration:none; }
+.cluetip-inner img { max-width:100%; }
+
+/* Link Klassen */
+.wpsg_link_add { background-image:url('../gfx/add.png'); padding-left:20px; background-repeat:no-repeat; line-height:20px; background-position:left 50%; height:20px; display:block; }
+
+/*
+ * Admin
+ */
+.wpsg_admin_theme { width:600px; border: 1px solid #AAAAAA; border-bottom-left-radius:6px; border-bottom-right-radius:6px; border-top-left-radius: 6px; border-top-right-radius: 6px; padding:10px; margin-bottom:10px; }
+.wpsg_admin_theme_akt { background-color:#FFFFFF !important; }
+.wpsg_admin_theme_image { width:75px; height:75px; border:1px solid #AAAAAA; float:left; }
+.wpsg_admin_theme_content { float:left; margin-left:10px; }
+.wpsg_admin_theme_name { font-weight:bold; font-size:14px; }
+.wpsg_admin_theme_info { color:#555555; }
+.wpsg_admin_theme_new { width:600px; border: 1px solid #AAAAAA; border-bottom-left-radius:6px; border-bottom-right-radius:6px; border-top-left-radius: 6px; border-top-right-radius: 6px; padding:10px; margin-bottom:10px; }
+.wpsg_admin_theme_new .button { float:right; }
+.wpsg_admin, .wpsg_admin_wrap { width:970px; }
+.wpsg_admin_topmenu { border-top: 1px solid #AAAAAA; }
+.wpsg_admin_topmenu ul { margin-top: -1px; list-style: none; width: 100%; margin-bottom: 10px; }
+.wpsg_admin_topmenu li { padding: 0px; margin: 0px; display: inline; }
+.wpsg_admin_topmenu li a { display: block; float: left; padding-left: 12px; padding-right: 12px; font: 11px/ 18px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; color: #21759B; line-height: 30px; text-decoration: none !important; }
+.wpsg_admin_topmenu li.current a { background-image: url("../gfx/tab_top.gif"); background-repeat: no-repeat; background-position: top center; }
+.wpsg_admin_topmenu li a:hover { }
+.wpsg_admin_submenu { float:left; width:200px; }
+.wpsg_admin_submenu .head { cursor:pointer; margin-left:0px; width:180px; line-height:18px; border-style: solid solid none; border-top-left-radius: 6px; border-top-right-radius: 6px; border-width: 1px 1px 0; border-color:#AAAAAA; color: #21759B; cursor:pointer !important; background-color:#F1F1F1; }
+.wpsg_admin_submenu .title { float:left; padding:5px; padding-left:12px; }
+.wpsg_admin_submenu .toggle { clear: right; cursor: default; float: right; height:26px; margin: 1px 0 0; padding: 1px 2px 0 0; width: 22px; cursor:pointer !important; }
+.wpsg_admin_submenu ul { border-bottom:1px solid #AAAAAA; border-right: 1px solid #AAAAAA; width: 181px; float: left; padding: 0px; margin: 0px; margin-left:0px; }
+.wpsg_admin_submenu ul li { border-left: 1px solid #AAAAAA; margin: 0px; }
+.wpsg_admin_submenu ul li.current { background-color: #F5F5F5; border-left: 0px; border-left:1px solid #AAAAAA; }
+.wpsg_admin_submenu ul li a { display: block; padding-left: 12px; font: 11px/ 18px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; color: #21759B; line-height: 20px; text-decoration: none !important; }
+.wpsg_admin_submenu ul li a:hover { background-color: #EAF2FA; }
+.wpsg_admin_submenu ul li.modul_akt a { background-image: url("../gfx/tick.png"); background-position: right center; background-repeat: no-repeat; font-weight: bold !important; width: 165px; }
+.wpsg_admin_content { float:left; }
+.wpsg_admin_box { width:770px; }
+.wpsg_admin_box .title { line-height:18px; padding:0px; border-style: solid solid none; border-top-left-radius: 6px; border-top-right-radius: 6px; border-width: 1px 1px 0; border-color:#AAAAAA; color: #21759B; cursor:pointer !important; background-color:#F1F1F1; }
+.wpsg_admin_box .content { border-bottom:1px solid #AAAAAA; border-right:1px solid #AAAAAA; border-left:1px solid #AAAAAA; min-height:18px; padding:5px; padding-left:12px; }
+.wpsg_admin_box .head .title { cursor:default !important; }
+.wpsg_admin_box .head .title .tab { cursor:pointer; float:left; padding-left:12px; padding-right:15px; border-right:1px solid #AAAAAA; padding-top:5px; padding-bottom:5px; }
+.wpsg_admin_box .head .title .tabright { float:right; border-left:1px solid #AAAAAA; border-right:0px; }
+.wpsg_admin_box .head .title .tab:first-child { border-top-left-radius:6px; }
+.wpsg_admin_box .head .title .tabright-last { border-top-right-radius:6px !important; }
+.wpsg_admin_box .head .title .tab:hover, .wpsg_admin_box .head .title .akttab { background-color:#FFFFFF; }
+.wpsg_admin_box .head .title .fulltab { cursor:pointer; padding:5px 5px 5px 12px; }
+.wpsg_admin_box .head .title .tablink { padding:5px; float:right; }
+.wpsg_admin_date_from { margin-right:4px;}
+.wpsg_admin_date_to { margin-right:4px; margin-left:25px; }
+.wpsg_clear { clear:both; }
+.wpsg_form_field { width:770px; margin-bottom:5px; }
+.wpsg_form_field_fullrow { position:relative; }
+.wpsg_form_field_fullrow label { font-weight:bold; line-height:25px; }
+.wpsg_form_field .wpsg_form_left { line-height:24px; font-weight:bold; width:350px; float:left; }
+.wpsg_form_field .wpsg_form_right { width:420px; float:left; position:relative; }
+.wpsg_form_field .wpsg_form_right select, .wpsg_form_field .wpsg_form_right input, .wpsg_form_field .wpsg_form_right textarea { width:95%; }
+.wpsg_form_field .wpsg_form_right input.button { width:auto; }
+.wpsg_form_field .wpsg_form_right label { line-height:25px; }
+.wpsg_form_field_max select { width:100%; }
+.postbox .wpsg_form_field .wpsg_form_left { width:330px; } /* z.B. Bestellverwaltung Bankalignment Modul */
+.wpsg_order_top { }
+.wpsg_order_top .wpsg_form_field { width:100%; }
+.wpsg_order_top .wpsg_form_field .wpsg_form_left { max-width:200px; width:50% !important; }
+.wpsg_order_top .wpsg_form_field .wpsg_form_right { width:50% !important; }
+.wpsg_order_top .wpsg_form_field .wpsg_form_right select { width:50%; float:left; }
+.wpsg_admin_box .wpsg_form_field { margin-bottom:0px; }
+.wpsg_admin_box .wpsg_form_field .wpsg_form_right { width:401px ; }
+.wpsg_form_field .wpsg_form_right_unit select, .wpsg_form_field .wpsg_form_right_unit input, .wpsg_form_field .wpsg_form_right_unit textarea { width:80%; float:left; }
+.wpsg_form_field .wpsg_form_right_unit p.wpsg_unit { width:15%; float:left; }
+.wpsg_form_field .wpsg_form_right textarea { height:100px; }
+.wpsg_form_field .wpsg_form_right input.checkbox { width:auto !important; float:left; margin-left:2px; margin-top:5px; }
+.wpsg_form_field .wpsg_form_right p { padding:4px 0px 4px 6px; margin:0px; }
+.wpsg_formfield_small .wpsg_form_left { line-height:12px; }
+.wpsg_formfield_small .wpsg_form_right p { line-height:12px; padding-top:0px; padding-bottom:0px; }
+.widget-inside .wpsg_form_field { width:100%; }
+.widget-inside .wpsg_form_left { width:100%; }
+.widget-inside .wpsg_form_right { width:100%; }
+.widget-inside .wpsg_form_field .wpsg_form_right select,
+.widget-inside .wpsg_form_field .wpsg_form_right input,
+.widget-inside .wpsg_form_field .wpsg_form_right textarea { width:100%; }
+.timestamp-wrap input, .timestamp-wrap select { width:auto !important; }
+.produktwrap .wpsg_form_field { width:780px; }
+.produktwrap .wpsg_form_left { width:380px; }
+.produktwrap .wpsg_form_right { width:400px; }
+.wpsg_form_help { right:0px; top:4px; position:absolute; display:block; width:16px; height:16px; background-image:url('../gfx/help.png'); }
+.widget-content .wpsg_form_help { position:relative; float:right; margin-top:-2px; }
+.wpsg_form_help_notip { right:0px; top:4px; position:absolute; display:block; width:16px; height:16px; background-image:url('../gfx/help.png'); }
+.wpsg_admin_content { padding:0px; margin:0px; float:left; width:750px; }
+.wpsg_admin_content h3 { position:relative; }
+.wpsg_admin_table { width:100%; }
+.wpsg_admin_box .wpsg_admin_table { margin-left:-3px; }
+.wpsg_admin_table th { font-weight:bold; text-align:left; padding:3px; }
+.wpsg_admin_table td { padding:3px; }
+.wpsg_admin_wpsg_list .col_name { }
+.wpsg_admin_wpsg_list .col_value { width:100px; }
+.wpsg_admin_wpsg_list .col_aktion { width:50px; }
+.wpsg_editable { border-bottom:1px dotted #666666; cursor:pointer; }
+.wpsg_editable input, .wpsg_editable select { height:24px !important; font-size:12px; }
+.wpsg_editable input { width:100%; }
+.wpsg_pflichtfelder { border-spacing:0px; width:100%; }
+.wpsg_pflichtfelder td { padding:0px; }
+.wpsg_pflichtfelder tr th { text-align:left; }
+.wpsg_pflichtfelder td.col1 select,
+.wpsg_pflichtfelder td.col1 input { width:100%; }
+.wpsg_customfields { border-spacing:0px; width:100%; }
+.wpsg_customfields td { padding:0px; }
+.wpsg_customfields tr th { text-align:left; }
+.wpsg_customfields td select { width:100%; }
+.wpsg_customfields .col0 { width:45px; }
+.wpsg_customfields .col1 { width:305px; }
+.wpsg_customfields .col4 { width:25px; }
+.wpsg_customfields .col5 { text-align:center; }
+.wpsg_customfields .col2345 input { width:100%; }
+table.wpsg_admin_laender_list { font-size:12px; }
+table.wpsg_admin_laender_list tr.odd td { background-color:#DEDEDE; }
+table.wpsg_admin_laender_list tr.even td {}
+.wpsg_admin_laender_list .col_vz { width:100px; }
+.wpsg_admin_laender_list .col_default { width:75px; text-align:center; }
+.wpsg_admin_laender_list .col_mwst { width:55px; }
+.wpsg_admin_laender_list .col_mwstsetting { width:100px; }
+.wpsg_admin_laender_list .col_action { width:40px; }
+.wpsg_mod_produktattribute_table { width:100%; table-layout:fixed; }
+.wpsg_mod_produktattribute_table .col_id { width:25px; text-align:left; }
+.wpsg_mod_produktattribute_table .col_name { text-align:left; }
+.wpsg_mod_produktattribute_table .col_typ { width:100px; text-align:left; }
+.wpsg_mod_produktattribute_table .col_typ select { width:100%; }
+.wpsg_mod_produktattribute_table .col_html { width:35px; }
+.wpsg_mod_produktattribute_table .col_aktion { width:50px; text-align:center; }
+.wpsg_dialog { padding:10px; }
+.wpsg_code { background-color:#EFEFEF; border:1px solid #000000; padding:3px; margin-top:5px; margin-bottom:5px; font-family:monospace; font-size:12px; }
+.wpsg_tablerow td { padding:2px 0px 2px 0px; }
+.wpsg_odd:hover, .wpsg_even:hover, .wpsg_tablerow:hover, .wpsg_tablerow:hover td, .wpsg_tablerow_hover, .wpsg_tablerow_hover td { background-color:#EFEFEF !important; }
+.wpsg_odd td { }
+.wpsg_even td { }
+.wpsg_widerrufstext .wpsg_form_field .wpsg_form_left { width:270px; }
+.wpsg_widerrufstext .wpsg_form_field .wpsg_form_right { width:500px; }
+.wpsg_widerrufstext .wpsg_form_field .wpsg_form_right textarea { height:200px; }
+.tabcontent .wpsg_form_right { width:400px; }
+.tabcontent .wpsg_form_right input, .tabcontent .wpsg_form_right select { width:94%; }
+.wpsg_mail_head { border-bottom:1px solid #AAAAAA; }
+.wpsg_mail_content, wpsg_admin_box_content { display:none; }
+.wpsg_handlediv .handlediv { position:absolute; right:0px; top:0px; }
+.wpsg_handlediv span a.wpsg_form_help { float:left; display:block; position:relative; top:0px; margin-right:5px; }
+.wpsg_register_modullist { width:100%; }
+.wpsg_register_modullist th { text-align:left; }
+.wpsg_register_modullist .wpsg_col_aktion { text-align:right; }
+.wpsg_modultable { width:100%; }
+.wpsg_modultable tr th { text-align:left; }
+.wpsg_modultable tr .wpsg_col_name { padding-right:25px; }
+.wpsg_modultable tr .wpsg_col_instversion { padding-right:25px; }
+.wpsg_modultable tr .wpsg_col_licence { padding-right:25px; }
+.wpsg_modultable tr .wpsg_col_availableversion { padding-right:25px; }
+.wpsg_admin_vz_list .col_aktion .wpsg_icon_remove { float:right; }
+.wpsg_admin_vz_list .col_aktion { width:75px; }
+.wpsg_admin_vz_list .col_innereu { text-align:center; width:75px; }
+
+/*
+ * Dialog im Backend
+ * z.B. Änderung der Adresse in Bestellverwaltung
+ */
+.wpsg_dialog { }
+.wpsg_dialog_content { margin:10px; }
+.wpsg_dialog .wpsg_form_field { box-sizing:border-box; padding-left:5px; padding-right:5px; width:100%; }
+.wpsg_dialog .wpsg_form_field input, .wpsg_dialog .wpsg_form_field select { width:100%; box-sizing:border-box; }
+.wpsg_dialog .wpsg_form_field .wpsg_form_left { width:50%; }
+.wpsg_dialog .wpsg_form_field .wpsg_form_right { width:50%; }
+
+/*
+ * Seitenrefresh im Backend
+ * z.B. in der Bestellverwaltung
+ */
+#wpsg_backend_loading { position:fixed; z-index:100000; width:100%; height:100%; left:0px; top:0px; background-color:rgba(0, 0, 0, 0.75); }
+#wpsg_backend_loading .wpsg_inner { color:#FFFFFF; font-size:2rem; margin:auto; text-align:center; margin-top:20%; }
+
+/*
+ * Produktverwaltung
+ */
+.wpsg_produktindex .wpsg_pic_col { width:50px; }
+.wpsg_produktindex #wpsg_product_search_button { background-position:50% 50%; background-repeat:no-repeat; background-image:url('../gfx/lupe.png'); }
+.wpsg_produkt_addedit .wpsg_form_field { width:100%; }
+.wpsg_produkt_addedit .wpsg_form_field .wpsg_form_left { width:20%; font-weight:bold; line-height:24px; }
+.wpsg_produkt_addedit .wpsg_form_field .wpsg_form_right { width:80%; float:left; }
+.wpsg_produkt_addedit .wpsg_form_field .wpsg_form_right input { width:100%; }
+.wpsg_produkt_addedit .wpsg_form_field .wpsg_form_right textarea { width:100%; }
+.wpsg_produkt_addedit .wpsg_form_field .wpsg_form_right_unit input { width:95%; }
+.wpsg_produkt_addedit .wpsg_form_field .wpsg_form_right .wp-editor-wrap input { width:auto !important; }
+.wpsg_produkt_addedit .wpsg_form_field .wpsg_form_right_unit p.wpsg_unit { width:4%; float:right; }
+.wpsg_produkt_addedit .wpsg_form_field .wpsg_form_right input.wpsg-datepicker { width:85%; }
+.wpsg_produkt_addedit .wpsg_form_field .wpsg_form_right .ui-datepicker-trigger { margin-left:3px; margin-top:5px; }
+.wpsg_produkt_addedit .wpsg_form_field .wpsg_form_right select { width:100%; }
+.wpsg_produkt_addedit .wpsg_form_field .wpsg_form_right_help select { width:95%; }
+.wpsg_produkt_addedit .wpsg_form_field .wpsg_form_right input.wpsg_preis { width:60%; }
+.wpsg_produkt_addedit .wpsg_form_field .wpsg_form_right .waehrung { float:right; }
+.wpsg_produkt_addedit #side-info-column .wpsg_form_field .wpsg_form_left { width:50%; }
+.wpsg_produkt_addedit #side-info-column .wpsg_form_field .wpsg_form_right { width:50%; }
+.wpsg_posturl { margin-bottom:5px; }
+
+/*
+ * Bestellverwaltung
+ */
+.wpsg_order_datum { color:#999999; }
+.wpsg_order_adress { color:#999999; }
+.wpsg_order_view .inner-sidebar .wpsg_form_field { width:100%; }
+.wpsg_order_view .inner-sidebar .wpsg_form_field .wpsg_form_left { width:100%; }
+.wpsg_order_view .inner-sidebar .wpsg_form_field .wpsg_form_right { width:100%; margin-top:-5px; }
+.wpsg_order_view #post-body-content .wpsg_form_field { width:100%; }
+.wpsg_order_view #post-body-content .wpsg_form_field .wpsg_form_left { width:20%; min-width:200px; }
+.wpsg_order_view #post-body-content .wpsg_form_field .wpsg_form_right { width:auto; }
+.wpsg_order_view .wpsg_produkte { width:100%; }
+.wpsg_order_view tr.wpsg_kopf th { text-align:left; }
+.wpsg_order_view .wpsg_cell_preis { width:100px; text-align:right !important; padding-right:10px; }
+.wpsg_order_view .wpsg_cell_mwst { width:100px; text-align:right !important; padding-right:10px; }
+.wpsg_order_view .wpsg_cell_menge { width:100px; text-align:center !important; padding-right:10px; }
+.wpsg_order_view .wpsg_cell_gesamtpreis { width:100px; text-align:right !important; }
+.wpsg_order_view .wpsg_cell_summe_value { text-align:right !important; text-decoration:underline; }
+.wpsg_order_view .wpsg_cell_shipping_value { text-align:right !important; }
+.wpsg_order_view .wpsg_cell_payment_value { text-align:right !important; }
+.wpsg_order_view .wpsg_cell_payment_value { text-align:right !important; }
+.wpsg_order_view .wpsg_cell_rabatt_value { text-align:right !important; }
+.wpsg_order_view .wpsg_cell_mwst_value { text-align:right !important; }
+.wpsg_order_view .wpsg_cell_mwst_value, .wpsg_order_view .wpsg_cell_mwst_label { font-size: 10px; line-height: 18px; }
+.wpsg_order_view .wpsg_cell_gesamt_value { text-align:right !important; font-weight:bold; text-decoration:underline; }
+.wpsg_order_view .wpsg_order_admincomment { width:100%; height:100px; }
+.wpsg_order_view .wpsg_order_admincomment_submit { margin-top:5px; margin-bottom:5px; }
+.wpsg_order_view #wpsg_generally .wpsg_form_left { width:200px; }
+.wpsg_orderlog { width:100%; }
+.wpsg_orderlog .col_date { width:135px; text-align:left; }
+.wpsg_orderlog .col_aktion { width:100px; text-align:right; }
+.wpsg_orderlog .col_title { text-align:left; }
+.wpsg_orderlog .col_mailtext { background-color:#FFFFFF; font-family:monospace; }
+.wpsg_orderlog .col_mailtext textarea { width:100%; height:250px; overflow:scroll; border:0px; background-color:#DSDSDS; border:1px solid #C4C4C4; overflow:auto; max-width:100%; }
+.wpsg_order_index_status { float:none !important; margin:0px 300px 0px 0px; }
+.wpsg_order_index_status .akt { font-weight:bold; color:#000000; }
+.wpsg_order_index_status li { float:left !important; }
+.wpsg_order_index_status li span { line-height:2; padding:0.2em; }
+.wpsg_tablenav { clear:right; float:right; }
+.wpsg-search-box { margin-top:-6px !important; }
+
+/*
+ * Produktbilder
+ */
+.wpsg_mod_produktbilder_admin_bild { float:left; margin-right:5px; }
+
+/*
+ * Downloadprodukte
+ */
+.wpsg_mod_downloadprodukte_admin_delete { height:16px; width:16px; float:right; background-image:url('../gfx/delete.png'); cursor:pointer; }
+
+/*
+ * Kundenverwaltung
+ */
+#wpsg_customercomment textarea, #postbox_kunde_kommentar textarea { width:100%; height:150px; }
+.wpsg_mod_kundenverwaltung_customeramount .wpsg_storno { color:#000000; }
+.wpsg_mod_kundenverwaltung_customeramount .wpsg_open { color:#FF0000; }
+.wpsg_mod_kundenverwaltung_customeramount .wpsg_payed { color:#008000; }
+.wpsg_customer_index .wpsg-row-actions > div { visibility:hidden; }
+.wpsg_customer_index .wpsg-row-actions:hover > div { visibility:visible; } /* Bug:? Chrome */
+
+/* Kundengruppenverwaltung */
+.wpsg_mod_kundenverwaltung_customergroup_index .col-id { width:55px; }
+.wpsg_mod_kundenverwaltung_customergroup_index .col-name { }
+.wpsg_mod_kundenverwaltung_customergroup_index .col-customercount { width:150px; }
+.wpsg_mod_kundenverwaltung_customergroup_index .col-calculation { width:150px; }
+.wpsg_mod_kundenverwaltung_customergroup_addedit .wpsg_form_field .wpsg_form_left { width:100%; }
+.wpsg_mod_kundenverwaltung_customergroup_addedit .wpsg_form_field .wpsg_form_right { width:100%; }
+
+/*
+ * Versandarten
+ */
+.va_table { width:100%; table-layout:fixed; border-collapse: collapse; }
+.va_table .wpsg_label { font-weight:bold; width:250px; padding:2px; }
+.va_table .wpsg_value { padding:2px; }
+.va_table .wpsg_delcol { position:relative; width:25px; text-align:right; padding:2px 0px 2px 2px; }
+.va_table .wpsg_delcol .wpsg_form_help { position:relative; }
+.va_table .wpsg_delcol a { float:right; }
+.va_table .wpsg_mwst_checkbox { width:20px; }
+
+/*
+ * Rechnungsmoudl
+ */
+.wpsg_mod_rechnungen_fieldtable { width:100%; }
+.wpsg_mod_rechnungen_fieldtable th { text-align:left; }
+.wpsg_mod_rechnungen_fieldtable th.col_x, .wpsg_mod_rechnungen_fieldtable th.col_y { text-align:center; }
+.wpsg_mod_rechnungen_fieldtable .col_bezeichnung { width:100px; }
+.wpsg_mod_rechnungen_fieldtable .col_freitext { }
+.wpsg_mod_rechnungen_fieldtable .col_x { width:50px; }
+.wpsg_mod_rechnungen_fieldtable .col_y { width:50px; }
+.wpsg_mod_rechnungen_fieldtable .col_color { width:50px; }
+.wpsg_mod_rechnungen_fieldtable .col_groesse { width:50px; }
+.wpsg_mod_rechnungen_fieldtable .col_action { width:50px; }
+.wpsg_foottextlist { width:100%; }
+.wpsg_foottextlist th { text-align:left; }
+.col_standard { text-align:center; width:50px; }
+
+/* Lieferscheinmodul (wpsg_mod_deliverynote) */
+.wpsg_mod_deliverynote_fieldtable { width:100%; }
+.wpsg_mod_deliverynote_fieldtable th { text-align:left; }
+.wpsg_mod_deliverynote_fieldtable th.col_x, .wpsg_mod_rechnungen_fieldtable th.col_y { text-align:center; }
+.wpsg_mod_deliverynote_fieldtable .col_bezeichnung { width:100px; }
+.wpsg_mod_deliverynote_fieldtable .col_freitext { }
+.wpsg_mod_deliverynote_fieldtable .col_x { width:50px; }
+.wpsg_mod_deliverynote_fieldtable .col_y { width:50px; }
+.wpsg_mod_deliverynote_fieldtable .col_color { width:50px; }
+.wpsg_mod_deliverynote_fieldtable .col_groesse { width:50px; }
+.wpsg_mod_deliverynote_fieldtable .col_action { width:50px; }
+
+/*
+ * Videodownload Modul
+ */
+.wpsg_mod_videodownload_fieldtable { width:100%; }
+.wpsg_mod_videodownload_fieldtable th { text-align:left; }
+.wpsg_mod_videodownload_fieldtable .col_bezeichnung { width:25px; }
+.wpsg_mod_videodownload_fieldtable .col_freitext_label { font-weight:bold; }
+.wpsg_mod_videodownload_fieldtable .col_freitext { }
+.wpsg_mod_videodownload_fieldtable .col_x { width:35px; }
+.wpsg_mod_videodownload_fieldtable .col_y { width:35px; }
+.wpsg_mod_videodownload_fieldtable .col_color { width:50px; }
+.wpsg_mod_videodownload_fieldtable .col_alpha { width:35px; }
+.wpsg_mod_videodownload_fieldtable .col_align { width:35px; text-align:center; }
+.wpsg_mod_videodownload_fieldtable .col_angle { width:50px; }
+.wpsg_mod_videodownload_fieldtable .col_groesse { width:50px; }
+.wpsg_mod_videodownload_fieldtable .col_font { width:150px; }
+.wpsg_mod_videodownload_fieldtable .col_font select { width:100%; }
+.wpsg_mod_videodownload_fieldtable .col_action { width:75px; }
+.wpsg_mod_videodownload_admin_delete { height:16px; width:16px; float:right; background-image:url('../gfx/delete.png'); cursor:pointer; }
+.wpsg_mod_videodownload_order_view_filelist { width:100%; }
+.wpsg_mod_videodownload_order_view_filelist .col_file { text-align:left; }
+.wpsg_mod_videodownload_order_view_filelist .col_status { text-align:left; }
+.wpsg_mod_videodownload_order_view_filelist .col_action { text-align:left; }
+.wpsg_mod_videodownload_order_view_filelist .row_raid td { color:red; }
+
+/*
+ * PDFdownload Modul
+ */
+.wpsg_mod_downloadplus_fieldtable { width:100%; }
+.wpsg_mod_downloadplus_fieldtable th { text-align:left; }
+.wpsg_mod_downloadplus_fieldtable .col_bezeichnung { width:25px; }
+.wpsg_mod_downloadplus_fieldtable .col_freitext_label { font-weight:bold; }
+.wpsg_mod_downloadplus_fieldtable .col_freitext { }
+.wpsg_mod_downloadplus_fieldtable .col_x { width:35px; }
+.wpsg_mod_downloadplus_fieldtable .col_y { width:35px; }
+.wpsg_mod_downloadplus_fieldtable .col_color { width:50px; }
+.wpsg_mod_downloadplus_fieldtable .col_alpha { width:35px; }
+.wpsg_mod_downloadplus_fieldtable .col_align { width:35px; text-align:center; }
+.wpsg_mod_downloadplus_fieldtable .col_bg { width:35px; text-align:center; }
+.wpsg_mod_downloadplus_fieldtable .col_angle { width:50px; }
+.wpsg_mod_downloadplus_fieldtable .col_groesse { width:50px; }
+.wpsg_mod_downloadplus_fieldtable .col_font { width:150px; }
+.wpsg_mod_downloadplus_fieldtable .col_font select { width:100%; }
+.wpsg_mod_downloadplus_fieldtable .col_action { width:75px; }
+.wpsg_mod_downloadplus_admin_delete { height:16px; width:16px; float:right; background-image:url('../gfx/delete.png'); cursor:pointer; }
+.wpsg_mod_downloadplus_order_view_filelist { width:100%; }
+.wpsg_mod_downloadplus_order_view_filelist .col_file { text-align:left; }
+.wpsg_mod_downloadplus_order_view_filelist .col_status { text-align:left; }
+.wpsg_mod_downloadplus_order_view_filelist .col_action { text-align:left; }
+.wpsg_mod_downloadplus_order_view_filelist .row_raid td { color:red; }
+.wpsg_mod_downloadplus_security input { float:left; width:auto !important; }
+.wpsg_mod_downloadplus .wpsg_border_bottom td { border-top:1px solid #DEDEDE; height:1 px; }
+
+/*
+ * Variantenverwaltung
+ */
+#wpsg_vp_drawVarianten div.wpsg_editable { width:auto; display:inline-block; }
+#wpsg_vp_drawVarianten .col_preis { width:150px; text-align:left; }
+#wpsg_vp_drawVarianten .col_fmenge { width:100px; text-align:left; }
+#wpsg_vp_drawVarianten .col_variname { width:350px; }
+#wpsg_vp_drawVarianten .col_variartnr { width:200px; text-align:left; }
+#wpsg_vp_drawVarianten .col_stock { width:100px; text-align:left; }
+#wpsg_vp_drawVarianten .wpsg_mod_varianten_productimage_row .pic { display:block; float:left; margin-right:5px; padding:5px; height:25px; width:25px; }
+#wpsg_vp_drawVarianten .wpsg_mod_varianten_productimage_row .mark { background-color:rgb(174, 174, 174); }
+#wpsg_vp_drawVarianten .wpsg_mod_varianten_orderwrap_image .wpsg_mod_varianten_productimage_row .mark:first-of-type { background-color:black; }
+#wpsg_vp_drawVarianten .wpsg_mod_varianten_ajaxloading { width:100%; height:100%; position:absolute; left:0px; top:0px; background-color:rgba(125, 125, 125, 0.5); margin-top:-10px; padding-bottom:21px; }
+#wpsg_vp_drawVarianten .wpsg_mod_varianten_ajaxloading img { position:absolute; left:50%; top:50%; margin-left:-8px; margin-top:-5.5px; }
+
+/*
+ * Gutscheinmodul
+ */
+.wpsg_mod_gutschein .vouchertable { width:100%; }
+.wpsg_mod_gutschein .column-checkbox { width:25px; text-align:center; }
+.wpsg_mod_gutschein .column-nr { width:50px; text-align:left; }
+
+/*
+ * Related Products
+ */
+.wpsg_productselect { padding:15px; }
+.wpsg_productselect .wpsg_form_field { width:100%; }
+.wpsg_productselect .wpsg_form_left { width:50%; }
+.wpsg_productselect .wpsg_form_right { width:50%; }
+.wpsg_productselect .wpsg_form_right select { float:right; }
+#relatedproducts_list select { width:105px !important; }
+#relatedproducts_list .wpsg_icon { margin-top:5px; }
+
+/* Export Profile */
+#profil_content .wpsg_form_field { width:745px; }
+#profil_content .wpsg_form_field .wpsg_form_right { width:395px; min-height:24px; line-height:24px; }
+#profil_content #message { margin-left:0px; }
+#profil_content .wpsg_mod_export_fieldlist { width:100%; }
+#profil_content .wpsg_mod_export_fieldlist th { text-align:left; padding:2px 5px 2px 0px; }
+#profil_content .wpsg_mod_export_fieldlist td { text-align:left; padding:2px 5px 2px 0px; }
+#profil_content .wpsg_mod_export_fieldlist .odd td { background-color:#DEDEDE; }
+#profil_content .wpsg_mod_export_fieldlist .even { }
+#profil_content .wpsg_mod_export_col_field_user { font-weight:bold; }
+#wpsg_modexport .wpsg_mod_export_profillabel { margin-right:15px; display:block; float:left; }
+
+/* Produktvariablen */
+.wpsg_pv_table { width:100%; }
+.wpsg_pv_table tr td { vertical-align:top; }
+.wpsg_pv_table .wpsg_id { width:20px; text-align:left; cursor:move; }
+.wpsg_pv_table .wpsg_delcol { width:24px; text-align:center; }
+.wpsg_pv_table .wpsg_typ { width:100px; text-align:left; }
+.wpsg_pv_table .wpsg_pflicht { width:100px; text-align:center; }
+.wpsg_pv_table .wpsg_label { text-align:left; }
+
+/* Bestellvariablen */
+.wpsg_ov_table { width:100%; }
+.wpsg_ov_table .wpsg_id { width:20px; text-align:left; }
+.wpsg_ov_table .wpsg_delcol { width:24px; text-align:center; }
+.wpsg_ov_table .wpsg_typ { width:100px; text-align:left; }
+.wpsg_ov_table .wpsg_pflicht { width:100px; text-align:center; }
+.wpsg_ov_table .wpsg_label { text-align:left; }
+
+/* Statistikmodul */
+.wpsg_mod_statistics_totals_row { width:100%; }
+.wpsg_mod_statistics_totals_block { float:left; width:auto; text-align:center; font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif; }
+.wpsg_mod_statistics_totals_block .number { font-size:18px; color:#21759B; display:block; padding-bottom:10px; padding-top:5px; }
+.wpsg_mod_statistics_totals_block .label { font-size:16px; color:#8F8F8F; display:block; padding-bottom:5px; }
+.wpsg_mod_statistics_totals_block .label a { color:#8F8F8F; border-bottom:1px solid #ECECEC; padding-left:10px; padding-right:15px; padding-bottom:5px; }
+.subsubsub #table-data .th-right span { float:right; }
+.subsubsub #table-data .td-right { text-align:right; }
+
+/* Zahlvarianten */
+.zv_table { width:100%; table-layout:fixed; border-collapse: collapse; }
+.zv_table .wpsg_label { font-weight:bold; width:250px; padding:2px; }
+.zv_table .wpsg_value { padding:2px; }
+.zv_table .wpsg_delcol { width:25px; position:relative; text-align:right; padding:2px 0px 2px 2px; }
+.zv_table .wpsg_delcol .wpsg_form_help { position:relative; top:0px; }
+.zv_table .wpsg_delcol a { float:right; }
+.zv_table .wpsg_mwst_checkbox { width:20px; }
+
+/* Auftragsbest�tigung */
+.wpsg_order_view_auftragsbestaetigung { width:100%; }
+.wpsg_order_view_auftragsbestaetigung_submit { margin-top:5px; margin-bottom:5px; }
+
+/* Rabattmodul */
+.wpsg_mod_discount_generalcol { float:left; width:33%; }
+.wpsg_mod_discount_seriescol { float:left; width:50%; line-height:25px; vertical-align:middle; }
+.wpsg_mod_discount_seriescol_sub { width:25%; }
+.wpsg_mod_discount_seriescol input[type=text] { width:70% !important; }
+.wpsg_mod_discount_seriescol input[type=checkbox] { width:auto !important; margin-right:5px; }
+.wpsg_mod_discount_settings #wpsg_mod_discount_hierarchie ul { margin-top:0px; }
+.wpsg_mod_discount_settings #wpsg_mod_discount_hierarchie input[type="checkbox"] { width:auto; }
+.wpsg_mod_discount_settings #wpsg_mod_discount_hierarchie ul li { padding-left:5px; width:96%; line-height:25px; height:25px; background-color:#DDDDDD; cursor:move; }
+.wpsg_mod_discount_settings #wpsg_mod_discount_hierarchie ul li input { display:none; }
+
+/* Registrierung */
+.wpsg_registerform { padding:10px; }
+.wpsg_registersuccess { color:green; }
+.wpsg_registerfailure { color:red; }
+
+/* Berechtigungsverwaltung */
+.wpsg_access_table { width:100%; table-layout:fixed; margin-top:50px; }
+.wpsg_access_table .wpsg_col_capname { width:150px; padding-right:25px; }
+.wpsg_access_table th.wpsg_col_cap { -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); height:40px; text-align:center; width:25px; }
+.wpsg_access_table td.wpsg_col_cap { text-align:center; }
+
+/* Gutscheinproduktmodul */
+.wpsg_mod_voucherproduct_list .wpsg_mod_voucherproduct_code { float:left; }
+.wpsg_mod_voucherproduct_list .wpsg_mod_voucherproduct_status { width:auto; float:right; text-align:right; }
+#wpsg_voucherproduct_target .wpsg_button { float:left; }
+
+/* Statistimodul */
+#wpsg_statistics_form .wpsg_form_field .wpsg_form_left { width:70px; }
+.wpsg-table-data-wrapper { float:left; margin-right:15px; }
+td.jqplot-table-legend { vertical-align:middle !important; white-space:no-wrap !important; }
+.orderdown .sorting-indicator { background-image: url("../../../../../wp-admin/images/sort.gif"); background-position:0% 50%; display:inline-block; height:10px; width:7px; }
+.orderup .sorting-indicator { background-image: url("../../../../../wp-admin/images/sort.gif"); background-position:100% 50%; display:inline-block; height:10px; width:7px; }
+.orderdown span, .orderup span { cursor: pointer; float:none !important; }
+
+/* Bankabgleichsmodul (mod_bankalignment) */
+.wpsg_mod_bankalignment_order_ajax .row-details { font-family:monospace; display:none; }
+
+/* E-Bay Schnittstelle (mod_ebay) */
+#wpsg_mod_ebay_categorieselect_dialog { padding:10px; }
+#wpsg_mod_ebay_categorieselect_dialog select { width:100%; }
+#wpsg_mod_ebay_categorietext { float:left; }
+.wpsg_mod_ebay_cattarget img { margin-top:5px; }
+
+/* Staffelpreismodul (mod_scaleprice) */
+.wpsg_mod_scaleprice_label_scale { float:left; width:25%; font-weight:normal; }
+.wpsg_mod_scaleprice_label_value { float:right; width:25%; text-align:center; font-weight:normal; }
+.wpsg_mod_scaleprice_value { width:48% !important; float:left !important; }
+.wpsg_mod_scaleprice_scale { width:48%; float:left; }
+.wpsg_mod_scaleprice_row .wpsg_form_left .wpsg_editable { width:48%; float:left; text-align:right; font-weight:normal; }
+.wpsg_mod_scaleprice_row .wpsg_form_right .wpsg_editable { line-height: 24px; text-align:right; width:48%; float:left; font-weight:normal; }
+#wpsg_mod_scaleprice_target p.waehrung { width:25%; float:left; padding-top:3px; }
+#wpsg_mod_scaleprice_target .wpsg_icon_add { margin-top:3px; }
+#wpsg_mod_scaleprice_target .wpsg_icon_remove { margin-top:3px; }
+
+/* H�ndlerbund (mod_haendlerbund) */
+.wpsg_mod_haendlerbund_settings .wpsg_mod_haendlerbund_date { float:right; line-height:25px; margin-right:25px; }
+
+/* Rechtstexte */
+.wpsg_ps_update input[type="checkbox"] { width:auto !important; margin-top:5px; margin-right:5px; float:left; }
+
+/* Micropayment (mod_micropayment) */
+#wpsg_mod_micropayment_handypay_infolayer, #wpsg_mod_micropayment_call2pay_infolayer { line-height:0.65rem; padding-top:0.5rem; padding-bottom:0.5rem; }
+#wpsg_mod_micropayment_handypay_infolayer ul, #wpsg_mod_micropayment_call2pay_infolayer ul { list-style:circle; margin-left:15px; }
+
+.wpsg_mod_test_table table { width:100%; }
+.wpsg_mod_test_table table th { text-align:left; font-size:12px; line-height:16px; }
+.wpsg_mod_test_table table td { test-align:left; font-size:12px; line-height:16px; }
+
+/* Hilfetooltip */
+.cluetip-title { background-color:#767676 !important; color:#FFFFFF !important; }
+.cluetip-title a { color:#FFFFFF !important; }
+.cluetip-inner { background-color: #F7F7F7; }
+.clue-left-default .cluetip-arrows { background-image:url('../gfx/darrowright.gif') !important; margin-top:5px !important; }
+.clue-right-default .cluetip-arrows { background-image:url('../gfx/darrowleft.gif') !important; margin-top:5px !important; }
+
+/* Bankeinzug (wpsg_mod_autodebit) */
+input.wpsg_mod_autodebit_button { width:100% !important; }
+
+/* 3.8 Kompatibilit�t */
+.version-3-8 .wpsg_order_view .inner-sidebar .wpsg_form_field .wpsg_form_left { width:40%; }
+.version-3-8 .wpsg_order_view .inner-sidebar .wpsg_form_field .wpsg_form_right { width:60%; }
+
+/* Modul "Wirecard" */
+.wpsg_mod_wirecard_paymenttypeselect input[type="checkbox"] { width:auto; margin-left:5px; margin-top:-3px; }
+.wpsg_mod_wirecard_paymenttypeselect li { padding-left:5px; width:100%; line-height:25px; height:25px; background-color:#DDDDDD; cursor:move; }
+
+/* Modul "Bestellbedingungen" */
+.wpsg_mod_ordercondition_text { width:100%; height:300px; }
+
+/* Modul "Kundenkontakt" */
+#kk_text { font-family:"Courier New"; }
+
+/* Rechtstexte */
+.wpsg_mod_legaltexts_protectedshops_table { width:100%; }
+.wpsg_mod_legaltexts_protectedshops_table th { text-align:left; width:343px; }
+.wpsg_ps_update { float:right; }
+.wpsg_ps_status { float:left; }
+select.wpsg_ps_page { width:73%; }
+select.wpsg_ps_format { float:right; width:23%; }
+#wpshopgermany_ts_shopid { width:100%; }
+#wpsgitrecht_message { margin-left:5px; }
+.wpsgitrecht_clear { clear:both; }
+.wpsgitrecht_form_field { width:770px; margin-bottom:5px; }
+.wpsgitrecht_form_field .wpsgitrecht_form_left { line-height:24px; font-weight:bold; width:350px; float:left; }
+.wpsgitrecht_form_field .wpsgitrecht_form_right { width:420px; float:left; position:relative; line-height:28px; }
+.wpsgitrecht_form_field .wpsgitrecht_form_right select, .wpsgitrecht_form_field .wpsgitrecht_form_right input { width:95%; }
+.wpsgitrecht_form_field .wpsgitrecht_form_right input.checkbox { width:auto !important; float:left; margin-left:2px; margin-top:5px; }
+.wpsgitrecht_form_field .wpsgitrecht_form_right p { padding:4px 0px 4px 6px; margin:0px; }
+.wpsgitrecht_form { padding:10px; }
+.wpsgitrecht_date { float:right; padding-right:5%; }
+.wpsgitrecht_hinweis { font-style:italic; }
+.wpsgitrecht_table { border-spacing:0px; border-collapse:collapse; }
+.wpsgitrecht_table .col0 { width:347px; }
+.wpsgitrecht_table .col1 { width:400px; }
+.wpsgitrecht_table .col1 p { padding:2px 0px 2px 10px; display:inline-block; margin:0px; }
+.wpsgitrecht_table .col1 select { width:100%; }
+.wpsg_itrecht_generatebutton { width:16px; height:16px; background-image:url('../gfx/arrow_refresh_small.png'); ?>); display:inline-block; float:right; margin-top:6px; }
+
+/* Modul "Paketverfolgung" */
+.wpsg_mod_packagetracking_settings_edit_list .trackingprovider_table { width:100%; table-layout:fixed; border-collapse: collapse; }
+.wpsg_mod_packagetracking_settings_edit_list .trackingprovider_table .wpsg_label { font-weight:bold; width:150px; padding:2px; }
+.wpsg_mod_packagetracking_settings_edit_list .trackingprovider_table .wpsg_value { padding:2px; }
+.wpsg_mod_packagetracking_settings_edit_list .trackingprovider_table .wpsg_delcol { position:relative; width:25px; text-align:right; padding:2px 0px 2px 2px; }
+.wpsg_mod_packagetracking_settings_edit_list .trackingprovider_table .wpsg_delcol .wpsg_form_help { position:relative; }
+.wpsg_mod_packagetracking_settings_edit_list .trackingprovider_table .wpsg_delcol a { float:right; }
+.wpsg_mod_versandarten_packagetracking .wpsg_mod_packagetracking_provider { width:100%; }
+
+/* Modul CrefoPay */
+.wpsg_mod_crefopay_order_sidebar .button { margin-right:5px; margin-top:5px; float:left; }
+.wpsg_mod_crefopay_mnsstatemapping { display:none; }
+.wpsg_mod_crefopay_mnsstatemapping .wpsg_form_field { margin-bottom:0px; }
+
+/* Modul TrustedShops */
+.wpsg_mod_protectedshops #wpsg_mod_trustedshops_reminderDays { width:50px; float:left; margin-right:5px; }
+.wpsg_mod_protectedshops .wpsg_form_field .wpsg_form_trustedshops_reminderDays p { float:left; padding-right:5px; padding-left:2px; }
+
+/* News Bereich */
+.wpsg_news_wrap {}
+.wpsg_news_wrap .wpsg_news .markRead { text-align:right; width:100px; display:none; position:absolute; right:15px; top:15px; }
+.wpsg_news_wrap .wpsg_news_read .markRead img { float:right; margin-left:5px; }
+.wpsg_news_wrap .wpsg_news { width:100%; box-sizing:border-box; position:relative; padding:5px 10px 10px 10px; margin-bottom:15px; background-color:#FFFFFF; }
+.wpsg_news_wrap .wpsg_news h2 a { text-decoration:none; color:inherit !important; }
+.wpsg_news_wrap .wpsg_news_read { }
+.wpsg_news_wrap .wpsg_news_read .markRead { display:block; }
+.wpsg_news_unreadhint { color:#FFFFFF; background-color:#FF0000; padding:0px 4px; line-height:16px; font-size:8px; display:inline-block; font-weight:bold; border-radius:15px; width:8px; text-align:center; vertical-align:top; margin-top:4px; margin-left:0px; } \ No newline at end of file
diff --git a/views/css/frontend.css b/views/css/frontend.css
new file mode 100644
index 0000000..b6aeffd
--- /dev/null
+++ b/views/css/frontend.css
@@ -0,0 +1,335 @@
+@CHARSET "UTF-8";
+
+/* Allgemein */
+.wpsg_clear { clear:both; }
+#wpsg_error, #wpsg_message { margin-bottom:1rem; }
+#wpsg_message p, #wpsg_error p, #wpsg_notice p { background-color:#FAFAFA; margin-bottom:4px; padding:3px 0px 3px 8px; }
+#wpsg_message p { border-left:4px solid #7AD03A; }
+#wpsg_notice p { border-left:4px solid #FDF60A; }
+#wpsg_error p { border-left:4px solid #DD3D36; }
+.wpsg_error { border-color:#DD3D36; }
+.wpsg { }
+.wpsg h2 { }
+.wpsg_checkout label.wpsg_error { background-color:white; }
+label.wpsg_error { position:absolute; right:2px; top:-2px; color:#DD3D36; }
+input.wpsg_error { border-color:red !important; }
+.wpsg_spacer { width:100%; height:1px; background-color:#EAEAEA; margin-bottom:1rem; }
+.wpsg_noscroll { overflow:hidden; }
+#TB_ajaxContent { width:100% !important; }
+.wpsg_upper { vertical-align:top; font-size:60%; }
+
+/* Basket Widget */
+.wpsg_basket_widget .wpshopgermany_linktokasse { float:right; margin-top:1rem; }
+
+/* Basket */
+.wpsg_basket { margin-bottom:1rem; }
+.wpsg_basket h2 { }
+.wpsg_basket table { margin-top:1rem; width:100%; }
+.wpsg_basket table th { }
+.wpsg_basket .wpsg_basket_removelink { text-decoration:none; border:0px !important; }
+.wpsg_basket .wpsg_cell_number { padding-left:0.3rem; padding-right:0.3rem; text-align:center; min-width:20px; }
+.wpsg_basket .wpsg_cell_number img { max-width:auto !important; display:inline-block; }
+.wpsg_basket .wpsg_cell_menge { text-align:center; }
+.wpsg_basket .wpsg_cell_menge input { text-align:center; }
+.wpsg_basket .wpsg_cell_preis { text-align:right; }
+.wpsg_basket .wpsg_cell_gesamtpreis { text-align:right; }
+.wpsg_basket .wpsg_cell_summe_value { text-align:right; }
+.wpsg_basket .wpsg_cell_shipping_value { text-align:right; }
+.wpsg_basket .wpsg_cell_shipping_label select,
+.wpsg_basket .wpsg_cell_shipping_label span { float:right; width:150px;clear:right; }
+.wpsg_basket .wpsg_cell_shipping_label select.set_shipping { margin-bottom:5px; }
+.wpsg_basket .wpsg_cell_payment_label select,
+.wpsg_basket .wpsg_cell_payment_label span { float:right; width:150px; }
+.wpsg_basket .wpsg_cell_payment_value { text-align:right; }
+.wpsg_basket .wpsg_cell_gesamtsumme_value { text-align:right; }
+.wpsg_basket .wpsg_cell_deliverytime_value { text-align:right; }
+.wpsg_basket .wpsg_cell_name { vertical-align:middle; }
+.wpsg_basket .wpsg_cell_name .wpsg_basket_productimage { display:inline; padding-right:0.2rem; vertical-align:baseline; }
+.wpsg_basket .wpsg_cell_mwst { text-align:center; min-width:60px; }
+.wpsg_basket .wpsg_cell_mwst_value { text-align:right; }
+.wpsg_basket .wpsg_cell_weight_value { text-align:right; }
+.wpsg_basket .wpsg_checkoutbutton { float:right; }
+.wpsg_basket .wpsg_cell_gesamtsumme_value { font-weight:bold; }
+.wpsg_basket .wpsg_refreshbutton, .wpsg_basketbutton { float:left; }
+
+/* Checkout + Request*/
+.wpsg_checkout .wpsg_checkoutblock { width:100%; clear:both; margin-bottom:2px; position:relative; width:100%; }
+.wpsg_checkout .wpsg_checkoutblock label { vertical-align:middle; }
+.wpsg_checkout .wpsg_checkoutblock input.wpsg_input_text,
+.wpsg_checkout .wpsg_checkoutblock input[type="text"],
+.wpsg_checkout .wpsg_checkoutblock input[type="number"],
+.wpsg_checkout .wpsg_checkoutblock input[type="password"] { margin-bottom:5px; box-sizing:border-box; width:100%; }
+.wpsg_checkout .wpsg_checkoutblock input[type="checkbox"] { width:auto; margin-right:5px; }
+.wpsg_checkout .wpsg_checkoutblock select { box-sizing:border-box; width:100%; margin-bottom:5px; }
+.wpsg_checkout .wpsg_mandatoryfield_hint { margin-top:1rem; }
+.wpsg_checkout .wpsg_required { font-weight:bold; color:#FF0000; }
+.wpsg_checkout .wpsg_checkout2button { float:right; }
+.wpsg_checkout .wpsg_mod_ordervars { margin-bottom:1rem; }
+.wpsg_checkout .wpsg_commentblock textarea { box-sizing:border-box; padding:2px; width:100%; height:150px; }
+.wpsg_checkout .wpsg_logout_box a { float:right; border-bottom:0px; padding:15px; font-weight:bold; color:#FF0000; font-weight:bold; color:#fff; background-color:#333; }
+
+/* Checkout2 */
+.shippay_wrap { margin-top:40px; width:100%; font-family:Arial; padding-right:10px; }
+.wpsg_payment .wpsg_payment_textwrap { margin-top:40px; }
+.shippay_wrap .shippay_item_wrap { position:relative; border-top:1px solid #DFDFDF; cursor:pointer; padding-left:8px; }
+.shippay_wrap .shippay_item_wrap .shippay_hint { display:none; margin-top:-5px; padding-bottom:20px; font-family:Arial; font-size:11px; color:#3F3F3F; }
+.shippay_wrap .shippay_active, .shippay_wrap .shippay_item_wrap:hover { background-color:#F9F9F9; }
+.shippay_wrap .shippay_active .shippay_hint { display:block; padding-right:8px; }
+.shippay_wrap .shippay_item_wrap .wpsg_payship_name { display:table-cell; vertical-align:middle; font-size:12px; height:64px; }
+.shippay_wrap .shippay_active .wpsg_payship_name { font-weight:bold; }
+.shippay_wrap .shippay_item_wrap:last-child { border-bottom:1px solid #DFDFDF; }
+.shippay_wrap .shippay_item_wrap input { display:none; }
+.shippay_wrap .shippay_item_wrap .shippay_checkmark { display:none; width:23px; height:18px; background-image:url('../gfx/checkmark.png'); background-repeat:no-repeat; position:absolute; right:10px; top:16px; }
+.shippay_wrap .shippay_active .shippay_checkmark { display:block; }
+.shippay_wrap .wpsg_payship_logo { margin-top:-5px; padding-bottom:10px; }
+.wpsg_checkout2 .wpsg_mandatoryfield_hint { margin-top:1rem; }
+.wpsg_checkout2 .wpsg_overviewbutton { float:right; }
+.wpsg_checkout2 .wpsg_checkoutbutton { float:left; }
+
+/* Overview */
+.wpsg_overview .wpsg_agb { width:100%; clear:both; margin-bottom:2px; }
+.wpsg_overview .wpsg_agb label { line-height:18px; }
+.wpsg_overview .wpsg_agb input[type="checkbox"] { width:auto; /*margin-top:10px; margin-right:10px;*/ }
+.wpsg_overview .shippayment { margin-top:1rem; float:right; width:45%; }
+.wpsg_overview .anschrift { margin-top:1rem; float:left; width:55%; }
+.wpsg_overview .subtitle { font-weight:bold; margin-bottom:0.5rem; }
+.wpsg_overview .wpsg_orderbutton { float:right; }
+.wpsg_overview .wpsg_table_wrap { background-color:#EAEAEA; margin:10px -10px 10px -10px; padding:10px; }
+.wpsg_overview .wpsg_table_wrap table { width:100%; }
+.wpsg_overview .wpsg_table_wrap td, .wpsg_overview .wpsg_table_wrap th { }
+.wpsg_overview .wpsg_table_wrap .wpsg_cell_menge { width:100px; text-align:center; }
+.wpsg_overview .wpsg_table_wrap .wpsg_cell_mwst { width:100px; text-align:center; }
+.wpsg_overview .wpsg_table_wrap .wpsg_cell_preis { text-align:right; }
+.wpsg_overview .wpsg_table_wrap .wpsg_cell_gesamtpreis { text-align:right; }
+.wpsg_overview .wpsg_table_wrap .wpsg_cell_summe_value { text-align:right; }
+.wpsg_overview .wpsg_table_wrap .wpsg_cell_shipping_value { text-align:right; }
+.wpsg_overview .wpsg_table_wrap .wpsg_cell_payment_value { text-align:right; }
+.wpsg_overview .wpsg_table_wrap .wpsg_cell_gesamt_value { text-align:right; font-weight:bold; }
+.wpsg_overview .wpsg_table_wrap .wpsg_cell_mwst_value { text-align:right; }
+.wpsg_overview .wpsg_overview_productimage { display:inline; padding-right:0.2rem; vertical-align:baseline; }
+.wpsg_overview .wpsg_cell_weight_value { text-align:right; }
+.wpsg_overview .wpsg_cell_deliverytime_value { text-align:right; }
+
+/* Bestellvariablen */
+.wpsg_checkout .wpsg_mod_ordervars_field { display:inline; }
+
+/* Produktvariablen */
+.wpsg_basket .wpsg_basket_productvars input[type="text"], .wpsg_basket .wpsg_basket_productvars select { width:100%; }
+
+/* Profilseite */
+.wpsg_profil .wpsg_pwdvergessen_link { line-height:30px; }
+.wpsg_profil .wpsg_mod_kundenverwaltung_login, .wpsg_checkout .wpsg_mod_kundenverwaltung_login { float:right; }
+.wpsg_profil .wpsg_saveButton { float:right; }
+
+/* Produktattribute */
+.wpsg_cell_produktattribute_value { text-align:right; }
+
+/* Bestellansicht */
+.wpsg_mod_kundenverwaltung_order .wpsg_mod_kundenverwaltung_producttable { margin-top:1rem; margin-bottom:2rem; }
+
+/* Trusted Shops Integration */
+.wpsg_checkout label[for="wpsg_mod_trustedshops_set"] { margin:1rem 0 1rem 0; display:block; }
+
+/* Bankeinzug */
+.wpsg_mod_autodebit .wpsg_mod_autodebit_field { clear:both; }
+.wpsg_mod_autodebit label { width:100%; line-height:36px; }
+.wpsg_mod_autodebit input { float:right; margin-bottom:3px; }
+
+/* Versandadresse */
+.wpsg_checkout .wpsg_mod_shippingadress { margin-bottom:1rem; }
+
+/* Produkttemplate */
+.wpsg_produkt_wrapper { margin:5px -10px 5px -10px; padding:10px; width:100%; line-height:1.5em; box-sizing:content-box; }
+.wpsg_produkt_wrapper .wpsg_produkt_produktbilder { float:left; margin-right:1rem; margin-bottom:1rem; }
+.wpsg_produkt_wrapper .wpsg_product_afterimage { }
+.wpsg_produkt_wrapper .wpsg_product_afterimage .wpsg_producttitle { clear:none; }
+.wpsg_produkt_wrapper .wpsg_add_basket { margin:1rem 0; float:right; }
+.wpsg_produkt_wrapper .wpsg_produkt_add_basket_wrapper { clear:both; float:left; margin:1rem 0 0 0; }
+.wpsg_produkt_wrapper .wpsg_label { display:inline; }
+.wpsg_produkt_wrapper .wpsg_value { display:inline; }
+.wpsg_produkt_wrapper .wpsg_preis_prediscount { text-decoration: line-through; }
+.wpsg_produkt_wrapper .wpsg_menge { width:auto; }
+.wpsg_productform { position:relative; }
+.wpsg_productform .wpsg_product_layer { z-index:1000; background-color:rgba(125, 125, 125, 0.5); position:absolute; left:-10px; top:-10px; width:100%; height:100%; padding:20px; }
+.wpsg_productform .wpsg_product_layer img { position:absolute; left:50%; top:50%; margin-left:-8px; margin-top:-5.5px; }
+
+/* Ajax Meldung über das Produkttemplate */
+#wpsg_basket_ajax_message { z-index:2000; position:absolute; top:55px; width:100%; position:fixed; }
+#wpsg_basket_ajax_message .wpsg_basket_ajax_message_content {
+ width:800px; margin:auto; background-color:white; padding:25px; text-align:center;
+ -webkit-border-radius:15px;
+ -moz-border-radius:15px;
+ border-radius:15px;
+}
+#wpsg_basket_ajax_layer { z-index:199; position:absolute; left:0px; top:0px; width:100%; height:100%; background-color:rgba(0, 0, 0, 0.75); position:fixed; }
+#wpsg_basket_ajax_message .wpsg_basket_ajax_message_content_success { color:green; }
+#wpsg_basket_ajax_message .wpsg_button_continue_shopping { float:left; }
+#wpsg_basket_ajax_message .wpsg_button_basket { float:right; }
+#wpsg_basket_ajax_message .wpsg_button_wrap { margin-top:4rem; }
+
+/* Varianten */
+.wpsg_produkt_wrapper .wpsg_vp_field { clear:both; margin-bottom:1rem; }
+.wpsg_produkt_wrapper .wpsg_vp_field_image { clear:both; display:block; }
+.wpsg_produkt_wrapper .wpsg_vp_field_typ_radio label { clear: both; float: left; }
+.wpsg_overview .wpsg_mod_varianten_value { text-align:right; }
+.wpsg_mod_varianten_imageselect {}
+.wpsg_mod_varianten_imageselect .image { padding:10px; display:inline-block; }
+.wpsg_mod_varianten_imageselect .akt { padding:5px; border:5px solid #C5C5C5; }
+.wpsg_mod_varianten_imageselect a { text-decoration:none; }
+
+/* Warenkorbwidget */
+.wpsg_basket_widget { }
+.wpsg_basket_widget table { width:100%; }
+.wpsg_basket_widget table td { line-height:1.25rem; }
+.wpsg_basket_widget table .wpsg_cell_name { padding-left:0.2rem; }
+.wpsg_basket_widget table .wpsg_cell_amount { text-align:right; padding-right:0.2rem; }
+.wpsg_basket_widget table .wpsg_row_summary .wpsg_cell_amount { font-weight:bold; }
+
+/* Modul Gutscheine */
+.wpsg_basket .wpsg_cell_gutschein { vertical-align:middle; }
+.wpsg_basket .wpsg_cell_gutschein input[type="submit"] { float:right; }
+.wpsg_basket .wpsg_cell_gutschein input[type="text"] { float:right; margin-top:2px; margin-right:10px; vertical-align:baseline; }
+.wpsg_basket .wpsg_cell_gutschein label { line-height:35px; }
+
+/* Modul Kundenverwaltung */
+.wpsg_mod_kundenverwaltung_widget input[type="text"], .wpsg_mod_kundenverwaltung_widget input[type="password"] { width:100%; margin-bottom:0.5rem; }
+.wpsg_mod_kundenverwaltung_widget input[type="submit"] { float:right; }
+
+/* Modul wirecard */
+.wpsg_mod_wirecard_paymentType { width:50%; float:right; }
+#wpsg_mod_wirecard_iframe { width:100%; height:700px; }
+
+/* Modul Bestellbedingungen */
+.wpsg_mod_ordercondition_hint { padding-left:18px; max-height:60px; overflow-y:scroll; }
+
+/* Modul Micropayment */
+.micropayment_card .card { border-radius:5px; background-color:#999999; margin-bottom:1rem; height:200px; width:400px; position:relative; }
+.micropayment_card .front .number input { width:370px; position:absolute; bottom:50px; left:15px; box-sizing:border-box; }
+.micropayment_card .front .name { position:absolute; left:25px; bottom:20px; color:#FFFFFF; text-shadow: 1px 1px 0px #202020, -1px -1px 0px #606060; letter-spacing:2px; }
+.micropayment_card .front .validthrough { position:absolute; right:135px; bottom:20px; color:#FFFFFF; text-shadow: 1px 1px 0px #202020, -1px -1px 0px #606060; letter-spacing:2px; }
+.micropayment_card .front .valid { position:absolute; right:15px; bottom:20px; }
+.micropayment_card .front .chip { left:25px; top:50px; position:absolute; width:50px; height:44px; background-image:url('../mods/mod_micropayment/gfx/chip.png'); background-repeat:no-repeat; }
+.micropayment_card .card .bankname { position:absolute; left:15px; top:10px; }
+.micropayment_card .back .blackmagnetic { width:100%; height:40px; background-color:#000000; position:absolute; left:0px; top:55px; }
+.micropayment_card .back .number { position:absolute; text-align:right; right:5px; top:5px; }
+.micropayment_card .back .signature { position:absolute; left:15px; top:130px; width:250px; height:30px; background-color:#FFFFFF; text-align:center; line-height:30px; color:#333333; }
+.micropayment_card .back .sign input { position:absolute; left:300px; width:75px; text-align:center; line-height:25px; top:135px; border:0px; border-radius:0px; height:25px; padding:0px; }
+
+/* Customerquestion (Dialog Firmenkunde/Endkunde und Land) */
+#wpsg_calc_layer { overflow:auto; text-align:center; position:fixed; left:0px; top:0px; z-index:1000; width:100%; height:100%; background-color:rgba(125, 125, 125, 0.95); }
+#wpsg_calc_layer .content { padding:50px; position:absolute; left:50%; top:50%; width:640px; min-height:210px; margin-left:-320px; margin-top:-125px; }
+#wpsg_calc_layer .content img.loading { position:absolute; left:50%; top:50%; margin-left:-8px; margin-top:-5px; }
+#wpsg_calc_layer h2 { color:#000000; font-size:22px; font-weight:bold; line-height:28px; text-align:left; margin-bottom:25px; }
+#wpsg_calc_layer .customertype h2 { font-size:22px; font-weight:normal; width:150px; float:left; line-height:28px; }
+#wpsg_calc_layer #customerquestion_fk { width:175px; float:left; line-height:28px; }
+#wpsg_calc_layer #customerquestion_fk label { font-size:22px; font-weight:normal; line-height:28px; color:#000000; }
+#wpsg_calc_layer #customerquestion_ek { width:175px; float:left; line-height:28px; }
+#wpsg_calc_layer #customerquestion_ek label { font-size:22px; font-weight:normal; line-height:28px; color:#000000; }
+#wpsg_calc_layer .country { clear:both; margin-top:20px; }
+#wpsg_calc_layer .country h2 { font-size:22px; font-weight:normal; width:150px; float:left; line-height:28px; }
+#wpsg_calc_layer .country select { width:350px; font-size:22px; height:auto; float:left; }
+#wpsg_calc_layer input[type="radio"] { height:auto; margin-right:10px; }
+#wpsg_calc_layer .button_wrap { width:100%; clear:both; padding-top:20px; }
+#wpsg_calc_layer input[type="submit"] { float:right; padding-left:50px; padding-right:50px; }
+
+/* Modul CrefoPay */
+#wpsg_mod_crefopay_iframe { width:100%; border:0px; overflow-y:hidden; }
+
+/* Modul PayPal PLUS */
+.wrap_paypalapi_expressbutton { width:100%; padding-bottom:2rem; }
+.wrap_paypalapi_expressbutton img { float:right; }
+.wpsg_mod_paypalapi_button:hover, .wpsg_mod_paypalapi_button { display:inline; background:transparent; padding:0px; }
+.wpsg_mod_paypalapi_orderdone .wpsg_mod_paypalapi_field { clear:both; }
+.wpsg_mod_paypalapi_orderdone label { width:100%; line-height:36px; }
+.wpsg_mod_paypalapi_orderdone input[type="text"],
+.wpsg_mod_paypalapi_orderdone select { width:65%; line-height:36px; height:36px; float:right; margin-bottom:3px; box-sizing:border-box; padding:0px; text-indent:10px; }
+.wpsg_mod_paypalapi_orderdone input.wpsg_mod_paypalapi_vname { width:30%; margin-right:5%; }
+.wpsg_mod_paypalapi_orderdone input.wpsg_mod_paypalapi_name { width:30%; }
+.wpsg_mod_paypalapi_orderdone input[type="image"],
+.wpsg_mod_paypalapi_orderdone input[type="submit"] { float:right; }
+.wpsg_mod_paypalapi_orderdone select.wpsg_mod_paypalapi_month { width:30%; }
+.wpsg_mod_paypalapi_orderdone select.wpsg_mod_paypalapi_year { width:30%; }
+.wpsg_mod_paypalapi_orderdone .wpsg_mod_paypalapi_spacer { width:5%; float:right; text-align:center; }
+#wpsg_ppplus { width:100%; padding-right:10px; }
+.wpsg_done #wpsg_ppplus { width:100%; }
+.wpsg_mod_paypalapi_button { float:right; border:0px; cursor:pointer; }
+
+/* Modul Anfrageprodukte */
+.wpsg_mod_request_requestpage .wpsg_cell_action { width:30px; text-align:center; }
+.wpsg_mod_request_requestpage .wpsg_cell_amount { width:125px; }
+.wpsg_mod_request_requestpage .wpsg_cell_sumprice { text-align:right; width:200px; }
+.wpsg_mod_request_requestpage .wpsg_basket_productimage { float:left; margin-right:5px; }
+.wpsg_mod_request_requestpage .wpsg_cell_total_brutto,
+.wpsg_mod_request_requestpage .wpsg_cell_total_netto { text-align:right; }
+.wpsg_mod_request_requestpage .wpsg_checkout_typ_3 input { margin-right: 5px; width: auto; }
+.wpsg_mod_request_requestpage input[type="text"],
+.wpsg_mod_request_requestpage select { width:100%; height:30px; margin-top:5px; margin-bottom:5px;}
+.wpsg_mod_request_requestpage h2 { margin-top:2rem; margin-bottom:1rem; }
+.requestlist_ajax_wrap { padding-bottom:2rem; }
+
+/* Modul Zubehörprodukte */
+.wpsg_mod_relatedproducts_basket { margin-top:2rem; }
+
+/* Progress bar
+.steps { list-style:none; margin:0; padding:10px 0; overflow:hidden; font-family:'inherit',sans-serif; font-size:1.5rem; width:100%; height:auto; line-height:20px; font-weight:bold; counter-reset:li; }
+.steps > a, .steps > p { float:left; margin:5px 0;}
+.steps a, .steps p { list-style-image:none; list-style-type:none; margin-left:0; text-align:center; color:#bbb; background:#f2f2f2; position:relative; margin-left:43px; border-bottom:medium none !important; }
+
+.steps a:after, .steps p:after { position:absolute; top:50%; left:100%; content:" "; height:0; width:0; border:solid transparent; border-left-color:#f2f2f2; border-width:19px; margin-top:-19px; }
+.steps a span:after, .steps p span:after { position:absolute; top:50%; right:100%; content:" "; height:0; width:0; border:solid #f2f2f2; border-left-color:transparent; border-width:19px; margin-top:-19px; }
+
+.steps a span, .steps p span { display:block; padding:9px 28px 9px 9px; }
+.steps a span:before, .steps p span:before { counter-increment:li; }
+
+.steps a.current, .steps p.current { color:#3a3a3a; background:#c9c9c9; }
+.steps a.current:after, .steps p.current:after { border-left-color:#c9c9c9; }
+.steps a.current span:after, .steps p.current span:after { border-color:#c9c9c9; border-left-color:transparent; }
+
+.steps a.step1, .steps p.step1 { z-index:9; }
+.steps a.step2, .steps p.step2 { z-index:8; }
+.steps a.step3, .steps p.step3 { z-index:7; }
+.steps a.step4, .steps p.step4 { z-index:6; }
+*/
+
+.wpsg_progress { padding:0px; margin:0px; width:100%; margin-bottom:100px; margin-top:30px; }
+.wpsg_progress:after { border:1px solid #C5C5C5; height:10px; background-color:#F2F2F2; box-sizing:border-box; display:block; width:100%; content:" "; }
+.wpsg_progress span.step { width:25%; display:block; float:left; list-style:none; position:relative; }
+.wpsg_progress span.step > .text { margin-top:30px; text-align:center; width:100%; display:block; }
+.wpsg_progress span.step > .dot { position:absolute; z-index:2; background-color:#C5C5C5; width:20px; height:20px; left:50%; top:0%; margin-left:-15px; margin-top:-5px; border-radius:10px; }
+.wpsg_progress span.step:before { border:1px solid #C5C5C5; position:absolute; z-index:2; left:50%; margin-left:-20px; text-align:center; line-height:40px; background-color:#F2F2F2; content:" "; display:block; width:30px; height:30px; border-radius:25px; margin-top:-10px; }
+.wpsg_progress span.step1:before { content:""; }
+.wpsg_progress span.step2:before { content:""; }
+.wpsg_progress span.step3:before { content:""; }
+.wpsg_progress span.step4:before { content:""; }
+.wpsg_progress span.current:before,
+.wpsg_progress span.done:before { background-color:#C9C9C9; }
+.wpsg_progress span.current > .dot,
+.wpsg_progress span.done > .dot {background-color:#F2F2F2; }
+.wpsg_progress span.current:after,
+.wpsg_progress span.done:after { content:" "; background-color:#C5C5C5; width:100%; height:10px; display:block; top:0px; position:absolute; }
+.wpsg_progress span.current:after { width:50%; }
+
+/* Modul "CrowdFunding" */
+.wpsg_mod_funding_progress .wpsg_mod_funding_state { border:1px solid #C5C5C5; margin-bottom:1rem; box-sizing:border-box; width:100%; height:25px; line-height:25px; }
+.wpsg_mod_funding_progress .wpsg_mod_funding_state > .bar { width:90%; float:left; height:100%; display:table; }
+.wpsg_mod_funding_progress .wpsg_mod_funding_state > .bar > .value { background-color:#484C51; height:100%; width:0%; }
+.wpsg_mod_funding_progress .wpsg_mod_funding_state > .value { width:10%; height:100%; border-left:1px solid #C5C5C5; float:right; text-align:center; }
+
+@media screen and (max-width: 600px) {
+
+ #wpsg_basket_ajax_message .wpsg_basket_ajax_message_content { width:80%; }
+ #wpsg_basket_ajax_message .wpsg_button_basket,
+ #wpsg_basket_ajax_message .wpsg_button_continue_shopping { width:100%; margin-top:2rem; }
+ .wpsg_progress span.step > .text { visibility:hidden; }
+
+}
+
+@media screen and (max-width: 400px) {
+
+ .wpsg .wpsg_button { padding-left:10px; padding-right:10px; }
+
+ .wpsg_basket .wpsg_cell_gutschein label { width:100%; display:block; }
+ .wpsg_basket #wpsg_gutschein_input { float:left; }
+
+}
+
diff --git a/views/css/tooltip.css b/views/css/tooltip.css
new file mode 100644
index 0000000..b379318
--- /dev/null
+++ b/views/css/tooltip.css
@@ -0,0 +1,121 @@
+/* TipTip CSS - Version 1.2 */
+
+
+
+#tiptip_holder {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 9999999999;
+ max-height:400px;
+ width:400px;
+ overflow-y:auto;
+ overflow-x:hidden;
+}
+
+#tiptip_holder.tip_top {
+ padding-bottom: 5px;
+}
+
+#tiptip_holder.tip_bottom {
+ padding-top: 5px;
+}
+
+#tiptip_holder.tip_right {
+ padding-left: 5px;
+}
+
+#tiptip_holder.tip_left {
+ padding-right: 5px;
+}
+
+#tiptip_content {
+ font-size: 11px;
+ color: #fff;
+ text-shadow: 0 0 2px #000;
+ padding: 4px 8px;
+ border: 1px solid rgba(255,255,255,0.25);
+ background-color: rgb(25,25,25);
+ background-color: rgba(25,25,25,0.92);
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000));
+ border-radius: 3px;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ box-shadow: 0 0 3px #555;
+ -webkit-box-shadow: 0 0 3px #555;
+ -moz-box-shadow: 0 0 3px #555;
+}
+
+#tiptip_arrow, #tiptip_arrow_inner {
+ position: absolute;
+ border-color: transparent;
+ border-style: solid;
+ border-width: 6px;
+ height: 0;
+ width: 0;
+}
+
+#tiptip_holder.tip_top #tiptip_arrow {
+ border-top-color: #fff;
+ border-top-color: rgba(255,255,255,0.35);
+}
+
+#tiptip_holder.tip_bottom #tiptip_arrow {
+ border-bottom-color: #fff;
+ border-bottom-color: rgba(255,255,255,0.35);
+}
+
+#tiptip_holder.tip_right #tiptip_arrow {
+ border-right-color: #fff;
+ border-right-color: rgba(255,255,255,0.35);
+}
+
+#tiptip_holder.tip_left #tiptip_arrow {
+ border-left-color: #fff;
+ border-left-color: rgba(255,255,255,0.35);
+}
+
+#tiptip_holder.tip_top #tiptip_arrow_inner {
+ margin-top: -7px;
+ margin-left: -6px;
+ border-top-color: rgb(25,25,25);
+ border-top-color: rgba(25,25,25,0.92);
+}
+
+#tiptip_holder.tip_bottom #tiptip_arrow_inner {
+ margin-top: -5px;
+ margin-left: -6px;
+ border-bottom-color: rgb(25,25,25);
+ border-bottom-color: rgba(25,25,25,0.92);
+}
+
+#tiptip_holder.tip_right #tiptip_arrow_inner {
+ margin-top: -6px;
+ margin-left: -5px;
+ border-right-color: rgb(25,25,25);
+ border-right-color: rgba(25,25,25,0.92);
+}
+
+#tiptip_holder.tip_left #tiptip_arrow_inner {
+ margin-top: -6px;
+ margin-left: -7px;
+ border-left-color: rgb(25,25,25);
+ border-left-color: rgba(25,25,25,0.92);
+}
+
+/* Webkit Hacks */
+@media screen and (-webkit-min-device-pixel-ratio:0) {
+ #tiptip_content {
+ padding: 4px 8px 5px 8px;
+ background-color: rgba(45,45,45,0.88);
+ }
+ #tiptip_holder.tip_bottom #tiptip_arrow_inner {
+ border-bottom-color: rgba(45,45,45,0.88);
+ }
+ #tiptip_holder.tip_top #tiptip_arrow_inner {
+ border-top-color: rgba(20,20,20,0.92);
+ }
+}
+
+.info_icon { cursor:pointer; } \ No newline at end of file
diff --git a/views/css/validationEngine.jquery.css b/views/css/validationEngine.jquery.css
new file mode 100644
index 0000000..63e2277
--- /dev/null
+++ b/views/css/validationEngine.jquery.css
@@ -0,0 +1,247 @@
+
+/* Z-INDEX */
+.formError { z-index: 990; }
+.formError .formErrorContent { z-index: 991; }
+.formError .formErrorArrow { z-index: 996; }
+
+.formErrorInsideDialog.formError { z-index: 5000; }
+.formErrorInsideDialog.formError .formErrorContent { z-index: 5001; }
+.formErrorInsideDialog.formError .formErrorArrow { z-index: 5006; }
+
+.inputContainer {
+ position: relative;
+ float: left;
+}
+
+.formError {
+ position: absolute;
+ top: 300px;
+ left: 300px;
+ display: block;
+ cursor: pointer;
+}
+
+.ajaxSubmit {
+ padding: 20px;
+ background: #55ea55;
+ border: 1px solid #999;
+ display: none
+}
+
+.formError .formErrorContent {
+ width: 100%;
+ background: #FF0000;
+ color: #000000;
+ position:relative;
+ width: 250px;
+ font-size: 11px;
+ border: 1px solid #EEEEEE;
+ box-shadow: 0 0 2px #666666;
+ -moz-box-shadow: 0 0 2px #666666;
+ -webkit-box-shadow: 0 0 2px #666666;
+ padding: 4px 10px 3px 10px;
+ border-radius: 6px;
+ -moz-border-radius: 6px;
+ -webkit-border-radius: 6px;
+ font-family:arial, verdana, sans-serif !important;
+}
+
+.greenPopup .formErrorContent {
+ background: #33be40;
+}
+
+.blackPopup .formErrorContent {
+ background: #393939;
+ color: #FFFFFF;
+}
+
+.formError .formErrorArrow {
+ width: 15px;
+ margin: -2px 0 0 13px;
+ position:relative;
+}
+
+.formError .formErrorArrowLeft {
+ width: 15px;
+ margin: -25px 0 0 -13px;
+ position:relative;
+ z-index:1000;
+}
+
+body[dir='rtl'] .formError .formErrorArrow,
+body.rtl .formError .formErrorArrow {
+ margin: -2px 13px 0 0;
+}
+
+body[dir='rtl'] .formError .formErrorArrowLeft,
+body.rtl .formError .formErrorArrow {
+ margin: -2px 13px 0 0;
+}
+
+.formError .formErrorArrowBottom {
+ box-shadow: none;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ margin: 0px 0 0 12px;
+ top:2px;
+}
+
+.formError .formErrorArrow div {
+ border-left: 2px solid #CCCCCC;
+ border-right: 2px solid #CCCCCC;
+ /*box-shadow: 0 2px 3px #444;
+ -moz-box-shadow: 2px 0px 3px #444;
+ -webkit-box-shadow: 2px 0px 3px #444;*/
+ font-size: 0px;
+ height: 1px;
+ background: #EEEEEE;
+ margin: 0 auto;
+ line-height: 0;
+ font-size: 0;
+ display: block;
+}
+
+.formError .formErrorArrowLeft div {
+ border-top: 1px solid #CCCCCC;
+ border-bottom: 1px solid #CCCCCC;
+ /*box-shadow: 0 2px 3px #CCCCCC;
+ -moz-box-shadow: 0 2px 3px #CCCCCC;
+ -webkit-box-shadow: 0 2px 3px #CCCCCC;*/
+ font-size: 0px;
+ float:right;
+ width: 1px;
+ background: #FF0000;
+ margin: 0 auto;
+ line-height: 0;
+ font-size: 0;
+ display: block;
+}
+
+.formError .formErrorArrowBottom div {
+ box-shadow: none;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+}
+
+.greenPopup .formErrorArrow div {
+ background: #33be40;
+}
+
+.blackPopup .formErrorArrow div {
+ background: #393939;
+ color: #FFF;
+}
+
+.formError .formErrorArrow .line10 {
+ width: 15px;
+ border: none;
+}
+
+.formError .formErrorArrow .line9 {
+ width: 13px;
+ border: none;
+}
+
+.formError .formErrorArrow .line8 {
+ width: 11px;
+}
+
+.formError .formErrorArrow .line7 {
+ width: 9px;
+}
+
+.formError .formErrorArrow .line6 {
+ width: 7px;
+}
+
+.formError .formErrorArrow .line5 {
+ width: 5px;
+}
+
+.formError .formErrorArrow .line4 {
+ width: 3px;
+}
+
+.formError .formErrorArrow .line3 {
+ width: 1px;
+ border-left: 2px solid #CCCCCC;
+ border-right: 2px solid #CCCCCC;
+ border-bottom: 0 solid #CCCCCC;
+}
+
+.formError .formErrorArrow .line2 {
+ width: 3px;
+ border: none;
+ background: #FFFFFF;
+ z-index:2;
+ position:relative;
+}
+
+.formError .formErrorArrow .line1 {
+ width: 1px;
+ border: none;
+ background: #FFFFFF;
+ z-index:3;
+ position:relative;
+}
+
+.formError .formErrorArrowLeft .line10 {
+ height: 19px;
+ border: none;
+ margin-top:1px;
+}
+
+.formError .formErrorArrowLeft .line9 {
+ height: 17px;
+ border: none;
+ margin-top:2px;
+}
+
+.formError .formErrorArrowLeft .line8 {
+ height: 15px;
+ margin-top:2px;
+}
+
+.formError .formErrorArrowLeft .line7 {
+ height: 13px;
+ margin-top:3px;
+}
+
+.formError .formErrorArrowLeft .line6 {
+ height: 11px;
+ margin-top:4px;
+}
+
+.formError .formErrorArrowLeft .line5 {
+ height: 9px;
+ margin-top:5px;
+}
+
+.formError .formErrorArrowLeft .line4 {
+ height: 7px;
+ margin-top:6px;
+}
+
+.formError .formErrorArrowLeft .line3 {
+ height: 5px;
+
+ margin-top:7px;
+}
+
+.formError .formErrorArrowLeft .line2 {
+ height: 3px;
+ margin-top:8px;
+}
+
+.formError .formErrorArrowLeft .line1 {
+ height: 1px;
+ background: #CCCCCC;
+ margin-top:9px;
+}
+
+.formError .formErrorArrowLeft .line0 {
+ height: 1px;
+ border:0 none;
+ background: #CCCCCC;
+ margin-top:10px;
+} \ No newline at end of file
diff --git a/views/gfx/action_save.gif b/views/gfx/action_save.gif
new file mode 100644
index 0000000..6e6f7de
--- /dev/null
+++ b/views/gfx/action_save.gif
Binary files differ
diff --git a/views/gfx/add.png b/views/gfx/add.png
new file mode 100644
index 0000000..6332fef
--- /dev/null
+++ b/views/gfx/add.png
Binary files differ
diff --git a/views/gfx/ajax-loader.gif b/views/gfx/ajax-loader.gif
new file mode 100644
index 0000000..09d621e
--- /dev/null
+++ b/views/gfx/ajax-loader.gif
Binary files differ
diff --git a/views/gfx/arrow_left.png b/views/gfx/arrow_left.png
new file mode 100644
index 0000000..5dc6967
--- /dev/null
+++ b/views/gfx/arrow_left.png
Binary files differ
diff --git a/views/gfx/arrow_refresh_small.png b/views/gfx/arrow_refresh_small.png
new file mode 100644
index 0000000..d3087df
--- /dev/null
+++ b/views/gfx/arrow_refresh_small.png
Binary files differ
diff --git a/views/gfx/arrow_right.png b/views/gfx/arrow_right.png
new file mode 100644
index 0000000..21221f8
--- /dev/null
+++ b/views/gfx/arrow_right.png
Binary files differ
diff --git a/views/gfx/banner_300x100.png b/views/gfx/banner_300x100.png
new file mode 100644
index 0000000..4cdd6b9
--- /dev/null
+++ b/views/gfx/banner_300x100.png
Binary files differ
diff --git a/views/gfx/basket.png b/views/gfx/basket.png
new file mode 100644
index 0000000..a39079e
--- /dev/null
+++ b/views/gfx/basket.png
Binary files differ
diff --git a/views/gfx/basket_add.png b/views/gfx/basket_add.png
new file mode 100644
index 0000000..e7ef60f
--- /dev/null
+++ b/views/gfx/basket_add.png
Binary files differ
diff --git a/views/gfx/basket_go.png b/views/gfx/basket_go.png
new file mode 100644
index 0000000..c31ba12
--- /dev/null
+++ b/views/gfx/basket_go.png
Binary files differ
diff --git a/views/gfx/basket_select.png b/views/gfx/basket_select.png
new file mode 100644
index 0000000..c1a3fcc
--- /dev/null
+++ b/views/gfx/basket_select.png
Binary files differ
diff --git a/views/gfx/bg_wpsg_produkt_additional_information.gif b/views/gfx/bg_wpsg_produkt_additional_information.gif
new file mode 100644
index 0000000..9673d87
--- /dev/null
+++ b/views/gfx/bg_wpsg_produkt_additional_information.gif
Binary files differ
diff --git a/views/gfx/billsafe.png b/views/gfx/billsafe.png
new file mode 100644
index 0000000..0ff9cc8
--- /dev/null
+++ b/views/gfx/billsafe.png
Binary files differ
diff --git a/views/gfx/bin.png b/views/gfx/bin.png
new file mode 100644
index 0000000..ebad933
--- /dev/null
+++ b/views/gfx/bin.png
Binary files differ
diff --git a/views/gfx/bin_x.png b/views/gfx/bin_x.png
new file mode 100644
index 0000000..1514d51
--- /dev/null
+++ b/views/gfx/bin_x.png
Binary files differ
diff --git a/views/gfx/cab.png b/views/gfx/cab.png
new file mode 100644
index 0000000..d5dcaba
--- /dev/null
+++ b/views/gfx/cab.png
Binary files differ
diff --git a/views/gfx/checkmark.png b/views/gfx/checkmark.png
new file mode 100644
index 0000000..57f74b1
--- /dev/null
+++ b/views/gfx/checkmark.png
Binary files differ
diff --git a/views/gfx/comment.png b/views/gfx/comment.png
new file mode 100644
index 0000000..7bc9233
--- /dev/null
+++ b/views/gfx/comment.png
Binary files differ
diff --git a/views/gfx/comment_admin.png b/views/gfx/comment_admin.png
new file mode 100644
index 0000000..bab7cc9
--- /dev/null
+++ b/views/gfx/comment_admin.png
Binary files differ
diff --git a/views/gfx/control_play.png b/views/gfx/control_play.png
new file mode 100644
index 0000000..ee4e7f6
--- /dev/null
+++ b/views/gfx/control_play.png
Binary files differ
diff --git a/views/gfx/darrowleft.gif b/views/gfx/darrowleft.gif
new file mode 100644
index 0000000..f6b24d6
--- /dev/null
+++ b/views/gfx/darrowleft.gif
Binary files differ
diff --git a/views/gfx/darrowright.gif b/views/gfx/darrowright.gif
new file mode 100644
index 0000000..b9a9e98
--- /dev/null
+++ b/views/gfx/darrowright.gif
Binary files differ
diff --git a/views/gfx/delete.png b/views/gfx/delete.png
new file mode 100644
index 0000000..08f2493
--- /dev/null
+++ b/views/gfx/delete.png
Binary files differ
diff --git a/views/gfx/disk.png b/views/gfx/disk.png
new file mode 100644
index 0000000..99d532e
--- /dev/null
+++ b/views/gfx/disk.png
Binary files differ
diff --git a/views/gfx/edit.png b/views/gfx/edit.png
new file mode 100644
index 0000000..0bfecd5
--- /dev/null
+++ b/views/gfx/edit.png
Binary files differ
diff --git a/views/gfx/help.png b/views/gfx/help.png
new file mode 100644
index 0000000..5c87017
--- /dev/null
+++ b/views/gfx/help.png
Binary files differ
diff --git a/views/gfx/hide.png b/views/gfx/hide.png
new file mode 100644
index 0000000..d22fde8
--- /dev/null
+++ b/views/gfx/hide.png
Binary files differ
diff --git a/views/gfx/html.png b/views/gfx/html.png
new file mode 100644
index 0000000..55d1072
--- /dev/null
+++ b/views/gfx/html.png
Binary files differ
diff --git a/views/gfx/lupe.png b/views/gfx/lupe.png
new file mode 100644
index 0000000..3a7e032
--- /dev/null
+++ b/views/gfx/lupe.png
Binary files differ
diff --git a/views/gfx/magnifier.gif b/views/gfx/magnifier.gif
new file mode 100644
index 0000000..5f91485
--- /dev/null
+++ b/views/gfx/magnifier.gif
Binary files differ
diff --git a/views/gfx/money.png b/views/gfx/money.png
new file mode 100644
index 0000000..4d5d659
--- /dev/null
+++ b/views/gfx/money.png
Binary files differ
diff --git a/views/gfx/paypal.png b/views/gfx/paypal.png
new file mode 100644
index 0000000..073152f
--- /dev/null
+++ b/views/gfx/paypal.png
Binary files differ
diff --git a/views/gfx/pp-logo-big.png b/views/gfx/pp-logo-big.png
new file mode 100644
index 0000000..cc755c0
--- /dev/null
+++ b/views/gfx/pp-logo-big.png
Binary files differ
diff --git a/views/gfx/show.png b/views/gfx/show.png
new file mode 100644
index 0000000..e95b8c5
--- /dev/null
+++ b/views/gfx/show.png
Binary files differ
diff --git a/views/gfx/skrill.png b/views/gfx/skrill.png
new file mode 100644
index 0000000..6629ec1
--- /dev/null
+++ b/views/gfx/skrill.png
Binary files differ
diff --git a/views/gfx/su.png b/views/gfx/su.png
new file mode 100644
index 0000000..4f110a1
--- /dev/null
+++ b/views/gfx/su.png
Binary files differ
diff --git a/views/gfx/tab_top.gif b/views/gfx/tab_top.gif
new file mode 100644
index 0000000..dbb9d1f
--- /dev/null
+++ b/views/gfx/tab_top.gif
Binary files differ
diff --git a/views/gfx/tick.png b/views/gfx/tick.png
new file mode 100644
index 0000000..a9925a0
--- /dev/null
+++ b/views/gfx/tick.png
Binary files differ
diff --git a/views/gfx/world_edit.png b/views/gfx/world_edit.png
new file mode 100644
index 0000000..00794d4
--- /dev/null
+++ b/views/gfx/world_edit.png
Binary files differ
diff --git a/views/js/admin.js b/views/js/admin.js
new file mode 100644
index 0000000..4c0f7b6
--- /dev/null
+++ b/views/js/admin.js
@@ -0,0 +1,193 @@
+wpsg_number_format = function (number, decimals, dec_point, thousands_sep) {
+
+ var n = !isFinite(+number) ? 0 : + number, prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),
+ sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, dec = (typeof dec_point === 'undefined') ? '.' : dec_point,
+ s = '',
+ toFixedFix = function (n, prec) {
+ var k = Math.pow(10, prec);
+ return '' + Math.round(n * k) / k; };
+ s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');
+ if (s[0].length > 3) {
+ s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep); }
+ if ((s[1] || '').length < prec) {
+ s[1] = s[1] || '';
+ s[1] += new Array(prec - s[1].length + 1).join('0');
+ } return s.join(dec);
+ };
+
+ var wpsg_Tablefix = function(e, ui) {
+
+ ui.children().each(function() {
+
+ jQuery(this).width(jQuery(this).width());
+
+ } );
+
+ return ui;
+
+ };
+
+jQuery.fn.tipTip = function() {
+
+ if (jQuery(this).hasClass('tipTip')) return;
+ jQuery(this).addClass('tipTip');
+
+ jQuery(this).cluetip( {
+ width: '400px',
+ height: '400px',
+ activation: 'click',
+ sticky: true,
+ /*mouseOutClose: 'both',*/
+ closePosition: 'title',
+ arrows: true,
+ closeText: 'Schließen',
+ onActivate: function() {
+
+ jQuery('#cluetip').hide();
+
+ },
+ onShow: function() {
+
+ jQuery('.cluetip-title').prepend(jQuery('.cluetip-inner h1').first().text());
+ jQuery('.cluetip-inner h1').first().remove();
+
+ jQuery('.cluetip-inner').css('overflow-y', 'show');
+ jQuery('.cluetip-inner').css('height', 'auto');
+
+ var height_content = jQuery('.cluetip-inner').outerHeight();
+ var height_title = jQuery('.cluetip-title').outerHeight();
+
+ if (height_content < 400)
+ {
+
+ jQuery('.cluetip-outer').height((height_content + height_title) + "px");
+
+ }
+ else
+ {
+
+ jQuery('.cluetip-outer').height("400px");
+
+ jQuery('.cluetip-inner').css('overflow-y', 'scroll');
+ jQuery('.cluetip-inner').css('height', '332px');
+
+ }
+
+ }
+ } );
+
+};
+
+jQuery.fn.wpsg_adminbox = function(options) {
+
+ return this.each(function() {
+
+ var adminbox_id = jQuery(this).attr("id");
+
+ jQuery(this).find('.title').bind('click', function() {
+
+ var content = jQuery(this).next();
+
+ if (content.is(':visible'))
+ {
+
+ content.hide();
+ jQuery(this).css('border-bottom', '1px solid #AAAAAA');
+ jQuery.cookie(adminbox_id, '0', { expires: 14000 } );
+
+ }
+ else
+ {
+
+ content.show();
+ jQuery(this).css('border-bottom', '0px');
+ jQuery.cookie(adminbox_id, '1', { expires: 14000 } );
+
+ }
+
+ } );
+
+ if (jQuery.cookie(adminbox_id) == null || jQuery.cookie(adminbox_id) == 0)
+ {
+
+ jQuery(this).find('.title').click();
+
+ }
+
+ } );
+
+}
+
+jQuery.fn.wpsg_tab = function(options) {
+
+ return this.each(function() {
+
+ var tab_obj = jQuery(this);
+
+ // Init
+ tab_obj.find('.tabcontent').hide();
+ tab_obj.find('.tab').removeClass('akttab');
+
+ var aktTab = 1;
+
+ if (jQuery.cookie(options['cookiename']) != null && jQuery.cookie(options['cookiename']) > 0)
+ {
+ aktTab = jQuery.cookie(options['cookiename']);
+ }
+
+ jQuery('#tab' + aktTab).addClass('akttab');
+ jQuery('#tabcontent' + aktTab).show();
+
+ if (typeof options['tab' + aktTab] == 'function')
+ {
+ options['tab' + aktTab]();
+ }
+
+ tab_obj.find('.tab').bind('click', function() {
+
+ tab_obj.find('.tab').removeClass('akttab');
+ tab_obj.find('.tabcontent').hide();
+
+ jQuery(this).addClass('akttab');
+
+ var strID = jQuery(this).attr("id").replace(/tab/, '');
+ jQuery.cookie(options['cookiename'], strID, { expires: 14000 } );
+
+ jQuery('#tabcontent' + strID).show();
+
+ if (typeof options['tab' + strID] == 'function')
+ {
+ options['tab' + strID]();
+ }
+
+ } );
+
+ } );
+
+};
+
+/**
+ * jPlot - Custom Formatter functions
+ */
+wpsg_statistics_number_format = function (formatString, value) {
+ return wpsg_number_format(value, 2, ',', '.');
+}
+
+wpsg_statistics_integer_format = function (formatString, value) {
+ return wpsg_number_format(value, 0, ',', '.');
+}
+
+function wpsg_in_array(needle, haystack)
+{
+
+ var length = haystack.length;
+
+ for(var i = 0; i < length; i++) {
+
+ if (haystack[i] == needle) return true;
+
+ }
+
+ return false;
+
+}
diff --git a/views/js/ajax.js b/views/js/ajax.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/views/js/ajax.js
diff --git a/views/js/ajaxupload.js b/views/js/ajaxupload.js
new file mode 100644
index 0000000..a704008
--- /dev/null
+++ b/views/js/ajaxupload.js
@@ -0,0 +1,672 @@
+/**
+ * AJAX Upload ( http://valums.com/ajax-upload/ )
+ * Copyright (c) Andris Valums
+ * Licensed under the MIT license ( http://valums.com/mit-license/ )
+ * Thanks to Gary Haran, David Mark, Corey Burns and others for contributions
+ */
+(function () {
+ /* global window */
+ /* jslint browser: true, devel: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true */
+
+ /**
+ * Wrapper for FireBug's console.log
+ */
+ function log(){
+ if (typeof(console) != 'undefined' && typeof(console.log) == 'function'){
+ Array.prototype.unshift.call(arguments, '[Ajax Upload]');
+ console.log( Array.prototype.join.call(arguments, ' '));
+ }
+ }
+
+ /**
+ * Attaches event to a dom element.
+ * @param {Element} el
+ * @param type event name
+ * @param fn callback This refers to the passed element
+ */
+ function addEvent(el, type, fn){
+ if (el.addEventListener) {
+ el.addEventListener(type, fn, false);
+ } else if (el.attachEvent) {
+ el.attachEvent('on' + type, function(){
+ fn.call(el);
+ });
+ } else {
+ throw new Error('not supported or DOM not loaded');
+ }
+ }
+
+ /**
+ * Attaches resize event to a window, limiting
+ * number of event fired. Fires only when encounteres
+ * delay of 100 after series of events.
+ *
+ * Some browsers fire event multiple times when resizing
+ * http://www.quirksmode.org/dom/events/resize.html
+ *
+ * @param fn callback This refers to the passed element
+ */
+ function addResizeEvent(fn){
+ var timeout;
+
+ addEvent(window, 'resize', function(){
+ if (timeout){
+ clearTimeout(timeout);
+ }
+ timeout = setTimeout(fn, 100);
+ });
+ }
+
+ // Needs more testing, will be rewriten for next version
+ // getOffset function copied from jQuery lib (http://jquery.com/)
+ if (document.documentElement.getBoundingClientRect){
+ // Get Offset using getBoundingClientRect
+ // http://ejohn.org/blog/getboundingclientrect-is-awesome/
+ var getOffset = function(el){
+ var box = el.getBoundingClientRect();
+ var doc = el.ownerDocument;
+ var body = doc.body;
+ var docElem = doc.documentElement; // for ie
+ var clientTop = docElem.clientTop || body.clientTop || 0;
+ var clientLeft = docElem.clientLeft || body.clientLeft || 0;
+
+ // In Internet Explorer 7 getBoundingClientRect property is treated as physical,
+ // while others are logical. Make all logical, like in IE8.
+ var zoom = 1;
+ if (body.getBoundingClientRect) {
+ var bound = body.getBoundingClientRect();
+ zoom = (bound.right - bound.left) / body.clientWidth;
+ }
+
+ if (zoom > 1) {
+ clientTop = 0;
+ clientLeft = 0;
+ }
+
+ var top = box.top / zoom + (window.pageYOffset || docElem && docElem.scrollTop / zoom || body.scrollTop / zoom) - clientTop, left = box.left / zoom + (window.pageXOffset || docElem && docElem.scrollLeft / zoom || body.scrollLeft / zoom) - clientLeft;
+
+ return {
+ top: top,
+ left: left
+ };
+ };
+ } else {
+ // Get offset adding all offsets
+ var getOffset = function(el){
+ var top = 0, left = 0;
+ do {
+ top += el.offsetTop || 0;
+ left += el.offsetLeft || 0;
+ el = el.offsetParent;
+ } while (el);
+
+ return {
+ left: left,
+ top: top
+ };
+ };
+ }
+
+ /**
+ * Returns left, top, right and bottom properties describing the border-box,
+ * in pixels, with the top-left relative to the body
+ * @param {Element} el
+ * @return {Object} Contains left, top, right,bottom
+ */
+ function getBox(el){
+ var left, right, top, bottom;
+ var offset = getOffset(el);
+ left = offset.left;
+ top = offset.top;
+
+ right = left + el.offsetWidth;
+ bottom = top + el.offsetHeight;
+
+ return {
+ left: left,
+ right: right,
+ top: top,
+ bottom: bottom
+ };
+ }
+
+ /**
+ * Helper that takes object literal
+ * and add all properties to element.style
+ * @param {Element} el
+ * @param {Object} styles
+ */
+ function addStyles(el, styles){
+ for (var name in styles) {
+ if (styles.hasOwnProperty(name)) {
+ el.style[name] = styles[name];
+ }
+ }
+ }
+
+ /**
+ * Function places an absolutely positioned
+ * element on top of the specified element
+ * copying position and dimentions.
+ * @param {Element} from
+ * @param {Element} to
+ */
+ function copyLayout(from, to){
+ var box = getBox(from);
+
+ addStyles(to, {
+ position: 'absolute',
+ left : box.left + 'px',
+ top : box.top + 'px',
+ width : from.offsetWidth + 'px',
+ height : from.offsetHeight + 'px'
+ });
+ }
+
+ /**
+ * Creates and returns element from html chunk
+ * Uses innerHTML to create an element
+ */
+ var toElement = (function(){
+ var div = document.createElement('div');
+ return function(html){
+ div.innerHTML = html;
+ var el = div.firstChild;
+ return div.removeChild(el);
+ };
+ })();
+
+ /**
+ * Function generates unique id
+ * @return unique id
+ */
+ var getUID = (function(){
+ var id = 0;
+ return function(){
+ return 'ValumsAjaxUpload' + id++;
+ };
+ })();
+
+ /**
+ * Get file name from path
+ * @param {String} file path to file
+ * @return filename
+ */
+ function fileFromPath(file){
+ return file.replace(/.*(\/|\\)/, "");
+ }
+
+ /**
+ * Get file extension lowercase
+ * @param {String} file name
+ * @return file extenstion
+ */
+ function getExt(file){
+ return (-1 !== file.indexOf('.')) ? file.replace(/.*[.]/, '') : '';
+ }
+
+ function hasClass(el, name){
+ var re = new RegExp('\\b' + name + '\\b');
+ return re.test(el.className);
+ }
+ function addClass(el, name){
+ if ( ! hasClass(el, name)){
+ el.className += ' ' + name;
+ }
+ }
+ function removeClass(el, name){
+ var re = new RegExp('\\b' + name + '\\b');
+ el.className = el.className.replace(re, '');
+ }
+
+ function removeNode(el){
+ el.parentNode.removeChild(el);
+ }
+
+ /**
+ * Easy styling and uploading
+ * @constructor
+ * @param button An element you want convert to
+ * upload button. Tested dimentions up to 500x500px
+ * @param {Object} options See defaults below.
+ */
+ window.AjaxUpload = function(button, options){
+ this._settings = {
+ // Location of the server-side upload script
+ action: 'upload.php',
+ // File upload name
+ name: 'userfile',
+ // Additional data to send
+ data: {},
+ // Submit file as soon as it's selected
+ autoSubmit: true,
+ // The type of data that you're expecting back from the server.
+ // html and xml are detected automatically.
+ // Only useful when you are using json data as a response.
+ // Set to "json" in that case.
+ responseType: false,
+ // Class applied to button when mouse is hovered
+ hoverClass: 'hover',
+ // Class applied to button when AU is disabled
+ disabledClass: 'disabled',
+ // When user selects a file, useful with autoSubmit disabled
+ // You can return false to cancel upload
+ onChange: function(file, extension){
+ },
+ // Callback to fire before file is uploaded
+ // You can return false to cancel upload
+ onSubmit: function(file, extension){
+ },
+ // Fired when file upload is completed
+ // WARNING! DO NOT USE "FALSE" STRING AS A RESPONSE!
+ onComplete: function(file, response){
+ }
+ };
+
+ // Merge the users options with our defaults
+ for (var i in options) {
+ if (options.hasOwnProperty(i)){
+ this._settings[i] = options[i];
+ }
+ }
+
+ // button isn't necessary a dom element
+ if (button.jquery){
+ // jQuery object was passed
+ button = button[0];
+ } else if (typeof button == "string") {
+ if (/^#.*/.test(button)){
+ // If jQuery user passes #elementId don't break it
+ button = button.slice(1);
+ }
+
+ button = document.getElementById(button);
+ }
+
+ if ( ! button || button.nodeType !== 1){
+ throw new Error("Please make sure that you're passing a valid element");
+ }
+
+ if ( button.nodeName.toUpperCase() == 'A'){
+ // disable link
+ addEvent(button, 'click', function(e){
+ if (e && e.preventDefault){
+ e.preventDefault();
+ } else if (window.event){
+ window.event.returnValue = false;
+ }
+ });
+ }
+
+ // DOM element
+ this._button = button;
+ // DOM element
+ this._input = null;
+ // If disabled clicking on button won't do anything
+ this._disabled = false;
+
+ // if the button was disabled before refresh if will remain
+ // disabled in FireFox, let's fix it
+ this.enable();
+
+ this._rerouteClicks();
+ };
+
+ // assigning methods to our class
+ AjaxUpload.prototype = {
+ setData: function(data){
+ this._settings.data = data;
+ },
+ disable: function(){
+ addClass(this._button, this._settings.disabledClass);
+ this._disabled = true;
+
+ var nodeName = this._button.nodeName.toUpperCase();
+ if (nodeName == 'INPUT' || nodeName == 'BUTTON'){
+ this._button.setAttribute('disabled', 'disabled');
+ }
+
+ // hide input
+ if (this._input){
+ // We use visibility instead of display to fix problem with Safari 4
+ // The problem is that the value of input doesn't change if it
+ // has display none when user selects a file
+ this._input.parentNode.style.visibility = 'hidden';
+ }
+ },
+ enable: function(){
+ removeClass(this._button, this._settings.disabledClass);
+ this._button.removeAttribute('disabled');
+ this._disabled = false;
+
+ },
+ /**
+ * Creates invisible file input
+ * that will hover above the button
+ * <div><input type='file' /></div>
+ */
+ _createInput: function(){
+ var self = this;
+
+ var input = document.createElement("input");
+ input.setAttribute('type', 'file');
+ input.setAttribute('name', this._settings.name);
+
+ addStyles(input, {
+ 'position' : 'absolute',
+ // in Opera only 'browse' button
+ // is clickable and it is located at
+ // the right side of the input
+ 'right' : 0,
+ 'margin' : 0,
+ 'padding' : 0,
+ 'fontSize' : '480px',
+ 'cursor' : 'pointer'
+ });
+
+ var div = document.createElement("div");
+ addStyles(div, {
+ 'display' : 'block',
+ 'position' : 'absolute',
+ 'overflow' : 'hidden',
+ 'margin' : 0,
+ 'padding' : 0,
+ 'opacity' : 0,
+ // Make sure browse button is in the right side
+ // in Internet Explorer
+ 'direction' : 'ltr',
+ //Max zIndex supported by Opera 9.0-9.2
+ 'zIndex': 2147483583
+ });
+
+ // Make sure that element opacity exists.
+ // Otherwise use IE filter
+ if ( div.style.opacity !== "0") {
+ if (typeof(div.filters) == 'undefined'){
+ throw new Error('Opacity not supported by the browser');
+ }
+ div.style.filter = "alpha(opacity=0)";
+ }
+
+ addEvent(input, 'change', function(){
+
+ if ( ! input || input.value === ''){
+ return;
+ }
+
+ // Get filename from input, required
+ // as some browsers have path instead of it
+ var file = fileFromPath(input.value);
+
+ if (false === self._settings.onChange.call(self, file, getExt(file))){
+ self._clearInput();
+ return;
+ }
+
+ // Submit form when value is changed
+ if (self._settings.autoSubmit) {
+ self.submit();
+ }
+ });
+
+ addEvent(input, 'mouseover', function(){
+ addClass(self._button, self._settings.hoverClass);
+ });
+
+ addEvent(input, 'mouseout', function(){
+ removeClass(self._button, self._settings.hoverClass);
+
+ // We use visibility instead of display to fix problem with Safari 4
+ // The problem is that the value of input doesn't change if it
+ // has display none when user selects a file
+ input.parentNode.style.visibility = 'hidden';
+
+ });
+
+ div.appendChild(input);
+ document.body.appendChild(div);
+
+ this._input = input;
+ },
+ _clearInput : function(){
+ if (!this._input){
+ return;
+ }
+
+ removeNode(this._input.parentNode);
+ this._input = null;
+ this._createInput();
+
+ removeClass(this._button, this._settings.hoverClass);
+ },
+ /**
+ * Function makes sure that when user clicks upload button,
+ * the this._input is clicked instead
+ */
+ _rerouteClicks: function(){
+ var self = this;
+
+ // IE will later display 'access denied' error
+ // if you use using self._input.click()
+ // other browsers just ignore click()
+
+ addEvent(self._button, 'mouseover', function(){
+ if (self._disabled){
+ return;
+ }
+
+ if ( ! self._input){
+ self._createInput();
+ }
+
+ var div = self._input.parentNode;
+ copyLayout(self._button, div);
+ div.style.visibility = 'visible';
+
+ });
+
+
+ // commented because we now hide input on mouseleave
+ /**
+ * When the window is resized the elements
+ * can be misaligned if button position depends
+ * on window size
+ */
+ //addResizeEvent(function(){
+ // if (self._input){
+ // copyLayout(self._button, self._input.parentNode);
+ // }
+ //});
+
+ },
+ /**
+ * Creates iframe with unique name
+ * @return {Element} iframe
+ */
+ _createIframe: function(){
+ // We can't use getTime, because it sometimes return
+ // same value in safari :(
+ var id = getUID();
+
+ // We can't use following code as the name attribute
+ // won't be properly registered in IE6, and new window
+ // on form submit will open
+ // var iframe = document.createElement('iframe');
+ // iframe.setAttribute('name', id);
+
+ var iframe = toElement('<iframe src="javascript:false;" name="' + id + '" />');
+ // src="javascript:false; was added
+ // because it possibly removes ie6 prompt
+ // "This page contains both secure and nonsecure items"
+ // Anyway, it doesn't do any harm.
+ iframe.setAttribute('id', id);
+
+ iframe.style.display = 'none';
+ document.body.appendChild(iframe);
+
+ return iframe;
+ },
+ /**
+ * Creates form, that will be submitted to iframe
+ * @param {Element} iframe Where to submit
+ * @return {Element} form
+ */
+ _createForm: function(iframe){
+ var settings = this._settings;
+
+ // We can't use the following code in IE6
+ // var form = document.createElement('form');
+ // form.setAttribute('method', 'post');
+ // form.setAttribute('enctype', 'multipart/form-data');
+ // Because in this case file won't be attached to request
+ var form = toElement('<form method="post" enctype="multipart/form-data"></form>');
+
+ form.setAttribute('action', settings.action);
+ form.setAttribute('target', iframe.name);
+ form.style.display = 'none';
+ document.body.appendChild(form);
+
+ // Create hidden input element for each data key
+ for (var prop in settings.data) {
+ if (settings.data.hasOwnProperty(prop)){
+ var el = document.createElement("input");
+ el.setAttribute('type', 'hidden');
+ el.setAttribute('name', prop);
+ el.setAttribute('value', settings.data[prop]);
+ form.appendChild(el);
+ }
+ }
+ return form;
+ },
+ /**
+ * Gets response from iframe and fires onComplete event when ready
+ * @param iframe
+ * @param file Filename to use in onComplete callback
+ */
+ _getResponse : function(iframe, file){
+ // getting response
+ var toDeleteFlag = false, self = this, settings = this._settings;
+
+ addEvent(iframe, 'load', function(){
+
+ if (// For Safari
+ iframe.src == "javascript:'%3Chtml%3E%3C/html%3E';" ||
+ // For FF, IE
+ iframe.src == "javascript:'<html></html>';"){
+ // First time around, do not delete.
+ // We reload to blank page, so that reloading main page
+ // does not re-submit the post.
+
+ if (toDeleteFlag) {
+ // Fix busy state in FF3
+ setTimeout(function(){
+ removeNode(iframe);
+ }, 0);
+ }
+
+ return;
+ }
+
+ var doc = iframe.contentDocument ? iframe.contentDocument : window.frames[iframe.id].document;
+
+ // fixing Opera 9.26,10.00
+ if (doc.readyState && doc.readyState != 'complete') {
+ // Opera fires load event multiple times
+ // Even when the DOM is not ready yet
+ // this fix should not affect other browsers
+ return;
+ }
+
+ // fixing Opera 9.64
+ if (doc.body && doc.body.innerHTML == "false") {
+ // In Opera 9.64 event was fired second time
+ // when body.innerHTML changed from false
+ // to server response approx. after 1 sec
+ return;
+ }
+
+ var response;
+
+ if (doc.XMLDocument) {
+ // response is a xml document Internet Explorer property
+ response = doc.XMLDocument;
+ } else if (doc.body){
+ // response is html document or plain text
+ response = doc.body.innerHTML;
+
+ if (settings.responseType && settings.responseType.toLowerCase() == 'json') {
+ // If the document was sent as 'application/javascript' or
+ // 'text/javascript', then the browser wraps the text in a <pre>
+ // tag and performs html encoding on the contents. In this case,
+ // we need to pull the original text content from the text node's
+ // nodeValue property to retrieve the unmangled content.
+ // Note that IE6 only understands text/html
+ if (doc.body.firstChild && doc.body.firstChild.nodeName.toUpperCase() == 'PRE') {
+ response = doc.body.firstChild.firstChild.nodeValue;
+ }
+
+ if (response) {
+ response = eval("(" + response + ")");
+ } else {
+ response = {};
+ }
+ }
+ } else {
+ // response is a xml document
+ response = doc;
+ }
+
+ settings.onComplete.call(self, file, response);
+
+ // Reload blank page, so that reloading main page
+ // does not re-submit the post. Also, remember to
+ // delete the frame
+ toDeleteFlag = true;
+
+ // Fix IE mixed content issue
+ iframe.src = "javascript:'<html></html>';";
+ });
+ },
+ /**
+ * Upload file contained in this._input
+ */
+ submit: function(){
+ var self = this, settings = this._settings;
+
+ if ( ! this._input || this._input.value === ''){
+ return;
+ }
+
+ var file = fileFromPath(this._input.value);
+
+ // user returned false to cancel upload
+ if (false === settings.onSubmit.call(this, file, getExt(file))){
+ this._clearInput();
+ return;
+ }
+
+ // sending request
+ var iframe = this._createIframe();
+ var form = this._createForm(iframe);
+
+ // assuming following structure
+ // div -> input type='file'
+ removeNode(this._input.parentNode);
+ removeClass(self._button, self._settings.hoverClass);
+
+ form.appendChild(this._input);
+
+ form.submit();
+
+ // request set, clean up
+ removeNode(form); form = null;
+ removeNode(this._input); this._input = null;
+
+ // Get response from iframe and fire onComplete event when ready
+ this._getResponse(iframe, file);
+
+ // get ready for next request
+ this._createInput();
+ }
+ };
+})();
diff --git a/views/js/editable.js b/views/js/editable.js
new file mode 100644
index 0000000..362b001
--- /dev/null
+++ b/views/js/editable.js
@@ -0,0 +1,576 @@
+/*
+ * Jeditable - jQuery in place edit plugin
+ *
+ * Copyright (c) 2006-2009 Mika Tuupola, Dylan Verheul
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * Project home:
+ * http://www.appelsiini.net/projects/jeditable
+ *
+ * Based on editable by Dylan Verheul <dylan_at_dyve.net>:
+ * http://www.dyve.net/jquery/?editable
+ *
+ */
+
+/**
+ * Version 1.7.1
+ *
+ * ** means there is basic unit tests for this parameter.
+ *
+ * @name Jeditable
+ * @type jQuery
+ * @param String target (POST) URL or function to send edited content to **
+ * @param Hash options additional options
+ * @param String options[method] method to use to send edited content (POST or PUT) **
+ * @param Function options[callback] Function to run after submitting edited content **
+ * @param String options[name] POST parameter name of edited content
+ * @param String options[id] POST parameter name of edited div id
+ * @param Hash options[submitdata] Extra parameters to send when submitting edited content.
+ * @param String options[type] text, textarea or select (or any 3rd party input type) **
+ * @param Integer options[rows] number of rows if using textarea **
+ * @param Integer options[cols] number of columns if using textarea **
+ * @param Mixed options[height] 'auto', 'none' or height in pixels **
+ * @param Mixed options[width] 'auto', 'none' or width in pixels **
+ * @param String options[loadurl] URL to fetch input content before editing **
+ * @param String options[loadtype] Request type for load url. Should be GET or POST.
+ * @param String options[loadtext] Text to display while loading external content.
+ * @param Mixed options[loaddata] Extra parameters to pass when fetching content before editing.
+ * @param Mixed options[data] Or content given as paramameter. String or function.**
+ * @param String options[indicator] indicator html to show when saving
+ * @param String options[tooltip] optional tooltip text via title attribute **
+ * @param String options[event] jQuery event such as 'click' of 'dblclick' **
+ * @param String options[submit] submit button value, empty means no button **
+ * @param String options[cancel] cancel button value, empty means no button **
+ * @param String options[cssclass] CSS class to apply to input form. 'inherit' to copy from parent. **
+ * @param String options[style] Style to apply to input form 'inherit' to copy from parent. **
+ * @param String options[select] true or false, when true text is highlighted ??
+ * @param String options[placeholder] Placeholder text or html to insert when element is empty. **
+ * @param String options[onblur] 'cancel', 'submit', 'ignore' or function ??
+ *
+ * @param Function options[onsubmit] function(settings, original) { ... } called before submit
+ * @param Function options[onreset] function(settings, original) { ... } called before reset
+ * @param Function options[onerror] function(settings, original, xhr) { ... } called on error
+ *
+ * @param Hash options[ajaxoptions] jQuery Ajax options. See docs.jquery.com.
+ *
+ */
+
+(function($) {
+
+ $.fn.editable = function(target, options) {
+
+ if ('disable' == target) {
+ $(this).data('disabled.editable', true);
+ return;
+ }
+ if ('enable' == target) {
+ $(this).data('disabled.editable', false);
+ return;
+ }
+ if ('destroy' == target) {
+ $(this)
+ .unbind($(this).data('event.editable'))
+ .removeData('disabled.editable')
+ .removeData('event.editable');
+ return;
+ }
+
+ var settings = $.extend({}, $.fn.editable.defaults, {target:target}, options);
+
+ /* setup some functions */
+ var plugin = $.editable.types[settings.type].plugin || function() { };
+ var submit = $.editable.types[settings.type].submit || function() { };
+ var buttons = $.editable.types[settings.type].buttons
+ || $.editable.types['defaults'].buttons;
+ var content = $.editable.types[settings.type].content
+ || $.editable.types['defaults'].content;
+ var element = $.editable.types[settings.type].element
+ || $.editable.types['defaults'].element;
+ var reset = $.editable.types[settings.type].reset
+ || $.editable.types['defaults'].reset;
+ var callback = settings.callback || function() { };
+ var onedit = settings.onedit || function() { };
+ var onsubmit = settings.onsubmit || function() { };
+ var onreset = settings.onreset || function() { };
+ var onerror = settings.onerror || reset;
+ var json = false;
+
+ /* show tooltip */
+ if (settings.tooltip) {
+ $(this).attr('title', settings.tooltip);
+ }
+
+ settings.autowidth = 'auto' == settings.width;
+ settings.autoheight = 'auto' == settings.height;
+
+ return this.each(function() {
+
+ /* save this to self because this changes when scope changes */
+ var self = this;
+
+ /* inlined block elements lose their width and height after first edit */
+ /* save them for later use as workaround */
+ var savedwidth = $(self).width();
+ var savedheight = $(self).height();
+
+ /* save so it can be later used by $.editable('destroy') */
+ $(this).data('event.editable', settings.event);
+
+ /* if element is empty add something clickable (if requested) */
+ if (!$.trim($(this).html())) {
+ $(this).html(settings.placeholder);
+ }
+
+ $(this).bind(settings.event, function(e) {
+
+ /* abort if disabled for this element */
+ if (true === $(this).data('disabled.editable')) {
+ return;
+ }
+
+ /* prevent throwing an exeption if edit field is clicked again */
+ if (self.editing) {
+ return;
+ }
+
+ /* abort if onedit hook returns false */
+ if (false === onedit.apply(this, [settings, self])) {
+ return;
+ }
+
+ /* prevent default action and bubbling */
+ e.preventDefault();
+ e.stopPropagation();
+
+ /* remove tooltip */
+ if (settings.tooltip) {
+ $(self).removeAttr('title');
+ }
+
+ /* figure out how wide and tall we are, saved width and height */
+ /* are workaround for http://dev.jquery.com/ticket/2190 */
+ if (0 == $(self).width()) {
+ //$(self).css('visibility', 'hidden');
+ settings.width = savedwidth;
+ settings.height = savedheight;
+ } else {
+ if (settings.width != 'none') {
+ settings.width =
+ settings.autowidth ? $(self).width() : settings.width;
+ }
+ if (settings.height != 'none') {
+ settings.height =
+ settings.autoheight ? $(self).height() : settings.height;
+ }
+ }
+ //$(this).css('visibility', '');
+
+ /* remove placeholder text, replace is here because of IE */
+ if ($(this).html().toLowerCase().replace(/(;|")/g, '') ==
+ settings.placeholder.toLowerCase().replace(/(;|")/g, '')) {
+ $(this).html('');
+ }
+
+ self.editing = true;
+ self.revert = $(self).html();
+ $(self).html('');
+
+ /* create the form object */
+ var form = $('<form />');
+
+ /* apply css or style or both */
+ if (settings.cssclass) {
+ if ('inherit' == settings.cssclass) {
+ form.attr('class', $(self).attr('class'));
+ } else {
+ form.attr('class', settings.cssclass);
+ }
+ }
+
+ if (settings.style) {
+ if ('inherit' == settings.style) {
+ form.attr('style', $(self).attr('style'));
+ /* IE needs the second line or display wont be inherited */
+ form.css('display', $(self).css('display'));
+ } else {
+ form.attr('style', settings.style);
+ }
+ }
+
+ /* add main input element to form and store it in input */
+ var input = element.apply(form, [settings, self]);
+
+ /* set input content via POST, GET, given data or existing value */
+ var input_content;
+
+ if (settings.loadurl) {
+ var t = setTimeout(function() {
+ input.disabled = true;
+ content.apply(form, [settings.loadtext, settings, self]);
+ }, 100);
+
+ var loaddata = {};
+ loaddata[settings.id] = self.id;
+ if ($.isFunction(settings.loaddata)) {
+ $.extend(loaddata, settings.loaddata.apply(self, [self.revert, settings]));
+ } else {
+ $.extend(loaddata, settings.loaddata);
+ }
+ $.ajax({
+ type : settings.loadtype,
+ url : settings.loadurl,
+ data : loaddata,
+ async : false,
+ success: function(result) {
+ window.clearTimeout(t);
+ input_content = result;
+ input.disabled = false;
+ }
+ });
+ } else if (settings.data) {
+ input_content = settings.data;
+ if ($.isFunction(settings.data)) {
+ input_content = settings.data.apply(self, [self.revert, settings]);
+ }
+ } else {
+ input_content = self.revert;
+ }
+ content.apply(form, [input_content, settings, self]);
+
+ input.attr('name', settings.name);
+
+ /* add buttons to the form */
+ buttons.apply(form, [settings, self]);
+
+ /* add created form to self */
+ $(self).append(form);
+
+ /* attach 3rd party plugin if requested */
+ plugin.apply(form, [settings, self]);
+
+ /* focus to first visible form element */
+ $(':input:visible:enabled:first', form).focus();
+
+ /* highlight input contents when requested */
+ if (settings.select) {
+ input.select();
+ }
+
+ /* discard changes if pressing esc */
+ input.keydown(function(e) {
+ if (e.keyCode == 27) {
+ e.preventDefault();
+ //self.reset();
+ reset.apply(form, [settings, self]);
+ }
+ });
+
+ /* discard, submit or nothing with changes when clicking outside */
+ /* do nothing is usable when navigating with tab */
+ var t;
+ if ('cancel' == settings.onblur) {
+ input.blur(function(e) {
+ /* prevent canceling if submit was clicked */
+ t = setTimeout(function() {
+ reset.apply(form, [settings, self]);
+ }, 500);
+ });
+ } else if ('submit' == settings.onblur) {
+ input.blur(function(e) {
+ /* prevent double submit if submit was clicked */
+ t = setTimeout(function() {
+ form.submit();
+ }, 200);
+ });
+ } else if ($.isFunction(settings.onblur)) {
+ input.blur(function(e) {
+ settings.onblur.apply(self, [input.val(), settings]);
+ });
+ } else {
+ input.blur(function(e) {
+ /* TODO: maybe something here */
+ });
+ }
+
+ form.submit(function(e) {
+
+ if (t) {
+ clearTimeout(t);
+ }
+
+ /* do no submit */
+ e.preventDefault();
+
+ /* call before submit hook. */
+ /* if it returns false abort submitting */
+ if (false !== onsubmit.apply(form, [settings, self])) {
+ /* custom inputs call before submit hook. */
+ /* if it returns false abort submitting */
+ if (false !== submit.apply(form, [settings, self])) {
+
+ /* check if given target is function */
+ if ($.isFunction(settings.target)) {
+ var str = settings.target.apply(self, [input.val(), settings]);
+ $(self).html(str);
+ self.editing = false;
+ callback.apply(self, [self.innerHTML, settings]);
+ /* TODO: this is not dry */
+ if (!$.trim($(self).html())) {
+ $(self).html(settings.placeholder);
+ }
+ } else {
+ /* add edited content and id of edited element to POST */
+ var submitdata = {};
+ submitdata[settings.name] = input.val();
+ submitdata[settings.id] = self.id;
+ /* add extra data to be POST:ed */
+ if ($.isFunction(settings.submitdata)) {
+ $.extend(submitdata, settings.submitdata.apply(self, [self.revert, settings]));
+ } else {
+ $.extend(submitdata, settings.submitdata);
+ }
+
+ /* quick and dirty PUT support */
+ if ('PUT' == settings.method) {
+ submitdata['_method'] = 'put';
+ }
+
+ /* show the saving indicator */
+ $(self).html(settings.indicator);
+
+ /* defaults for ajaxoptions */
+ var ajaxoptions = {
+ type : 'POST',
+ data : submitdata,
+ dataType: 'html',
+ url : settings.target,
+ success : function(result, status) {
+ if (ajaxoptions.dataType == 'html') {
+ $(self).html(result);
+ settings.data = result;
+ }
+ self.editing = false;
+ callback.apply(self, [result, settings]);
+ if (!$.trim($(self).html())) {
+ $(self).html(settings.placeholder);
+ }
+ },
+ error : function(xhr, status, error) {
+ onerror.apply(form, [settings, self, xhr]);
+ }
+ };
+
+ /* override with what is given in settings.ajaxoptions */
+ $.extend(ajaxoptions, settings.ajaxoptions);
+ $.ajax(ajaxoptions);
+
+ }
+ }
+ }
+
+ /* show tooltip again */
+ $(self).attr('title', settings.tooltip);
+
+ return false;
+ });
+ });
+
+ /* privileged methods */
+ this.reset = function(form) {
+ /* prevent calling reset twice when blurring */
+ if (this.editing) {
+ /* before reset hook, if it returns false abort reseting */
+ if (false !== onreset.apply(form, [settings, self])) {
+ $(self).html(self.revert);
+ self.editing = false;
+ if (!$.trim($(self).html())) {
+ $(self).html(settings.placeholder);
+ }
+ /* show tooltip again */
+ if (settings.tooltip) {
+ $(self).attr('title', settings.tooltip);
+ }
+ }
+ }
+ };
+ });
+
+ };
+
+
+ $.editable = {
+ types: {
+ defaults: {
+ element : function(settings, original) {
+ var input = $('<input type="hidden"></input>');
+ $(this).append(input);
+ return(input);
+ },
+ content : function(string, settings, original) {
+ $(':input:first', this).val(string);
+ },
+ reset : function(settings, original) {
+ original.reset(this);
+ },
+ buttons : function(settings, original) {
+ var form = this;
+ if (settings.submit) {
+ /* if given html string use that */
+ if (settings.submit.match(/>$/)) {
+ var submit = $(settings.submit).click(function() {
+ if (submit.attr("type") != "submit") {
+ form.submit();
+ }
+ });
+ /* otherwise use button with given string as text */
+ } else {
+ var submit = $('<button class="button" type="submit" />');
+ submit.html(settings.submit);
+ }
+ $(this).append(submit);
+ }
+ if (settings.cancel) {
+ /* if given html string use that */
+ if (settings.cancel.match(/>$/)) {
+ var cancel = $(settings.cancel);
+ /* otherwise use button with given string as text */
+ } else {
+ var cancel = $('<button type="cancel" />');
+ cancel.html(settings.cancel);
+ }
+ $(this).append(cancel);
+
+ $(cancel).click(function(event) {
+ //original.reset();
+ if ($.isFunction($.editable.types[settings.type].reset)) {
+ var reset = $.editable.types[settings.type].reset;
+ } else {
+ var reset = $.editable.types['defaults'].reset;
+ }
+ reset.apply(form, [settings, original]);
+ return false;
+ });
+ }
+ }
+ },
+ text: {
+ element : function(settings, original) {
+ var input = $('<input />');
+ if (settings.width != 'none') { input.width(settings.width); }
+ if (settings.height != 'none') { input.height(settings.height); }
+ /* https://bugzilla.mozilla.org/show_bug.cgi?id=236791 */
+ //input[0].setAttribute('autocomplete','off');
+ input.attr('autocomplete','off');
+ $(this).append(input);
+ return(input);
+ }
+ },
+ textarea: {
+ element : function(settings, original) {
+ var textarea = $('<textarea />');
+ if (settings.rows) {
+ textarea.attr('rows', settings.rows);
+ } else if (settings.height != "none") {
+ textarea.height(settings.height);
+ }
+ if (settings.cols) {
+ textarea.attr('cols', settings.cols);
+ } else if (settings.width != "none") {
+ textarea.width(settings.width);
+ }
+ $(this).append(textarea);
+ return(textarea);
+ }
+ },
+ select: {
+ element : function(settings, original) {
+ var select = $('<select />');
+ $(this).append(select);
+ return(select);
+ },
+ content : function(data, settings, original) {
+
+ if (typeof settings.json == "undefined")
+ {
+
+ /* If it is string assume it is json. */
+ if (String == data.constructor) {
+ eval ('var json = ' + data);
+ } else {
+ /* Otherwise assume it is a hash already. */
+ var json = data;
+ }
+
+ settings.json = json;
+
+ }
+ else
+ {
+
+ json = settings.json;
+
+ }
+
+ for (var key in json) {
+ if (!json.hasOwnProperty(key)) {
+ continue;
+ }
+ if ('selected' == key) {
+ continue;
+ }
+
+ if (typeof json[key]['name'] == 'string')
+ {
+
+ var option = $('<optgroup />').attr('label', json[key]['name']);
+
+ for (var key2 in json[key]['fields'])
+ {
+ option.append($('<option />').val(key2).append(json[key]['fields'][key2]));
+ }
+
+ }
+ else
+ {
+ var option = $('<option />').val(key).append(json[key]);
+ }
+
+ $('select', this).append(option);
+ }
+ /* Loop option again to set selected. IE needed this... */
+ $('select', this).find('option').each(function() {
+ if ($(this).val() == json['selected'] ||
+ $(this).text() == $.trim(original.revert)) {
+ $(this).attr('selected', 'selected');
+ }
+ });
+ }
+ }
+ },
+
+ /* Add new input type */
+ addInputType: function(name, input) {
+ $.editable.types[name] = input;
+ }
+ };
+
+ // publicly accessible defaults
+ $.fn.editable.defaults = {
+ name : 'value',
+ id : 'id',
+ type : 'text',
+ width : 'auto',
+ height : '25px',
+ event : 'click.editable',
+ onblur : 'cancel',
+ loadtype : 'GET',
+ loadtext : 'Loading...',
+ placeholder: 'Click to edit',
+ loaddata : {},
+ submitdata : {},
+ ajaxoptions: {}
+ };
+
+})(jQuery);
diff --git a/views/js/frontend.js b/views/js/frontend.js
new file mode 100644
index 0000000..b4b0119
--- /dev/null
+++ b/views/js/frontend.js
@@ -0,0 +1,121 @@
+
+ /**
+ * Funktion für das Modul basketteaser
+ * Fügt die Produkte im Warenkorb ein
+ */
+ function wpsg_mod_basketteaser_add(produkt_id)
+ {
+
+ var menge = jQuery('.wpsg_mod_basketteaser_row_' + produkt_id + ' input').val();
+
+ if (menge <= 0) menge = 1;
+
+ location.href = wpsg_ajax.ajaxurl + '?wpsg[menge]=' + menge + '&wpsg[produkt_id]=' + produkt_id + '&wpsg[submit]=1';
+
+ return false;
+
+ } // wpsg_mod_basketteaser_add(produkt_id)
+
+ function wpsg_customerquestion(url_redirect)
+ {
+
+ jQuery('body,html').addClass('wpsg_noscroll');
+ jQuery('body').append('<div id="wpsg_calc_layer"><div class="content"><img class="loading" src="' + wpsg_ajax.img_ajaxloading + '" alt="' + wpsg_ajax.label_pleasewait + '" /></div></div>');
+ jQuery.ajax( {
+ url: wpsg_ajax.url_basket,
+ data: {
+ 'wpsg[ajax]': 1,
+ 'wpsg[action]': 'customerquestion',
+ 'wpsg[url]': url_redirect
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_calc_layer .content').html(data);
+
+ }
+ } );
+
+ return false;
+
+ }
+
+ wpsg_numberformat = function (number, decimals, dec_point, thousands_sep)
+ {
+
+ var n = !isFinite(+number) ? 0 : +number,
+ prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),
+ sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, dec = (typeof dec_point === 'undefined') ? '.' : dec_point,
+ s = '',
+
+ toFixedFix = function (n, prec)
+ {
+
+ var k = Math.pow(10, prec);
+ return '' + Math.round(n * k) / k;
+ };
+
+ s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');
+
+ if (s[0].length > 3)
+ {
+ s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep);
+ }
+ if ((s[1] || '').length < prec)
+ {
+
+ s[1] = s[1] || '';
+ s[1] += new Array(prec - s[1].length + 1).join('0');
+
+ }
+
+ return s.join(dec);
+
+ };
+
+ wpsg_tf = function(value)
+ {
+
+ if (value == null) return;
+ if (typeof value == "number") return parseFloat(value);
+
+ if (value.lastIndexOf(".") == -1)
+ {
+
+ // 1500,50
+ return parseFloat(value.replace(/,/, "."));
+
+ }
+ else
+ {
+
+ if (value.lastIndexOf(",") == -1)
+ {
+
+ // 1500.50
+ return parseFloat(value);
+
+ }
+ else
+ {
+
+ if (value.lastIndexOf(",") > value.lastIndexOf("."))
+ {
+
+ // 1.500,50
+ return parseFloat(value.replace(/\./, "").replace(/,/, "."));
+
+ }
+ else
+ {
+
+ // 1,500.50
+ return parseFloat(value.replace(/,/, ""));
+
+ }
+
+ }
+
+ }
+
+ };
+ \ No newline at end of file
diff --git a/views/js/jquery-cluetip-master/.gitignore b/views/js/jquery-cluetip-master/.gitignore
new file mode 100644
index 0000000..aa6c4c9
--- /dev/null
+++ b/views/js/jquery-cluetip-master/.gitignore
@@ -0,0 +1,2 @@
+.DS_Store
+demo-more* \ No newline at end of file
diff --git a/views/js/jquery-cluetip-master/images/darrowdown.gif b/views/js/jquery-cluetip-master/images/darrowdown.gif
new file mode 100644
index 0000000..e138d9b
--- /dev/null
+++ b/views/js/jquery-cluetip-master/images/darrowdown.gif
Binary files differ
diff --git a/views/js/jquery-cluetip-master/images/darrowleft.gif b/views/js/jquery-cluetip-master/images/darrowleft.gif
new file mode 100644
index 0000000..e22d11c
--- /dev/null
+++ b/views/js/jquery-cluetip-master/images/darrowleft.gif
Binary files differ
diff --git a/views/js/jquery-cluetip-master/images/darrowright.gif b/views/js/jquery-cluetip-master/images/darrowright.gif
new file mode 100644
index 0000000..d36d7e4
--- /dev/null
+++ b/views/js/jquery-cluetip-master/images/darrowright.gif
Binary files differ
diff --git a/views/js/jquery-cluetip-master/images/darrowup.gif b/views/js/jquery-cluetip-master/images/darrowup.gif
new file mode 100644
index 0000000..fd74057
--- /dev/null
+++ b/views/js/jquery-cluetip-master/images/darrowup.gif
Binary files differ
diff --git a/views/js/jquery-cluetip-master/jquery.cluetip.css b/views/js/jquery-cluetip-master/jquery.cluetip.css
new file mode 100644
index 0000000..12209d1
--- /dev/null
+++ b/views/js/jquery-cluetip-master/jquery.cluetip.css
@@ -0,0 +1,241 @@
+/* global */
+div.ui-cluetip {
+ font-size: 1em;
+}
+.ui-cluetip-header,
+.ui-cluetip-content {
+ padding: 12px;
+}
+.ui-cluetip-header {
+ font-size: 1em;
+ margin: 0;
+ overflow: hidden;
+}
+
+.cluetip-title .cluetip-close {
+ float: right;
+ position: relative;
+}
+.cluetip-close img {
+ border: 0;
+}
+
+#cluetip-waitimage {
+ width: 43px;
+ height: 11px;
+ position: absolute;
+ background-image: url(../../gfx/ajax-loader.gif);
+ background-repeat:no-repeat;
+ background-position:50% 50%;
+}
+.cluetip-arrows {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: -11px;
+ width: 11px;
+ height: 22px;
+ background-repeat: no-repeat;
+ background-position: 0 0;
+ border-width: 0;
+}
+.cluetip-extra {
+ display: none;
+}
+
+/***************************************
+ =cluetipClass: 'default'
+-------------------------------------- */
+
+.cluetip-default,
+.cluetip-default .cluetip-outer {
+ background-color: #d9d9c2;
+}
+.cluetip-default .ui-cluetip-header {
+ background-color: #87876a;
+}
+
+
+/*
+.cluetip-default #cluetip-outer {
+ position: relative;
+ margin: 0;
+ background-color: #d9d9c2;
+}
+.cluetip-default h3#cluetip-title {
+ margin: 0 0 5px;
+ padding: 8px 10px 4px;
+ font-size: 1.1em;
+ font-weight: normal;
+ background-color: #87876a;
+ color: #fff;
+}
+.cluetip-default #cluetip-title a {
+ color: #d9d9c2;
+ font-size: 0.95em;
+}
+.cluetip-default #cluetip-inner {
+ padding: 10px;
+}
+.cluetip-default div#cluetip-close {
+ text-align: right;
+ margin: 0 5px 5px;
+ color: #900;
+}
+*/
+/* default arrows */
+div.cluetip-default .cluetip-arrows {
+ border-width: 0;
+ background: transparent none;
+}
+div.clue-right-default .cluetip-arrows {
+ background-image: url(images/darrowleft.gif);
+}
+div.clue-left-default .cluetip-arrows {
+ background-image: url(images/darrowright.gif);
+ left: 100%;
+ margin-right: -11px;
+}
+div.clue-top-default .cluetip-arrows {
+ background-image: url(images/darrowdown.gif);
+ top: 100%;
+ left: 50%;
+ margin-left: -11px;
+ width: 22px;
+ height: 11px;
+}
+div.clue-bottom-default .cluetip-arrows {
+ background-image: url(images/darrowup.gif);
+ top: -11px;
+ left: 50%;
+ margin-left: -11px;
+ width: 22px;
+ height: 11px;
+}
+
+/***************************************
+ =cluetipClass: 'jtip'
+-------------------------------------- */
+.cluetip-jtip {
+ background-color: #fff;
+}
+.cluetip-jtip .cluetip-outer {
+ border: 2px solid #ccc;
+ position: relative;
+ /*background-color: #fff;*/
+}
+
+.cluetip-jtip .cluetip-inner {
+ padding: 5px;
+ display: inline-block;
+}
+.cluetip-jtip div.cluetip-close {
+ text-align: right;
+ margin: 0 5px 0;
+ color: #900;
+}
+
+.cluetip-jtip .ui-cluetip-header {
+ background-color: #ccc;
+ padding: 6px;
+/* margin-bottom: 1em;*/
+}
+
+/* jtip arrows */
+div.cluetip-jtip .cluetip-arrows {
+ border-width: 0;
+ background: transparent none;
+}
+div.clue-right-jtip .cluetip-arrows {
+ background-image: url(images/arrowleft.gif);
+}
+div.clue-left-jtip .cluetip-arrows {
+ background-image: url(images/arrowright.gif);
+ left: 100%;
+ margin-right: -11px;
+}
+div.clue-top-jtip .cluetip-arrows {
+ background-image: url(images/arrowdown.gif);
+ top: 100%;
+ left: 50%;
+ width: 22px;
+ height: 11px;
+ margin-left: -11px;
+}
+div.clue-bottom-jtip .cluetip-arrows {
+ background-image: url(images/arrowup.gif);
+ top: -11px;
+ left: 50%;
+ width: 22px;
+ height: 11px;
+ margin-left: -11px;
+}
+
+/***************************************
+ =cluetipClass: 'rounded'
+-------------------------------------- */
+.cluetip-rounded {
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ background-color: #fff;
+ border: 1px solid #ccc;
+}
+
+.cluetip-rounded .cluetip-outer {
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ background-color: #fff;
+}
+
+.cluetip-rounded .cluetip-arrows {
+ border-color: #ccc;
+}
+
+/* need to be more specific here to override ThemeRoller defaults */
+div.cluetip-rounded .cluetip-arrows {
+ font-size: 0;
+ line-height: 0%;
+ width: 0;
+ height: 0;
+ border-style: solid;
+ background: transparent none;
+}
+div.clue-right-rounded .cluetip-arrows {
+ border-width: 11px 11px 11px 0;
+ border-top-color: transparent;
+ border-bottom-color: transparent;
+ border-left-color: transparent;
+}
+div.clue-left-rounded .cluetip-arrows {
+ left: 100%;
+ margin-right: -11px;
+ border-width: 11px 0 11px 11px;
+ border-top-color: transparent;
+ border-right-color: transparent;
+ border-bottom-color: transparent;
+
+}
+div.clue-top-rounded .cluetip-arrows {
+ top: 100%;
+ left: 50%;
+ border-width: 11px 11px 0 11px;
+ border-right-color: transparent;
+ border-bottom-color: transparent;
+ border-left-color: transparent;
+}
+.clue-bottom-rounded .cluetip-arrows {
+ top: -11px;
+ left: 50%;
+ border-width: 0 11px 11px 11px;
+ border-top-color: transparent;
+ border-right-color: transparent;
+ border-left-color: transparent;
+
+}
+/* stupid IE6 HasLayout hack */
+.cluetip-rounded .cluetip-title,
+.cluetip-rounded .cluetip-inner {
+ zoom: 1;
+}
diff --git a/views/js/jquery-cluetip-master/jquery.cluetip.js b/views/js/jquery-cluetip-master/jquery.cluetip.js
new file mode 100644
index 0000000..35808df
--- /dev/null
+++ b/views/js/jquery-cluetip-master/jquery.cluetip.js
@@ -0,0 +1,880 @@
+/*!
+ * clueTip - v1.2.9 - 2013-06-02
+ * http://plugins.learningjquery.com/cluetip/
+ * Copyright (c) 2013 Karl Swedberg
+ * Licensed MIT (http://www.opensource.org/licenses/mit-license.php)
+ */
+
+(function($) {
+
+ $.cluetip = {
+ version: '1.2.9',
+
+ // the HTML that will be used for the tooltip
+ template: ['<div>',
+ '<div class="cluetip-outer">',
+ '<h3 class="cluetip-title ui-widget-header ui-cluetip-header"></h3>',
+ '<div class="cluetip-inner ui-widget-content ui-cluetip-content"></div>',
+ '</div>',
+ '<div class="cluetip-extra"></div>',
+ '</div>'].join(''),
+
+ /* clueTip setup
+ * the setup options are applied each time .cluetip() is called,
+ * BUT only if <div id="cluetip"> is not already in the document
+ */
+ setup: {
+ // method to be used for inserting the clueTip into the DOM.
+ // Permitted values are 'appendTo', 'prependTo', 'insertBefore', and 'insertAfter'
+ insertionType: 'appendTo',
+ // element in the DOM the plugin will reference when inserting the clueTip.
+ insertionElement: 'body'
+ },
+
+ /*
+ * clueTip options
+ *
+ * each one can be explicitly overridden by changing its value.
+ * for example: $.cluetip.defaults.width = 200;
+ * or: $.fn.cluetip.defaults.width = 200; // for compatibility with previous clueTip versions
+ * would change the default width for all clueTips to 200.
+ *
+ * each one can also be overridden by passing an options map to the cluetip method.
+ * for example: $('a.example').cluetip({width: 200});
+ * would change the default width to 200 for clueTips invoked by a link with class of "example"
+ *
+ */
+ defaults: {
+ multiple: false, // Allow a new tooltip to be created for each .cluetip() call
+ width: 275, // The width of the clueTip
+ height: 'auto', // The height of the clueTip
+ cluezIndex: 97, // Sets the z-index style property of the clueTip
+ positionBy: 'auto', // Sets the type of positioning: 'auto', 'mouse','bottomTop', 'topBottom', fixed'
+ topOffset: 15, // Number of px to offset clueTip from top of invoking element
+ leftOffset: 15, // Number of px to offset clueTip from left of invoking element
+ snapToEdge: false, // For bottomTop and topBottom, snap to the top or bottom of the element.
+ local: false, // Whether to use content from the same page for the clueTip's body
+ localPrefix: null, // string to be prepended to the tip attribute if local is true
+ localIdSuffix: null, // string to be appended to the cluetip content element's id if local is true
+ hideLocal: true, // If local option is set to true, this determines whether local content
+ // to be shown in clueTip should be hidden at its original location
+ attribute: 'rel', // the attribute to be used for fetching the clueTip's body content
+ titleAttribute: 'title', // the attribute to be used for fetching the clueTip's title
+ splitTitle: '', // A character used to split the title attribute into the clueTip title and divs
+ // within the clueTip body. more info below [6]
+ escapeTitle: false, // whether to html escape the title attribute
+ showTitle: true, // show title bar of the clueTip, even if title attribute not set
+ cluetipClass: 'default',// class added to outermost clueTip div in the form of 'cluetip-' + clueTipClass.
+ hoverClass: '', // class applied to the invoking element onmouseover and removed onmouseout
+ waitImage: true, // whether to show a "loading" img, which is set in jquery.cluetip.css
+ cursor: 'help',
+ arrows: false, // if true, displays arrow on appropriate side of clueTip
+ dropShadow: true, // set to false if you don't want the drop-shadow effect on the clueTip
+ dropShadowSteps: 6, // adjusts the size of the drop shadow
+ sticky: false, // keep visible until manually closed
+ mouseOutClose: false, // close when clueTip is moused out: false, 'cluetip', 'link', 'both'
+ delayedClose: 50, // close clueTip on a timed delay
+ activation: 'hover', // set to 'click' to force user to click to show clueTip
+ // set to 'focus' to show on focus of a form element and hide on blur
+ clickThrough: true, // if true, and activation is not 'click', then clicking on link will take user to the link's href,
+ // even if href and tipAttribute are equal
+ tracking: false, // if true, clueTip will track mouse movement (experimental)
+ closePosition: 'top', // location of close text for sticky cluetips; can be 'top', 'bottom', 'title' or 'none'
+ closeText: 'Close', // text (or HTML) to to be clicked to close sticky clueTips
+ truncate: 0, // number of characters to truncate clueTip's contents. if 0, no truncation occurs
+
+ // effect and speed for opening clueTips
+ fx: {
+ open: 'show', // can be 'show' or 'slideDown' or 'fadeIn'
+ openSpeed: ''
+ },
+
+ // settings for when hoverIntent plugin is used
+ hoverIntent: {
+ sensitivity: 3,
+ interval: 50,
+ timeout: 0
+ },
+
+ // short-circuit function to run just before clueTip is shown.
+ onActivate: function(e) {return true;},
+ // function to run just after clueTip is shown.
+ onShow: function(ct, ci){},
+ // function to run just after clueTip is hidden.
+ onHide: function(ct, ci){},
+ // whether to cache results of ajax request to avoid unnecessary hits to server
+ ajaxCache: true,
+
+ // process data retrieved via xhr before it's displayed
+ ajaxProcess: function(data) {
+ data = data.replace(/<(script|style|title)[^<]+<\/(script|style|title)>/gm, '').replace(/<(link|meta)[^>]+>/g,'');
+ return data;
+ },
+
+ // can pass in standard $.ajax() parameters. Callback functions, such as beforeSend,
+ // will be queued first within the default callbacks.
+ // The only exception is error, which overrides the default
+ ajaxSettings: {
+ // error: function(ct, ci) { /* override default error callback */ },
+ // beforeSend: function(ct, ci) { /* called first within default beforeSend callback */ },
+ dataType: 'html'
+ },
+ debug: false
+
+ }
+ };
+ var $cluetipWait,
+ standardClasses = 'cluetip ui-widget ui-widget-content ui-cluetip',
+ caches = {},
+ counter = 0,
+ imgCount = 0;
+
+ // use $.fn.prop() if available (jQuery 1.6+); otherwise, $.fn.attr()
+ $.fn.attrProp = $.fn.prop || $.fn.attr;
+
+ // .cluetip() method
+ $.fn.cluetip = function(js, options) {
+ var $cluetip, $cluetipInner, $cluetipOuter, $cluetipTitle, $cluetipArrows, $dropShadow;
+ if (typeof js == 'object') {
+ options = js;
+ js = null;
+ }
+ if (js == 'destroy') {
+ this.each(function(index) {
+ var $l = $(this),
+ data = $l.data('cluetip');
+ if ( data ) {
+ $(data.selector).remove();
+ $.removeData(this, 'title');
+ $.removeData(this, 'cluetip');
+ }
+ if (data.title) {
+ $l.attrProp('title', data.title);
+ }
+ $l.unbind('.cluetip').unbind('cluetipMoc');
+ });
+ if ( !$('[id^="cluetip"]').length ) {
+ $(document).unbind('.cluetip');
+ }
+ return this;
+ }
+
+ // merge per-call options with defaults
+ options = $.extend(true, {}, $.cluetip.defaults, options || {});
+
+ /** =create cluetip divs **/
+ counter++;
+ var cluezIndex,
+ cluetipId = $.cluetip.backCompat || !options.multiple ? 'cluetip' : 'cluetip-' + counter,
+ cluetipSelector = '#' + cluetipId,
+ prefix = $.cluetip.backCompat ? '#' : '.',
+ insertionType = $.cluetip.setup.insertionType,
+ insertionElement = $.cluetip.setup.insertionElement || 'body';
+
+ insertionType = (/appendTo|prependTo|insertBefore|insertAfter/).test(insertionType) ? insertionType : 'appendTo';
+ $cluetip = $(cluetipSelector);
+ if (!$cluetip.length) {
+
+ $cluetip = $($.cluetip.template)
+ [insertionType](insertionElement)
+ .attr('id', cluetipId)
+ .css({position: 'absolute', display: 'none'});
+
+ cluezIndex = +options.cluezIndex;
+ $cluetipOuter = $cluetip.find(prefix + 'cluetip-outer').css({position: 'relative', zIndex: cluezIndex});
+ $cluetipInner = $cluetip.find(prefix + 'cluetip-inner');
+ $cluetipTitle = $cluetip.find(prefix + 'cluetip-title');
+
+ $cluetip.bind('mouseenter mouseleave', function(event) {
+ $(this).data('entered', event.type === 'mouseenter');
+ });
+ }
+
+ $cluetipWait = $('#cluetip-waitimage');
+ if (!$cluetipWait.length && options.waitImage) {
+ $cluetipWait = $('<div></div>').attr('id', 'cluetip-waitimage').css({position: 'absolute'});
+ $cluetipWait.insertBefore($cluetip).hide();
+ }
+
+
+ var cluetipPadding = (parseInt($cluetip.css('paddingLeft'), 10) || 0) + (parseInt($cluetip.css('paddingRight'), 10) || 0);
+
+
+ this.each(function(index) {
+ var link = this,
+ $link = $(this),
+ // support metadata plugin (v1.0 and 2.0)
+ opts = $.extend(true, {}, options, $.metadata ? $link.metadata() : $.meta ? $link.data() : $link.data('cluetip') || {}),
+ // start out with no contents (for ajax activation)
+ cluetipContents = false,
+ isActive = false,
+ closeOnDelay = null,
+ tipAttribute = opts[opts.attribute] ||
+ ( opts.attribute == 'href' ? $link.attr(opts.attribute) : $link.attrProp(opts.attribute) || $link.attr(opts.attribute) ),
+ ctClass = opts.cluetipClass;
+
+ cluezIndex = +opts.cluezIndex;
+ $link.data('cluetip', {title: link.title, zIndex: cluezIndex, selector: cluetipSelector, cursor: link.style.cursor || ''});
+
+ if (opts.arrows && !$cluetip.find('.cluetip-arrows').length) {
+ $cluetip.append('<div class="cluetip-arrows ui-state-default"></div>');
+ }
+
+ if (!tipAttribute && !opts.splitTitle && !js) {
+ return true;
+ }
+ // if hideLocal is set to true, on DOM ready hide the local content that will be displayed in the clueTip
+ if (opts.local && opts.localPrefix) {tipAttribute = opts.localPrefix + tipAttribute;}
+ if (opts.local && opts.hideLocal && tipAttribute) { $(tipAttribute + ':first').hide(); }
+
+ var tOffset = parseInt(opts.topOffset, 10), lOffset = parseInt(opts.leftOffset, 10);
+ // vertical measurement variables
+ var tipHeight, wHeight,
+ defHeight = isNaN(parseInt(opts.height, 10)) ? 'auto' : (/\D/g).test(opts.height) ? opts.height : opts.height + 'px';
+ var sTop, linkTop, linkBottom, posY, tipY, mouseY, baseline;
+ // horizontal measurement variables
+ var tipInnerWidth = parseInt(opts.width, 10) || 275,
+ tipWidth = tipInnerWidth + cluetipPadding + opts.dropShadowSteps,
+ linkWidth = this.offsetWidth,
+ linkLeft, posX, tipX, mouseX, winWidth;
+
+ // parse the title
+ var tipParts;
+ var tipTitle = (opts.attribute != 'title') ? $link.attr(opts.titleAttribute) || '' : '';
+ if (opts.splitTitle) {
+ tipParts = tipTitle.split(opts.splitTitle);
+ tipTitle = opts.showTitle || tipParts[0] === '' ? tipParts.shift() : '';
+ }
+ if (opts.escapeTitle) {
+ tipTitle = tipTitle.replace(/&/g,'&amp;').replace(/>/g,'&gt;').replace(/</g,'&lt;');
+ }
+
+ var localContent;
+ function returnFalse() { return false; }
+
+ // Keep track of mouse entered state on link
+ $link.bind('mouseenter mouseleave', function(event) {
+ var data = $link.data('cluetip');
+ data.entered = event.type === 'entered';
+ $link.data('cluetip', data);
+ });
+
+/***************************************
+* ACTIVATION
+****************************************/
+
+//activate clueTip
+ var activate = function(event) {
+ var pY, ajaxMergedSettings, cacheKey,
+ continueOn = opts.onActivate.call(link, event);
+
+ if (continueOn === false) {
+ return false;
+ }
+
+ isActive = true;
+
+ // activate function may get called after an initialization of a
+ // different target so need to re-get the Correct Cluetip object here
+ $cluetip = $(cluetipSelector).css({position: 'absolute'});
+ $cluetipOuter = $cluetip.find(prefix + 'cluetip-outer');
+ $cluetipInner = $cluetip.find(prefix + 'cluetip-inner');
+ $cluetipTitle = $cluetip.find(prefix + 'cluetip-title');
+ $cluetipArrows = $cluetip.find(prefix + 'cluetip-arrows');
+ $cluetip.removeClass().css({width: tipInnerWidth});
+ if (tipAttribute == $link.attr('href')) {
+ $link.css('cursor', opts.cursor);
+ }
+ if (opts.hoverClass) {
+ $link.addClass(opts.hoverClass);
+ }
+ linkTop = posY = $link.offset().top;
+ linkBottom = linkTop + $link.innerHeight();
+ linkLeft = $link.offset().left;
+ if ( $(insertionElement).css('position') === 'relative' ) {
+ linkLeft -= $(insertionElement)[0].getBoundingClientRect().left;
+ }
+
+ // FIX: (bug 4412)
+ linkWidth = $link.innerWidth();
+ if ( event.type == focus ) {
+ // in focus event, no mouse position is available; this is needed with bottomTop:
+ mouseX = linkLeft + ( linkWidth / 2 ) + lOffset;
+ $cluetip.css({left: posX});
+ mouseY = posY + tOffset;
+ } else {
+ mouseX = event.pageX;
+ mouseY = event.pageY;
+ }
+ //END OF FIX
+
+ if (link.tagName.toLowerCase() != 'area') {
+ sTop = $(document).scrollTop();
+ winWidth = $(window).width();
+ }
+// position clueTip horizontally
+ if (opts.positionBy == 'fixed') {
+ posX = linkWidth + linkLeft + lOffset;
+ $cluetip.css({left: posX});
+ } else {
+ posX = (linkWidth > linkLeft && linkLeft > tipWidth) ||
+ linkLeft + linkWidth + tipWidth + lOffset > winWidth ?
+ linkLeft - tipWidth - lOffset :
+ linkWidth + linkLeft + lOffset;
+ if (link.tagName.toLowerCase() == 'area' || opts.positionBy == 'mouse' || linkWidth + tipWidth > winWidth) { // position by mouse
+ if (mouseX + 20 + tipWidth > winWidth) {
+ $cluetip.addClass('cluetip-' + ctClass);
+ posX = (mouseX - tipWidth - lOffset) >= 0 ? mouseX - tipWidth - lOffset - parseInt($cluetip.css('marginLeft'),10) + parseInt($cluetipInner.css('marginRight'),10) : mouseX - (tipWidth/2);
+ } else {
+ posX = mouseX + lOffset;
+ }
+ }
+ pY = posX < 0 ? event.pageY + tOffset : event.pageY;
+ if (posX < 0 || opts.positionBy == 'bottomTop' || opts.positionBy == 'topBottom') {
+ posX = (mouseX + (tipWidth/2) > winWidth) ? winWidth/2 - tipWidth/2 : Math.max(mouseX - (tipWidth/2),0);
+ }
+ }
+
+ $cluetipArrows.css({zIndex: $link.data('cluetip').zIndex+1});
+ $cluetip.css({
+ left: posX,
+ zIndex: $link.data('cluetip').zIndex
+ });
+ wHeight = $(window).height();
+
+/***************************************
+* load a string from cluetip method's first argument
+***************************************/
+ if (js) {
+ if (typeof js == 'function') {
+ js = js.call(link);
+ }
+ $cluetipInner.html(js);
+ cluetipShow(pY);
+ }
+/***************************************
+* load the title attribute only (or user-selected attribute).
+* clueTip title is the string before the first delimiter
+* subsequent delimiters place clueTip body text on separate lines
+***************************************/
+
+ else if (tipParts) {
+ var tpl = tipParts.length;
+ $cluetipInner.html(tpl ? tipParts[0] : '');
+ if (tpl > 1) {
+ for (var i=1; i < tpl; i++){
+ $cluetipInner.append('<div class="split-body">' + tipParts[i] + '</div>');
+ }
+ }
+ cluetipShow(pY);
+ }
+/***************************************
+* load external file via ajax
+***************************************/
+
+ else if ( !opts.local && tipAttribute.indexOf('#') !== 0 ) {
+ if (/\.(jpe?g|tiff?|gif|png)(?:\?.*)?$/i.test(tipAttribute)) {
+ $cluetipInner.html('<img src="' + tipAttribute + '" alt="' + tipTitle + '" />');
+ cluetipShow(pY);
+ } else {
+ var optionBeforeSend = opts.ajaxSettings.beforeSend,
+ optionError = opts.ajaxSettings.error,
+ optionSuccess = opts.ajaxSettings.success,
+ optionComplete = opts.ajaxSettings.complete;
+
+ cacheKey = getCacheKey(tipAttribute, opts.ajaxSettings.data);
+
+ var ajaxSettings = {
+ cache: opts.ajaxCache, // force requested page not to be cached by browser
+ url: tipAttribute,
+ beforeSend: function(xhr, settings) {
+ if (optionBeforeSend) {optionBeforeSend.call(link, xhr, $cluetip, $cluetipInner, settings);}
+ $cluetipOuter.children().empty();
+ if (opts.waitImage) {
+ $cluetipWait
+ .css({top: mouseY+20, left: mouseX+20, zIndex: $link.data('cluetip').zIndex-1})
+ .show();
+ }
+ },
+ error: function(xhr, textStatus) {
+ if ( options.ajaxCache && !caches[cacheKey] ) {
+ caches[cacheKey] = {status: 'error', textStatus: textStatus, xhr: xhr};
+ }
+
+ if (isActive) {
+ if (optionError) {
+ optionError.call(link, xhr, textStatus, $cluetip, $cluetipInner);
+ } else {
+ $cluetipInner.html('<i>sorry, the contents could not be loaded</i>');
+ }
+ }
+ },
+ success: function(data, textStatus, xhr) {
+ if ( options.ajaxCache && !caches[cacheKey] ) {
+ caches[cacheKey] = {status: 'success', data: data, textStatus: textStatus, xhr: xhr};
+ }
+
+ cluetipContents = opts.ajaxProcess.call(link, data);
+
+ // allow for changing the title based on data returned by xhr
+ if ( typeof cluetipContents == 'object' && cluetipContents !== null ) {
+ tipTitle = cluetipContents.title;
+ cluetipContents = cluetipContents.content;
+ }
+
+ if (isActive) {
+ if (optionSuccess) {
+ optionSuccess.call(link, data, textStatus, $cluetip, $cluetipInner);
+ }
+ $cluetipInner.html(cluetipContents);
+
+ }
+ },
+ complete: function(xhr, textStatus) {
+ if (optionComplete) {
+ optionComplete.call(link, xhr, textStatus, $cluetip, $cluetipInner);
+ }
+ var imgs = $cluetipInner[0].getElementsByTagName('img');
+ imgCount = imgs.length;
+ for (var i=0, l = imgs.length; i < l; i++) {
+ if (imgs[i].complete) {
+ imgCount--;
+ }
+ }
+ if (imgCount) {
+ $(imgs).bind('load.ct error.ct', function() {
+ imgCount--;
+ if (imgCount === 0) {
+ $cluetipWait.hide();
+ $(imgs).unbind('.ct');
+ if (isActive) { cluetipShow(pY); }
+ }
+ });
+ } else {
+ $cluetipWait.hide();
+ if (isActive) { cluetipShow(pY); }
+ }
+ }
+ };
+
+ ajaxMergedSettings = $.extend(true, {}, opts.ajaxSettings, ajaxSettings);
+
+ if ( caches[cacheKey] ) {
+ cachedAjax( caches[cacheKey], ajaxMergedSettings );
+ } else {
+ $.ajax(ajaxMergedSettings);
+ }
+ }
+ }
+/***************************************
+* load an element from the same page
+***************************************/
+ else if (opts.local) {
+ var $localContent = $(tipAttribute + (/^#\S+$/.test(tipAttribute) ? '' : ':eq(' + index + ')')).clone(true).show();
+ if (opts.localIdSuffix) {
+ $localContent.attr('id', $localContent[0].id + opts.localIdSuffix);
+ }
+ $cluetipInner.html($localContent);
+ cluetipShow(pY);
+ }
+ };
+
+// get dimensions and options for cluetip and prepare it to be shown
+ var cluetipShow = function(bpY) {
+ var $closeLink, dynamicClasses, heightDiff,
+ titleHTML = tipTitle || opts.showTitle && '&nbsp;',
+ bgY = '', direction = '', insufficientX = false;
+ var stickyClose = {
+ bottom: function($cLink) {
+ $cLink.appendTo($cluetipInner);
+ },
+ top: function($cLink) {
+ $cLink.prependTo($cluetipInner);
+ },
+ title: function($cLink) {
+ $cLink.prependTo($cluetipTitle);
+ }
+ };
+
+ $cluetip.addClass('cluetip-' + ctClass);
+ if (opts.truncate) {
+ var $truncloaded = $cluetipInner.text().slice(0,opts.truncate) + '...';
+ $cluetipInner.html($truncloaded);
+ }
+
+ if (titleHTML) {
+ $cluetipTitle.show().html(titleHTML);
+ } else {
+ $cluetipTitle.hide();
+ }
+
+ if (opts.sticky) {
+ if (stickyClose[opts.closePosition]) {
+ $closeLink = $('<div class="cluetip-close"><a href="#">' + opts.closeText + '</a></div>');
+ stickyClose[opts.closePosition]( $closeLink );
+ $closeLink.bind('click.cluetip', function() {
+ cluetipClose();
+ return false;
+ });
+ }
+ if (opts.mouseOutClose) {
+ $link.unbind('mouseleave.cluetipMoc');
+ $cluetip.unbind('mouseleave.cluetipMoc');
+ if (opts.mouseOutClose == 'both' || opts.mouseOutClose == 'cluetip' || opts.mouseOutClose === true) { // true implies 'cluetip' for backwards compatability
+ $cluetip.bind('mouseleave.cluetipMoc', mouseOutClose);
+ }
+ if (opts.mouseOutClose == 'both' || opts.mouseOutClose == 'link') {
+ $link.bind('mouseleave.cluetipMoc', mouseOutClose);
+ }
+ }
+ }
+
+// now that content is loaded, finish the positioning
+ $cluetipOuter.css({zIndex: $link.data('cluetip').zIndex, overflow: defHeight == 'auto' ? 'visible' : 'auto', height: defHeight});
+ tipHeight = defHeight == 'auto' ? Math.max($cluetip.outerHeight(),$cluetip.height()) : parseInt(defHeight,10);
+ tipY = posY;
+ baseline = sTop + wHeight;
+ insufficientX = (posX < mouseX && (Math.max(posX, 0) + tipWidth > mouseX));
+ if (opts.positionBy == 'fixed') {
+ tipY = posY - opts.dropShadowSteps + tOffset;
+ } else if (opts.positionBy == 'topBottom' || opts.positionBy == 'bottomTop' || insufficientX) {
+ if (opts.positionBy == 'topBottom') {
+ if (posY + tipHeight + tOffset < baseline && mouseY - sTop < tipHeight + tOffset) {
+ direction = 'bottom';
+ } else {
+ direction = 'top';
+ }
+ } else if (opts.positionBy == 'bottomTop' || insufficientX) {
+ if (posY + tipHeight + tOffset > baseline && mouseY - sTop > tipHeight + tOffset) {
+ direction = 'top';
+ } else {
+ direction = 'bottom';
+ }
+ }
+ // We should now have a direction. Compute tipY
+ if (opts.snapToEdge) {
+ if (direction == 'top') {
+ tipY = linkTop - tipHeight - tOffset;
+ } else if (direction == 'bottom') {
+ tipY = linkBottom + tOffset;
+ }
+ } else {
+ if (direction == 'top') {
+ tipY = mouseY - tipHeight - tOffset;
+ } else if (direction == 'bottom') {
+ tipY = mouseY + tOffset;
+ }
+ }
+ } else if ( posY + tipHeight + tOffset > baseline ) {
+ tipY = (tipHeight >= wHeight) ? sTop : baseline - tipHeight - tOffset;
+ } else if ($link.css('display') == 'block' || link.tagName.toLowerCase() == 'area' || opts.positionBy == "mouse") {
+ tipY = bpY - tOffset;
+ } else {
+ tipY = posY - opts.dropShadowSteps;
+ }
+ if (direction === '') {
+ direction = posX < linkLeft ? 'left' : 'right';
+ }
+ // add classes
+ dynamicClasses = ' clue-' + direction + '-' + ctClass + ' cluetip-' + ctClass;
+ if (ctClass == 'rounded') {
+ dynamicClasses += ' ui-corner-all';
+ }
+ $cluetip.css({top: tipY + 'px'}).attrProp({'className': standardClasses + dynamicClasses});
+ // set up arrow positioning to align with element
+ if (opts.arrows) {
+ if ( /(left|right)/.test(direction) ) {
+ heightDiff = $cluetip.height() - $cluetipArrows.height();
+ bgY = posX >= 0 && bpY > 0 ? (posY - tipY - opts.dropShadowSteps) : 0;
+ bgY = heightDiff > bgY ? bgY : heightDiff;
+ bgY += 'px';
+ }
+ $cluetipArrows.css({top: bgY}).show();
+ } else {
+ $cluetipArrows.hide();
+ }
+
+// (first hide, then) ***SHOW THE CLUETIP***
+ // handle dropshadow divs first
+ $dropShadow = createDropShadows($cluetip, opts);
+ if ($dropShadow && $dropShadow.length) {
+ $dropShadow.hide().css({height: tipHeight, width: tipInnerWidth, zIndex: $link.data('cluetip').zIndex-1}).show();
+ }
+
+ if (!closeOnDelay) {
+ $cluetip.hide();
+ }
+ clearTimeout(closeOnDelay);
+ closeOnDelay = null;
+
+ // show the cluetip
+ $cluetip[opts.fx.open](opts.fx.openSpeed || 0);
+
+ if ($.fn.bgiframe) { $cluetip.bgiframe(); }
+
+ // trigger the optional onShow function
+ opts.onShow.call(link, $cluetip, $cluetipInner);
+ };
+
+/***************************************
+ =INACTIVATION
+-------------------------------------- */
+ var inactivate = function(event) {
+ isActive = false;
+ $cluetipWait.hide();
+ if (!opts.sticky || (/click|toggle/).test(opts.activation) ) {
+ // delayed close (not fully tested)
+ if (opts.delayedClose > 0) {
+ clearTimeout(closeOnDelay);
+ closeOnDelay = null;
+ closeOnDelay = setTimeout(cluetipClose, opts.delayedClose);
+ } else {
+ cluetipClose();
+ clearTimeout(closeOnDelay);
+ }
+ }
+
+ if (opts.hoverClass) {
+ $link.removeClass(opts.hoverClass);
+ }
+ };
+
+ // close cluetip and reset some things
+ var cluetipClose = function(el) {
+ var $closer = el && el.data('cluetip') ? el : $link,
+ ct = $closer.data('cluetip') && $closer.data('cluetip').selector,
+ ctSelector = ct || 'div.cluetip',
+ $cluetip = $(ctSelector),
+ $cluetipInner = $cluetip.find(prefix + 'cluetip-inner'),
+ $cluetipArrows = $cluetip.find(prefix + 'cluetip-arrows');
+
+ $cluetip.hide().removeClass();
+ opts.onHide.call($closer[0], $cluetip, $cluetipInner);
+
+ if (ct) {
+ $closer.removeClass('cluetip-clicked');
+ $link.css('cursor', $link.data('cluetip').cursor);
+ }
+ if (ct && tipTitle) {
+ $closer.attrProp(opts.titleAttribute, tipTitle);
+ }
+
+ if (opts.arrows) {
+ $cluetipArrows.css({top: ''});
+ }
+ if ($dropShadow) {
+ $dropShadow.hide();
+ }
+ };
+
+ // Check to see if we should be closing by checking where the user is hovering.
+ // We do a short 50ms delay for two reasons: to prevent flicker, and to allow the user time to hover on other element
+ var mouseOutClose = function() {
+ var el = this;
+ clearTimeout(closeOnDelay);
+ closeOnDelay = setTimeout(function() {
+ var linkOver = $link.data('cluetip').entered,
+ cluetipOver = $cluetip.data('entered'),
+ entered = false;
+
+ if ( opts.mouseOutClose == 'both' && (linkOver || cluetipOver) ) {
+ entered = true;
+ }
+ // true implies 'cluetip' for backwards compatibility
+ else if ( (opts.mouseOutClose === true || opts.mouseOutClose == 'cluetip') && cluetipOver) {
+ entered = true;
+ }
+ else if (opts.mouseOutClose == 'link' && linkOver) {
+ entered = true;
+ }
+
+ if ( !entered ) {
+ // All checks pass, close the cluetip
+ cluetipClose.call(el);
+ }
+
+ }, opts.delayedClose);
+ };
+
+ $(document).unbind('hideCluetip.cluetip').bind('hideCluetip.cluetip', function(e) {
+ cluetipClose( $(e.target) );
+ });
+/***************************************
+ =BIND EVENTS
+-------------------------------------- */
+ // activate by click
+ if ( (/click|toggle/).test(opts.activation) ) {
+ $link.bind('click.cluetip', function(event) {
+ if ($cluetip.is(':hidden') || !$link.is('.cluetip-clicked')) {
+ activate(event);
+ $('.cluetip-clicked').removeClass('cluetip-clicked');
+ $link.addClass('cluetip-clicked');
+ } else {
+ inactivate(event);
+ }
+ return false;
+ });
+ // activate by focus; inactivate by blur
+ } else if (opts.activation == 'focus') {
+ $link.bind('focus.cluetip', function(event) {
+ $link.attrProp('title','');
+ activate(event);
+ });
+ $link.bind('blur.cluetip', function(event) {
+ $link.attrProp('title', $link.data('cluetip').title);
+ inactivate(event);
+ });
+ // activate by hover
+ } else {
+
+ // clicking is returned false if clickThrough option is set to false
+ $link[opts.clickThrough ? 'unbind' : 'bind']('click.cluetip', returnFalse);
+
+ //set up mouse tracking
+ var mouseTracks = function(evt) {
+ if (opts.tracking) {
+ var trackX = posX - evt.pageX;
+ var trackY = tipY ? tipY - evt.pageY : posY - evt.pageY;
+ $link.bind('mousemove.cluetip', function(evt) {
+ $cluetip.css({left: evt.pageX + trackX, top: evt.pageY + trackY });
+ });
+ }
+ };
+
+ if ($.fn.hoverIntent && opts.hoverIntent) {
+ $link.hoverIntent({
+ sensitivity: opts.hoverIntent.sensitivity,
+ interval: opts.hoverIntent.interval,
+ over: function(event) {
+ activate(event);
+ mouseTracks(event);
+ },
+ timeout: opts.hoverIntent.timeout,
+ out: function(event) {
+ inactivate(event);
+ $link.unbind('mousemove.cluetip');
+ }
+ });
+ } else {
+ $link.bind('mouseenter.cluetip', function(event) {
+ activate(event);
+ mouseTracks(event);
+ })
+ .bind('mouseleave.cluetip', function(event) {
+ inactivate(event);
+ $link.unbind('mousemove.cluetip');
+ });
+ }
+
+ $link.bind('mouseover.cluetip', function(event) {
+ $link.attrProp('title','');
+ }).bind('mouseleave.cluetip', function(event) {
+ $link.attrProp('title', $link.data('cluetip').title);
+ });
+ }
+
+ // trigger a cached Ajax response
+ function cachedAjax(info, settings) {
+ var status = info.status;
+ settings.beforeSend(info.xhr, settings);
+ if ( status == 'error' ) {
+ settings[status](info.xhr, info.textStatus);
+ } else if (status == 'success') {
+ settings[status](info.data, info.textStatus, info.xhr);
+ }
+ settings.complete(info.xhr, settings.textStatus);
+ }
+
+ }); // end this.each
+
+ /** =private functions
+ ************************************************************/
+ //empty function
+ function doNothing() {}
+
+ // create a string to be used as an identifier for ajax caches
+ function getCacheKey(url, data) {
+ var cacheKey = url || '';
+ data = data || '';
+
+ if (typeof data == 'object') {
+ $.each(data, function(key, val) {
+ cacheKey += '-' + key + '-' + val;
+ });
+ } else if (typeof data == 'string') {
+ cacheKey += data;
+ }
+
+ return cacheKey;
+ }
+
+ /** =create dropshadow divs **/
+
+ function createDropShadows($cluetip, options, newDropShadow) {
+ var dsStyle = '',
+ dropShadowSteps = (options.dropShadow && options.dropShadowSteps) ? +options.dropShadowSteps : 0;
+
+ if ($.support.boxShadow) {
+ if ( dropShadowSteps ) {
+ dsStyle = '1px 1px ' + dropShadowSteps + 'px rgba(0,0,0,0.5)';
+ }
+ var dsOffsets = dropShadowSteps === 0 ? '0 0 ' : '1px 1px ';
+ $cluetip.css($.support.boxShadow, dsStyle);
+ return false;
+ }
+ var oldDropShadow = $cluetip.find('.cluetip-drop-shadow');
+ if (dropShadowSteps == oldDropShadow.length) {
+ return oldDropShadow;
+ }
+ oldDropShadow.remove();
+ var dropShadows = [];
+ for (var i=0; i < dropShadowSteps;) {
+ dropShadows[i++] = '<div style="top:' + i + 'px;left:' + i + 'px;"></div>';
+ }
+
+ newDropShadow = $(dropShadows.join(''))
+ .css({
+ position: 'absolute',
+ backgroundColor: '#000',
+ zIndex: cluezIndex -1,
+ opacity: 0.1
+ })
+ .addClass('cluetip-drop-shadow')
+ .prependTo($cluetip);
+ return newDropShadow;
+
+ }
+
+ return this;
+ };
+
+ (function() {
+ $.support = $.support || {};
+ // check support for CSS3 properties (currently only boxShadow)
+ var div = document.createElement('div'),
+ divStyle = div.style,
+ styleProps = ['boxShadow'],
+ prefixes = ['moz', 'Moz', 'webkit', 'o'];
+
+ for (var i=0, sl = styleProps.length; i < sl; i++) {
+ var prop = styleProps[i],
+ uProp = prop.charAt(0).toUpperCase() + prop.slice(1);
+
+ if ( typeof divStyle[ prop ] !== 'undefined' ) {
+ $.support[ prop ] = prop;
+ } else {
+ for (var j=0, pl = prefixes.length; j < pl; j++) {
+
+ if (typeof divStyle[ prefixes[j] + uProp ] !== 'undefined') {
+ $.support[ prop ] = prefixes[j] + uProp;
+ break;
+ }
+ }
+ }
+ }
+ div = null;
+ })();
+
+ $.fn.cluetip.defaults = $.cluetip.defaults;
+
+})(jQuery);
diff --git a/views/js/jquery-cluetip-master/jquery.cluetip.min.js b/views/js/jquery-cluetip-master/jquery.cluetip.min.js
new file mode 100644
index 0000000..70ff84f
--- /dev/null
+++ b/views/js/jquery-cluetip-master/jquery.cluetip.min.js
@@ -0,0 +1,7 @@
+/*!
+ * clueTip - v1.2.9 - 2013-06-02
+ * http://plugins.learningjquery.com/cluetip/
+ * Copyright (c) 2013 Karl Swedberg
+ * Licensed MIT (http://www.opensource.org/licenses/mit-license.php)
+ */
+(function(t){t.cluetip={version:"1.2.9",template:["<div>",'<div class="cluetip-outer">','<h3 class="cluetip-title ui-widget-header ui-cluetip-header"></h3>','<div class="cluetip-inner ui-widget-content ui-cluetip-content"></div>',"</div>",'<div class="cluetip-extra"></div>',"</div>"].join(""),setup:{insertionType:"appendTo",insertionElement:"body"},defaults:{multiple:!1,width:275,height:"auto",cluezIndex:97,positionBy:"auto",topOffset:15,leftOffset:15,snapToEdge:!1,local:!1,localPrefix:null,localIdSuffix:null,hideLocal:!0,attribute:"rel",titleAttribute:"title",splitTitle:"",escapeTitle:!1,showTitle:!0,cluetipClass:"default",hoverClass:"",waitImage:!0,cursor:"help",arrows:!1,dropShadow:!0,dropShadowSteps:6,sticky:!1,mouseOutClose:!1,delayedClose:50,activation:"hover",clickThrough:!0,tracking:!1,closePosition:"top",closeText:"Close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(){return!0},onShow:function(){},onHide:function(){},ajaxCache:!0,ajaxProcess:function(t){return t=t.replace(/<(script|style|title)[^<]+<\/(script|style|title)>/gm,"").replace(/<(link|meta)[^>]+>/g,"")},ajaxSettings:{dataType:"html"},debug:!1}};var e,i="cluetip ui-widget ui-widget-content ui-cluetip",o={},a=0,l=0;t.fn.attrProp=t.fn.prop||t.fn.attr,t.fn.cluetip=function(s,n){function c(e,i){var o=e||"";return i=i||"","object"==typeof i?t.each(i,function(t,e){o+="-"+t+"-"+e}):"string"==typeof i&&(o+=i),o}function u(e,i,o){var a="",l=i.dropShadow&&i.dropShadowSteps?+i.dropShadowSteps:0;if(t.support.boxShadow)return l&&(a="1px 1px "+l+"px rgba(0,0,0,0.5)"),e.css(t.support.boxShadow,a),!1;var s=e.find(".cluetip-drop-shadow");if(l==s.length)return s;s.remove();for(var n=[],c=0;l>c;)n[c++]='<div style="top:'+c+"px;left:"+c+'px;"></div>';return o=t(n.join("")).css({position:"absolute",backgroundColor:"#000",zIndex:v-1,opacity:.1}).addClass("cluetip-drop-shadow").prependTo(e)}var r,p,d,f,h,m;if("object"==typeof s&&(n=s,s=null),"destroy"==s)return this.each(function(){var e=t(this),i=e.data("cluetip");i&&(t(i.selector).remove(),t.removeData(this,"title"),t.removeData(this,"cluetip")),i.title&&e.attrProp("title",i.title),e.unbind(".cluetip").unbind("cluetipMoc")}),t('[id^="cluetip"]').length||t(document).unbind(".cluetip"),this;n=t.extend(!0,{},t.cluetip.defaults,n||{}),a++;var v,g=t.cluetip.backCompat||!n.multiple?"cluetip":"cluetip-"+a,b="#"+g,x=t.cluetip.backCompat?"#":".",w=t.cluetip.setup.insertionType,y=t.cluetip.setup.insertionElement||"body";w=/appendTo|prependTo|insertBefore|insertAfter/.test(w)?w:"appendTo",r=t(b),r.length||(r=t(t.cluetip.template)[w](y).attr("id",g).css({position:"absolute",display:"none"}),v=+n.cluezIndex,d=r.find(x+"cluetip-outer").css({position:"relative",zIndex:v}),p=r.find(x+"cluetip-inner"),f=r.find(x+"cluetip-title"),r.bind("mouseenter mouseleave",function(e){t(this).data("entered","mouseenter"===e.type)})),e=t("#cluetip-waitimage"),!e.length&&n.waitImage&&(e=t("<div></div>").attr("id","cluetip-waitimage").css({position:"absolute"}),e.insertBefore(r).hide());var C=(parseInt(r.css("paddingLeft"),10)||0)+(parseInt(r.css("paddingRight"),10)||0);return this.each(function(a){function g(){return!1}function w(t,e){var i=t.status;e.beforeSend(t.xhr,e),"error"==i?e[i](t.xhr,t.textStatus):"success"==i&&e[i](t.data,t.textStatus,t.xhr),e.complete(t.xhr,e.textStatus)}var S=this,I=t(this),T=t.extend(!0,{},n,t.metadata?I.metadata():t.meta?I.data():I.data("cluetip")||{}),k=!1,j=!1,z=null,B=T[T.attribute]||("href"==T.attribute?I.attr(T.attribute):I.attrProp(T.attribute)||I.attr(T.attribute)),P=T.cluetipClass;if(v=+T.cluezIndex,I.data("cluetip",{title:S.title,zIndex:v,selector:b,cursor:S.style.cursor||""}),T.arrows&&!r.find(".cluetip-arrows").length&&r.append('<div class="cluetip-arrows ui-state-default"></div>'),!B&&!T.splitTitle&&!s)return!0;T.local&&T.localPrefix&&(B=T.localPrefix+B),T.local&&T.hideLocal&&B&&t(B+":first").hide();var O,M,A,L,N,E,Y,H,D,R,X,W,$,q,Q=parseInt(T.topOffset,10),U=parseInt(T.leftOffset,10),F=isNaN(parseInt(T.height,10))?"auto":/\D/g.test(T.height)?T.height:T.height+"px",G=parseInt(T.width,10)||275,J=G+C+T.dropShadowSteps,K=this.offsetWidth,V="title"!=T.attribute?I.attr(T.titleAttribute)||"":"";T.splitTitle&&(q=V.split(T.splitTitle),V=T.showTitle||""===q[0]?q.shift():""),T.escapeTitle&&(V=V.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;")),I.bind("mouseenter mouseleave",function(t){var e=I.data("cluetip");e.entered="entered"===t.type,I.data("cluetip",e)});var Z=function(i){var u,m,v,g=T.onActivate.call(S,i);if(g===!1)return!1;if(j=!0,r=t(b).css({position:"absolute"}),d=r.find(x+"cluetip-outer"),p=r.find(x+"cluetip-inner"),f=r.find(x+"cluetip-title"),h=r.find(x+"cluetip-arrows"),r.removeClass().css({width:G}),B==I.attr("href")&&I.css("cursor",T.cursor),T.hoverClass&&I.addClass(T.hoverClass),L=E=I.offset().top,N=L+I.innerHeight(),R=I.offset().left,"relative"===t(y).css("position")&&(R-=t(y)[0].getBoundingClientRect().left),K=I.innerWidth(),i.type==focus?(W=R+K/2+U,r.css({left:X}),H=E+Q):(W=i.pageX,H=i.pageY),"area"!=S.tagName.toLowerCase()&&(A=t(document).scrollTop(),$=t(window).width()),"fixed"==T.positionBy?(X=K+R+U,r.css({left:X})):(X=K>R&&R>J||R+K+J+U>$?R-J-U:K+R+U,("area"==S.tagName.toLowerCase()||"mouse"==T.positionBy||K+J>$)&&(W+20+J>$?(r.addClass("cluetip-"+P),X=W-J-U>=0?W-J-U-parseInt(r.css("marginLeft"),10)+parseInt(p.css("marginRight"),10):W-J/2):X=W+U),u=0>X?i.pageY+Q:i.pageY,(0>X||"bottomTop"==T.positionBy||"topBottom"==T.positionBy)&&(X=W+J/2>$?$/2-J/2:Math.max(W-J/2,0))),h.css({zIndex:I.data("cluetip").zIndex+1}),r.css({left:X,zIndex:I.data("cluetip").zIndex}),M=t(window).height(),s)"function"==typeof s&&(s=s.call(S)),p.html(s),_(u);else if(q){var C=q.length;if(p.html(C?q[0]:""),C>1)for(var z=1;C>z;z++)p.append('<div class="split-body">'+q[z]+"</div>");_(u)}else if(T.local||0===B.indexOf("#")){if(T.local){var O=t(B+(/^#\S+$/.test(B)?"":":eq("+a+")")).clone(!0).show();T.localIdSuffix&&O.attr("id",O[0].id+T.localIdSuffix),p.html(O),_(u)}}else if(/\.(jpe?g|tiff?|gif|png)(?:\?.*)?$/i.test(B))p.html('<img src="'+B+'" alt="'+V+'" />'),_(u);else{var Y=T.ajaxSettings.beforeSend,D=T.ajaxSettings.error,F=T.ajaxSettings.success,Z=T.ajaxSettings.complete;v=c(B,T.ajaxSettings.data);var te={cache:T.ajaxCache,url:B,beforeSend:function(t,i){Y&&Y.call(S,t,r,p,i),d.children().empty(),T.waitImage&&e.css({top:H+20,left:W+20,zIndex:I.data("cluetip").zIndex-1}).show()},error:function(t,e){n.ajaxCache&&!o[v]&&(o[v]={status:"error",textStatus:e,xhr:t}),j&&(D?D.call(S,t,e,r,p):p.html("<i>sorry, the contents could not be loaded</i>"))},success:function(t,e,i){n.ajaxCache&&!o[v]&&(o[v]={status:"success",data:t,textStatus:e,xhr:i}),k=T.ajaxProcess.call(S,t),"object"==typeof k&&null!==k&&(V=k.title,k=k.content),j&&(F&&F.call(S,t,e,r,p),p.html(k))},complete:function(i,o){Z&&Z.call(S,i,o,r,p);var a=p[0].getElementsByTagName("img");l=a.length;for(var s=0,n=a.length;n>s;s++)a[s].complete&&l--;l?t(a).bind("load.ct error.ct",function(){l--,0===l&&(e.hide(),t(a).unbind(".ct"),j&&_(u))}):(e.hide(),j&&_(u))}};m=t.extend(!0,{},T.ajaxSettings,te),o[v]?w(o[v],m):t.ajax(m)}},_=function(e){var o,a,l,s=V||T.showTitle&&"&nbsp;",n="",c="",v=!1,g={bottom:function(t){t.appendTo(p)},top:function(t){t.prependTo(p)},title:function(t){t.prependTo(f)}};if(r.addClass("cluetip-"+P),T.truncate){var b=p.text().slice(0,T.truncate)+"...";p.html(b)}s?f.show().html(s):f.hide(),T.sticky&&(g[T.closePosition]&&(o=t('<div class="cluetip-close"><a href="#">'+T.closeText+"</a></div>"),g[T.closePosition](o),o.bind("click.cluetip",function(){return ee(),!1})),T.mouseOutClose&&(I.unbind("mouseleave.cluetipMoc"),r.unbind("mouseleave.cluetipMoc"),("both"==T.mouseOutClose||"cluetip"==T.mouseOutClose||T.mouseOutClose===!0)&&r.bind("mouseleave.cluetipMoc",ie),("both"==T.mouseOutClose||"link"==T.mouseOutClose)&&I.bind("mouseleave.cluetipMoc",ie))),d.css({zIndex:I.data("cluetip").zIndex,overflow:"auto"==F?"visible":"auto",height:F}),O="auto"==F?Math.max(r.outerHeight(),r.height()):parseInt(F,10),Y=E,D=A+M,v=W>X&&Math.max(X,0)+J>W,"fixed"==T.positionBy?Y=E-T.dropShadowSteps+Q:"topBottom"==T.positionBy||"bottomTop"==T.positionBy||v?("topBottom"==T.positionBy?c=D>E+O+Q&&O+Q>H-A?"bottom":"top":("bottomTop"==T.positionBy||v)&&(c=E+O+Q>D&&H-A>O+Q?"top":"bottom"),T.snapToEdge?"top"==c?Y=L-O-Q:"bottom"==c&&(Y=N+Q):"top"==c?Y=H-O-Q:"bottom"==c&&(Y=H+Q)):Y=E+O+Q>D?O>=M?A:D-O-Q:"block"==I.css("display")||"area"==S.tagName.toLowerCase()||"mouse"==T.positionBy?e-Q:E-T.dropShadowSteps,""===c&&(c=R>X?"left":"right"),a=" clue-"+c+"-"+P+" cluetip-"+P,"rounded"==P&&(a+=" ui-corner-all"),r.css({top:Y+"px"}).attrProp({className:i+a}),T.arrows?(/(left|right)/.test(c)&&(l=r.height()-h.height(),n=X>=0&&e>0?E-Y-T.dropShadowSteps:0,n=l>n?n:l,n+="px"),h.css({top:n}).show()):h.hide(),m=u(r,T),m&&m.length&&m.hide().css({height:O,width:G,zIndex:I.data("cluetip").zIndex-1}).show(),z||r.hide(),clearTimeout(z),z=null,r[T.fx.open](T.fx.openSpeed||0),t.fn.bgiframe&&r.bgiframe(),T.onShow.call(S,r,p)},te=function(){j=!1,e.hide(),(!T.sticky||/click|toggle/.test(T.activation))&&(T.delayedClose>0?(clearTimeout(z),z=null,z=setTimeout(ee,T.delayedClose)):(ee(),clearTimeout(z))),T.hoverClass&&I.removeClass(T.hoverClass)},ee=function(e){var i=e&&e.data("cluetip")?e:I,o=i.data("cluetip")&&i.data("cluetip").selector,a=o||"div.cluetip",l=t(a),s=l.find(x+"cluetip-inner"),n=l.find(x+"cluetip-arrows");l.hide().removeClass(),T.onHide.call(i[0],l,s),o&&(i.removeClass("cluetip-clicked"),I.css("cursor",I.data("cluetip").cursor)),o&&V&&i.attrProp(T.titleAttribute,V),T.arrows&&n.css({top:""}),m&&m.hide()},ie=function(){var t=this;clearTimeout(z),z=setTimeout(function(){var e=I.data("cluetip").entered,i=r.data("entered"),o=!1;"both"==T.mouseOutClose&&(e||i)?o=!0:T.mouseOutClose!==!0&&"cluetip"!=T.mouseOutClose||!i?"link"==T.mouseOutClose&&e&&(o=!0):o=!0,o||ee.call(t)},T.delayedClose)};if(t(document).unbind("hideCluetip.cluetip").bind("hideCluetip.cluetip",function(e){ee(t(e.target))}),/click|toggle/.test(T.activation))I.bind("click.cluetip",function(e){return r.is(":hidden")||!I.is(".cluetip-clicked")?(Z(e),t(".cluetip-clicked").removeClass("cluetip-clicked"),I.addClass("cluetip-clicked")):te(e),!1});else if("focus"==T.activation)I.bind("focus.cluetip",function(t){I.attrProp("title",""),Z(t)}),I.bind("blur.cluetip",function(t){I.attrProp("title",I.data("cluetip").title),te(t)});else{I[T.clickThrough?"unbind":"bind"]("click.cluetip",g);var oe=function(t){if(T.tracking){var e=X-t.pageX,i=Y?Y-t.pageY:E-t.pageY;I.bind("mousemove.cluetip",function(t){r.css({left:t.pageX+e,top:t.pageY+i})})}};t.fn.hoverIntent&&T.hoverIntent?I.hoverIntent({sensitivity:T.hoverIntent.sensitivity,interval:T.hoverIntent.interval,over:function(t){Z(t),oe(t)},timeout:T.hoverIntent.timeout,out:function(t){te(t),I.unbind("mousemove.cluetip")}}):I.bind("mouseenter.cluetip",function(t){Z(t),oe(t)}).bind("mouseleave.cluetip",function(t){te(t),I.unbind("mousemove.cluetip")}),I.bind("mouseover.cluetip",function(){I.attrProp("title","")}).bind("mouseleave.cluetip",function(){I.attrProp("title",I.data("cluetip").title)})}}),this},function(){t.support=t.support||{};for(var e=document.createElement("div"),i=e.style,o=["boxShadow"],a=["moz","Moz","webkit","o"],l=0,s=o.length;s>l;l++){var n=o[l],c=n.charAt(0).toUpperCase()+n.slice(1);if(i[n]!==void 0)t.support[n]=n;else for(var u=0,r=a.length;r>u;u++)if(i[a[u]+c]!==void 0){t.support[n]=a[u]+c;break}}e=null}(),t.fn.cluetip.defaults=t.cluetip.defaults})(jQuery); \ No newline at end of file
diff --git a/views/js/jquery-validation-1.11.1/dist/additional-methods.js b/views/js/jquery-validation-1.11.1/dist/additional-methods.js
new file mode 100644
index 0000000..b0534b5
--- /dev/null
+++ b/views/js/jquery-validation-1.11.1/dist/additional-methods.js
@@ -0,0 +1,617 @@
+/*!
+ * jQuery Validation Plugin 1.11.1
+ *
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
+ * http://docs.jquery.com/Plugins/Validation
+ *
+ * Copyright 2013 Jörn Zaefferer
+ * Released under the MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ */
+
+(function() {
+
+ function stripHtml(value) {
+ // remove html tags and space chars
+ return value.replace(/<.[^<>]*?>/g, ' ').replace(/&nbsp;|&#160;/gi, ' ')
+ // remove punctuation
+ .replace(/[.(),;:!?%#$'"_+=\/\-]*/g,'');
+ }
+ jQuery.validator.addMethod("maxWords", function(value, element, params) {
+ return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
+ }, jQuery.validator.format("Please enter {0} words or less."));
+
+ jQuery.validator.addMethod("minWords", function(value, element, params) {
+ return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
+ }, jQuery.validator.format("Please enter at least {0} words."));
+
+ jQuery.validator.addMethod("rangeWords", function(value, element, params) {
+ var valueStripped = stripHtml(value);
+ var regex = /\b\w+\b/g;
+ return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
+ }, jQuery.validator.format("Please enter between {0} and {1} words."));
+
+}());
+
+jQuery.validator.addMethod("letterswithbasicpunc", function(value, element) {
+ return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
+}, "Letters or punctuation only please");
+
+jQuery.validator.addMethod("alphanumeric", function(value, element) {
+ return this.optional(element) || /^\w+$/i.test(value);
+}, "Letters, numbers, and underscores only please");
+
+jQuery.validator.addMethod("lettersonly", function(value, element) {
+ return this.optional(element) || /^[a-z]+$/i.test(value);
+}, "Letters only please");
+
+jQuery.validator.addMethod("nowhitespace", function(value, element) {
+ return this.optional(element) || /^\S+$/i.test(value);
+}, "No white space please");
+
+jQuery.validator.addMethod("ziprange", function(value, element) {
+ return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");
+
+jQuery.validator.addMethod("zipcodeUS", function(value, element) {
+ return this.optional(element) || /\d{5}-\d{4}$|^\d{5}$/.test(value);
+}, "The specified US ZIP Code is invalid");
+
+jQuery.validator.addMethod("integer", function(value, element) {
+ return this.optional(element) || /^-?\d+$/.test(value);
+}, "A positive or negative non-decimal number please");
+
+/**
+ * Return true, if the value is a valid vehicle identification number (VIN).
+ *
+ * Works with all kind of text inputs.
+ *
+ * @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" />
+ * @desc Declares a required input element whose value must be a valid vehicle identification number.
+ *
+ * @name jQuery.validator.methods.vinUS
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+jQuery.validator.addMethod("vinUS", function(v) {
+ if (v.length !== 17) {
+ return false;
+ }
+ var i, n, d, f, cd, cdv;
+ var LL = ["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"];
+ var VL = [1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];
+ var FL = [8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];
+ var rs = 0;
+ for(i = 0; i < 17; i++){
+ f = FL[i];
+ d = v.slice(i,i+1);
+ if (i === 8) {
+ cdv = d;
+ }
+ if (!isNaN(d)) {
+ d *= f;
+ } else {
+ for (n = 0; n < LL.length; n++) {
+ if (d.toUpperCase() === LL[n]) {
+ d = VL[n];
+ d *= f;
+ if (isNaN(cdv) && n === 8) {
+ cdv = LL[n];
+ }
+ break;
+ }
+ }
+ }
+ rs += d;
+ }
+ cd = rs % 11;
+ if (cd === 10) {
+ cd = "X";
+ }
+ if (cd === cdv) {
+ return true;
+ }
+ return false;
+}, "The specified vehicle identification number (VIN) is invalid.");
+
+/**
+ * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
+ *
+ * @example jQuery.validator.methods.date("01/01/1900")
+ * @result true
+ *
+ * @example jQuery.validator.methods.date("01/13/1990")
+ * @result false
+ *
+ * @example jQuery.validator.methods.date("01.01.1900")
+ * @result false
+ *
+ * @example <input name="pippo" class="{dateITA:true}" />
+ * @desc Declares an optional input element whose value must be a valid date.
+ *
+ * @name jQuery.validator.methods.dateITA
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+jQuery.validator.addMethod("dateITA", function(value, element) {
+ var check = false;
+ var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
+ if( re.test(value)) {
+ var adata = value.split('/');
+ var gg = parseInt(adata[0],10);
+ var mm = parseInt(adata[1],10);
+ var aaaa = parseInt(adata[2],10);
+ var xdata = new Date(aaaa,mm-1,gg);
+ if ( ( xdata.getFullYear() === aaaa ) && ( xdata.getMonth() === mm - 1 ) && ( xdata.getDate() === gg ) ){
+ check = true;
+ } else {
+ check = false;
+ }
+ } else {
+ check = false;
+ }
+ return this.optional(element) || check;
+}, "Please enter a correct date");
+
+/**
+ * IBAN is the international bank account number.
+ * It has a country - specific format, that is checked here too
+ */
+jQuery.validator.addMethod("iban", function(value, element) {
+ // some quick simple tests to prevent needless work
+ if (this.optional(element)) {
+ return true;
+ }
+ if (!(/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(value))) {
+ return false;
+ }
+
+ // check the country code and find the country specific format
+ var iban = value.replace(/ /g,'').toUpperCase(); // remove spaces and to upper case
+ var countrycode = iban.substring(0,2);
+ var bbancountrypatterns = {
+ 'AL': "\\d{8}[\\dA-Z]{16}",
+ 'AD': "\\d{8}[\\dA-Z]{12}",
+ 'AT': "\\d{16}",
+ 'AZ': "[\\dA-Z]{4}\\d{20}",
+ 'BE': "\\d{12}",
+ 'BH': "[A-Z]{4}[\\dA-Z]{14}",
+ 'BA': "\\d{16}",
+ 'BR': "\\d{23}[A-Z][\\dA-Z]",
+ 'BG': "[A-Z]{4}\\d{6}[\\dA-Z]{8}",
+ 'CR': "\\d{17}",
+ 'HR': "\\d{17}",
+ 'CY': "\\d{8}[\\dA-Z]{16}",
+ 'CZ': "\\d{20}",
+ 'DK': "\\d{14}",
+ 'DO': "[A-Z]{4}\\d{20}",
+ 'EE': "\\d{16}",
+ 'FO': "\\d{14}",
+ 'FI': "\\d{14}",
+ 'FR': "\\d{10}[\\dA-Z]{11}\\d{2}",
+ 'GE': "[\\dA-Z]{2}\\d{16}",
+ 'DE': "\\d{18}",
+ 'GI': "[A-Z]{4}[\\dA-Z]{15}",
+ 'GR': "\\d{7}[\\dA-Z]{16}",
+ 'GL': "\\d{14}",
+ 'GT': "[\\dA-Z]{4}[\\dA-Z]{20}",
+ 'HU': "\\d{24}",
+ 'IS': "\\d{22}",
+ 'IE': "[\\dA-Z]{4}\\d{14}",
+ 'IL': "\\d{19}",
+ 'IT': "[A-Z]\\d{10}[\\dA-Z]{12}",
+ 'KZ': "\\d{3}[\\dA-Z]{13}",
+ 'KW': "[A-Z]{4}[\\dA-Z]{22}",
+ 'LV': "[A-Z]{4}[\\dA-Z]{13}",
+ 'LB': "\\d{4}[\\dA-Z]{20}",
+ 'LI': "\\d{5}[\\dA-Z]{12}",
+ 'LT': "\\d{16}",
+ 'LU': "\\d{3}[\\dA-Z]{13}",
+ 'MK': "\\d{3}[\\dA-Z]{10}\\d{2}",
+ 'MT': "[A-Z]{4}\\d{5}[\\dA-Z]{18}",
+ 'MR': "\\d{23}",
+ 'MU': "[A-Z]{4}\\d{19}[A-Z]{3}",
+ 'MC': "\\d{10}[\\dA-Z]{11}\\d{2}",
+ 'MD': "[\\dA-Z]{2}\\d{18}",
+ 'ME': "\\d{18}",
+ 'NL': "[A-Z]{4}\\d{10}",
+ 'NO': "\\d{11}",
+ 'PK': "[\\dA-Z]{4}\\d{16}",
+ 'PS': "[\\dA-Z]{4}\\d{21}",
+ 'PL': "\\d{24}",
+ 'PT': "\\d{21}",
+ 'RO': "[A-Z]{4}[\\dA-Z]{16}",
+ 'SM': "[A-Z]\\d{10}[\\dA-Z]{12}",
+ 'SA': "\\d{2}[\\dA-Z]{18}",
+ 'RS': "\\d{18}",
+ 'SK': "\\d{20}",
+ 'SI': "\\d{15}",
+ 'ES': "\\d{20}",
+ 'SE': "\\d{20}",
+ 'CH': "\\d{5}[\\dA-Z]{12}",
+ 'TN': "\\d{20}",
+ 'TR': "\\d{5}[\\dA-Z]{17}",
+ 'AE': "\\d{3}\\d{16}",
+ 'GB': "[A-Z]{4}\\d{14}",
+ 'VG': "[\\dA-Z]{4}\\d{16}"
+ };
+ var bbanpattern = bbancountrypatterns[countrycode];
+ // As new countries will start using IBAN in the
+ // future, we only check if the countrycode is known.
+ // This prevents false negatives, while almost all
+ // false positives introduced by this, will be caught
+ // by the checksum validation below anyway.
+ // Strict checking should return FALSE for unknown
+ // countries.
+ if (typeof bbanpattern !== 'undefined') {
+ var ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
+ if (!(ibanregexp.test(iban))) {
+ return false; // invalid country specific format
+ }
+ }
+
+ // now check the checksum, first convert to digits
+ var ibancheck = iban.substring(4,iban.length) + iban.substring(0,4);
+ var ibancheckdigits = "";
+ var leadingZeroes = true;
+ var charAt;
+ for (var i =0; i<ibancheck.length; i++) {
+ charAt = ibancheck.charAt(i);
+ if (charAt !== "0") {
+ leadingZeroes = false;
+ }
+ if (!leadingZeroes) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ }
+ }
+
+ // calculate the result of: ibancheckdigits % 97
+ var cRest = '';
+ var cOperator = '';
+ for (var p=0; p<ibancheckdigits.length; p++) {
+ var cChar = ibancheckdigits.charAt(p);
+ cOperator = '' + cRest + '' + cChar;
+ cRest = cOperator % 97;
+ }
+ return cRest === 1;
+}, "Please specify a valid IBAN");
+
+jQuery.validator.addMethod("dateNL", function(value, element) {
+ return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
+}, "Please enter a correct date");
+
+/**
+ * Dutch phone numbers have 10 digits (or 11 and start with +31).
+ */
+jQuery.validator.addMethod("phoneNL", function(value, element) {
+ return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
+}, "Please specify a valid phone number.");
+
+jQuery.validator.addMethod("mobileNL", function(value, element) {
+ return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
+}, "Please specify a valid mobile number");
+
+jQuery.validator.addMethod("postalcodeNL", function(value, element) {
+ return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
+}, "Please specify a valid postal code");
+
+/*
+ * Dutch bank account numbers (not 'giro' numbers) have 9 digits
+ * and pass the '11 check'.
+ * We accept the notation with spaces, as that is common.
+ * acceptable: 123456789 or 12 34 56 789
+ */
+jQuery.validator.addMethod("bankaccountNL", function(value, element) {
+ if (this.optional(element)) {
+ return true;
+ }
+ if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ return false;
+ }
+ // now '11 check'
+ var account = value.replace(/ /g,''); // remove spaces
+ var sum = 0;
+ var len = account.length;
+ for (var pos=0; pos<len; pos++) {
+ var factor = len - pos;
+ var digit = account.substring(pos, pos+1);
+ sum = sum + factor * digit;
+ }
+ return sum % 11 === 0;
+}, "Please specify a valid bank account number");
+
+/**
+ * Dutch giro account numbers (not bank numbers) have max 7 digits
+ */
+jQuery.validator.addMethod("giroaccountNL", function(value, element) {
+ return this.optional(element) || /^[0-9]{1,7}$/.test(value);
+}, "Please specify a valid giro account number");
+
+jQuery.validator.addMethod("bankorgiroaccountNL", function(value, element) {
+ return this.optional(element) ||
+ ($.validator.methods["bankaccountNL"].call(this, value, element)) ||
+ ($.validator.methods["giroaccountNL"].call(this, value, element));
+}, "Please specify a valid bank or giro account number");
+
+
+jQuery.validator.addMethod("time", function(value, element) {
+ return this.optional(element) || /^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(value);
+}, "Please enter a valid time, between 00:00 and 23:59");
+jQuery.validator.addMethod("time12h", function(value, element) {
+ return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
+}, "Please enter a valid time in 12-hour am/pm format");
+
+/**
+ * matches US phone number format
+ *
+ * where the area code may not start with 1 and the prefix may not start with 1
+ * allows '-' or ' ' as a separator and allows parens around area code
+ * some people may want to put a '1' in front of their number
+ *
+ * 1(212)-999-2345 or
+ * 212 999 2344 or
+ * 212-999-0983
+ *
+ * but not
+ * 111-123-5434
+ * and not
+ * 212 123 4567
+ */
+jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
+ phone_number = phone_number.replace(/\s+/g, "");
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(\+?1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
+}, "Please specify a valid phone number");
+
+jQuery.validator.addMethod('phoneUK', function(phone_number, element) {
+ phone_number = phone_number.replace(/\(|\)|\s+|-/g,'');
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
+}, 'Please specify a valid phone number');
+
+jQuery.validator.addMethod('mobileUK', function(phone_number, element) {
+ phone_number = phone_number.replace(/\(|\)|\s+|-/g,'');
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[45789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
+}, 'Please specify a valid mobile number');
+
+//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+jQuery.validator.addMethod('phonesUK', function(phone_number, element) {
+ phone_number = phone_number.replace(/\(|\)|\s+|-/g,'');
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[45789]\d{8}|624\d{6})))$/);
+}, 'Please specify a valid uk phone number');
+// On the above three UK functions, do the following server side processing:
+// Compare original input with this RegEx pattern:
+// ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+// Extract $1 and set $prefix to '+44<space>' if $1 is '44', otherwise set $prefix to '0'
+// Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+// A number of very detailed GB telephone number RegEx patterns can also be found at:
+// http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+
+// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
+jQuery.validator.addMethod('postcodeUK', function(value, element) {
+ return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
+}, 'Please specify a valid UK postcode');
+
+// TODO check if value starts with <, otherwise don't try stripping anything
+jQuery.validator.addMethod("strippedminlength", function(value, element, param) {
+ return jQuery(value).text().length >= param;
+}, jQuery.validator.format("Please enter at least {0} characters"));
+
+// same as email, but TLD is optional
+jQuery.validator.addMethod("email2", function(value, element, param) {
+ return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
+}, jQuery.validator.messages.email);
+
+// same as url, but TLD is optional
+jQuery.validator.addMethod("url2", function(value, element, param) {
+ return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
+}, jQuery.validator.messages.url);
+
+// NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
+// Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+// Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
+jQuery.validator.addMethod("creditcardtypes", function(value, element, param) {
+ if (/[^0-9\-]+/.test(value)) {
+ return false;
+ }
+
+ value = value.replace(/\D/g, "");
+
+ var validTypes = 0x0000;
+
+ if (param.mastercard) {
+ validTypes |= 0x0001;
+ }
+ if (param.visa) {
+ validTypes |= 0x0002;
+ }
+ if (param.amex) {
+ validTypes |= 0x0004;
+ }
+ if (param.dinersclub) {
+ validTypes |= 0x0008;
+ }
+ if (param.enroute) {
+ validTypes |= 0x0010;
+ }
+ if (param.discover) {
+ validTypes |= 0x0020;
+ }
+ if (param.jcb) {
+ validTypes |= 0x0040;
+ }
+ if (param.unknown) {
+ validTypes |= 0x0080;
+ }
+ if (param.all) {
+ validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
+ }
+ if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ return value.length === 16;
+ }
+ if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ return value.length === 16;
+ }
+ if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ return value.length === 15;
+ }
+ if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ return value.length === 14;
+ }
+ if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ return value.length === 15;
+ }
+ if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ return value.length === 16;
+ }
+ if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ return value.length === 16;
+ }
+ if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ return value.length === 15;
+ }
+ if (validTypes & 0x0080) { //unknown
+ return true;
+ }
+ return false;
+}, "Please enter a valid credit card number.");
+
+jQuery.validator.addMethod("ipv4", function(value, element, param) {
+ return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
+}, "Please enter a valid IP v4 address.");
+
+jQuery.validator.addMethod("ipv6", function(value, element, param) {
+ return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
+}, "Please enter a valid IP v6 address.");
+
+/**
+* Return true if the field value matches the given format RegExp
+*
+* @example jQuery.validator.methods.pattern("AR1004",element,/^AR\d{4}$/)
+* @result true
+*
+* @example jQuery.validator.methods.pattern("BR1004",element,/^AR\d{4}$/)
+* @result false
+*
+* @name jQuery.validator.methods.pattern
+* @type Boolean
+* @cat Plugins/Validate/Methods
+*/
+jQuery.validator.addMethod("pattern", function(value, element, param) {
+ if (this.optional(element)) {
+ return true;
+ }
+ if (typeof param === 'string') {
+ param = new RegExp('^(?:' + param + ')$');
+ }
+ return param.test(value);
+}, "Invalid format.");
+
+
+/*
+ * Lets you say "at least X inputs that match selector Y must be filled."
+ *
+ * The end result is that neither of these inputs:
+ *
+ * <input class="productinfo" name="partnumber">
+ * <input class="productinfo" name="description">
+ *
+ * ...will validate unless at least one of them is filled.
+ *
+ * partnumber: {require_from_group: [1,".productinfo"]},
+ * description: {require_from_group: [1,".productinfo"]}
+ *
+ */
+jQuery.validator.addMethod("require_from_group", function(value, element, options) {
+ var validator = this;
+ var selector = options[1];
+ var validOrNot = $(selector, element.form).filter(function() {
+ return validator.elementValue(this);
+ }).length >= options[0];
+
+ if(!$(element).data('being_validated')) {
+ var fields = $(selector, element.form);
+ fields.data('being_validated', true);
+ fields.valid();
+ fields.data('being_validated', false);
+ }
+ return validOrNot;
+}, jQuery.format("Please fill at least {0} of these fields."));
+
+/*
+ * Lets you say "either at least X inputs that match selector Y must be filled,
+ * OR they must all be skipped (left blank)."
+ *
+ * The end result, is that none of these inputs:
+ *
+ * <input class="productinfo" name="partnumber">
+ * <input class="productinfo" name="description">
+ * <input class="productinfo" name="color">
+ *
+ * ...will validate unless either at least two of them are filled,
+ * OR none of them are.
+ *
+ * partnumber: {skip_or_fill_minimum: [2,".productinfo"]},
+ * description: {skip_or_fill_minimum: [2,".productinfo"]},
+ * color: {skip_or_fill_minimum: [2,".productinfo"]}
+ *
+ */
+jQuery.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
+ var validator = this,
+ numberRequired = options[0],
+ selector = options[1];
+ var numberFilled = $(selector, element.form).filter(function() {
+ return validator.elementValue(this);
+ }).length;
+ var valid = numberFilled >= numberRequired || numberFilled === 0;
+
+ if(!$(element).data('being_validated')) {
+ var fields = $(selector, element.form);
+ fields.data('being_validated', true);
+ fields.valid();
+ fields.data('being_validated', false);
+ }
+ return valid;
+}, jQuery.format("Please either skip these fields or fill at least {0} of them."));
+
+// Accept a value from a file input based on a required mimetype
+jQuery.validator.addMethod("accept", function(value, element, param) {
+ // Split mime on commas in case we have multiple types we can accept
+ var typeParam = typeof param === "string" ? param.replace(/\s/g, '').replace(/,/g, '|') : "image/*",
+ optionalValue = this.optional(element),
+ i, file;
+
+ // Element is optional
+ if (optionalValue) {
+ return optionalValue;
+ }
+
+ if ($(element).attr("type") === "file") {
+ // If we are using a wildcard, make it regex friendly
+ typeParam = typeParam.replace(/\*/g, ".*");
+
+ // Check if the element has a FileList before checking each file
+ if (element.files && element.files.length) {
+ for (i = 0; i < element.files.length; i++) {
+ file = element.files[i];
+
+ // Grab the mimetype from the loaded file, verify it matches
+ if (!file.type.match(new RegExp( ".?(" + typeParam + ")$", "i"))) {
+ return false;
+ }
+ }
+ }
+ }
+
+ // Either return true because we've validated each file, or because the
+ // browser does not support element.files and the FileList feature
+ return true;
+}, jQuery.format("Please enter a value with a valid mimetype."));
+
+// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
+jQuery.validator.addMethod("extension", function(value, element, param) {
+ param = typeof param === "string" ? param.replace(/,/g, '|') : "png|jpe?g|gif";
+ return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
+}, jQuery.format("Please enter a value with a valid extension."));
diff --git a/views/js/jquery-validation-1.11.1/dist/additional-methods.min.js b/views/js/jquery-validation-1.11.1/dist/additional-methods.min.js
new file mode 100644
index 0000000..0c5539a
--- /dev/null
+++ b/views/js/jquery-validation-1.11.1/dist/additional-methods.min.js
@@ -0,0 +1,2 @@
+/*! jQuery Validation Plugin - v1.11.1 - 3/22/2013\n* https://github.com/jzaefferer/jquery-validation
+* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */(function(){function t(t){return t.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ").replace(/[.(),;:!?%#$'"_+=\/\-]*/g,"")}jQuery.validator.addMethod("maxWords",function(e,i,a){return this.optional(i)||a>=t(e).match(/\b\w+\b/g).length},jQuery.validator.format("Please enter {0} words or less.")),jQuery.validator.addMethod("minWords",function(e,i,a){return this.optional(i)||t(e).match(/\b\w+\b/g).length>=a},jQuery.validator.format("Please enter at least {0} words.")),jQuery.validator.addMethod("rangeWords",function(e,i,a){var r=t(e),n=/\b\w+\b/g;return this.optional(i)||r.match(n).length>=a[0]&&r.match(n).length<=a[1]},jQuery.validator.format("Please enter between {0} and {1} words."))})(),jQuery.validator.addMethod("letterswithbasicpunc",function(t,e){return this.optional(e)||/^[a-z\-.,()'"\s]+$/i.test(t)},"Letters or punctuation only please"),jQuery.validator.addMethod("alphanumeric",function(t,e){return this.optional(e)||/^\w+$/i.test(t)},"Letters, numbers, and underscores only please"),jQuery.validator.addMethod("lettersonly",function(t,e){return this.optional(e)||/^[a-z]+$/i.test(t)},"Letters only please"),jQuery.validator.addMethod("nowhitespace",function(t,e){return this.optional(e)||/^\S+$/i.test(t)},"No white space please"),jQuery.validator.addMethod("ziprange",function(t,e){return this.optional(e)||/^90[2-5]\d\{2\}-\d{4}$/.test(t)},"Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx"),jQuery.validator.addMethod("zipcodeUS",function(t,e){return this.optional(e)||/\d{5}-\d{4}$|^\d{5}$/.test(t)},"The specified US ZIP Code is invalid"),jQuery.validator.addMethod("integer",function(t,e){return this.optional(e)||/^-?\d+$/.test(t)},"A positive or negative non-decimal number please"),jQuery.validator.addMethod("vinUS",function(t){if(17!==t.length)return!1;var e,i,a,r,n,s,u=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],d=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],o=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],l=0;for(e=0;17>e;e++){if(r=o[e],a=t.slice(e,e+1),8===e&&(s=a),isNaN(a)){for(i=0;u.length>i;i++)if(a.toUpperCase()===u[i]){a=d[i],a*=r,isNaN(s)&&8===i&&(s=u[i]);break}}else a*=r;l+=a}return n=l%11,10===n&&(n="X"),n===s?!0:!1},"The specified vehicle identification number (VIN) is invalid."),jQuery.validator.addMethod("dateITA",function(t,e){var i=!1,a=/^\d{1,2}\/\d{1,2}\/\d{4}$/;if(a.test(t)){var r=t.split("/"),n=parseInt(r[0],10),s=parseInt(r[1],10),u=parseInt(r[2],10),d=new Date(u,s-1,n);i=d.getFullYear()===u&&d.getMonth()===s-1&&d.getDate()===n?!0:!1}else i=!1;return this.optional(e)||i},"Please enter a correct date"),jQuery.validator.addMethod("iban",function(t,e){if(this.optional(e))return!0;if(!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(t))return!1;var i=t.replace(/ /g,"").toUpperCase(),a=i.substring(0,2),r={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},n=r[a];if(n!==void 0){var s=RegExp("^[A-Z]{2}\\d{2}"+n+"$","");if(!s.test(i))return!1}for(var u,d=i.substring(4,i.length)+i.substring(0,4),o="",l=!0,h=0;d.length>h;h++)u=d.charAt(h),"0"!==u&&(l=!1),l||(o+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(u));for(var F="",c="",m=0;o.length>m;m++){var f=o.charAt(m);c=""+F+f,F=c%97}return 1===F},"Please specify a valid IBAN"),jQuery.validator.addMethod("dateNL",function(t,e){return this.optional(e)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(t)},"Please enter a correct date"),jQuery.validator.addMethod("phoneNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid phone number."),jQuery.validator.addMethod("mobileNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid mobile number"),jQuery.validator.addMethod("postalcodeNL",function(t,e){return this.optional(e)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(t)},"Please specify a valid postal code"),jQuery.validator.addMethod("bankaccountNL",function(t,e){if(this.optional(e))return!0;if(!/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(t))return!1;for(var i=t.replace(/ /g,""),a=0,r=i.length,n=0;r>n;n++){var s=r-n,u=i.substring(n,n+1);a+=s*u}return 0===a%11},"Please specify a valid bank account number"),jQuery.validator.addMethod("giroaccountNL",function(t,e){return this.optional(e)||/^[0-9]{1,7}$/.test(t)},"Please specify a valid giro account number"),jQuery.validator.addMethod("bankorgiroaccountNL",function(t,e){return this.optional(e)||$.validator.methods.bankaccountNL.call(this,t,e)||$.validator.methods.giroaccountNL.call(this,t,e)},"Please specify a valid bank or giro account number"),jQuery.validator.addMethod("time",function(t,e){return this.optional(e)||/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(t)},"Please enter a valid time, between 00:00 and 23:59"),jQuery.validator.addMethod("time12h",function(t,e){return this.optional(e)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(t)},"Please enter a valid time in 12-hour am/pm format"),jQuery.validator.addMethod("phoneUS",function(t,e){return t=t.replace(/\s+/g,""),this.optional(e)||t.length>9&&t.match(/^(\+?1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number"),jQuery.validator.addMethod("phoneUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),jQuery.validator.addMethod("mobileUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[45789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),jQuery.validator.addMethod("phonesUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[45789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),jQuery.validator.addMethod("postcodeUK",function(t,e){return this.optional(e)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(t)},"Please specify a valid UK postcode"),jQuery.validator.addMethod("strippedminlength",function(t,e,i){return jQuery(t).text().length>=i},jQuery.validator.format("Please enter at least {0} characters")),jQuery.validator.addMethod("email2",function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(t)},jQuery.validator.messages.email),jQuery.validator.addMethod("url2",function(t,e){return this.optional(e)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},jQuery.validator.messages.url),jQuery.validator.addMethod("creditcardtypes",function(t,e,i){if(/[^0-9\-]+/.test(t))return!1;t=t.replace(/\D/g,"");var a=0;return i.mastercard&&(a|=1),i.visa&&(a|=2),i.amex&&(a|=4),i.dinersclub&&(a|=8),i.enroute&&(a|=16),i.discover&&(a|=32),i.jcb&&(a|=64),i.unknown&&(a|=128),i.all&&(a=255),1&a&&/^(5[12345])/.test(t)?16===t.length:2&a&&/^(4)/.test(t)?16===t.length:4&a&&/^(3[47])/.test(t)?15===t.length:8&a&&/^(3(0[012345]|[68]))/.test(t)?14===t.length:16&a&&/^(2(014|149))/.test(t)?15===t.length:32&a&&/^(6011)/.test(t)?16===t.length:64&a&&/^(3)/.test(t)?16===t.length:64&a&&/^(2131|1800)/.test(t)?15===t.length:128&a?!0:!1},"Please enter a valid credit card number."),jQuery.validator.addMethod("ipv4",function(t,e){return this.optional(e)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(t)},"Please enter a valid IP v4 address."),jQuery.validator.addMethod("ipv6",function(t,e){return this.optional(e)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(t)},"Please enter a valid IP v6 address."),jQuery.validator.addMethod("pattern",function(t,e,i){return this.optional(e)?!0:("string"==typeof i&&(i=RegExp("^(?:"+i+")$")),i.test(t))},"Invalid format."),jQuery.validator.addMethod("require_from_group",function(t,e,i){var a=this,r=i[1],n=$(r,e.form).filter(function(){return a.elementValue(this)}).length>=i[0];if(!$(e).data("being_validated")){var s=$(r,e.form);s.data("being_validated",!0),s.valid(),s.data("being_validated",!1)}return n},jQuery.format("Please fill at least {0} of these fields.")),jQuery.validator.addMethod("skip_or_fill_minimum",function(t,e,i){var a=this,r=i[0],n=i[1],s=$(n,e.form).filter(function(){return a.elementValue(this)}).length,u=s>=r||0===s;if(!$(e).data("being_validated")){var d=$(n,e.form);d.data("being_validated",!0),d.valid(),d.data("being_validated",!1)}return u},jQuery.format("Please either skip these fields or fill at least {0} of them.")),jQuery.validator.addMethod("accept",function(t,e,i){var a,r,n="string"==typeof i?i.replace(/\s/g,"").replace(/,/g,"|"):"image/*",s=this.optional(e);if(s)return s;if("file"===$(e).attr("type")&&(n=n.replace(/\*/g,".*"),e.files&&e.files.length))for(a=0;e.files.length>a;a++)if(r=e.files[a],!r.type.match(RegExp(".?("+n+")$","i")))return!1;return!0},jQuery.format("Please enter a value with a valid mimetype.")),jQuery.validator.addMethod("extension",function(t,e,i){return i="string"==typeof i?i.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(e)||t.match(RegExp(".("+i+")$","i"))},jQuery.format("Please enter a value with a valid extension.")); \ No newline at end of file
diff --git a/views/js/jquery-validation-1.11.1/dist/jquery.validate.js b/views/js/jquery-validation-1.11.1/dist/jquery.validate.js
new file mode 100644
index 0000000..ccbba7f
--- /dev/null
+++ b/views/js/jquery-validation-1.11.1/dist/jquery.validate.js
@@ -0,0 +1,1235 @@
+/*!
+ * jQuery Validation Plugin 1.11.1
+ *
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
+ * http://docs.jquery.com/Plugins/Validation
+ *
+ * Copyright 2013 Jörn Zaefferer
+ * Released under the MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ */
+
+(function($) {
+
+$.extend($.fn, {
+ // http://docs.jquery.com/Plugins/Validation/validate
+ validate: function( options ) {
+
+ // if nothing is selected, return nothing; can't chain anyway
+ if ( !this.length ) {
+ if ( options && options.debug && window.console ) {
+ console.warn( "Nothing selected, can't validate, returning nothing." );
+ }
+ return;
+ }
+
+ // check if a validator for this form was already created
+ var validator = $.data( this[0], "validator" );
+ if ( validator ) {
+ return validator;
+ }
+
+ // Add novalidate tag if HTML5.
+ this.attr( "novalidate", "novalidate" );
+
+ validator = new $.validator( options, this[0] );
+ $.data( this[0], "validator", validator );
+
+ if ( validator.settings.onsubmit ) {
+
+ this.validateDelegate( ":submit", "click", function( event ) {
+ if ( validator.settings.submitHandler ) {
+ validator.submitButton = event.target;
+ }
+ // allow suppressing validation by adding a cancel class to the submit button
+ if ( $(event.target).hasClass("cancel") ) {
+ validator.cancelSubmit = true;
+ }
+
+ // allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
+ if ( $(event.target).attr("formnovalidate") !== undefined ) {
+ validator.cancelSubmit = true;
+ }
+ });
+
+ // validate the form on submit
+ this.submit( function( event ) {
+ if ( validator.settings.debug ) {
+ // prevent form submit to be able to see console output
+ event.preventDefault();
+ }
+ function handle() {
+ var hidden;
+ if ( validator.settings.submitHandler ) {
+ if ( validator.submitButton ) {
+ // insert a hidden input as a replacement for the missing submit button
+ hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val( $(validator.submitButton).val() ).appendTo(validator.currentForm);
+ }
+ validator.settings.submitHandler.call( validator, validator.currentForm, event );
+ if ( validator.submitButton ) {
+ // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ hidden.remove();
+ }
+ return false;
+ }
+ return true;
+ }
+
+ // prevent submit for invalid forms or custom submit handlers
+ if ( validator.cancelSubmit ) {
+ validator.cancelSubmit = false;
+ return handle();
+ }
+ if ( validator.form() ) {
+ if ( validator.pendingRequest ) {
+ validator.formSubmitted = true;
+ return false;
+ }
+ return handle();
+ } else {
+ validator.focusInvalid();
+ return false;
+ }
+ });
+ }
+
+ return validator;
+ },
+ // http://docs.jquery.com/Plugins/Validation/valid
+ valid: function() {
+ if ( $(this[0]).is("form")) {
+ return this.validate().form();
+ } else {
+ var valid = true;
+ var validator = $(this[0].form).validate();
+ this.each(function() {
+ valid = valid && validator.element(this);
+ });
+ return valid;
+ }
+ },
+ // attributes: space seperated list of attributes to retrieve and remove
+ removeAttrs: function( attributes ) {
+ var result = {},
+ $element = this;
+ $.each(attributes.split(/\s/), function( index, value ) {
+ result[value] = $element.attr(value);
+ $element.removeAttr(value);
+ });
+ return result;
+ },
+ // http://docs.jquery.com/Plugins/Validation/rules
+ rules: function( command, argument ) {
+ var element = this[0];
+
+ if ( command ) {
+ var settings = $.data(element.form, "validator").settings;
+ var staticRules = settings.rules;
+ var existingRules = $.validator.staticRules(element);
+ switch(command) {
+ case "add":
+ $.extend(existingRules, $.validator.normalizeRule(argument));
+ // remove messages from rules, but allow them to be set separetely
+ delete existingRules.messages;
+ staticRules[element.name] = existingRules;
+ if ( argument.messages ) {
+ settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
+ }
+ break;
+ case "remove":
+ if ( !argument ) {
+ delete staticRules[element.name];
+ return existingRules;
+ }
+ var filtered = {};
+ $.each(argument.split(/\s/), function( index, method ) {
+ filtered[method] = existingRules[method];
+ delete existingRules[method];
+ });
+ return filtered;
+ }
+ }
+
+ var data = $.validator.normalizeRules(
+ $.extend(
+ {},
+ $.validator.classRules(element),
+ $.validator.attributeRules(element),
+ $.validator.dataRules(element),
+ $.validator.staticRules(element)
+ ), element);
+
+ // make sure required is at front
+ if ( data.required ) {
+ var param = data.required;
+ delete data.required;
+ data = $.extend({required: param}, data);
+ }
+
+ return data;
+ }
+});
+
+// Custom selectors
+$.extend($.expr[":"], {
+ // http://docs.jquery.com/Plugins/Validation/blank
+ blank: function( a ) { return !$.trim("" + $(a).val()); },
+ // http://docs.jquery.com/Plugins/Validation/filled
+ filled: function( a ) { return !!$.trim("" + $(a).val()); },
+ // http://docs.jquery.com/Plugins/Validation/unchecked
+ unchecked: function( a ) { return !$(a).prop("checked"); }
+});
+
+// constructor for validator
+$.validator = function( options, form ) {
+ this.settings = $.extend( true, {}, $.validator.defaults, options );
+ this.currentForm = form;
+ this.init();
+};
+
+$.validator.format = function( source, params ) {
+ if ( arguments.length === 1 ) {
+ return function() {
+ var args = $.makeArray(arguments);
+ args.unshift(source);
+ return $.validator.format.apply( this, args );
+ };
+ }
+ if ( arguments.length > 2 && params.constructor !== Array ) {
+ params = $.makeArray(arguments).slice(1);
+ }
+ if ( params.constructor !== Array ) {
+ params = [ params ];
+ }
+ $.each(params, function( i, n ) {
+ source = source.replace( new RegExp("\\{" + i + "\\}", "g"), function() {
+ return n;
+ });
+ });
+ return source;
+};
+
+$.extend($.validator, {
+
+ defaults: {
+ messages: {},
+ groups: {},
+ rules: {},
+ errorClass: "error",
+ validClass: "valid",
+ errorElement: "label",
+ focusInvalid: true,
+ errorContainer: $([]),
+ errorLabelContainer: $([]),
+ onsubmit: true,
+ ignore: ":hidden",
+ ignoreTitle: false,
+ onfocusin: function( element, event ) {
+ this.lastActive = element;
+
+ // hide error label and remove error class on focus if enabled
+ if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
+ if ( this.settings.unhighlight ) {
+ this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
+ }
+ this.addWrapper(this.errorsFor(element)).hide();
+ }
+ },
+ onfocusout: function( element, event ) {
+ if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
+ this.element(element);
+ }
+ },
+ onkeyup: function( element, event ) {
+ if ( event.which === 9 && this.elementValue(element) === "" ) {
+ return;
+ } else if ( element.name in this.submitted || element === this.lastElement ) {
+ this.element(element);
+ }
+ },
+ onclick: function( element, event ) {
+ // click on selects, radiobuttons and checkboxes
+ if ( element.name in this.submitted ) {
+ this.element(element);
+ }
+ // or option elements, check parent select in that case
+ else if ( element.parentNode.name in this.submitted ) {
+ this.element(element.parentNode);
+ }
+ },
+ highlight: function( element, errorClass, validClass ) {
+ if ( element.type === "radio" ) {
+ this.findByName(element.name).addClass(errorClass).removeClass(validClass);
+ } else {
+ $(element).addClass(errorClass).removeClass(validClass);
+ }
+ },
+ unhighlight: function( element, errorClass, validClass ) {
+ if ( element.type === "radio" ) {
+ this.findByName(element.name).removeClass(errorClass).addClass(validClass);
+ } else {
+ $(element).removeClass(errorClass).addClass(validClass);
+ }
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
+ setDefaults: function( settings ) {
+ $.extend( $.validator.defaults, settings );
+ },
+
+ messages: {
+ required: "This field is required.",
+ remote: "Please fix this field.",
+ email: "Please enter a valid email address.",
+ url: "Please enter a valid URL.",
+ date: "Please enter a valid date.",
+ dateISO: "Please enter a valid date (ISO).",
+ number: "Please enter a valid number.",
+ digits: "Please enter only digits.",
+ creditcard: "Please enter a valid credit card number.",
+ equalTo: "Please enter the same value again.",
+ maxlength: $.validator.format("Please enter no more than {0} characters."),
+ minlength: $.validator.format("Please enter at least {0} characters."),
+ rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
+ range: $.validator.format("Please enter a value between {0} and {1}."),
+ max: $.validator.format("Please enter a value less than or equal to {0}."),
+ min: $.validator.format("Please enter a value greater than or equal to {0}.")
+ },
+
+ autoCreateRanges: false,
+
+ prototype: {
+
+ init: function() {
+ this.labelContainer = $(this.settings.errorLabelContainer);
+ this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
+ this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
+ this.submitted = {};
+ this.valueCache = {};
+ this.pendingRequest = 0;
+ this.pending = {};
+ this.invalid = {};
+ this.reset();
+
+ var groups = (this.groups = {});
+ $.each(this.settings.groups, function( key, value ) {
+ if ( typeof value === "string" ) {
+ value = value.split(/\s/);
+ }
+ $.each(value, function( index, name ) {
+ groups[name] = key;
+ });
+ });
+ var rules = this.settings.rules;
+ $.each(rules, function( key, value ) {
+ rules[key] = $.validator.normalizeRule(value);
+ });
+
+ function delegate(event) {
+ var validator = $.data(this[0].form, "validator"),
+ eventType = "on" + event.type.replace(/^validate/, "");
+ if ( validator.settings[eventType] ) {
+ validator.settings[eventType].call(validator, this[0], event);
+ }
+ }
+ $(this.currentForm)
+ .validateDelegate(":text, [type='password'], [type='file'], select, textarea, " +
+ "[type='number'], [type='search'] ,[type='tel'], [type='url'], " +
+ "[type='email'], [type='datetime'], [type='date'], [type='month'], " +
+ "[type='week'], [type='time'], [type='datetime-local'], " +
+ "[type='range'], [type='color'] ",
+ "focusin focusout keyup", delegate)
+ .validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate);
+
+ if ( this.settings.invalidHandler ) {
+ $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/form
+ form: function() {
+ this.checkForm();
+ $.extend(this.submitted, this.errorMap);
+ this.invalid = $.extend({}, this.errorMap);
+ if ( !this.valid() ) {
+ $(this.currentForm).triggerHandler("invalid-form", [this]);
+ }
+ this.showErrors();
+ return this.valid();
+ },
+
+ checkForm: function() {
+ this.prepareForm();
+ for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
+ this.check( elements[i] );
+ }
+ return this.valid();
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/element
+ element: function( element ) {
+ element = this.validationTargetFor( this.clean( element ) );
+ this.lastElement = element;
+ this.prepareElement( element );
+ this.currentElements = $(element);
+ var result = this.check( element ) !== false;
+ if ( result ) {
+ delete this.invalid[element.name];
+ } else {
+ this.invalid[element.name] = true;
+ }
+ if ( !this.numberOfInvalids() ) {
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+ return result;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/showErrors
+ showErrors: function( errors ) {
+ if ( errors ) {
+ // add items to error list and map
+ $.extend( this.errorMap, errors );
+ this.errorList = [];
+ for ( var name in errors ) {
+ this.errorList.push({
+ message: errors[name],
+ element: this.findByName(name)[0]
+ });
+ }
+ // remove items from success list
+ this.successList = $.grep( this.successList, function( element ) {
+ return !(element.name in errors);
+ });
+ }
+ if ( this.settings.showErrors ) {
+ this.settings.showErrors.call( this, this.errorMap, this.errorList );
+ } else {
+ this.defaultShowErrors();
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/resetForm
+ resetForm: function() {
+ if ( $.fn.resetForm ) {
+ $(this.currentForm).resetForm();
+ }
+ this.submitted = {};
+ this.lastElement = null;
+ this.prepareForm();
+ this.hideErrors();
+ this.elements().removeClass( this.settings.errorClass ).removeData( "previousValue" );
+ },
+
+ numberOfInvalids: function() {
+ return this.objectLength(this.invalid);
+ },
+
+ objectLength: function( obj ) {
+ var count = 0;
+ for ( var i in obj ) {
+ count++;
+ }
+ return count;
+ },
+
+ hideErrors: function() {
+ this.addWrapper( this.toHide ).hide();
+ },
+
+ valid: function() {
+ return this.size() === 0;
+ },
+
+ size: function() {
+ return this.errorList.length;
+ },
+
+ focusInvalid: function() {
+ if ( this.settings.focusInvalid ) {
+ try {
+ $(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])
+ .filter(":visible")
+ .focus()
+ // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger("focusin");
+ } catch(e) {
+ // ignore IE throwing errors when focusing hidden elements
+ }
+ }
+ },
+
+ findLastActive: function() {
+ var lastActive = this.lastActive;
+ return lastActive && $.grep(this.errorList, function( n ) {
+ return n.element.name === lastActive.name;
+ }).length === 1 && lastActive;
+ },
+
+ elements: function() {
+ var validator = this,
+ rulesCache = {};
+
+ // select all valid inputs inside the form (no submit or reset buttons)
+ return $(this.currentForm)
+ .find("input, select, textarea")
+ .not(":submit, :reset, :image, [disabled]")
+ .not( this.settings.ignore )
+ .filter(function() {
+ if ( !this.name && validator.settings.debug && window.console ) {
+ console.error( "%o has no name assigned", this);
+ }
+
+ // select only the first element for each name, and only those with rules specified
+ if ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) {
+ return false;
+ }
+
+ rulesCache[this.name] = true;
+ return true;
+ });
+ },
+
+ clean: function( selector ) {
+ return $(selector)[0];
+ },
+
+ errors: function() {
+ var errorClass = this.settings.errorClass.replace(" ", ".");
+ return $(this.settings.errorElement + "." + errorClass, this.errorContext);
+ },
+
+ reset: function() {
+ this.successList = [];
+ this.errorList = [];
+ this.errorMap = {};
+ this.toShow = $([]);
+ this.toHide = $([]);
+ this.currentElements = $([]);
+ },
+
+ prepareForm: function() {
+ this.reset();
+ this.toHide = this.errors().add( this.containers );
+ },
+
+ prepareElement: function( element ) {
+ this.reset();
+ this.toHide = this.errorsFor(element);
+ },
+
+ elementValue: function( element ) {
+ var type = $(element).attr("type"),
+ val = $(element).val();
+
+ if ( type === "radio" || type === "checkbox" ) {
+ return $("input[name='" + $(element).attr("name") + "']:checked").val();
+ }
+
+ if ( typeof val === "string" ) {
+ return val.replace(/\r/g, "");
+ }
+ return val;
+ },
+
+ check: function( element ) {
+ element = this.validationTargetFor( this.clean( element ) );
+
+ var rules = $(element).rules();
+ var dependencyMismatch = false;
+ var val = this.elementValue(element);
+ var result;
+
+ for (var method in rules ) {
+ var rule = { method: method, parameters: rules[method] };
+ try {
+
+ result = $.validator.methods[method].call( this, val, element, rule.parameters );
+
+ // if a method indicates that the field is optional and therefore valid,
+ // don't mark it as valid when there are no other rules
+ if ( result === "dependency-mismatch" ) {
+ dependencyMismatch = true;
+ continue;
+ }
+ dependencyMismatch = false;
+
+ if ( result === "pending" ) {
+ this.toHide = this.toHide.not( this.errorsFor(element) );
+ return;
+ }
+
+ if ( !result ) {
+ this.formatAndAdd( element, rule );
+ return false;
+ }
+ } catch(e) {
+ if ( this.settings.debug && window.console ) {
+ console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e );
+ }
+ throw e;
+ }
+ }
+ if ( dependencyMismatch ) {
+ return;
+ }
+ if ( this.objectLength(rules) ) {
+ this.successList.push(element);
+ }
+ return true;
+ },
+
+ // return the custom message for the given element and validation method
+ // specified in the element's HTML5 data attribute
+ customDataMessage: function( element, method ) {
+ return $(element).data("msg-" + method.toLowerCase()) || (element.attributes && $(element).attr("data-msg-" + method.toLowerCase()));
+ },
+
+ // return the custom message for the given element name and validation method
+ customMessage: function( name, method ) {
+ var m = this.settings.messages[name];
+ return m && (m.constructor === String ? m : m[method]);
+ },
+
+ // return the first defined argument, allowing empty strings
+ findDefined: function() {
+ for(var i = 0; i < arguments.length; i++) {
+ if ( arguments[i] !== undefined ) {
+ return arguments[i];
+ }
+ }
+ return undefined;
+ },
+
+ defaultMessage: function( element, method ) {
+ return this.findDefined(
+ this.customMessage( element.name, method ),
+ this.customDataMessage( element, method ),
+ // title is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[method],
+ "<strong>Warning: No message defined for " + element.name + "</strong>"
+ );
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule.method ),
+ theregex = /\$?\{(\d+)\}/g;
+ if ( typeof message === "function" ) {
+ message = message.call(this, rule.parameters, element);
+ } else if (theregex.test(message)) {
+ message = $.validator.format(message.replace(theregex, "{$1}"), rule.parameters);
+ }
+ this.errorList.push({
+ message: message,
+ element: element
+ });
+
+ this.errorMap[element.name] = message;
+ this.submitted[element.name] = message;
+ },
+
+ addWrapper: function( toToggle ) {
+ if ( this.settings.wrapper ) {
+ toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );
+ }
+ return toToggle;
+ },
+
+ defaultShowErrors: function() {
+ var i, elements;
+ for ( i = 0; this.errorList[i]; i++ ) {
+ var error = this.errorList[i];
+ if ( this.settings.highlight ) {
+ this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );
+ }
+ this.showLabel( error.element, error.message );
+ }
+ if ( this.errorList.length ) {
+ this.toShow = this.toShow.add( this.containers );
+ }
+ if ( this.settings.success ) {
+ for ( i = 0; this.successList[i]; i++ ) {
+ this.showLabel( this.successList[i] );
+ }
+ }
+ if ( this.settings.unhighlight ) {
+ for ( i = 0, elements = this.validElements(); elements[i]; i++ ) {
+ this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );
+ }
+ }
+ this.toHide = this.toHide.not( this.toShow );
+ this.hideErrors();
+ this.addWrapper( this.toShow ).show();
+ },
+
+ validElements: function() {
+ return this.currentElements.not(this.invalidElements());
+ },
+
+ invalidElements: function() {
+ return $(this.errorList).map(function() {
+ return this.element;
+ });
+ },
+
+ showLabel: function( element, message ) {
+ var label = this.errorsFor( element );
+ if ( label.length ) {
+ // refresh error/success class
+ label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
+ // replace message on existing label
+ label.html(message);
+ } else {
+ // create label
+ label = $("<" + this.settings.errorElement + ">")
+ .attr("for", this.idOrName(element))
+ .addClass(this.settings.errorClass)
+ .html(message || "");
+ if ( this.settings.wrapper ) {
+ // make sure the element is visible, even in IE
+ // actually showing the wrapped element is handled elsewhere
+ label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
+ }
+ if ( !this.labelContainer.append(label).length ) {
+ if ( this.settings.errorPlacement ) {
+ this.settings.errorPlacement(label, $(element) );
+ } else {
+ label.insertAfter(element);
+ }
+ }
+ }
+ if ( !message && this.settings.success ) {
+ label.text("");
+ if ( typeof this.settings.success === "string" ) {
+ label.addClass( this.settings.success );
+ } else {
+ this.settings.success( label, element );
+ }
+ }
+ this.toShow = this.toShow.add(label);
+ },
+
+ errorsFor: function( element ) {
+ var name = this.idOrName(element);
+ return this.errors().filter(function() {
+ return $(this).attr("for") === name;
+ });
+ },
+
+ idOrName: function( element ) {
+ return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
+ },
+
+ validationTargetFor: function( element ) {
+ // if radio/checkbox, validate first element in group instead
+ if ( this.checkable(element) ) {
+ element = this.findByName( element.name ).not(this.settings.ignore)[0];
+ }
+ return element;
+ },
+
+ checkable: function( element ) {
+ return (/radio|checkbox/i).test(element.type);
+ },
+
+ findByName: function( name ) {
+ return $(this.currentForm).find("[name='" + name + "']");
+ },
+
+ getLength: function( value, element ) {
+ switch( element.nodeName.toLowerCase() ) {
+ case "select":
+ return $("option:selected", element).length;
+ case "input":
+ if ( this.checkable( element) ) {
+ return this.findByName(element.name).filter(":checked").length;
+ }
+ }
+ return value.length;
+ },
+
+ depend: function( param, element ) {
+ return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true;
+ },
+
+ dependTypes: {
+ "boolean": function( param, element ) {
+ return param;
+ },
+ "string": function( param, element ) {
+ return !!$(param, element.form).length;
+ },
+ "function": function( param, element ) {
+ return param(element);
+ }
+ },
+
+ optional: function( element ) {
+ var val = this.elementValue(element);
+ return !$.validator.methods.required.call(this, val, element) && "dependency-mismatch";
+ },
+
+ startRequest: function( element ) {
+ if ( !this.pending[element.name] ) {
+ this.pendingRequest++;
+ this.pending[element.name] = true;
+ }
+ },
+
+ stopRequest: function( element, valid ) {
+ this.pendingRequest--;
+ // sometimes synchronization fails, make sure pendingRequest is never < 0
+ if ( this.pendingRequest < 0 ) {
+ this.pendingRequest = 0;
+ }
+ delete this.pending[element.name];
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
+ $(this.currentForm).submit();
+ this.formSubmitted = false;
+ } else if (!valid && this.pendingRequest === 0 && this.formSubmitted) {
+ $(this.currentForm).triggerHandler("invalid-form", [this]);
+ this.formSubmitted = false;
+ }
+ },
+
+ previousValue: function( element ) {
+ return $.data(element, "previousValue") || $.data(element, "previousValue", {
+ old: null,
+ valid: true,
+ message: this.defaultMessage( element, "remote" )
+ });
+ }
+
+ },
+
+ classRuleSettings: {
+ required: {required: true},
+ email: {email: true},
+ url: {url: true},
+ date: {date: true},
+ dateISO: {dateISO: true},
+ number: {number: true},
+ digits: {digits: true},
+ creditcard: {creditcard: true}
+ },
+
+ addClassRules: function( className, rules ) {
+ if ( className.constructor === String ) {
+ this.classRuleSettings[className] = rules;
+ } else {
+ $.extend(this.classRuleSettings, className);
+ }
+ },
+
+ removeClassRules: function( className, rules) {
+ this.classRuleSettings[className] = null;
+ },
+
+ classRules: function( element ) {
+ var rules = {};
+ var classes = $(element).attr("class");
+ if ( classes ) {
+ $.each(classes.split(" "), function() {
+ if ( this in $.validator.classRuleSettings ) {
+ $.extend(rules, $.validator.classRuleSettings[this]);
+ }
+ });
+ }
+ return rules;
+ },
+
+ attributeRules: function( element ) {
+ var rules = {};
+ var $element = $(element);
+ var type = $element[0].getAttribute("type");
+
+ for (var method in $.validator.methods) {
+ var value;
+
+ // support for <input required> in both html5 and older browsers
+ if ( method === "required" ) {
+ value = $element.get(0).getAttribute(method);
+ // Some browsers return an empty string for the required attribute
+ // and non-HTML5 browsers might have required="" markup
+ if ( value === "" || value === "-1") {
+ value = true;
+ }
+ // force non-HTML5 browsers to return bool
+ value = !!value;
+ } else {
+ value = $element.attr(method);
+ }
+
+ // convert the value to a number for number inputs, and for text for backwards compability
+ // allows type="date" and others to be compared as strings
+ if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ value = Number(value);
+ }
+
+ if ( value ) {
+ rules[method] = value;
+ } else if ( type === method && type !== 'range' ) {
+ // exception: the jquery validate 'range' method
+ // does not test for the html5 'range' type
+ rules[method] = true;
+ }
+ }
+
+ // maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
+ if ( rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength) ) {
+ delete rules.maxlength;
+ }
+
+ return rules;
+ },
+
+ dataRules: function( element ) {
+ var method, value,
+ rules = {}, $element = $(element);
+ for (method in $.validator.methods) {
+ value = $element.data("rule-" + method.toLowerCase());
+ if ( value !== undefined ) {
+ rules[method] = value;
+ }
+ }
+ return rules;
+ },
+
+ staticRules: function( element ) {
+ var rules = {};
+ var validator = $.data(element.form, "validator");
+ if ( validator.settings.rules ) {
+ rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
+ }
+ return rules;
+ },
+
+ normalizeRules: function( rules, element ) {
+ // handle dependency check
+ $.each(rules, function( prop, val ) {
+ // ignore rule when param is explicitly false, eg. required:false
+ if ( val === false ) {
+ delete rules[prop];
+ return;
+ }
+ if ( val.param || val.depends ) {
+ var keepRule = true;
+ switch (typeof val.depends) {
+ case "string":
+ keepRule = !!$(val.depends, element.form).length;
+ break;
+ case "function":
+ keepRule = val.depends.call(element, element);
+ break;
+ }
+ if ( keepRule ) {
+ rules[prop] = val.param !== undefined ? val.param : true;
+ } else {
+ delete rules[prop];
+ }
+ }
+ });
+
+ // evaluate parameters
+ $.each(rules, function( rule, parameter ) {
+ rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
+ });
+
+ // clean number parameters
+ $.each(['minlength', 'maxlength'], function() {
+ if ( rules[this] ) {
+ rules[this] = Number(rules[this]);
+ }
+ });
+ $.each(['rangelength', 'range'], function() {
+ var parts;
+ if ( rules[this] ) {
+ if ( $.isArray(rules[this]) ) {
+ rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
+ } else if ( typeof rules[this] === "string" ) {
+ parts = rules[this].split(/[\s,]+/);
+ rules[this] = [Number(parts[0]), Number(parts[1])];
+ }
+ }
+ });
+
+ if ( $.validator.autoCreateRanges ) {
+ // auto-create ranges
+ if ( rules.min && rules.max ) {
+ rules.range = [rules.min, rules.max];
+ delete rules.min;
+ delete rules.max;
+ }
+ if ( rules.minlength && rules.maxlength ) {
+ rules.rangelength = [rules.minlength, rules.maxlength];
+ delete rules.minlength;
+ delete rules.maxlength;
+ }
+ }
+
+ return rules;
+ },
+
+ // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
+ normalizeRule: function( data ) {
+ if ( typeof data === "string" ) {
+ var transformed = {};
+ $.each(data.split(/\s/), function() {
+ transformed[this] = true;
+ });
+ data = transformed;
+ }
+ return data;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/addMethod
+ addMethod: function( name, method, message ) {
+ $.validator.methods[name] = method;
+ $.validator.messages[name] = message !== undefined ? message : $.validator.messages[name];
+ if ( method.length < 3 ) {
+ $.validator.addClassRules(name, $.validator.normalizeRule(name));
+ }
+ },
+
+ methods: {
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/required
+ required: function( value, element, param ) {
+ // check if dependency is met
+ if ( !this.depend(param, element) ) {
+ return "dependency-mismatch";
+ }
+ if ( element.nodeName.toLowerCase() === "select" ) {
+ // could be an array for select-multiple or a string, both are fine this way
+ var val = $(element).val();
+ return val && val.length > 0;
+ }
+ if ( this.checkable(element) ) {
+ return this.getLength(value, element) > 0;
+ }
+ return $.trim(value).length > 0;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/email
+ email: function( value, element ) {
+ // contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
+ return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/url
+ url: function( value, element ) {
+ // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
+ return this.optional(element) || /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/date
+ date: function( value, element ) {
+ return this.optional(element) || !/Invalid|NaN/.test(new Date(value).toString());
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/dateISO
+ dateISO: function( value, element ) {
+ return this.optional(element) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/number
+ number: function( value, element ) {
+ return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/digits
+ digits: function( value, element ) {
+ return this.optional(element) || /^\d+$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/creditcard
+ // based on http://en.wikipedia.org/wiki/Luhn
+ creditcard: function( value, element ) {
+ if ( this.optional(element) ) {
+ return "dependency-mismatch";
+ }
+ // accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test(value) ) {
+ return false;
+ }
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false;
+
+ value = value.replace(/\D/g, "");
+
+ for (var n = value.length - 1; n >= 0; n--) {
+ var cDigit = value.charAt(n);
+ nDigit = parseInt(cDigit, 10);
+ if ( bEven ) {
+ if ( (nDigit *= 2) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return (nCheck % 10) === 0;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/minlength
+ minlength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
+ return this.optional(element) || length >= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/maxlength
+ maxlength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
+ return this.optional(element) || length <= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/rangelength
+ rangelength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
+ return this.optional(element) || ( length >= param[0] && length <= param[1] );
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/min
+ min: function( value, element, param ) {
+ return this.optional(element) || value >= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/max
+ max: function( value, element, param ) {
+ return this.optional(element) || value <= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/range
+ range: function( value, element, param ) {
+ return this.optional(element) || ( value >= param[0] && value <= param[1] );
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/equalTo
+ equalTo: function( value, element, param ) {
+ // bind to the blur event of the target in order to revalidate whenever the target field is updated
+ // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+ var target = $(param);
+ if ( this.settings.onfocusout ) {
+ target.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
+ $(element).valid();
+ });
+ }
+ return value === target.val();
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/remote
+ remote: function( value, element, param ) {
+ if ( this.optional(element) ) {
+ return "dependency-mismatch";
+ }
+
+ var previous = this.previousValue(element);
+ if (!this.settings.messages[element.name] ) {
+ this.settings.messages[element.name] = {};
+ }
+ previous.originalMessage = this.settings.messages[element.name].remote;
+ this.settings.messages[element.name].remote = previous.message;
+
+ param = typeof param === "string" && {url:param} || param;
+
+ if ( previous.old === value ) {
+ return previous.valid;
+ }
+
+ previous.old = value;
+ var validator = this;
+ this.startRequest(element);
+ var data = {};
+ data[element.name] = value;
+ $.ajax($.extend(true, {
+ url: param,
+ mode: "abort",
+ port: "validate" + element.name,
+ dataType: "json",
+ data: data,
+ success: function( response ) {
+ validator.settings.messages[element.name].remote = previous.originalMessage;
+ var valid = response === true || response === "true";
+ if ( valid ) {
+ var submitted = validator.formSubmitted;
+ validator.prepareElement(element);
+ validator.formSubmitted = submitted;
+ validator.successList.push(element);
+ delete validator.invalid[element.name];
+ validator.showErrors();
+ } else {
+ var errors = {};
+ var message = response || validator.defaultMessage( element, "remote" );
+ errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;
+ validator.invalid[element.name] = true;
+ validator.showErrors(errors);
+ }
+ previous.valid = valid;
+ validator.stopRequest(element, valid);
+ }
+ }, param));
+ return "pending";
+ }
+
+ }
+
+});
+
+// deprecated, use $.validator.format instead
+$.format = $.validator.format;
+
+}(jQuery));
+
+// ajax mode: abort
+// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
+// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
+(function($) {
+ var pendingRequests = {};
+ // Use a prefilter if available (1.5+)
+ if ( $.ajaxPrefilter ) {
+ $.ajaxPrefilter(function( settings, _, xhr ) {
+ var port = settings.port;
+ if ( settings.mode === "abort" ) {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ pendingRequests[port] = xhr;
+ }
+ });
+ } else {
+ // Proxy ajax
+ var ajax = $.ajax;
+ $.ajax = function( settings ) {
+ var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
+ port = ( "port" in settings ? settings : $.ajaxSettings ).port;
+ if ( mode === "abort" ) {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ pendingRequests[port] = ajax.apply(this, arguments);
+ return pendingRequests[port];
+ }
+ return ajax.apply(this, arguments);
+ };
+ }
+}(jQuery));
+
+// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
+// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
+(function($) {
+ $.extend($.fn, {
+ validateDelegate: function( delegate, type, handler ) {
+ return this.bind(type, function( event ) {
+ var target = $(event.target);
+ if ( target.is(delegate) ) {
+ return handler.apply(target, arguments);
+ }
+ });
+ }
+ });
+}(jQuery));
diff --git a/views/js/jquery-validation-1.11.1/dist/jquery.validate.min.js b/views/js/jquery-validation-1.11.1/dist/jquery.validate.min.js
new file mode 100644
index 0000000..59ee8d5
--- /dev/null
+++ b/views/js/jquery-validation-1.11.1/dist/jquery.validate.min.js
@@ -0,0 +1,1237 @@
+/*!
+ * jQuery Validation Plugin 1.11.1
+ *
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
+ * http://docs.jquery.com/Plugins/Validation
+ *
+ * Copyright 2013 Jörn Zaefferer
+ * Released under the MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ */
+(function($) {
+
+$.extend($.fn, {
+ // http://docs.jquery.com/Plugins/Validation/validate
+ validate: function( options ) {
+
+ // if nothing is selected, return nothing; can't chain anyway
+ if ( !this.length ) {
+ if ( options && options.debug && window.console ) {
+ console.warn( "Nothing selected, can't validate, returning nothing." );
+ }
+ return;
+ }
+
+ // check if a validator for this form was already created
+ var validator = $.data( this[0], "validator" );
+ if ( validator ) {
+ return validator;
+ }
+
+ // Add novalidate tag if HTML5.
+ this.attr( "novalidate", "novalidate" );
+
+ validator = new $.validator( options, this[0] );
+ $.data( this[0], "validator", validator );
+
+ if ( validator.settings.onsubmit ) {
+
+ this.validateDelegate( ":submit", "click", function( event ) {
+ if ( validator.settings.submitHandler ) {
+ validator.submitButton = event.target;
+ }
+ // allow suppressing validation by adding a cancel class to the submit button
+ if ( $(event.target).hasClass("cancel") ) {
+ validator.cancelSubmit = true;
+ }
+
+ // allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
+ if ( $(event.target).attr("formnovalidate") !== undefined ) {
+ validator.cancelSubmit = true;
+ }
+ });
+
+ // validate the form on submit
+ this.submit( function( event ) {
+ if ( validator.settings.debug ) {
+ // prevent form submit to be able to see console output
+ event.preventDefault();
+ }
+ function handle() {
+ var hidden;
+ if ( validator.settings.submitHandler ) {
+ if ( validator.submitButton ) {
+ // insert a hidden input as a replacement for the missing submit button
+ hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val( $(validator.submitButton).val() ).appendTo(validator.currentForm);
+ }
+ validator.settings.submitHandler.call( validator, validator.currentForm, event );
+ if ( validator.submitButton ) {
+ // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ hidden.remove();
+ }
+ return false;
+ }
+ return true;
+ }
+
+ // prevent submit for invalid forms or custom submit handlers
+ if ( validator.cancelSubmit ) {
+ validator.cancelSubmit = false;
+ return handle();
+ }
+ if ( validator.form() ) {
+ if ( validator.pendingRequest ) {
+ validator.formSubmitted = true;
+ return false;
+ }
+ return handle();
+ } else {
+ validator.focusInvalid();
+ return false;
+ }
+ });
+ }
+
+ return validator;
+ },
+ // http://docs.jquery.com/Plugins/Validation/valid
+ valid: function() {
+ if ( $(this[0]).is("form")) {
+ return this.validate().form();
+ } else {
+ var valid = true;
+ var validator = $(this[0].form).validate();
+ this.each(function() {
+ valid = valid && validator.element(this);
+ });
+ return valid;
+ }
+ },
+ // attributes: space seperated list of attributes to retrieve and remove
+ removeAttrs: function( attributes ) {
+ var result = {},
+ $element = this;
+ $.each(attributes.split(/\s/), function( index, value ) {
+ result[value] = $element.attr(value);
+ $element.removeAttr(value);
+ });
+ return result;
+ },
+ // http://docs.jquery.com/Plugins/Validation/rules
+ rules: function( command, argument ) {
+ var element = this[0];
+
+ if ( command ) {
+ var settings = $.data(element.form, "validator").settings;
+ var staticRules = settings.rules;
+ var existingRules = $.validator.staticRules(element);
+ switch(command) {
+ case "add":
+ $.extend(existingRules, $.validator.normalizeRule(argument));
+ // remove messages from rules, but allow them to be set separetely
+ delete existingRules.messages;
+ staticRules[element.name] = existingRules;
+ if ( argument.messages ) {
+ settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
+ }
+ break;
+ case "remove":
+ if ( !argument ) {
+ delete staticRules[element.name];
+ return existingRules;
+ }
+ var filtered = {};
+ $.each(argument.split(/\s/), function( index, method ) {
+ filtered[method] = existingRules[method];
+ delete existingRules[method];
+ });
+ return filtered;
+ }
+ }
+
+ var data = $.validator.normalizeRules(
+ $.extend(
+ {},
+ $.validator.classRules(element),
+ $.validator.attributeRules(element),
+ $.validator.dataRules(element),
+ $.validator.staticRules(element)
+ ), element);
+
+ // make sure required is at front
+ if ( data.required ) {
+ var param = data.required;
+ delete data.required;
+ data = $.extend({required: param}, data);
+ }
+
+ return data;
+ }
+});
+
+// Custom selectors
+$.extend($.expr[":"], {
+ // http://docs.jquery.com/Plugins/Validation/blank
+ blank: function( a ) { return !$.trim("" + $(a).val()); },
+ // http://docs.jquery.com/Plugins/Validation/filled
+ filled: function( a ) { return !!$.trim("" + $(a).val()); },
+ // http://docs.jquery.com/Plugins/Validation/unchecked
+ unchecked: function( a ) { return !$(a).prop("checked"); }
+});
+
+// constructor for validator
+$.validator = function( options, form ) {
+ this.settings = $.extend( true, {}, $.validator.defaults, options );
+ this.currentForm = form;
+ this.init();
+};
+
+$.validator.format = function( source, params ) {
+ if ( arguments.length === 1 ) {
+ return function() {
+ var args = $.makeArray(arguments);
+ args.unshift(source);
+ return $.validator.format.apply( this, args );
+ };
+ }
+ if ( arguments.length > 2 && params.constructor !== Array ) {
+ params = $.makeArray(arguments).slice(1);
+ }
+ if ( params.constructor !== Array ) {
+ params = [ params ];
+ }
+ $.each(params, function( i, n ) {
+ source = source.replace( new RegExp("\\{" + i + "\\}", "g"), function() {
+ return n;
+ });
+ });
+ return source;
+};
+
+$.extend($.validator, {
+
+ defaults: {
+ messages: {},
+ groups: {},
+ rules: {},
+ errorClass: "error",
+ validClass: "valid",
+ errorElement: "label",
+ focusInvalid: true,
+ errorContainer: $([]),
+ errorLabelContainer: $([]),
+ onsubmit: true,
+ ignore: ":hidden",
+ ignoreTitle: false,
+ onfocusin: function( element, event ) {
+ this.lastActive = element;
+
+ // hide error label and remove error class on focus if enabled
+ if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
+ if ( this.settings.unhighlight ) {
+ this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
+ }
+ this.addWrapper(this.errorsFor(element)).hide();
+ }
+ },
+ onfocusout: function( element, event ) {
+ if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
+ this.element(element);
+ }
+ },
+ onkeyup: function( element, event ) {
+ if ( event.which === 9 && this.elementValue(element) === "" ) {
+ return;
+ } else if ( element.name in this.submitted || element === this.lastElement ) {
+ this.element(element);
+ }
+ },
+ onclick: function( element, event ) {
+ // click on selects, radiobuttons and checkboxes
+ if ( element.name in this.submitted ) {
+ this.element(element);
+ }
+ // or option elements, check parent select in that case
+ else if ( element.parentNode.name in this.submitted ) {
+ this.element(element.parentNode);
+ }
+ },
+ highlight: function( element, errorClass, validClass ) {
+ if ( element.type === "radio" ) {
+ this.findByName(element.name).addClass(errorClass).removeClass(validClass);
+ } else {
+ $(element).addClass(errorClass).removeClass(validClass);
+ }
+ },
+ unhighlight: function( element, errorClass, validClass ) {
+ if ( element.type === "radio" ) {
+ this.findByName(element.name).removeClass(errorClass).addClass(validClass);
+ } else {
+ $(element).removeClass(errorClass).addClass(validClass);
+ }
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
+ setDefaults: function( settings ) {
+ $.extend( $.validator.defaults, settings );
+ },
+
+ messages: {
+ required: wpsg_trans_v2.required,
+ remote: wpsg_trans_v2.remote,
+ email: wpsg_trans_v2.email,
+ url: wpsg_trans_v2.url,
+ date: wpsg_trans_v2.date,
+ dateISO: wpsg_trans_v2.dateISO,
+ number: wpsg_trans_v2.number,
+ digits: wpsg_trans_v2.digits,
+ creditcard: wpsg_trans_v2.creditcard,
+ equalTo: wpsg_trans_v2.equalTo,
+ maxlength: $.validator.format(wpsg_trans_v2.maxlength),
+ minlength: $.validator.format(wpsg_trans_v2.minlength),
+ rangelength: $.validator.format(wpsg_trans_v2.rangelength),
+ range: $.validator.format(wpsg_trans_v2.range),
+ max: $.validator.format(wpsg_trans_v2.max),
+ min: $.validator.format(wpsg_trans_v2.min)
+ },
+
+ autoCreateRanges: false,
+
+ prototype: {
+
+ init: function() {
+ this.labelContainer = $(this.settings.errorLabelContainer);
+ this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
+ this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
+ this.submitted = {};
+ this.valueCache = {};
+ this.pendingRequest = 0;
+ this.pending = {};
+ this.invalid = {};
+ this.reset();
+
+ var groups = (this.groups = {});
+ $.each(this.settings.groups, function( key, value ) {
+ if ( typeof value === "string" ) {
+ value = value.split(/\s/);
+ }
+ $.each(value, function( index, name ) {
+ groups[name] = key;
+ });
+ });
+ var rules = this.settings.rules;
+ $.each(rules, function( key, value ) {
+ rules[key] = $.validator.normalizeRule(value);
+ });
+
+ function delegate(event) {
+ var validator = $.data(this[0].form, "validator"),
+ eventType = "on" + event.type.replace(/^validate/, "");
+ if ( validator.settings[eventType] ) {
+ validator.settings[eventType].call(validator, this[0], event);
+ }
+ }
+ $(this.currentForm)
+ .validateDelegate(":text, [type='password'], [type='file'], select, textarea, " +
+ "[type='number'], [type='search'] ,[type='tel'], [type='url'], " +
+ "[type='email'], [type='datetime'], [type='date'], [type='month'], " +
+ "[type='week'], [type='time'], [type='datetime-local'], " +
+ "[type='range'], [type='color'] ",
+ "focusin focusout keyup", delegate)
+ .validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate);
+
+ if ( this.settings.invalidHandler ) {
+ $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/form
+ form: function() {
+ this.checkForm();
+ $.extend(this.submitted, this.errorMap);
+ this.invalid = $.extend({}, this.errorMap);
+ if ( !this.valid() ) {
+ $(this.currentForm).triggerHandler("invalid-form", [this]);
+ }
+ this.showErrors();
+ return this.valid();
+ },
+
+ checkForm: function() {
+ this.prepareForm();
+ for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
+ this.check( elements[i] );
+ }
+ return this.valid();
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/element
+ element: function( element ) {
+ element = this.validationTargetFor( this.clean( element ) );
+ this.lastElement = element;
+ this.prepareElement( element );
+ this.currentElements = $(element);
+ var result = this.check( element ) !== false;
+ if ( result ) {
+ delete this.invalid[element.name];
+ } else {
+ this.invalid[element.name] = true;
+ }
+ if ( !this.numberOfInvalids() ) {
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+ return result;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/showErrors
+ showErrors: function( errors ) {
+ if ( errors ) {
+ // add items to error list and map
+ $.extend( this.errorMap, errors );
+ this.errorList = [];
+ for ( var name in errors ) {
+ this.errorList.push({
+ message: errors[name],
+ element: this.findByName(name)[0]
+ });
+ }
+ // remove items from success list
+ this.successList = $.grep( this.successList, function( element ) {
+ return !(element.name in errors);
+ });
+ }
+ if ( this.settings.showErrors ) {
+ this.settings.showErrors.call( this, this.errorMap, this.errorList );
+ } else {
+ this.defaultShowErrors();
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/resetForm
+ resetForm: function() {
+ if ( $.fn.resetForm ) {
+ $(this.currentForm).resetForm();
+ }
+ this.submitted = {};
+ this.lastElement = null;
+ this.prepareForm();
+ this.hideErrors();
+ this.elements().removeClass( this.settings.errorClass ).removeData( "previousValue" );
+ },
+
+ numberOfInvalids: function() {
+ return this.objectLength(this.invalid);
+ },
+
+ objectLength: function( obj ) {
+ var count = 0;
+ for ( var i in obj ) {
+ count++;
+ }
+ return count;
+ },
+
+ hideErrors: function() {
+ this.addWrapper( this.toHide ).hide();
+ },
+
+ valid: function() {
+ return this.size() === 0;
+ },
+
+ size: function() {
+ return this.errorList.length;
+ },
+
+ focusInvalid: function() {
+ if ( this.settings.focusInvalid ) {
+ try {
+ $(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])
+ .filter(":visible")
+ .focus()
+ // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger("focusin");
+ } catch(e) {
+ // ignore IE throwing errors when focusing hidden elements
+ }
+ }
+ },
+
+ findLastActive: function() {
+ var lastActive = this.lastActive;
+ return lastActive && $.grep(this.errorList, function( n ) {
+ return n.element.name === lastActive.name;
+ }).length === 1 && lastActive;
+ },
+
+ elements: function() {
+ var validator = this,
+ rulesCache = {};
+
+ // select all valid inputs inside the form (no submit or reset buttons)
+ return $(this.currentForm)
+ .find("input, select, textarea")
+ .not(":submit, :reset, :image, [disabled]")
+
+ .filter(function() {
+ if ( !this.name && validator.settings.debug && window.console ) {
+ console.error( "%o has no name assigned", this);
+ }
+
+ // select only the first element for each name, and only those with rules specified
+ if ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) {
+ return false;
+ }
+
+ rulesCache[this.name] = true;
+ return true;
+ });
+ },
+
+ clean: function( selector ) {
+ return $(selector)[0];
+ },
+
+ errors: function() {
+ var errorClass = this.settings.errorClass.replace(" ", ".");
+ return $(this.settings.errorElement + "." + errorClass, this.errorContext);
+ },
+
+ reset: function() {
+ this.successList = [];
+ this.errorList = [];
+ this.errorMap = {};
+ this.toShow = $([]);
+ this.toHide = $([]);
+ this.currentElements = $([]);
+ },
+
+ prepareForm: function() {
+ this.reset();
+ this.toHide = this.errors().add( this.containers );
+ },
+
+ prepareElement: function( element ) {
+ this.reset();
+ this.toHide = this.errorsFor(element);
+ },
+
+ elementValue: function( element ) {
+ var type = $(element).attr("type"),
+ val = $(element).val();
+
+ if ( type === "radio" || type === "checkbox" ) {
+ return $("input[name='" + $(element).attr("name") + "']:checked").val();
+ }
+
+ if ( typeof val === "string" ) {
+ return val.replace(/\r/g, "");
+ }
+ return val;
+ },
+
+ check: function( element ) {
+ element = this.validationTargetFor( this.clean( element ) );
+
+ var rules = $(element).rules();
+ var dependencyMismatch = false;
+ var val = this.elementValue(element);
+ var result;
+
+ for (var method in rules ) {
+ var rule = { method: method, parameters: rules[method] };
+ try {
+
+ result = $.validator.methods[method].call( this, val, element, rule.parameters );
+
+ // if a method indicates that the field is optional and therefore valid,
+ // don't mark it as valid when there are no other rules
+ if ( result === "dependency-mismatch" ) {
+ dependencyMismatch = true;
+ continue;
+ }
+ dependencyMismatch = false;
+
+ if ( result === "pending" ) {
+ this.toHide = this.toHide.not( this.errorsFor(element) );
+ return;
+ }
+
+ if ( !result ) {
+ this.formatAndAdd( element, rule );
+ return false;
+ }
+ } catch(e) {
+ if ( this.settings.debug && window.console ) {
+ console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e );
+ }
+ throw e;
+ }
+ }
+ if ( dependencyMismatch ) {
+ return;
+ }
+ if ( this.objectLength(rules) ) {
+ this.successList.push(element);
+ }
+ return true;
+ },
+
+ // return the custom message for the given element and validation method
+ // specified in the element's HTML5 data attribute
+ customDataMessage: function( element, method ) {
+ return $(element).data("msg-" + method.toLowerCase()) || (element.attributes && $(element).attr("data-msg-" + method.toLowerCase()));
+ },
+
+ // return the custom message for the given element name and validation method
+ customMessage: function( name, method ) {
+ var m = this.settings.messages[name];
+ return m && (m.constructor === String ? m : m[method]);
+ },
+
+ // return the first defined argument, allowing empty strings
+ findDefined: function() {
+ for(var i = 0; i < arguments.length; i++) {
+ if ( arguments[i] !== undefined ) {
+ return arguments[i];
+ }
+ }
+ return undefined;
+ },
+
+ defaultMessage: function( element, method ) {
+ return this.findDefined(
+ this.customMessage( element.name, method ),
+ this.customDataMessage( element, method ),
+ // title is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[method],
+ "<strong>Warning: No message defined for " + element.name + "</strong>"
+ );
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule.method ),
+ theregex = /\$?\{(\d+)\}/g;
+ if ( typeof message === "function" ) {
+ message = message.call(this, rule.parameters, element);
+ } else if (theregex.test(message)) {
+ message = $.validator.format(message.replace(theregex, "{$1}"), rule.parameters);
+ }
+ this.errorList.push({
+ message: message,
+ element: element
+ });
+
+ this.errorMap[element.name] = message;
+ this.submitted[element.name] = message;
+ },
+
+ addWrapper: function( toToggle ) {
+ if ( this.settings.wrapper ) {
+ toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );
+ }
+ return toToggle;
+ },
+
+ defaultShowErrors: function() {
+ var i, elements;
+ for ( i = 0; this.errorList[i]; i++ ) {
+ var error = this.errorList[i];
+ if ( this.settings.highlight ) {
+ this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );
+ }
+ this.showLabel( error.element, error.message );
+ }
+ if ( this.errorList.length ) {
+ this.toShow = this.toShow.add( this.containers );
+ }
+ if ( this.settings.success ) {
+ for ( i = 0; this.successList[i]; i++ ) {
+ this.showLabel( this.successList[i] );
+ }
+ }
+ if ( this.settings.unhighlight ) {
+ for ( i = 0, elements = this.validElements(); elements[i]; i++ ) {
+ this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );
+ }
+ }
+ this.toHide = this.toHide.not( this.toShow );
+ this.hideErrors();
+ this.addWrapper( this.toShow ).show();
+ },
+
+ validElements: function() {
+ return this.currentElements.not(this.invalidElements());
+ },
+
+ invalidElements: function() {
+ return $(this.errorList).map(function() {
+ return this.element;
+ });
+ },
+
+ showLabel: function( element, message ) {
+ var label = this.errorsFor( element );
+ if ( label.length ) {
+ // refresh error/success class
+ label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
+ // replace message on existing label
+ label.html(message);
+ } else {
+ // create label
+ label = $("<" + this.settings.errorElement + ">")
+ .attr("for", this.idOrName(element))
+ .addClass(this.settings.errorClass)
+ .html(message || "");
+ if ( this.settings.wrapper ) {
+ // make sure the element is visible, even in IE
+ // actually showing the wrapped element is handled elsewhere
+ label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
+ }
+ if ( !this.labelContainer.append(label).length ) {
+ if ( this.settings.errorPlacement ) {
+ this.settings.errorPlacement(label, $(element) );
+ } else {
+ label.insertAfter(element);
+ }
+ }
+ }
+ if ( !message && this.settings.success ) {
+ label.text("");
+ if ( typeof this.settings.success === "string" ) {
+ label.addClass( this.settings.success );
+ } else {
+ this.settings.success( label, element );
+ }
+ }
+ this.toShow = this.toShow.add(label);
+ },
+
+ errorsFor: function( element ) {
+ var name = this.idOrName(element);
+ return this.errors().filter(function() {
+ return $(this).attr("for") === name;
+ });
+ },
+
+ idOrName: function( element ) {
+ return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
+ },
+
+ validationTargetFor: function( element ) {
+ // if radio/checkbox, validate first element in group instead
+ if ( this.checkable(element) ) {
+ element = this.findByName( element.name ).not(this.settings.ignore)[0];
+ }
+ return element;
+ },
+
+ checkable: function( element ) {
+ return (/radio|checkbox/i).test(element.type);
+ },
+
+ findByName: function( name ) {
+ return $(this.currentForm).find("[name='" + name + "']");
+ },
+
+ getLength: function( value, element ) {
+ switch( element.nodeName.toLowerCase() ) {
+ case "select":
+ return $("option:selected", element).length;
+ case "input":
+ if ( this.checkable( element) ) {
+ return this.findByName(element.name).filter(":checked").length;
+ }
+ }
+ return value.length;
+ },
+
+ depend: function( param, element ) {
+ return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true;
+ },
+
+ dependTypes: {
+ "boolean": function( param, element ) {
+ return param;
+ },
+ "string": function( param, element ) {
+ return !!$(param, element.form).length;
+ },
+ "function": function( param, element ) {
+ return param(element);
+ }
+ },
+
+ optional: function( element ) {
+ var val = this.elementValue(element);
+ return !$.validator.methods.required.call(this, val, element) && "dependency-mismatch";
+ },
+
+ startRequest: function( element ) {
+ if ( !this.pending[element.name] ) {
+ this.pendingRequest++;
+ this.pending[element.name] = true;
+ }
+ },
+
+ stopRequest: function( element, valid ) {
+ this.pendingRequest--;
+ // sometimes synchronization fails, make sure pendingRequest is never < 0
+ if ( this.pendingRequest < 0 ) {
+ this.pendingRequest = 0;
+ }
+ delete this.pending[element.name];
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
+ $(this.currentForm).submit();
+ this.formSubmitted = false;
+ } else if (!valid && this.pendingRequest === 0 && this.formSubmitted) {
+ $(this.currentForm).triggerHandler("invalid-form", [this]);
+ this.formSubmitted = false;
+ }
+ },
+
+ previousValue: function( element ) {
+ return $.data(element, "previousValue") || $.data(element, "previousValue", {
+ old: null,
+ valid: true,
+ message: this.defaultMessage( element, "remote" )
+ });
+ }
+
+ },
+
+ classRuleSettings: {
+ required: {required: true},
+ email: {email: true},
+ url: {url: true},
+ date: {date: true},
+ dateISO: {dateISO: true},
+ number: {number: true},
+ digits: {digits: true},
+ creditcard: {creditcard: true}
+ },
+
+ addClassRules: function( className, rules ) {
+ if ( className.constructor === String ) {
+ this.classRuleSettings[className] = rules;
+ } else {
+ $.extend(this.classRuleSettings, className);
+ }
+ },
+
+ removeClassRules: function( className, rules) {
+ this.classRuleSettings[className] = null;
+ },
+
+ classRules: function( element ) {
+ var rules = {};
+ var classes = $(element).attr("class");
+ if ( classes ) {
+ $.each(classes.split(" "), function() {
+ if ( this in $.validator.classRuleSettings ) {
+ $.extend(rules, $.validator.classRuleSettings[this]);
+ }
+ });
+ }
+ return rules;
+ },
+
+ attributeRules: function( element ) {
+ var rules = {};
+ var $element = $(element);
+ var type = $element[0].getAttribute("type");
+
+ for (var method in $.validator.methods) {
+ var value;
+
+ // support for <input required> in both html5 and older browsers
+ if ( method === "required" ) {
+ value = $element.get(0).getAttribute(method);
+ // Some browsers return an empty string for the required attribute
+ // and non-HTML5 browsers might have required="" markup
+ if ( value === "" || value === "-1") {
+ value = true;
+ }
+ // force non-HTML5 browsers to return bool
+ value = !!value;
+ } else {
+ value = $element.attr(method);
+ }
+
+ // convert the value to a number for number inputs, and for text for backwards compability
+ // allows type="date" and others to be compared as strings
+ if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ value = Number(value);
+ }
+
+ if ( value ) {
+ rules[method] = value;
+ } else if ( type === method && type !== 'range' ) {
+ // exception: the jquery validate 'range' method
+ // does not test for the html5 'range' type
+ rules[method] = true;
+ }
+ }
+
+ // maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
+ if ( rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength) ) {
+ delete rules.maxlength;
+ }
+
+ return rules;
+ },
+
+ dataRules: function( element ) {
+ var method, value,
+ rules = {}, $element = $(element);
+ for (method in $.validator.methods) {
+ value = $element.data("rule-" + method.toLowerCase());
+ if ( value !== undefined ) {
+ rules[method] = value;
+ }
+ }
+ return rules;
+ },
+
+ staticRules: function( element ) {
+ var rules = {};
+ var validator = $.data(element.form, "validator");
+ if ( validator.settings.rules ) {
+ rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
+ }
+ return rules;
+ },
+
+ normalizeRules: function( rules, element ) {
+ // handle dependency check
+ $.each(rules, function( prop, val ) {
+ // ignore rule when param is explicitly false, eg. required:false
+ if ( val === false ) {
+ delete rules[prop];
+ return;
+ }
+ if ( val.param || val.depends ) {
+ var keepRule = true;
+ switch (typeof val.depends) {
+ case "string":
+ keepRule = !!$(val.depends, element.form).length;
+ break;
+ case "function":
+ keepRule = val.depends.call(element, element);
+ break;
+ }
+ if ( keepRule ) {
+ rules[prop] = val.param !== undefined ? val.param : true;
+ } else {
+ delete rules[prop];
+ }
+ }
+ });
+
+ // evaluate parameters
+ $.each(rules, function( rule, parameter ) {
+ rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
+ });
+
+ // clean number parameters
+ $.each(['minlength', 'maxlength'], function() {
+ if ( rules[this] ) {
+ rules[this] = Number(rules[this]);
+ }
+ });
+ $.each(['rangelength', 'range'], function() {
+ var parts;
+ if ( rules[this] ) {
+ if ( $.isArray(rules[this]) ) {
+ rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
+ } else if ( typeof rules[this] === "string" ) {
+ parts = rules[this].split(/[\s,]+/);
+ rules[this] = [Number(parts[0]), Number(parts[1])];
+ }
+ }
+ });
+
+ if ( $.validator.autoCreateRanges ) {
+ // auto-create ranges
+ if ( rules.min && rules.max ) {
+ rules.range = [rules.min, rules.max];
+ delete rules.min;
+ delete rules.max;
+ }
+ if ( rules.minlength && rules.maxlength ) {
+ rules.rangelength = [rules.minlength, rules.maxlength];
+ delete rules.minlength;
+ delete rules.maxlength;
+ }
+ }
+
+ return rules;
+ },
+
+ // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
+ normalizeRule: function( data ) {
+ if ( typeof data === "string" ) {
+ var transformed = {};
+ $.each(data.split(/\s/), function() {
+ transformed[this] = true;
+ });
+ data = transformed;
+ }
+ return data;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/addMethod
+ addMethod: function( name, method, message ) {
+ $.validator.methods[name] = method;
+ $.validator.messages[name] = message !== undefined ? message : $.validator.messages[name];
+ if ( method.length < 3 ) {
+ $.validator.addClassRules(name, $.validator.normalizeRule(name));
+ }
+ },
+
+ methods: {
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/required
+ required: function( value, element, param ) {
+ // check if dependency is met
+ if ( !this.depend(param, element) ) {
+ return "dependency-mismatch";
+ }
+ if ( element.nodeName.toLowerCase() === "select" ) {
+ // could be an array for select-multiple or a string, both are fine this way
+ var val = $(element).val();
+ return val && val.length > 0;
+ }
+ if ( this.checkable(element) ) {
+ return this.getLength(value, element) > 0;
+ }
+ return $.trim(value).length > 0;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/email
+ email: function( value, element ) {
+ // contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
+ return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/url
+ url: function( value, element ) {
+ // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
+ return this.optional(element) || /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/date
+ date: function( value, element ) {
+
+ console.log("BOOL1: " + this.optional(element) + " / " + value);
+
+ return this.optional(element) || /\d{1,2}\.\d{1,2}\.\d{4}/.test(value) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/dateISO
+ dateISO: function( value, element ) {
+ return this.optional(element) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/number
+ number: function( value, element ) {
+ return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/digits
+ digits: function( value, element ) {
+ return this.optional(element) || /^\d+$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/creditcard
+ // based on http://en.wikipedia.org/wiki/Luhn
+ creditcard: function( value, element ) {
+ if ( this.optional(element) ) {
+ return "dependency-mismatch";
+ }
+ // accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test(value) ) {
+ return false;
+ }
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false;
+
+ value = value.replace(/\D/g, "");
+
+ for (var n = value.length - 1; n >= 0; n--) {
+ var cDigit = value.charAt(n);
+ nDigit = parseInt(cDigit, 10);
+ if ( bEven ) {
+ if ( (nDigit *= 2) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return (nCheck % 10) === 0;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/minlength
+ minlength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
+ return this.optional(element) || length >= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/maxlength
+ maxlength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
+ return this.optional(element) || length <= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/rangelength
+ rangelength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
+ return this.optional(element) || ( length >= param[0] && length <= param[1] );
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/min
+ min: function( value, element, param ) {
+ return this.optional(element) || value >= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/max
+ max: function( value, element, param ) {
+ return this.optional(element) || value <= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/range
+ range: function( value, element, param ) {
+ return this.optional(element) || ( value >= param[0] && value <= param[1] );
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/equalTo
+ equalTo: function( value, element, param ) {
+ // bind to the blur event of the target in order to revalidate whenever the target field is updated
+ // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+ var target = $(param);
+ if ( this.settings.onfocusout ) {
+ target.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
+ $(element).valid();
+ });
+ }
+ return value === target.val();
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/remote
+ remote: function( value, element, param ) {
+ if ( this.optional(element) ) {
+ return "dependency-mismatch";
+ }
+
+ var previous = this.previousValue(element);
+ if (!this.settings.messages[element.name] ) {
+ this.settings.messages[element.name] = {};
+ }
+ previous.originalMessage = this.settings.messages[element.name].remote;
+ this.settings.messages[element.name].remote = previous.message;
+
+ param = typeof param === "string" && {url:param} || param;
+
+ if ( previous.old === value ) {
+ return previous.valid;
+ }
+
+ previous.old = value;
+ var validator = this;
+ this.startRequest(element);
+ var data = {};
+ data[element.name] = value;
+ $.ajax($.extend(true, {
+ url: param,
+ mode: "abort",
+ port: "validate" + element.name,
+ dataType: "json",
+ data: data,
+ success: function( response ) {
+ validator.settings.messages[element.name].remote = previous.originalMessage;
+ var valid = response === true || response === "true";
+ if ( valid ) {
+ var submitted = validator.formSubmitted;
+ validator.prepareElement(element);
+ validator.formSubmitted = submitted;
+ validator.successList.push(element);
+ delete validator.invalid[element.name];
+ validator.showErrors();
+ } else {
+ var errors = {};
+ var message = response || validator.defaultMessage( element, "remote" );
+ errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;
+ validator.invalid[element.name] = true;
+ validator.showErrors(errors);
+ }
+ previous.valid = valid;
+ validator.stopRequest(element, valid);
+ }
+ }, param));
+ return "pending";
+ }
+
+ }
+
+});
+
+// deprecated, use $.validator.format instead
+$.format = $.validator.format;
+
+}(jQuery));
+
+// ajax mode: abort
+// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
+// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
+(function($) {
+ var pendingRequests = {};
+ // Use a prefilter if available (1.5+)
+ if ( $.ajaxPrefilter ) {
+ $.ajaxPrefilter(function( settings, _, xhr ) {
+ var port = settings.port;
+ if ( settings.mode === "abort" ) {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ pendingRequests[port] = xhr;
+ }
+ });
+ } else {
+ // Proxy ajax
+ var ajax = $.ajax;
+ $.ajax = function( settings ) {
+ var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
+ port = ( "port" in settings ? settings : $.ajaxSettings ).port;
+ if ( mode === "abort" ) {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ pendingRequests[port] = ajax.apply(this, arguments);
+ return pendingRequests[port];
+ }
+ return ajax.apply(this, arguments);
+ };
+ }
+}(jQuery));
+
+// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
+// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
+(function($) {
+ $.extend($.fn, {
+ validateDelegate: function( delegate, type, handler ) {
+ return this.bind(type, function( event ) {
+ var target = $(event.target);
+ if ( target.is(delegate) ) {
+ return handler.apply(target, arguments);
+ }
+ });
+ }
+ });
+}(jQuery));
diff --git a/views/js/jquery.cookie.js b/views/js/jquery.cookie.js
new file mode 100644
index 0000000..f941a69
--- /dev/null
+++ b/views/js/jquery.cookie.js
@@ -0,0 +1,117 @@
+/*!
+ * jQuery Cookie Plugin v1.4.1
+ * https://github.com/carhartl/jquery-cookie
+ *
+ * Copyright 2006, 2014 Klaus Hartl
+ * Released under the MIT license
+ */
+(function (factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD
+ define(['jquery'], factory);
+ } else if (typeof exports === 'object') {
+ // CommonJS
+ factory(require('jquery'));
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+}(function ($) {
+
+ var pluses = /\+/g;
+
+ function encode(s) {
+ return config.raw ? s : encodeURIComponent(s);
+ }
+
+ function decode(s) {
+ return config.raw ? s : decodeURIComponent(s);
+ }
+
+ function stringifyCookieValue(value) {
+ return encode(config.json ? JSON.stringify(value) : String(value));
+ }
+
+ function parseCookieValue(s) {
+ if (s.indexOf('"') === 0) {
+ // This is a quoted cookie as according to RFC2068, unescape...
+ s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
+ }
+
+ try {
+ // Replace server-side written pluses with spaces.
+ // If we can't decode the cookie, ignore it, it's unusable.
+ // If we can't parse the cookie, ignore it, it's unusable.
+ s = decodeURIComponent(s.replace(pluses, ' '));
+ return config.json ? JSON.parse(s) : s;
+ } catch(e) {}
+ }
+
+ function read(s, converter) {
+ var value = config.raw ? s : parseCookieValue(s);
+ return $.isFunction(converter) ? converter(value) : value;
+ }
+
+ var config = $.cookie = function (key, value, options) {
+
+ // Write
+
+ if (arguments.length > 1 && !$.isFunction(value)) {
+ options = $.extend({}, config.defaults, options);
+
+ if (typeof options.expires === 'number') {
+ var days = options.expires, t = options.expires = new Date();
+ t.setTime(+t + days * 864e+5);
+ }
+
+ return (document.cookie = [
+ encode(key), '=', stringifyCookieValue(value),
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
+ options.path ? '; path=' + options.path : '',
+ options.domain ? '; domain=' + options.domain : '',
+ options.secure ? '; secure' : ''
+ ].join(''));
+ }
+
+ // Read
+
+ var result = key ? undefined : {};
+
+ // To prevent the for loop in the first place assign an empty array
+ // in case there are no cookies at all. Also prevents odd result when
+ // calling $.cookie().
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
+
+ for (var i = 0, l = cookies.length; i < l; i++) {
+ var parts = cookies[i].split('=');
+ var name = decode(parts.shift());
+ var cookie = parts.join('=');
+
+ if (key && key === name) {
+ // If second argument (value) is a function it's a converter...
+ result = read(cookie, value);
+ break;
+ }
+
+ // Prevent storing a cookie that we couldn't decode.
+ if (!key && (cookie = read(cookie)) !== undefined) {
+ result[name] = cookie;
+ }
+ }
+
+ return result;
+ };
+
+ config.defaults = {};
+
+ $.removeCookie = function (key, options) {
+ if ($.cookie(key) === undefined) {
+ return false;
+ }
+
+ // Must not alter options, thus extending a fresh object...
+ $.cookie(key, '', $.extend({}, options, { expires: -1 }));
+ return !$.cookie(key);
+ };
+
+}));
diff --git a/views/js/jquery.validationEngine-de.js b/views/js/jquery.validationEngine-de.js
new file mode 100644
index 0000000..1da6342
--- /dev/null
+++ b/views/js/jquery.validationEngine-de.js
@@ -0,0 +1,131 @@
+
+(function($){
+ $.fn.validationEngineLanguage = function(){
+ };
+ $.validationEngineLanguage = {
+ newLang: function(){
+ $.validationEngineLanguage.allRules = {
+ "required": { // Add your regex rules here, you can take telephone as an example
+ "regex": "none",
+ "alertText": wpsg_trans_v1.required_alertText,
+ "alertTextCheckboxMultiple": wpsg_trans_v1.required_alertTextCheckboxMultiple,
+ "alertTextCheckboxe": wpsg_trans_v1.required_alertTextCheckboxe
+ },
+ "minSize": {
+ "regex": "none",
+ "alertText": wpsg_trans_v1.minSize_alertText,
+ "alertText2": wpsg_trans_v1.minSize_alertText2
+ },
+ "maxSize": {
+ "regex": "none",
+ "alertText": wpsg_trans_v1.maxSize_alertText,
+ "alertText2": wpsg_trans_v1.maxSize_alertText
+ },
+ "groupRequired": {
+ "regex": "none",
+ "alertText": wpsg_trans_v1.groupRequired_alertText
+ },
+ "min": {
+ "regex": "none",
+ "alertText": wpsg_trans_v1.min_alertText
+ },
+ "max": {
+ "regex": "none",
+ "alertText": wpsg_trans_v1.max_alertText
+ },
+ "past": {
+ "regex": "none",
+ "alertText": wpsg_trans_v1.past_alertText
+ },
+ "future": {
+ "regex": "none",
+ "alertText": wpsg_trans_v1.future_alertText
+ },
+ "maxCheckbox": {
+ "regex": "none",
+ "alertText": wpsg_trans_v1.maxCheckbox_alertText
+ },
+ "minCheckbox": {
+ "regex": "none",
+ "alertText": wpsg_trans_v1.minCheckbox_alertText,
+ "alertText2": wpsg_trans_v1.minCheckbox_alertText2
+ },
+ "equals": {
+ "regex": "none",
+ "alertText": wpsg_trans_v1.equals_alertText
+ },
+ "creditCard": {
+ "regex": "none",
+ "alertText": wpsg_trans_v1.creditCard_alertText
+ },
+ "phone": {
+ // credit: jquery.h5validate.js / orefalo
+ "regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{1,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
+ "alertText": wpsg_trans_v1.phone_alertText
+ },
+ "email": {
+ // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
+ "regex": /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,
+ "alertText": wpsg_trans_v1.email_alertText
+ },
+ "integer": {
+ "regex": /^[\-\+]?\d+$/,
+ "alertText": wpsg_trans_v1.integer_alertText
+ },
+ "number": {
+ // Number, including positive, negative, and floating decimal. credit: orefalo
+ "regex": /^[\-\+]?(([0-9]+)([\.,]([0-9]+))?|([\.,]([0-9]+))?)$/,
+ "alertText": wpsg_trans_v1.number_alertText
+ },
+ "date": {
+ // Date in ISO format. Credit: bassistance
+ "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
+ "alertText": wpsg_trans_v1.date_alertText
+ },
+ "ipv4": {
+ "regex": /^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,
+ "alertText": wpsg_trans_v1.ipv4_alertText
+ },
+ "url": {
+ "regex": /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,
+ "alertText": wpsg_trans_v1.url_alertText
+ },
+ "onlyLetterSp": {
+ "regex": /^[a-zA-ZäüöÄÜÖßs\ \\\']+$/,
+ "alertText": wpsg_trans_v1.onlyLetterSp_alertText
+ },
+ "onlyLetterNumber": {
+ "regex": /^[0-9a-zA-ZäüöÄÜÖßs-]+$/,
+ "alertText": wpsg_trans_v1.onlyLetterNumber_alertText
+ },
+ // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
+ "ajaxUserCall": {
+ "url": "ajaxValidateFieldUser",
+ // you may want to pass extra data on the ajax call
+ "extraData": "name=eric",
+ "alertText": wpsg_trans_v1.ajaxUserCall_alertText,
+ "alertTextLoad": wpsg_trans_v1.ajaxUserCall_alertTextLoad
+ },
+ "ajaxNameCall": {
+ // remote json service location
+ "url": "ajaxValidateFieldName",
+ // error
+ "alertText": wpsg_trans_v1.ajaxNameCall_alertText,
+ // if you provide an "alertTextOk", it will show as a green prompt when the field validates
+ "alertTextOk": wpsg_trans_v1.ajaxNameCall_alertTextOk,
+ // speaks by itself
+ "alertTextLoad": wpsg_trans_v1.ajaxNameCall_alertTextLoad
+ },
+ "validate2fields": {
+ "alertText": wpsg_trans_v1.validate2fields_alertText
+ },
+ "vname": {
+ "regex": "none",
+ "alertText": wpsg_trans_v1.vname_alertText
+ }
+ };
+
+ }
+ };
+ $.validationEngineLanguage.newLang();
+})(jQuery); \ No newline at end of file
diff --git a/views/js/jquery.validationEngine.js b/views/js/jquery.validationEngine.js
new file mode 100644
index 0000000..054553d
--- /dev/null
+++ b/views/js/jquery.validationEngine.js
@@ -0,0 +1,2077 @@
+/*
+ * Inline Form Validation Engine 2.6.2, jQuery plugin
+ *
+ * Copyright(c) 2010, Cedric Dugas
+ * http://www.position-absolute.com
+ *
+ * 2.0 Rewrite by Olivier Refalo
+ * http://www.crionics.com
+ *
+ * Form validation engine allowing custom regex rules to be added.
+ * Licensed under the MIT License
+ */
+ (function($) {
+
+ "use strict";
+
+ var methods = {
+
+ /**
+ * Kind of the constructor, called before any action
+ * @param {Map} user options
+ */
+ init: function(options) {
+ var form = this;
+ if (!form.data('jqv') || form.data('jqv') == null ) {
+ options = methods._saveOptions(form, options);
+ // bind all formError elements to close on click
+ $(document).on("click", ".formError", function() {
+ $(this).fadeOut(150, function() {
+ // remove prompt once invisible
+ $(this).parent('.formErrorOuter').remove();
+ $(this).remove();
+ });
+ });
+ }
+ return this;
+ },
+ /**
+ * Attachs jQuery.validationEngine to form.submit and field.blur events
+ * Takes an optional params: a list of options
+ * ie. jQuery("#formID1").validationEngine('attach', {promptPosition : "centerRight"});
+ */
+ attach: function(userOptions) {
+
+ var form = this;
+ var options;
+
+ if(userOptions)
+ options = methods._saveOptions(form, userOptions);
+ else
+ options = form.data('jqv');
+
+ options.validateAttribute = (form.find("[data-validation-engine*=validate]").length) ? "data-validation-engine" : "class";
+ if (options.binded) {
+
+ // delegate fields
+ form.on(options.validationEventTrigger, "["+options.validateAttribute+"*=validate]:not([type=checkbox]):not([type=radio]):not(.datepicker)", methods._onFieldEvent);
+ form.on("click", "["+options.validateAttribute+"*=validate][type=checkbox],["+options.validateAttribute+"*=validate][type=radio]", methods._onFieldEvent);
+ form.on(options.validationEventTrigger,"["+options.validateAttribute+"*=validate][class*=datepicker]", {"delay": 300}, methods._onFieldEvent);
+ }
+ if (options.autoPositionUpdate) {
+ $(window).bind("resize", {
+ "noAnimation": true,
+ "formElem": form
+ }, methods.updatePromptsPosition);
+ }
+ form.on("click","a[data-validation-engine-skip], a[class*='validate-skip'], button[data-validation-engine-skip], button[class*='validate-skip'], input[data-validation-engine-skip], input[class*='validate-skip']", methods._submitButtonClick);
+ form.removeData('jqv_submitButton');
+
+ // bind form.submit
+ form.on("submit", methods._onSubmitEvent);
+ return this;
+ },
+ /**
+ * Unregisters any bindings that may point to jQuery.validaitonEngine
+ */
+ detach: function() {
+
+ var form = this;
+ var options = form.data('jqv');
+
+ // unbind fields
+ form.find("["+options.validateAttribute+"*=validate]").not("[type=checkbox]").off(options.validationEventTrigger, methods._onFieldEvent);
+ form.find("["+options.validateAttribute+"*=validate][type=checkbox],[class*=validate][type=radio]").off("click", methods._onFieldEvent);
+
+ // unbind form.submit
+ form.off("submit", methods._onSubmitEvent);
+ form.removeData('jqv');
+
+ form.off("click", "a[data-validation-engine-skip], a[class*='validate-skip'], button[data-validation-engine-skip], button[class*='validate-skip'], input[data-validation-engine-skip], input[class*='validate-skip']", methods._submitButtonClick);
+ form.removeData('jqv_submitButton');
+
+ if (options.autoPositionUpdate)
+ $(window).off("resize", methods.updatePromptsPosition);
+
+ return this;
+ },
+ /**
+ * Validates either a form or a list of fields, shows prompts accordingly.
+ * Note: There is no ajax form validation with this method, only field ajax validation are evaluated
+ *
+ * @return true if the form validates, false if it fails
+ */
+ validate: function() {
+ var element = $(this);
+ var valid = null;
+
+ if (element.is("form") || element.hasClass("validationEngineContainer")) {
+ if (element.hasClass('validating')) {
+ // form is already validating.
+ // Should abort old validation and start new one. I don't know how to implement it.
+ return false;
+ } else {
+ element.addClass('validating');
+ var options = element.data('jqv');
+ var valid = methods._validateFields(this);
+
+ // If the form doesn't validate, clear the 'validating' class before the user has a chance to submit again
+ setTimeout(function(){
+ element.removeClass('validating');
+ }, 100);
+ if (valid && options.onSuccess) {
+ options.onSuccess();
+ } else if (!valid && options.onFailure) {
+ options.onFailure();
+ }
+ }
+ } else if (element.is('form') || element.hasClass('validationEngineContainer')) {
+ element.removeClass('validating');
+ } else {
+ // field validation
+ var form = element.closest('form, .validationEngineContainer'),
+ options = (form.data('jqv')) ? form.data('jqv') : $.validationEngine.defaults,
+ valid = methods._validateField(element, options);
+
+ if (valid && options.onFieldSuccess)
+ options.onFieldSuccess();
+ else if (options.onFieldFailure && options.InvalidFields.length > 0) {
+ options.onFieldFailure();
+ }
+ }
+ if(options.onValidationComplete) {
+ // !! ensures that an undefined return is interpreted as return false but allows a onValidationComplete() to possibly return true and have form continue processing
+ return !!options.onValidationComplete(form, valid);
+ }
+ return valid;
+ },
+ /**
+ * Redraw prompts position, useful when you change the DOM state when validating
+ */
+ updatePromptsPosition: function(event) {
+
+ if (event && this == window) {
+ var form = event.data.formElem;
+ var noAnimation = event.data.noAnimation;
+ }
+ else
+ var form = $(this.closest('form, .validationEngineContainer'));
+
+ var options = form.data('jqv');
+ // No option, take default one
+ form.find('['+options.validateAttribute+'*=validate]').not(":disabled").each(function(){
+ var field = $(this);
+ if (options.prettySelect && field.is(":hidden"))
+ field = form.find("#" + options.usePrefix + field.attr('id') + options.useSuffix);
+ var prompt = methods._getPrompt(field);
+ var promptText = $(prompt).find(".formErrorContent").html();
+
+ if(prompt)
+ methods._updatePrompt(field, $(prompt), promptText, undefined, false, options, noAnimation);
+ });
+ return this;
+ },
+ /**
+ * Displays a prompt on a element.
+ * Note that the element needs an id!
+ *
+ * @param {String} promptText html text to display type
+ * @param {String} type the type of bubble: 'pass' (green), 'load' (black) anything else (red)
+ * @param {String} possible values topLeft, topRight, bottomLeft, centerRight, bottomRight
+ */
+ showPrompt: function(promptText, type, promptPosition, showArrow) {
+ var form = this.closest('form, .validationEngineContainer');
+ var options = form.data('jqv');
+ // No option, take default one
+ if(!options)
+ options = methods._saveOptions(this, options);
+ if(promptPosition)
+ options.promptPosition=promptPosition;
+ options.showArrow = showArrow==true;
+
+ methods._showPrompt(this, promptText, type, false, options);
+ return this;
+ },
+ /**
+ * Closes form error prompts, CAN be invidual
+ */
+ hide: function() {
+ var form = $(this).closest('form, .validationEngineContainer');
+ var options = form.data('jqv');
+ var fadeDuration = (options && options.fadeDuration) ? options.fadeDuration : 0.3;
+ var closingtag;
+
+ if($(this).is("form") || $(this).hasClass("validationEngineContainer")) {
+ closingtag = "parentForm"+methods._getClassName($(this).attr("id"));
+ } else {
+ closingtag = methods._getClassName($(this).attr("id")) +"formError";
+ }
+ $('.'+closingtag).fadeTo(fadeDuration, 0.3, function() {
+ $(this).parent('.formErrorOuter').remove();
+ $(this).remove();
+ });
+ return this;
+ },
+ /**
+ * Closes all error prompts on the page
+ */
+ hideAll: function() {
+
+ var form = this;
+ var options = form.data('jqv');
+ var duration = options ? options.fadeDuration:300;
+ $('.formError').fadeTo(duration, 300, function() {
+ $(this).parent('.formErrorOuter').remove();
+ $(this).remove();
+ });
+ return this;
+ },
+ /**
+ * Typically called when user exists a field using tab or a mouse click, triggers a field
+ * validation
+ */
+ _onFieldEvent: function(event) {
+ var field = $(this);
+ var form = field.closest('form, .validationEngineContainer');
+ var options = form.data('jqv');
+ options.eventTrigger = "field";
+ // validate the current field
+ window.setTimeout(function() {
+ methods._validateField(field, options);
+ if (options.InvalidFields.length == 0 && options.onFieldSuccess) {
+ options.onFieldSuccess();
+ } else if (options.InvalidFields.length > 0 && options.onFieldFailure) {
+ options.onFieldFailure();
+ }
+ }, (event.data) ? event.data.delay : 0);
+
+ },
+ /**
+ * Called when the form is submited, shows prompts accordingly
+ *
+ * @param {jqObject}
+ * form
+ * @return false if form submission needs to be cancelled
+ */
+ _onSubmitEvent: function() {
+ var form = $(this);
+ var options = form.data('jqv');
+
+ //check if it is trigger from skipped button
+ if (form.data("jqv_submitButton")){
+ var submitButton = $("#" + form.data("jqv_submitButton"));
+ if (submitButton){
+ if (submitButton.length > 0){
+ if (submitButton.hasClass("validate-skip") || submitButton.attr("data-validation-engine-skip") == "true")
+ return true;
+ }
+ }
+ }
+
+ options.eventTrigger = "submit";
+
+ // validate each field
+ // (- skip field ajax validation, not necessary IF we will perform an ajax form validation)
+ var r=methods._validateFields(form);
+
+ if (r && options.ajaxFormValidation) {
+ methods._validateFormWithAjax(form, options);
+ // cancel form auto-submission - process with async call onAjaxFormComplete
+ return false;
+ }
+
+ if(options.onValidationComplete) {
+ // !! ensures that an undefined return is interpreted as return false but allows a onValidationComplete() to possibly return true and have form continue processing
+ return !!options.onValidationComplete(form, r);
+ }
+ return r;
+ },
+ /**
+ * Return true if the ajax field validations passed so far
+ * @param {Object} options
+ * @return true, is all ajax validation passed so far (remember ajax is async)
+ */
+ _checkAjaxStatus: function(options) {
+ var status = true;
+ $.each(options.ajaxValidCache, function(key, value) {
+ if (!value) {
+ status = false;
+ // break the each
+ return false;
+ }
+ });
+ return status;
+ },
+
+ /**
+ * Return true if the ajax field is validated
+ * @param {String} fieldid
+ * @param {Object} options
+ * @return true, if validation passed, false if false or doesn't exist
+ */
+ _checkAjaxFieldStatus: function(fieldid, options) {
+ return options.ajaxValidCache[fieldid] == true;
+ },
+ /**
+ * Validates form fields, shows prompts accordingly
+ *
+ * @param {jqObject}
+ * form
+ * @param {skipAjaxFieldValidation}
+ * boolean - when set to true, ajax field validation is skipped, typically used when the submit button is clicked
+ *
+ * @return true if form is valid, false if not, undefined if ajax form validation is done
+ */
+ _validateFields: function(form) {
+ var options = form.data('jqv');
+
+ // this variable is set to true if an error is found
+ var errorFound = false;
+
+ // Trigger hook, start validation
+ form.trigger("jqv.form.validating");
+ // first, evaluate status of non ajax fields
+ var first_err=null;
+ form.find('['+options.validateAttribute+'*=validate]').not(":disabled").each( function() {
+ var field = $(this);
+ var names = [];
+ if ($.inArray(field.attr('name'), names) < 0) {
+ errorFound |= methods._validateField(field, options);
+ if (errorFound && first_err==null)
+ if (field.is(":hidden") && options.prettySelect)
+ first_err = field = form.find("#" + options.usePrefix + methods._jqSelector(field.attr('id')) + options.useSuffix);
+ else {
+
+ //Check if we need to adjust what element to show the prompt on
+ //and and such scroll to instead
+ if(field.data('jqv-prompt-at') instanceof jQuery ){
+ field = field.data('jqv-prompt-at');
+ } else if(field.data('jqv-prompt-at')) {
+ field = $(field.data('jqv-prompt-at'));
+ }
+ first_err=field;
+ }
+ if (options.doNotShowAllErrosOnSubmit)
+ return false;
+ names.push(field.attr('name'));
+
+ //if option set, stop checking validation rules after one error is found
+ if(options.showOneMessage == true && errorFound){
+ return false;
+ }
+ }
+ });
+
+ // second, check to see if all ajax calls completed ok
+ // errorFound |= !methods._checkAjaxStatus(options);
+
+ // third, check status and scroll the container accordingly
+ form.trigger("jqv.form.result", [errorFound]);
+
+ if (errorFound) {
+ if (options.scroll) {
+ var destination=first_err.offset().top;
+ var fixleft = first_err.offset().left;
+
+ //prompt positioning adjustment support. Usage: positionType:Xshift,Yshift (for ex.: bottomLeft:+20 or bottomLeft:-20,+10)
+ var positionType=options.promptPosition;
+ if (typeof(positionType)=='string' && positionType.indexOf(":")!=-1)
+ positionType=positionType.substring(0,positionType.indexOf(":"));
+
+ if (positionType!="bottomRight" && positionType!="bottomLeft") {
+ var prompt_err= methods._getPrompt(first_err);
+ if (prompt_err) {
+ destination=prompt_err.offset().top;
+ }
+ }
+
+ // Offset the amount the page scrolls by an amount in px to accomodate fixed elements at top of page
+ if (options.scrollOffset) {
+ destination -= options.scrollOffset;
+ }
+
+ // get the position of the first error, there should be at least one, no need to check this
+ //var destination = form.find(".formError:not('.greenPopup'):first").offset().top;
+ if (options.isOverflown) {
+ var overflowDIV = $(options.overflownDIV);
+ if(!overflowDIV.length) return false;
+ var scrollContainerScroll = overflowDIV.scrollTop();
+ var scrollContainerPos = -parseInt(overflowDIV.offset().top);
+
+ destination += scrollContainerScroll + scrollContainerPos - 5;
+ var scrollContainer = $(options.overflownDIV + ":not(:animated)");
+
+ scrollContainer.animate({ scrollTop: destination }, 1100, function(){
+ if(options.focusFirstField) first_err.focus();
+ });
+
+ } else {
+ $("html, body").animate({
+ scrollTop: destination
+ }, 1100, function(){
+ if(options.focusFirstField) first_err.focus();
+ });
+ $("html, body").animate({scrollLeft: fixleft},1100)
+ }
+
+ } else if(options.focusFirstField)
+ first_err.focus();
+ return false;
+ }
+ return true;
+ },
+ /**
+ * This method is called to perform an ajax form validation.
+ * During this process all the (field, value) pairs are sent to the server which returns a list of invalid fields or true
+ *
+ * @param {jqObject} form
+ * @param {Map} options
+ */
+ _validateFormWithAjax: function(form, options) {
+
+ var data = form.serialize();
+ var type = (options.ajaxFormValidationMethod) ? options.ajaxFormValidationMethod : "GET";
+ var url = (options.ajaxFormValidationURL) ? options.ajaxFormValidationURL : form.attr("action");
+ var dataType = (options.dataType) ? options.dataType : "json";
+ $.ajax({
+ type: type,
+ url: url,
+ cache: false,
+ dataType: dataType,
+ data: data,
+ form: form,
+ methods: methods,
+ options: options,
+ beforeSend: function() {
+ return options.onBeforeAjaxFormValidation(form, options);
+ },
+ error: function(data, transport) {
+ if (options.onFailure) {
+ options.onFailure(data, transport);
+ } else {
+ methods._ajaxError(data, transport);
+ }
+ },
+ success: function(json) {
+ if ((dataType == "json") && (json !== true)) {
+ // getting to this case doesn't necessary means that the form is invalid
+ // the server may return green or closing prompt actions
+ // this flag helps figuring it out
+ var errorInForm=false;
+ for (var i = 0; i < json.length; i++) {
+ var value = json[i];
+
+ var errorFieldId = value[0];
+ var errorField = $($("#" + errorFieldId)[0]);
+
+ // make sure we found the element
+ if (errorField.length == 1) {
+
+ // promptText or selector
+ var msg = value[2];
+ // if the field is valid
+ if (value[1] == true) {
+
+ if (msg == "" || !msg){
+ // if for some reason, status==true and error="", just close the prompt
+ methods._closePrompt(errorField);
+ } else {
+ // the field is valid, but we are displaying a green prompt
+ if (options.allrules[msg]) {
+ var txt = options.allrules[msg].alertTextOk;
+ if (txt)
+ msg = txt;
+ }
+ if (options.showPrompts) methods._showPrompt(errorField, msg, "pass", false, options, true);
+ }
+ } else {
+ // the field is invalid, show the red error prompt
+ errorInForm|=true;
+ if (options.allrules[msg]) {
+ var txt = options.allrules[msg].alertText;
+ if (txt)
+ msg = txt;
+ }
+ if(options.showPrompts) methods._showPrompt(errorField, msg, "", false, options, true);
+ }
+ }
+ }
+ options.onAjaxFormComplete(!errorInForm, form, json, options);
+ } else
+ options.onAjaxFormComplete(true, form, json, options);
+
+ }
+ });
+
+ },
+ /**
+ * Validates field, shows prompts accordingly
+ *
+ * @param {jqObject}
+ * field
+ * @param {Array[String]}
+ * field's validation rules
+ * @param {Map}
+ * user options
+ * @return false if field is valid (It is inversed for *fields*, it return false on validate and true on errors.)
+ */
+ _validateField: function(field, options, skipAjaxValidation) {
+ if (!field.attr("id")) {
+ field.attr("id", "form-validation-field-" + $.validationEngine.fieldIdCounter);
+ ++$.validationEngine.fieldIdCounter;
+ }
+
+ if (!options.validateNonVisibleFields && (field.is(":hidden") && !options.prettySelect || field.parent().is(":hidden")))
+ return false;
+
+ var rulesParsing = field.attr(options.validateAttribute);
+ var getRules = /validate\[(.*)\]/.exec(rulesParsing);
+
+ if (!getRules)
+ return false;
+ var str = getRules[1];
+ var rules = str.split(/\[|,|\]/);
+
+ // true if we ran the ajax validation, tells the logic to stop messing with prompts
+ var isAjaxValidator = false;
+ var fieldName = field.attr("name");
+ var promptText = "";
+ var promptType = "";
+ var required = false;
+ var limitErrors = false;
+ options.isError = false;
+ options.showArrow = true;
+
+ // If the programmer wants to limit the amount of error messages per field,
+ if (options.maxErrorsPerField > 0) {
+ limitErrors = true;
+ }
+
+ var form = $(field.closest("form, .validationEngineContainer"));
+ // Fix for adding spaces in the rules
+ for (var i = 0; i < rules.length; i++) {
+ rules[i] = rules[i].replace(" ", "");
+ // Remove any parsing errors
+ if (rules[i] === '') {
+ delete rules[i];
+ }
+ }
+
+ for (var i = 0, field_errors = 0; i < rules.length; i++) {
+
+ // If we are limiting errors, and have hit the max, break
+ if (limitErrors && field_errors >= options.maxErrorsPerField) {
+ // If we haven't hit a required yet, check to see if there is one in the validation rules for this
+ // field and that it's index is greater or equal to our current index
+ if (!required) {
+ var have_required = $.inArray('required', rules);
+ required = (have_required != -1 && have_required >= i);
+ }
+ break;
+ }
+
+
+ var errorMsg = undefined;
+ switch (rules[i]) {
+
+ case "required":
+ required = true;
+ errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._required);
+ break;
+ case "custom":
+ errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._custom);
+ break;
+ case "groupRequired":
+ // Check is its the first of group, if not, reload validation with first field
+ // AND continue normal validation on present field
+ var classGroup = "["+options.validateAttribute+"*=" +rules[i + 1] +"]";
+ var firstOfGroup = form.find(classGroup).eq(0);
+ if(firstOfGroup[0] != field[0]){
+
+ methods._validateField(firstOfGroup, options, skipAjaxValidation);
+ options.showArrow = true;
+
+ }
+ errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._groupRequired);
+ if(errorMsg) required = true;
+ options.showArrow = false;
+ break;
+ case "ajax":
+ // AJAX defaults to returning it's loading message
+ errorMsg = methods._ajax(field, rules, i, options);
+ if (errorMsg) {
+ promptType = "load";
+ }
+ break;
+ case "minSize":
+ errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._minSize);
+ break;
+ case "maxSize":
+ errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._maxSize);
+ break;
+ case "min":
+ errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._min);
+ break;
+ case "max":
+ errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._max);
+ break;
+ case "past":
+ errorMsg = methods._getErrorMessage(form, field,rules[i], rules, i, options, methods._past);
+ break;
+ case "future":
+ errorMsg = methods._getErrorMessage(form, field,rules[i], rules, i, options, methods._future);
+ break;
+ case "dateRange":
+ var classGroup = "["+options.validateAttribute+"*=" + rules[i + 1] + "]";
+ options.firstOfGroup = form.find(classGroup).eq(0);
+ options.secondOfGroup = form.find(classGroup).eq(1);
+
+ //if one entry out of the pair has value then proceed to run through validation
+ if (options.firstOfGroup[0].value || options.secondOfGroup[0].value) {
+ errorMsg = methods._getErrorMessage(form, field,rules[i], rules, i, options, methods._dateRange);
+ }
+ if (errorMsg) required = true;
+ options.showArrow = false;
+ break;
+
+ case "dateTimeRange":
+ var classGroup = "["+options.validateAttribute+"*=" + rules[i + 1] + "]";
+ options.firstOfGroup = form.find(classGroup).eq(0);
+ options.secondOfGroup = form.find(classGroup).eq(1);
+
+ //if one entry out of the pair has value then proceed to run through validation
+ if (options.firstOfGroup[0].value || options.secondOfGroup[0].value) {
+ errorMsg = methods._getErrorMessage(form, field,rules[i], rules, i, options, methods._dateTimeRange);
+ }
+ if (errorMsg) required = true;
+ options.showArrow = false;
+ break;
+ case "maxCheckbox":
+ field = $(form.find("input[name='" + fieldName + "']"));
+ errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._maxCheckbox);
+ break;
+ case "minCheckbox":
+ field = $(form.find("input[name='" + fieldName + "']"));
+ errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._minCheckbox);
+ break;
+ case "equals":
+ errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._equals);
+ break;
+ case "funcCall":
+ errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._funcCall);
+ break;
+ case "creditCard":
+ errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._creditCard);
+ break;
+ case "condRequired":
+ errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._condRequired);
+ if (errorMsg !== undefined) {
+ required = true;
+ }
+ break;
+
+ default:
+ }
+
+ var end_validation = false;
+
+ // If we were passed back an message object, check what the status was to determine what to do
+ if (typeof errorMsg == "object") {
+ switch (errorMsg.status) {
+ case "_break":
+ end_validation = true;
+ break;
+ // If we have an error message, set errorMsg to the error message
+ case "_error":
+ errorMsg = errorMsg.message;
+ break;
+ // If we want to throw an error, but not show a prompt, return early with true
+ case "_error_no_prompt":
+ return true;
+ break;
+ // Anything else we continue on
+ default:
+ break;
+ }
+ }
+
+ // If it has been specified that validation should end now, break
+ if (end_validation) {
+ break;
+ }
+
+ // If we have a string, that means that we have an error, so add it to the error message.
+ if (typeof errorMsg == 'string') {
+ promptText += errorMsg + "<br/>";
+ options.isError = true;
+ field_errors++;
+ }
+ }
+ // If the rules required is not added, an empty field is not validated
+ //the 3rd condition is added so that even empty password fields should be equal
+ //otherwise if one is filled and another left empty, the "equal" condition would fail
+ //which does not make any sense
+ if(!required && !(field.val()) && field.val().length < 1 && rules.indexOf("equals") < 0) options.isError = false;
+
+ // Hack for radio/checkbox group button, the validation go into the
+ // first radio/checkbox of the group
+ var fieldType = field.prop("type");
+ var positionType=field.data("promptPosition") || options.promptPosition;
+
+ if ((fieldType == "radio" || fieldType == "checkbox") && form.find("input[name='" + fieldName + "']").size() > 1) {
+ if(positionType === 'inline') {
+ field = $(form.find("input[name='" + fieldName + "'][type!=hidden]:last"));
+ } else {
+ field = $(form.find("input[name='" + fieldName + "'][type!=hidden]:first"));
+ }
+ options.showArrow = false;
+ }
+
+ if(field.is(":hidden") && options.prettySelect) {
+ field = form.find("#" + options.usePrefix + methods._jqSelector(field.attr('id')) + options.useSuffix);
+ }
+
+ if (options.isError && options.showPrompts){
+ methods._showPrompt(field, promptText, promptType, false, options);
+ }else{
+ if (!isAjaxValidator) methods._closePrompt(field);
+ }
+
+ if (!isAjaxValidator) {
+ field.trigger("jqv.field.result", [field, options.isError, promptText]);
+ }
+
+ /* Record error */
+ var errindex = $.inArray(field[0], options.InvalidFields);
+ if (errindex == -1) {
+ if (options.isError)
+ options.InvalidFields.push(field[0]);
+ } else if (!options.isError) {
+ options.InvalidFields.splice(errindex, 1);
+ }
+
+ methods._handleStatusCssClasses(field, options);
+
+ /* run callback function for each field */
+ if (options.isError && options.onFieldFailure)
+ options.onFieldFailure(field);
+
+ if (!options.isError && options.onFieldSuccess)
+ options.onFieldSuccess(field);
+
+ return options.isError;
+ },
+ /**
+ * Handling css classes of fields indicating result of validation
+ *
+ * @param {jqObject}
+ * field
+ * @param {Array[String]}
+ * field's validation rules
+ * @private
+ */
+ _handleStatusCssClasses: function(field, options) {
+ /* remove all classes */
+ if(options.addSuccessCssClassToField)
+ field.removeClass(options.addSuccessCssClassToField);
+
+ if(options.addFailureCssClassToField)
+ field.removeClass(options.addFailureCssClassToField);
+
+ /* Add classes */
+ if (options.addSuccessCssClassToField && !options.isError)
+ field.addClass(options.addSuccessCssClassToField);
+
+ if (options.addFailureCssClassToField && options.isError)
+ field.addClass(options.addFailureCssClassToField);
+ },
+
+ /********************
+ * _getErrorMessage
+ *
+ * @param form
+ * @param field
+ * @param rule
+ * @param rules
+ * @param i
+ * @param options
+ * @param originalValidationMethod
+ * @return {*}
+ * @private
+ */
+ _getErrorMessage:function (form, field, rule, rules, i, options, originalValidationMethod) {
+ // If we are using the custon validation type, build the index for the rule.
+ // Otherwise if we are doing a function call, make the call and return the object
+ // that is passed back.
+ var rule_index = jQuery.inArray(rule, rules);
+ if (rule === "custom" || rule === "funcCall") {
+ var custom_validation_type = rules[rule_index + 1];
+ rule = rule + "[" + custom_validation_type + "]";
+ // Delete the rule from the rules array so that it doesn't try to call the
+ // same rule over again
+ delete(rules[rule_index]);
+ }
+ // Change the rule to the composite rule, if it was different from the original
+ var alteredRule = rule;
+
+
+ var element_classes = (field.attr("data-validation-engine")) ? field.attr("data-validation-engine") : field.attr("class");
+ var element_classes_array = element_classes.split(" ");
+
+ // Call the original validation method. If we are dealing with dates or checkboxes, also pass the form
+ var errorMsg;
+ if (rule == "future" || rule == "past" || rule == "maxCheckbox" || rule == "minCheckbox") {
+ errorMsg = originalValidationMethod(form, field, rules, i, options);
+ } else {
+ errorMsg = originalValidationMethod(field, rules, i, options);
+ }
+
+ // If the original validation method returned an error and we have a custom error message,
+ // return the custom message instead. Otherwise return the original error message.
+ if (errorMsg != undefined) {
+ var custom_message = methods._getCustomErrorMessage($(field), element_classes_array, alteredRule, options);
+ if (custom_message) errorMsg = custom_message;
+ }
+ return errorMsg;
+
+ },
+ _getCustomErrorMessage:function (field, classes, rule, options) {
+ var custom_message = false;
+ var validityProp = /^custom\[.*\]$/.test(rule) ? methods._validityProp["custom"] : methods._validityProp[rule];
+ // If there is a validityProp for this rule, check to see if the field has an attribute for it
+ if (validityProp != undefined) {
+ custom_message = field.attr("data-errormessage-"+validityProp);
+ // If there was an error message for it, return the message
+ if (custom_message != undefined)
+ return custom_message;
+ }
+ custom_message = field.attr("data-errormessage");
+ // If there is an inline custom error message, return it
+ if (custom_message != undefined)
+ return custom_message;
+ var id = '#' + field.attr("id");
+ // If we have custom messages for the element's id, get the message for the rule from the id.
+ // Otherwise, if we have custom messages for the element's classes, use the first class message we find instead.
+ if (typeof options.custom_error_messages[id] != "undefined" &&
+ typeof options.custom_error_messages[id][rule] != "undefined" ) {
+ custom_message = options.custom_error_messages[id][rule]['message'];
+ } else if (classes.length > 0) {
+ for (var i = 0; i < classes.length && classes.length > 0; i++) {
+ var element_class = "." + classes[i];
+ if (typeof options.custom_error_messages[element_class] != "undefined" &&
+ typeof options.custom_error_messages[element_class][rule] != "undefined") {
+ custom_message = options.custom_error_messages[element_class][rule]['message'];
+ break;
+ }
+ }
+ }
+ if (!custom_message &&
+ typeof options.custom_error_messages[rule] != "undefined" &&
+ typeof options.custom_error_messages[rule]['message'] != "undefined"){
+ custom_message = options.custom_error_messages[rule]['message'];
+ }
+ return custom_message;
+ },
+ _validityProp: {
+ "required": "value-missing",
+ "custom": "custom-error",
+ "groupRequired": "value-missing",
+ "ajax": "custom-error",
+ "minSize": "range-underflow",
+ "maxSize": "range-overflow",
+ "min": "range-underflow",
+ "max": "range-overflow",
+ "past": "type-mismatch",
+ "future": "type-mismatch",
+ "dateRange": "type-mismatch",
+ "dateTimeRange": "type-mismatch",
+ "maxCheckbox": "range-overflow",
+ "minCheckbox": "range-underflow",
+ "equals": "pattern-mismatch",
+ "funcCall": "custom-error",
+ "creditCard": "pattern-mismatch",
+ "condRequired": "value-missing"
+ },
+ /**
+ * Required validation
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @param {bool} condRequired flag when method is used for internal purpose in condRequired check
+ * @return an error string if validation failed
+ */
+ _required: function(field, rules, i, options, condRequired) {
+ switch (field.prop("type")) {
+ case "text":
+ case "password":
+ case "textarea":
+ case "file":
+ case "select-one":
+ case "select-multiple":
+ default:
+ var field_val = $.trim( field.val() );
+ var dv_placeholder = $.trim( field.attr("data-validation-placeholder") );
+ var placeholder = $.trim( field.attr("placeholder") );
+ if (
+ ( !field_val )
+ || ( dv_placeholder && field_val == dv_placeholder )
+ || ( placeholder && field_val == placeholder )
+ ) {
+ return options.allrules[rules[i]].alertText;
+ }
+ break;
+ case "radio":
+ case "checkbox":
+ // new validation style to only check dependent field
+ if (condRequired) {
+ if (!field.attr('checked')) {
+ return options.allrules[rules[i]].alertTextCheckboxMultiple;
+ }
+ break;
+ }
+ // old validation style
+ var form = field.closest("form, .validationEngineContainer");
+ var name = field.attr("name");
+ if (form.find("input[name='" + name + "']:checked").size() == 0) {
+ if (form.find("input[name='" + name + "']:visible").size() == 1)
+ return options.allrules[rules[i]].alertTextCheckboxe;
+ else
+ return options.allrules[rules[i]].alertTextCheckboxMultiple;
+ }
+ break;
+ }
+ },
+ /**
+ * Validate that 1 from the group field is required
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _groupRequired: function(field, rules, i, options) {
+ var classGroup = "["+options.validateAttribute+"*=" +rules[i + 1] +"]";
+ var isValid = false;
+ // Check all fields from the group
+ field.closest("form, .validationEngineContainer").find(classGroup).each(function(){
+ if(!methods._required($(this), rules, i, options)){
+ isValid = true;
+ return false;
+ }
+ });
+
+ if(!isValid) {
+ return options.allrules[rules[i]].alertText;
+ }
+ },
+ /**
+ * Validate rules
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _custom: function(field, rules, i, options) {
+ var customRule = rules[i + 1];
+ var rule = options.allrules[customRule];
+ var fn;
+ if(!rule) {
+ alert("jqv:custom rule not found - "+customRule);
+ return;
+ }
+
+ if(rule["regex"]) {
+ var ex=rule.regex;
+ if(!ex) {
+ alert("jqv:custom regex not found - "+customRule);
+ return;
+ }
+ var pattern = new RegExp(ex);
+
+ if (!pattern.test(field.val())) return options.allrules[customRule].alertText;
+
+ } else if(rule["func"]) {
+ fn = rule["func"];
+
+ if (typeof(fn) !== "function") {
+ alert("jqv:custom parameter 'function' is no function - "+customRule);
+ return;
+ }
+
+ if (!fn(field, rules, i, options))
+ return options.allrules[customRule].alertText;
+ } else {
+ alert("jqv:custom type not allowed "+customRule);
+ return;
+ }
+ },
+ /**
+ * Validate custom function outside of the engine scope
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _funcCall: function(field, rules, i, options) {
+ var functionName = rules[i + 1];
+ var fn;
+ if(functionName.indexOf('.') >-1)
+ {
+ var namespaces = functionName.split('.');
+ var scope = window;
+ while(namespaces.length)
+ {
+ scope = scope[namespaces.shift()];
+ }
+ fn = scope;
+ }
+ else
+ fn = window[functionName] || options.customFunctions[functionName];
+ if (typeof(fn) == 'function')
+ return fn(field, rules, i, options);
+
+ },
+ /**
+ * Field match
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _equals: function(field, rules, i, options) {
+ var equalsField = rules[i + 1];
+
+ if (field.val() != $("#" + equalsField).val())
+ return options.allrules.equals.alertText;
+ },
+ /**
+ * Check the maximum size (in characters)
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _maxSize: function(field, rules, i, options) {
+ var max = rules[i + 1];
+ var len = field.val().length;
+
+ if (len > max) {
+ var rule = options.allrules.maxSize;
+ return rule.alertText + max + rule.alertText2;
+ }
+ },
+ /**
+ * Check the minimum size (in characters)
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _minSize: function(field, rules, i, options) {
+ var min = rules[i + 1];
+ var len = field.val().length;
+
+ if (len < min) {
+ var rule = options.allrules.minSize;
+ return rule.alertText + min + rule.alertText2;
+ }
+ },
+ /**
+ * Check number minimum value
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _min: function(field, rules, i, options) {
+ var min = parseFloat(rules[i + 1]);
+ var len = parseFloat(field.val());
+
+ if (len < min) {
+ var rule = options.allrules.min;
+ if (rule.alertText2) return rule.alertText + min + rule.alertText2;
+ return rule.alertText + min;
+ }
+ },
+ /**
+ * Check number maximum value
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _max: function(field, rules, i, options) {
+ var max = parseFloat(rules[i + 1]);
+ var len = parseFloat(field.val());
+
+ if (len >max ) {
+ var rule = options.allrules.max;
+ if (rule.alertText2) return rule.alertText + max + rule.alertText2;
+ //orefalo: to review, also do the translations
+ return rule.alertText + max;
+ }
+ },
+ /**
+ * Checks date is in the past
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _past: function(form, field, rules, i, options) {
+
+ var p=rules[i + 1];
+ var fieldAlt = $(form.find("*[name='" + p.replace(/^#+/, '') + "']"));
+ var pdate;
+
+ if (p.toLowerCase() == "now") {
+ pdate = new Date();
+ } else if (undefined != fieldAlt.val()) {
+ if (fieldAlt.is(":disabled"))
+ return;
+ pdate = methods._parseDate(fieldAlt.val());
+ } else {
+ pdate = methods._parseDate(p);
+ }
+ var vdate = methods._parseDate(field.val());
+
+ if (vdate > pdate ) {
+ var rule = options.allrules.past;
+ if (rule.alertText2) return rule.alertText + methods._dateToString(pdate) + rule.alertText2;
+ return rule.alertText + methods._dateToString(pdate);
+ }
+ },
+ /**
+ * Checks date is in the future
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _future: function(form, field, rules, i, options) {
+
+ var p=rules[i + 1];
+ var fieldAlt = $(form.find("*[name='" + p.replace(/^#+/, '') + "']"));
+ var pdate;
+
+ if (p.toLowerCase() == "now") {
+ pdate = new Date();
+ } else if (undefined != fieldAlt.val()) {
+ if (fieldAlt.is(":disabled"))
+ return;
+ pdate = methods._parseDate(fieldAlt.val());
+ } else {
+ pdate = methods._parseDate(p);
+ }
+ var vdate = methods._parseDate(field.val());
+
+ if (vdate < pdate ) {
+ var rule = options.allrules.future;
+ if (rule.alertText2)
+ return rule.alertText + methods._dateToString(pdate) + rule.alertText2;
+ return rule.alertText + methods._dateToString(pdate);
+ }
+ },
+ /**
+ * Checks if valid date
+ *
+ * @param {string} date string
+ * @return a bool based on determination of valid date
+ */
+ _isDate: function (value) {
+ var dateRegEx = new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/);
+ return dateRegEx.test(value);
+ },
+ /**
+ * Checks if valid date time
+ *
+ * @param {string} date string
+ * @return a bool based on determination of valid date time
+ */
+ _isDateTime: function (value){
+ var dateTimeRegEx = new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/);
+ return dateTimeRegEx.test(value);
+ },
+ //Checks if the start date is before the end date
+ //returns true if end is later than start
+ _dateCompare: function (start, end) {
+ return (new Date(start.toString()) < new Date(end.toString()));
+ },
+ /**
+ * Checks date range
+ *
+ * @param {jqObject} first field name
+ * @param {jqObject} second field name
+ * @return an error string if validation failed
+ */
+ _dateRange: function (field, rules, i, options) {
+ //are not both populated
+ if ((!options.firstOfGroup[0].value && options.secondOfGroup[0].value) || (options.firstOfGroup[0].value && !options.secondOfGroup[0].value)) {
+ return options.allrules[rules[i]].alertText + options.allrules[rules[i]].alertText2;
+ }
+
+ //are not both dates
+ if (!methods._isDate(options.firstOfGroup[0].value) || !methods._isDate(options.secondOfGroup[0].value)) {
+ return options.allrules[rules[i]].alertText + options.allrules[rules[i]].alertText2;
+ }
+
+ //are both dates but range is off
+ if (!methods._dateCompare(options.firstOfGroup[0].value, options.secondOfGroup[0].value)) {
+ return options.allrules[rules[i]].alertText + options.allrules[rules[i]].alertText2;
+ }
+ },
+ /**
+ * Checks date time range
+ *
+ * @param {jqObject} first field name
+ * @param {jqObject} second field name
+ * @return an error string if validation failed
+ */
+ _dateTimeRange: function (field, rules, i, options) {
+ //are not both populated
+ if ((!options.firstOfGroup[0].value && options.secondOfGroup[0].value) || (options.firstOfGroup[0].value && !options.secondOfGroup[0].value)) {
+ return options.allrules[rules[i]].alertText + options.allrules[rules[i]].alertText2;
+ }
+ //are not both dates
+ if (!methods._isDateTime(options.firstOfGroup[0].value) || !methods._isDateTime(options.secondOfGroup[0].value)) {
+ return options.allrules[rules[i]].alertText + options.allrules[rules[i]].alertText2;
+ }
+ //are both dates but range is off
+ if (!methods._dateCompare(options.firstOfGroup[0].value, options.secondOfGroup[0].value)) {
+ return options.allrules[rules[i]].alertText + options.allrules[rules[i]].alertText2;
+ }
+ },
+ /**
+ * Max number of checkbox selected
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _maxCheckbox: function(form, field, rules, i, options) {
+
+ var nbCheck = rules[i + 1];
+ var groupname = field.attr("name");
+ var groupSize = form.find("input[name='" + groupname + "']:checked").size();
+ if (groupSize > nbCheck) {
+ options.showArrow = false;
+ if (options.allrules.maxCheckbox.alertText2)
+ return options.allrules.maxCheckbox.alertText + " " + nbCheck + " " + options.allrules.maxCheckbox.alertText2;
+ return options.allrules.maxCheckbox.alertText;
+ }
+ },
+ /**
+ * Min number of checkbox selected
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _minCheckbox: function(form, field, rules, i, options) {
+
+ var nbCheck = rules[i + 1];
+ var groupname = field.attr("name");
+ var groupSize = form.find("input[name='" + groupname + "']:checked").size();
+ if (groupSize < nbCheck) {
+ options.showArrow = false;
+ return options.allrules.minCheckbox.alertText + " " + nbCheck + " " + options.allrules.minCheckbox.alertText2;
+ }
+ },
+ /**
+ * Checks that it is a valid credit card number according to the
+ * Luhn checksum algorithm.
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _creditCard: function(field, rules, i, options) {
+ //spaces and dashes may be valid characters, but must be stripped to calculate the checksum.
+ var valid = false, cardNumber = field.val().replace(/ +/g, '').replace(/-+/g, '');
+
+ var numDigits = cardNumber.length;
+ if (numDigits >= 14 && numDigits <= 16 && parseInt(cardNumber) > 0) {
+
+ var sum = 0, i = numDigits - 1, pos = 1, digit, luhn = new String();
+ do {
+ digit = parseInt(cardNumber.charAt(i));
+ luhn += (pos++ % 2 == 0) ? digit * 2 : digit;
+ } while (--i >= 0)
+
+ for (i = 0; i < luhn.length; i++) {
+ sum += parseInt(luhn.charAt(i));
+ }
+ valid = sum % 10 == 0;
+ }
+ if (!valid) return options.allrules.creditCard.alertText;
+ },
+ /**
+ * Ajax field validation
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return nothing! the ajax validator handles the prompts itself
+ */
+ _ajax: function(field, rules, i, options) {
+
+ var errorSelector = rules[i + 1];
+ var rule = options.allrules[errorSelector];
+ var extraData = rule.extraData;
+ var extraDataDynamic = rule.extraDataDynamic;
+ var data = {
+ "fieldId" : field.attr("id"),
+ "fieldValue" : field.val()
+ };
+
+ if (typeof extraData === "object") {
+ $.extend(data, extraData);
+ } else if (typeof extraData === "string") {
+ var tempData = extraData.split("&");
+ for(var i = 0; i < tempData.length; i++) {
+ var values = tempData[i].split("=");
+ if (values[0] && values[0]) {
+ data[values[0]] = values[1];
+ }
+ }
+ }
+
+ if (extraDataDynamic) {
+ var tmpData = [];
+ var domIds = String(extraDataDynamic).split(",");
+ for (var i = 0; i < domIds.length; i++) {
+ var id = domIds[i];
+ if ($(id).length) {
+ var inputValue = field.closest("form, .validationEngineContainer").find(id).val();
+ var keyValue = id.replace('#', '') + '=' + escape(inputValue);
+ data[id.replace('#', '')] = inputValue;
+ }
+ }
+ }
+
+ // If a field change event triggered this we want to clear the cache for this ID
+ if (options.eventTrigger == "field") {
+ delete(options.ajaxValidCache[field.attr("id")]);
+ }
+
+ // If there is an error or if the the field is already validated, do not re-execute AJAX
+ if (!options.isError && !methods._checkAjaxFieldStatus(field.attr("id"), options)) {
+ $.ajax({
+ type: options.ajaxFormValidationMethod,
+ url: rule.url,
+ cache: false,
+ dataType: "json",
+ data: data,
+ field: field,
+ rule: rule,
+ methods: methods,
+ options: options,
+ beforeSend: function() {},
+ error: function(data, transport) {
+ if (options.onFailure) {
+ options.onFailure(data, transport);
+ } else {
+ methods._ajaxError(data, transport);
+ }
+ },
+ success: function(json) {
+
+ // asynchronously called on success, data is the json answer from the server
+ var errorFieldId = json[0];
+ //var errorField = $($("#" + errorFieldId)[0]);
+ var errorField = $("#"+ errorFieldId).eq(0);
+
+ // make sure we found the element
+ if (errorField.length == 1) {
+ var status = json[1];
+ // read the optional msg from the server
+ var msg = json[2];
+ if (!status) {
+ // Houston we got a problem - display an red prompt
+ options.ajaxValidCache[errorFieldId] = false;
+ options.isError = true;
+
+ // resolve the msg prompt
+ if(msg) {
+ if (options.allrules[msg]) {
+ var txt = options.allrules[msg].alertText;
+ if (txt) {
+ msg = txt;
+ }
+ }
+ }
+ else
+ msg = rule.alertText;
+
+ if (options.showPrompts) methods._showPrompt(errorField, msg, "", true, options);
+ } else {
+ options.ajaxValidCache[errorFieldId] = true;
+
+ // resolves the msg prompt
+ if(msg) {
+ if (options.allrules[msg]) {
+ var txt = options.allrules[msg].alertTextOk;
+ if (txt) {
+ msg = txt;
+ }
+ }
+ }
+ else
+ msg = rule.alertTextOk;
+
+ if (options.showPrompts) {
+ // see if we should display a green prompt
+ if (msg)
+ methods._showPrompt(errorField, msg, "pass", true, options);
+ else
+ methods._closePrompt(errorField);
+ }
+
+ // If a submit form triggered this, we want to re-submit the form
+ if (options.eventTrigger == "submit")
+ field.closest("form").submit();
+ }
+ }
+ errorField.trigger("jqv.field.result", [errorField, options.isError, msg]);
+ }
+ });
+
+ return rule.alertTextLoad;
+ }
+ },
+ /**
+ * Common method to handle ajax errors
+ *
+ * @param {Object} data
+ * @param {Object} transport
+ */
+ _ajaxError: function(data, transport) {
+ if(data.status == 0 && transport == null)
+ alert("The page is not served from a server! ajax call failed");
+ else if(typeof console != "undefined")
+ console.log("Ajax error: " + data.status + " " + transport);
+ },
+ /**
+ * date -> string
+ *
+ * @param {Object} date
+ */
+ _dateToString: function(date) {
+ return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();
+ },
+ /**
+ * Parses an ISO date
+ * @param {String} d
+ */
+ _parseDate: function(d) {
+
+ var dateParts = d.split("-");
+ if(dateParts==d)
+ dateParts = d.split("/");
+ if(dateParts==d) {
+ dateParts = d.split(".");
+ return new Date(dateParts[2], (dateParts[1] - 1), dateParts[0]);
+ }
+ return new Date(dateParts[0], (dateParts[1] - 1) ,dateParts[2]);
+ },
+ /**
+ * Builds or updates a prompt with the given information
+ *
+ * @param {jqObject} field
+ * @param {String} promptText html text to display type
+ * @param {String} type the type of bubble: 'pass' (green), 'load' (black) anything else (red)
+ * @param {boolean} ajaxed - use to mark fields than being validated with ajax
+ * @param {Map} options user options
+ */
+ _showPrompt: function(field, promptText, type, ajaxed, options, ajaxform) {
+ //Check if we need to adjust what element to show the prompt on
+ if(field.data('jqv-prompt-at') instanceof jQuery ){
+ field = field.data('jqv-prompt-at');
+ } else if(field.data('jqv-prompt-at')) {
+ field = $(field.data('jqv-prompt-at'));
+ }
+
+ var prompt = methods._getPrompt(field);
+ // The ajax submit errors are not see has an error in the form,
+ // When the form errors are returned, the engine see 2 bubbles, but those are ebing closed by the engine at the same time
+ // Because no error was found befor submitting
+ if(ajaxform) prompt = false;
+ // Check that there is indded text
+ if($.trim(promptText)){
+ if (prompt)
+ methods._updatePrompt(field, prompt, promptText, type, ajaxed, options);
+ else
+ methods._buildPrompt(field, promptText, type, ajaxed, options);
+ }
+ },
+ /**
+ * Builds and shades a prompt for the given field.
+ *
+ * @param {jqObject} field
+ * @param {String} promptText html text to display type
+ * @param {String} type the type of bubble: 'pass' (green), 'load' (black) anything else (red)
+ * @param {boolean} ajaxed - use to mark fields than being validated with ajax
+ * @param {Map} options user options
+ */
+ _buildPrompt: function(field, promptText, type, ajaxed, options) {
+
+ // create the prompt
+ var prompt = $('<div>');
+ prompt.addClass(methods._getClassName(field.attr("id")) + "formError");
+ // add a class name to identify the parent form of the prompt
+ prompt.addClass("parentForm"+methods._getClassName(field.closest('form, .validationEngineContainer').attr("id")));
+ prompt.addClass("formError");
+
+ switch (type) {
+ case "pass":
+ prompt.addClass("greenPopup");
+ break;
+ case "load":
+ prompt.addClass("blackPopup");
+ break;
+ default:
+ /* it has error */
+ //alert("unknown popup type:"+type);
+ }
+ if (ajaxed)
+ prompt.addClass("ajaxed");
+
+ // create the prompt content
+ var promptContent = $('<div>').addClass("formErrorContent").html(promptText).appendTo(prompt);
+
+ // determine position type
+ var positionType=field.data("promptPosition") || options.promptPosition;
+
+ // create the css arrow pointing at the field
+ // note that there is no triangle on max-checkbox and radio
+ if (options.showArrow) {
+ var arrow = $('<div>').addClass("formErrorArrow");
+
+ //prompt positioning adjustment support. Usage: positionType:Xshift,Yshift (for ex.: bottomLeft:+20 or bottomLeft:-20,+10)
+ if (typeof(positionType)=='string')
+ {
+ var pos=positionType.indexOf(":");
+ if(pos!=-1)
+ positionType=positionType.substring(0,pos);
+ }
+
+ switch (positionType) {
+ case "bottomLeft":
+ case "bottomRight":
+ prompt.find(".formErrorContent").before(arrow);
+ arrow.addClass("formErrorArrowBottom").html('<div class="line1"><!-- --></div><div class="line2"><!-- --></div><div class="line3"><!-- --></div><div class="line4"><!-- --></div><div class="line5"><!-- --></div><div class="line6"><!-- --></div><div class="line7"><!-- --></div><div class="line8"><!-- --></div><div class="line9"><!-- --></div><div class="line10"><!-- --></div>');
+ break;
+ case "topLeft":
+ case "topRight":
+ arrow.html('<div class="line10"><!-- --></div><div class="line9"><!-- --></div><div class="line8"><!-- --></div><div class="line7"><!-- --></div><div class="line6"><!-- --></div><div class="line5"><!-- --></div><div class="line4"><!-- --></div><div class="line3"><!-- --></div><div class="line2"><!-- --></div><div class="line1"><!-- --></div>');
+ prompt.append(arrow);
+ break;
+ }
+ }
+ // Add custom prompt class
+ if (options.addPromptClass)
+ prompt.addClass(options.addPromptClass);
+
+ // Add custom prompt class defined in element
+ var requiredOverride = field.attr('data-required-class');
+ if(requiredOverride !== undefined) {
+ prompt.addClass(requiredOverride);
+ } else {
+ if(options.prettySelect) {
+ if($('#' + field.attr('id')).next().is('select')) {
+ var prettyOverrideClass = $('#' + field.attr('id').substr(options.usePrefix.length).substring(options.useSuffix.length)).attr('data-required-class');
+ if(prettyOverrideClass !== undefined) {
+ prompt.addClass(prettyOverrideClass);
+ }
+ }
+ }
+ }
+
+ prompt.css({
+ "opacity": 0
+ });
+ if(positionType === 'inline') {
+ prompt.addClass("inline");
+ if(typeof field.attr('data-prompt-target') !== 'undefined' && $('#'+field.attr('data-prompt-target')).length > 0) {
+ prompt.appendTo($('#'+field.attr('data-prompt-target')));
+ } else {
+ field.after(prompt);
+ }
+ } else {
+ field.before(prompt);
+ }
+
+ var pos = methods._calculatePosition(field, prompt, options);
+ prompt.css({
+ 'position': positionType === 'inline' ? 'relative' : 'absolute',
+ "top": pos.callerTopPosition,
+ "left": pos.callerleftPosition,
+ "marginTop": pos.marginTopSize,
+ "opacity": 0
+ }).data("callerField", field);
+
+
+ if (options.autoHidePrompt) {
+ setTimeout(function(){
+ prompt.animate({
+ "opacity": 0
+ },function(){
+ prompt.closest('.formErrorOuter').remove();
+ prompt.remove();
+ });
+ }, options.autoHideDelay);
+ }
+ return prompt.animate({
+ "opacity": 0.87
+ });
+ },
+ /**
+ * Updates the prompt text field - the field for which the prompt
+ * @param {jqObject} field
+ * @param {String} promptText html text to display type
+ * @param {String} type the type of bubble: 'pass' (green), 'load' (black) anything else (red)
+ * @param {boolean} ajaxed - use to mark fields than being validated with ajax
+ * @param {Map} options user options
+ */
+ _updatePrompt: function(field, prompt, promptText, type, ajaxed, options, noAnimation) {
+
+ if (prompt) {
+ if (typeof type !== "undefined") {
+ if (type == "pass")
+ prompt.addClass("greenPopup");
+ else
+ prompt.removeClass("greenPopup");
+
+ if (type == "load")
+ prompt.addClass("blackPopup");
+ else
+ prompt.removeClass("blackPopup");
+ }
+ if (ajaxed)
+ prompt.addClass("ajaxed");
+ else
+ prompt.removeClass("ajaxed");
+
+ prompt.find(".formErrorContent").html(promptText);
+
+ var pos = methods._calculatePosition(field, prompt, options);
+ var css = {"top": pos.callerTopPosition,
+ "left": pos.callerleftPosition,
+ "marginTop": pos.marginTopSize};
+
+ if (noAnimation)
+ prompt.css(css);
+ else
+ prompt.animate(css);
+ }
+ },
+ /**
+ * Closes the prompt associated with the given field
+ *
+ * @param {jqObject}
+ * field
+ */
+ _closePrompt: function(field) {
+ var prompt = methods._getPrompt(field);
+ if (prompt)
+ prompt.fadeTo("fast", 0, function() {
+ prompt.parent('.formErrorOuter').remove();
+ prompt.remove();
+ });
+ },
+ closePrompt: function(field) {
+ return methods._closePrompt(field);
+ },
+ /**
+ * Returns the error prompt matching the field if any
+ *
+ * @param {jqObject}
+ * field
+ * @return undefined or the error prompt (jqObject)
+ */
+ _getPrompt: function(field) {
+ var formId = $(field).closest('form, .validationEngineContainer').attr('id');
+ var className = methods._getClassName(field.attr("id")) + "formError";
+ var match = $("." + methods._escapeExpression(className) + '.parentForm' + methods._getClassName(formId))[0];
+ if (match)
+ return $(match);
+ },
+ /**
+ * Returns the escapade classname
+ *
+ * @param {selector}
+ * className
+ */
+ _escapeExpression: function (selector) {
+ return selector.replace(/([#;&,\.\+\*\~':"\!\^$\[\]\(\)=>\|])/g, "\\$1");
+ },
+ /**
+ * returns true if we are in a RTLed document
+ *
+ * @param {jqObject} field
+ */
+ isRTL: function(field)
+ {
+ var $document = $(document);
+ var $body = $('body');
+ var rtl =
+ (field && field.hasClass('rtl')) ||
+ (field && (field.attr('dir') || '').toLowerCase()==='rtl') ||
+ $document.hasClass('rtl') ||
+ ($document.attr('dir') || '').toLowerCase()==='rtl' ||
+ $body.hasClass('rtl') ||
+ ($body.attr('dir') || '').toLowerCase()==='rtl';
+ return Boolean(rtl);
+ },
+ /**
+ * Calculates prompt position
+ *
+ * @param {jqObject}
+ * field
+ * @param {jqObject}
+ * the prompt
+ * @param {Map}
+ * options
+ * @return positions
+ */
+ _calculatePosition: function (field, promptElmt, options) {
+
+ var promptTopPosition, promptleftPosition, marginTopSize;
+ var fieldWidth = field.width();
+ var fieldLeft = field.position().left;
+ var fieldTop = field.position().top;
+ var fieldHeight = field.height();
+ var promptHeight = promptElmt.height();
+
+
+ // is the form contained in an overflown container?
+ promptTopPosition = promptleftPosition = 0;
+ // compensation for the arrow
+ marginTopSize = -promptHeight;
+
+
+ //prompt positioning adjustment support
+ //now you can adjust prompt position
+ //usage: positionType:Xshift,Yshift
+ //for example:
+ // bottomLeft:+20 means bottomLeft position shifted by 20 pixels right horizontally
+ // topRight:20, -15 means topRight position shifted by 20 pixels to right and 15 pixels to top
+ //You can use +pixels, - pixels. If no sign is provided than + is default.
+ var positionType=field.data("promptPosition") || options.promptPosition;
+ var shift1="";
+ var shift2="";
+ var shiftX=0;
+ var shiftY=0;
+ if (typeof(positionType)=='string') {
+ //do we have any position adjustments ?
+ if (positionType.indexOf(":")!=-1) {
+ shift1=positionType.substring(positionType.indexOf(":")+1);
+ positionType=positionType.substring(0,positionType.indexOf(":"));
+
+ //if any advanced positioning will be needed (percents or something else) - parser should be added here
+ //for now we use simple parseInt()
+
+ //do we have second parameter?
+ if (shift1.indexOf(",") !=-1) {
+ shift2=shift1.substring(shift1.indexOf(",") +1);
+ shift1=shift1.substring(0,shift1.indexOf(","));
+ shiftY=parseInt(shift2);
+ if (isNaN(shiftY)) shiftY=0;
+ };
+
+ shiftX=parseInt(shift1);
+ if (isNaN(shift1)) shift1=0;
+
+ };
+ };
+
+
+ switch (positionType) {
+ default:
+ case "topRight":
+ promptleftPosition += fieldLeft + fieldWidth - 30;
+ promptTopPosition += fieldTop;
+ break;
+
+ case "topLeft":
+ promptTopPosition += fieldTop;
+ promptleftPosition += fieldLeft;
+ break;
+
+ case "centerRight":
+ promptTopPosition = fieldTop+4;
+ marginTopSize = 0;
+ promptleftPosition= fieldLeft + field.outerWidth(true)+5;
+ break;
+ case "centerLeft":
+ promptleftPosition = fieldLeft - (promptElmt.width() + 2);
+ promptTopPosition = fieldTop+4;
+ marginTopSize = 0;
+
+ break;
+
+ case "bottomLeft":
+ promptTopPosition = fieldTop + field.height() + 5;
+ marginTopSize = 0;
+ promptleftPosition = fieldLeft;
+ break;
+ case "bottomRight":
+ promptleftPosition = fieldLeft + fieldWidth - 30;
+ promptTopPosition = fieldTop + field.height() + 5;
+ marginTopSize = 0;
+ break;
+ case "inline":
+ promptleftPosition = 0;
+ promptTopPosition = 0;
+ marginTopSize = 0;
+ };
+
+
+
+ //apply adjusments if any
+ promptleftPosition += shiftX;
+ promptTopPosition += shiftY;
+
+ return {
+ "callerTopPosition": promptTopPosition + "px",
+ "callerleftPosition": promptleftPosition + "px",
+ "marginTopSize": marginTopSize + "px"
+ };
+ },
+ /**
+ * Saves the user options and variables in the form.data
+ *
+ * @param {jqObject}
+ * form - the form where the user option should be saved
+ * @param {Map}
+ * options - the user options
+ * @return the user options (extended from the defaults)
+ */
+ _saveOptions: function(form, options) {
+
+ // is there a language localisation ?
+ if ($.validationEngineLanguage)
+ var allRules = $.validationEngineLanguage.allRules;
+ else
+ $.error("jQuery.validationEngine rules are not loaded, plz add localization files to the page");
+ // --- Internals DO NOT TOUCH or OVERLOAD ---
+ // validation rules and i18
+ $.validationEngine.defaults.allrules = allRules;
+
+ var userOptions = $.extend(true,{},$.validationEngine.defaults,options);
+
+ form.data('jqv', userOptions);
+ return userOptions;
+ },
+
+ /**
+ * Removes forbidden characters from class name
+ * @param {String} className
+ */
+ _getClassName: function(className) {
+ if(className)
+ return className.replace(/:/g, "_").replace(/\./g, "_");
+ },
+ /**
+ * Escape special character for jQuery selector
+ * http://totaldev.com/content/escaping-characters-get-valid-jquery-id
+ * @param {String} selector
+ */
+ _jqSelector: function(str){
+ return str.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1');
+ },
+ /**
+ * Conditionally required field
+ *
+ * @param {jqObject} field
+ * @param {Array[String]} rules
+ * @param {int} i rules index
+ * @param {Map}
+ * user options
+ * @return an error string if validation failed
+ */
+ _condRequired: function(field, rules, i, options) {
+ var idx, dependingField;
+
+ for(idx = (i + 1); idx < rules.length; idx++) {
+ dependingField = jQuery("#" + rules[idx]).first();
+
+ /* Use _required for determining wether dependingField has a value.
+ * There is logic there for handling all field types, and default value; so we won't replicate that here
+ * Indicate this special use by setting the last parameter to true so we only validate the dependingField on chackboxes and radio buttons (#462)
+ */
+ if (dependingField.length && methods._required(dependingField, ["required"], 0, options, true) == undefined) {
+ /* We now know any of the depending fields has a value,
+ * so we can validate this field as per normal required code
+ */
+ return methods._required(field, ["required"], 0, options);
+ }
+ }
+ },
+
+ _submitButtonClick: function(event) {
+ var button = $(this);
+ var form = button.closest('form, .validationEngineContainer');
+ form.data("jqv_submitButton", button.attr("id"));
+ }
+ };
+
+ /**
+ * Plugin entry point.
+ * You may pass an action as a parameter or a list of options.
+ * if none, the init and attach methods are being called.
+ * Remember: if you pass options, the attached method is NOT called automatically
+ *
+ * @param {String}
+ * method (optional) action
+ */
+ $.fn.validationEngine = function(method) {
+
+ var form = $(this);
+ if(!form[0]) return form; // stop here if the form does not exist
+
+ if (typeof(method) == 'string' && method.charAt(0) != '_' && methods[method]) {
+
+ // make sure init is called once
+ if(method != "showPrompt" && method != "hide" && method != "hideAll")
+ methods.init.apply(form);
+
+ return methods[method].apply(form, Array.prototype.slice.call(arguments, 1));
+ } else if (typeof method == 'object' || !method) {
+
+ // default constructor with or without arguments
+ methods.init.apply(form, arguments);
+ return methods.attach.apply(form);
+ } else {
+ $.error('Method ' + method + ' does not exist in jQuery.validationEngine');
+ }
+ };
+
+
+
+ // LEAK GLOBAL OPTIONS
+ $.validationEngine= {fieldIdCounter: 0,defaults:{
+
+ // Name of the event triggering field validation
+ validationEventTrigger: "blur",
+ // Automatically scroll viewport to the first error
+ scroll: true,
+ // Focus on the first input
+ focusFirstField:true,
+ // Show prompts, set to false to disable prompts
+ showPrompts: true,
+ // Should we attempt to validate non-visible input fields contained in the form? (Useful in cases of tabbed containers, e.g. jQuery-UI tabs)
+ validateNonVisibleFields: false,
+ // Opening box position, possible locations are: topLeft,
+ // topRight, bottomLeft, centerRight, bottomRight, inline
+ // inline gets inserted after the validated field or into an element specified in data-prompt-target
+ promptPosition: "topRight",
+ bindMethod:"bind",
+ // internal, automatically set to true when it parse a _ajax rule
+ inlineAjax: false,
+ // if set to true, the form data is sent asynchronously via ajax to the form.action url (get)
+ ajaxFormValidation: false,
+ // The url to send the submit ajax validation (default to action)
+ ajaxFormValidationURL: false,
+ // HTTP method used for ajax validation
+ ajaxFormValidationMethod: 'get',
+ // Ajax form validation callback method: boolean onComplete(form, status, errors, options)
+ // retuns false if the form.submit event needs to be canceled.
+ onAjaxFormComplete: $.noop,
+ // called right before the ajax call, may return false to cancel
+ onBeforeAjaxFormValidation: $.noop,
+ // Stops form from submitting and execute function assiciated with it
+ onValidationComplete: false,
+
+ // Used when you have a form fields too close and the errors messages are on top of other disturbing viewing messages
+ doNotShowAllErrosOnSubmit: false,
+ // Object where you store custom messages to override the default error messages
+ custom_error_messages:{},
+ // true if you want to vind the input fields
+ binded: true,
+ // set to true, when the prompt arrow needs to be displayed
+ showArrow: true,
+ // did one of the validation fail ? kept global to stop further ajax validations
+ isError: false,
+ // Limit how many displayed errors a field can have
+ maxErrorsPerField: false,
+
+ // Caches field validation status, typically only bad status are created.
+ // the array is used during ajax form validation to detect issues early and prevent an expensive submit
+ ajaxValidCache: {},
+ // Auto update prompt position after window resize
+ autoPositionUpdate: false,
+
+ InvalidFields: [],
+ onFieldSuccess: false,
+ onFieldFailure: false,
+ onSuccess: false,
+ onFailure: false,
+ validateAttribute: "class",
+ addSuccessCssClassToField: "",
+ addFailureCssClassToField: "",
+
+ // Auto-hide prompt
+ autoHidePrompt: false,
+ // Delay before auto-hide
+ autoHideDelay: 10000,
+ // Fade out duration while hiding the validations
+ fadeDuration: 0.3,
+ // Use Prettify select library
+ prettySelect: false,
+ // Add css class on prompt
+ addPromptClass : "",
+ // Custom ID uses prefix
+ usePrefix: "",
+ // Custom ID uses suffix
+ useSuffix: "",
+ // Only show one message per error prompt
+ showOneMessage: false
+ }};
+ $(function(){$.validationEngine.defaults.promptPosition = methods.isRTL()?'topLeft':"topRight"});
+})(jQuery);
+
+
diff --git a/views/js/mce_plugin.js b/views/js/mce_plugin.js
new file mode 100644
index 0000000..ed5289d
--- /dev/null
+++ b/views/js/mce_plugin.js
@@ -0,0 +1,45 @@
+(function() {
+
+ tinymce.create('tinymce.plugins.wpsgPlugin', {
+
+ init : function(ed, url) {
+
+ ed.addCommand('mcewpsg', function() {
+ ed.windowManager.open({
+ file : 'admin.php?page=wpsg-Produkt&action=select&noheader=1',
+ width : 350,
+ height : 235,
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ ed.addButton('wpsg', {
+ title : 'Produkt aus dem Produktkatalog einfügen',
+ cmd : 'mcewpsg',
+ image : url + '/../gfx/basket_select.png'
+ });
+
+ ed.onNodeChange.add(function(ed, cm, n) {
+ cm.setActive('wpsg', n.nodeName == 'IMG');
+ });
+ },
+
+ createControl : function(n, cm) {
+ return null;
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'wpShopGermany Produktauswahl',
+ author : 'maennchen1.de',
+ authorurl : 'http://maennchen1.de',
+ version : "3.0"
+ };
+ }
+ });
+
+ tinymce.PluginManager.add('wpsg', tinymce.plugins.wpsgPlugin);
+
+})();
diff --git a/views/js/wpsg_staffel.js b/views/js/wpsg_staffel.js
new file mode 100644
index 0000000..87a8ffa
--- /dev/null
+++ b/views/js/wpsg_staffel.js
@@ -0,0 +1,117 @@
+
+ (function(jQuery) {
+
+ jQuery.fn.wpsgInputStaffel = function(options) {
+
+ if (options == 'close')
+ {
+
+ jQuery("#wpsg_staffel_dialog").dialog('close');
+ return;
+
+ }
+
+ var settings = jQuery.extend({}, jQuery.fn.wpsgInputStaffel.defaults, options);
+ var field_id = this.attr("id");
+
+ var methods = {
+ renderTable: function() {
+
+ var strHTML = '<table style="width:100%;" borderspacing="0" cellpadding="0">';
+
+ arStaffelung = Array();
+ if (arStaffelung.length > 0)
+ {
+
+ for (var i = 0; i < arStaffelung.length; i ++)
+ {
+
+ var arData = arStaffelung[i];
+
+ strHTML += '<tr class="row' + i + '">';
+ strHTML += '<td style="width:50px;"></td>';
+
+ if (arData[0] == 0 || arStaffelung.length <= 1)
+ strHTML += '<td style="width:150px;">ab <input style="background:transparent; margin-right:5px; width:50px;" class="key" type="text" value="0" readonly="readonly" />' + settings.currency + '</td>';
+ else
+ strHTML += '<td style="width:150px;">ab <input onblur="arStaffelung[' + i + '][0] = jQuery(this).val(); wpsg_updateStaffelung();" style="margin-right:5px; width:50px;" class="key" type="text" value="' + arData[0] + '" />' + settings.currency + '</td>';
+
+ strHTML += '<td style="width:150px;"><input onblur="arStaffelung[' + i + '][1] = jQuery(this).val(); wpsg_updateStaffelung();" style="width:50px; margin-right:5px;" class="value" type="text" value="' + arData[1] + '" />' + settings.currency + '</td>';
+
+ strHTML += '<td style="text-align:right;"><input style="width:100px;" class="button" type="button" value="Entfernen" onclick="wpsg_delStaffelung(\'\', ' + i + ');" /></td>';
+ strHTML += '</tr>';
+
+ }
+
+ }
+
+ strHTML += '<tr><td colspan="4">&nbsp;</td></tr>';
+
+ strHTML += '<tr class="row_neu">';
+ strHTML += '<td>Neu:</td>';
+
+ if (arStaffelung.length == 0)
+ strHTML += '<td>ab <input style="background:transparent; margin-right:5px; width:50px;" class="key" type="text" value="0" readonly="readonly" />' + settings.currency + '</td>';
+ else
+ strHTML += '<td>ab <input style="width:50px; margin-right:5px;" class="key" type="text" value="" />' + settings.currency + '</td>';
+
+ strHTML += '<td><input style="width:50px; margin-right:5px;" class="value" type="text" value="" />' + settings.currency + '</td>';
+ strHTML += '<td style="text-align:right;"><input style="width:100px;" class="button" type="button" value="Hinzufügen" onclick="return wpsg_addStaffelung(\'\');" /></td>';
+ strHTML += '</tr>';
+
+ strHTML += '<tr><td colspan="4">&nbsp;</td></tr>';
+ strHTML += '<tr><td colspan="4" id="wpsg_staffelung_debug">&nbsp;</td></tr>';
+
+ strHTML += '<tr>';
+ strHTML += '<td colspan="3">&nbsp;</td>';
+ strHTML += '<td style="text-align:right;"><input style="width:100px;" class="button" type="button" onclick="return jQuery(\'#' + field_id + '\').wpsgInputStaffel(\'close\');" value="Schließen" /></td>';
+ strHTML += '</tr>';
+
+ strHTML += '</table>';
+
+ return strHTML;
+
+ },
+ showDialog: function() {
+
+ var strHTML = '<div id="wpsg_staffel_dialog" style="display:none;">';
+
+ strHTML += '<div style="padding:5px;" id="wpsg_staffel_table">' + methods.renderTable() + '</div>';
+ strHTML += '</div>';
+
+ jQuery('body').append(strHTML);
+
+ jQuery("#wpsg_staffel_dialog").dialog( {
+ 'dialogClass': 'wp-dialog',
+ 'modal': true,
+ 'width': settings.width,
+ 'height': settings.height,
+ 'title': settings.title
+ } );
+
+ }
+ };
+
+ if (this.text().trim() == '')
+ {
+ this.text(wpsg_staffel.empty);
+ }
+
+ this.bind('click', function() {
+
+ var staffelKey = jQuery(this).text().trim();
+ if (staffelKey == wpsg_staffel.empty) staffelKey = '';
+ methods.showDialog.apply();
+
+ } );
+
+ };
+
+ jQuery.fn.wpsgInputStaffel.defaults = {
+ currency: '€',
+ title: wpsg_staffel.title,
+ width: 350,
+ height: 400
+ };
+
+ })(jQuery); \ No newline at end of file
diff --git a/views/mailtemplates/adminmail.phtml b/views/mailtemplates/adminmail.phtml
new file mode 100644
index 0000000..aea3f82
--- /dev/null
+++ b/views/mailtemplates/adminmail.phtml
@@ -0,0 +1,81 @@
+<?php
+
+ /**
+ * Template für die Mail, die bei einer neuen Bestellung an den Admin geht
+ */
+
+ $this->htmlMail = false;
+
+ //wpsg_debug($this->view);
+
+?><?php echo __('Hallo Administrator,', 'wpsg'); ?>
+
+<?php echo __('Eine neue Bestellung ist im Online-Shop eingegangen.', 'wpsg'); ?>
+
+<?php if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['basket']['checkout']['k_id'], 'o_id' => $this->view['o_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']['shipping_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->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($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 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(__('Land', 'wpsg').':', 35); ?><?php echo $this->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->view['basket']['checkout']['land'])."' "); ?>
+<?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['basket']['checkout']['knr']; ?>
+<?php echo wpsg_pad_right(__('Bestellnummer', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['onr']; ?>
+<?php echo wpsg_pad_right(__('Bestelldatum', 'wpsg').':', 35); ?><?php echo date("d.m.Y H:i:s", $this->view['basket']['checkout']['datum']); ?>
+<?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 echo wpsg_pad_right(__('Bestellung', 'wpsg').':', 35); ?><?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$this->view['o_id']; ?>
+<?php echo $this->render(WPSG_PATH_VIEW.'/mailtemplates/order.phtml'); ?>
+
+<?php if ($this->view['basket']['checkout']['comment'] != '') { ?>
+<?php echo __('Bestellkommentar', 'wpsg') ?>: <?php echo $this->view['basket']['checkout']['comment'] ?>
+<?php }?>
diff --git a/views/mailtemplates/html/adminmail.phtml b/views/mailtemplates/html/adminmail.phtml
new file mode 100644
index 0000000..4def92f
--- /dev/null
+++ b/views/mailtemplates/html/adminmail.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /* Wichtig, da die Module sonst kein HTML zurückgeben */
+ $this->htmlMail = true;
+
+?>
+
+<p><?php echo __('Hallo Administrator,', 'wpsg'); ?></p>
+
+<p><?php echo __('Eine neue Bestellung ist im Online-Shop eingegangen!', 'wpsg'); ?></p>
+
+<?php $this->render(WPSG_PATH_VIEW.'/mailtemplates/html/customer.phtml'); ?>
+
+<br />
+
+<h2><?php echo __('Warenkorb', 'wpsg'); ?> <a href="<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$this->view['o_id']; ?>"><?php echo __('Bestellverwaltung', 'wpsg'); ?></a>:</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 } ?> \ No newline at end of file
diff --git a/views/mailtemplates/html/customer.phtml b/views/mailtemplates/html/customer.phtml
new file mode 100644
index 0000000..3868f01
--- /dev/null
+++ b/views/mailtemplates/html/customer.phtml
@@ -0,0 +1,170 @@
+<?php if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['basket']['checkout']['k_id'], 'o_id' => $this->view['o_id']))) { ?>
+<h2><?php echo __('Rechnungsadresse:', 'wpsg'); ?></h2>
+
+<table class="contenttable">
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Firma', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['firma']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Name', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['vname'].' '.$this->view['basket']['checkout']['name']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Straße', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['strasse']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Land', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['land']['name']); ?></td>
+ </tr>
+ <?php if (trim($this->view['basket']['checkout']['ustidnr']) != "") { ?>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('USt.IdNr.', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['ustidnr']); ?></td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Ort', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['plz'].' '.$this->view['basket']['checkout']['ort']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Telefon', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['tel']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Fax', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['fax']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('E-Mail Adresse', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><a href="mailto:<?php echo wpsg_hspc($this->view['basket']['checkout']['email']); ?>"><?php echo wpsg_hspc($this->view['basket']['checkout']['email']); ?></a></td>
+ </tr>
+</table>
+
+<h2><?php echo __('Lieferadresse', 'wpsg'); ?>:</h2>
+
+<table class="contenttable">
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Firma', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_firma']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Name', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_vname'].' '.$this->view['basket']['checkout']['shipping_name']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Straße', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_strasse']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Ort', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_plz'].' '.$this->view['basket']['checkout']['shipping_ort']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Land', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['shipping_land']['name']); ?></td>
+ </tr>
+</table>
+<?php } else { ?>
+
+<h2><?php echo __('Rechnungs- /Lieferadresse', 'wpsg'); ?>:</h2>
+
+<table class="contenttable">
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Firma', 'wpsg'); ?></td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['firma']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Name', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['vname'].' '.$this->view['basket']['checkout']['name']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Straße', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['strasse']); ?></td>
+ </tr>
+ <?php if (trim($this->view['basket']['checkout']['ustidnr']) != "") { ?>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('USt.IdNr.', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['ustidnr']); ?></td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Ort', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['plz'].' '.$this->view['basket']['checkout']['ort']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Land', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['land']['name']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Telefon', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['tel']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Fax', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_hspc($this->view['basket']['checkout']['fax']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('E-Mail Adresse', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><a href="mailto:<?php echo wpsg_hspc($this->view['basket']['checkout']['email']); ?>"><?php echo wpsg_hspc($this->view['basket']['checkout']['email']); ?></a></td>
+ </tr>
+</table>
+
+<?php } ?>
+
+<h2><?php echo __('Bestelldaten', 'wpsg'); ?>:</h2>
+
+<table class="contenttable">
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Kundennummer', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo $this->view['basket']['checkout']['knr']; ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Bestellnummer', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo $this->view['basket']['checkout']['onr']; ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Bestelldatum', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo date("d.m.Y H:i:s", $this->view['basket']['checkout']['datum']); ?></td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Rechnungsbetrag', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><strong><?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?></strong></td>
+ </tr>
+ <?php if ($this->get_option('wpsg_kleinunternehmer') != '1') { ?>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('Steueranteil', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><?php echo wpsg_ff($this->view['basket']['sum']['mwst'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+</table>
+
+<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
+<table class="contenttable">
+ <tr>
+ <td style="padding:8px 2px 8px 2px; line-height:100%; vertical-align:middle;">
+ <?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
+ </td>
+ </tr>
+</table>
+<?php } ?>
+
+<h2><?php echo __('Versand- und Lieferart', 'wpsg'); ?>:</h2>
+
+<table class="contenttable">
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:top;" class="col0"><?php echo __('Versandart', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:top;" class="col1">
+ <?php echo $this->arShipping[$this->view['basket']['checkout']['shipping']]['name']; ?>
+ <?php $this->callMods('mail_shipping'); ?>
+ </td>
+ </tr>
+ <tr>
+ <td style="padding:2px; line-height:100%; vertical-align:top;" class="col0"><?php echo __('Zahlungsart', 'wpsg'); ?>:</td>
+ <td style="padding:2px; line-height:100%; vertical-align:top;" class="col1">
+ <?php echo $this->arPayment[$this->view['basket']['checkout']['payment']]['name']; ?><br />
+ <?php $this->callMods('mail_payment'); ?>
+ </td>
+ </tr>
+</table> \ No newline at end of file
diff --git a/views/mailtemplates/html/html_foot.phtml b/views/mailtemplates/html/html_foot.phtml
new file mode 100644
index 0000000..ddd2b90
--- /dev/null
+++ b/views/mailtemplates/html/html_foot.phtml
@@ -0,0 +1,6 @@
+ </td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/views/mailtemplates/html/html_head.phtml b/views/mailtemplates/html/html_head.phtml
new file mode 100644
index 0000000..ef42e91
--- /dev/null
+++ b/views/mailtemplates/html/html_head.phtml
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title><?php echo $this->view['subject']; ?></title>
+ <style type="text/css">
+
+ #outlook a { padding:0; }
+ body { width:100% !important; } .ReadMsgBody{ width:100%; } .ExternalClass{ width:100%; }
+ body { -webkit-text-size-adjust:none; }
+
+ body { margin:0; padding:0; padding-top:10px; line-height:115%; }
+ img { border:0; height:auto; line-height:100%; outline:none; text-decoration:none; }
+ table { border-collapse:collapse; }
+ table th { background-color:#DDDDDD; vertical-align:middle; }
+ table td, table th { padding:2px; line-height:100%; border-collapse:collapse; }
+ table .td_bb { border-bottom:1px solid #000000; }
+ table .td_bt { border-top:1px solid #000000; }
+ #backgroundTable { margin:0; padding:0; width:100% !important; }
+
+ body, #backgroundTable { line-height:150%; font-size:12px; background-color:#FAFAFA; font-family:sans-serif; }
+ table td, table th { line-height:150%; font-size:12px; font-family:sans-serif; }
+ h1 { font-size:1.2rem; }
+ h2 { font-size:1.1rem; }
+ h3 { font-size:1rem; }
+
+ .contenttable { width:100%; border:0px; border-spacing:0px; }
+ .contenttable th, .contenttable td { text-align:left; vertical-align:top; padding:0px; }
+ .contenttable .col0 { width:50%; }
+ .contenttable .col1 { width:50%; }
+
+ .baskettable_wrap { }
+ .baskettable { border:1px solid #000000; width:100%; /*border-spacing:0px;*/ }
+ .baskettable th, .baskettable td { text-align:left; }
+ .baskettable .col_pos { width:40px; }
+ .baskettable .col_price { width:100px; }
+ .baskettable .col_amount { width:75px; text-align:center; }
+ .baskettable .col_sum { text-align:right; width:100px; }
+
+ </style>
+ </head>
+ <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
+
+ <table id="backgroundTable">
+ <tr>
+ <td>&nbsp;</td>
+ <td style="width:600px; line-height:100%; vertical-align:middle;"> \ No newline at end of file
diff --git a/views/mailtemplates/html/kundenmail.phtml b/views/mailtemplates/html/kundenmail.phtml
new file mode 100644
index 0000000..30fe9af
--- /dev/null
+++ b/views/mailtemplates/html/kundenmail.phtml
@@ -0,0 +1,44 @@
+<?php
+
+ /* Wichtig, da die Module sonst kein HTML zurückgeben */
+ $this->htmlMail = true;
+
+?>
+<p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['basket']['checkout']['vname'], $this->view['basket']['checkout']['name']); ?></p>
+
+<p><?php echo __('Vielen Dank für Ihre Bestellung!', 'wpsg'); ?></p>
+
+<?php $this->render(WPSG_PATH_VIEW.'/mailtemplates/html/customer.phtml'); ?>
+
+<br />
+
+<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 } ?>
+
+<p><?php echo __('Wir bedanken uns fuer Ihre Bestellung.', 'wpsg'); ?></p>
+<p><?php echo __('Bitte beachten Sie, dass es sich bei dieser E-Mail um eine Bestellbestaetigung und keine bindende Auftragsbestaetigung handelt. Preisirrtuemer sind leider nicht vollstaendig auszuschliessen.', '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>
+
+<?php $this->CallMods('kundenmail_afteragb', array(&$this->view['basket']['checkout']['o_id'])); ?>
+
+<h3><?php echo __("Widerrufsbelehrung", "wpsg"); ?></h3>
+
+<?php if (wpsg_isSizedString($this->get_option("wpsg_ps_mailwiderruf"))) { ?>
+<p><?php echo nl2br($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> \ No newline at end of file
diff --git a/views/mailtemplates/html/order.phtml b/views/mailtemplates/html/order.phtml
new file mode 100644
index 0000000..7fc6a8e
--- /dev/null
+++ b/views/mailtemplates/html/order.phtml
@@ -0,0 +1,185 @@
+<div class="baskettable_wrap">
+ <table class="baskettable" cellpadding="2" cellspacing="0" style="cell-padding:4px;">
+ <tr class="head">
+ <th valign="middle" style="cell-padding:4px; padding:4px; line-height:100%; vertical-align:middle;" class="col_pos"><?php echo __('Pos', 'wpsg'); ?></th>
+ <th valign="middle" style="cell-padding:4px; padding:4px; line-height:100%; vertical-align:middle;" class="col_name"><?php echo __('Produkt', 'wpsg'); ?></th>
+ <th valign="middle" style="cell-padding:4px; padding:4px; line-height:100%; vertical-align:middle;" class="col_price"><?php echo __('Stückpreis', 'wpsg'); ?></th>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <th valign="middle" style="cell-padding:4px; padding:4px; line-height:100%; min-width:50px; width:50px; vertical-align:middle;" class="col_mwst"><?php echo __('MwSt.', 'wpsg'); ?></th>
+ <?php } ?>
+ <th valign="middle" style="cell-padding:4px; padding:4px; line-height:100%; vertical-align:middle;" class="col_amount"><?php echo __('Anzahl', 'wpsg'); ?></th>
+ <th valign="middle" style="cell-padding:4px; padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo __('Summe', 'wpsg'); ?></th>
+ </tr>
+ <?php $i = 0; foreach ((array)$this->view['basket']['produkte'] as $p) { $i ++; ?>
+ <tr class="productrow <?php echo ((($i % 2) == 0)?'productrow_odd':'productrow_even'); ?>">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_pos td_bt"><?php echo $i; ?>.</td>
+ <td style="padding:0px; vertical-align:middle;" class="col_name td_bt">
+
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td style="padding:0px; ">
+ <?php if ($this->hasMod('wpsg_mod_produktbilder') && wpsg_isSizedInt($this->get_option('wpsg_mod_produktbilder_overviewimage'))) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->getProduktId($p['id']))); ?>
+ <?php if (wpsg_isSizedArray($arBilder)) { ?>
+ <a style="width:50px; width:50px; margin-right:10px; float:left;" href="<?php echo $this->getProduktLink($this->getProduktId($p['id'])); ?>" title="<?php echo wpsg_hspc(((wpsg_isSizedString($p['detailname'])?$p['detailname']:$p['name']))); ?>">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->getProduktId($p['id']), array_shift($arBilder), 50, 50, 'sz')); ?>" alt="<?php echo wpsg_hspc(((wpsg_isSizedString($p['detailname'])?$p['detailname']:$p['name']))); ?>" />
+ </a>
+ <?php } ?>
+ <?php } ?>
+ </td>
+ <td valign="middle" style="padding:4px; line-height:125%; vertical-align:middle; min-height:50px;">
+ <a href="<?php echo $this->getProduktLink($this->getProduktId($p['id'])); ?>" title="<?php echo wpsg_hspc(((wpsg_isSizedString($p['detailname'])?$p['detailname']:$p['name']))); ?>"><?php echo wpsg_hspc(((wpsg_isSizedString($p['detailname'])?$p['detailname']:$p['name']))); ?></a>
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price td_bt"><?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?></td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst td_bt"><?php echo wpsg_ff($p['mwst_value'], '%'); ?></td>
+ <?php } ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount td_bt"><?php echo $p['menge']; ?></td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum td_bt"><?php echo wpsg_ff($p['preis'] * $p['menge'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <tr class="productrow productrow2 <?php echo ((($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 __('Art. Nr.', '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 wpsg_hspc($p['anr']); ?>
+ </td>
+ </tr>
+ <?php $this->view['i'] = $i; $this->callMods('mail_row', array($i, $p)); ?>
+ <?php if (wpsg_isSizedArray($p['order_allowedshipping'])) { ?>
+ <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 __('Mögliche Versandarten', 'wpsg'); ?>:</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_productvars_value">
+ <?php $j = 0; foreach ($p['order_allowedshipping'] as $shipping) { $j ++; ?>
+ <?php echo $this->getShippingName($shipping); ?><?php if ($j < sizeof($p['order_allowedshipping'])) { ?>, <?php } ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php } ?>
+ <?php if (isset($this->view['basket']['gs'])) { ?>
+ <tr class="voucherrow">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_pos"><?php echo $i + 1; ?>.</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name"><?php echo wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $this->view['basket']['gs']['code']); ?></td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price"><?php echo wpsg_ff($this->view['basket']['gs']['value'], (($this->view['basket']['gs']['calc'] == 'w')?$this->get_option('wpsg_currency'):'%')); ?></td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst"><?php echo __('anteilig', 'wpsg'); ?></td>
+ <?php } ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">1</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+ <tr class="spacer">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="td_bt" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'6':'5'); ?>">&nbsp;</td>
+ </tr>
+ <?php if (isset($this->view['basket']['sum']['preis_rabatt']) && $this->view['basket']['sum']['preis_rabatt'] > 0) { ?>
+ <tr class="discountrow">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="2"><?php echo __('Abzüglich Rabatt', 'wpsg'); ?>:</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price">&nbsp;</td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst">&nbsp;</td>
+ <?php } ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">&nbsp;</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+ <tr class="subtotalrow">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="2"><?php echo __('Zwischensumme', 'wpsg'); ?>:</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price">&nbsp;</td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst"></td>
+ <?php } ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">&nbsp;</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo wpsg_ff($this->view['basket']['sum']['preis'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <tr class="shippingtotalrow">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="2"><?php echo __('Versandkosten', 'wpsg'); ?>:</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price">&nbsp;</td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst">
+ <?php if (!wpsg_isSizedInt($this->arShipping[$this->view['basket']['checkout']['payment']]['mwst'])) { ?>
+ <?php echo __('Anteilig', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo wpsg_ff($this->arShipping[$this->view['basket']['checkout']['shipping']]['mwst_value'], '% '); ?>
+ <?php } ?>
+ </td>
+ <?php } ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">&nbsp;</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php if (wpsg_isSizedArray($this->view['basket']['shipping']['methods'])) { ?>
+ <?php foreach ($this->view['basket']['shipping']['methods'] as $shipping) { ?>
+ <tr class="shippingtotalrow shippingsubrow">
+ <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;" colspan="2" class="col_name"><?php echo wpsg_hspc($this->getShippingName($shipping)); ?></td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst">
+ <?php if ($this->view['basket']['shipping'][$shipping]['tax_rata'] == 1) { ?>
+ <?php echo __('Anteilig', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo wpsg_ff($this->view['basket']['shipping'][$shipping]['mwst'], '%'); ?>
+ <?php } ?>
+ </td>
+ <?php } ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">&nbsp;</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum">
+ <?php if ($this->get_option('wpsg_preisangaben_frontend') == WPSG_NETTO) { ?>
+ <?php echo wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_netto'], $this->get_option('wpsg_currency')); ?>
+ <?php } else { ?>
+ <?php echo wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_brutto'], $this->get_option('wpsg_currency')); ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php } ?>
+ <tr class="paymenttotalrow">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="2"><?php echo __('Zahlungskosten', 'wpsg'); ?>:</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price">&nbsp;</td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst">
+ <?php if (!wpsg_isSizedInt($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst'])) { ?>
+ <?php echo __('Anteilig', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo wpsg_ff($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst_value'], '% '); ?>
+ <?php } ?>
+ </td>
+ <?php } ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">&nbsp;</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
+ <tr class="smallbuisnessrulerow">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') === '1')?'6':'5'); ?>">
+ <?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
+ </td>
+ </tr>
+ <?php } else { ?>
+ <?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
+ <tr class="taxrow">
+ <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 if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
+ <?php } ?>:
+ </td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo wpsg_ff($mwst['sum'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+ <?php } ?>
+ <tr class="totalrow">
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="2"><?php echo __('Gesamtpreis', 'wpsg'); ?>:</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price">&nbsp;</td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst"></td>
+ <?php } ?>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">&nbsp;</td>
+ <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><strong><?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?></strong></td>
+ </tr>
+ </table>
+</div>
+
+<br /> \ No newline at end of file
diff --git a/views/mailtemplates/html/status.phtml b/views/mailtemplates/html/status.phtml
new file mode 100644
index 0000000..84567e6
--- /dev/null
+++ b/views/mailtemplates/html/status.phtml
@@ -0,0 +1,23 @@
+<?php
+
+ /**
+ * Dieses Template wird für die HTML Mail bei einer Statusänderung verwendet
+ */
+
+ /* Wichtig, da die Module sonst kein HTML zurückgeben */
+ $this->htmlMail = true;
+
+?>
+<p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?></p>
+
+<p><?php echo wpsg_translate(
+ __('Der Status Ihrer Bestellung mit der Bestellnummer #1# hat sich von "#2#" auf "#3#" geändert.', 'wpsg'),
+ $this->view['order']['onr'],
+ __($this->view['status_alt'], 'wpsg'),
+ __($this->view['status_neu'], 'wpsg')); ?></p>
+
+<?php $this->callMods('mail_status', array(&$this->view['order'], &$this->view['kunde'])); ?>
+
+<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/mailtemplates/kundenmail.phtml b/views/mailtemplates/kundenmail.phtml
new file mode 100644
index 0000000..22dfd4d
--- /dev/null
+++ b/views/mailtemplates/kundenmail.phtml
@@ -0,0 +1,107 @@
+<?php
+
+ /**
+ * Template für die Mail, die bei einer neuen Bestellung an den Kunde geht
+ */
+
+ $this->htmlMail = false;
+
+ //wpsg_debug($this->view);
+
+?><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['basket']['checkout']['vname'], $this->view['basket']['checkout']['name']); ?>
+
+<?php echo __('vielen Dank für Ihre Bestellung.', 'wpsg'); ?>
+
+<?php if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['basket']['checkout']['k_id'], 'o_id' => $this->view['o_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']['shipping_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->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($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 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(__('Land', 'wpsg').':', 35); ?><?php echo $this->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->view['basket']['checkout']['land'])."' "); ?>
+<?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['basket']['checkout']['knr']; ?>
+<?php echo wpsg_pad_right(__('Bestellnummer', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['onr']; ?>
+<?php echo wpsg_pad_right(__('Bestelldatum', 'wpsg').':', 35); ?><?php echo date("d.m.Y H:i:s", $this->view['basket']['checkout']['datum']); ?>
+<?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 $this->callMods('mail_shipping'); ?>
+<?php echo wpsg_pad_right(__('Zahlungsart', 'wpsg').':', 35); ?><?php echo $this->arPayment[$this->view['basket']['checkout']['payment']]['name']; ?>
+<?php $this->callMods('mail_payment'); ?>
+
+<?php echo __('Bestellung', 'wpsg'); ?>:
+<?php echo $this->render(WPSG_PATH_VIEW.'/mailtemplates/order.phtml'); ?>
+
+<?php if ($this->view['basket']['checkout']['comment'] != '') { ?>
+
+<?php echo __('Bestellkommentar', 'wpsg') ?>: <?php echo $this->view['basket']['checkout']['comment'] ?>
+
+<?php } ?>
+
+<?php echo __('Wir bedanken uns fuer Ihre Bestellung.', 'wpsg'); ?>
+
+<?php echo __('Bitte beachten Sie, dass es sich bei dieser E-Mail um eine Bestellbestaetigung und keine bindende Auftragsbestaetigung handelt. Preisirrtuemer sind leider nicht vollstaendig auszuschliessen.', 'wpsg'); ?>
+
+<?php echo __('Es gelten unsere Allgemeinen Geschaeftsbedingungen (AGB).', 'wpsg'); ?>
+
+<?php echo $this->getURL(wpsg_ShopController::URL_AGB); ?>
+
+<?php $this->CallMods('kundenmail_afteragb', array(&$this->view['basket']['checkout']['o_id'])); ?>
+-- <?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/mailtemplates/order.phtml b/views/mailtemplates/order.phtml
new file mode 100644
index 0000000..a174502
--- /dev/null
+++ b/views/mailtemplates/order.phtml
@@ -0,0 +1,107 @@
+<?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 $product_index => $p) { $i ++; ?>
+<?php echo wpsg_pad_right($i.'.', 5); ?>
+<?php echo wpsg_pad_right(((wpsg_isSizedString($p['detailname'])?$p['detailname']:$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 echo wpsg_pad_left(__('Art. Nr.:', 'wpsg').' ', 15); ?><?php echo wpsg_pad_right($p['anr'], ($prod_col - strlen($p['anr']))); ?>
+<?php $this->callMods('mail_row', array($i, $p)); ?>
+<?php if (wpsg_isSizedArray($p['order_allowedshipping'])) { ?>
+<?php echo wpsg_pad_left(' ', 5); ?><?php echo __('Mögliche Versandarten', 'wpsg').': '; ?>
+<?php $i = 0; foreach ($p['order_allowedshipping'] as $shipping) { $i ++; ?>
+<?php echo $this->getShippingName($shipping); ?>
+<?php if ($i < sizeof($p['order_allowedshipping'])) { ?>, <?php } ?>
+<?php } ?>
+<?php } ?>
+<?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']['sum']['gs'], $this->get_option('wpsg_currency')), 15); ?>
+<?php } ?>
+<?php if (isset($this->view['basket']['sum']['preis_rabatt']) && $this->view['basket']['sum']['preis_rabatt'] > 0) { ?>
+ <?php echo wpsg_pad_right(__('Abzüglich Rabatt', 'wpsg'), 40); ?>
+<?php echo wpsg_pad_left('-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 31); ?>
+<?php } ?>
+<?php echo wpsg_pad_left('', 5); ?>
+<?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 if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+<?php if (!wpsg_isSizedInt($this->arShipping[$this->view['basket']['checkout']['payment']]['mwst'])) { ?>
+<?php echo wpsg_pad_left(__('Anteilig', 'wpsg').' ', 10); ?>
+<?php } else { ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->arShipping[$this->view['basket']['checkout']['shipping']]['mwst_value'], '% '), 10); ?>
+<?php } ?>
+<?php } else { ?> <?php } ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 21); ?>
+<?php } ?>
+<?php if (wpsg_isSizedArray($this->view['basket']['shipping']['methods'])) { ?>
+<?php foreach ($this->view['basket']['shipping']['methods'] as $shipping) { ?>
+<?php echo wpsg_pad_left(' ', 10); ?><?php echo wpsg_pad_right($this->getShippingName($shipping), 36); ?>
+<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+<?php if ($this->view['basket']['shipping'][$shipping]['tax_rata'] == 1) { ?>
+<?php echo wpsg_pad_right(__('Anteilig', 'wpsg'), 10); ?>
+<?php } else { ?>
+<?php echo wpsg_pad_right(wpsg_ff($this->view['basket']['shipping'][$shipping]['mwst'], '%'), 10); ?>
+<?php } ?>
+<?php } ?>
+<?php if ($this->get_option('wpsg_preisangaben_frontend') == WPSG_NETTO) { ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_netto'], $this->get_option('wpsg_currency')), 20); ?>
+<?php } else { ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_brutto'], $this->get_option('wpsg_currency')), 20); ?>
+<?php } ?>
+<?php } ?>
+<?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 if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+<?php if (!wpsg_isSizedInt($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst'])) { ?>
+<?php echo wpsg_pad_left(__('Anteilig', 'wpsg').' ', 10); ?>
+<?php } else { ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst_value'], '% '), 10); ?>
+<?php } ?>
+<?php } else { ?> <?php } ?>
+<?php echo wpsg_pad_left(wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 21); ?>
+<?php } ?>
+<?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 enthaltene 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 $this->callMods('mail_aftercalculation', array(&$this->view['basket']['checkout']['o_id'])); ?> \ No newline at end of file
diff --git a/views/mailtemplates/status.phtml b/views/mailtemplates/status.phtml
new file mode 100644
index 0000000..2ccd56c
--- /dev/null
+++ b/views/mailtemplates/status.phtml
@@ -0,0 +1,19 @@
+<?php
+
+ /**
+ * Dieses Template wird für die Mail bei einer Statusänderung verwendet
+ */
+
+ $this->htmlMail = false;
+
+?><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?>
+
+<?php echo wpsg_translate(
+ __('Der Status Ihrer Bestellung mit der Bestellnummer #1# hat sich von "#2#" auf "#3#" geändert.', 'wpsg'),
+ $this->view['order']['onr'],
+ __($this->view['status_alt'], 'wpsg'),
+ __($this->view['status_neu'], 'wpsg')); ?>
+<?php $this->callMods('mail_status', array(&$this->view['order'], &$this->view['kunde'])); ?>
+<?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_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
diff --git a/views/order/index.phtml b/views/order/index.phtml
new file mode 100644
index 0000000..b617090
--- /dev/null
+++ b/views/order/index.phtml
@@ -0,0 +1,564 @@
+<?php
+
+ /**
+ * Template für die Übersicht der Bestellungen
+ */
+ //wpsg_debug($this->view);
+?>
+<div class="wrap wpsg_order_index">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
+ <h2>
+ <?php echo __('Bestellverwaltung', 'wpsg'); ?>
+ </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 goPage(page)
+ {
+
+ if (page <= 0 || page == <?php echo $this->view['seite']; ?> || page > <?php echo $this->view['pages']; ?>) return;
+
+ jQuery('#seite').val(page);
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ } // function goPage(page)
+
+ 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 goStatus(status_id)
+ {
+
+ jQuery.cookie("wpsg_order_status", status_id);
+
+ jQuery('#filter_status option').attr("selected", false);
+ jQuery('#filter_status option[value="' + status_id + '"]').attr("selected", true);
+ jQuery('#seite').val(1);
+
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ } // function goStatus(status_id)
+
+ /**
+ * Markiert/Demarkiert alle Rechnungen
+ */
+ function wpsg_checkOrderCol(oElement)
+ {
+
+ if (jQuery(oElement).attr("checked") == "checked")
+ {
+
+ jQuery('#wpsg_order_index_submit input').attr("checked", true);
+
+ }
+ else
+ {
+
+ jQuery('#wpsg_order_index_submit input').attr("checked", false);
+
+ }
+
+ } // function wpsg_checkOrderCol()
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_handlediv').bind('click', function() {
+ jQuery(this).next().toggle();
+
+ var arClose = new Array();
+ jQuery('.wpsg_order_index .postbox .inside:hidden').each(function() {
+ arClose.push(jQuery(this).parent().attr("id"));
+ } );
+
+ jQuery.cookie('wpsg_order_index_closed', arClose.join(','));
+
+ } );
+
+ if (jQuery.cookie('wpsg_order_index_closed') != null)
+ {
+
+ var arClose = jQuery.cookie('wpsg_order_index_closed').split(',');
+
+ for (index in arClose)
+ {
+
+ if (arClose[index] != '') jQuery('#' + arClose[index] + ' .inside').hide();
+
+ }
+
+ }
+
+ } );
+
+ /* ]]> */</script>
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <form method="get" id="filter_form">
+
+ <input type="hidden" name="" id="wpsg_order_index_noheader_filter" value="1" />
+ <input type="hidden" name="page" value="wpsg-Order" />
+
+ <?php if (isset($this->view['filter']['k_id']) && $this->view['filter']['k_id'] > 0) { ?>
+ <input type="hidden" name="filter[k_id]" id="filter_k_id" value="<?php echo $this->view['filter']['k_id']; ?>" />
+ <?php } ?>
+
+ <?php if (isset($this->view['filter']['k_id']) && $this->view['filter']['k_id'] > 0) { ?>
+ <ul class="subsubsub wpsg_order_index_status">
+ <li><span class="text"><?php echo wpsg_translate(__('Bestellungen von Kunden #1#', 'wpsg'), $this->view['kunde']['vname'].' '.$this->view['kunde']['name']); ?></span></li>
+ <li><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order"><?php echo __('Alle anzeigen', 'wpsg'); ?></a></li>
+ </ul>
+ <div class="wpsg_clear"></div>
+ <?php } ?>
+ <ul class="subsubsub wpsg_order_index_status">
+ <?php $i = 0; foreach ($this->view['arStatus'] as $status_id => $count) { ?>
+ <?php if ($count > 0) { ?>
+ <li>
+ <?php if (in_array($status_id, explode(',', $this->view['filter']['status']))) { ?>
+ <span class="akt"><?php echo $this->arStatus[$status_id]; ?></span> <span class="count">(<?php echo $count; ?>) | </span>
+ <?php } else { ?>
+ <a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goStatus(<?php echo $status_id; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order"><?php echo $this->arStatus[$status_id]; ?> <span class="count">(<?php echo $count; ?>)</span></a> |
+ <?php } ?>
+ </li>
+ <?php $i ++; } ?>
+ <?php } ?>
+ <li>
+ <?php if ($this->view['filter']['status'] == -1) { ?>
+ <span class="akt"><?php echo __('Alle', 'wpsg'); ?></span> <span class="count">(<?php echo $this->view['count']; ?>)</span>
+ <?php } else { ?>
+ <a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goStatus(-1);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order"><?php echo __('Alle', 'wpsg'); ?> <span class="count">(<?php echo $this->view['countAll']; ?>)</span></a>
+ <?php } ?>
+ </li>
+ </ul>
+
+ <p class="search-box wpsg-search-box">
+ <label for="post-search-input" class="screen-reader-text"><?php echo __('Bestellungen suchen', 'wpsg'); ?>:</label>
+ <input type="text" onchange="jQuery('#filtersearch').val(jQuery(this).val());" value="<?php echo wpsg_hspc($this->view['filter']['search']); ?>" name="filter[search]" id="post-search-input" />
+ <input type="submit" onclick="jQuery('#wpsg_mod_export_noheader').attr('name', '');" value="<?php echo __('Bestellung suchen', 'wpsg'); ?>" class="button" id="search-submit" name="search-submit" />
+ </p>
+
+ <br class="clear" />
+
+ <div class="tablenav top">
+
+ <div class="alignleft actions">
+
+ <label>
+ <input type="checkbox" <?php echo (($_COOKIE['wpsg_order_index_filter'] == '1')?'checked="checked"':''); ?> name="wpsg_order_index_filter" id="wpsg_order_index_filter" />&nbsp;<?php echo __('Filter', 'wpsg'); ?>
+ </label>
+
+ <?php $this->callMods('produkt_index_head'); ?>
+
+ </div>
+ <?php //wpsg_debug($this->view) ?>
+ <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="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(1);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&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 onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['seite'] - 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&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 onfocus="jQuery('#wpsg_mod_export_noheader').attr('name', '');" 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 onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['seite'] + 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&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 onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['pages']; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&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>
+
+ </div>
+
+ </div>
+
+ <div class="metabox-holder" id="wpsg_order_index_filter_layer" style="<?php echo (($_COOKIE['wpsg_order_index_filter'] == '1')?'display:block;':'display:none;'); ?>">
+ <div id="wpsg_orderindexfilter" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br></span>
+ <span><?php echo __('Bestellfilter', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+
+ <?php
+
+ // Array der Zustände aufbereiten
+ $arStatus = array('-1' => __('Alle', 'wpsg'));
+ foreach ($this->view['arStatus'] as $status_id => $v) { $arStatus[$status_id] = $this->arStatus[$status_id]; }
+
+ ?>
+
+ <?php echo wpsg_drawForm_Input('filter[search]', __('Suchtext', 'wpsg'), $this->view['filter']['search']); ?>
+ <?php echo wpsg_drawForm_Select('filter[status]', __('Status', 'wpsg'), $arStatus, $this->view['filter']['status'], array('id' => 'filter_status')); ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for=""><?php echo __('Bestelldatum (Monat/Jahr)', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <select name="filter[month_von]" id="month_von" style="float:left; width:45%; margin-right:5%;">
+ <option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
+ <?php for ($i = 1; $i <= 12; $i ++) { ?>
+ <option <?php echo (($this->view['filter']['month_von'] == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo utf8_encode(strftime("%B", mktime(0, 0, 0, $i, 1, 2000))); ?></option>
+ <?php } ?>
+ </select>
+ <select name="filter[year_von]" id="year_von" style="float:left; width:45%;">
+ <option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
+ <?php foreach ($this->view['years'] as $y) { ?>
+ <option <?php echo (($this->view['filter']['year_von'] == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for=""><?php echo __('Rechnungsdatum (Monat/Jahr)', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <select name="filter[invoice_month_von]" id="invoice_month_von" style="float:left; width:45%; margin-right:5%;">
+ <option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
+ <?php for ($i = 1; $i <= 12; $i ++) { ?>
+ <option <?php echo (($this->view['filter']['invoice_month_von'] == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); ?></option>
+ <?php } ?>
+ </select>
+ <select name="filter[invoice_year_von]" id="invoice_year_von" style="float:left; width:45%;">
+ <option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
+ <?php foreach ($this->view['invoice_years'] as $y) { ?>
+ <option <?php echo (($this->view['filter']['invoice_year_von'] == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+ </div>
+ <?php } ?>
+
+ <div class="clear"></div>
+
+ <br />
+ <input onclick="jQuery('#wpsg_mod_export_noheader').attr('name', '');" class="button" name="search-submit" type="submit" value="<?php echo __("Auswahl einschränken", "wpsg"); ?>" />
+
+ </div>
+ </div>
+ </div>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_order_index_filter').bind('change', function() {
+
+ if (jQuery(this).attr("checked"))
+ {
+
+ jQuery('#wpsg_order_index_filter_layer').show();
+ jQuery.cookie('wpsg_order_index_filter', '1');
+
+ }
+ else
+ {
+
+ jQuery('#wpsg_order_index_filter_layer').hide();
+ jQuery.cookie('wpsg_order_index_filter', '0');
+
+ }
+
+ } );
+
+ } );
+
+ /* ]]> */</script>
+
+ <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 $this->callMods('produkt_index_aftersearch'); ?>
+
+ <?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
+ <form method="get" id="wpsg_order_index_submit">
+
+ <input type="hidden" name="" id="wpsg_order_index_noheader" value="1" />
+ <input type="hidden" name="page" value="wpsg-Order" />
+
+ <table class="widefat post fixed">
+ <thead>
+ <tr>
+ <th class="manage-column column-cb check-column" scope="col"><input type="checkbox" value="1" id="wpsg_check_all_order" onclick="wpsg_checkOrderCol(this);" name="" /></th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'nr')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <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'] == 'customer')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('customer');">
+ <span><?php echo __("Kunde", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'payment')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('payment');">
+ <span><?php echo __("Bezahlmethode", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'shipping')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('shipping');">
+ <span><?php echo __("Versandart", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'produkte')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('produkte');">
+ <span><?php echo __("Produkte", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'amount')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('amount');">
+ <span><?php echo __("Bestellwert", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <?php if ($this->hasMod('wpsg_mod_abo')) { ?>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'abo')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('abo');">
+ <span><?php echo __("Abo Ende", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <?php } ?>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'status')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('status');">
+ <span><?php echo __("Status", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php $i = 1; foreach ($this->view['data'] as $o) { ?>
+ <tr>
+ <td class="">
+ <input type="checkbox" value="1" name="wpsg_multido[<?php echo $o['id']; ?>]" />
+ </td>
+ <td class="post-title column-title">
+ <?php if (wpsg_isSizedString($o['language']) && $o['language'] != $this->getCurrentLanguage()) { $arLang = $this->getStoreLanguages(); $lang = $arLang[$o['language']]; ?>
+ <img src="<?php echo $this->getFlagURL().$lang['flag']; ?>" alt="<?php echo wpsg_translate(__('Bestellung wurde in der Sprache #1# durchgeführt.', 'wpsg'), $lang['name']); ?>" title="<?php echo wpsg_translate(__('Bestellung wurde in der Sprache #1# durchgeführt.', 'wpsg'), $lang['name']); ?>" />
+ <?php } ?>
+ <?php echo (($o['onr'] == "")?$o['id']:$o['onr']); ?> <span class="wpsg_order_datum"><?php echo wpsg_hspc(date('d.m.Y H:i:s', strtotime($o['cdate']))); ?></span><br />
+ <?php if (trim($o['order_comment']) != '') { ?>
+ <a title="<?php echo wpsg_translate(__('Kommentar (Kunde): #1#', 'wpsg'), wpsg_hspc($o['order_comment'])); ?>" onclick="return false" href="">
+ <img alt="" src="<?php echo WPSG_URL_CONTENT; ?>plugins/wpshopgermany/views/gfx/comment.png" />
+ </a>
+ <?php } ?>
+ <?php if (trim($o['admincomment']) != "") { ?>
+ <a title="<?php echo __("Kommentar (Admin): ", "wpsg").htmlspecialchars($o['admincomment']); ?>" onclick="return false;" href="">
+ <img alt="" src="<?php echo WPSG_URL_CONTENT; ?>plugins/wpshopgermany/views/gfx/comment_admin.png" />
+ </a>
+ <?php } ?>
+ <div class="row-actions">
+ <span class="view"><a title="<?php echo __("Diese Bestellung ansehen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=view&amp;edit_id=<?php echo $o['id']; ?>"><?php echo __("Ansehen", "wpsg"); ?></a></span>
+ |
+ <span class="storno"><a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Bestellung stornieren möchten?', 'wpsg'); ?>');" title="<?php echo __("Diese Bestellung stornieren", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=storno&amp;noheader=1&amp;edit_id=<?php echo $o['id']; ?>"><?php echo __("Stornieren", "wpsg"); ?></a></span>
+ |
+ <span class="delete"><a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Bestellung löschen möchten?', 'wpsg'); ?>');" title="<?php echo __('Diese Bestellung löschen', 'wpsg'); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=delete&amp;noheader=1&amp;edit_id=<?php echo $o['id']; ?>"><?php echo __('Löschen', 'wpsg'); ?></a></span>
+ </div>
+ </td>
+ <td>
+ <?php if (trim($o['firma']) != '') { ?>
+ <?php echo wpsg_hspc($o['firma']); ?><br />
+ <?php } ?>
+ <?php echo ((trim($o['title']) != '' && $o['title'] != '-1')?$o['title'].' ':'').wpsg_hspc($o['vname'].' '.$o['name']); ?><br />
+ <span class="wpsg_order_adress">
+ <?php echo wpsg_hspc($o['strasse']); ?><br />
+ <?php echo wpsg_hspc($o['plz'].' '.$o['ort'].' '.$o['land_krzl']); ?>
+ </span>
+ </td>
+ <td>
+
+ <?php /* Bei Crefopay wird die Darstellung der Zahlungsart über das Modul geregelt */ ?>
+ <?php if ($o['type_payment'] == 4000 && $this->hasMod('wpsg_mod_crefopay')) { ?>
+ <?php echo wpsg_hspc($this->callMod('wpsg_mod_crefopay', 'getOrderPaymentName', array($o['id']))); ?>
+ <?php } else { ?>
+ <?php echo wpsg_hspc(__($this->arPayment[$o['type_payment']]['name']), 'wpsg'); ?>
+ <?php } ?>
+
+ <?php if ($o['basket']['sum']['preis_payment'] > 0) { ?>
+ <br /><?php echo wpsg_ff($o['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); ?>
+ <?php } ?>
+ </td>
+ <td>
+ <?php echo wpsg_hspc($o['oOrder']->getShippingTypName()); ?>
+ <?php if ($o['basket']['sum']['preis_shipping'] > 0) { ?>
+ <br /><?php echo wpsg_ff($o['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?>
+ <?php } ?>
+ </td>
+ <td>
+ <?php foreach ((array)$o['basket']['produkte'] as $p) { ?>
+ <?php echo wpsg_translate(__('#1# x <a href="#2#">#3#</a> für je #4#', 'wpsg'), $p['menge'], WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$this->getProduktID($p['id']), $p['name'], wpsg_ff($p['preis'], $this->get_option('wpsg_currency'))); ?><br />
+ <?php } ?>
+ </td>
+ <td>
+ <?php echo wpsg_ff($o['basket']['sum']['preis_gesamt'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ <?php if ($this->hasMod('wpsg_mod_abo')) { ?>
+ <td>
+ <?php if ($this->callMod('wpsg_mod_abo', 'isAboOrder', array($o['id'])) === 1) { ?>
+ <?php echo $this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($o['id'])) ?>
+ <?php } else if ($this->callMod('wpsg_mod_abo', 'isAboOrder', array($o['id'])) === 2) { ?>
+ <?php
+
+ $origin_order_id = $this->callMod('wpsg_mod_abo', 'getOriginOrder', array($o['id']));
+ $origin_order_data = $this->cache->loadOrder($origin_order_id);
+
+ ?>
+ <?php echo $this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array(
+ $origin_order_data['id']
+ )) ?><br />
+ <?php echo wpsg_translate(__('Verlängerung zu Bestellung <a href="#1#">#2#</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$origin_order_id, $origin_order_data['onr']); ?>
+ <?php } ?>
+ </td>
+ <?php } ?>
+ <td>
+ <?php echo wpsg_hspc($this->arStatus[$o['status']]); ?>
+ </td>
+ </tr>
+ <?php $i++; } ?>
+ </tbody>
+ <tfoot>
+ <tr>
+ <th class="manage-column column-cb check-column" scope="col"><input type="checkbox" value="1" id="wpsg_check_all_order_2" onclick="wpsg_checkOrderCol(this);" name="" /></th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'nr')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <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'] == 'customer')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('customer');">
+ <span><?php echo __("Kunde", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'payment')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('payment');">
+ <span><?php echo __("Bezahlmethode", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'shipping')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('shipping');">
+ <span><?php echo __("Versandart", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'produkte')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('produkte');">
+ <span><?php echo __("Produkte", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'amount')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('amount');">
+ <span><?php echo __("Bestellwert", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <?php if ($this->hasMod('wpsg_mod_abo')) { ?>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'abo')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('abo');">
+ <span><?php echo __("Abo Ende", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <?php } ?>
+ <th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'status')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <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 bottom">
+ <div class="alignleft actions">
+ <select name="wpsg_action" id="wpsg_action">
+ <option value="-1"><?php echo __('Aktion wählen', 'wpsg'); ?></option>
+ <?php foreach ($this->arStatus as $k => $status) { ?>
+ <option value="<?php echo $k; ?>"><?php echo wpsg_translate(__('Status auf "#1#" setzen.', 'wpsg'), $status); ?></option>
+ <?php } ?>
+ <option value="multiDelete"><?php echo __('Bestellungen löschen', 'wpsg'); ?></option>
+ <?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
+ <option value="writeRechnung"><?php echo __('Rechnung schreiben', 'wpsg'); ?></option>
+ <option value="showRechnung"><?php echo __('Rechnung ansehen', 'wpsg'); ?></option>
+ <?php } ?>
+ </select>
+ <input onclick="if (jQuery('#wpsg_action').val() == 'multiDelete') { if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false; } jQuery('#wpsg_order_index_noheader').attr('name', 'noheader');" type="submit" value="<?php echo __('Ausführen', 'wpsg'); ?>" class="button-secondary action" id="doaction" name="wpsg_order_doaction" />
+ </div>
+
+ <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="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(1);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&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 onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['seite'] - 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&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 onfocus="jQuery('#wpsg_mod_export_noheader').attr('name', '');" 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 onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['seite'] + 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&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 onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['pages']; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&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 $this->callMod('wpsg_mod_export', 'produkt_index_foot'); ?>
+
+ </form>
+ <?php } else { ?>
+ <br /><br />
+ <p><?php echo __('Keine Bestellungen in der Datenbank.', 'wpsg'); ?></p>
+ <?php } ?>
+
+</div> \ No newline at end of file
diff --git a/views/order/orderlog.phtml b/views/order/orderlog.phtml
new file mode 100644
index 0000000..df51721
--- /dev/null
+++ b/views/order/orderlog.phtml
@@ -0,0 +1,32 @@
+<?php
+
+ /**
+ * Template für das Bestell Log
+ */
+
+?>
+<?php if (is_array($this->view['log']) && sizeof($this->view['log']) > 0) { ?>
+<table class="wpsg_orderlog">
+ <tr>
+ <th class="col_date"><?php echo __('Datum', 'wpsg'); ?></th>
+ <th class="col_title"><?php echo __('Titel', 'wpsg'); ?></th>
+ <th class="col_aktion"></th>
+ </tr>
+ <?php foreach ($this->view['log'] as $l) { ?>
+ <tr>
+ <td class="col_date"><?php echo date('d.m.Y H:i:s', strtotime($l['cdate'])); ?></td>
+ <td class="col_title"><?php echo $l['title']; ?></td>
+ <td class="col_aktion">
+ <a href="#" onclick="jQuery('#wpsg_mailtext_<?php echo $l['id']; ?>').toggle(); return false"><?php echo __('Anzeigen/Verbergen', 'wpsg'); ?></a>
+ </td>
+ </tr>
+ <tr id="wpsg_mailtext_<?php echo $l['id']; ?>" style="display:none;">
+ <td colspan="3" class="col_mailtext">
+ <textarea readonly="readonly"><?php echo wpsg_xss($l['mailtext']); ?></textarea>
+ </td>
+ </tr>
+ <?php } ?>
+</table>
+<?php } else { ?>
+<?php echo __('Noch keine Einträge', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/order/view.phtml b/views/order/view.phtml
new file mode 100644
index 0000000..062c5c8
--- /dev/null
+++ b/views/order/view.phtml
@@ -0,0 +1,581 @@
+<?php
+
+ /**
+ * Template für die Ansicht einer Bestellung im Backend
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_editInvoiceAdress()
+ {
+
+ jQuery('#wpsg_InvoiceDialog').dialog( {
+ 'dialogClass': 'wp-dialog',
+ 'modal': true,
+ 'width': 600,
+ 'title': '<?php echo __('Anschrift ändern (Kundendaten)', '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&wpsg_action=saveInvoiceAdress&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
+ data: {
+ form_data: jQuery('#wpsg_InvoiceDialog input, #wpsg_InvoiceDialog select').serialize()
+ },
+ success: function(data) {
+
+ location.href = location.href;
+
+ }
+ } );
+
+ }
+ }
+ } );
+
+ return false;
+
+ }
+
+ function wpsg_reloadOrderLog()
+ {
+
+ jQuery('#wpsg_orderlog_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-Order&action=ajax&wpsg_action=orderLog&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
+ success: function(data) {
+ jQuery('#wpsg_orderlog_content').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_reloadOrderLog()
+
+ jQuery(document).ready(function() {
+
+ jQuery('body').append('<div id="wpsg_backend_loading" style="display:none;"><div class="wpsg_inner"><?php echo __('Bestellung wird aktualisiert.', 'wpsg'); ?><br /><br /><img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" /></div></div>');
+
+ jQuery("#normal-sortables, #side-sortables").sortable({
+ connectWith: ".meta-box-sortables",
+ placeholder: 'wpsg_placeholder',
+ dropOnEmpty: true,
+ cursor: 'move',
+ grid: [50, 20],
+ items: ".postbox",
+ handle: '.wpsg_handlediv',
+ 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_order_view_normal', ser);
+
+ var ser = jQuery("#side-sortables").sortable("serialize");
+ ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
+
+ jQuery.cookie('wpsg_order_view_side', ser);
+
+ },
+ receive: function(e, ui) {
+ }
+ });
+
+ if (jQuery.cookie('wpsg_order_view_normal') != null)
+ {
+
+ var divs = jQuery.cookie('wpsg_order_view_normal').split(',').reverse();
+
+ for (index in divs)
+ {
+
+ jQuery('#normal-sortables').prepend(jQuery('#wpsg_' + divs[index]));
+
+ }
+
+ }
+
+ if (jQuery.cookie('wpsg_order_view_side') != null)
+ {
+
+ var divs = jQuery.cookie('wpsg_order_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_order_view .postbox .inside:hidden').each(function() {
+ arClose.push(jQuery(this).parent().attr("id"));
+ } );
+
+ jQuery.cookie('wpsg_order_closed', arClose.join(','));
+
+ } );
+
+ if (jQuery.cookie('wpsg_order_closed') != null)
+ {
+
+ var arClose = jQuery.cookie('wpsg_order_closed').split(',');
+
+ for (index in arClose)
+ {
+
+ if (arClose[index].length > 0) jQuery('#' + arClose[index] + ' .inside').hide();
+
+ }
+
+ }
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+/* ]]> */</script>
+
+<div class="wrap columns-2 wpsg_order_view">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
+ <h2>
+ <?php echo wpsg_translate(__('Bestellung #1#', 'wpsg'), $this->view['data']['onr']); ?>
+ </h2>
+ <br />
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <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 meta-box-sortables ui-sortable" style="width:380px;">
+
+ <div id="wpsg_ranschrift" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Kundendaten', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Kundennummer', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <?php echo wpsg_hspc($this->view['data']['knr']); ?>
+ <?php if ($this->hasMod('wpsg_mod_kundenverwaltung')) { ?>
+ [&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $this->view['data']['k_id']; ?>"><?php echo __('Zum Kunden', 'wpsg'); ?></a>&nbsp;]</a>
+ <?php } ?>
+ </p>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Anschrift', 'wpsg'); ?>:
+ <a style="float:none; display:inline-block;" onclick="return wpsg_editInvoiceAdress();" 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['data']['firma']) != '') { ?>
+ <?php echo wpsg_hspc($this->view['data']['firma']); ?><br />
+ <?php } ?>
+ <?php echo (($this->view['data']['title'] != '' && $this->view['data']['title'] != '-1')?wpsg_hspc($this->view['data']['title']).' ':''); ?><?php echo wpsg_hspc($this->view['data']['vname']); ?> <?php echo wpsg_hspc($this->view['data']['name']); ?><br />
+ <?php echo wpsg_hspc($this->view['data']['strasse']); ?><br />
+ <?php echo wpsg_hspc($this->view['data']['plz']); ?> <?php echo wpsg_hspc($this->view['data']['ort']); ?> <?php echo wpsg_hspc($this->view['country']['kuerzel']); ?><br />
+ </p>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <div id="wpsg_InvoiceDialog" class="wpsg_dialog" style="display:none;">
+ <?php echo wpsg_drawForm_Input('dialog_firma', __('Firma', 'wpsg'), $this->view['data']['firma']); ?>
+ <?php echo wpsg_drawForm_Select('dialog_title', __('Anschrift', 'wpsg'), $this->view['arTitles'], $this->view['data']['title'], array('noIndex' => true)); ?>
+ <?php echo wpsg_drawForm_Input('dialog_vname', __('Vorname', 'wpsg'), $this->view['data']['vname']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_name', __('Name', 'wpsg'), $this->view['data']['name']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_strasse', __('Straße', 'wpsg'), $this->view['data']['strasse']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_plz', __('Postleitzahl', 'wpsg'), $this->view['data']['plz']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_ort', __('Ort', 'wpsg'), $this->view['data']['ort']); ?>
+ <?php echo wpsg_drawForm_Select('dialog_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['data']['land']); ?>
+ <br />
+ <?php echo wpsg_drawForm_Checkbox('dialog_shipping', __('Auch Lieferanschrift anpassen', 'wpsg'), false); ?>
+ </div>
+
+ <?php if (strtotime($this->view['data']['geb']) > 0) { ?>
+ <?php echo wpsg_drawForm_Input('', __('Geburtsdatum', 'wpsg'), wpsg_fromDate($this->view['data']['geb']), array('text' => true)); ?>
+ <?php } ?>
+
+ <?php if (strlen($this->view['data']['fax']) > 0) { ?>
+ <?php echo wpsg_drawForm_Input('', __('Fax', 'wpsg'), $this->view['data']['fax'], array('text' => true)); ?>
+ <?php } ?>
+
+ <?php if (strlen($this->view['data']['tel']) > 0) { ?>
+ <?php echo wpsg_drawForm_Input('', __('Telefon', 'wpsg'), $this->view['data']['tel'], array('text' => true)); ?>
+ <?php } ?>
+
+ <?php if (strlen($this->view['data']['ustidnr']) > 0) { ?>
+ <?php echo wpsg_drawForm_Input('', __('UStIdNr.', 'wpsg'), $this->view['data']['ustidnr'], array('text' => true)); ?>
+ <?php } ?>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('E-Mail', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <a href="mailto:<?php echo $this->view['data']['email']; ?>"><?php echo $this->view['data']['email']; ?></a>
+ </p>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <?php $this->callMods('wpsg_order_view_customerdata', array(&$this->view['data']['id'])); ?>
+
+ </div>
+ </div>
+
+ <div id="wpsg_shippayment" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Versand- und Zahlungsart', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Versandart', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <?php echo wpsg_hspc($this->view['oOrder']->getShippingTypName()); ?>
+ <?php if (isset($this->view['basket']['sum']['preis_shipping']) && $this->view['basket']['sum']['preis_shipping'] > 0) { ?>
+ (<?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?>)
+ <?php } ?>
+ </p>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Zahlungsart', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+
+ <?php echo __($this->view['arPayment'][$this->view['data']['type_payment']]['name'], 'wpsg'); ?>
+ <?php if (isset($this->view['basket']['sum']['preis_payment']) && $this->view['basket']['sum']['preis_payment'] > 0) { ?>
+ (<?php echo wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); ?>)
+ <?php } ?>
+
+ </p>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php $this->callMods('order_view_afterpayment', array(&$this->view['data']['id'])); ?>
+
+ </div>
+ </div>
+
+ <?php if (trim($this->view['data']['order_comment']) != '') { ?>
+ <div id="wpsg_comment" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Bestellkommentar (Kunde)', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_hspc($this->view['data']['order_comment']); ?>
+ </div>
+ </div>
+ <?php } ?>
+
+ <div id="wpsg_admincomment" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Bestellkommentar (Admin)', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <form action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=setAdminComment&edit_id=<?php echo $this->view['data']['id']; ?>" method="post">
+ <textarea class="wpsg_order_admincomment" name="wpsg_order_admincomment"><?php echo wpsg_hspc($this->view['data']['admincomment']); ?></textarea>
+ <input class="button wpsg_order_admincomment_submit" type="submit" value="<?php echo __('Senden', 'wpsg'); ?>" name="admincomment_submit" />
+ </form>
+ </div>
+ </div>
+
+ <?php $this->callMods('order_view_sidebar', array(&$this->view['data']['id'])); ?>
+
+ </div>
+ </div>
+
+ <div id="post-body">
+ <div id="normal-sortables" class="meta-box-sortables" style="margin-right:400px;">
+ <div class="postbox" id="wpsg_generally">
+ <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 wpsg_order_top">
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Bestellnummer', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <?php echo wpsg_hspc($this->view['data']['onr']); ?> [<?php echo wpsg_hspc($this->arStatus[$this->view['data']['status']]); ?>]
+ </p>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <?php if (wpsg_isSizedString($this->view['data']['language']) && $this->view['data']['language'] != $this->getCurrentLanguage()) { $arLang = $this->getStoreLanguages(); $lang = $arLang[$this->view['data']['language']]; ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Sprache', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <img src="<?php echo $this->getFlagURL().$lang['flag']; ?>" alt="<?php echo wpsg_translate(__('Produkt für Sprache #1# bearbeiten.', 'wpsg'), $lang['name']); ?>" />
+ <?php echo $lang['name']; ?>
+ </p>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php } ?>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Bestelleingang', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <?php echo date('d.m.Y H:i:s', strtotime($this->view['data']['cdate'])); ?>
+ </p>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=switchStatus&amp;edit_id=<?php echo $this->view['data']['id']; ?>&amp;noheader=1" enctype="multipart/form-data">
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Statusänderung', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <select id="wpsg_order_view_status" name="status" style="float:left;">
+ <?php foreach ($this->arStatus as $k => $v) { ?>
+ <option value="<?php echo wpsg_hspc($k); ?>" <?php echo (($k == $this->view['data']['status'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($v); ?></option>
+ <?php } ?>
+ </select>
+ &nbsp;<input style="width:auto;" type="submit" class="button wpsg_button" id="wpsg_order_view_status_submit" name="wpsg_statusaenderung" value="<?php echo __('Status ändern', 'wpsg'); ?>" />
+ <div class="wpsg_clear"></div>
+ <label style="line-height:250%;">
+ <input style="width:auto;" type="checkbox" value="1" name="sendMail" /> <?php echo __('Kunde informieren', 'wpsg'); ?>
+ </label>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php $this->callMods('order_view_switchStatus', array(&$this->view['data']['id'])); ?>
+ </form>
+
+ <?php if (wpsg_isSizedInt($this->get_option('wpsg_debugModus'))) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <span class="wpsg_developer"><?php echo __('Entwickler Optionen', 'wpsg'); ?>:</span>
+ </div>
+ <div class="wpsg_form_right">
+ <span class="wpsg_developer">
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_customermail&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Kundenmail simulieren (An Shop Betreiber)', 'wpsg'); ?></a><br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_adminmail&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Adminmail simulieren', 'wpsg'); ?></a><br />
+ <a href="<?php echo $this->getDoneURL($this->view['data']['id']); ?>"><?php echo __('Bestellabschlußseite', 'wpsg'); ?></a><br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_urlbuy&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('URL Benachrichtigung (Kauf) auslösen', 'wpsg'); ?></a><br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_urlpay&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('URL Benachrichtigung (Bezahlung) auslösen', 'wpsg'); ?></a><br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>&debugBasket=1"><?php echo __('Warenkorbdaten anzeigen', 'wpsg'); ?></a><br />
+ <?php if (wpsg_isSizedInt($_REQUEST['debugBasket'])) { ?>
+ <?php wpsg_debug($this->view['basket']); ?>
+ <?php } ?>
+ </span>
+ </div>
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php } ?>
+
+ </div>
+ </div>
+
+ <div class="postbox" id="wpsg_orderdata">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Bestelldaten', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <table class="wpsg_produkte">
+ <tr class="wpsg_kopf">
+ <th class="wpsg_cell_name"><?php echo __('Produktname', 'wpsg'); ?></th>
+ <th class="wpsg_cell_preis"><?php echo __('Einzelpreis', 'wpsg'); ?></th>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
+ <?php } ?>
+ <th class="wpsg_cell_menge"><?php echo __("Anzahl", "wpsg"); ?></th>
+ <th class="wpsg_cell_gesamtpreis"><?php echo __("Gesamtpreis", "wpsg"); ?></th>
+ </tr>
+ <?php $i = 0; foreach ($this->view['basket']['produkte'] as $produkt_key => $p) { $i ++; ?>
+ <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="wpsg_cell_name">
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id=<?php echo $this->getProduktID($p['id']); ?>" title="<?php echo __('Zum Produkt', 'wpsg'); ?>">
+ <?php echo wpsg_hspc($this->getProductName($this->getProduktID($p['id']))); ?>
+ </a>
+ </td>
+ <td class="wpsg_cell_preis"><?php echo wpsg_ff($p['preis']); ?> <?php echo $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($p['mwst_value']); ?> %</td>
+ <?php } ?>
+ <td class="wpsg_cell_menge"><?php echo wpsg_hspc($p['menge']); ?></td>
+ <td class="wpsg_cell_gesamtpreis"><?php echo wpsg_ff($p['menge'] * $p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
+ </tr>
+ <?php if (wpsg_isSizedArray($p['order_allowedshipping'])) { ?>
+ <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="wpsg_cell_name">
+ <?php echo __('Mögliche Versandarten', 'wpsg'); ?>:
+ </td>
+ <td class="wpsg_cell_gesamtpreis" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?4:3); ?>">
+ <?php $j = 0; foreach ($p['order_allowedshipping'] as $shipping) { $j ++; ?>
+ <?php echo $this->getShippingName($shipping); ?><?php if ($j < sizeof($p['order_allowedshipping'])) { ?>, <?php } ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php $this->callMods('order_view_row', array(&$p, $i)); ?>
+ <?php } ?>
+ <?php if (isset($this->view['basket']['gs'])) { ?>
+ <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_gutschein">
+ <td class="wpsg_cell_name"><?php echo __('Gutschein', 'wpsg'); ?> <?php echo ($this->view['basket']['gs']['code'] != '')? '('.$this->view['basket']['gs']['code'].')':'' ?></td>
+ <td class="wpsg_cell_preis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $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 __('anteilig', 'wpsg'); ?></td>
+ <?php } ?>
+ <td class="wpsg_cell_menge">1</td>
+ <td class="wpsg_cell_gesamtpreis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+ <?php if (isset($this->view['basket']['sum']['preis_rabatt']) && $this->view['basket']['sum']['preis_rabatt'] > 0) { ?>
+ <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_row_rabatt">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_rabatt_label">
+ <?php echo __('Abzüglich Rabatt', 'wpsg'); ?>
+ </td>
+ <td class="wpsg_cell_rabatt_value">
+ <?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <tr class="wpsg_row_summe">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
+ <?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
+ <?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } else { ?>
+ <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } ?>
+ <?php } ?>
+ </td>
+ <td class="wpsg_cell_summe_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php if ($this->view['basket']['sum']['preis_shipping'] != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
+ <tr class="wpsg_row_shipping">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_shipping_label">
+ <a href="<?php echo $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN); ?>" target="_blank"><?php echo __('Versandkosten', 'wpsg'); ?></a>
+ </td>
+ <td class="wpsg_cell_shipping_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php if ($this->view['basket']['sum']['preis_payment'] != 0 || $this->get_option('wpsg_hideemptypayment') != '1') { ?>
+ <tr class="wpsg_row_payment">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_payment_label">
+ <?php echo __('Zahlungsart', 'wpsg'); ?>
+ </td>
+ <td class="wpsg_cell_payment_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_payment']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php if ($this->get_option('wpsg_preisangaben') == '1' && $this->get_option('wpsg_kleinunternehmer') != '1') { ?>
+ <?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
+ <tr class="wpsg_row_mwst">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
+ <?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
+ </td>
+ <td class="wpsg_cell_mwst_value">
+ <?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php } ?>
+ <tr class="wpsg_row_gesamt">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_gesamt_label">
+ <?php echo __('Gesamtpreis', 'wpsg'); ?>
+ </td>
+ <td class="wpsg_cell_gesamt_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php if ($this->get_option('wpsg_kleinunternehmer') == '1' || $this->get_option('wpsg_preisangaben') != '1') { ?>
+ <?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
+ <tr class="wpsg_row_mwst">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
+ <?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
+ <?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
+ <?php } ?>
+ </td>
+ <td class="wpsg_cell_mwst_value">
+ <?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php } ?>
+ </table>
+
+ </div>
+ </div>
+
+ <?php $this->callMods('order_view_content', array($this->view['data']['id'])); ?>
+
+ <div class="postbox" id="wpsg_orderlog">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Bestellprotokoll', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside" id="wpsg_orderlog_content">
+ <?php echo $this->view['orderLog']; ?>
+ </div>
+ </div>
+
+ </div>
+
+ </div>
+
+ </div>
+
+</div> \ No newline at end of file
diff --git a/views/produkt/addedit.phtml b/views/produkt/addedit.phtml
new file mode 100644
index 0000000..edba548
--- /dev/null
+++ b/views/produkt/addedit.phtml
@@ -0,0 +1,524 @@
+<?php
+
+ /**
+ * Template für das Produkt Anlegen/Bearbeiten Formular
+ * Hier sollten keine Anpassungen vorgenommen werden
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ wpsg_product_edit_change = new Array();
+
+ 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',
+ grid: [50, 20],
+ handle: '.wpsg_handlediv',
+ 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_product_view_normal', ser);
+
+ var ser = jQuery("#side-sortables").sortable("serialize");
+ ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
+
+ jQuery.cookie('wpsg_product_view_side', ser);
+
+ },
+ receive: function(e, ui) {
+ }
+ });
+
+ if (jQuery.cookie('wpsg_product_view_normal') != null)
+ {
+
+ var divs = jQuery.cookie('wpsg_product_view_normal').split(',').reverse();
+
+ for (index in divs)
+ {
+
+ jQuery('#normal-sortables').prepend(jQuery('#wpsg_' + divs[index]));
+
+ }
+
+ }
+
+ if (jQuery.cookie('wpsg_product_view_side') != null)
+ {
+
+ var divs = jQuery.cookie('wpsg_product_view_side').split(',').reverse();
+
+ for (index in divs)
+ {
+
+ jQuery('#side-sortables').prepend(jQuery('#wpsg_' + divs[index]));
+
+ }
+
+ }
+
+ var click_x = false;
+ var click_y = false;
+
+ jQuery('.wpsg_handlediv').bind('click', function(ev) {
+
+ if (Math.abs(click_x - ev.pageX) <= 5 && Math.abs(click_y - ev.pageY) <= 5)
+ {
+
+ jQuery(this).next().toggle();
+
+ var arClose = new Array();
+ jQuery('.wpsg_product_view .postbox .inside:hidden').each(function() {
+ arClose.push(jQuery(this).parent().attr("id"));
+ } );
+
+ jQuery.cookie('wpsg_product_closed', arClose.join(','));
+
+ }
+
+ } );
+
+ jQuery('.wpsg_handlediv').bind('mousedown', function(ev) {
+
+ click_x = ev.pageX;
+ click_y = ev.pageY;
+
+ } );
+
+ if (jQuery.cookie('wpsg_product_closed') != null && jQuery.cookie('wpsg_product_closed') != '')
+ {
+
+ var arClose = jQuery.cookie('wpsg_product_closed').split(',');
+
+ for (index in arClose)
+ {
+
+ jQuery('#' + arClose[index] + ' .inside').hide();
+
+ }
+
+ }
+
+ jQuery('#submit, #submit_index').bind('click', function() {
+
+ if (wpsg_product_edit_change.length > 0)
+ {
+
+ jQuery('.wpsg_change_error').removeClass('wpsg_change_error');
+
+ for (var i = 0; i < wpsg_product_edit_change.length; i++) {
+
+ jQuery('#' + wpsg_product_edit_change[i]).addClass('wpsg_change_error');
+
+ }
+
+ alert('<?php echo __('Bitte überprüfen Sie die rot markierten Felder. Änderungen in diesen Feldern gehen beim Speichern verloren.', 'wpsg'); ?>');
+
+ return false;
+
+ }
+ else
+ {
+
+ return true;
+
+ }
+
+ } );
+
+ // Flaggen für die aktuelle Sprache davorbauen
+ <?php if ($this->isMultiLingual() && isset($_REQUEST['wpsg_lang'])) { $arLang = $this->getStoreLanguages(); $lang = $arLang[$_REQUEST['wpsg_lang']]; ?>
+ jQuery('.wpsg_handlediv').prepend('<img src="<?php echo $this->getFlagURL().$lang['flag']; ?>" alt="<?php echo $lang['name']; ?>" />&nbsp;');
+ <?php } ?>
+
+ } );
+
+/* ]]> */</script>
+
+<div class="wrap columns-2 wpsg_produkt_addedit wpsg_product_view" id="wpsg_product_view">
+
+ <div id="wpsg_relatedproducts_produktauswahl"></div>
+
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
+ <h2>
+ <?php if ($_REQUEST['edit_id'] > 0) { ?>
+ <?php echo __('Produkt bearbeiten', 'wpsg'); ?>
+ <?php if (isset($_REQUEST['wpsg_lang'])) { ?>
+ &nbsp;[<?php $arLang = $this->getStoreLanguages(); echo $arLang[$_REQUEST['wpsg_lang']]['name']; ?> <img src="<?php echo $this->getFlagURL().$arLang[$_REQUEST['wpsg_lang']]['flag']; ?>" alt="" />]
+ <?php } ?>
+ <?php } else { ?>
+ <?php echo __('Neues Produkt', 'wpsg'); ?>
+ <?php } ?>
+ </h2>
+ <br />
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&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;">
+
+ <?php if (!isset($_REQUEST['wpsg_lang'])) { ?>
+ <div id="wpsg_preis" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <div class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></div>
+ <span><?php echo __('Preis / Steuer', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ <?php echo wpsg_drawForm_Select('mwst_key', __('Steuergruppe', 'wpsg'), wpsg_tax_groups(true), $this->view['data']['mwst_key']); ?>
+ <?php if ($this->get_option('wpsg_preisangaben') == WPSG_NETTO) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="preis">
+ <?php echo __('Preis (NETTO)', 'wpsg'); ?>:
+ </label>
+ </div>
+ <div class="wpsg_form_right">
+ <p class="waehrung"><?php echo $this->get_option('wpsg_currency'); ?></p>
+ <input id="preis" type="text" value="<?php echo wpsg_hspc(wpsg_ff($this->view['data']['preis'])); ?>" name="preis" class="wpsg_preis" />
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <?php if ($this->get_option('wpsg_preisangaben') == WPSG_BRUTTO) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Preis (BRUTTO)', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p class="waehrung"><?php echo $this->get_option('wpsg_currency'); ?></p>
+ <input id="preis" type="text" value="<?php echo wpsg_hspc(wpsg_ff($this->view['data']['preis'])); ?>" name="preis" class="wpsg_preis" />
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <?php echo wpsg_drawForm_Input('', __('Steueranteil', 'wpsg'), wpsg_ff($this->view['data']['tax_sum_value'], $this->get_option('wpsg_currency')).' / '.$this->getDefaultCountry()->kuerzel, array('text' => true)); ?>
+ <?php echo wpsg_drawForm_Checkbox('euleistungsortregel', __('Produkt unterliegt den EU-Leistungsortregeln', 'wpsg'), $this->view['data']['euleistungsortregel'], array('fullrow' => true, 'help' => 'EU-Leistungsortregel')); ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=laender">Länderverwaltung</a>
+ </div>
+ </div>
+ <div id="wpsg_paymentmethods" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <div class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></div>
+ <span><?php echo __('Erlaubte Zahlungsarten', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside wpsg_form_field_max">
+ <select id="wpsg_paymentmethods_select" name="wpsg_paymentmethods_select">
+ <option value="0"><?php echo __('Alle', 'wpsg'); ?></option>
+ <option value="1" <?php echo ((wpsg_isSizedArray($this->view['allowedPayment']))?'selected="selected"':''); ?>><?php echo __('Auswahl', 'wpsg'); ?></option>
+ </select>
+ <div class="wpsg_paymentmethods_select">
+ <?php foreach ($this->arPayment as $p) { if (!isset($p['deleted']) || $p['deleted'] != '1') { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_paymentmethods[]', $p['name'], in_array($p['id'], (array)$this->view['allowedPayment']), array('id' => 'wpsg_paymentmethods_'.$p['id'], 'value' => $p['id'])); ?>
+ <?php } } ?>
+ </div>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#wpsg_paymentmethods_select').bind('change', function() {
+
+ if (jQuery(this).val() == '1')
+ {
+
+ jQuery('.wpsg_paymentmethods_select').show();
+
+ }
+ else
+ {
+
+ jQuery('.wpsg_paymentmethods_select').hide();
+
+ }
+
+ } ).change();
+
+ /* ]]> */</script>
+ </div>
+ </div>
+ <div id="wpsg_shippingmethods" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <div class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br /></div>
+ <span><?php echo __('Erlaubte Versandarten', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside wpsg_form_field_max">
+ <select id="wpsg_shippingmethods_select" name="wpsg_shippingmethods_select">
+ <option value="0"><?php echo __('Alle', 'wpsg'); ?></option>
+ <option value="1" <?php echo ((wpsg_isSizedArray($this->view['allowedShipping']))?'selected="selected"':''); ?>><?php echo __('Auswahl', 'wpsg'); ?></option>
+ </select>
+ <div class="wpsg_shippingmethods_select">
+ <?php foreach ($this->arShipping as $s) { if (!isset($s['deleted']) || $s['deleted'] != '1') { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_shippingmethods[]', $s['name'], in_array($s['id'], (array)$this->view['allowedShipping']), array('id' => 'wpsg_paymentmethods_'.$s['id'], 'value' => $s['id'])); ?>
+ <?php } } ?>
+ </div>
+ </div>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#wpsg_shippingmethods_select').bind('change', function() {
+
+ if (jQuery(this).val() == '1')
+ {
+
+ jQuery('.wpsg_shippingmethods_select').show();
+
+ }
+ else
+ {
+
+ jQuery('.wpsg_shippingmethods_select').hide();
+
+ }
+
+ } ).change();
+
+ /* ]]> */</script>
+ </div>
+ <?php } ?>
+
+ <?php $this->callMods('produkt_edit_sidebar', array(&$this->view['data'])); ?>
+
+ </div>
+ </div>
+
+ <div id="post-body">
+
+ <div id="titlediv" style="margin-right:400px;">
+ <div id="titlewrap">
+ <input type="text" placeholder="<?php echo __('Produktname', 'wpsg'); ?>" id="title" value="<?php echo wpsg_hspc($this->view['data']['name']); ?>" tabindex="1" size="30" name="name">
+ </div>
+ </div>
+
+ <br />
+
+ <div id="normal-sortables" class="meta-box-sortables" style="margin-right:400px;">
+
+ <div id="wpsg_generally" 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 if ($this->isMultiLingual()) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="produkt_anr"><?php echo __("Übersetzungen", "wpsg"); ?>:</label>
+ </div>
+ <div class="wpsg_form_right wpsg_form_language">
+ <?php foreach ($this->getStoreLanguages() as $a) { ?>
+ <?php if ((isset($_REQUEST['wpsg_lang']) && $_REQUEST['wpsg_lang'] != $a['locale']) || (!isset($_REQUEST['wpsg_lang']) && $a['lang'] != $GLOBALS['q_config']['default_language'])) { ?>
+ <?php if (isset($_REQUEST['wpsg_lang']) && $a['lang'] == $GLOBALS['q_config']['default_language']) { ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id=<?php echo $_REQUEST['edit_id']; ?>" title="<?php echo wpsg_translate(__('Zu Sprache #1# wechseln.', 'wpsg'), $a['name']); ?>">
+ <?php } else { ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id=<?php echo $_REQUEST['edit_id']; ?>&wpsg_lang=<?php echo $a['locale']; ?>" title="<?php echo wpsg_translate(__('Zu Sprache #1# wechseln.', 'wpsg'), $a['name']); ?>">
+ <?php } ?>
+ <img src="<?php echo $this->getFlagURL().$a['flag']; ?>" alt="<?php echo wpsg_translate(__('Zu Sprache #1# wechseln.', 'wpsg'), $a['name']); ?>" />
+ </a>
+ <?php } ?>
+ <?php } ?>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="produkt_anr"><?php echo __("Produktname (Detail)", "wpsg"); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input id="detailname" type="text" value="<?php echo wpsg_hspc($this->view['data']['detailname']); ?>" name="detailname" />
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php if (wpsg_isSizedInt($this->view['data']['id']) && !isset($_REQUEST['wpsg_lang'])) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="produkt_id"><?php echo __('Produkt ID', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input type="text" name="produkt_id" value="<?php echo wpsg_hspc($this->view['data']['id']); ?>" readonly="readonly" />
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <?php if (!isset($_REQUEST['wpsg_lang'])) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="produkt_anr"><?php echo __("Artikelnummer", "wpsg"); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input id="produkt_anr" type="text" value="<?php echo wpsg_hspc($this->view['data']['anr']); ?>" name="anr" />
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="produkt_ptemplate"><?php echo __('Produkttemplate', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <?php if (!is_array($this->view['templates']) || sizeof($this->view['templates']) <= 0) { ?>
+ <p class="wpsg_error"><?php echo __('Keine Templatedatein gefunden!', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <select name="ptemplate_file" id="produkt_ptemplate">
+ <?php foreach ($this->view['templates'] as $t) { ?>
+ <option <?php echo (($t == $this->view['data']['ptemplate_file'] || (!isset($this->view['data']['ptemplate_file']) && $t == 'standard.phtml'))?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($t); ?>"><?php echo wpsg_hspc($t); ?></option>
+ <?php } ?>
+ </select>
+ <?php } ?>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="produkt_ptemplate"><?php echo __('URL Benachrichtigung', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input style="width:95%;" type="text" name="posturl" class="wpsg_posturl" value="<?php echo wpsg_hspc($this->view['data']['posturl']); ?>" />
+ <div class="wpsg_clear"></div>
+ <label><input type="checkbox" <?php echo (($this->view['data']['posturl_verkauf'] == '1')?'checked="checked"':''); ?> value="1" name="posturl_verkauf" style="width:auto; float:none;" />&nbsp;<?php echo __('beim Verkauf', 'wpsg'); ?></label>
+ &nbsp;&nbsp;
+ <label><input type="checkbox" <?php echo (($this->view['data']['posturl_bezahlung'] == '1')?'checked="checked"':''); ?> value="1" name="posturl_bezahlung" style="width:auto; float:none;" />&nbsp;<?php echo __('bei Bezahlung', 'wpsg'); ?></label>
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=URLBenachrichtigung" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=URLBenachrichtigung" class="wpsg_form_help"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+
+ <?php if (!$this->hasMod('wpsg_mod_produktartikel') && !isset($_REQUEST['wpsg_lang'])) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="partikel"><?php echo __('Zugeordneter Wordpress Artikel', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <select id="partikel" name="partikel">
+ <option value=""><?php echo __("Bitte auswählen", "wpsg"); ?></option>
+ <?php $arArtikel = get_posts('numberposts=-1'); if (is_array($arArtikel) && sizeof($arArtikel) > 0) { ?>
+ <optgroup label="<?php echo __('Artikel', 'wpsg'); ?>">
+ <?php foreach ($arArtikel as $a) { ?>
+ <option <?php echo (($a->ID == $this->view['data']['partikel'])?'selected="selected"':''); ?> value="<?php echo $a->ID; ?>"><?php echo $a->post_title; ?></option>
+ <?php } ?>
+ </optgroup>
+ <?php } ?>
+ <?php $arPages = get_pages(); if (is_array($arPages) && sizeof($arPages) > 0) { ?>
+ <optgroup label="<?php echo __('Seiten', 'wpsg'); ?>">
+ <?php foreach ($arPages as $p) { ?>
+ <option <?php echo (($p->ID == $this->view['data']['partikel'])?'selected="selected"':''); ?> value="<?php echo $p->ID; ?>"><?php echo $p->post_title; ?></option>
+ <?php } ?>
+ </optgroup>
+ <?php } ?>
+ </select>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+
+ <?php if (!isset($_REQUEST['wpsg_lang'])) { ?>
+ <?php echo wpsg_drawForm_Select('basket_multiple', __('Verhalten im Warenkorb', 'wpsg'), array(
+ '0' => __('Nur einmal mit beliebiger Menge (Standard)', 'wpsg'),
+ '4' => __('Nur einmal mit Menge 1', 'wpsg'),
+ '1' => __('Mehrfach mit beliebiger Menge', 'wpsg'),
+ '2' => __('Mehrfach mit Menge 1', 'wpsg')
+ ), $this->view['data']['basket_multiple'], array('help' => 'basket_multiple')); ?>
+ <?php } ?>
+
+ <?php if ($this->view['data']['id'] > 0) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="produkt_ptemplate"><?php echo __('URL', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <a href="<?php echo $this->getProduktLink(array('id' => ((wpsg_isSizedInt($this->view['data']['lang_parent']))?$this->view['data']['lang_parent']:$this->view['data']['id']))); ?>"><?php echo $this->getProduktLink(array('id' => ((wpsg_isSizedInt($this->view['data']['lang_parent']))?$this->view['data']['lang_parent']:$this->view['data']['id']))); ?></a>
+ </p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+
+ <?php $this->callMods('produkt_edit_allgemein', array(&$this->view['data'])); ?>
+
+ </div>
+ </div>
+
+ <div id="wpsg_description" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
+ <span><?php echo __('Beschreibung', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+
+ <?php
+
+ function wpsg_ShowTinyMCE() {
+
+
+
+ wp_print_scripts('editor');
+ if (function_exists('add_thickbox')) add_thickbox();
+ wp_print_scripts('media-upload');
+ if (function_exists('wp_tiny_mce')) wp_tiny_mce();
+ wp_admin_css();
+
+ do_action("admin_print_styles-post-php");
+ do_action('admin_print_styles');
+
+ }
+
+ function wpsg_formatTinyMCE($in)
+ {
+
+ if (isset($in['theme_advanced_buttons1'])) $in['theme_advanced_buttons1'] = str_replace(",wpsg", "", $in['theme_advanced_buttons1']);
+
+ return $in;
+
+ }
+
+ // Damit die qTranslate Interne Editor Übersetzung nicht aufgerufen wird
+ remove_filter('the_editor', 'qtrans_modifyRichEditor');
+
+ add_filter('tiny_mce_before_init', 'wpsg_formatTinyMCE');
+ add_filter('admin_head','wpsg_ShowTinyMCE');
+ wp_editor($this->view['data']['beschreibung'], 'beschreibung');
+
+ ?>
+
+ </div>
+ </div>
+
+ <?php $this->callMods('produkt_edit_content', array(&$this->view['data'])); ?>
+
+ </div>
+
+ <?php if ($_REQUEST['edit_id'] > 0) { ?>
+ <input type="hidden" name="edit_id" value="<?php echo $_REQUEST['edit_id']; ?>" />
+ <?php } ?>
+
+ <?php if (isset($_REQUEST['wpsg_lang'])) { ?>
+ <input type="hidden" name="wpsg_lang" value="<?php echo $_REQUEST['wpsg_lang']; ?>" />
+ <?php } ?>
+
+ <p class="submit">
+ <input type="submit" value="<?php echo __('Produkt speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
+ <input type="submit" value="<?php echo __('Produkt 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/produkt/import.phtml b/views/produkt/import.phtml
new file mode 100644
index 0000000..7899abb
--- /dev/null
+++ b/views/produkt/import.phtml
@@ -0,0 +1,30 @@
+<?php
+
+ /**
+ * Template für die Importmaske in der Produktverwaltung
+ */
+
+?>
+<div class="wrap">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
+ <h2>
+ <?php echo __('Produktverwaltung - Produktimport', 'wpsg'); ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&amp;action=index" class="add-new-h2"><?php echo __("Zurück zur Produktverwaltung", "wpsg"); ?></a>
+ </h2>
+
+ <?php echo $this->writeBackendMessage(); ?>
+ <br />
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&amp;action=import&noheader=1" id="import_form" enctype="multipart/form-data">
+
+ <div class="wpsg_hinweis"><?php echo __('Laden Sie ein vorher exportiertes CSV File hoch, die Produktdaten werden dann aus dieser Datei importiert.', 'wpsg'); ?></div>
+ <br />
+
+ <input type="file" name="wpsg_importfile" />
+
+ <br /><br />
+ <input type="submit" class="button-primary" value="<?php echo __('Import starten', 'wpsg'); ?>" name="wpsg_import" />
+
+ </form>
+
+</div> \ No newline at end of file
diff --git a/views/produkt/index.phtml b/views/produkt/index.phtml
new file mode 100644
index 0000000..c379079
--- /dev/null
+++ b/views/produkt/index.phtml
@@ -0,0 +1,353 @@
+<?php
+
+ /**
+ * Template für die Produktübersicht im Backend
+ */
+
+?>
+
+<script type="text/javascript">
+
+ var wpsg_order = '<?php echo $this->view['search']['order']; ?>';
+ var wpsg_ascdesc = '<?php echo $this->view['search']['ascdesc']; ?>';
+
+ function goPage(page)
+ {
+
+ if (page <= 0 || page == <?php echo $this->view['seite']; ?> || page > <?php echo $this->view['pages']; ?>) return;
+
+ jQuery('#wpsg_seite').val(page);
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ } // function goPage(page)
+
+ 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 class="wrap wpsg_produktindex">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
+ <h2>
+ <?php echo __('Produktverwaltung', 'wpsg'); ?>
+ <a href="<?php echo $this->url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=add'); ?>" class="add-new-h2"><?php echo __("Hinzufügen", "wpsg"); ?></a>
+ <?php if (wpsg_isSizedArray($this->view['data'])) { ?>
+ <a href="<?php echo $this->url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=export&noheader=1'); ?>" class="add-new-h2"><?php echo __('Exportieren', 'wpsg'); ?></a>
+ <?php } ?>
+ <a href="<?php echo $this->url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&amp;action=import'); ?>" class="add-new-h2"><?php echo __('Importieren', 'wpsg'); ?></a>
+ </h2>
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <form method="POST" id="filter_form">
+
+ <?php $this->callMod('wpsg_mod_productgroups', 'produkt_index_filter'); ?>
+
+ <p class="search-box wpsg-search-box">
+ <label for="post-search-input" class="screen-reader-text"><?php echo __('Produkte 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 __('Produkte suchen', 'wpsg'); ?>" class="button" id="search-submit" name="">
+ <?php /*<input type="button" value="&nbsp;" class="button" id="wpsg_product_search_button" /> */ ?>
+ </p>
+
+ <?php if (sizeof($this->view['data'] > 0)) { ?>
+ <div class="tablenav top wpsg_tablenav">
+
+ <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="<?php echo $this->url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&seite=1&s='.$_REQUEST['s']); ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">«</a>
+ <a onclick="return goPage(<?php echo $this->view['seite'] - 1; ?>);" href="<?php echo $this->url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&seite='.($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'); ?>" id="wpsg_seite" 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['seite'] + 1; ?>);" href="<?php echo $this->url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&seite='.($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 onclick="return goPage(<?php echo $this->view['pages']; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&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 } ?>
+
+ <input id="wpsg_order" type="hidden" name="search[order]" value="<?php echo $this->view['search']['order']; ?>" />
+ <input id="wpsg_ascdesc" type="hidden" name="search[ascdesc]" value="<?php echo $this->view['search']['ascdesc']; ?>" />
+
+ <input style="display:none;" type="submit" name="suchen" value="" />
+
+ <?php /*
+ <div class="wpsg_clear"></div>
+ <div class="metabox-holder" id="wpsg_product_index_filter_layer" style="<?php echo (($_COOKIE['wpsg_order_index_filter'] == '1')?'display:block;':'display:none;'); ?>">
+ <div id="wpsg_orderindexfilter" class="postbox">
+ <h3 class="wpsg_handlediv">
+ <span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br></span>
+ <span><?php echo __('Bestellfilter', 'wpsg'); ?></span>
+ </h3>
+ <div class="inside">
+ </div>
+ </div>
+ </div> */ ?>
+
+ </form>
+
+ <?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
+ <table class="widefat post fixed">
+ <thead>
+ <tr>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <th class="manage-column column-title wpsg_pic_col"></th>
+ <?php } ?>
+ <th class="manage-column column-title <?php echo (($this->view['search']['order'] == 'name')?'sorted':'sortable'); ?> <?php echo (($this->view['search']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <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-title <?php echo (($this->view['search']['order'] == 'anr')?'sorted':'sortable'); ?> <?php echo (($this->view['search']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('anr');">
+ <span><?php echo __("Artikelnummer", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <?php if ($this->hasMod('wpsg_mod_productgroups')) { ?>
+ <th class="manage-column column-title <?php echo (($this->view['search']['order'] == 'pgruppe')?'sorted':'sortable'); ?> <?php echo (($this->view['search']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('pgruppe');">
+ <span><?php echo __("Produktgruppe", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <?php } ?>
+ <?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showBackendStock') == '1') { ?>
+ <th class="manage-column column-title wpsg_stock_col <?php echo (($this->view['search']['order'] == 'stock')?'sorted':'sortable'); ?> <?php echo (($this->view['search']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('stock');">
+ <span><?php echo __('Lagerbestand', 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <?php } ?>
+ <th class="manage-column column-title wpsg_mwst_col <?php echo (($this->view['search']['order'] == 'mwst')?'sorted':'sortable'); ?> <?php echo (($this->view['search']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('mwst');">
+ <span><?php echo __("MwSt.", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['search']['order'] == 'price')?'sorted':'sortable'); ?> <?php echo (($this->view['search']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('price');">
+ <span><?php echo __("Preis", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->view['data'] as $d) { ?>
+ <tr>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <td class="post-title wpsg_pic_col">
+ <?php
+
+ $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($d['id']));
+
+ if (wpsg_isSizedArray($arBilder))
+ {
+
+ echo '<a href="'.WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&amp;action=edit&amp;edit_id='.$d['id'].'" title="'.wpsg_translate(__('Produkt für Sprache #1# bearbeiten.', 'wpsg'), $l['name']).'">';
+ echo '<img src="'.$this->callMod('wpsg_mod_produktbilder', 'makeTn', array($d['id'], $arBilder[0], 40, 40, 'c')).'" alt="" />';
+ echo '</a>';
+
+ }
+
+ ?>
+ </td>
+ <?php } ?>
+ <td class="post-title column-title">
+ <strong><a title="<?php echo __("Dieses Produkt bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&amp;action=edit&amp;edit_id=<?php echo $d['id']; ?>" class="row-title"><?php echo (($d['name'] == "")?__("---- ", "wpsg"):$d['name']); ?></a></strong>
+ <div class="row-actions">
+ <span class="edit"><a title="<?php echo __("Dieses Produkt bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&amp;action=edit&amp;edit_id=<?php echo $d['id']; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a></span>
+ <?php if ($this->isMultiLingual()) { ?>
+ <?php foreach ($this->getStoreLanguages() as $l) { ?>
+ <?php if ($l['locale'] != $this->getDefaultLanguageLocale()) { ?>
+ <a href="<?php echo $this->url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&amp;action=edit&amp;edit_id='.$d['id'].'&amp;wpsg_lang='.$l['locale']); ?>" title="<?php echo wpsg_translate(__('Produkt für Sprache #1# bearbeiten.', 'wpsg'), $l['name']); ?>">
+ <img src="<?php echo $this->getFlagURL().$l['flag']; ?>" alt="<?php echo wpsg_translate(__('Produkt für Sprache #1# bearbeiten.', 'wpsg'), $l['name']); ?>" />
+ </a>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ |
+ <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sicher, dass Sie das Produkt löschen wollen?", "wpsg"); ?>')) return false;" title="<?php echo __("Dieses Produkt löschen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&amp;action=del&amp;edit_id=<?php echo $d['id']; ?>&amp;noheader=1"><?php echo __("Löschen", "wpsg"); ?></a></span>
+ |
+ <span class="copy"><a onclick="if (!confirm('<?php echo __("Sind Sie sicher, dass Sie das Produkt kopieren wollen?", "wpsg"); ?>')) return false;" title="<?php echo __("Dieses Produkt kopieren", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&amp;action=copy&amp;edit_id=<?php echo $d['id']; ?>&amp;noheader=1"><?php echo __("Kopieren", "wpsg"); ?></a></span>
+ |
+ <span class="view"><a target="_blank" title="<?php echo __("Dieses Produkt im Frontend ansehen", "wpsg"); ?>" href="<?php echo $this->getProduktLink(array('id' => $d['id'])); ?>"><?php echo __("Ansehen", "wpsg"); ?></a></span>
+ <?php $this->callMods('produkt_index_editmenu', array(&$d)); ?>
+ </div>
+ </td>
+ <td><?php echo wpsg_hspc($d['anr']); ?></td>
+ <?php if ($this->hasMod('wpsg_mod_productgroups')) { ?>
+ <td>
+ <?php if ($d['pgruppe'] <= 0) { ?>
+ <?php echo __('Nicht zugewiesen', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo $d['pgruppe_name']; ?>
+ <?php } ?>
+ </td>
+ <?php } ?>
+ <?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showBackendStock') == '1') { ?>
+ <td>
+ <div style="line-height:inherit; margin-bottom:0.2em;"><?php echo $d['stock']; ?></div>
+ <?php if ($this->hasMod('wpsg_mod_varianten') && wpsg_isSizedArray($this->callMod('wpsg_mod_varianten', 'loadVarianten', array($d['id'])))) { ?>
+ <div style="line-height:inherit; padding:2px 0px 0px;">
+ <a class="clueTip" href="#" rel="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_stock&edit_id=<?php echo $d['id']; ?>&noheader=1&wpsg_cmd=getVariInfo"><?php echo __('Variantenbestand', 'wpsg'); ?></a>
+ </div>
+ <?php } ?>
+ </td>
+ <?php } ?>
+ <td class="wpsg_mwst_col">
+ <?php echo strtoupper($d['mwst_key']).' ('.wpsg_ff($d['mwst_value'], '%').' '.$this->getDefaultCountry()->kuerzel.')'; ?>
+ </td>
+ <td>
+ <?php /* if ($this->get_option('wpsg_preisangaben') == WPSG_NETTO) { ?>
+ <?php echo wpsg_ff($d['preis_netto'], $this->get_option('wpsg_currency')); ?>
+ <?php } else { */?>
+ <?php echo wpsg_ff($d['preis'], $this->get_option('wpsg_currency')); ?>
+ <?php /* } */ ?>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ <tfoot>
+ <tr>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <th class="manage-column column-title wpsg_pic_col"></th>
+ <?php } ?>
+ <th class="manage-column column-title <?php echo (($this->view['search']['order'] == 'name')?'sorted':'sortable'); ?> <?php echo (($this->view['search']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <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-title <?php echo (($this->view['search']['order'] == 'anr')?'sorted':'sortable'); ?> <?php echo (($this->view['search']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('anr');">
+ <span><?php echo __("Artikelnummer", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <?php if ($this->hasMod('wpsg_mod_productgroups')) { ?>
+ <th class="manage-column column-title <?php echo (($this->view['search']['order'] == 'pgruppe')?'sorted':'sortable'); ?> <?php echo (($this->view['search']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('pgruppe');">
+ <span><?php echo __("Produktgruppe", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <?php } ?>
+ <?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showBackendStock') == '1') { ?>
+ <th class="manage-column column-title wpsg_stock_col <?php echo (($this->view['search']['order'] == 'stock')?'sorted':'sortable'); ?> <?php echo (($this->view['search']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('stock');">
+ <span><?php echo __('Lagerbestand', 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <?php } ?>
+ <th class="manage-column column-title wpsg_mwst_col <?php echo (($this->view['search']['order'] == 'mwst')?'sorted':'sortable'); ?> <?php echo (($this->view['search']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('mwst');">
+ <span><?php echo __("MwSt.", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column column-title <?php echo (($this->view['search']['order'] == 'price')?'sorted':'sortable'); ?> <?php echo (($this->view['search']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+ <a href="#" onclick="return wpsg_setOrder('price');">
+ <span><?php echo __("Preis", 'wpsg'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </tfoot>
+ </table>
+
+ <div class="tablenav top wpsg_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 onclick="return goPage(1);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&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 onclick="return goPage(<?php echo $this->view['seite'] - 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&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']; ?>" id="wpsg_seite_bottom" 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['seite'] + 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&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 onclick="return goPage(<?php echo $this->view['pages']; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&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">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.clueTip').cluetip( {
+ width: '400px',
+ height: '400px',
+ activation: 'click',
+ sticky: true,
+ /*mouseOutClose: 'both',*/
+ closePosition: 'title',
+ arrows: true
+ } );
+
+ jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
+ jQuery('#wpsg_seite_bottom').bind('keydown', function(event) {
+
+ var keycode = (event.keyCode ? event.keyCode : event.which);
+
+ if (keycode == '13')
+ {
+
+ jQuery('#wpsg_seite').val(jQuery(this).val());
+ jQuery('#filter_form').submit();
+
+ }
+
+ } );
+
+ } );
+
+ /* ]]> */</script>
+
+ <br class="clear">
+ </div>
+
+ </div>
+
+ <?php } else { ?>
+ <p><?php echo __('Keine Produkte in der Datenbank.', 'wpsg'); ?></p>
+ <?php } ?>
+
+</div> \ No newline at end of file
diff --git a/views/produkt/mapimport.phtml b/views/produkt/mapimport.phtml
new file mode 100644
index 0000000..31326b7
--- /dev/null
+++ b/views/produkt/mapimport.phtml
@@ -0,0 +1,43 @@
+<?php
+
+ /**
+ * Template für die Importmaske in der Produktverwaltung
+ */
+
+?>
+<div class="wrap">
+ <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
+ <h2>
+ <?php echo __('Produktimport Mapping', 'wpsg'); ?>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&amp;action=index" class="button add-new-h2"><?php echo __("Zurück zur Produktverwaltung", "wpsg"); ?></a>
+ </h2>
+
+ <?php echo $this->writeBackendMessage(); ?>
+ <br />
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&amp;action=import&amp" id="import_form" enctype="multipart/form-data">
+
+
+ <div class="wpsg_hinweis"><?php echo __('Ordnen Sie die Spalten der zu importierenden Daten dem jeweiligen Produktattribut (links) zu', 'wpsg'); ?></div>
+ <br />
+ <div class="wpsg_hinweis"><?php echo __('Nicht zugeordnete Felder werden beim Import nicht verändert', 'wpsg'); ?></div>
+ <br />
+ <?php //wpsg_debug($this->view['import']) ?>
+
+ <?php $i = 0; foreach ($this->view['import']['produkt_fields'] as $pAttr) { ?>
+ <?php if (count(array_intersect(array_keys($this->view['arLabel']), $pAttr)) > 0) { ?>
+ <?php echo wpsg_drawForm_Select('wpsg_import_mapping_field['.$pAttr['Field'].']', $this->view['arLabel'][$pAttr['Field']], $this->view['import']['csv_header_fields'], @$this->view['mappingDefault'][$pAttr['Field']], $conf = array()) ?>
+ <?php }?>
+ <?php $i++; }?>
+ <br />
+ <?php echo wpsg_drawForm_Select('wpsg_importfile_new_produkt', __('unbekannte Datensätze als neue Produkte anlegen', 'wpsg'), array('1' => 'ja', '0' => 'nein'), $this->get_option('wpsg_importfile_new_produkt'), $conf = array()) ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_importfile_calcprice', __('Fehlende Preise berechnen?', 'wpsg'), $this->get_option('wpsg_importfile_calcprice'), array('hint' => __('Wenn nur der Brutto Preis angegeben wird, so wird der Netto Preis berechnet.', 'wpsg'))); ?>
+
+ <br /><br />
+ <input type="submit" value="<?php echo __('Import starten', 'wpsg'); ?>" name="wpsg_import_continue" />
+ <input type="hidden" name="wpsg_import_val_sep" value="<?php echo $this->view['import']['val_sep'] ?>" />
+ <input type="hidden" name="wpsg_import_dec_sep" value="<?php echo $this->view['import']['dec_sep'] ?>" />
+ <input type="hidden" name="wpsg_import_first_row" value="<?php echo $this->view['import']['first_row'] ?>" />
+ </form>
+
+</div> \ No newline at end of file
diff --git a/views/produkt/select.phtml b/views/produkt/select.phtml
new file mode 100644
index 0000000..4fd93b5
--- /dev/null
+++ b/views/produkt/select.phtml
@@ -0,0 +1,160 @@
+<?php
+
+ /**
+ * Template für die Produktauswahl über den RTE
+ */
+
+?><html>
+ <head>
+
+ <?php if ($_REQUEST['wpsg_mode'] != 'wpsg_mod_relatedproducts') { ?>
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl'); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl'); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl'); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
+ <?php } ?>
+
+ <link rel="stylesheet" href="<?php echo $this->getRessourceURL('css/admin.css'); ?>" type="text/css" media="all" />
+
+ <title><?php echo __('wpShopGermany Produktauswahl', 'wpsg'); ?></title>
+
+ <script type="text/javascript">
+
+ function insertProdukt()
+ {
+
+ <?php if ($_REQUEST['wpsg_mode'] == 'wpsg_mod_relatedproducts') { ?>
+ var produkt_id = document.getElementById("produkt").value;
+ var template = document.getElementById("template").value;
+ var template_file = document.getElementById("template").options[document.getElementById("template").selectedIndex].text;
+
+ 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_add&noheader=1&edit_id=<?php echo $_REQUEST['edit_id'] ?>',
+ data: {
+ 'rel_id': produkt_id,
+ 'template': template,
+ 'template_file': template_file
+ },
+ success: function(data) {
+ jQuery('#relatedproducts_list').html(data);
+ }
+ } );
+
+ <?php } else { ?>
+ var produkt_id = document.getElementById("produkt").value;
+ var text = "[wpshopgermany product=\"" + produkt_id + "\"";
+
+ if (document.getElementById("template") != null && document.getElementById("template").value != "0")
+ {
+
+ text += " template=\"" + document.getElementById("template").options[document.getElementById("template").selectedIndex].text + "\"";
+
+ }
+
+ text += "]";
+
+ if (window.tinyMCE)
+ {
+
+ <?php if (get_bloginfo('version') < 3.9) { ?>
+
+ window.tinyMCE.execInstanceCommand("content", "mceInsertContent", false, text);
+ tinyMCEPopup.editor.execCommand("mceRepaint");
+
+ <?php } else { ?>
+
+ parent.tinyMCE.execCommand('mceInsertContent', false, text);
+ parent.tinyMCE.activeEditor.windowManager.close();
+
+ <?php } ?>
+
+
+ tinyMCEPopup.close();
+
+ }
+ <?php } ?>
+
+ return false;
+
+ } // function insertProdukt()
+
+ <?php if ($_REQUEST['wpsg_mode'] != 'wpsg_mod_relatedproducts' && $this->hasMod('wpsg_mod_productgroups')) { ?>
+ function insertProductgroup()
+ {
+
+ var group = document.getElementById("produktgroup").value;
+ var order = document.getElementById("produktgroup_order").value;
+ var direction = document.getElementById("produktgroup_direction").value;
+
+ if (window.tinyMCE)
+ {
+
+ var text = '[wpshopgermany produktgruppe="' + group + '" sortierung="' + order + '" richtung="' + direction + '"]';
+
+ <?php if (get_bloginfo('version') < 3.9) { ?>
+
+ window.tinyMCE.execInstanceCommand("content", "mceInsertContent", false, text);
+ tinyMCEPopup.editor.execCommand("mceRepaint");
+
+ <?php } else { ?>
+
+ parent.tinyMCE.execCommand('mceInsertContent', false, text);
+ parent.tinyMCE.activeEditor.windowManager.close();
+
+ <?php } ?>
+
+ tinyMCEPopup.close();
+
+ }
+
+ return false;
+
+ } // function insertProductgroup()
+ <?php } ?>
+
+ <?php if ($_REQUEST['wpsg_mode'] == 'wpsg_mod_relatedproducts') { ?>
+ function insertProduktClose()
+ {
+
+ insertProdukt();
+ jQuery('#wpsg_relatedproducts_produktauswahl').html('').dialog('destroy');
+
+ return false;
+
+ } // function insertProduktClose()
+ <?php } ?>
+
+ </script>
+ </head>
+
+ <body style="margin:0px; padding:0px;">
+
+ <div class="wpsg_productselect">
+ <?php if (sizeof($this->view['arProdukte']) <= 0) { ?>
+ <p><?php echo __('Keine Produkte in der Datenbank.', 'wpsg'); ?></p>
+ <?php } else { ?>
+
+ <?php echo wpsg_drawForm_Select('produkt', __('Produkt', 'wpsg'), $this->view['arProdukte'], false); ?>
+ <?php echo wpsg_drawForm_Select('template', __('Template', 'wpsg'), $this->view['arTemplates'], false); ?>
+
+ <?php if ($_REQUEST['wpsg_mode'] == 'wpsg_mod_relatedproducts') { ?>
+ <input class="button" type="button" style="float:right; padding:2px 10px 2px 10px;" value="<?php echo __('Einfügen und schließen', 'wpsg'); ?>" onclick="return insertProduktClose();" />
+ <input class="button" type="button" style="float:right; padding:2px 10px 2px 10px; margin-right:5px;" value="<?php echo __('Einfügen', 'wpsg'); ?>" onclick="return insertProdukt();" />
+ <?php } else { ?>
+ <input type="button" style="float:right; padding:2px;" value="<?php echo __('Einfügen', 'wpsg'); ?>" onclick="return insertProdukt();" />
+ <?php } ?>
+
+ <div class="wpsg_clear"></div><br />
+
+ <?php if ($this->hasMod('wpsg_mod_productgroups') && $_REQUEST['wpsg_mode'] != 'wpsg_mod_relatedproducts') { ?>
+ <?php echo wpsg_drawForm_Select('produktgroup', __('Produktgruppe', 'wpsg'), $this->view['arProduktgroups'], false); ?>
+ <?php echo wpsg_drawForm_Select('produktgroup_order', __('Sortierung', 'wpsg'), $this->view['arProductgroupsOrder'], false); ?>
+ <?php echo wpsg_drawForm_Select('produktgroup_direction', __('Richtung', 'wpsg'), $this->view['arProductgroupsDirection'], false); ?>
+ <input type="button" style="float:right; padding:2px;" value="<?php echo __('Einfügen', 'wpsg'); ?>" onclick="return insertProductgroup();" />
+ <?php } ?>
+
+ <?php } ?>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/views/produkt/select_filter.phtml b/views/produkt/select_filter.phtml
new file mode 100644
index 0000000..20c3434
--- /dev/null
+++ b/views/produkt/select_filter.phtml
@@ -0,0 +1,43 @@
+<?php
+
+ /**
+ * Template für den Produktauswahldialog mit Filter
+ */
+
+?>
+<div class="wpsg_dialog">
+
+ <?php echo wpsg_drawForm_Input('wpsg_product_filter_name', __('Produktname', 'wpsg'), ''); ?>
+
+ <br />
+ <input type="submit" onclick="return wpsg_product_filter_submit();" name="submit-filter" class="button" value="<?php echo __('Suchen', 'wpsg'); ?>" />
+
+ <br /><br />
+ <div id="wpsg_product_filter_dialog"></div>
+
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_product_filter_submit()
+ {
+
+ jQuery('#wpsg_product_filter_dialog').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=select&wpsg_mode=filter&noheader=1',
+ data: {
+ filter_name: jQuery('#wpsg_product_filter_name').val()
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_product_filter_dialog').html(data);
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_product_filter_submit()
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/produkt/select_filter_productlist.phtml b/views/produkt/select_filter_productlist.phtml
new file mode 100644
index 0000000..e8da939
--- /dev/null
+++ b/views/produkt/select_filter_productlist.phtml
@@ -0,0 +1,12 @@
+<?php
+
+ /**
+ * Template für das Ergebnis der Produktfilterung
+ */
+
+?>
+<?php if (wpsg_isSizedArray($this->view['arProducts'])) { ?>
+
+<?php } else { ?>
+<?php echo __('Keine Produkte gefunden', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/produkttemplates/ausverkauft.phtml b/views/produkttemplates/ausverkauft.phtml
new file mode 100644
index 0000000..aa4262b
--- /dev/null
+++ b/views/produkttemplates/ausverkauft.phtml
@@ -0,0 +1,130 @@
+<?php
+
+ /*
+ * Template für das Produkt im Frontend
+ */
+
+ //Ausgabe der verfügbaren Variablen
+ //wpsg_debug($_SESSION);
+ //wpsg_debug($this->view['data']['stock']);
+
+ // Damit keine Zubehörprodukte ausgegeben werden
+ //$this->noReleatedProducts = true;
+
+?>
+<div class="wpsg_produkt_wrapper">
+ <div itemscope itemtype="http://schema.org/Product" class="wpsg_produkt wpsg_produkt_<?php echo $this->view['data']['id']; ?>">
+
+ <?php /* Block für die Produktbilder START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <div class="wpsg_produkt_produktbilder">
+ <?php if (sizeof($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])))) { ?>
+ <?php $i = 0; foreach ($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])) as $b) { $i ++; ?>
+ <?php if ($i == 1 && !wpsg_isSizedString($this->view['data']['varianten_image']) || $b == $this->view['data']['varianten_image']) { ?>
+ <div class="wpsg_produkt_preview wpsg_pb_pic">
+ <a class="wpsg_imagelink thickbox" rel="<?php echo $this->view['product_index']; ?>-<?php echo $this->view['data']['id']; ?>" href="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, 800, 600, $this->get_option('wpsg_mod_produktbilder_mode'))); ?>">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'))); ?>" alt="<?php echo wpsg_hspc($this->view['data']['name']); ?>" />
+ </a>
+ </div>
+ <?php } else { ?>
+ <div class="wpsg_pb_pic" style="display:none;">
+ <a class="wpsg_imagelink thickbox" rel="<?php echo $this->view['product_index']; ?>-<?php echo $this->view['data']['id']; ?>" href="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, 800, 600, $this->get_option('wpsg_mod_produktbilder_mode'))); ?>">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'))); ?>" alt="<?php echo wpsg_hspc($this->view['data']['name']); ?>" />
+ </a>
+ </div>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <?php /* Block für die Produktbilder ENDE */ ?>
+
+ <div class="wpsg_product_afterimage">
+
+ <h2 itemprop="name" class="wpsg_producttitle"><?php echo wpsg_hspc($this->view['data']['name']); ?></h2>
+
+ <?php if ($this->get_option('wpsg_showArticelnumber') == '1') { ?>
+ <div class="wpsg_artikelnummer">
+ <?php echo __('Artikelnummer', 'wpsg'); ?>: <span class="wpsg_anr"><?php echo wpsg_hspc($this->view['data']['anr']); ?></span>
+ </div>
+ <?php } ?>
+
+ <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="wpsg_produkt_preis">
+ <?php echo __('Stückpreis:', 'wpsg'); ?>
+ <meta itemprop="priceCurrency" content="<?php echo $this->get_option('wpsg_currency'); ?>" />
+ <span itemprop="price" class="preis_<?php echo $this->view['data']['id']; ?>" id="preis_<?php echo $this->view['data']['id']; ?>"><?php echo wpsg_ff($this->view['data']['preis']); ?></span> <?php echo $this->get_option('wpsg_currency'); ?><?php if (wpsg_isSizedString($this->view['data']['price_info'])) { echo '<div class="wpsg_priceinfo">'.wpsg_hspc($this->view['data']['price_info']).'</div>'; } ?>
+ </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($this->view['data']['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($this->view['data']['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } ?>
+ </div>
+
+ <?php } ?>
+
+ <?php /* Füllmengenanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+
+ <div class="wpsg_produkt_fuellmenge">
+ <?php echo wpsg_translate(__('Füllmenge: #1# (#2# / #3#)', 'wpsg'),
+ wpsg_ff($this->view['data']['fmenge'], $this->view['data']['feinheit'], true),
+ wpsg_ff($this->view['data']['fmenge_preis'], $this->get_option('wpsg_currency')),
+ wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $this->view['data']['feinheit'])
+ ); ?>
+ </div>
+ <?php } ?>
+ <?php /* Füllmengenanzeige ENDE */ ?>
+
+ <?php /* Gewichtsanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProduct') === '1') { ?>
+ <div class="wpsg_mod_weight_produkt">
+ <?php echo wpsg_translate(__('Gewicht: #1# #2#', 'wpsg'), '<span id="weight_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['weight']).'</span>', $this->get_option('wpsg_mod_weight_unit')); ?>
+ </div>
+ <?php } ?>
+ <?php /* Gewichtsanzeige ENDE */ ?>
+
+ <?php /* Varianten START */ ?>
+ <div class="wpsg_produkt_varianten">
+ <?php echo $this->callMod('wpsg_mod_varianten', 'renderTemplate', array($this->view['data']['id'])); ?>
+ </div>
+ <?php /* Varianten ENDE */ ?>
+
+ <div class="wpsg_produkt_soldout">
+ <?php echo __('Produkt ausverkauft', 'wpsg'); ?>
+ </div>
+
+ <div class="wpsg_clear"></div>
+
+ <?php /* Facebook und Co Integration aus dem Produktartikel Modul */ ?>
+ <?php echo $this->callMod('wpsg_mod_produktartikel', 'socialIntegration', array($this->view['data']['id'])); ?>
+ <?php /* Facebook und Co Integration ENDE */ ?>
+
+ </div>
+
+ </div>
+
+ <?php if (strlen(trim($this->view['data']['beschreibung'])) > 0) { ?>
+ <div class="wpsg_produkt_additional_information">
+
+ <div itemprop="description" class="wpsg_produkt_beschreibung">
+ <?php echo $this->view['data']['beschreibung']; ?>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php $this->callMods('product_bottom', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
+
+</div> \ No newline at end of file
diff --git a/views/produkttemplates/bildertest.phtml b/views/produkttemplates/bildertest.phtml
new file mode 100644
index 0000000..7bddb75
--- /dev/null
+++ b/views/produkttemplates/bildertest.phtml
@@ -0,0 +1,42 @@
+<?php
+
+ $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id']));
+
+?>
+
+<div style="padding:15px; background-color:#999999;">
+
+ <?php echo __('100x100', 'wpsg'); ?><br />
+ <div style="width:100px; height:100px; display:block; background-color:red;"></div>
+
+ <?php foreach ($arBilder as $bild) { ?>
+
+ <h2><?php echo $bild; ?>:</h2>
+
+ <?php echo __('CROP (c)', 'wpsg'); ?><br />
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $bild, 100, 100, 'c')); ?>" /><br />
+
+ <?php echo __('CROP CENTER (cz)', 'wpsg'); ?><br />
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $bild, 100, 100, 'cz')); ?>" /><br />
+
+ <?php echo __('STRETCH (z)', 'wpsg'); ?><br />
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $bild, 100, 100, 'z')); ?>" /><br />
+
+ <?php echo __('NIX (n)', 'wpsg'); ?><br />
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $bild, 100, 100, 'n')); ?>" /><br />
+
+ <?php echo __('SCALE und Freifläche (sz)', 'wpsg'); ?><br />
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $bild, 100, 100, 'sz')); ?>" /><br />
+
+ <?php echo __('SCALE WIDTH (sw)', 'wpsg'); ?><br />
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $bild, 100, 100, 'sw')); ?>" /><br />
+
+ <?php echo __('SCALE HEIGHT (sh)', 'wpsg'); ?><br />
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $bild, 100, 100, 'sh')); ?>" /><br />
+
+ <?php echo __('SCALE INTO (s)', 'wpsg'); ?><br />
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $bild, 100, 100, 's')); ?>" /><br />
+
+ <?php } ?>
+
+</div> \ No newline at end of file
diff --git a/views/produkttemplates/produktseite.phtml b/views/produkttemplates/produktseite.phtml
new file mode 100644
index 0000000..17e4087
--- /dev/null
+++ b/views/produkttemplates/produktseite.phtml
@@ -0,0 +1,135 @@
+<?php
+
+ /*
+ * Template für das Produkt im Frontend
+ */
+
+ //Ausgabe der verfügbaren Variablen
+ //wpsg_debug($this->view['data']);
+
+ // Damit keine Zubehörprodukte ausgegeben werden
+ //$this->noReleatedProducts = true;
+
+?>
+<div class="wpsg_produkt_wrapper">
+ <div itemscope itemtype="http://schema.org/Product" class="wpsg_produkt wpsg_produkt_<?php echo $this->view['data']['id']; ?>">
+
+ <div class="wpsg_product_afterimage">
+
+ <h2 itemprop="name" class="wpsg_producttitle"><?php echo wpsg_hspc($this->view['data']['name']); ?></h2>
+
+ <?php /* Block für die Produktbilder START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <div class="wpsg_produkt_produktbilder">
+ <?php if (sizeof($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])))) { ?>
+ <?php $i = 0; foreach ($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])) as $b) { $i ++; ?>
+ <?php if ($i == 1) { ?>
+ <div class="wpsg_produkt_preview wpsg_pb_pic">
+ <?php echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $i, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'), 'pimage')); ?>
+ <?php /*<img itemprop="image" id="wpsg_mainimage_<?php echo $this->getTemplateIndex(); ?>" src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'))); ?>" alt="" />*/?>
+ </div>
+ <?php } else { ?>
+ <div class="wpsg_pb_pic" style="display:none;">
+ <?php echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $i, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'), 'pimage')); ?>
+ </div>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <?php /* Block für die Produktbilder ENDE */ ?>
+
+ <?php if ($this->get_option('wpsg_showArticelnumber') == '1') { ?>
+ <div class="wpsg_artikelnummer">
+ <?php echo __('Artikelnummer', 'wpsg'); ?>: <span class="wpsg_anr"><?php echo wpsg_hspc($this->view['data']['anr']); ?></span>
+ </div>
+ <?php } ?>
+
+ <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="wpsg_produkt_preis">
+ <?php echo __('Stückpreis:', 'wpsg'); ?>
+ <meta itemprop="priceCurrency" content="<?php echo $this->get_option('wpsg_currency'); ?>" />
+ <span itemprop="price" class="preis_<?php echo $this->view['data']['id']; ?>" id="preis_<?php echo $this->view['data']['id']; ?>"><?php echo wpsg_ff($this->view['data']['preis']); ?></span> <?php echo $this->get_option('wpsg_currency'); ?><?php if (wpsg_isSizedString($this->view['data']['price_info'])) { echo '<div class="wpsg_priceinfo">'.wpsg_hspc($this->view['data']['price_info']).'</div>'; } ?>
+ </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($this->view['data']['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($this->view['data']['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } ?>
+ </div>
+
+ <?php } ?>
+
+ <?php /* Füllmengenanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+
+ <div class="wpsg_produkt_fuellmenge">
+ <?php echo wpsg_translate(__('Füllmenge: #1# (#2# / #3#)', 'wpsg'),
+ '<span id="fmenge_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['fmenge'], '', true).'</span> '.$this->view['data']['feinheit'],
+ '<span id="fmenge_gpreis_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['fmenge_preis']).'</span> '. $this->get_option('wpsg_currency'),
+ wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $this->view['data']['feinheit'])
+ ); ?>
+ </div>
+
+ <?php } ?>
+ <?php /* Füllmengenanzeige ENDE */ ?>
+
+ <?php /* Lieferzeit Anzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_deliverytime') && $this->get_option('wpsg_mod_deliverytime_show_product') == '1') { ?>
+
+ <div class="wpsg_mod_deliverytime">
+ <?php echo wpsg_translate(__('Lieferzeit: #1#', 'wpsg'), $this->callMod('wpsg_mod_deliverytime', 'getProductDeliveryTime', array($this->view['data']['id']))); ?>
+ </div>
+
+ <?php } ?>
+ <?php /* Lieferzeit Anzeige ENDE */ ?>
+
+ <?php /* Gewichtsanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProduct') === '1') { ?>
+ <div class="wpsg_mod_weight_produkt">
+ <?php echo wpsg_translate(__('Gewicht: #1# #2#', 'wpsg'), '<span id="weight_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['weight']).'</span>', $this->get_option('wpsg_mod_weight_unit')); ?>
+ </div>
+ <?php } ?>
+ <?php /* Gewichtsanzeige ENDE */ ?>
+
+ <?php /* Varianten START */ ?>
+ <div class="wpsg_produkt_varianten">
+ <?php echo $this->callMod('wpsg_mod_varianten', 'renderTemplate', array($this->view['data']['id'])); ?>
+ </div>
+ <?php /* Varianten ENDE */ ?>
+
+ <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" onclick="location.href='<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>?wpsg_action=showProdukt&produkt_id=<?php echo $this->view['data']['id']; ?>'; return false;" type="button" value="<?php echo __('Zur Produktseite', 'wpsg'); ?>" />
+
+ <div class="wpsg_clear"></div>
+
+ <?php /* Facebook und Co Integration aus dem Produktartikel Modul */ ?>
+ <?php echo $this->callMod('wpsg_mod_produktartikel', 'socialIntegration', array($this->view['data']['id'])); ?>
+ <?php /* Facebook und Co Integration ENDE */ ?>
+
+ </div>
+
+ </div>
+
+ <?php if (strlen(trim($this->view['data']['beschreibung'])) > 0) { ?>
+ <div class="wpsg_produkt_additional_information">
+
+ <div itemprop="description" class="wpsg_produkt_beschreibung">
+ <?php echo $this->view['data']['beschreibung']; ?>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php $this->callMods('product_bottom', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
+
+</div> \ No newline at end of file
diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml
new file mode 100644
index 0000000..175a6ee
--- /dev/null
+++ b/views/produkttemplates/standard.phtml
@@ -0,0 +1,225 @@
+<?php
+
+ /*
+ * Template für das Produkt im Frontend
+ */
+
+ //Ausgabe der verfügbaren Variablen
+ //wpsg_debug($this->view['data']);
+
+ // Damit keine Zubehörprodukte ausgegeben werden
+ //$this->noReleatedProducts = true;
+
+ //wpsg_debug($_SESSION);
+
+?>
+<div class="wpsg_produkt_wrapper">
+
+ <input type="hidden" name="wpsg_post_id" value="<?php echo get_the_ID(); ?>" />
+
+ <?php $this->callMods('product_top', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
+
+ <div itemscope itemtype="http://schema.org/Product" class="wpsg_produkt wpsg_produkt_<?php echo $this->view['data']['id']; ?>">
+
+ <div class="wpsg_product_afterimage">
+
+ <h2 itemprop="name" class="wpsg_producttitle"><?php echo $this->getProductName($this->view['data']['id']); ?></h2>
+
+ <?php $this->callMods('product_top_afterheadline', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
+
+ <?php /* Block für die Produktbilder START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <div class="wpsg_produkt_produktbilder">
+ <?php if (sizeof($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])))) { ?>
+ <?php $i = 0; foreach ($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])) as $b) { $i ++; ?>
+ <?php if ($i == 1 && !wpsg_isSizedString($this->view['data']['varianten_image']) || $b == $this->view['data']['varianten_image']) { ?>
+ <div class="wpsg_produkt_preview wpsg_pb_pic">
+ <a class="wpsg_imagelink thickbox" rel="<?php echo $this->view['product_index']; ?>-<?php echo $this->view['data']['id']; ?>" href="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, 800, 600, $this->get_option('wpsg_mod_produktbilder_mode'))); ?>">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'))); ?>" alt="<?php echo wpsg_hspc($this->view['data']['name']); ?>" />
+ </a>
+ </div>
+ <?php } else { ?>
+ <div class="wpsg_pb_pic" style="display:none;">
+ <a class="wpsg_imagelink thickbox" rel="<?php echo $this->view['product_index']; ?>-<?php echo $this->view['data']['id']; ?>" href="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, 800, 600, $this->get_option('wpsg_mod_produktbilder_mode'))); ?>">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'))); ?>" alt="<?php echo wpsg_hspc($this->view['data']['name']); ?>" />
+ </a>
+ </div>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <?php /* Block für die Produktbilder ENDE */ ?>
+
+ <?php if ($this->get_option('wpsg_showArticelnumber') == '1') { ?>
+ <div class="wpsg_artikelnummer">
+ <?php echo __('Artikelnummer', 'wpsg'); ?>: <span class="wpsg_anr"><?php echo wpsg_hspc($this->view['data']['anr']); ?></span>
+ </div>
+ <?php } ?>
+
+ <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="wpsg_produkt_preis">
+ <?php echo __('Stückpreis:', 'wpsg'); ?>
+ <meta itemprop="priceCurrency" content="<?php echo $this->get_option('wpsg_currency'); ?>" />
+ <span itemprop="price" class="wpsg_preis preis_<?php echo $this->view['data']['id']; ?>" id="preis_<?php echo $this->view['data']['id']; ?>">
+ <?php echo wpsg_ff($this->view['data']['preis'], $this->get_option('wpsg_currency')); ?>
+ </span> <?php if (wpsg_isSizedString($this->view['data']['price_info'])) { echo '<div class="wpsg_priceinfo">'.wpsg_hspc($this->view['data']['price_info']).'</div>'; } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_discount') && $this->view['data']['preis_prediscount'] > 0 && wpsg_isSizedInt($this->get_option('wpsg_mod_discount_show'))) { ?>
+ <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="wpsg_produkt_preis new_price">
+ <?php echo __('Originalpreis', 'wpsg'); ?>: <span class="wpsg_preis_prediscount"><?php echo wpsg_ff($this->view['data']['preis_prediscount'], $this->get_option('wpsg_currency')); ?></span>
+ </div>
+ <?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($this->view['data']['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($this->view['data']['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } ?>
+ </div>
+
+ <?php } ?>
+
+ <?php /* Füllmengenanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+
+ <div class="wpsg_produkt_fuellmenge">
+ <?php echo wpsg_translate(__('Füllmenge: #1# (#2# / #3#)', 'wpsg'),
+ '<span class="wpsg_fmenge">'.wpsg_ff($this->view['data']['fmenge'], '', true).'</span> '.$this->view['data']['feinheit'],
+ '<span class="fmenge_preis">'.wpsg_ff($this->view['data']['fmenge_preis'], $this->get_option('wpsg_currency')).'</span> ',
+ wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $this->view['data']['feinheit'])
+ ); ?>
+ </div>
+
+ <?php } ?>
+ <?php /* Füllmengenanzeige ENDE */ ?>
+
+ <?php /* Lagerbestand START*/?>
+ <?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProduct') == '1') { ?>
+ <div class="wpsg_mod_produktindex_stock">
+ <?php echo wpsg_translate(__('Lagerbestand: #1#','wpsg'), $this->view['data']['stock']); ?>
+ </div>
+ <?php } ?>
+ <?php /* Lagerbestand ENDE*/?>
+
+ <?php /* Lieferzeit Anzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_deliverytime') && $this->get_option('wpsg_mod_deliverytime_show_product') == '1') { ?>
+
+ <div class="wpsg_mod_deliverytime">
+ <?php echo wpsg_translate(__('Lieferzeit: #1#', 'wpsg'), $this->callMod('wpsg_mod_deliverytime', 'getProductDeliveryTime', array($this->view['data']['id']))); ?>
+ </div>
+
+ <?php } ?>
+ <?php /* Lieferzeit Anzeige ENDE */ ?>
+
+ <?php /* Gewichtsanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProduct') === '1') { ?>
+ <div class="wpsg_mod_weight_produkt">
+ <?php echo wpsg_translate(__('Gewicht: #1# #2#', 'wpsg'), '<span class="wpsg_weight" id="weight_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['weight']).'</span>', $this->get_option('wpsg_mod_weight_unit')); ?>
+ </div>
+ <?php } ?>
+ <?php /* Gewichtsanzeige ENDE */ ?>
+
+ <?php /* Varianten START */ ?>
+ <div class="wpsg_produkt_varianten">
+ <?php echo $this->callMod('wpsg_mod_varianten', 'renderTemplate', array($this->view['data']['product_key'])); ?>
+ </div>
+ <?php /* Varianten ENDE */ ?>
+
+ <?php if ($this->callMods('productForSale', array($this->view['data']['product_key'])) || ($this->hasMod('wpsg_mod_request') && $this->callMod('wpsg_mod_request', 'isRequestProduct', array($this->view['data']['id'])))) { ?>
+ <div class="wpsg_produkt_add_basket_wrapper">
+
+ <label class="wpsg_amount_label" for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?>:</label>
+
+ <input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"
+ <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?>
+ />
+
+ <?php if (in_array($this->get_option('wpsg_afterinsert'), array('2', '3'))) { ?>
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>').bind('click', function() {
+
+ jQuery('.wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>').prop('disabled', true);
+
+ 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]': '1'
+ },
+ success: function(data)
+ {
+
+ <?php if ($this->get_option('wpsg_afterinsert') == '2') { ?>
+ tb_show('<?php echo __('Ihr Warenkorb', 'wpsg'); ?>', '<?php echo $this->getURL(wpsg_ShopController::URL_BASKET_AJAX); ?>&height=500');
+ <?php } else { ?>
+
+ jQuery('#wpsg_basket_ajax_message_wrap').remove();
+ jQuery('body').append('<div id="wpsg_basket_ajax_message_wrap">' + data + '</div>');
+
+ <?php } ?>
+
+ jQuery('.wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>').prop('disabled', false);
+
+ }
+ } );
+
+ return false;
+
+ } );
+
+ } );
+
+ </script>
+ <?php } ?>
+
+ </div>
+ <?php } ?>
+
+ <?php if ($this->callMods('productForSale', array($this->view['data']['product_key']))) { ?>
+ <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
+ <?php } ?>
+
+
+ <?php if ($this->hasMod('wpsg_mod_request') && $this->callMod('wpsg_mod_request', 'isRequestProduct', array($this->view['data']['id']))) { ?>
+ <input class="wpsg_button wpsg_add_requestlist" id="wpsg_add_requestlist_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('Auf die Anfrageliste', 'wpsg'); ?>" name="wpsg[submit_request]" />
+ <?php } ?>
+
+ <div class="wpsg_clear"></div>
+
+ <?php /* Facebook und Co Integration aus dem Produktartikel Modul */ ?>
+ <?php echo $this->callMod('wpsg_mod_produktartikel', 'socialIntegration', array($this->view['data']['id'])); ?>
+ <?php /* Facebook und Co Integration ENDE */ ?>
+
+ </div>
+
+ </div>
+
+ <?php if (strlen(trim($this->view['data']['beschreibung'])) > 0) { ?>
+ <div class="wpsg_produkt_additional_information">
+
+ <div itemprop="description" class="wpsg_produkt_beschreibung">
+ <?php echo $this->view['data']['beschreibung']; ?>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php $this->callMods('product_bottom', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
+
+</div> \ No newline at end of file
diff --git a/views/produkttemplates/standard2.phtml b/views/produkttemplates/standard2.phtml
new file mode 100644
index 0000000..fa7d911
--- /dev/null
+++ b/views/produkttemplates/standard2.phtml
@@ -0,0 +1,211 @@
+<?php
+
+ /*
+ * Template für das Produkt im Frontend
+ */
+
+ //Ausgabe der verfügbaren Variablen
+ //wpsg_debug($_SESSION);
+ //wpsg_debug($this->view['data']['stock']);
+
+ // Damit keine Zubehörprodukte ausgegeben werden
+ //$this->noReleatedProducts = true;
+
+?>
+<style type="text/css">
+
+ .wpsg_theme1 { background-color:#EFEFEF; border:0px; }
+ .wpsg_theme1_mainimage a { text-decoration:none; padding:5px; display:table-cell; vertical-align:middle; text-align:center; width:184px; height:184px; background-color:#FFFFFF; }
+ .wpsg_theme1_mainimage a img { vertical-align:middle; }
+ .wpsg_theme1_previewslider a { text-decoration:none; padding:5px; display:table-cell; vertical-align:middle; text-align:center; width:50; height:50px; background-color:#FFFFFF; }
+ .wpsg_theme1_previewslider a img { vertical-align:middle; }
+ .wpsg_theme1_previewwrap { float:left; margin-right:7px; margin-top:7px; }
+ .wpsg_theme1_produkt_produktbilder { float:left; width:220px; }
+ .wpsg_theme1_produkt_right { width:335px; float:left; }
+
+</style>
+
+<script type="text/javascript">
+
+ if (typeof wpsg_theme1_switch !== 'function')
+ {
+
+ function wpsg_theme1_switch(htmlEle)
+ {
+
+ jQuery(htmlEle).parent().parent().parent().find('.wpsg_theme1_image').hide();
+ jQuery(htmlEle).parent().parent().parent().find('.' + jQuery(htmlEle).attr("class")).show();
+
+ return false;
+
+ } // function wpsg_theme1_switch(ele)
+
+ }
+
+</script>
+
+<div class="wpsg_produkt_wrapper wpsg_theme1">
+ <div itemscope itemtype="http://schema.org/Product" class="wpsg_produkt wpsg_produkt_<?php echo $this->view['data']['id']; ?>">
+
+ <?php /* Block für die Produktbilder START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <div class="wpsg_theme1_produkt_produktbilder">
+ <?php
+
+ $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id']));
+
+ ?>
+ <?php if (sizeof($arBilder) > 0) { ?>
+ <div class="wpsg_theme1_mainimage">
+ <a class="thickbox wpsg_theme1_image_0 wpsg_theme1_image" href="<?php echo $this->callMod('wpsg_mod_produktbilder', 'getPicPath', array($this->view['data']['id'], true)); ?>/<?php echo $arBilder[0]; ?>" rel="gallery-<?php echo $this->view['data']['id'] ?>">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $arBilder[0], 184, 184, 's')); ?>" />
+ </a>
+ <?php for ($i = 1; $i < sizeof($arBilder); $i ++) { ?>
+ <a class="thickbox wpsg_theme1_image_<?php echo $i; ?> wpsg_theme1_image" style="display:none;" href="<?php echo $this->callMod('wpsg_mod_produktbilder', 'getPicPath', array($this->view['data']['id'], true)); ?>/<?php echo $arBilder[$i]; ?>" rel="gallery-<?php echo $this->view['data']['id'] ?>">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $arBilder[$i], 184, 184, 's')); ?>" />
+ </a>
+ <?php } ?>
+ </div>
+
+ <div class="wpsg_theme1_previewslider">
+ <?php if (sizeof($arBilder) > 1) { ?>
+ <?php for ($i = 0; $i < sizeof($arBilder); $i ++) { ?>
+ <div class="wpsg_theme1_previewwrap">
+ <a href="#" onclick="return wpsg_theme1_switch(this);" class="wpsg_theme1_image_<?php echo $i; ?>">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $arBilder[$i], 50, 50, 'sz')); ?>" />
+ </a>
+ </div>
+ <?php } ?>
+ <?php } ?>
+ </div>
+
+ <?php } ?>
+
+ </div>
+ <?php } ?>
+ <?php /* Block für die Produktbilder ENDE */ ?>
+
+ <div class="wpsg_theme1_produkt_right">
+
+ <h1 class="wpsg_producttitle" itemprop="name"><?php echo wpsg_hspc($this->view['data']['name']); ?></h1>
+
+ <?php if ($this->get_option('wpsg_showArticelnumber') == '1') { ?>
+ <div class="wpsg_artikelnummer">
+ <?php echo __('Artikelnummer', 'wpsg'); ?>: <span class="wpsg_anr"><?php echo wpsg_hspc($this->view['data']['anr']); ?></span>
+ </div>
+ <?php } ?>
+
+ <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="wpsg_produkt_preis">
+ <?php echo __('Stückpreis:', 'wpsg'); ?>
+ <meta itemprop="priceCurrency" content="<?php echo $this->get_option('wpsg_currency'); ?>" />
+ <span itemprop="price" class="preis_<?php echo $this->view['data']['id']; ?>" id="preis_<?php echo $this->view['data']['id']; ?>"><?php echo wpsg_ff($this->view['data']['preis']); ?></span> <?php echo $this->get_option('wpsg_currency'); ?>
+ </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($this->view['data']['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($this->view['data']['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } ?>
+ </div>
+
+ <?php } ?>
+
+ <?php /* Füllmengenanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+
+ <div class="wpsg_produkt_fuellmenge">
+ <?php echo wpsg_translate(__('Füllmenge: #1# (#2# / #3#)', 'wpsg'),
+ wpsg_ff($this->view['data']['fmenge'], $this->view['data']['feinheit'], true),
+ wpsg_ff($this->view['data']['fmenge_preis'], $this->get_option('wpsg_currency')),
+ wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $this->view['data']['feinheit'])
+ ); ?>
+ </div>
+ <?php } ?>
+ <?php /* Füllmengenanzeige ENDE */ ?>
+
+ <?php /* Gewichtsanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProduct') === '1') { ?>
+ <div class="wpsg_mod_weight_produkt">
+ <?php echo wpsg_translate(__('Gewicht: #1# #2#', 'wpsg'), '<span id="weight_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['weight']).'</span>', $this->get_option('wpsg_mod_weight_unit')); ?>
+ </div>
+ <?php } ?>
+ <?php /* Gewichtsanzeige ENDE */ ?>
+
+ <?php /* Varianten START */ ?>
+ <div class="wpsg_produkt_varianten">
+ <?php echo $this->callMod('wpsg_mod_varianten', 'renderTemplate', array($this->view['data']['id'])); ?>
+ </div>
+ <?php /* Varianten ENDE */ ?>
+
+ <div class="wpsg_produkt_add_basket_wrapper">
+
+ <label for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?>:</label>
+
+ <input type="text" value="1" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" />
+ <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
+
+ <?php if ($this->get_option('wpsg_afterinsert') == '2') { ?>
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>').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]': '1'
+ },
+ success: function(data)
+ {
+ tb_show('<?php echo __('Ihr Warenkorb', 'wpsg'); ?>', '<?php echo $this->getURL(wpsg_ShopController::URL_BASKET_AJAX); ?>');
+ }
+ } );
+
+ return false;
+
+ } );
+
+ } );
+
+ </script>
+ <?php } ?>
+
+ </div>
+
+ </div>
+
+ <div class="wpsg_clear"></div>
+
+ <?php /* Facebook und Co Integration aus dem Produktartikel Modul */ ?>
+ <?php echo $this->callMod('wpsg_mod_produktartikel', 'socialIntegration', array($this->view['data']['id'])); ?>
+ <?php /* Facebook und Co Integration ENDE */ ?>
+
+ </div>
+
+ <?php if (strlen(trim($this->view['data']['beschreibung'])) > 0) { ?>
+ <div class="wpsg_produkt_additional_information">
+
+ <div itemprop="description" class="wpsg_produkt_beschreibung">
+ <?php echo $this->view['data']['beschreibung']; ?>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php $this->callMods('product_bottom', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
+
+</div>
+
diff --git a/views/produkttemplates/standard_1544.phtml b/views/produkttemplates/standard_1544.phtml
new file mode 100644
index 0000000..62c92e4
--- /dev/null
+++ b/views/produkttemplates/standard_1544.phtml
@@ -0,0 +1,435 @@
+<?php
+
+ /*
+ * Template für das Produkt im Frontend
+ */
+
+ //Ausgabe der verfügbaren Variablen
+ //wpsg_debug($_SESSION);
+ //wpsg_debug($this->view['data']['stock']);
+
+ // Damit keine Zubehörprodukte ausgegeben werden
+ //$this->noReleatedProducts = true;
+
+?>
+<div class="wpsg_produkt_wrapper">
+ <div itemscope itemtype="http://schema.org/Product" class="wpsg_produkt wpsg_produkt_<?php echo $this->view['data']['id']; ?>">
+
+ <div class="wpsg_product_afterimage">
+
+ <h2 itemprop="name" class="wpsg_producttitle"><?php echo wpsg_hspc($this->view['data']['name']); ?></h2>
+
+ <?php /* Block für die Produktbilder START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <div class="wpsg_produkt_produktbilder">
+ <?php if (sizeof($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])))) { ?>
+ <?php $i = 0; foreach ($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])) as $b) { $i ++; ?>
+ <?php if ($i == 1) { ?>
+ <div class="wpsg_produkt_preview wpsg_pb_pic">
+ <?php echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $i, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'), 'pimage')); ?>
+ <?php /*<img itemprop="image" id="wpsg_mainimage_<?php echo $this->getTemplateIndex(); ?>" src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'))); ?>" alt="" />*/?>
+ </div>
+ <?php } else { ?>
+ <div class="wpsg_pb_pic" style="display:none;">
+ <?php echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $i, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'), 'pimage')); ?>
+ </div>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <?php /* Block für die Produktbilder ENDE */ ?>
+
+ <?php if ($this->get_option('wpsg_showArticelnumber') == '1') { ?>
+ <div class="wpsg_artikelnummer">
+ <?php echo __('Artikelnummer', 'wpsg'); ?>: <span class="wpsg_anr"><?php echo wpsg_hspc($this->view['data']['anr']); ?></span>
+ </div>
+ <?php } ?>
+
+ <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="wpsg_produkt_preis">
+ <?php echo __('Stückpreis:', 'wpsg'); ?>
+ <meta itemprop="priceCurrency" content="<?php echo $this->get_option('wpsg_currency'); ?>" />
+ <span itemprop="price" class="preis_<?php echo $this->view['data']['id']; ?>" id="preis_<?php echo $this->view['data']['id']; ?>"><?php echo wpsg_ff($this->view['data']['preis']); ?></span> <?php echo $this->get_option('wpsg_currency'); ?><?php if (wpsg_isSizedString($this->view['data']['price_info'])) { echo '<div class="wpsg_priceinfo">'.wpsg_hspc($this->view['data']['price_info']).'</div>'; } ?>
+ </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($this->view['data']['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($this->view['data']['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } ?>
+ </div>
+
+ <?php } ?>
+
+ <?php /* Füllmengenanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+
+ <div class="wpsg_produkt_fuellmenge">
+ <?php echo wpsg_translate(__('Füllmenge: #1# (#2# / #3#)', 'wpsg'),
+ '<span id="fmenge_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['fmenge'], '', true).'</span> '.$this->view['data']['feinheit'],
+ '<span id="fmenge_gpreis_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['fmenge_preis']).'</span> '. $this->get_option('wpsg_currency'),
+ wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $this->view['data']['feinheit'])
+ ); ?>
+ </div>
+
+ <?php } ?>
+ <?php /* Füllmengenanzeige ENDE */ ?>
+
+ <?php /* Lieferzeit Anzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_deliverytime') && $this->get_option('wpsg_mod_deliverytime_show_product') == '1') { ?>
+
+ <div class="wpsg_mod_deliverytime">
+ <?php echo wpsg_translate(__('Lieferzeit: #1#', 'wpsg'), $this->callMod('wpsg_mod_deliverytime', 'getProductDeliveryTime', array($this->view['data']['id']))); ?>
+ </div>
+
+ <?php } ?>
+ <?php /* Lieferzeit Anzeige ENDE */ ?>
+
+ <?php /* Gewichtsanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProduct') === '1') { ?>
+ <div class="wpsg_mod_weight_produkt">
+ <?php echo wpsg_translate(__('Gewicht: #1# #2#', 'wpsg'), '<span id="weight_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['weight']).'</span>', $this->get_option('wpsg_mod_weight_unit')); ?>
+ </div>
+ <?php } ?>
+ <?php /* Gewichtsanzeige ENDE */ ?>
+
+ <?php /* Varianten START */ ?>
+ <div class="wpsg_produkt_varianten"><?php
+
+ // Damit sind werden die zusätzlichen Varianten ins View geladen, die Ausgabe erfolgt aber direkt hier im Template
+ $this->callMod('wpsg_mod_varianten', 'renderTemplate', array($this->view['data']['id']));
+
+ $arVarianten = @unserialize($this->view['data']['mod_varianten']);
+
+ ?>
+ <script type="text/javascript">/* <![CDATA[ */
+
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+ var wpsg_mod_fuellmenge_reference = <?php echo ((wpsg_isSizedInt($this->get_option('wpsg_mod_fuellmenge_bezug')))?$this->get_option('wpsg_mod_fuellmenge_bezug'):'0'); ?>;
+ <?php } ?>
+
+ <?php if (wpsg_isSizedArray($arVarianten)) { ?>
+
+ var arVarianten<?php echo $this->view['data']['id']; ?> = jQuery.parseJSON('<?php echo json_encode($arVarianten); ?>');
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_vp_field_<?php echo $this->view['data']['id']; ?> select').bind('change', function() {
+
+ var var_id = jQuery(this).attr("name").replace(/wpsg_vp\[/, '').replace(/\]/, '');
+
+ jQuery('.wpsg_produkt_<?php echo $this->view['data']['id']; ?> .wpsg_anr').text(arVarianten<?php echo $this->view['data']['id']; ?>[var_id]['vari'][jQuery(this).val()]['artnr']);
+
+ } );
+
+ jQuery('.wpsg_vp_field_<?php echo $this->view['data']['id']; ?> input[type="radio"]').bind('click', function() {
+
+ var var_id = jQuery(this).attr("name").replace(/wpsg_vp\[/, '').replace(/\]/, '');
+
+ jQuery('.wpsg_produkt_<?php echo $this->view['data']['id']; ?> .wpsg_anr').text(arVarianten<?php echo $this->view['data']['id']; ?>[var_id]['vari'][jQuery(this).val()]['artnr']);
+
+ } );
+
+ //jQuery('.wpsg_vp_field_<?php echo $this->view['data']['id']; ?> input[type="radio"]:checked').click();
+
+ } );
+
+ <?php } ?>
+
+ wpsg_vp[<?php echo $this->view['data']['id']; ?>] = new Array();
+ wpsg_vp_gp[<?php echo $this->view['data']['id']; ?>] = <?php echo $this->view['data']['preis']; ?>;
+ wpsg_vp_vari[<?php echo $this->view['data']['id']; ?>] = new Array();
+
+ <?php if (isset($this->view['data']['preis_original'])) { /* Rabattierter Originalpreis */ ?>
+ wpsg_vp_original[<?php echo $this->view['data']['id']; ?>] = new Array();
+ wpsg_vp_gp_original[<?php echo $this->view['data']['id']; ?>] = <?php echo $this->view['data']['preis_original']; ?>;
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_weight')) { ?>
+ wpsg_wg[<?php echo $this->view['data']['id']; ?>] = new Array();
+ wpsg_vp_gw[<?php echo $this->view['data']['id']; ?>] = <?php echo (($this->view['data']['weight'] != "")?$this->view['data']['weight']:'0'); ?>;
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+ wpsg_fmenge[<?php echo $this->view['data']['id']; ?>] = new Array();
+ wpsg_vp_fmenge[<?php echo $this->view['data']['id']; ?>] = <?php echo (($this->view['data']['fmenge'] != "")?wpsg_tf($this->view['data']['fmenge']):'0'); ?>;
+ <?php } ?>
+
+ /* ]]> */</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->view['data']['id']; ?>">
+
+ <script type="text/javascript">
+
+ wpsg_vp_vari[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = "<?php echo $var['typ']; ?>";
+ wpsg_vp[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = new Array();
+
+ <?php if (isset($this->view['data']['preis_original'])) { ?>
+ wpsg_vp_original[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = new Array();
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_weight')) { ?>
+ wpsg_wg[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = new Array();
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+ wpsg_fmenge[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = new Array();
+ <?php } ?>
+
+ </script>
+
+ <?php if ($var['typ'] != 'radio') { ?>
+ <label class="wpsg_vp_field_label" for="wpsg_vpfield_<?php echo $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>
+
+ <script type="text/javascript">
+ <?php foreach ($var['vari'] as $kv => $vari) { if ($vari['aktiv'] == "1") { ?>
+ wpsg_vp[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['preis'] != "")?$vari['preis']:'0'); ?>;
+
+ <?php if (isset($vari['preis_original'])) { ?>
+ wpsg_vp_original[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['preis_original'] != "")?$vari['preis_original']:'0'); ?>;
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_weight')) { ?>
+ wpsg_wg[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['weight'] != "")?$vari['weight']:'0'); ?>;
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+ wpsg_fmenge[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['fmenge'] != "")?wpsg_tf($vari['fmenge']):'0'); ?>;
+ <?php } ?>
+ <?php } } ?>
+ </script>
+
+ <select onchange="wpsg_vp_switch(<?php echo $this->view['data']['id']; ?>); wpsg_showpic_switch(this);" name="wpsg_vp[<?php echo $k; ?>]" id="wpsg_vpfield_<?php echo $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 $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") { ?>
+ <span class="wpsg_vp_field_image">
+ <?php $first = true; 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 (($first)?'block':'none'); ?>;">
+ <?php echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $vari['showpic'], $this->get_option("wpsg_vp_showpic_width"), $this->get_option("wpsg_vp_showpic_height"), 's')); ?>
+ </span>
+ <?php $first = false; } } ?>
+ </span>
+ <?php } ?>
+ </label>
+ <?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 ++; ?>
+ <script type="text/javascript">
+
+ wpsg_vp[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['preis'] != "")?$vari['preis']:'0'); ?>;
+
+ <?php if (isset($vari['preis_original'])) { ?>
+ wpsg_vp_original[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['preis_original'] != "")?$vari['preis_original']:'0'); ?>;
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_weight')) { ?>
+ wpsg_wg[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['weight'] != "")?$vari['weight']:'0'); ?>;
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+ wpsg_fmenge[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['fmenge'] != "")?wpsg_tf($vari['fmenge']):'0'); ?>;
+ <?php } ?>
+
+ </script>
+ <?php } } ?>
+ <?php $arVariGroup = array(); $j = 0; foreach ($var['vari'] as $kv => $vari) { if ($vari['aktiv'] == "1" && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { $j ++; ?>
+ <?php
+
+ // Gruppieren
+ $variCode = wpsg_trim(explode('|', $vari['name']));
+
+ if (sizeof($variCode) == 2)
+ {
+
+ $arVariGroup[$variCode[0]][] = array('kv' => $kv, 'j' => $j, 'name' => $variCode[1], 'vari' => $vari);
+
+ }
+ else
+ {
+
+ $arVariGroup[0][] = array('kv' => $kv, 'j' => $j, 'name' => $variCode[0], 'vari' => $vari);
+
+ }
+
+ ?>
+ <?php } } ?>
+
+ <?php foreach ($arVariGroup as $vg_name => $vg) { ?>
+ <div class="vari_group" style="clear:both;">
+ <?php if (wpsg_isSizedString($vg_name)) { ?>
+ <div class="vari_groupname"><?php echo __($vg_name, 'wpsg'); ?></div>
+ <?php } else { ?>
+ <br />
+ <?php } ?>
+ <div class="vari_group_select">
+ <?php foreach ($vg as $group_vari) { $vari = $group_vari['vari']; ?>
+ <label>
+ <input id="wpsg_vpfield_<?php echo $this->view['data']['id']; ?>_<?php echo $k; ?>_<?php echo $group_vari['j']; ?>" <?php echo (($group_vari['j'] == 1)?'checked="checked"':''); ?> onclick="wpsg_vp_switch(<?php echo $this->view['data']['id']; ?>);" type="radio" name="wpsg_vp[<?php echo $k; ?>]" value="<?php echo $group_vari['kv']; ?>" />&nbsp;<?php echo $group_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" && $vari['showpic'] != false) { ?>
+ <span class="wpsg_vp_field_image">
+ <?php echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $vari['showpic'], $this->get_option("wpsg_vp_showpic_width"), $this->get_option("wpsg_vp_showpic_height"), 's')); ?>
+ </span>
+ <?php } ?>
+ </label>
+ <?php } ?>
+ </div>
+ </div>
+ <?php } ?>
+
+ <?php } ?>
+
+ <?php if ($var['typ'] == "checkbox" && $var['aktiv'] == 1 && (!$this->hasMod('wpsg_mod_stock') || $var['stock'] > 0)) { ?>
+ <script type="text/javascript">
+
+ wpsg_vp[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = <?php echo (($var['preis'] != "")?$var['preis']:'0'); ?>;
+
+ <?php if (isset($vari['preis_original'])) { ?>
+ wpsg_vp_original[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['preis_original'] != "")?$vari['preis_original']:'0'); ?>;
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_weight')) { ?>
+ wpsg_wg[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = <?php echo (($var['weight'] != "")?$var['weight']:'0'); ?>;
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+ wpsg_fmenge[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = <?php echo (($var['fmenge'] != "")?wpsg_tf($var['fmenge']):'0'); ?>;
+ <?php } ?>
+
+ </script>
+ <label>
+ <input onchange="wpsg_vp_switch(<?php echo $this->view['data']['id']; ?>);" type="hidden" value="0" name="wpsg_vp[<?php echo $k; ?>]" />
+ <input onchange="wpsg_vp_switch(<?php echo $this->view['data']['id']; ?>);" 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 echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $var['showpic'], $this->get_option("wpsg_vp_showpic_width"), $this->get_option("wpsg_vp_showpic_height"), 's')); ?>
+ </span>
+ <?php } ?>
+ </label>
+ <?php } ?>
+
+ </div>
+
+ <div style="clear:both;"></div>
+
+ </div>
+
+ <?php } } ?>
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ <?php if ($vAktiv) { ?>
+ wpsg_vp_switch(<?php echo $this->view['data']['id']; ?>);
+ <?php } ?>
+ //jQuery('.wpsg_vp_field select').change();
+
+ } );
+
+ </script>
+
+ <?php } ?>
+ </div>
+ <?php /* Varianten ENDE */ ?>
+
+ <div class="wpsg_produkt_add_basket_wrapper">
+
+ <label class="wpsg_amount_label" for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?>:</label>
+
+ <input type="text" value="1" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" />
+
+ <?php if ($this->get_option('wpsg_afterinsert') == '2') { ?>
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>').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]': '1'
+ },
+ success: function(data)
+ {
+ tb_show('<?php echo __('Ihr Warenkorb', 'wpsg'); ?>', '<?php echo $this->getURL(wpsg_ShopController::URL_BASKET_AJAX); ?>&height=500');
+ }
+ } );
+
+ return false;
+
+ } );
+
+ } );
+
+ </script>
+ <?php } ?>
+
+ </div>
+
+ <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
+
+ <div class="wpsg_clear"></div>
+
+ <?php /* Facebook und Co Integration aus dem Produktartikel Modul */ ?>
+ <?php echo $this->callMod('wpsg_mod_produktartikel', 'socialIntegration', array($this->view['data']['id'])); ?>
+ <?php /* Facebook und Co Integration ENDE */ ?>
+
+ </div>
+
+ </div>
+
+ <?php if (strlen(trim($this->view['data']['beschreibung'])) > 0) { ?>
+ <div class="wpsg_produkt_additional_information">
+
+ <div itemprop="description" class="wpsg_produkt_beschreibung">
+ <?php echo $this->view['data']['beschreibung']; ?>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php $this->callMods('product_bottom', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
+
+</div> \ No newline at end of file
diff --git a/views/produkttemplates/standard_ajax.phtml b/views/produkttemplates/standard_ajax.phtml
new file mode 100644
index 0000000..2f73884
--- /dev/null
+++ b/views/produkttemplates/standard_ajax.phtml
@@ -0,0 +1,196 @@
+<?php
+
+ /*
+ * Template für das Produkt im Frontend
+ */
+
+ //Ausgabe der verfügbaren Variablen
+ //wpsg_debug($this->view['data']);
+
+ // Damit keine Zubehörprodukte ausgegeben werden
+ //$this->noReleatedProducts = true;
+
+ //wpsg_debug($_SESSION);
+
+?>
+<div class="wpsg_produkt_wrapper">
+ <div itemscope itemtype="http://schema.org/Product" class="wpsg_produkt wpsg_produkt_<?php echo $this->view['data']['id']; ?>">
+
+ <div class="wpsg_product_afterimage">
+
+ <h2 itemprop="name" class="wpsg_producttitle"><?php echo $this->getProductName($this->view['data']['id']); ?></h2>
+
+ <?php /* Block für die Produktbilder START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <div class="wpsg_produkt_produktbilder">
+ <?php if (sizeof($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])))) { ?>
+ <?php $i = 0; foreach ($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])) as $b) { $i ++; ?>
+ <?php if ($i == 1 && !wpsg_isSizedString($this->view['data']['varianten_image']) || $b == $this->view['data']['varianten_image']) { ?>
+ <div class="wpsg_produkt_preview wpsg_pb_pic">
+ <a class="wpsg_imagelink thickbox" rel="<?php echo $this->view['product_index']; ?>-<?php echo $this->view['data']['id']; ?>" href="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, 800, 600, $this->get_option('wpsg_mod_produktbilder_mode'))); ?>">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'))); ?>" alt="<?php echo wpsg_hspc($this->view['data']['name']); ?>" />
+ </a>
+ </div>
+ <?php } else { ?>
+ <div class="wpsg_pb_pic" style="display:none;">
+ <a class="wpsg_imagelink thickbox" rel="<?php echo $this->view['product_index']; ?>-<?php echo $this->view['data']['id']; ?>" href="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, 800, 600, $this->get_option('wpsg_mod_produktbilder_mode'))); ?>">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'))); ?>" alt="<?php echo wpsg_hspc($this->view['data']['name']); ?>" />
+ </a>
+ </div>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <?php /* Block für die Produktbilder ENDE */ ?>
+
+ <?php if ($this->get_option('wpsg_showArticelnumber') == '1') { ?>
+ <div class="wpsg_artikelnummer">
+ <?php echo __('Artikelnummer', 'wpsg'); ?>: <span class="wpsg_anr"><?php echo wpsg_hspc($this->view['data']['anr']); ?></span>
+ </div>
+ <?php } ?>
+
+ <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="wpsg_produkt_preis">
+ <?php echo __('Stückpreis:', 'wpsg'); ?>
+ <meta itemprop="priceCurrency" content="<?php echo $this->get_option('wpsg_currency'); ?>" />
+ <span itemprop="price" class="wpsg_preis preis_<?php echo $this->view['data']['id']; ?>" id="preis_<?php echo $this->view['data']['id']; ?>">
+ <?php echo wpsg_ff($this->view['data']['preis'], $this->get_option('wpsg_currency')); ?>
+ </span> <?php if (wpsg_isSizedString($this->view['data']['price_info'])) { echo '<div class="wpsg_priceinfo">'.wpsg_hspc($this->view['data']['price_info']).'</div>'; } ?>
+ <?php if ($this->hasMod('wpsg_mod_discount') && $this->view['data']['preis_prediscount'] > 0 && wpsg_isSizedInt($this->get_option('wpsg_mod_discount_show'))) { ?>
+
+ <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="wpsg_produkt_preis new_price">
+ <?php echo __('Unser Preis: ', 'wpsg'); ?>
+ <?php } else { } ?>
+ <br /><?php echo __('bisher', 'wpsg'); ?>: <span class="wpsg_preis_prediscount"><?php echo wpsg_ff($this->view['data']['preis_prediscount'], $this->get_option('wpsg_currency')); ?></span>
+ </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($this->view['data']['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($this->view['data']['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } ?>
+ </div>
+
+ <?php } ?>
+
+ <?php /* Füllmengenanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+
+ <div class="wpsg_produkt_fuellmenge">
+ <?php echo wpsg_translate(__('Füllmenge: #1# (#2# / #3#)', 'wpsg'),
+ '<span class="wpsg_fmenge">'.wpsg_ff($this->view['data']['fmenge'], '', true).'</span> '.$this->view['data']['feinheit'],
+ '<span class="fmenge_preis">'.wpsg_ff($this->view['data']['fmenge_preis'], $this->get_option('wpsg_currency')).'</span> ',
+ wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $this->view['data']['feinheit'])
+ ); ?>
+ </div>
+
+ <?php } ?>
+ <?php /* Füllmengenanzeige ENDE */ ?>
+
+ <?php /* Lieferzeit Anzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_deliverytime') && $this->get_option('wpsg_mod_deliverytime_show_product') == '1') { ?>
+
+ <div class="wpsg_mod_deliverytime">
+ <?php echo wpsg_translate(__('Lieferzeit: #1#', 'wpsg'), $this->callMod('wpsg_mod_deliverytime', 'getProductDeliveryTime', array($this->view['data']['id']))); ?>
+ </div>
+
+ <?php } ?>
+ <?php /* Lieferzeit Anzeige ENDE */ ?>
+
+ <?php /* Gewichtsanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProduct') === '1') { ?>
+ <div class="wpsg_mod_weight_produkt">
+ <?php echo wpsg_translate(__('Gewicht: #1# #2#', 'wpsg'), '<span class="wpsg_weight" id="weight_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['weight']).'</span>', $this->get_option('wpsg_mod_weight_unit')); ?>
+ </div>
+ <?php } ?>
+ <?php /* Gewichtsanzeige ENDE */ ?>
+
+ <?php /* Varianten START */ ?>
+ <div class="wpsg_produkt_varianten">
+ <?php echo $this->callMod('wpsg_mod_varianten', 'renderTemplate', array($this->view['data']['product_key'])); ?>
+ </div>
+ <?php /* Varianten ENDE */ ?>
+
+ <div class="wpsg_produkt_add_basket_wrapper">
+
+ <label class="wpsg_amount_label" for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?>:</label>
+
+ <input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"
+ <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?>
+ />
+
+ <?php $ti = $this->getTemplateIndex(); ?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_add_basket_<?php echo $ti; ?>').bind('click', function() {
+
+ jQuery.ajax( {
+ url: '<?php echo admin_url('admin-ajax.php'); ?>',
+ async: false,
+ data: {
+ form_data: jQuery('#wpsg_produktform_<?php echo $ti; ?>').serialize(),
+ action: 'ds_productadd'
+ },
+ success: function(data)
+ {
+
+ jQuery('#wpsg-widget').replaceWith(data);
+
+ alert('<?php echo __('Produkt wurde erfolgreich hinzugefügt.', 'wpsg'); ?>');
+
+ }
+ } );
+
+ return false;
+
+ } );
+
+ } );
+
+/* ]]> */</script>
+
+ </div>
+
+ <?php if (!$this->hasMod('wpsg_mod_request') || $this->callMod('wpsg_mod_request', 'productForSale', array($this->view['data']['id']))) { ?>
+ <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_request') && $this->callMod('wpsg_mod_request', 'isRequestProduct', array($this->view['data']['id']))) { ?>
+ <input class="wpsg_button wpsg_add_requestlist" id="wpsg_add_requestlist_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('Auf die Anfrageliste', 'wpsg'); ?>" name="wpsg[submit_request]" />
+ <?php } ?>
+
+ <div class="wpsg_clear"></div>
+
+ <?php /* Facebook und Co Integration aus dem Produktartikel Modul */ ?>
+ <?php echo $this->callMod('wpsg_mod_produktartikel', 'socialIntegration', array($this->view['data']['id'])); ?>
+ <?php /* Facebook und Co Integration ENDE */ ?>
+
+ </div>
+
+ </div>
+
+ <?php if (strlen(trim($this->view['data']['beschreibung'])) > 0) { ?>
+ <div class="wpsg_produkt_additional_information">
+
+ <div itemprop="description" class="wpsg_produkt_beschreibung">
+ <?php echo $this->view['data']['beschreibung']; ?>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php $this->callMods('product_bottom', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
+
+</div> \ No newline at end of file
diff --git a/views/produkttemplates/standard_login.phtml b/views/produkttemplates/standard_login.phtml
new file mode 100644
index 0000000..277adc7
--- /dev/null
+++ b/views/produkttemplates/standard_login.phtml
@@ -0,0 +1,177 @@
+<?php
+
+ /*
+ * Template für das Produkt im Frontend
+ * zeigt Preise, Menge und Warenkorb Button nur bei Login des Kunden
+ */
+
+ //Ausgabe der verfügbaren Variablen
+ //wpsg_debug($_SESSION);
+ //wpsg_debug($this->view['data']['stock']);
+
+ // Damit keine Zubehörprodukte ausgegeben werden
+ //$this->noReleatedProducts = true;
+
+?>
+<div class="wpsg_produkt_wrapper">
+ <div itemscope itemtype="http://schema.org/Product" class="wpsg_produkt wpsg_produkt_<?php echo $this->view['data']['id']; ?>">
+
+ <?php /* Block für die Produktbilder START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <div class="wpsg_produkt_produktbilder">
+ <?php if (sizeof($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])))) { ?>
+ <?php $i = 0; foreach ($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])) as $b) { $i ++; ?>
+ <?php if ($i == 1) { ?>
+ <div class="wpsg_produkt_preview wpsg_pb_pic">
+ <?php echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $i, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'), 'pimage')); ?>
+ <?php /*<img itemprop="image" id="wpsg_mainimage_<?php echo $this->getTemplateIndex(); ?>" src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'))); ?>" alt="" />*/?>
+ </div>
+ <?php } else { ?>
+ <div class="wpsg_pb_pic" style="display:none;">
+ <?php echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $i, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'), 'pimage')); ?>
+ </div>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <?php /* Block für die Produktbilder ENDE */ ?>
+
+ <div class="wpsg_produkt_right">
+
+ <h1 itemprop="name" class="wpsg_producttitle"><?php echo wpsg_hspc($this->view['data']['name']); ?></h1>
+
+ <div class="wpsg_artikelnummer">
+ <?php echo __('Artikelnummer', 'wpsg'); ?>: <span class="wpsg_anr"><?php echo wpsg_hspc($this->view['data']['anr']); ?></span>
+ </div>
+
+ <!-- Beginn Login abfrage -->
+ <?php if ($this->callMod('wpsg_mod_kundenverwaltung', 'getUserStatus', array($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn'))) == true) { ?>
+ <!-- Beginn Login abfrage -->
+
+ <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="wpsg_produkt_preis">
+ <?php echo __('Stückpreis:', 'wpsg'); ?>
+ <meta itemprop="priceCurrency" content="<?php echo $this->get_option('wpsg_currency'); ?>" />
+ <span itemprop="price" class="preis_<?php echo $this->view['data']['id']; ?>" id="preis_<?php echo $this->view['data']['id']; ?>"><?php echo wpsg_ff($this->view['data']['preis']); ?></span> <?php echo $this->get_option('wpsg_currency'); ?>
+ </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($this->view['data']['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($this->view['data']['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } ?>
+ </div>
+
+ <?php } ?>
+
+ <!-- Ende Login abfrage -->
+ <?php } ?>
+ <!-- Ende Login abfrage -->
+
+ <?php /* Füllmengenanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+
+ <div class="wpsg_produkt_fuellmenge">
+ <?php echo wpsg_translate(__('Füllmenge: #1# (#2# / #3#)', 'wpsg'),
+ wpsg_ff($this->view['data']['fmenge'], $this->view['data']['feinheit'], true),
+ wpsg_ff($this->view['data']['fmenge_preis'], $this->get_option('wpsg_currency')),
+ wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $this->view['data']['feinheit'])
+ ); ?>
+ </div>
+ <?php } ?>
+ <?php /* Füllmengenanzeige ENDE */ ?>
+
+ <?php /* Gewichtsanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProduct') === '1') { ?>
+ <div class="wpsg_mod_weight_produkt">
+ <?php echo wpsg_translate(__('Gewicht: #1# #2#', 'wpsg'), '<span id="weight_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['weight']).'</span>', $this->get_option('wpsg_mod_weight_unit')); ?>
+ </div>
+ <?php } ?>
+ <?php /* Gewichtsanzeige ENDE */ ?>
+
+ <?php /* Varianten START */ ?>
+ <div class="wpsg_produkt_varianten">
+ <?php echo $this->callMod('wpsg_mod_varianten', 'renderTemplate', array($this->view['data']['id'])); ?>
+ </div>
+ <?php /* Varianten ENDE */ ?>
+
+ <!-- Beginn Login abfrage -->
+ <?php if ($this->callMod('wpsg_mod_kundenverwaltung', 'getUserStatus', array($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn'))) == true) { ?>
+ <!-- Beginn Login abfrage -->
+
+ <div class="wpsg_produkt_add_basket_wrapper">
+
+ <label for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?>:</label>
+
+ <input type="text" value="1" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" />
+ <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
+
+ <?php if ($this->get_option('wpsg_afterinsert') == '2') { ?>
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>').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]': '1'
+ },
+ success: function(data)
+ {
+ tb_show('<?php echo __('Ihr Warenkorb', 'wpsg'); ?>', '<?php echo $this->getURL(wpsg_ShopController::URL_BASKET_AJAX); ?>&height=450');
+ }
+ } );
+
+ return false;
+
+ } );
+
+ } );
+
+ </script>
+ <?php } ?>
+
+ </div>
+
+ <!-- Ende Login abfrage -->
+ <?php } ?>
+ <!-- Ende Login abfrage -->
+
+ </div>
+
+ <div class="wpsg_clear"></div>
+
+ <?php /* Facebook und Co Integration aus dem Produktartikel Modul */ ?>
+ <?php echo $this->callMod('wpsg_mod_produktartikel', 'socialIntegration', array($this->view['data']['id'])); ?>
+ <?php /* Facebook und Co Integration ENDE */ ?>
+
+ </div>
+
+ <?php if (strlen(trim($this->view['data']['beschreibung'])) > 0) { ?>
+ <div class="wpsg_produkt_additional_information">
+
+ <div itemprop="description" class="wpsg_produkt_beschreibung">
+ <?php echo $this->view['data']['beschreibung']; ?>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php $this->callMods('product_bottom', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
+
+</div> \ No newline at end of file
diff --git a/views/warenkorb/ajaxDialog.phtml b/views/warenkorb/ajaxDialog.phtml
new file mode 100644
index 0000000..1f5d5cc
--- /dev/null
+++ b/views/warenkorb/ajaxDialog.phtml
@@ -0,0 +1,62 @@
+<?php
+
+ /**
+ * Template für den Dialog wenn im Backend "Lightbox Meldung" eingestellt ist
+ */
+
+ // $this->view['error'] // Steht auf true wenn ein Fehler produziert und angezeigt werden soll
+ // $this->view['product_key'] // Der ProduktSchlüssel des hinzugefügten Produktes
+ // $this->view['amount_add'] // So oft wurde das Produkt hinzugefügt
+ // $this->view['amount_basket'] // So oft befindet sich das hinzugefügte Produkt im Warenkorb
+ // $this->view['product_data'] // Array mit Produktdaten
+
+?><div id="wpsg_basket_ajax_message">
+
+ <div class="wpsg_basket_ajax_message_content">
+
+ <?php if ($this->view['error'] === true) { echo $this->writeFrontendMessage(); } else { ?>
+
+ <span class="wpsg_basket_ajax_message_content_success">
+ <?php echo wpsg_translate(
+ __('Es wurde #1#x "#2#" in den Warenkorb gelegt.', 'wpsg'),
+ $this->view['amount_add'],
+ $this->getProductName($this->view['product_data']['id'], true)); ?>
+ </span>
+
+ <?php } ?>
+
+ <div class="wpsg_button_wrap">
+ <button class="wpsg_button wpsg_button_continue_shopping" onclick="return wpsg_basket_ajax_message_close();"><?php echo __('Weiter Einkaufen', 'wpsg'); ?></button>
+ <a href="<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET); ?>"><button class="wpsg_button wpsg_button_basket"><?php echo __('Zum Warenkorb', 'wpsg'); ?></button></a>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <?php $this->clearFrontendMessage(); ?>
+
+ </div>
+
+</div><div id="wpsg_basket_ajax_layer"></div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_basket_ajax_message_close()
+ {
+
+ jQuery('#wpsg_basket_ajax_message').remove();
+ jQuery('#wpsg_basket_ajax_layer').remove();
+
+ return false;
+
+ }
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_basket_ajax_layer').bind('click', function() {
+
+ wpsg_basket_ajax_message_close();
+
+ } );
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/warenkorb/basket.phtml b/views/warenkorb/basket.phtml
new file mode 100644
index 0000000..f75874f
--- /dev/null
+++ b/views/warenkorb/basket.phtml
@@ -0,0 +1,331 @@
+<?php
+
+ /**
+ * Template für den Warenkorb
+ */
+
+ //wpsg_debug($this->view['basket']);
+ //wpsg_debug($_SESSION);
+ //wpsg_debug($this->arShipping);
+
+?>
+<div class="wpsg wpsg_basket <?php echo ((isset($_REQUEST['wpsg_basket_ajax']))?'wpsg_basket_ajax':''); ?>">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <?php $this->callMods('basket_top'); ?>
+
+ <?php if (sizeof($this->view['basket']['produkte']) > 0) { ?>
+
+ <?php $GLOBALS['step'] = 1; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>
+
+ <form id="wpsg_basket_form" name="wpsg_basket_form" method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_CHECKOUT); ?>">
+
+ <h2><?php echo __('Bestellte Produkte', 'wpsg'); ?></h2>
+
+ <div class="wpsg_spacer"></div>
+
+ <table>
+ <tr class="wpsg_kopf">
+ <th class="wpsg_cell_number">&nbsp;</th>
+ <th class="wpsg_cell_menge"><?php echo __("Anzahl", "wpsg"); ?></th>
+ <th class="wpsg_cell_preis"><?php echo __("Einzelpreis", "wpsg"); ?></th>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
+ <?php } ?>
+ <th class="wpsg_cell_gesamtpreis"><?php echo __("Gesamtpreis", "wpsg"); ?></th>
+ </tr>
+ <?php $i = 0; foreach ($this->view['basket']['produkte'] as $k => $p) { $i ++; ?>
+ <?php $strBasketRow = ''; ob_start(); $this->callMods('basket_row', array(&$p, $i)); $strBasketRow = ob_get_contents(); ob_end_clean(); ?>
+ <tr class="productrow_1 wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="wpsg_cell_number" rowspan="<?php echo 2 + substr_count($strBasketRow, '<tr'); ?>">
+
+ <a class="wpsg_basket_removelink" href="<?php echo $this->getRemoveLinkURL($p['product_index']); ?>" title="<?php echo __('Produkt aus dem Warenkorb entfernen', 'wpsg'); ?>" onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass sie das Produkt aus dem Warenkorb 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_menge">
+ <input class="wpsg_form_submit_return" type="text" name="wpsg[menge][<?php echo $p['product_index']; ?>]" <?php echo ((wpsg_isTrue($p['oneOnly']) || wpsg_isSizedInt($p['basket_multiple'], 4))?'readonly="readonly"':''); ?> value="<?php echo wpsg_hspc($p['menge']); ?>" size="3" />
+ </td>
+ <td class="wpsg_cell_preis"><?php echo wpsg_ff($p['preis']); ?> <?php echo $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($p['mwst_value']); ?> %</td>
+ <?php } ?>
+ <td class="wpsg_cell_gesamtpreis"><?php echo wpsg_ff($p['menge'] * $p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
+ </tr>
+ <tr class="productrow_2 wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>" class="wpsg_cell_name">
+ <?php if ($this->get_option('wpsg_mod_produktbilder_basketimage') == '1' && $this->hasMod('wpsg_mod_produktbilder')) {
+
+ if (wpsg_isSizedString($p['varianten_image'])) $arBilder = array($p['varianten_image']);
+ else $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->getProduktID($p['id'])));
+
+ ?>
+ <div class="wpsg_basket_productimage">
+ <?php if (wpsg_isSizedString($arBilder[0])) { ?>
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->getProduktID($p['id']), $arBilder[0], 30, 30, 'c')); ?>" alt="<?php echo wpsg_hspc((($p['detailname'] != '')?$p['detailname']:$p['name'])); ?>" />
+ <?php } ?>
+ </div>
+ <?php } ?>
+ <?php if ($this->getProduktLink($p)) { ?>
+ <a href="<?php echo $this->getProduktLink($p); ?>"><?php echo wpsg_hspc((($p['detailname'] != '')?$p['detailname']:$p['name'])); ?></a>
+ <?php } else { ?>
+ <?php echo wpsg_hspc((($p['detailname'] != '')?$p['detailname']:$p['name'])); ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php echo $strBasketRow; ?>
+ <?php } ?>
+ <?php $this->callMods('basket_row_afterproducts', array(&$p, $i)); ?>
+ <?php if (isset($this->view['basket']['gs'])) { ?>
+ <tr class="wpsg_row_gutschein">
+ <td class="wpsg_cell_number" rowspan="2">
+ <a href="<?php echo str_replace('&', '&amp;', $this->getRemoveLinkURL('gs')); ?>" title="<?php echo __('Gutschein aus dem Warenkorb entfernen', 'wpsg'); ?>" onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass sie den Gutschein aus dem Warenkorb 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_menge">1</td>
+ <td class="wpsg_cell_preis">
+ <?php if ($this->view['basket']['gs']['calc'] == 'p') { ?>
+ <?php echo '-'.wpsg_ff($this->view['basket']['gs']['value'], '%'); ?>
+ <?php } else { ?>
+ <?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?>
+ <?php } ?>
+ </td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td class="wpsg_cell_mwst"><?php echo __('anteilig', 'wpsg'); ?></td>
+ <?php } ?>
+ <td class="wpsg_cell_gesamtpreis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <tr class="productrow_2">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_name">
+ <?php echo __('Gutschein', 'wpsg'); ?> <?php echo ($this->view['basket']['gs']['code'] != '')? '('.$this->view['basket']['gs']['code'].')':'' ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php if (isset($this->view['basket']['sum']['preis_rabatt']) && wpsg_tf($this->view['basket']['sum']['preis_rabatt']) > 0) { ?>
+ <tr class="wpsg_row_discount">
+ <td class="wpsg_cell_menge"></td>
+ <td class="wpsg_cell_name">
+ <?php echo __('Rabatt', 'wpsg'); ?>
+ </td>
+ <td class="wpsg_cell_preis">
+ <?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $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 __('anteilig', 'wpsg'); ?></td>
+ <?php } ?>
+ <td class="wpsg_cell_gesamtpreis">
+ <?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <tr class="wpsg_row_summe">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
+ <?php if ($this->get_option("wpsg_kleinunternehmer") == "1") { ?>
+ <?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
+ <?php } else { ?>
+ <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
+ <?php } ?>
+ <?php } ?>
+ </td>
+ <td class="wpsg_cell_summe_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+ <tr class="wpsg_basket_shipping">
+ <td colspan="3" class="wpsg_cell_shipping_label">
+ <?php echo wpsg_translate(__('<a href="#1#">Versandkosten</a>:', 'wpsg'),
+ $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN)
+ ); ?>
+ <?php if (sizeof($this->arShipping) > 1) { ?>
+ <select name="set_shipping" class="wpsg_form_submit set_shipping">
+ <option><?php echo __('Bitte wählen', 'wpsg')?></option>
+ <?php foreach ($this->arShipping as $s_id => $s) { ?>
+ <option <?php echo (($s['id'] == $this->view['basket']['checkout']['shipping'])?'selected="selected"':''); ?> value="<?php echo $s_id; ?>"><?php echo wpsg_hspc(__($s['name'], 'wpsg')); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else { ?>
+ <span><?php echo $this->arShipping[$this->view['basket']['checkout']['shipping']]['name']; ?></span>
+ <?php } ?>
+ <?php if ($this->get_option('wpsg_hideBasketCountrySelect') != '1') { ?>
+ <select name="set_land" class="wpsg_form_submit set_land">
+ <?php foreach ($this->view['arLander'] as $l_id => $l) { ?>
+ <option <?php echo (($l_id == $this->getFrontendCountry(true))?'selected="selected"':''); ?> value="<?php echo $l_id; ?>"><?php echo wpsg_hspc(__($l, 'wpsg')); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else { ?>
+ <input type="hidden" name="set_land" value="<?php echo $this->view['basket']['checkout']['shipping_land']; ?>" />
+ <?php } ?>
+ </td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td class="wpsg_cell_mwst"><?php
+
+ if (isset($this->view['basket']['shipping']['tax_rata']) && $this->view['basket']['shipping']['tax_rata'] === true)
+ {
+
+ echo __('anteilig', 'wpsg');
+
+ }
+ else if (array_key_exists($this->view['basket']['checkout']['shipping'], $this->arShipping))
+ {
+
+ echo wpsg_ff($this->arShipping[$this->view['basket']['checkout']['shipping']]['mwst_value'], '%');
+
+ }
+
+ ?></td>
+ <?php /*?><td class="wpsg_cell_mwst"><?php echo (($this->arShipping[$this->view['basket']['checkout']['shipping']]['mwst_value'] > 0)?wpsg_ff($this->arShipping[$this->view['basket']['checkout']['shipping']]['mwst_value'], '%'):__('anteilig', 'wpsg')); ?></td> */?>
+ <?php } ?>
+ <td class="wpsg_cell_shipping_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+
+ <?php /* Zeile für Zahlungsart BEGIN */ ?>
+ <?php if (!$this->hasMod('wpsg_mod_crefopay')) { ?>
+ <tr class="wpsg_basket_payment">
+ <td colspan="3" class="wpsg_cell_payment_label">
+ <?php echo __('Zahlungsart:', 'wpsg'); ?>
+ <?php if (sizeof($this->arPayment) > 1) { ?>
+ <select name="set_payment" class="wpsg_form_submit set_payment">
+ <option><?php echo __('Bitte wählen', 'wpsg')?></option>
+ <?php foreach ($this->arPayment as $p_id => $p) { ?>
+ <option <?php echo (($p['id'] == $this->view['basket']['checkout']['payment'])?'selected="selected"':''); ?> value="<?php echo $p_id; ?>"><?php echo wpsg_hspc($p['name']); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else { ?>
+ <span><?php echo $this->arPayment[$this->view['basket']['checkout']['payment']]['name']; ?></span>
+ <?php } ?>
+ </td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td class="wpsg_cell_mwst"><?php
+
+ if (isset($this->view['basket']['payment']['tax_rata']) && $this->view['basket']['payment']['tax_rata'] === true)
+ {
+
+ echo __('anteilig', 'wpsg');
+
+ }
+ else if (array_key_exists(wpsg_getStr($this->view['basket']['checkout']['payment']), $this->arPayment))
+ {
+
+ echo wpsg_ff($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst_value'], '%');
+
+ }
+
+ ?></td>
+ <?php } ?>
+ <td class="wpsg_cell_payment_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php /* Zeile für Zahlungsart ENDE */ ?>
+
+ <?php if (get_option("wpsg_kleinunternehmer") == "1") { ?>
+ <tr class="wpsg_basket_kleinunternehmer">
+ <td colspan="<?php echo $this->view['colspan'] + 1; ?>"><?php echo get_option('wpsg_kleinunternehmer_text'); ?></td>
+ </tr>
+ <tr class="wpsg_basket_gesamt">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
+ <?php echo __('Gesamtpreis', 'wpsg'); ?>:
+ </td>
+ <td class="wpsg_cell_gesamtsumme_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+ <?php } else { ?>
+ <tr class="wpsg_basket_gesamt_netto wpsg_row_small">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
+ <?php echo __('Gesamtpreis (Netto)', 'wpsg'); ?>:
+ </td>
+ <td class="wpsg_cell_gesamtsumme_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+ <?php foreach ($this->view['basket']['mwst'] as $mwst) { ?>
+ <tr class="wpsg_row_mwst">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
+ <?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), __($mwst['name'], 'wpsg')); ?>:
+ </td>
+ <td class="wpsg_cell_mwst_value">
+ <?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <tr class="wpsg_basket_gesamt wpsg_row_small">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
+ <?php echo __('Gesamtpreis (Brutto)', 'wpsg'); ?>:
+ </td>
+ <td class="wpsg_cell_gesamtsumme_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php $this->callMods('basket_row_end', array(&$this->view)); ?>
+ </table>
+
+ <?php $this->callMods('basket_inner_prebutton', array(&$this->view)); ?>
+
+ <br />
+
+ <input type="hidden" name="wpsg_basket_submit" value="1" />
+
+ <input type="submit" class="wpsg_button wpsg_refreshbutton" value="<?php echo __('aktualisieren', 'wpsg'); ?>" name="wpsg_basket_refresh" />
+ <input type="submit" class="wpsg_button wpsg_checkoutbutton" value="<?php echo __('zur Kasse', 'wpsg'); ?>" name="wpsg_checkout" />
+
+ <div class="wpsg_clear"></div>
+
+ <?php $this->ClearSessionErrors(); ?>
+
+ </form>
+
+ <?php $this->callMods('basket_after', array(&$this->view)); ?>
+
+ <?php } else { ?>
+ <p><?php echo __('Keine Produkte im Warenkorb.', 'wpsg'); ?></p>
+ <?php } ?>
+
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_submit_return').bind('keypress', function(e) {
+
+ var code = e.keyCode || e.which;
+
+ if (code == 13)
+ {
+
+ jQuery('.wpsg_refreshbutton').click(); return false;
+
+ }
+
+ } );
+
+ jQuery('.wpsg_form_submit').bind('change', function() {
+
+ jQuery('.wpsg_refreshbutton').click();
+
+ } );
+
+ } );
+
+ <?php if (isset($_REQUEST['wpsg_basket_ajax'])) { ?>
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpshopgermany_widget').load('<?php echo $this->getURL(wpsg_ShopController::URL_WIDGET_AJAX); ?>');
+
+ } );
+
+ <?php } ?>
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/warenkorb/checkout.phtml b/views/warenkorb/checkout.phtml
new file mode 100644
index 0000000..1cf4e9b
--- /dev/null
+++ b/views/warenkorb/checkout.phtml
@@ -0,0 +1,269 @@
+<?php
+
+ /**
+ * Template für den ersten Schritt der Kasse
+ * Kundendaten etc.
+ */
+
+ //wpsg_debug($this->view);
+
+?>
+<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_checkout2button').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 wpsg_checkout">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <?php $GLOBALS['step'] = 2; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>
+
+ <form id="form-step2" method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>" enctype="multipart/form-data">
+
+ <?php /* Einbindung des Logins im Checokut */ ?>
+ <?php $this->callMod('wpsg_mod_kundenverwaltung', 'checkout_login'); ?>
+
+ <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" 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[checkout][firma]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['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[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" 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[checkout][vname]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['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[checkout][name]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['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="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" 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="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" id="wpsg_geburtsdatum">
+ <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" 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="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" 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="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" 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[checkout][strasse]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['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="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[checkout][plz]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['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[checkout][ort]" value="<?php echo htmlspecialchars($this->view['basket']['checkout']['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[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"':((!wpsg_isSizedInt($this->view['basket']['checkout']['land']) && $this->get_option('wpsg_defaultland') == $l['id'])?'selected="selected"':'')); ?>><?php echo wpsg_hspc(__($l['name'], 'wpsg')); ?></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[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 wpsg_checkout" 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(); ?>
+
+ <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[ */
+
+ jQuery(document).ready(function() {
+ jQuery('#wpsg_checkout_set_comment').bind('change', function() {
+ if (jQuery(this).attr('checked') == true || jQuery(this).attr('checked') == "checked") jQuery('#wpsg_checkout_comment').show();
+ else jQuery('#wpsg_checkout_comment').hide();
+ } );
+ } );
+
+ /* ]]> */</script>
+
+</div> \ No newline at end of file
diff --git a/views/warenkorb/checkout2.phtml b/views/warenkorb/checkout2.phtml
new file mode 100644
index 0000000..b80ca62
--- /dev/null
+++ b/views/warenkorb/checkout2.phtml
@@ -0,0 +1,148 @@
+<?php
+
+ /**
+ * Template für die Eingabe der Zahlungs- und Versandinformationen
+ */
+
+ //wpsg_debug($this->view['basket']['checkout']);
+ //die();
+
+?>
+<div class="wpsg wpsg_checkout2">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <?php $GLOBALS['step'] = 3; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>
+
+ <form id="wpsg_checkout_form" method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>">
+
+ <input type="hidden" value="1" name="wpsg[checkout][send]" />
+
+ <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>
+
+ <br />
+
+ <?php $this->callMods('checkout2_inner_prebutton', array(&$this->view)); ?>
+
+ <input type="submit" class="wpsg_button wpsg_checkoutbutton" value="<?php echo __('zurück', 'wpsg'); ?>" name="wpsg_redirect_checkout" />
+ <input type="submit" id="wpsg_checkout2button" class="wpsg_button wpsg_overviewbutton" value="<?php echo __('weiter', 'wpsg'); ?>" name="wpsg_checkout2" />
+
+ <div class="wpsg_clear"></div>
+
+ </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));
+
+ } );
+
+ } );
+
+ /* ]]> */</script>
+
+</div> \ No newline at end of file
diff --git a/views/warenkorb/customerquestion.phtml b/views/warenkorb/customerquestion.phtml
new file mode 100644
index 0000000..595fbdb
--- /dev/null
+++ b/views/warenkorb/customerquestion.phtml
@@ -0,0 +1,91 @@
+<?php
+
+ /**
+ * Zeigt die Abfrage nach der EU - Leistungsortregel an
+ */
+
+?>
+<form method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>">
+
+ <input type="hidden" name="wpsg[action]" value="customeranswer" />
+ <input type="hidden" name="wpsg[redirect]" value="<?php echo wpsg_hspc($this->view['url']); ?>" />
+
+ <h2><?php echo __('Für eine korrekte Preisberechnung benötigen wir folgende Informationen von Ihnen.', 'wpsg'); ?></h2>
+
+ <div class="customertype">
+
+ <h2><?php echo __('Sie sind:', 'wpsg'); ?></h2>
+
+ <div id="customerquestion_fk">
+ <label >
+ <input id="customerquestion_fk_button" type="radio" value="0" <?php echo ((!isset($_SESSION['wpsg']['checkout']['customertype']) || $_SESSION['wpsg']['checkout']['customertype'] === '0')?'checked="checked"':''); ?> name="wpsg[customertype]">&nbsp;<?php echo __('Firmenkunde', 'wpsg'); ?>
+ </label>
+ </div>
+ <div id="customerquestion_ek">
+ <label >
+ <input id="customerquestion_ek_button" type="radio" value="1" <?php echo ((isset($_SESSION['wpsg']['checkout']['customertype']) && $_SESSION['wpsg']['checkout']['customertype'] === '1')?'checked="checked"':''); ?> name="wpsg[customertype]">&nbsp;<?php echo __('Endkunde', 'wpsg'); ?>
+ </label>
+ </div>
+
+ </div>
+
+ <div class="country">
+ <h2><?php echo __('aus:', 'wpsg'); ?></h2>
+ <select class="wpsg_land" name="wpsg[customerCountry]">
+ <?php foreach ($this->view['arCountry'] as $country) { ?>
+ <option value="<?php echo wpsg_hspc($country->id); ?>" <?php echo (($country->id == $this->view['defaultCountry_id'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($country->name); ?></option>
+ <?php } ?>
+ </select>
+ </div>
+
+ <div class="button_wrap">
+ <input id="customerquestion_ok_button" type="submit" name="wpsg_submit" class="wpsg_button" value="<?php echo __('OK', 'wpsg'); ?>" />
+ </div>
+
+</form>
+
+<div class="wpsg_clear"></div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(window).resize(function() {
+
+ // Hintergrund vom Body übernehmen
+ jQuery('#wpsg_calc_layer .content').css( { 'background-color': jQuery('body').css('background-color') } );
+
+ if (jQuery(window).width() < 600)
+ {
+
+ var layer_width = jQuery(window).width() - 50;
+
+ jQuery('#wpsg_calc_layer .content').css( {
+ 'width': layer_width + 'px',
+ 'margin-left': (-1 * (layer_width / 2)) + 'px'
+ } );
+
+ }
+
+ var layer_height = jQuery('#wpsg_calc_layer .content').height();
+
+ if (jQuery(window).height() < layer_height)
+ {
+
+ jQuery('#wpsg_calc_layer .content').css( {
+ 'margin-top': '25px;',
+ 'top': '0px'
+ } );
+
+ }
+ else
+ {
+
+ jQuery('#wpsg_calc_layer .content').css( {
+ 'margin-top': (-1 * (layer_height / 2)) + 'px',
+ 'top': '50%'
+ } );
+
+ }
+
+ } ).resize();
+
+/* ]]> */</script>
diff --git a/views/warenkorb/done.phtml b/views/warenkorb/done.phtml
new file mode 100644
index 0000000..78b0f55
--- /dev/null
+++ b/views/warenkorb/done.phtml
@@ -0,0 +1,48 @@
+<?php
+
+ /**
+ * Template, welches nach erfolgreicher Bestellung angezeigt wird
+ */
+
+ /*
+ BestellID: <?php echo $this->view['o_id']; ?>
+ Menge aller Produkte: <?php echo $this->view['menge']; ?>
+ Array mit bestellten Produkten: <?php print_r($this->view['basket']['produkte']); ?>
+ Array mit den MwSt Sätzen: <?php print_r($this->view['basket']['mwst']); ?>
+ Array mit den calculierten Preisen: <?php print_r($this->view['basket']['sum']); ?>
+ Netto Bestellsumme: <?php echo $this->view['basket']['sum']['preis_gesamt_netto']; ?>
+ Brutto Bestellsumme / Rechnungsbetrag: <?php echo $this->view['basket']['sum']['preis_gesamt_brutto']; ?>
+ Gesamtgewicht (wenn aktiviert): <?php echo $this->view['basket']['sum']['weight']; ?>
+ Gesamtsteuer: <?php echo $this->view['basket']['sum']['mwst']; ?>
+ Kosten Versand: <?php echo $this->view['basket']['sum']['preis_shipping']; ?>
+ Kosten Zahlart: <?php echo $this->view['basket']['sum']['preis_payment']; ?>
+ Kundendaten: <?php print_r($this->view['basket']['checkout']); ?>
+ Name des Kunden: <?php echo $this->view['basket']['checkout']['name']; ?>
+ Vorname des Kunden: <?php echo $this->view['basket']['checkout']['vname']; ?>
+ E-Mail des Kunden: <?php echo $this->view['basket']['checkout']['email']; ?>
+ Strasse des Kunden: <?php echo $this->view['basket']['checkout']['strasse']; ?>
+ Ort des Kunden: <?php echo $this->view['basket']['checkout']['ort']; ?>
+ PLZ des Kunden: <?php echo $this->view['basket']['checkout']['plz']; ?>
+ Name der Versandadresse (wenn angegeben): <?php echo $this->view['basket']['checkout']['shipping_name']; ?>
+ Vorname der Versandadresse (wenn angegeben): <?php echo $this->view['basket']['checkout']['shipping_vname']; ?>
+ Straße der Versandadresse (wenn angegeben): <?php echo $this->view['basket']['checkout']['shipping_strasse']; ?>
+ Ort der Versandadresse (wenn angegeben): <?php echo $this->view['basket']['checkout']['shipping_ort']; ?>
+ PLZ der Versandadresse (wenn angegeben): <?php echo $this->view['basket']['checkout']['shipping_plz']; ?>
+ Kundennummer: <?php echo $this->view['customer']['knr']; ?>
+ Bestellnummer: <?php echo $this->view['order']['onr']; ?>
+ Zahlungsart: <?php echo $this->arShipping[$this->view['basket']['checkout']['payment']]['name']; ?>
+ Versandart: <?php echo $this->arShipping[$this->view['basket']['checkout']['shipping']]['name']; ?>
+ */
+
+?>
+<div class="wpsg wpsg_done">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <p><?php echo __('Vielen Dank für Ihre Bestellung!', 'wpsg'); ?></p>
+ <p><?php $this->callMods('order_done', array(&$this->view['o_id'], &$this->view)); ?></p>
+
+ <br />
+ <div class="wpsg_clear"></div>
+
+</div> \ No newline at end of file
diff --git a/views/warenkorb/index.phtml b/views/warenkorb/index.phtml
new file mode 100644
index 0000000..b03d426
--- /dev/null
+++ b/views/warenkorb/index.phtml
@@ -0,0 +1,118 @@
+<?php
+
+ /**
+ * Template für das Warenkorb Widget
+ */
+
+?>
+<aside id="wpsg-widget" class="widget wpsg_basket_widget">
+ <h2 class="widget-title widgettitle"><?php echo __("Warenkorb", "wpsg"); ?></h2>
+ <br />
+
+ <?php if ($this->view['countArtikel'] > 0) { ?>
+ <?php echo $this->view['countArtikel']; ?> <?php echo __("Artikel für", "wpsg"); ?> <?php echo wpsg_ff($this->view['basket']['sum']['preis'], $this->get_option('wpsg_currency')); ?> <?php echo __("im Warenkorb", "wpsg"); ?>
+ <br /><br />
+ <form method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>">
+
+ <input type="hidden" name="subaction" value="index" />
+
+ <table>
+ <?php foreach ($this->view['basket']['produkte'] as $p) { ?>
+ <tr>
+ <td class="wpsg_cell_name"><a href="<?php echo $this->getProduktLink($p); ?>">
+ <?php
+
+ echo $p['menge'].' x '.((strlen($p['name']) > 13)?mb_substr($p['name'], 0, 30).'..':$p['name']);
+
+ ?></a>
+ </td>
+ <td class="wpsg_cell_amount">
+ <?php
+
+ echo wpsg_ff(($p['preis'] * $p['menge']), $this->get_option('wpsg_currency'));
+
+ ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php if (isset($this->view['basket']['sum']['preis_rabatt']) && wpsg_tf($this->view['basket']['sum']['preis_rabatt']) > 0) { ?>
+ <tr>
+ <td class="wpsg_cell_name">
+ <?php echo __('Rabatt', 'wpsg'); ?>
+ </td>
+ <td class="wpsg_cell_amount">
+ <?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php if (isset($this->view['basket']['gs'])) { // Gutschein vorhanden ?>
+ <tr>
+ <td class="wpsg_cell_name">
+ <?php echo __('Gutschein', 'wpsg'); ?>
+ <?php if ($this->view['basket']['gs']['calc'] == 'p') { ?>
+ (<?php echo $this->view['basket']['gs']['value']; ?>%)
+ <?php } ?>
+ </td>
+ <td class="wpsg_cell_amount">
+ <?php
+
+ echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
+
+ ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <tr class="wpsg_row_summary">
+ <td class="wpsg_cell_name"><?php echo __("Gesamt", "wpsg"); ?>:</td>
+ <td class="wpsg_cell_amount"><?php echo wpsg_ff($this->view['basket']['sum']['preis'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ </table>
+ </form>
+ <br />
+
+ <?php if (trim($this->view['wpsg_versandhinweis']) != '') { ?>
+ <i><?php echo $this->view['wpsg_versandhinweis']; ?></i><br />
+ <?php } else if ($this->get_option("wpsg_kleinunternehmer") == "1" || $this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <i><?php echo __("Alle Preise zzgl. ", "wpsg"); ?><a href="<?php echo $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN); ?>"><?php echo __("Versandkosten", "wpsg"); ?></a>.</i>
+ <?php } else { ?>
+ <i><?php echo __("Alle Preise inklusive MwSt. und zzgl.", "wpsg"); ?> <a href="<?php echo $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN); ?>"><?php echo __("Versandkosten", "wpsg"); ?></a></i><br />
+ <?php } ?>
+ <?php if ($this->get_option('wpsg_page_basket') != get_the_ID() || isset($_REQUEST['produkt_id'])) { ?>
+ <input type="button" class="wpsg_button wpshopgermany_linktokasse" onclick="location.href='<?php echo $this->getURL(wpsg_ShopController:: URL_BASKET); ?>';" value="<?php echo __("Zum Warenkorb", "wpsg"); ?>" />
+ <?php } ?>
+ <?php } else { ?>
+ <?php echo __("Keine Artikel im Warenkorb", "wpsg"); ?><br />
+ <?php } ?>
+
+ <div class="wpsg_clear"></div><br />
+ <?php if ($this->showEULayer) { ?>
+ <?php echo wpsg_translate(
+ __('Für Produkte nach EU Leistungsortregel wird der Steuersatz von #1# angewendet.', 'wpsg'),
+ $this->getFrontendCountry()->name
+ ); ?><br /><br />
+ <a href="#" onclick="return wpsg_customerquestion('<?php echo $this->getCurrentUrl(); ?>');"><?php echo __('Preiseinstellungen ändern', 'wpsg'); ?></a>
+ <?php } ?>
+
+ <ul>
+ <?php if ($this->view['wpsg_widgetsettings']['wpsg_agbpage'] == 1) { ?>
+ <li class="page_item"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_AGB); ?>"><?php echo get_the_title($this->get_option('wpsg_page_agb')); ?></a></li>
+ <?php } ?>
+ <?php if ($this->view['wpsg_widgetsettings']['wpsg_wrpage'] == 1) { ?>
+ <li class="page_item"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_WIDERRUF); ?>"><?php echo get_the_title($this->get_option('wpsg_page_widerrufsbelehrung')); ?></a></li>
+ <?php } ?>
+ <?php if ($this->view['wpsg_widgetsettings']['wpsg_dspage'] == 1) { ?>
+ <li class="page_item"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_DATENSCHUTZ); ?>"><?php echo get_the_title($this->get_option('wpsg_page_datenschutz')); ?></a></li>
+ <?php } ?>
+
+ <?php if ($this->view['wpsg_widgetsettings']['wpsg_vkpage'] == 1) { ?>
+ <li class="page_item"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN); ?>"><?php echo get_the_title($this->get_option('wpsg_page_versand')); ?></a></li>
+ <?php } ?>
+ <?php if ($this->view['wpsg_widgetsettings']['wpsg_odrpage'] == 1) { ?>
+ <li class="page_item"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_ONLINE_DISPUTE_RESOLUTION); ?>"><?php echo __('Online Streitbeilegung', 'wpsg'); ?></a></li>
+ <?php } ?>
+ <?php if ($this->view['wpsg_widgetsettings']['wpsg_imppage'] == 1) { ?>
+ <li class="page_item"><a href="<?php echo $this->getURL(wpsg_ShopController::URL_IMPRESSUM); ?>"><?php echo get_the_title($this->get_option('wpsg_page_impressum')); ?></a></li>
+ <?php } ?>
+ </ul>
+
+</aside> \ No newline at end of file
diff --git a/views/warenkorb/overview.phtml b/views/warenkorb/overview.phtml
new file mode 100644
index 0000000..3cfb560
--- /dev/null
+++ b/views/warenkorb/overview.phtml
@@ -0,0 +1,307 @@
+<?php
+
+ /**
+ * Template für die Zusammenfassung der Bestellung
+ * Anzeige vor dem Abschluß einer Bestellung
+ */
+
+ //wpsg_debug($this->view['basket']);
+
+?>
+<div class="wpsg wpsg_overview">
+
+ <?php echo $this->writeFrontendMessage(); ?>
+
+ <?php $GLOBALS['step'] = 4; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>
+
+ <form method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>">
+
+ <h2><?php echo __('Zusammenfassung', 'wpsg'); ?></h2>
+
+ <div class="wpsg_spacer"></div>
+
+ <?php if (!$this->hasMod('wpsg_mod_ordercondition')) { ?>
+ <div class="wpsg_agb">
+ <label>
+ <input type="checkbox" value="1" name="wpsg[agb]" />
+ <?php echo wpsg_translate(__('Ich habe die #1# des Anbieters gelesen und erkläre mit dem Absenden der Bestellung mein Einverständnis. Die #2# habe ich zur Kenntnis genommen.', 'wpsg'),
+ '<a target="_blank" href="'.$this->getURL(wpsg_ShopController::URL_AGB).'">'.__('AGB', 'wpsg').'</a>',
+ '<a target="_blank" href="'.$this->getURL(wpsg_ShopController::URL_WIDERRUF).'">'.__('Widerrufsbelehrung', 'wpsg').'</a>');
+ ?>
+ </label>
+ </div>
+ <?php } ?>
+
+ <?php $this->callMods('overview_top', array(&$this->view['basket'])); ?>
+
+ <div class="shippayment">
+ <div class="subtitle"><?php echo __('Zahlung/Versand', 'wpsg'); ?>&nbsp;
+ <span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT2)); ?></span>
+ </div>
+ <div class="payment"><?php echo wpsg_hspc($this->arPayment[$this->view['basket']['checkout']['payment']]['name']); ?></div>
+ <div class="shipping"><?php echo wpsg_hspc($this->arShipping[$this->view['basket']['checkout']['shipping']]['name']); ?></div>
+ </div>
+
+ <?php if ($this->view['basket']['checkout']['diff_shippingadress'] == '1') { ?>
+ <div class="anschrift">
+ <div class="subtitle"><?php echo __('Rechnungsanschrift', 'wpsg'); ?>&nbsp;
+ <span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT)); ?></span>
+ </div>
+ <?php if (trim($this->view['basket']['checkout']['firma']) != '') { ?>
+ <?php echo wpsg_hspc($this->view['basket']['checkout']['firma']); ?><br />
+ <?php } ?>
+ <?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']); ?><br />
+ <?php echo wpsg_hspc($this->view['basket']['checkout']['strasse']); ?><br />
+ <?php echo wpsg_hspc($this->view['basket']['checkout']['plz']); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['ort']); ?><br />
+ <?php if (wpsg_isSizedArray($this->view['basket']['land'])) { ?>
+ <?php echo wpsg_hspc($this->view['basket']['land']['name']); ?>
+ <?php } ?>
+ </div>
+ <div class="wpsg_clear"></div><br />
+
+ <div class="anschrift">
+ <div class="subtitle"><?php echo __('Lieferanschrift', 'wpsg'); ?>&nbsp;
+ <span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT)); ?></span>
+ </div>
+ <?php if (trim($this->view['basket']['checkout']['shipping_firma']) != '') { ?>
+ <?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_firma']); ?><br />
+ <?php } ?>
+ <?php echo (($this->view['basket']['checkout']['shipping_title'] != '' && $this->view['basket']['checkout']['shipping_title'] != '-1')?$this->view['basket']['checkout']['shipping_title']:''); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_vname']); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_name']); ?><br />
+ <?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_strasse']); ?><br />
+ <?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_plz']); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_ort']); ?><br />
+ <?php if (wpsg_isSizedArray($this->view['basket']['shipping_land'])) { ?>
+ <?php echo wpsg_hspc($this->view['basket']['shipping_land']['name']); ?>
+ <?php } ?>
+ </div>
+ <div class="wpsg_clear"></div><br />
+
+ <?php } else { ?>
+
+ <div class="anschrift">
+ <div class="subtitle"><?php echo __('Liefer- und Rechnungsanschrift', 'wpsg'); ?>&nbsp;
+ <span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT)); ?></span>
+ </div>
+ <?php if (trim($this->view['basket']['checkout']['firma']) != '') { ?>
+ <?php echo wpsg_hspc($this->view['basket']['checkout']['firma']); ?><br />
+ <?php } ?>
+ <?php echo wpsg_hspc(($this->view['basket']['checkout']['title'] != '' && $this->view['basket']['checkout']['title'] != '-1')?$this->view['basket']['checkout']['title']:''); ?> <?php echo $this->view['basket']['checkout']['vname']; ?> <?php echo $this->view['basket']['checkout']['name']; ?><br />
+ <?php echo wpsg_hspc($this->view['basket']['checkout']['strasse']); ?><br />
+ <?php echo wpsg_hspc($this->view['basket']['checkout']['plz']); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['ort']); ?><br />
+ <?php if (wpsg_isSizedArray($this->view['basket']['land'])) { ?>
+ <?php echo wpsg_hspc($this->view['basket']['land']['name']); ?>
+ <?php } ?>
+ </div>
+ <div class="wpsg_clear"></div><br />
+ <?php } ?>
+
+ <?php if (wpsg_isSizedString($this->view['basket']['checkout']['ustidnr'])) { ?>
+ <?php echo __('UStIdNr.', 'wpsg'); ?>: <?php echo wpsg_hspc($this->view['basket']['checkout']['ustidnr']); ?><br /><br />
+ <?php } ?>
+
+ <div class="subtitle">
+ <?php echo __('Bestellte Produkte', 'wpsg'); ?>&nbsp;
+ <span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_BASKET)); ?></span>
+ </div>
+
+ <div class="wpsg_table_wrap">
+ <table class="wpsg_produkte">
+ <tr class="wpsg_kopf">
+ <th class="wpsg_cell_menge"><?php echo __("Anzahl", "wpsg"); ?></th>
+ <th class="wpsg_cell_preis"><?php echo __('Einzelpreis', 'wpsg'); ?></th>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
+ <?php } ?>
+ <th class="wpsg_cell_gesamtpreis"><?php echo __("Gesamtpreis", "wpsg"); ?></th>
+ </tr>
+ <?php $i = 0; foreach ($this->view['basket']['produkte'] as $produkt_key => $p) { $i ++; ?>
+ <?php $strOverviewRow = ''; ob_start(); $this->callMods('overview_row', array(&$p, $i)); $strOverviewRow = ob_get_contents(); ob_end_clean(); ?>
+ <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="wpsg_cell_menge" rowspan="<?php echo 2 + substr_count($strOverviewRow, '<tr'); ?>">
+ <?php echo wpsg_hspc($p['menge']); ?>
+ </td>
+ <td class="wpsg_cell_preis"><?php echo wpsg_ff($p['preis']); ?> <?php echo $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($p['mwst_value']); ?> %</td>
+ <?php } ?>
+ <td class="wpsg_cell_gesamtpreis"><?php echo wpsg_ff($p['menge'] * $p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
+ </tr>
+ <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_name">
+ <?php if ($this->get_option('wpsg_mod_produktbilder_overviewimage') == '1' && $this->hasMod('wpsg_mod_produktbilder')) {
+
+ if (wpsg_isSizedString($p['varianten_image'])) $arBilder = array($p['varianten_image']);
+ else $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->getProduktID($p['id'])));
+
+ ?>
+ <div class="wpsg_overview_productimage">
+ <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->getProduktID($p['id']), $arBilder[0], 30, 30, 'c')); ?>" alt="<?php echo wpsg_hspc((($p['detailname'] != '')?$p['detailname']:$p['name'])); ?>" />
+ </div>
+ <?php } ?>
+ <?php if ($this->getProduktLink($p)) { ?>
+ <a href="<?php echo $this->getProduktLink($p); ?>"><?php echo wpsg_hspc((($p['detailname'] != '')?$p['detailname']:$p['name'])); ?></a>
+ <?php } else { ?>
+ <?php echo wpsg_hspc((($p['detailname'] != '')?$p['detailname']:$p['name'])); ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php echo $strOverviewRow; ?>
+ <?php } ?>
+ <?php if (isset($this->view['basket']['gs'])) { ?>
+ <tr class="wpsg_row_gutschein">
+ <td class="wpsg_cell_menge" rowspan="2">1</td>
+ <td class="wpsg_cell_preis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $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 __('anteilig', 'wpsg'); ?></td>
+ <?php } ?>
+ <td class="wpsg_cell_gesamtpreis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <tr class="wpsg_row_gutschein">
+ <td class="wpsg_cell_name" colspan="<?php echo $this->view['colspan']; ?>"><?php echo __('Gutschein', 'wpsg'); ?> <?php echo ($this->view['basket']['gs']['code'] != '')? '('.$this->view['basket']['gs']['code'].')':'' ?></td>
+ </tr>
+ <?php } ?>
+ <?php if (isset($this->view['basket']['sum']['preis_rabatt']) && wpsg_tf($this->view['basket']['sum']['preis_rabatt']) > 0) { ?>
+ <tr class="wpsg_row_discount">
+ <td class="wpsg_cell_menge" rowspan="2"></td>
+ <td class="wpsg_cell_preis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $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 __('anteilig', 'wpsg'); ?></td>
+ <?php } ?>
+ <td class="wpsg_cell_gesamtpreis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <tr class="wpsg_row_discount">
+ <td class="wpsg_cell_name" colspan="<?php echo $this->view['colspan']; ?>"><?php echo __('Rabatt', 'wpsg'); ?></td>
+ </tr>
+ <?php } ?>
+ <tr class="wpsg_row_summe">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
+ <?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
+ <?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
+ <?php } else { ?>
+ <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
+ <?php } ?>
+ <?php } ?>
+ </td>
+ <td class="wpsg_cell_summe_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php if ($this->view['basket']['sum']['preis_shipping'] != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
+ <tr class="wpsg_row_shipping">
+ <td colspan="2" class="wpsg_cell_shipping_label">
+ <?php echo wpsg_translate(__('<a href="#1#">Versandkosten</a> (#2#)', 'wpsg'),
+ $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN),
+ $this->arShipping[$this->view['basket']['checkout']['shipping']]['name']
+ ); ?>:
+ </td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td class="wpsg_cell_mwst">
+ <?php if (isset($this->view['basket']['shipping']['tax_rata']) && $this->view['basket']['shipping']['tax_rata'] === true) { ?>
+ <?php echo __('anteilig', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo wpsg_ff($this->arShipping[$this->view['basket']['checkout']['shipping']]['mwst_value'], '%'); ?>
+ <?php } ?>
+ </td>
+ <?php } ?>
+ <td class="wpsg_cell_shipping_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php if ($this->view['basket']['sum']['preis_payment'] != 0 || $this->get_option('wpsg_hideemptypayment') != '1') { ?>
+ <tr class="wpsg_row_payment">
+ <td colspan="2" class="wpsg_cell_payment_label">
+ <?php echo wpsg_translate(__('Zahlungsart (#1#)', 'wpsg'), $this->arPayment[$this->view['basket']['checkout']['payment']]['name']); ?>:
+ </td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td class="wpsg_cell_mwst">
+ <?php if (isset($this->view['basket']['payment']['tax_rata']) && $this->view['basket']['payment']['tax_rata'] === true) { ?>
+ <?php echo __('anteilig', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo wpsg_ff($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst_value'], '%'); ?>
+ <?php } ?>
+ </td>
+ <?php } ?>
+ <td class="wpsg_cell_payment_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+ <?php } ?>
+
+ <?php if ($this->get_option("wpsg_kleinunternehmer") == "1") { ?>
+ <tr class="wpsg_basket_kleinunternehmer">
+ <td colspan="<?php echo $this->view['colspan'] + 1; ?>"><?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?></td>
+ </tr>
+ <tr class="wpsg_row_gesamt">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_gesamt_label">
+ <?php echo __('Gesamtpreis', 'wpsg'); ?>:
+ </td>
+ <td class="wpsg_cell_gesamt_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php } else { ?>
+ <tr class="wpsg_row_gesamt">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_gesamt_label">
+ <?php echo __('Gesamtpreis (Netto)', 'wpsg'); ?>:
+ </td>
+ <td class="wpsg_cell_gesamt_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
+ <tr class="wpsg_row_mwst">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
+ <?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
+ </td>
+ <td class="wpsg_cell_mwst_value">
+ <?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <tr class="wpsg_row_gesamt_brutto wpsg_row_small">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
+ <?php echo __('Gesamtpreis (Brutto)', 'wpsg'); ?>:
+ </td>
+ <td class="wpsg_cell_gesamt_value">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+ <?php } ?>
+
+ <?php $this->callMods('overview_row_end', array(&$this->view)); ?>
+
+ </table>
+
+ <div class="wpsg_versandhinweis"><?php echo __('Sofern die Lieferung in das Nicht-EU-Ausland erfolgt, können weitere Zölle, Steuern oder Gebühren vom Kunden zu zahlen sein, jedoch nicht an den Anbieter, sondern an die dort zuständigen Zoll- bzw. Steuerbehörden. Dem Kunden wird empfohlen, die Einzelheiten vor der Bestellung bei den Zoll- bzw. Steuerbehörden zu erfragen.', 'wpsg'); ?></div>
+ </div>
+
+ <br />
+
+ <?php if ($this->view['basket']['checkout']['comment'] != '') { ?>
+ <div class="subtitle">
+ <?php echo __('Bestellkommentar', 'wpsg'); ?>&nbsp;
+ <span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT)); ?></span>
+ </div>
+ <div class="wpsg_ordercomment">
+ <?php echo $this->view['basket']['checkout']['comment'] ?>
+ </div>
+ <?php }?>
+
+
+ <?php $this->callMods('overview_inner_prebutton', array(&$this->view)); ?>
+
+ <div class="wpsg_clear"></div>
+
+ <br />
+
+ <input type="submit" class="wpsg_button wpsg_checkoutbutton" value="<?php echo __('zurück', 'wpsg'); ?>" name="wpsg_redirect_checkout" />
+ <input type="submit" class="wpsg_button wpsg_orderbutton" value="<?php echo __('zahlungspflichtig bestellen', 'wpsg'); ?>" name="wpsg_order" />
+
+ <div class="wpsg_clear"></div>
+
+ </form>
+
+</div>
diff --git a/views/warenkorb/progress.phtml b/views/warenkorb/progress.phtml
new file mode 100644
index 0000000..786527c
--- /dev/null
+++ b/views/warenkorb/progress.phtml
@@ -0,0 +1,60 @@
+
+<div class="wpsg_progress">
+
+ <a href="<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET); ?>">
+ <span class="step step1 <?php echo (($GLOBALS['step'] === 1)?'current':'done'); ?>" title="<?php echo __('Hier gelangen Sie zum Warenkorb', 'wpsg'); ?>"><span class="dot"></span><span class="text"><?php echo __('Warenkorb', 'wpsg'); ?></span></span>
+ </a>
+
+ <?php if ($GLOBALS['step'] > 1) { ?>
+ <a href=""><?php } ?>
+ <span class="step step2 <?php echo (($GLOBALS['step'] ===2)?'current':''); ?> <?php echo (($GLOBALS['step'] > 2)?'done':''); ?>" title="<?php echo __('Hier gelangen Sie zum Formular der Kundendaten', 'wpsg'); ?>">
+ <span class="dot"></span><span class="text"><?php echo __('Kundendaten', 'wpsg'); ?></span>
+ </span>
+ <?php if ($GLOBALS['step'] > 1) { ?>
+ </a><?php } ?>
+
+ <?php if ($GLOBALS['step'] > 2) { ?>
+ <a href=""><?php } ?>
+ <span class="step step3 <?php echo (($GLOBALS['step'] === 3)?'current':''); ?> <?php echo (($GLOBALS['step'] > 3)?'done':''); ?>" title="<?php echo __('Hier gelangen Sie zur Auswahl der Bezahlmethode und der Versandart', 'wpsg'); ?>">
+ <span class="dot"></span><span class="text"><?php echo __('Zahlung / Versand', 'wpsg'); ?></span>
+ </span>
+ <?php if ($GLOBALS['step'] > 2) { ?>
+ </a><?php } ?>
+
+ <?php if ($GLOBALS['step'] > 3) { ?>
+ <a href=""><?php } ?>
+ <span class="step step4 <?php echo (($GLOBALS['step'] === 4)?'current':''); ?> <?php echo (($GLOBALS['step'] > 4)?'done':''); ?>" title="<?php echo __('Hier gelangen Sie zum Bestellübersicht', 'wpsg'); ?>">
+ <span class="dot"></span><span class="text"><?php echo __('Abschluß', 'wpsg'); ?></span>
+ </span>
+ <?php if ($GLOBALS['step'] > 3) { ?>
+ </a><?php } ?>
+
+</div>
+
+<div class="wpsg_clear"></div>
+
+<?php /* ?>
+<div class="steps">
+
+ <a class="step1 <?php echo (($GLOBALS['step'] === 1)?'current':''); ?>" href="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>" title="<?php echo __('Hier gelangen Sie zum Warenkorb', 'wpsg'); ?>"><span><?php echo __('Warenkorb', 'wpsg'); ?></span></a>
+
+ <?php if ($GLOBALS['step'] > 1) { ?>
+ <a class="step2 <?php echo (($GLOBALS['step'] === 2)?'current':''); ?>" href="<?php echo $this->getURL(wpsg_ShopController::URL_CHECKOUT); ?>" title="<?php echo __('Hier gelangen Sie zum Formular der Kundendaten', 'wpsg'); ?>"><span><?php echo __('Kundendaten', 'wpsg'); ?></span></a>
+ <?php } else { ?>
+ <p class="step2"><span><?php echo __('Kundendaten','wpsg')?></span></p>
+ <?php } ?>
+
+ <?php if ($GLOBALS['step'] > 2) { ?>
+ <a class="step3 <?php echo (($GLOBALS['step'] === 3)?'current':''); ?>" href="<?php echo $this->getURL(wpsg_ShopController::URL_CHECKOUT2); ?>" title="<?php echo __('Hier gelangen Sie zur Auswahl der Bezahlmethode und der Versandart', 'wpsg'); ?>"><span><?php echo __('Bezahlung', 'wpsg'); ?></span></a>
+ <?php } else { ?>
+ <p class="step3"><span><?php echo __('Bezahlung','wpsg')?></span></p>
+ <?php } ?>
+
+ <?php if ($GLOBALS['step'] > 3) { ?>
+ <a class="step4 <?php echo (($GLOBALS['step'] === 4)?'current':''); ?>" href="<?php echo $this->getURL(wpsg_ShopController::URL_OVERVIEW); ?>" title="<?php echo __('Hier gelangen Sie zum Bestellübersicht', 'wpsg'); ?>"><span><?php echo __('Abschluss', 'wpsg'); ?></span></a>
+ <?php } else { ?>
+ <p class="step4"><span><?php echo __('Abschluss','wpsg')?></span></p>
+ <?php } ?>
+
+</div> */ ?>
+ \ No newline at end of file