Update von modified eCommerce Shopsoftware 1.06 rev 4642 SP2 auf SP3
@compatible modified eCommerce Shopsoftware V1.06 SP3 (c) 2009-2015 Alkim MediaDieses Dokument ist durch Urheberrecht geschützt und darf ohne ausdrückliche Erlaubnis weder kopiert noch vervielfältigt oder Dritten zugänglich gemacht werden!
Alkim Media * Inhaberin: Thekla Alkim * Perleberger Straße 62b * 16866 Kyritz * www.alkim.de * info@alkim.de
Wichtiger Hinweis:Top
2. Datenkbankerweiterungen durchführen
3. changed_files (falls vorhanden) kopieren, oder bei nicht standard-version folgende änderungen durchführen. Dabei ist zu beachten, dass grüner Text hinzugefügt und roter Text entfernt wird!
Kurze Erläuterungen:
Es wurde einige Zahlungsmodule aktualisiert. Falls Sie eines oder mehrere dieser Module nutzen, müssen diese vor dem Update zunächst über den Administrationsbereich deinstallieren und nach dem Update wieder installieren: - Kauf auf Rechnung mit BillSAFE (billsafe_2) - Lastschrift by SOFORT (sofort_lastschrift) - Rechnung by SOFORT (sofort_sofortrechnung) - sofortüberweisung.de (pn_sofortueberweisung) - SOFORT Lastschrift (sofort_sofortlastschrift) - SOFORT Überweisung (sofort_sofortueberweisung) - Vorkasse by SOFORT (sofort_sofortvorkasse)
NEW FILES:
admin/includes/modules/export/protectedshops.php
admin/includes/modules/export/shipcloud.php
admin/parcel_carriers.php
admin/protectedshops.php
admin/shipcloud.php
admin/shipcloud_pickup.php
callback/sofort/sofort_ideal.php
callback/sofort/sofort_sofortueberweisung_classic.php
callback/sofort/sofort_sofortueberweisung_gateway.php
export/idealo/logo_blue_big.png
export/idealo/logo_blue_small.png
export/idealo_realtime/logo_blue_big.png
export/idealo_realtime/logo_blue_small.png
inc/get_lang_id_by_directory.inc.php
inc/get_tracking_link.inc.php
inc/parse_multi_language_value.inc.php
inc/set_customers_status_by_id.inc.php
includes/external/payone/php/Payone/Api/Enum/CashType.php
includes/external/payone/php/Payone/Api/Enum/GenericpaymentAction.php
includes/external/payone/php/Payone/Api/Mapper/Request/Payment/Genericpayment.php
includes/external/payone/php/Payone/Api/Mapper/Response/Genericpayment.php
includes/external/payone/php/Payone/Api/Request/Genericpayment.php
includes/external/payone/php/Payone/Api/Service/Payment/Genericpayment.php
includes/external/payone/php/Payone/Api/Service/Payment/GenericpaymentInterface.php
includes/external/payone/php/Payone/Protocol/Filter/MaskAllValue.php
includes/external/shopgate/base/includes/modules/payment/ShopgateInstallHelper.php
includes/external/shopgate/base/shopgate_wrapper.php
includes/external/shopgate/licence.txt
includes/external/shopgate/shopgate_library/assets/index.php
includes/external/shopgate/shopgate_library/assets/link_tag.html
includes/external/shopgate/shopgate_library/changelog.txt
includes/external/shopgate/shopgate_library/classes/external_orders.php
includes/external/shopgate/shopgate_library/classes/index.php
includes/external/shopgate/shopgate_library/config/index.php
includes/external/shopgate/shopgate_library/index.php
includes/external/shopgate/shopgate_library/shopgate_license.txt
includes/external/shopgate/shopgate_library/temp/cache/index.php
includes/external/shopgate/shopgate_library/temp/index.php
includes/external/shopgate/shopgate_library/temp/logs/index.php
includes/external/shopgate/shopgate_library/vendors/BSD_license.txt
includes/external/shopgate/shopgate_library/vendors/index.php
includes/modules/payment/sofort_ideal.php
includes/modules/payment/sofort_sofortueberweisung_classic.php
includes/modules/payment/sofort_sofortueberweisung_gateway.php
lang/english/admin/parcel_carriers.php
lang/english/admin/shipcloud_pickup.php
lang/english/modules/payment/sofort_payment.php
lang/english/modules/payment/sofort_sofortueberweisung_classic.php
lang/english/modules/payment/sofort_sofortueberweisung_gateway.php
lang/german/admin/parcel_carriers.php
lang/german/admin/shipcloud_pickup.php
lang/german/modules/payment/sofort_payment.php
lang/german/modules/payment/sofort_sofortueberweisung_classic.php
lang/german/modules/payment/sofort_sofortueberweisung_gateway.php
admin/includes/modules/export/shipcloud.php
admin/parcel_carriers.php
admin/protectedshops.php
admin/shipcloud.php
admin/shipcloud_pickup.php
callback/sofort/sofort_ideal.php
callback/sofort/sofort_sofortueberweisung_classic.php
callback/sofort/sofort_sofortueberweisung_gateway.php
export/idealo/logo_blue_big.png
export/idealo/logo_blue_small.png
export/idealo_realtime/logo_blue_big.png
export/idealo_realtime/logo_blue_small.png
inc/get_lang_id_by_directory.inc.php
inc/get_tracking_link.inc.php
inc/parse_multi_language_value.inc.php
inc/set_customers_status_by_id.inc.php
includes/external/payone/php/Payone/Api/Enum/CashType.php
includes/external/payone/php/Payone/Api/Enum/GenericpaymentAction.php
includes/external/payone/php/Payone/Api/Mapper/Request/Payment/Genericpayment.php
includes/external/payone/php/Payone/Api/Mapper/Response/Genericpayment.php
includes/external/payone/php/Payone/Api/Request/Genericpayment.php
includes/external/payone/php/Payone/Api/Service/Payment/Genericpayment.php
includes/external/payone/php/Payone/Api/Service/Payment/GenericpaymentInterface.php
includes/external/payone/php/Payone/Protocol/Filter/MaskAllValue.php
includes/external/shopgate/base/includes/modules/payment/ShopgateInstallHelper.php
includes/external/shopgate/base/shopgate_wrapper.php
includes/external/shopgate/licence.txt
includes/external/shopgate/shopgate_library/assets/index.php
includes/external/shopgate/shopgate_library/assets/link_tag.html
includes/external/shopgate/shopgate_library/changelog.txt
includes/external/shopgate/shopgate_library/classes/external_orders.php
includes/external/shopgate/shopgate_library/classes/index.php
includes/external/shopgate/shopgate_library/config/index.php
includes/external/shopgate/shopgate_library/index.php
includes/external/shopgate/shopgate_library/shopgate_license.txt
includes/external/shopgate/shopgate_library/temp/cache/index.php
includes/external/shopgate/shopgate_library/temp/index.php
includes/external/shopgate/shopgate_library/temp/logs/index.php
includes/external/shopgate/shopgate_library/vendors/BSD_license.txt
includes/external/shopgate/shopgate_library/vendors/index.php
includes/modules/payment/sofort_ideal.php
includes/modules/payment/sofort_sofortueberweisung_classic.php
includes/modules/payment/sofort_sofortueberweisung_gateway.php
lang/english/admin/parcel_carriers.php
lang/english/admin/shipcloud_pickup.php
lang/english/modules/payment/sofort_payment.php
lang/english/modules/payment/sofort_sofortueberweisung_classic.php
lang/english/modules/payment/sofort_sofortueberweisung_gateway.php
lang/german/admin/parcel_carriers.php
lang/german/admin/shipcloud_pickup.php
lang/german/modules/payment/sofort_payment.php
lang/german/modules/payment/sofort_sofortueberweisung_classic.php
lang/german/modules/payment/sofort_sofortueberweisung_gateway.php
NEW DIRS:
admin/images/protectedshops
admin/images/shipcloud
admin/includes/javascript/jQueryDateTimePicker
callback/shipcloud
includes/external/payone/php/Payone/Api/Request/Parameter/Paydata
includes/external/payone/php/Payone/Api/Response/Genericpayment
includes/external/payone/php/Payone/Api/Response/Parameter
includes/external/protectedshops
includes/external/shipcloud
includes/external/shopgate/base/admin/includes/img
includes/external/shopgate/base/admin/templates
includes/external/shopgate/base/inc
includes/external/shopgate/helper
includes/external/shopgate/Model
includes/external/shopgate/shopgate_library/classes/helper
includes/external/shopgate/shopgate_library/classes/models
includes/external/sofort
admin/images/shipcloud
admin/includes/javascript/jQueryDateTimePicker
callback/shipcloud
includes/external/payone/php/Payone/Api/Request/Parameter/Paydata
includes/external/payone/php/Payone/Api/Response/Genericpayment
includes/external/payone/php/Payone/Api/Response/Parameter
includes/external/protectedshops
includes/external/shipcloud
includes/external/shopgate/base/admin/includes/img
includes/external/shopgate/base/admin/templates
includes/external/shopgate/base/inc
includes/external/shopgate/helper
includes/external/shopgate/Model
includes/external/shopgate/shopgate_library/classes/helper
includes/external/shopgate/shopgate_library/classes/models
includes/external/sofort
CHANGED FILES:
account.php
account_delete.php
account_history.php
account_history_info.php
address_book_process.php
admin/backup_restore.php
admin/billsafe_orders_2.php
admin/billsafe_print_order_2.php
admin/categories.php
admin/create_account.php
admin/customers.php
admin/includes/application_top.php
admin/includes/classes/categories.php
admin/includes/classes/import.php
admin/includes/column_left.php
admin/includes/configuration_installer.php
admin/includes/filenames.php
admin/includes/functions/general.php
admin/includes/header.php
admin/includes/modules/categories_view.php
admin/includes/modules/export/idealo.php
admin/includes/modules/export/idealo_real.php
admin/includes/modules/fckeditor/editor/_source/fckeditorapi.js
admin/includes/modules/fckeditor/editor/dialog/fck_about.html
admin/includes/modules/fckeditor/editor/filemanager/connectors/php/config.php
admin/includes/modules/fckeditor/editor/filemanager/connectors/php/connector.php
admin/includes/modules/fckeditor/editor/filemanager/connectors/php/upload.php
admin/includes/modules/fckeditor/editor/js/fckeditorcode_gecko.js
admin/includes/modules/fckeditor/editor/js/fckeditorcode_ie.js
admin/includes/modules/fckeditor/fckeditor.js
admin/includes/modules/new_attributes_include.php
admin/includes/modules/products_attributes_values.php
admin/includes/modules/products_images.php
admin/includes/version.php
admin/it_recht_kanzlei.php
admin/module_export.php
admin/modules.php
admin/orders.php
admin/payone_config.php
admin/payone_logs.php
admin/print_order.php
admin/print_packingslip.php
admin/products_vpe.php
admin/shopgate.php
api/it-recht-kanzlei/classes/class.api_it_recht_kanzlei.php
callback/paypal/ipn.php
checkout_confirmation.php
checkout_payment.php
checkout_process.php
checkout_success.php
create_account.php
create_guest_account.php
export/idealo/idealo_csv_definition.php
export/idealo_realtime/idealo_definition.php
inc/get_cross_sell_name.inc.php
inc/html_encoding.php
inc/shopstat_functions.inc.php
inc/xtc_address_format.inc.php
inc/xtc_address_label.inc.php
inc/xtc_address_summary.inc.php
inc/xtc_banner_exists.inc.php
inc/xtc_check_categories_status.inc.php
inc/xtc_collect_posts.inc.php
inc/xtc_count_products_in_category.inc.php
inc/xtc_currency_exists.inc.php
inc/xtc_customer_greeting.inc.php
inc/xtc_display_banner.inc.php
inc/xtc_findTitle.inc.php
inc/xtc_format_price.inc.php
inc/xtc_format_price_order.inc.php
inc/xtc_get_address_format_id.inc.php
inc/xtc_get_attributes_model.inc.php
inc/xtc_get_categories.inc.php
inc/xtc_get_countries.inc.php
inc/xtc_get_currencies_values.inc.php
inc/xtc_get_customer_status_value.inc.php
inc/xtc_get_customers_country.inc.php
inc/xtc_get_customers_statuses.inc.php
inc/xtc_get_download.inc.php
inc/xtc_get_geo_zone_code.inc.php
inc/xtc_get_order_data.inc.php
inc/xtc_get_order_description.inc.php
inc/xtc_get_parent_categories.inc.php
inc/xtc_get_path.inc.php
inc/xtc_get_product_path.inc.php
inc/xtc_get_products.inc.php
inc/xtc_get_products_image.inc.php
inc/xtc_get_products_mo_images.inc.php
inc/xtc_get_products_name.inc.php
inc/xtc_get_products_stock.inc.php
inc/xtc_get_shop_conf.inc.php
inc/xtc_get_short_description.inc.php
inc/xtc_get_subcategories.inc.php
inc/xtc_get_tax_class_id.inc.php
inc/xtc_get_tax_description.inc.php
inc/xtc_get_tax_rate.inc.php
inc/xtc_get_tax_rate_from_desc.inc.php
inc/xtc_get_vpe_name.inc.php
inc/xtc_get_zone_code.inc.php
inc/xtc_get_zone_name.inc.php
inc/xtc_gv_account_update.inc.php
inc/xtc_has_category_subcategories.inc.php
inc/xtc_oe_customer_infos.inc.php
inc/xtc_oe_get_options_name.inc.php
inc/xtc_oe_get_options_values_name.inc.php
inc/xtc_php_mail.inc.php
inc/xtc_redirect.inc.php
inc/xtc_remove_order.inc.php
inc/xtc_restock_order.inc.php
inc/xtc_set_banner_status.inc.php
inc/xtc_set_customer_status_upgrade.inc.php
inc/xtc_set_specials_status.inc.php
inc/xtc_update_banner_click_count.inc.php
inc/xtc_update_banner_display_count.inc.php
inc/xtc_validate_email.inc.php
inc/xtc_validate_vatid_status.inc.php
inc/xtc_write_user_info.inc.php
includes/application_top.php
includes/cart_actions.php
includes/classes/banktransfer_validation.php
includes/classes/main.php
includes/classes/order.php
includes/classes/shipping.php
includes/classes/shopping_cart.php
includes/classes/Smarty_2.6.27/Smarty_Compiler.class.php
includes/classes/vat_validation.php
includes/contact_us.php
includes/database_tables.php
includes/external/billsafe/classes/billsafe_2/billsafe_2.php
includes/external/billsafe/classes/billsafe_2/Exception.php
includes/external/billsafe/classes/billsafe_2/HttpClient.php
includes/external/billsafe/classes/billsafe_2/HttpResponse.php
includes/external/billsafe/classes/billsafe_2/ini.php
includes/external/billsafe/classes/billsafe_2/Logger.php
includes/external/billsafe/classes/billsafe_2/LoggerEcho.php
includes/external/billsafe/classes/billsafe_2/LoggerFile.php
includes/external/billsafe/classes/billsafe_2/LoggerMail.php
includes/external/billsafe/classes/billsafe_2/LoggerNull.php
includes/external/klarna/api/Klarna.php
includes/external/klarna/api/pclasses/mysqlstorage.class.php
includes/external/klarna/class.KlarnaBase.php
includes/external/klarna/class.KlarnaConstants.php
includes/external/klarna/class.KlarnaCore.php
includes/external/klarna/class.KlarnaInstaller.php
includes/external/klarna/class.KlarnaUninstaller.php
includes/external/klarna/class.KlarnaUtils.php
includes/external/klarna/KITT/data/inputFields.json
includes/external/klarna/KITT/data/lookupTable.json
includes/external/klarna/template/description.mustache
includes/external/payone/classes/PayoneAddressCheck.php
includes/external/payone/classes/PayoneModified.php
includes/external/payone/classes/PayonePayment.php
includes/external/payone/css/payone.css
includes/external/payone/css/payone_config.css
includes/external/payone/lang/english.php
includes/external/payone/lang/german.php
includes/external/payone/modules/orders_payone.php
includes/external/payone/php/Payone/Api/Adapter/Http/Abstract.php
includes/external/payone/php/Payone/Api/Adapter/Interface.php
includes/external/payone/php/Payone/Api/Config.php
includes/external/payone/php/Payone/Api/Enum/FinancingType.php
includes/external/payone/php/Payone/Api/Enum/OnlinebanktransferType.php
includes/external/payone/php/Payone/Api/Enum/RequestType.php
includes/external/payone/php/Payone/Api/Enum/ResponseType.php
includes/external/payone/php/Payone/Api/Enum/WalletType.php
includes/external/payone/php/Payone/Api/Factory.php
includes/external/payone/php/Payone/Api/Request/Abstract.php
includes/external/payone/php/Payone/Api/Request/Authorization/Abstract.php
includes/external/payone/php/Payone/Api/Request/Interface.php
includes/external/payone/php/Payone/Api/Request/Parameter/Abstract.php
includes/external/payone/php/Payone/Api/Request/Parameter/Authorization/PaymentMethod/Financing.php
includes/external/payone/php/Payone/Api/Request/Preauthorization.php
includes/external/payone/php/Payone/Api/Response/Abstract.php
includes/external/payone/php/Payone/Api/Response/Preauthorization/Approved.php
includes/external/payone/php/Payone/Api/Service/ProtocolRequest.php
includes/external/payone/php/Payone/Autoload.php
includes/external/payone/php/Payone/Builder.php
includes/external/payone/php/Payone/ClientApi/Factory.php
includes/external/payone/php/Payone/Config/Abstract.php
includes/external/payone/php/Payone/Enum/ClearingType.php
includes/external/payone/php/Payone/Enum/Mode.php
includes/external/payone/php/Payone/Enum/Reminderlevel.php
includes/external/payone/php/Payone/Protocol/Factory.php
includes/external/payone/php/Payone/Protocol/Filter/Filterable.php
includes/external/payone/php/Payone/Protocol/Service/ApplyFilters.php
includes/external/payone/php/Payone/SessionStatus/Config.php
includes/external/payone/php/Payone/SessionStatus/Factory.php
includes/external/payone/php/Payone/SessionStatus/Mapper/Request.php
includes/external/payone/php/Payone/SessionStatus/Request/Abstract.php
includes/external/payone/php/Payone/SessionStatus/Request/Interface.php
includes/external/payone/php/Payone/SessionStatus/Request/Item/Abstract.php
includes/external/payone/php/Payone/SessionStatus/Request/Item/Interface.php
includes/external/payone/php/Payone/SessionStatus/Request.php
includes/external/payone/php/Payone/SessionStatus/Response/Abstract.php
includes/external/payone/php/Payone/SessionStatus/Response.php
includes/external/payone/php/Payone/Settings/Factory.php
includes/external/payone/php/Payone/TransactionStatus/Config.php
includes/external/payone/php/Payone/TransactionStatus/Factory.php
includes/external/payone/php/Payone/TransactionStatus/Request/Abstract.php
includes/external/payone/php/Payone/TransactionStatus/Request.php
includes/external/payone/php/Payone/TransactionStatus/Response/Abstract.php
includes/external/payone/php/Payone/TransactionStatus/Response/Interface.php
includes/external/payone/php/Payone/TransactionStatus/Response.php
includes/external/payone/templates/checkout_payone_addresscheck.html
includes/external/payone/templates/checkout_payone_cc_form.html
includes/external/shopgate/api.php
includes/external/shopgate/base/admin/includes/column_left.php
includes/external/shopgate/base/admin/orders.php
includes/external/shopgate/base/admin/shopgate.php
includes/external/shopgate/base/includes/application_top.php
includes/external/shopgate/base/includes/header.php
includes/external/shopgate/base/includes/modules/payment/shopgate.php
includes/external/shopgate/base/includes/modules/product_info.php
includes/external/shopgate/base/lang/english/admin/english.php
includes/external/shopgate/base/lang/english/modules/payment/shopgate.php
includes/external/shopgate/base/lang/german/admin/german.php
includes/external/shopgate/base/lang/german/modules/payment/shopgate.php
includes/external/shopgate/base/shopgate_config.php
includes/external/shopgate/changelog.txt
includes/external/shopgate/plugin.php
includes/external/shopgate/shopgate_library/assets/js_header.html
includes/external/shopgate/shopgate_library/classes/apis.php
includes/external/shopgate/shopgate_library/classes/configuration.php
includes/external/shopgate/shopgate_library/classes/core.php
includes/external/shopgate/shopgate_library/classes/customers.php
includes/external/shopgate/shopgate_library/classes/items.php
includes/external/shopgate/shopgate_library/classes/orders.php
includes/external/shopgate/shopgate_library/classes/redirect.php
includes/external/shopgate/shopgate_library/shopgate.php
includes/external/shopgate/shopgate_library/vendors/mobile_redirect.class.php
includes/header.php
includes/modules/checkout_address_store.php
includes/modules/metatags.php
includes/modules/order_total/ot_coupon.php
includes/modules/order_total/ot_payment.php
includes/modules/payment/billsafe_2.php
includes/modules/payment/klarna/api/gui/activate_part.php
includes/modules/payment/klarna/api/gui/email_invoice.php
includes/modules/payment/klarna/api/gui/split_reservation.php
includes/modules/payment/payone_cc.php
includes/modules/payment/payone_cod.php
includes/modules/payment/payone_elv.php
includes/modules/payment/payone_installment.php
includes/modules/payment/payone_invoice.php
includes/modules/payment/payone_otrans.php
includes/modules/payment/payone_prepay.php
includes/modules/payment/payone_wlt.php
includes/modules/payment/shopgate.php
includes/modules/set_language_sessions.php
includes/shipping_estimate.php
includes/write_customers_status.php
lang/english/admin/configuration.php
lang/english/admin/english.php
lang/english/admin/orders.php
lang/english/admin/orders_edit.php
lang/english/english.php
lang/english/lang_english.conf
lang/english/modules/order_total/ot_payment.php
lang/english/modules/payment/banktransfer.php
lang/english/modules/payment/billsafe_2.php
lang/english/modules/payment/payone.php
lang/english/modules/payment/payone_cc.php
lang/english/modules/payment/payone_cod.php
lang/english/modules/payment/payone_elv.php
lang/english/modules/payment/payone_installment.php
lang/english/modules/payment/payone_invoice.php
lang/english/modules/payment/payone_otrans.php
lang/english/modules/payment/payone_prepay.php
lang/english/modules/payment/payone_wlt.php
lang/english/modules/payment/shopgate.php
lang/english/modules/payment/sofort_ideal.php
lang/german/admin/configuration.php
lang/german/admin/german.php
lang/german/admin/orders.php
lang/german/admin/orders_edit.php
lang/german/german.php
lang/german/lang_german.conf
lang/german/modules/order_total/ot_payment.php
lang/german/modules/payment/banktransfer.php
lang/german/modules/payment/billsafe_2.php
lang/german/modules/payment/payone.php
lang/german/modules/payment/payone_cc.php
lang/german/modules/payment/payone_cod.php
lang/german/modules/payment/payone_elv.php
lang/german/modules/payment/payone_installment.php
lang/german/modules/payment/payone_invoice.php
lang/german/modules/payment/payone_otrans.php
lang/german/modules/payment/payone_prepay.php
lang/german/modules/payment/payone_wlt.php
lang/german/modules/payment/shopgate.php
lang/german/modules/payment/sofort_ideal.php
password_double_opt.php
paypal_checkout.php
robots.txt
send_order.php
shop_content.php
shopgate.php
templates/xtc5/admin/billsafe_print_order.html
templates/xtc5/admin/mail/english/change_order_mail.html
templates/xtc5/admin/mail/english/change_order_mail.txt
templates/xtc5/admin/mail/german/change_order_mail.html
templates/xtc5/admin/mail/german/change_order_mail.txt
templates/xtc5/admin/print_order.html
templates/xtc5/admin/print_packingslip.html
templates/xtc5/mail/english/order_mail.html
templates/xtc5/mail/english/order_mail.txt
templates/xtc5/mail/german/order_mail.html
templates/xtc5/mail/german/order_mail.txt
templates/xtc5/module/account.html
templates/xtc5/module/account_history.html
templates/xtc5/module/account_history_info.html
templates/xtc5/module/checkout_confirmation.html
templates/xtc5/module/checkout_paypal.html
templates/xtc5/module/checkout_success.html
templates/xtc5/source/boxes.php
templates/xtc5/stylesheet.css
Wichtiger Hinweis:Top
Legen Sie vor Beginn der Arbeiten ein Backup, der zu bearbeitenden Dateien und der Shopdatenbank, an.
alkim media übernimmt keinerlei Haftung für Schäden, die auf mangelnde Datensicherung oder auf fehlerhafte Installation durch den Kunden, zurückzuführen sind.
Idealerweise nimmt man eine Installation zuerst in einem Test-Shop (Sandbox) vor, dort kann man in Ruhe prüfen, ob alle Funktionen einwandfrei gewährleistet sind, ohne das Live-System zu gefährden.
Sofern Sie ein anderes Template nutzen, müssen Sie darauf achten, dass beim Kopieren der Dateien und Verzeichnisse und beim Ändern der Dateien, das korrekte Templateverzeichnis genutzt wird.
alkim media übernimmt keinerlei Haftung für Schäden, die auf mangelnde Datensicherung oder auf fehlerhafte Installation durch den Kunden, zurückzuführen sind.
Idealerweise nimmt man eine Installation zuerst in einem Test-Shop (Sandbox) vor, dort kann man in Ruhe prüfen, ob alle Funktionen einwandfrei gewährleistet sind, ohne das Live-System zu gefährden.
Sofern Sie ein anderes Template nutzen, müssen Sie darauf achten, dass beim Kopieren der Dateien und Verzeichnisse und beim Ändern der Dateien, das korrekte Templateverzeichnis genutzt wird.
INSTALLATION:
1. Die Inhalte aus new_files und new_dirs in den Shoproot kopieren.2. Datenkbankerweiterungen durchführen
UPDATE database_version SET version = 'MOD_1.0.6.3'; CREATE TABLE IF NOT EXISTS carriers ( carrier_id INT(11) NOT NULL AUTO_INCREMENT, carrier_name VARCHAR(80) NOT NULL, carrier_tracking_link VARCHAR(512) NOT NULL, carrier_sort_order INT(11) NOT NULL, carrier_date_added DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', carrier_last_modified DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (carrier_id) ) ENGINE=MyISAM; INSERT INTO carriers VALUES (1, 'DHL', 'http://nolp.dhl.de/nextt-online-public/set_identcodes.do?lang=$2&idc=$1', '10', NOW(), ''); INSERT INTO carriers VALUES (2, 'DPD', 'https://extranet.dpd.de/cgi-bin/delistrack?pknr=$1+&typ=1&lang=$2', '20', NOW(), ''); INSERT INTO carriers VALUES (3, 'GLS', 'https://gls-group.eu/DE/de/paketverfolgung?match=$1', '30', NOW(), ''); INSERT INTO carriers VALUES (4, 'UPS', 'http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=$1', '40', NOW(), ''); INSERT INTO carriers VALUES (5, 'HERMES', 'http://tracking.hlg.de/Tracking.jsp?TrackID=$1', '50', NOW(), ''); INSERT INTO carriers VALUES (6, 'FEDEX', 'http://www.fedex.com/Tracking?action=track&tracknumbers=$1', '60', NOW(), ''); INSERT INTO carriers VALUES (7, 'TNT', 'http://www.tnt.de/servlet/Tracking?cons=$1', '70', NOW(), ''); INSERT INTO carriers VALUES (8, 'TRANS-O-FLEX', 'http://track.tof.de/trace/tracking.cgi?barcode=$1', '80', NOW(), ''); INSERT INTO carriers VALUES (9, 'KUEHNE-NAGEL', 'https://knlogin.kuehne-nagel.com/apps/fls.do?subevent=search&knReference=$1', '90', NOW(), ''); INSERT INTO carriers VALUES (10, 'ILOXX', 'http://www.iloxx.de/net/einzelversand/tracking.aspx?ix=$1', '100', NOW(), ''); INSERT INTO carriers VALUES (11, 'LogoiX', 'http://www.logoix.com/cgi-bin/tnt.pl?q=$1', '110', NOW(), ''); CREATE TABLE IF NOT EXISTS orders_tracking ( tracking_id INT(11) NOT NULL AUTO_INCREMENT, orders_id INT(11) NOT NULL, carrier_id INT(11) NOT NULL, parcel_id VARCHAR(80) NOT NULL, PRIMARY KEY (tracking_id), KEY idx_orders_id (orders_id) ) ENGINE=MyISAM; ALTER TABLE admin_access ADD parcel_carriers INT(1) NOT NULL DEFAULT 0 AFTER payone_logs; UPDATE admin_access SET parcel_carriers = 1 WHERE customers_id = 1 LIMIT 1; UPDATE admin_access SET parcel_carriers = 1 WHERE customers_id = 'groups' LIMIT 1; ALTER TABLE admin_access ADD shipcloud INT(1) NOT NULL DEFAULT 0 AFTER parcel_carriers; UPDATE admin_access SET shipcloud = 1 WHERE customers_id = 1 LIMIT 1; UPDATE admin_access SET shipcloud = 1 WHERE customers_id = 'groups' LIMIT 1; ALTER TABLE coupons MODIFY restrict_to_products TEXT DEFAULT NULL; ALTER TABLE coupons MODIFY restrict_to_categories TEXT DEFAULT NULL; ALTER TABLE `products_options` MODIFY `products_options_name` VARCHAR(255) NOT NULL DEFAULT ''; ALTER TABLE `products_options_values` MODIFY `products_options_values_name` VARCHAR(255) NOT NULL DEFAULT ''; ALTER TABLE `orders_products_attributes` MODIFY `products_options` VARCHAR(255) NOT NULL; ALTER TABLE `orders_products_attributes` MODIFY `products_options_values` VARCHAR(255) NOT NULL; ALTER TABLE admin_access ADD protectedshops INT(1) NOT NULL DEFAULT 0 AFTER payone_logs; UPDATE admin_access SET protectedshops = 1 WHERE customers_id = 1 LIMIT 1; UPDATE admin_access SET protectedshops = 1 WHERE customers_id = 'groups' LIMIT 1;
account.phpTop ca. Zeile 28
require_once (DIR_FS_INC.'xtc_get_path.inc.php');
require_once (DIR_FS_INC.'xtc_get_product_path.inc.php');
require_once (DIR_FS_INC.'xtc_get_products_name.inc.php');
require_once (DIR_FS_INC.'xtc_get_products_image.inc.php');
require_once (DIR_FS_INC.'get_tracking_link.inc.php');
//BOF - DokuMan - 2010-03-02 - redirect not logged in users to login page instead
if (!isset ($_SESSION['customer_id'])) {
xtc_redirect(xtc_href_link(FILENAME_LOGIN, '', 'SSL'));
}
ca. Zeile 93
} else {
$order_name = $orders['billing_name'];
$order_country = $orders['billing_country'];
}
$order_content[] = array ('ORDER_ID' => $orders['orders_id'], 'ORDER_DATE' => xtc_date_short($orders['date_purchased']), 'ORDER_STATUS' => $orders['orders_status_name'], 'ORDER_TOTAL' => $orders['order_total'], 'ORDER_LINK' => xtc_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id='.$orders['orders_id'], 'SSL'), 'ORDER_BUTTON' => '<a href="'.xtc_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id='.$orders['orders_id'], 'SSL').'">'.xtc_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW).'</a>');
$order_content[] = array ('ORDER_ID' => $orders['orders_id'], 'ORDER_DATE' => xtc_date_short($orders['date_purchased']), 'ORDER_STATUS' => $orders['orders_status_name'], 'ORDER_TOTAL' => $orders['order_total'], 'ORDER_LINK' => xtc_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id='.$orders['orders_id'], 'SSL'), 'ORDER_BUTTON' => '<a href="'.xtc_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id='.$orders['orders_id'], 'SSL').'">'.xtc_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW).'</a>', 'TRACKING' => get_tracking_link($orders['orders_id'], $_SESSION['language_code']));
}
}
$smarty->assign('LINK_EDIT', xtc_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'));
account_delete.phpTop ca. Zeile 47
$messageStack->add('account_delete', TEXT_LOGIN_ERROR);
} else {
//EOF - 2009-08-25 - Require password to disable account
$_SESSION['cart']->reset(true);
// delete account and logout customer
xtc_db_query("delete from ".TABLE_ADDRESS_BOOK." where customers_id = '".(int) $_SESSION['customer_id']."'");
xtc_db_query("delete from ".TABLE_CUSTOMERS." where customers_id = '".(int) $_SESSION['customer_id']."'");
xtc_db_query("delete from ".TABLE_CUSTOMERS_INFO." where customers_info_id = '".(int) $_SESSION['customer_id']."'");
ca. Zeile 71
// GV Code Start
unset ($_SESSION['gv_id']);
unset ($_SESSION['cc_id']);
// GV Code End
$_SESSION['cart']->reset();
$smarty->assign('BUTTON_CONTINUE', '<a href="'.xtc_href_link(FILENAME_DEFAULT, '', 'NONSSL').'">'.xtc_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE).'</a>');
//BOF - 2009-08-25 - Require password to disable account
}
account_history.phpTop ca. Zeile 24
// include needed functions
require_once (DIR_FS_INC.'xtc_count_customer_orders.inc.php');
require_once (DIR_FS_INC.'xtc_date_long.inc.php');
require_once (DIR_FS_INC.'xtc_image_button.inc.php');
require_once (DIR_FS_INC.'get_tracking_link.inc.php');
require_once (DIR_FS_INC.'xtc_get_all_get_params.inc.php');
if (!isset ($_SESSION['customer_id']))
xtc_redirect(xtc_href_link(FILENAME_LOGIN, '', 'SSL'));
ca. Zeile 72
'ORDER_PRODUCTS' => $products['count'],
'ORDER_TOTAL' => strip_tags($history['order_total']),
'ORDER_BUTTON' => '<a href="'.xtc_href_link(FILENAME_ACCOUNT_HISTORY_INFO,
'page='.(empty($_GET['page']) ? "1" : (int)$_GET['page']) .'&order_id='.$history['orders_id'],
'SSL').'">'.xtc_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW).'</a>');
'SSL').'">'.xtc_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW).'</a>',
'ORDER_TRACKING' => get_tracking_link($history['orders_id'], $_SESSION['language_code'])
);
}
}
account_history_info.phpTop ca. Zeile 26
require_once (DIR_FS_INC.'xtc_get_all_get_params.inc.php');
require_once (DIR_FS_INC.'xtc_image_button.inc.php');
require_once (DIR_FS_INC.'xtc_display_tax_value.inc.php');
require_once (DIR_FS_INC.'xtc_format_price_order.inc.php');
require_once (DIR_FS_INC.'get_tracking_link.inc.php');
//security checks
// BOC added query string order_id to login.php to be able to redirect to account_history_info after login for link in change_order_mail, noRiddle
//if (!isset ($_SESSION['customer_id'])) { xtc_redirect(xtc_href_link(FILENAME_LOGIN, '', 'SSL')); }
ca. Zeile 98
// Download-Products
if (DOWNLOAD_ENABLED == 'true') include (DIR_WS_MODULES.'downloads.php');
// Stuff
$smarty->assign('ORDER_TRACKING', get_tracking_link($order->info['order_id'], $_SESSION['language_code']));
$smarty->assign('ORDER_NUMBER', $order->info['order_id']); //DokuMan - 2011-08-31 - fix order_id assignment
$smarty->assign('ORDER_DATE', xtc_date_long($order->info['date_purchased']));
$smarty->assign('ORDER_STATUS', $order->info['orders_status']);
$smarty->assign('BILLING_LABEL', xtc_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br />'));
address_book_process.phpTop ca. Zeile 139
$sql_data_array['entry_suburb'] = $suburb;
if (ACCOUNT_STATE == 'true') {
if ($zone_id > 0) {
$sql_data_array['entry_zone_id'] = (int) $zone_id;
$sql_data_array['entry_state'] = '';
$sql_data_array['entry_state'] = $state;
} else {
$sql_data_array['entry_zone_id'] = '0';
$sql_data_array['entry_state'] = $state;
}
admin/backup_restore.phpTop ca. Zeile 19
// ?file=dbd_mod105sp1b-20111123170925.sql.gz&action=restorenow
define ('_VALID_XTC', true);
// no error reporting
error_reporting(0);
// Set the local configuration parameters - mainly for developers or the main-configure
if (file_exists('includes/local/configure.php')) {
include('includes/local/configure.php');
} else {
ca. Zeile 87
$info_wait = '<img src="images/loading.gif"> '. TEXT_INFO_WAIT ;
$button_back = '';
//aktiviert die Ausgabepufferung
if (!@ob_start("ob_gzhandler")) @ob_start();
//if (!@ob_start("ob_gzhandler")) @ob_start();
//#### RESTORE ANFANG ########
if (isset($_SESSION['restore'])) {
$restore=$_SESSION['restore'];
ca. Zeile 109
if(substr($vers,0,1) > 4) {
@mysql_query("SET SESSION sql_mode=''");
}
//EOF Disable "STRICT" mode!
$_GET['file'] = isset($_GET['file']) ? basename($_GET['file']) : '';
$_GET['file'] = preg_replace('/[^0-9a-zA-Z._-]/','',$_GET['file']);
$restore['file'] = DIR_FS_BACKUP . $_GET['file'];
//Testen ob Backupdatei existiert, bei nein Abbruch
if (!file_exists($restore['file'])) {
if (!is_file($restore['file'])) {
die('Direct Access to this location is not allowed.');
}
ca. Zeile 123
$protdatei = substr($restore['file'],0, -3). '.log.gz';
} else {
$protdatei = $restore['file'] . '.log';
}
if (RESTORE_TEST && file_exists($protdatei) ) {
if (RESTORE_TEST && is_file($protdatei) ) {
unlink ($protdatei);
}
$extension = substr($_GET['file'], -3);
if($extension == 'sql') {
ca. Zeile 139
$selbstaufruf='<script language="javascript" type="text/javascript">setTimeout("document.restore.submit()",3000);</script>';
}
//Testen ob Backupdatei existiert, bei nein Abbruch
if (!file_exists($restore['file'])) {
if (!is_file($restore['file'])) {
die('Direct Access to this location is not allowed.');
}
if (!empty($restore['file']) && $action != 'restorenow'){
ca. Zeile 259
</body>
</html>
<?php
//Pufferinhalte an den Client ausgeben
ob_end_flush();
//ob_end_flush();
?>
admin/billsafe_orders_2.phpTop ca. Zeile 31
* @license GPLv2
*/
$order_id = $_GET['oID'];
$post_url = 'billsafe_orders_2.php?oID='.$order_id;
$post_url = 'billsafe_orders_2.php';
$post_param = 'oID='.$order_id;
require ('includes/application_top.php');
$language= $_SESSION['language'];
ca. Zeile 216
if ($dpaymentAmount == '') $dpaymentAmount = 0;
if ($dpaymentAmountKomma == '') $dpaymentAmountKomma = 0;
$dpayment = $dpaymentAmount.'.'.$dpaymentAmountKomma;
if ($_POST['dpaymentDay'] > 0 && $_POST['dpaymentDay'] <= 31) {
if ($_POST['dpaymentDay'] > 0 && $_POST['dpaymentDay'] < 10) {
if ($_POST['dpaymentDay'] > 0 && $_POST['dpaymentDay'] < 10 && substr($_POST['dpaymentDay'], 0, 1) != 0) {
$dpaymentDay = '0'.$_POST['dpaymentDay'];
} else {
$dpaymentDay = $_POST['dpaymentDay'];
}
} else {
$dpaymentDay = date('d');
}
if ($_POST['dpaymentMonth'] > 0 && $_POST['dpaymentMonth'] <= 12) {
if ($_POST['dpaymentMonth'] > 0 && $_POST['dpaymentMonth'] < 10) {
$dpaymentMonth = '0'.$_POST['dpaymentDay'];
if ($_POST['dpaymentMonth'] > 0 && $_POST['dpaymentMonth'] < 10 && substr($_POST['dpaymentMonth'], 0, 1) != 0) {
$dpaymentMonth = '0'.$_POST['dpaymentMonth'];
} else {
$dpaymentMonth = $_POST['dpaymentMonth'];
}
} else {
ca. Zeile 424
}
require (DIR_WS_INCLUDES.'head.php');
?>
<meta name="robots" content="noindex,nofollow">
<script language="javascript" src="includes/general.js"></script>
<script type="text/javascript" >
function doShipment(jalert) {
var count = document.getElementsByName('shipped[]').length;
ca. Zeile 449
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<table border="0" width="100%" cellspacing="2" cellpadding="2"><tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top">
<td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top">
<table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<?php if (USE_ADMIN_TOP_MENU != 'true') require(DIR_WS_INCLUDES . 'column_left.php'); ?>
</table></td>
<td width="100%" valign="top">
ca. Zeile 535
<td class="main"><?php echo number_format($ins->amount,2).' '.$ins->currencyCode; ?></td>
</tr></table></td></tr></td></tr></table>
<?php } ?>
</td></tr></table>
<table border="0" width="100%" cellspacing="0" cellpadding="2"><form action="<?php echo $post_url ?>" method="POST"><tr class="dataTableHeadingRow">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php echo xtc_draw_form('article', $post_url, $post_param, 'post'); ?>
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><?php echo MODULE_PAYMENT_BILLSAFE_2_PRODUCTS; ?></td>
<td class="dataTableHeadingContent"><?php echo MODULE_PAYMENT_BILLSAFE_2_MODEL; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo MODULE_PAYMENT_BILLSAFE_2_TAX; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo MODULE_PAYMENT_BILLSAFE_2_PRICE_INC; ?></td>
ca. Zeile 585
} else {
$language_id = 1;
}
$prod_history_query = xtc_db_query('SELECT bd.articlenumber, bd.articletype, bsod.bsordersdetails_id, bd.articlename, bsod.transactionmethod, bsod.date, bd.retoure, bd.pause FROM billsafe_transactions_2 bsod, billsafe_orders_details_2 bd WHERE bsod.ordernumber = "'.xtc_db_input($order_id).'" AND bd.ordernumber = "'.xtc_db_input($order_id).'" AND bsod.bsordersdetails_id = bd.id');
if (xtc_db_num_rows($prod_history_query) > 0) { ?>
<form action="<?php echo $post_url ?>" method="POST"><?php
if (xtc_db_num_rows($prod_history_query) > 0) {
echo xtc_draw_form('update_transaction', $post_url, $post_param, 'post');
echo '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr class="dataTableHeadingRow"><td class="dataTableHeadingContent" align="center"><strong>'.MODULE_PAYMENT_BILLSAFE_2_MODEL.'</strong></td><td class="dataTableHeadingContent" align="center"><strong>'.MODULE_PAYMENT_BILLSAFE_2_PRODUCTS.'</strong></td><td class="dataTableHeadingContent" align="center"><strong>'.MODULE_PAYMENT_BILLSAFE_2_PREPORT_METHOD.'</strong></td><td class="dataTableHeadingContent" align="center"><strong>'.MODULE_PAYMENT_BILLSAFE_2_PREPORT_DATE.'</strong></td><td class="dataTableHeadingContent" align="center"> </td></tr>';
while ($prod_history = xtc_db_fetch_array($prod_history_query)) {
if ($prod_history['transactionmethod'] == 'reportShipmentFull') {
$method = MODULE_PAYMENT_BILLSAFE_2_FREPORT_SHIPMENT;
ca. Zeile 648
<td><table border="0" cellspacing="0" cellpadding="2"><tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><?php echo MODULE_PAYMENT_BILLSAFE_2_PAUSETRANSACTION; ?></td>
</tr><tr class="dataTableRow">
<td class="dataTableContent" align="right" valign="top">
<form id="pause" method="POST" action="<?php echo $post_url ?>">
<?php echo xtc_draw_form('pause', $post_url, $post_param, 'post'); ?>
<input id="pauseDays" type="text" style="float:none;" maxlength="2" name="pauseDays" size="2" value="" /> <?php echo MODULE_PAYMENT_BILLSAFE_2_PAUSEDAYS; ?>
<input type="submit" name="pauseTransaction" value="<?php echo MODULE_PAYMENT_BILLSAFE_2_PAUSETRANSACTION; ?>" />
</form></td></tr></table></td>
<?php } ?>
<td><table border="0" cellspacing="0" cellpadding="2"><tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><?php echo MODULE_PAYMENT_BILLSAFE_2_UPDATEARTICLELISTVOUCHER; ?></td>
</tr><tr class="dataTableRow">
<td class="dataTableContent" align="right" valign="top">
<form id="voucher" method="POST" action="<?php echo $post_url ?>">
<?php echo xtc_draw_form('voucher', $post_url, $post_param, 'post'); ?>
<input id="voucherAmount" type="text" style="float:none;" maxlength="4" name="voucherAmount" size="4" value="" />,<input style="float:none;" id="voucherAmountKomma" type="text" maxlength="2" name="voucherAmountKomma" size="2" value="" /> <?php echo $currency; ?>, <?php echo MODULE_PAYMENT_BILLSAFE_2_TAX.': '; echo xtc_draw_pull_down_menu('voucherTax', $tax_class_array, $tax_class_id); ?><br /><br />
<input type="submit" name="updateArticleListVoucher" value="<?php echo MODULE_PAYMENT_BILLSAFE_2_UPDATEARTICLELISTVOUCHER; ?>" />
</form></td></tr></table></td>
<td style="text-align:center;"><a class="button" href="Javascript:void()" onclick="window.open('<?php echo xtc_href_link('billsafe_print_order_2.php', 'oID='.$order_id); ?>', 'popup', 'toolbar=0, width=640, height=600')"><?php echo BUTTON_INVOICE; ?></a><br /><br />
ca. Zeile 667
<td><table border="0" cellspacing="0" cellpadding="2"><tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><?php echo MODULE_PAYMENT_BILLSAFE_2_DPAYMENT; ?></td>
</tr><tr class="dataTableRow">
<td class="dataTableContent" align="right" valign="top">
<form id="dpayment" method="POST" action="<?php echo $post_url ?>">
<?php echo xtc_draw_form('dpayment', $post_url, $post_param, 'post'); ?>
<input id="dpaymentAmount" type="text" style="float:none;" maxlength="10" name="dpaymentAmount" size="4" value="" />,<input style="float:none;" id="dpaymentAmountKomma" type="text" maxlength="2" name="dpaymentAmountKomma" size="2" value="" /> <?php echo $currency; ?> <?php echo MODULE_PAYMENT_BILLSAFE_2_DAY; ?>: <input style="float:none;" id="dpaymentDay" type="text" maxlength="2" name="dpaymentDay" size="2" value="" /> <?php echo MODULE_PAYMENT_BILLSAFE_2_MONTH; ?>: <input style="float:none;" id="dpaymentMonth" type="text" maxlength="2" name="dpaymentMonth" size="2" value="" /> <?php echo MODULE_PAYMENT_BILLSAFE_2_YEAR; ?>: <input style="float:none;" id="dpaymentYear" type="text" maxlength="4" name="dpaymentYear" size="4" value="" /><br /><br />
<input type="submit" name="reportDirectPayment" value="<?php echo MODULE_PAYMENT_BILLSAFE_2_REPORT_DPAYMENT; ?>" />
</form></td></tr></table>
</td></tr></table>
admin/billsafe_print_order_2.phpTop ca. Zeile 56
$smarty->assign('address_label_customer', xtc_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'));
$smarty->assign('address_label_shipping', xtc_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'));
$smarty->assign('address_label_payment', xtc_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />'));
$smarty->assign('csID', $order->customer['csID']);
$smarty->assign('vatID',$order->customer['vat_id']);
$order_query = xtc_db_query('SELECT *, COUNT(articlenumber) AS quantity FROM billsafe_orders_details_2 WHERE ordernumber = "'.xtc_db_input($order_id).'" AND articletype = "goods" AND storno = 0 AND retoure = 0 GROUP BY articlenumber, articlename, articleprice;');
$order_data = array();
while ($order_data_values = xtc_db_fetch_array($order_query)) {
ca. Zeile 153
$order_total[] = array('TITLE' => '<b>'.MODULE_PAYMENT_BILLSAFE_2_TOTAL.':</b>', 'TEXT' => '<b>'.xtc_format_price_order($total, 1, $order->info['currency']).'</b>');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('logo_path', HTTP_SERVER.DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/img/');
$smarty->assign('tpl_path', HTTP_SERVER.DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/');
$smarty->assign('oID',$_GET['oID']);
if ($order->info['payment_method'] != '' && $order->info['payment_method'] != 'no_payment') {
include(DIR_FS_CATALOG.'lang/'.$_SESSION['language'].'/modules/payment/'.$order->info['payment_method'].'.php');
$payment_method = constant(strtoupper('MODULE_PAYMENT_'.$order->info['payment_method'].'_TEXT_TITLE'));
ca. Zeile 192
$smarty->assign('BillsafeText', $ins->legalNote);
$smarty->assign('BillsafeText2', '<b>'.$ins->note.'</b>');
$smarty->assign('recipient', MODULE_PAYMENT_BILLSAFE_2_RECIPIENT.':');
$smarty->assign('recipientValue', $ins->recipient);
$smarty->assign('account', MODULE_PAYMENT_BILLSAFE_2_ACCOUNT_NUMBER.':');
$smarty->assign('accountValue', $ins->accountNumber);
$smarty->assign('bankcode', MODULE_PAYMENT_BILLSAFE_2_BANK_CODE.':');
$smarty->assign('bankcodeValue', $ins->bankCode);
//$smarty->assign('account', MODULE_PAYMENT_BILLSAFE_2_ACCOUNT_NUMBER.':'); // Commented out for SEPA solution
//$smarty->assign('accountValue', $ins->accountNumber); // Commented out for SEPA solution
//$smarty->assign('bankcode', MODULE_PAYMENT_BILLSAFE_2_BANK_CODE.':'); // Commented out for SEPA solution
//$smarty->assign('bankcodeValue', $ins->bankCode); // Commented out for SEPA solution
$smarty->assign('bank', MODULE_PAYMENT_BILLSAFE_2_BANK_NAME.':');
$smarty->assign('bankValue', $ins->bankName);
$smarty->assign('bic', MODULE_PAYMENT_BILLSAFE_2_BIC.':');
$smarty->assign('bicValue', $ins->bic);
admin/categories.phpTop ca. Zeile 298
foreach ($_POST['dest_cat_ids'] AS $dest_category_id) {
$dest_category_id = xtc_db_prepare_input($dest_category_id);
if ($_POST['copy_as'] == 'link') {
$catfunc->link_product($product_id, $dest_category_id);
$pID = $product_id;
} elseif ($_POST['copy_as'] == 'duplicate') {
$catfunc->duplicate_product($product_id, $dest_category_id);
$pID = $catfunc->dup_products_id;
} else {
$messageStack->add_session('Copy type not specified.', 'error');
}
}
} elseif (xtc_not_null($_POST['dest_category_id'])) {
$dest_category_id = xtc_db_prepare_input($_POST['dest_category_id']);
if ($_POST['copy_as'] == 'link') {
$catfunc->link_product($product_id, $dest_category_id);
$pID = $product_id;
} elseif ($_POST['copy_as'] == 'duplicate') {
$catfunc->duplicate_product($product_id, $dest_category_id);
$pID = $catfunc->dup_products_id;
} else {
$messageStack->add_session('Copy type not specified.', 'error');
}
}
}
}
//BOC - web28 - redirect to product input mask
$action = is_array($_POST['multi_products']) && isset($_POST['link_to_product']) ? '&action=new_product' : '';
$pID = is_array($_POST['multi_products']) && isset($_POST['multi_products']) ? '&pID='. end($_POST['multi_products']) : '';
xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, 'cPath='.$dest_category_id.$pID.$action.'&'.xtc_get_all_get_params(array ('cPath', 'action', 'pID', 'cID'))));
$pID = isset($pID) && $pID > 0 ? '&pID='. $pID : '';
xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array ('cPath', 'action', 'pID', 'cID')).'cPath='.$dest_category_id.$pID.$action));
//EOC - web28 - redirect to product input mask
}
// --- MULTI COPY ENDS ---
xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, 'cPath='.$_GET['cPath'].'&'.xtc_get_all_get_params(array ('cPath', 'action', 'pID', 'cID'))));
xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array ('cPath', 'action', 'pID', 'cID')).'cPath='.$_GET['cPath']));
break;
#EOB multi_action_confirm
} //EOB switch action
admin/create_account.phpTop ca. Zeile 331
$sql_data_array['entry_suburb'] = $entry_suburb;
if (ACCOUNT_STATE == 'true') {
if ($zone_id > 0) {
$sql_data_array['entry_zone_id'] = $entry_zone_id;
$sql_data_array['entry_state'] = '';
$sql_data_array['entry_state'] = $entry_state;
} else {
$sql_data_array['entry_zone_id'] = '0';
$sql_data_array['entry_state'] = $entry_state;
}
admin/customers.phpTop ca. Zeile 542
if (ACCOUNT_STATE == 'true') {
if ($entry_zone_id > 0) {
$sql_data_array['entry_zone_id'] = $entry_zone_id;
$sql_data_array['entry_state'] = '';
$sql_data_array['entry_state'] = $entry_state;
} else {
$sql_data_array['entry_zone_id'] = '0';
$sql_data_array['entry_state'] = $entry_state;
}
admin/includes/application_top.phpTop ca. Zeile 29
Released under the GNU General Public License
--------------------------------------------------------------*/
// DB version, used for updates (_installer)
define('DB_VERSION', 'MOD_1.0.6.0');
define('DB_VERSION', 'MOD_1.0.6.3');
//Run Mode
define('RUN_MODE_ADMIN',true);
// Start the clock for the page parse time log
ca. Zeile 152
// make a connection to the database... now
xtc_db_connect() or die('Unable to connect to database server!');
// set application wide parameters
define('DB_CACHE', 'false');
$configuration_query = xtc_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION . '');
while ($configuration = xtc_db_fetch_array($configuration_query)) {
if ($configuration['cfgKey'] != 'STORE_DB_TRANSACTIONS') {
define($configuration['cfgKey'], stripslashes($configuration['cfgValue'])); //Web28 - 2012-08-09 - fix slashes
ca. Zeile 300
$_SESSION['language_charset'] = $lng->language['language_charset']; //web28 - 2012-04-29 - add $_SESSION['language_charset']
$_SESSION['language_code'] = $lng->language['code']; //web28 - 2010-09-05 - add $_SESSION['language_code']
}
// set default charset
@ini_set('default_charset', $_SESSION['language_charset']);
// include the language translations
require(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/'.$_SESSION['language'] . '.php');
require(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/buttons.php');
$current_page = basename($PHP_SELF);
admin/includes/classes/categories.phpTop ca. Zeile 804
xtc_db_perform(TABLE_PRODUCTS, $sql_data_array);
//get duplicate id
$dup_products_id = xtc_db_insert_id();
$this->dup_products_id = $dup_products_id;
//duplicate image if there is one
if ($product['products_image'] != '') {
//build new image_name for duplicate
admin/includes/classes/import.phpTop ca. Zeile 488
WHERE
cd.categories_name='".addslashes($cat[$i])."'
and cd.language_id='".$this->languages[0]['id']."'
and cd.categories_id=c.categories_id
and parent_id='".$parent."'");
and c.parent_id='".$parent."'");
if (!xtc_db_num_rows($cat_query)) { // insert categorie
$categorie_data = array ('parent_id' => $parent, 'categories_status' => 1, 'date_added' => 'now()', 'last_modified' => 'now()');
admin/includes/column_left.phpTop ca. Zeile 100
if (($_SESSION['customers_status']['customers_status_id'] == '0' && $admin_access['haendlerbund'] == '1')) echo '<li><a href="' . xtc_href_link(FILENAME_HAENDLERBUND, '') . '" class="menuBoxContentLink"> -' . BOX_HAENDLERBUND . '</a></li>';
// EOF - Tomcraft - 2012-12-08 - Added haendlerbund AGB interface
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['safeterms'] == '1')) echo '<li><a href="' . xtc_href_link(FILENAME_SAFETERMS, '') . '" class="menuBoxContentLink"> -' . BOX_SAFETERMS . '</a></li>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['easymarketing'] == '1')) echo '<li><a href="' . xtc_href_link(FILENAME_EASYMARKETING, '') . '" class="menuBoxContentLink"> -' . BOX_EASYMARKETING . '</a></li>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['protectedshops'] == '1')) echo '<li><a href="' . xtc_href_link(FILENAME_PROTECTEDSHOPS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_PROTECTEDSHOPS . '</a></li>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['shipcloud'] == '1')) echo '<li><a href="' . xtc_href_link(FILENAME_SHIPCLOUD, '') . '" class="menuBoxContentLink"> -' . BOX_SHIPCLOUD . '</a></li>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['shipcloud_pickup'] == '1')) echo '<li><a href="' . xtc_href_link('shipcloud_pickup.php', '') . '" class="menuBoxContentLink"> -' . BOX_SHIPCLOUD_PICKUP . '</a></li>';
## Payone
include(DIR_FS_EXTERNAL.'payone/modules/column_left.php');
echo ('</ul>');
ca. Zeile 146
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['server_info'] == '1')) echo '<li><a href="' . xtc_href_link(FILENAME_SERVER_INFO) . '" class="menuBoxContentLink"> -' . BOX_SERVER_INFO . '</a></li>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['blz_update'] == '1')) echo '<li><a href="' . xtc_href_link(FILENAME_BLZ_UPDATE) . '" class="menuBoxContentLink"> -' . BOX_BLZ_UPDATE . '</a></li>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['whos_online'] == '1')) echo '<li><a href="' . xtc_href_link(FILENAME_WHOS_ONLINE) . '" class="menuBoxContentLink"> -' . BOX_WHOS_ONLINE . '</a></li>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['csv_backend'] == '1')) echo '<li><a href="' . xtc_href_link('csv_backend.php') . '" class="menuBoxContentLink"> -' . BOX_IMPORT . '</a></li>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['parcel_carriers'] == '1')) echo '<li><a href="' . xtc_href_link(FILENAME_PARCEL_CARRIERS) . '" class="menuBoxContentLink"> -' . BOX_PARCEL_CARRIERS . '</a></li>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && (isset($admin_access['paypal']) && $admin_access['paypal'] == '1')) echo '<li><a href="' . xtc_href_link('paypal.php') . '" class="menuBoxContentLink"> -' . BOX_PAYPAL . '</a></li>'; //Tomcraft - 2009-10-03 - Paypal Express Modul in admin access
echo ('</ul>');
echo ('</li>');
admin/includes/configuration_installer.phpTop ca. Zeile 42
//configuration_group_id 8 --- "Artikel Listen Optionen"
$values[] = "(NULL, 'SHOW_BUTTON_BUY_NOW', 'false', '8', '20', NULL, NOW(), NULL, 'xtc_cfg_select_option(array(\'true\', \'false\'),');";
//configuration_group_id 9 --- "Lagerverwaltungs Optionen"
$values[] = "(NULL, 'STOCK_CHECKOUT_UPDATE_PRODUCTS_STATUS', 'true', '9', '20', NULL, NOW(), NULL, 'xtc_cfg_select_option(array(\'true\', \'false\'),');";
$values[] = "(NULL, 'STOCK_CHECKOUT_UPDATE_PRODUCTS_STATUS', 'false', '9', '20', NULL, NOW(), NULL, 'xtc_cfg_select_option(array(\'true\', \'false\'),');";
//configuration_group_id 10 --- "Logging Optionen"
//configuration_group_id 11 --- "Cache Optionen"
admin/includes/filenames.phpTop ca. Zeile 94
define('FILENAME_XTBOOSTER','xtbooster.php'); // xs:booster
define('FILENAME_SAFETERMS','safeterms.php'); // Tomcraft - 2013-06-21 - Safeterms AGB interface
define('FILENAME_EASYMARKETING','easymarketing.php'); // Tomcraft - 2013-08-29 - Added easymarketing
define('FILENAME_IT_RECHT_KANZLEI','it_recht_kanzlei.php');
define('FILENAME_PROTECTEDSHOPS','protectedshops.php');
define('FILENAME_PARCEL_CARRIERS','parcel_carriers.php');
define('FILENAME_SHIPCLOUD', 'shipcloud.php');
?>
admin/includes/functions/general.phpTop ca. Zeile 2354
$date_selector .= '>'.$month_array[$i].'</option>';
}
$date_selector .= '</select>';
$date_selector .= '<select name="'.$prefix.'_year">';
for ($i = 2001; $i < 2019; $i ++) {
for ($i = date("Y"); $i < date("Y") + 4; $i ++) {
$date_selector .= '<option value="'.$i.'"';
if ($i == $year)
$date_selector .= 'selected';
$date_selector .= '>'.$i.'</option>';
admin/includes/header.phpTop ca. Zeile 133
</table>
</td>
</tr>
</table>
</div>
<div id="top2"></div>
<?php
if (USE_ADMIN_TOP_MENU != 'false') {
?>
admin/includes/modules/categories_view.phpTop ca. Zeile 1012
} //end switch
if ((xtc_not_null($heading)) && (xtc_not_null($contents))) {
//display info box
echo '<td width="265" valign="top" style="padding-left: 5px;">' . "\n";
echo box::infoBox($heading, $contents); // cYbercOsmOnauT - 2011-02-05 - Changed methods of the classes box and tableBox to static
$box = new box;
echo $box->infoBox($heading, $contents);
echo '</td>' . "\n";
}
?>
</tr>
admin/includes/modules/export/idealo.phpTop ca. Zeile 95
$this->enabled = ((MODULE_IDEALO_CSV_STATUS == 'True') ? true : false);
$this->CAT=array();
$this->PARENT=array();
$this->productsPrice = 0;
$this->description = '<center><a href="http://www.idealo.de" target="_blank"><img src="//cdn.idealo.com/ipc/1/-WmNoOZsF/pics/logos/logo_blue_big.png"/></a></center>';
$this->description = '<center><a href="http://www.idealo.de" target="_blank">'.xtc_image(DIR_WS_CATALOG.'export/idealo/logo_blue_big.png').'</a></center>';
$this->country_array = array();
}
public function saveURL(){
ca. Zeile 246
<form action="javascript:history.back()">
<br><br>
<div id="logo">
<a href="http://www.idealo.de" target="_blank"><img src="//cdn.idealo.com/ipc/1/-WmNoOZsF/pics/logos/logo_blue_big.png" alt="Price Comparison" class="logo noborder"/></a>
<a href="http://www.idealo.de" target="_blank">'.xtc_image(DIR_WS_CATALOG.'export/idealo/logo_blue_big.png', 'Price Comparison', '', '', 'class="logo noborder"').'</a>
</div>
<br><br>
Der Export konnte nicht erfolgen.<br><br>
ca. Zeile 669
<center>
<font face="Arial,MS Sans Serif">
<br><br>
<div id="logo">
<a href="http://www.idealo.de" target="_blank"><img src="//cdn.idealo.com/ipc/1/-WmNoOZsF/pics/logos/logo_blue_big.png" alt="Price Comparison" class="logo noborder"/></a>
<a href="http://www.idealo.de" target="_blank">'.xtc_image(DIR_WS_CATALOG.'export/idealo/logo_blue_big.png', 'Price Comparison', '', '', 'class="logo noborder"').'</a>
</div><br><br>';
$html .= '<br><br>';
admin/includes/modules/export/idealo_real.phpTop ca. Zeile 110
$this->enabled = ((MODULE_IDEALO_REALTIME_STATUS == 'True') ? true : false);
$this->CAT=array();
$this->PARENT=array();
$this->productsPrice = 0;
$this->description = '<center><a href="http://www.idealo.de" target="_blank"><img src="//cdn.idealo.com/ipc/1/-WmNoOZsF/pics/logos/logo_blue_big.png"/></a></center>';
$this->description = '<center><a href="http://www.idealo.de" target="_blank">'.xtc_image(DIR_WS_CATALOG.'export/idealo_realtime/logo_blue_big.png').'</a></center>';
$this->country_array = array();
}
public function saveURL(){
ca. Zeile 312
<form action="javascript:history.back()">
<br><br>
<div id="logo">
<a href="http://www.idealo.de" target="_blank"><img src="//cdn.idealo.com/ipc/1/-WmNoOZsF/pics/logos/logo_blue_big.png" alt="Price Comparison" class="logo noborder"/></a>
<a href="http://www.idealo.de" target="_blank">'.xtc_image(DIR_WS_CATALOG.'export/idealo_realtime/logo_blue_big.png', 'Price Comparison', '', '', 'class="logo noborder"').'</a>
</div>
<br><br>
Die Übertragung konnte nicht an Idealo erfolgen.<br><br>
ca. Zeile 580
<form name="close" onSubmit= "window.close();>
<br><br>
<div id="logo">
<a href="http://www.idealo.de" target="_blank"><img src="//cdn.idealo.com/ipc/1/-WmNoOZsF/pics/logos/logo_blue_big.png" alt="Price Comparison" class="logo noborder"/></a>
<a href="http://www.idealo.de" target="_blank">'.xtc_image(DIR_WS_CATALOG.'export/idealo_realtime/logo_blue_big.png', 'Price Comparison', '', '', 'class="logo noborder"').'</a>
</div><br><br>';
$html .= IDEALO_QUESTION_AFTER_EMAIL_SEND_01 . $baseUrl . IDEALO_QUESTION_AFTER_EMAIL_SEND_02 . '<br><br>';
ca. Zeile 705
<form name="exportReady" action="" method="post">
<br><br>
<div id="logo">
<a href="http://www.idealo.de" target="_blank"><img src="//cdn.idealo.com/ipc/1/-WmNoOZsF/pics/logos/logo_blue_big.png" alt="Price Comparison" class="logo noborder"/></a>
<a href="http://www.idealo.de" target="_blank">'.xtc_image(DIR_WS_CATALOG.'export/idealo_realtime/logo_blue_big.png', 'Price Comparison', '', '', 'class="logo noborder"').'</a>
</div><br><br>';
$html .= IDEALO_TESTMODE_ACTIVE;
$html .= '<br><br>';
admin/includes/modules/fckeditor/editor/_source/fckeditorapi.jsTop ca. Zeile 39
// code (like JSON) can extend the Object prototype and we get then extra oEditor
// objects that aren't really FCKeditor instances.
var sScript =
'window.FCKeditorAPI = {' +
'Version : "2.6.8",' +
'VersionBuild : "25427",' +
'Version : "2.6.10",' +
'VersionBuild : "25429",' +
'Instances : window.FCKeditorAPI && window.FCKeditorAPI.Instances || {},' +
'GetInstance : function( name )' +
'{' +
admin/includes/modules/fckeditor/editor/dialog/fck_about.htmlTop ca. Zeile 31
<script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ;
var FCKLang = oEditor.FCKLang ;
var FCKTools = oEditor.FCKTools ;
window.parent.AddTab( 'About', FCKLang.DlgAboutAboutTab ) ;
window.parent.AddTab( 'License', FCKLang.DlgAboutLicenseTab ) ;
window.parent.AddTab( 'BrowserInfo', FCKLang.DlgAboutBrowserInfoTab ) ;
ca. Zeile 78
<td align="center" nowrap="nowrap" style="border-right: #000000 1px solid; border-top: #000000 1px solid;
border-left: #000000 1px solid; border-bottom: #000000 1px solid">
<span fcklang="DlgAboutVersion">version</span>
<br />
<b>2.6.8</b><br />
Build 25427</td>
<b>2.6.10</b><br />
Build 25429</td>
</tr>
</table>
</td>
</tr>
ca. Zeile 140
<tr>
<td>
<script type="text/javascript">
<!--
document.write( '<b>User Agent<\/b><br />' + window.navigator.userAgent + '<br /><br />' ) ;
document.write( '<b>Browser<\/b><br />' + window.navigator.appName + ' ' + window.navigator.appVersion + '<br /><br />' ) ;
document.write( '<b>Platform<\/b><br />' + window.navigator.platform + '<br /><br />' ) ;
document.write( '<b>User Agent<\/b><br />' + FCKTools.HTMLEncode( window.navigator.userAgent ) + '<br /><br />' ) ;
document.write( '<b>Browser<\/b><br />' + FCKTools.HTMLEncode( window.navigator.appName ) + ' ' + FCKTools.HTMLEncode( window.navigator.appVersion ) + '<br /><br />' ) ;
document.write( '<b>Platform<\/b><br />' + FCKTools.HTMLEncode( window.navigator.platform ) + '<br /><br />' ) ;
var sUserLang = '?' ;
if ( window.navigator.language )
sUserLang = window.navigator.language ;
else if ( window.navigator.userLanguage )
sUserLang = window.navigator.userLanguage ;
document.write( '<b>Language<\/b><br />' + sUserLang ) ;
document.write( '<b>Language<\/b><br />' + FCKTools.HTMLEncode( sUserLang ) ) ;
//-->
</script>
</td>
</tr>
admin/includes/modules/fckeditor/editor/filemanager/connectors/php/config.phpTop ca. Zeile 24
*/
global $Config ;
// SECURITY: You must explicitly enable this "connector". (Set it to "true").
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
// authenticated users can access this file or use some kind of session checking.
// Modified for xt:Commerce v3.0.4 SP2.1 by Hetfield (www.merz-it-service.de) - Begin //
if (file_exists('../../../../../../local/configure.php')) {
include('../../../../../../local/configure.php');
} else {
ca. Zeile 33
}
//BOC web28 security fix
$Config['Enabled'] = false ;
include('xtc_access.php');
//BOC web28 security fix
//EOC web28 security fix
// Path to user files relative to the document root.
$Config['UserFilesPath'] = DIR_WS_CATALOG ;
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = DIR_FS_DOCUMENT_ROOT ;
// Modified for xt:Commerce v3.0.4 SP2.1 by Hetfield (www.merz-it-service.de) - End //
// Due to security issues with Apache modules, it is recommended to leave the
// following setting enabled.
$Config['ForceSingleExtension'] = true ;
// Perform additional checks for image files.
// If set to true, validate image size (using getimagesize).
$Config['SecureImageUploads'] = true;
// What the user can do with this connector.
$Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;
// Allowed Resource Types.
$Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;
// For security, HTML is allowed in the first Kb of data for files having the
// following extensions only.
$Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;
// After file is uploaded, sometimes it is required to change its permissions
// so that it was possible to access it at the later time.
// If possible, it is recommended to set more restrictive permissions, like 0755.
// Set to 0 to disable this feature.
// Note: not needed on Windows-based servers.
$Config['ChmodOnUpload'] = 0777 ;
// See comments above.
// Used when creating folders that does not exist.
$Config['ChmodOnFolderCreate'] = 0777 ;
/*
Configuration settings for each Resource Type
- AllowedExtensions: the possible extensions that can be allowed.
If it is empty then any file type can be uploaded.
- DeniedExtensions: The extensions that won't be allowed.
If it is empty then no restrictions are done here.
For a file to be uploaded it has to fulfill both the AllowedExtensions
and DeniedExtensions (that's it: not being denied) conditions.
- FileTypesPath: the virtual folder relative to the document root where
these resources will be located.
Attention: It must start and end with a slash: '/'
- FileTypesAbsolutePath: the physical path to the above folder. It must be
an absolute path.
If it's an empty string then it will be autocalculated.
Useful if you are using a virtual directory, symbolic link or alias.
Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
Attention: The above 'FileTypesPath' must point to the same directory.
Attention: It must end with a slash: '/'
- QuickUploadPath: the virtual folder relative to the document root where
these resources will be uploaded using the Upload tab in the resources
dialogs.
Attention: It must start and end with a slash: '/'
- QuickUploadAbsolutePath: the physical path to the above folder. It must be
an absolute path.
If it's an empty string then it will be autocalculated.
Useful if you are using a virtual directory, symbolic link or alias.
Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
Attention: The above 'QuickUploadPath' must point to the same directory.
Attention: It must end with a slash: '/'
NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to
"userfiles" directory to maintain backwards compatibility with older versions of FCKeditor.
This is fine, but you in some cases you will be not able to browse uploaded files using file browser.
Example: if you click on "image button", select "Upload" tab and send image
to the server, image will appear in FCKeditor correctly, but because it is placed
directly in /userfiles/ directory, you'll be not able to see it in built-in file browser.
The more expected behaviour would be to send images directly to "image" subfolder.
To achieve that, simply change
$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;
$Config['QuickUploadAbsolutePath']['Image'] = $Config['UserFilesAbsolutePath'] ;
into:
$Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ;
$Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ;
*/
// WARNING: It is recommended to remove swf extension from the list of allowed extensions.
// SWF files can be used to perform XSS attack.
// Modified for xt:Commerce v3.0.4 SP2.1 by Hetfield (www.merz-it-service.de) - Begin //
$Config['AllowedExtensions']['File'] = array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip') ;
$Config['DeniedExtensions']['File'] = array() ;
$Config['FileTypesPath']['File'] = $Config['UserFilesPath'] ;
admin/includes/modules/fckeditor/editor/filemanager/connectors/php/connector.phpTop ca. Zeile 56
$sCurrentFolder = GetCurrentFolder() ;
// Check if it is an allowed command
if ( ! IsAllowedCommand( $sCommand ) )
SendError( 1, 'The "' . $sCommand . '" command isn\'t allowed' ) ;
SendError( 1, 'The requested command isn\'t allowed' ) ;
// Check if it is an allowed type.
if ( !IsAllowedType( $sResourceType ) )
SendError( 1, 'Invalid type specified' ) ;
admin/includes/modules/fckeditor/editor/filemanager/connectors/php/upload.phpTop ca. Zeile 46
$sCurrentFolder = "/" ;
// Is enabled the upload?
if ( ! IsAllowedCommand( $sCommand ) )
SendUploadResults( '1', '', '', 'The ""' . $sCommand . '"" command isn\'t allowed' ) ;
SendUploadResults( '1', '', '', 'The requested command isn\'t allowed' ) ;
// Check if it is an allowed type.
if ( !IsAllowedType( $sType ) )
SendUploadResults( 1, '', '', 'Invalid type specified' ) ;
admin/includes/modules/fckeditor/editor/js/fckeditorcode_gecko.jsTop ca. Zeile 34
var FCKDebug={Output:function(){},OutputObject:function(){}};
var FCKDomTools={MoveChildren:function(A,B,C){if (A==B) return;var D;if (C){while ((D=A.lastChild)) B.insertBefore(A.removeChild(D),B.firstChild);}else{while ((D=A.firstChild)) B.appendChild(A.removeChild(D));}},MoveNode:function(A,B,C){if (C) B.insertBefore(FCKDomTools.RemoveNode(A),B.firstChild);else B.appendChild(FCKDomTools.RemoveNode(A));},TrimNode:function(A){this.LTrimNode(A);this.RTrimNode(A);},LTrimNode:function(A){var B;while ((B=A.firstChild)){if (B.nodeType==3){var C=B.nodeValue.LTrim();var D=B.nodeValue.length;if (C.length==0){A.removeChild(B);continue;}else if (C.length<D){B.splitText(D-C.length);A.removeChild(A.firstChild);}};break;}},RTrimNode:function(A){var B;while ((B=A.lastChild)){if (B.nodeType==3){var C=B.nodeValue.RTrim();var D=B.nodeValue.length;if (C.length==0){B.parentNode.removeChild(B);continue;}else if (C.length<D){B.splitText(C.length);A.lastChild.parentNode.removeChild(A.lastChild);}};break;};if (!FCKBrowserInfo.IsIE&&!FCKBrowserInfo.IsOpera){B=A.lastChild;if (B&&B.nodeType==1&&B.nodeName.toLowerCase()=='br'){B.parentNode.removeChild(B);}}},RemoveNode:function(A,B){if (B){var C;while ((C=A.firstChild)) A.parentNode.insertBefore(A.removeChild(C),A);};return A.parentNode.removeChild(A);},GetFirstChild:function(A,B){if (typeof (B)=='string') B=[B];var C=A.firstChild;while(C){if (C.nodeType==1&&C.tagName.Equals.apply(C.tagName,B)) return C;C=C.nextSibling;};return null;},GetLastChild:function(A,B){if (typeof (B)=='string') B=[B];var C=A.lastChild;while(C){if (C.nodeType==1&&(!B||C.tagName.Equals(B))) return C;C=C.previousSibling;};return null;},GetPreviousSourceElement:function(A,B,C,D){if (!A) return null;if (C&&A.nodeType==1&&A.nodeName.IEquals(C)) return null;if (A.previousSibling) A=A.previousSibling;else return this.GetPreviousSourceElement(A.parentNode,B,C,D);while (A){if (A.nodeType==1){if (C&&A.nodeName.IEquals(C)) break;if (!D||!A.nodeName.IEquals(D)) return A;}else if (B&&A.nodeType==3&&A.nodeValue.RTrim().length>0) break;if (A.lastChild) A=A.lastChild;else return this.GetPreviousSourceElement(A,B,C,D);};return null;},GetNextSourceElement:function(A,B,C,D,E){while((A=this.GetNextSourceNode(A,E))){if (A.nodeType==1){if (C&&A.nodeName.IEquals(C)) break;if (D&&A.nodeName.IEquals(D)) return this.GetNextSourceElement(A,B,C,D);return A;}else if (B&&A.nodeType==3&&A.nodeValue.RTrim().length>0) break;};return null;},GetNextSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.firstChild) E=A.firstChild;else{if (D&&A==D) return null;E=A.nextSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetNextSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetNextSourceNode(E,false,C,D);return E;},GetPreviousSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.lastChild) E=A.lastChild;else{if (D&&A==D) return null;E=A.previousSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetPreviousSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetPreviousSourceNode(E,false,C,D);return E;},InsertAfterNode:function(A,B){return A.parentNode.insertBefore(B,A.nextSibling);},GetParents:function(A){var B=[];while (A){B.unshift(A);A=A.parentNode;};return B;},GetCommonParents:function(A,B){var C=this.GetParents(A);var D=this.GetParents(B);var E=[];for (var i=0;i<C.length;i++){if (C[i]==D[i]) E.push(C[i]);};return E;},GetCommonParentNode:function(A,B,C){var D={};if (!C.pop) C=[C];while (C.length>0) D[C.pop().toLowerCase()]=1;var E=this.GetCommonParents(A,B);var F=null;while ((F=E.pop())){if (D[F.nodeName.toLowerCase()]) return F;};return null;},GetIndexOf:function(A){var B=A.parentNode?A.parentNode.firstChild:null;var C=-1;while (B){C++;if (B==A) return C;B=B.nextSibling;};return-1;},PaddingNode:null,EnforcePaddingNode:function(A,B){try{if (!A||!A.body) return;}catch (e){return;};this.CheckAndRemovePaddingNode(A,B,true);try{if (A.body.lastChild&&(A.body.lastChild.nodeType!=1||A.body.lastChild.tagName.toLowerCase()==B.toLowerCase())) return;}catch (e){return;};var C=A.createElement(B);if (FCKBrowserInfo.IsGecko&&FCKListsLib.NonEmptyBlockElements[B]) FCKTools.AppendBogusBr(C);this.PaddingNode=C;if (A.body.childNodes.length==1&&A.body.firstChild.nodeType==1&&A.body.firstChild.tagName.toLowerCase()=='br'&&(A.body.firstChild.getAttribute('_moz_dirty')!=null||A.body.firstChild.getAttribute('type')=='_moz')) A.body.replaceChild(C,A.body.firstChild);else A.body.appendChild(C);},CheckAndRemovePaddingNode:function(A,B,C){var D=this.PaddingNode;if (!D) return;try{if (D.parentNode!=A.body||D.tagName.toLowerCase()!=B||(D.childNodes.length>1)||(D.firstChild&&D.firstChild.nodeValue!='\xa0'&&String(D.firstChild.tagName).toLowerCase()!='br')){this.PaddingNode=null;return;}}catch (e){this.PaddingNode=null;return;};if (!C){if (D.parentNode.childNodes.length>1) D.parentNode.removeChild(D);this.PaddingNode=null;}},HasAttribute:function(A,B){if (A.hasAttribute) return A.hasAttribute(B);else{var C=A.attributes[B];return (C!=undefined&&C.specified);}},HasAttributes:function(A){var B=A.attributes;for (var i=0;i<B.length;i++){if (FCKBrowserInfo.IsIE){var C=B[i].nodeName;if (C.StartsWith('_fck')){continue;};if (C=='class'){if (A.className.length>0) return true;continue;}};if (B[i].specified) return true;};return false;},RemoveAttribute:function(A,B){if (FCKBrowserInfo.IsIE&&B.toLowerCase()=='class') B='className';return A.removeAttribute(B,0);},RemoveAttributes:function (A,B){for (var i=0;i<B.length;i++) this.RemoveAttribute(A,B[i]);},GetAttributeValue:function(A,B){var C=B;if (typeof B=='string') B=A.attributes[B];else C=B.nodeName;if (B&&B.specified){if (C=='style') return A.style.cssText;else if (C=='class'||C.indexOf('on')==0) return B.nodeValue;else{return A.getAttribute(C,2);}};return null;},Contains:function(A,B){if (A.contains&&B.nodeType==1) return A.contains(B);while ((B=B.parentNode)){if (B==A) return true;};return false;},BreakParent:function(A,B,C){var D=C||new FCKDomRange(FCKTools.GetElementWindow(A));D.SetStart(A,4);D.SetEnd(B,4);var E=D.ExtractContents();D.InsertNode(A.parentNode.removeChild(A));E.InsertAfterNode(A);D.Release(!!C);},GetNodeAddress:function(A,B){var C=[];while (A&&A!=FCKTools.GetElementDocument(A).documentElement){var D=A.parentNode;var E=-1;for(var i=0;i<D.childNodes.length;i++){var F=D.childNodes[i];if (B===true&&F.nodeType==3&&F.previousSibling&&F.previousSibling.nodeType==3) continue;E++;if (D.childNodes[i]==A) break;};C.unshift(E);A=A.parentNode;};return C;},GetNodeFromAddress:function(A,B,C){var D=A.documentElement;for (var i=0;i<B.length;i++){var E=B[i];if (!C){D=D.childNodes[E];continue;};var F=-1;for (var j=0;j<D.childNodes.length;j++){var G=D.childNodes[j];if (C===true&&G.nodeType==3&&G.previousSibling&&G.previousSibling.nodeType==3) continue;F++;if (F==E){D=G;break;}}};return D;},CloneElement:function(A){A=A.cloneNode(false);A.removeAttribute('id',false);return A;},ClearElementJSProperty:function(A,B){if (FCKBrowserInfo.IsIE) A.removeAttribute(B);else delete A[B];},SetElementMarker:function (A,B,C,D){var E=String(parseInt(Math.random()*0xffffffff,10));B._FCKMarkerId=E;B[C]=D;if (!A[E]) A[E]={ 'element':B,'markers':{} };A[E]['markers'][C]=D;},ClearElementMarkers:function(A,B,C){var D=B._FCKMarkerId;if (!D) return;this.ClearElementJSProperty(B,'_FCKMarkerId');for (var j in A[D]['markers']) this.ClearElementJSProperty(B,j);if (C) delete A[D];},ClearAllMarkers:function(A){for (var i in A) this.ClearElementMarkers(A,A[i]['element'],true);},ListToArray:function(A,B,C,D,E){if (!A.nodeName.IEquals(['ul','ol'])) return [];if (!D) D=0;if (!C) C=[];for (var i=0;i<A.childNodes.length;i++){var F=A.childNodes[i];if (!F.nodeName.IEquals('li')) continue;var G={ 'parent':A,'indent':D,'contents':[] };if (!E){G.grandparent=A.parentNode;if (G.grandparent&&G.grandparent.nodeName.IEquals('li')) G.grandparent=G.grandparent.parentNode;}else G.grandparent=E;if (B) this.SetElementMarker(B,F,'_FCK_ListArray_Index',C.length);C.push(G);for (var j=0;j<F.childNodes.length;j++){var H=F.childNodes[j];if (H.nodeName.IEquals(['ul','ol'])) this.ListToArray(H,B,C,D+1,G.grandparent);else G.contents.push(H);}};return C;},ArrayToList:function(A,B,C){if (C==undefined) C=0;if (!A||A.length<C+1) return null;var D=FCKTools.GetElementDocument(A[C].parent);var E=D.createDocumentFragment();var F=null;var G=C;var H=Math.max(A[C].indent,0);var I=null;while (true){var J=A[G];if (J.indent==H){if (!F||A[G].parent.nodeName!=F.nodeName){F=A[G].parent.cloneNode(false);E.appendChild(F);};I=D.createElement('li');F.appendChild(I);for (var i=0;i<J.contents.length;i++) I.appendChild(J.contents[i].cloneNode(true));G++;}else if (J.indent==Math.max(H,0)+1){var K=this.ArrayToList(A,null,G);I.appendChild(K.listNode);G=K.nextIndex;}else if (J.indent==-1&&C==0&&J.grandparent){var I;if (J.grandparent.nodeName.IEquals(['ul','ol'])) I=D.createElement('li');else{if (FCKConfig.EnterMode.IEquals(['div','p'])&&!J.grandparent.nodeName.IEquals('td')) I=D.createElement(FCKConfig.EnterMode);else I=D.createDocumentFragment();};for (var i=0;i<J.contents.length;i++) I.appendChild(J.contents[i].cloneNode(true));if (I.nodeType==11){if (I.lastChild&&I.lastChild.getAttribute&&I.lastChild.getAttribute('type')=='_moz') I.removeChild(I.lastChild);I.appendChild(D.createElement('br'));};if (I.nodeName.IEquals(FCKConfig.EnterMode)&&I.firstChild){this.TrimNode(I);if (FCKListsLib.BlockBoundaries[I.firstChild.nodeName.toLowerCase()]){var M=D.createDocumentFragment();while (I.firstChild) M.appendChild(I.removeChild(I.firstChild));I=M;}};if (FCKBrowserInfo.IsGeckoLike&&I.nodeName.IEquals(['div','p'])) FCKTools.AppendBogusBr(I);E.appendChild(I);F=null;G++;}else return null;if (A.length<=G||Math.max(A[G].indent,0)<H){break;}};if (B){var N=E.firstChild;while (N){if (N.nodeType==1) this.ClearElementMarkers(B,N);N=this.GetNextSourceNode(N);}};return { 'listNode':E,'nextIndex':G };},GetNextSibling:function(A,B){A=A.nextSibling;while (A&&!B&&A.nodeType!=1&&(A.nodeType!=3||A.nodeValue.length==0)) A=A.nextSibling;return A;},GetPreviousSibling:function(A,B){A=A.previousSibling;while (A&&!B&&A.nodeType!=1&&(A.nodeType!=3||A.nodeValue.length==0)) A=A.previousSibling;return A;},CheckIsEmptyElement:function(A,B){var C=A.firstChild;var D;while (C){if (C.nodeType==1){if (D||!FCKListsLib.InlineNonEmptyElements[C.nodeName.toLowerCase()]) return false;if (!B||B(C)===true) D=C;}else if (C.nodeType==3&&C.nodeValue.length>0) return false;C=C.nextSibling;};return D?this.CheckIsEmptyElement(D,B):true;},SetElementStyles:function(A,B){var C=A.style;for (var D in B) C[D]=B[D];},SetOpacity:function(A,B){if (FCKBrowserInfo.IsIE){B=Math.round(B*100);A.style.filter=(B>100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+B+')');}else A.style.opacity=B;},GetCurrentElementStyle:function(A,B){if (FCKBrowserInfo.IsIE) return A.currentStyle[B];else return A.ownerDocument.defaultView.getComputedStyle(A,'').getPropertyValue(B);},GetPositionedAncestor:function(A){var B=A;while (B!=FCKTools.GetElementDocument(B).documentElement){if (this.GetCurrentElementStyle(B,'position')!='static') return B;if (B==FCKTools.GetElementDocument(B).documentElement&¤tWindow!=w) B=currentWindow.frameElement;else B=B.parentNode;};return null;},ScrollIntoView:function(A,B){var C=FCKTools.GetElementWindow(A);var D=FCKTools.GetViewPaneSize(C).Height;var E=D*-1;if (B===false){E+=A.offsetHeight||0;E+=parseInt(this.GetCurrentElementStyle(A,'marginBottom')||0,10)||0;};var F=FCKTools.GetDocumentPosition(C,A);E+=F.y;var G=FCKTools.GetScrollPosition(C).Y;if (E>0&&(E>G||E<G-D)) C.scrollTo(0,E);},CheckIsEditable:function(A){var B=A.nodeName.toLowerCase();var C=FCK.DTD[B]||FCK.DTD.span;return (C['#']&&!FCKListsLib.NonEditableElements[B]);},GetSelectedDivContainers:function(){var A=[];var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.GetTouchedStartNode();var D=B.GetTouchedEndNode();var E=C;if (C==D){while (D.nodeType==1&&D.lastChild) D=D.lastChild;D=FCKDomTools.GetNextSourceNode(D);}while (E&&E!=D){if (E.nodeType!=3||!/^[ \t\n]*$/.test(E.nodeValue)){var F=new FCKElementPath(E);var G=F.BlockLimit;if (G&&G.nodeName.IEquals('div')&&A.IndexOf(G)==-1) A.push(G);};E=FCKDomTools.GetNextSourceNode(E);};return A;}};
var FCKTools={};FCKTools.CreateBogusBR=function(A){var B=A.createElement('br');B.setAttribute('type','_moz');return B;};FCKTools.FixCssUrls=function(A,B){if (!A||A.length==0) return B;return B.replace(/url\s*\(([\s'"]*)(.*?)([\s"']*)\)/g,function(match,opener,path,closer){if (/^\/|^\w?:/.test(path)) return match;else return 'url('+opener+A+path+closer+')';});};FCKTools._GetUrlFixedCss=function(A,B){var C=A.match(/^([^|]+)\|([\s\S]*)/);if (C) return FCKTools.FixCssUrls(C[1],C[2]);else return A;};FCKTools.AppendStyleSheet=function(A,B){if (!B) return [];if (typeof(B)=='string'){if (/[\\\/\.][^{}]*$/.test(B)){return this.AppendStyleSheet(A,B.split(','));}else return [this.AppendStyleString(A,FCKTools._GetUrlFixedCss(B))];}else{var C=[];for (var i=0;i<B.length;i++) C.push(this._AppendStyleSheet(A,B[i]));return C;}};FCKTools.GetStyleHtml=(function(){var A=function(styleDef,markTemp){if (styleDef.length==0) return '';var B=markTemp?' _fcktemp="true"':'';return '<style type="text/css"'+B+'>'+styleDef+'</style>';};var C=function(cssFileUrl,markTemp){if (cssFileUrl.length==0) return '';var B=markTemp?' _fcktemp="true"':'';return '<link href="'+cssFileUrl+'" type="text/css" rel="stylesheet" '+B+'/>';};return function(cssFileOrArrayOrDef,markTemp){if (!cssFileOrArrayOrDef) return '';if (typeof(cssFileOrArrayOrDef)=='string'){if (/[\\\/\.][^{}]*$/.test(cssFileOrArrayOrDef)){return this.GetStyleHtml(cssFileOrArrayOrDef.split(','),markTemp);}else return A(this._GetUrlFixedCss(cssFileOrArrayOrDef),markTemp);}else{var E='';for (var i=0;i<cssFileOrArrayOrDef.length;i++) E+=C(cssFileOrArrayOrDef[i],markTemp);return E;}}})();FCKTools.GetElementDocument=function (A){return A.ownerDocument||A.document;};FCKTools.GetElementWindow=function(A){return this.GetDocumentWindow(this.GetElementDocument(A));};FCKTools.GetDocumentWindow=function(A){if (FCKBrowserInfo.IsSafari&&!A.parentWindow) this.FixDocumentParentWindow(window.top);return A.parentWindow||A.defaultView;};FCKTools.FixDocumentParentWindow=function(A){if (A.document) A.document.parentWindow=A;for (var i=0;i<A.frames.length;i++) FCKTools.FixDocumentParentWindow(A.frames[i]);};FCKTools.HTMLEncode=function(A){if (!A) return '';A=A.replace(/&/g,'&');A=A.replace(/</g,'<');A=A.replace(/>/g,'>');return A;};FCKTools.HTMLDecode=function(A){if (!A) return '';A=A.replace(/>/g,'>');A=A.replace(/</g,'<');A=A.replace(/&/g,'&');return A;};FCKTools._ProcessLineBreaksForPMode=function(A,B,C,D,E){var F=0;var G="<p>";var H="</p>";var I="<br />";if (C){G="<li>";H="</li>";F=1;}while (D&&D!=A.FCK.EditorDocument.body){if (D.tagName.toLowerCase()=='p'){F=1;break;};D=D.parentNode;};for (var i=0;i<B.length;i++){var c=B.charAt(i);if (c=='\r') continue;if (c!='\n'){E.push(c);continue;};var n=B.charAt(i+1);if (n=='\r'){i++;n=B.charAt(i+1);};if (n=='\n'){i++;if (F) E.push(H);E.push(G);F=1;}else E.push(I);}};FCKTools._ProcessLineBreaksForDivMode=function(A,B,C,D,E){var F=0;var G="<div>";var H="</div>";if (C){G="<li>";H="</li>";F=1;}while (D&&D!=A.FCK.EditorDocument.body){if (D.tagName.toLowerCase()=='div'){F=1;break;};D=D.parentNode;};for (var i=0;i<B.length;i++){var c=B.charAt(i);if (c=='\r') continue;if (c!='\n'){E.push(c);continue;};if (F){if (E[E.length-1]==G){E.push(" ");};E.push(H);};E.push(G);F=1;};if (F) E.push(H);};FCKTools._ProcessLineBreaksForBrMode=function(A,B,C,D,E){var F=0;var G="<br />";var H="";if (C){G="<li>";H="</li>";F=1;};for (var i=0;i<B.length;i++){var c=B.charAt(i);if (c=='\r') continue;if (c!='\n'){E.push(c);continue;};if (F&&H.length) E.push (H);E.push(G);F=1;}};FCKTools.ProcessLineBreaks=function(A,B,C){var D=B.EnterMode.toLowerCase();var E=[];var F=0;var G=new A.FCKDomRange(A.FCK.EditorWindow);G.MoveToSelection();var H=G._Range.startContainer;while (H&&H.nodeType!=1) H=H.parentNode;if (H&&H.tagName.toLowerCase()=='li') F=1;if (D=='p') this._ProcessLineBreaksForPMode(A,C,F,H,E);else if (D=='div') this._ProcessLineBreaksForDivMode(A,C,F,H,E);else if (D=='br') this._ProcessLineBreaksForBrMode(A,C,F,H,E);return E.join("");};FCKTools.AddSelectOption=function(A,B,C){var D=FCKTools.GetElementDocument(A).createElement("OPTION");D.text=B;D.value=C;A.options.add(D);return D;};FCKTools.RunFunction=function(A,B,C,D){if (A) this.SetTimeout(A,0,B,C,D);};FCKTools.SetTimeout=function(A,B,C,D,E){return (E||window).setTimeout(function(){if (D) A.apply(C,[].concat(D));else A.apply(C);},B);};FCKTools.SetInterval=function(A,B,C,D,E){return (E||window).setInterval(function(){A.apply(C,D||[]);},B);};FCKTools.ConvertStyleSizeToHtml=function(A){return A.EndsWith('%')?A:parseInt(A,10);};FCKTools.ConvertHtmlSizeToStyle=function(A){return A.EndsWith('%')?A:(A+'px');};FCKTools.GetElementAscensor=function(A,B){var e=A;var C=","+B.toUpperCase()+",";while (e){if (C.indexOf(","+e.nodeName.toUpperCase()+",")!=-1) return e;e=e.parentNode;};return null;};FCKTools.CreateEventListener=function(A,B){var f=function(){var C=[];for (var i=0;i<arguments.length;i++) C.push(arguments[i]);A.apply(this,C.concat(B));};return f;};FCKTools.IsStrictMode=function(A){return ('CSS1Compat'==(A.compatMode||(FCKBrowserInfo.IsSafari?'CSS1Compat':null)));};FCKTools.ArgumentsToArray=function(A,B,C){B=B||0;C=C||A.length;var D=[];for (var i=B;i<B+C&&i<A.length;i++) D.push(A[i]);return D;};FCKTools.CloneObject=function(A){var B=function() {};B.prototype=A;return new B;};FCKTools.AppendBogusBr=function(A){if (!A) return;var B=this.GetLastItem(A.getElementsByTagName('br'));if (!B||(B.getAttribute('type',2)!='_moz'&&B.getAttribute('_moz_dirty')==null)){var C=this.GetElementDocument(A);if (FCKBrowserInfo.IsOpera) A.appendChild(C.createTextNode(''));else A.appendChild(this.CreateBogusBR(C));}};FCKTools.GetLastItem=function(A){if (A.length>0) return A[A.length-1];return null;};FCKTools.GetDocumentPosition=function(w,A){var x=0;var y=0;var B=A;var C=null;var D=FCKTools.GetElementWindow(B);while (B&&!(D==w&&(B==w.document.body||B==w.document.documentElement))){x+=B.offsetLeft-B.scrollLeft;y+=B.offsetTop-B.scrollTop;if (!FCKBrowserInfo.IsOpera){var E=C;while (E&&E!=B){x-=E.scrollLeft;y-=E.scrollTop;E=E.parentNode;}};C=B;if (B.offsetParent) B=B.offsetParent;else{if (D!=w){B=D.frameElement;C=null;if (B) D=B.contentWindow.parent;}else B=null;}};if (FCKDomTools.GetCurrentElementStyle(w.document.body,'position')!='static'||(FCKBrowserInfo.IsIE&&FCKDomTools.GetPositionedAncestor(A)==null)){x+=w.document.body.offsetLeft;y+=w.document.body.offsetTop;};return { "x":x,"y":y };};FCKTools.GetWindowPosition=function(w,A){var B=this.GetDocumentPosition(w,A);var C=FCKTools.GetScrollPosition(w);B.x-=C.X;B.y-=C.Y;return B;};FCKTools.ProtectFormStyles=function(A){if (!A||A.nodeType!=1||A.tagName.toLowerCase()!='form') return [];var B=[];var C=['style','className'];for (var i=0;i<C.length;i++){var D=C[i];if (A.elements.namedItem(D)){var E=A.elements.namedItem(D);B.push([E,E.nextSibling]);A.removeChild(E);}};return B;};FCKTools.RestoreFormStyles=function(A,B){if (!A||A.nodeType!=1||A.tagName.toLowerCase()!='form') return;if (B.length>0){for (var i=B.length-1;i>=0;i--){var C=B[i][0];var D=B[i][1];if (D) A.insertBefore(C,D);else A.appendChild(C);}}};FCKTools.GetNextNode=function(A,B){if (A.firstChild) return A.firstChild;else if (A.nextSibling) return A.nextSibling;else{var C=A.parentNode;while (C){if (C==B) return null;if (C.nextSibling) return C.nextSibling;else C=C.parentNode;}};return null;};FCKTools.GetNextTextNode=function(A,B,C){node=this.GetNextNode(A,B);if (C&&node&&C(node)) return null;while (node&&node.nodeType!=3){node=this.GetNextNode(node,B);if (C&&node&&C(node)) return null;};return node;};FCKTools.Merge=function(){var A=arguments;var o=A[0];for (var i=1;i<A.length;i++){var B=A[i];for (var p in B) o[p]=B[p];};return o;};FCKTools.IsArray=function(A){return (A instanceof Array);};FCKTools.AppendLengthProperty=function(A,B){var C=0;for (var n in A) C++;return A[B||'length']=C;};FCKTools.NormalizeCssText=function(A){var B=document.createElement('span');B.style.cssText=A;return B.style.cssText;};FCKTools.Bind=function(A,B){return function(){ return B.apply(A,arguments);};};FCKTools.GetVoidUrl=function(){if (FCK_IS_CUSTOM_DOMAIN) return "javascript: void( function(){document.open();document.write('<html><head><title></title></head><body></body></html>');document.domain = '"+FCK_RUNTIME_DOMAIN+"';document.close();}() ) ;";if (FCKBrowserInfo.IsIE){if (FCKBrowserInfo.IsIE7||!FCKBrowserInfo.IsIE6) return "";else return "javascript: '';";};return "javascript: void(0);";};FCKTools.ResetStyles=function(A){A.style.cssText='margin:0;padding:0;border:0;background-color:transparent;background-image:none;';};
FCKTools.CancelEvent=function(e){if (e) e.preventDefault();};FCKTools.DisableSelection=function(A){if (FCKBrowserInfo.IsGecko) A.style.MozUserSelect='none';else if (FCKBrowserInfo.IsSafari) A.style.KhtmlUserSelect='none';else A.style.userSelect='none';};FCKTools._AppendStyleSheet=function(A,B){var e=A.createElement('LINK');e.rel='stylesheet';e.type='text/css';e.href=B;A.getElementsByTagName("HEAD")[0].appendChild(e);return e;};FCKTools.AppendStyleString=function(A,B){if (!B) return null;var e=A.createElement("STYLE");e.appendChild(A.createTextNode(B));A.getElementsByTagName("HEAD")[0].appendChild(e);return e;};FCKTools.ClearElementAttributes=function(A){for (var i=0;i<A.attributes.length;i++){A.removeAttribute(A.attributes[i].name,0);}};FCKTools.GetAllChildrenIds=function(A){var B=[];var C=function(parent){for (var i=0;i<parent.childNodes.length;i++){var D=parent.childNodes[i].id;if (D&&D.length>0) B[B.length]=D;C(parent.childNodes[i]);}};C(A);return B;};FCKTools.RemoveOuterTags=function(e){var A=e.ownerDocument.createDocumentFragment();for (var i=0;i<e.childNodes.length;i++) A.appendChild(e.childNodes[i].cloneNode(true));e.parentNode.replaceChild(A,e);};FCKTools.CreateXmlObject=function(A){switch (A){case 'XmlHttp':return new XMLHttpRequest();case 'DOMDocument':var B=(new DOMParser()).parseFromString('<tmp></tmp>','text/xml');FCKDomTools.RemoveNode(B.firstChild);return B;};return null;};FCKTools.GetScrollPosition=function(A){return { X:A.pageXOffset,Y:A.pageYOffset };};FCKTools.AddEventListener=function(A,B,C){A.addEventListener(B,C,false);};FCKTools.RemoveEventListener=function(A,B,C){A.removeEventListener(B,C,false);};FCKTools.AddEventListenerEx=function(A,B,C,D){A.addEventListener(B,function(e){C.apply(A,[e].concat(D||[]));},false);};FCKTools.GetViewPaneSize=function(A){return { Width:A.innerWidth,Height:A.innerHeight };};FCKTools.SaveStyles=function(A){var B=FCKTools.ProtectFormStyles(A);var C={};if (A.className.length>0){C.Class=A.className;A.className='';};var D=A.getAttribute('style');if (D&&D.length>0){C.Inline=D;A.setAttribute('style','',0);};FCKTools.RestoreFormStyles(A,B);return C;};FCKTools.RestoreStyles=function(A,B){var C=FCKTools.ProtectFormStyles(A);A.className=B.Class||'';if (B.Inline) A.setAttribute('style',B.Inline,0);else A.removeAttribute('style',0);FCKTools.RestoreFormStyles(A,C);};FCKTools.RegisterDollarFunction=function(A){A.$=function(id){return A.document.getElementById(id);};};FCKTools.AppendElement=function(A,B){return A.appendChild(A.ownerDocument.createElement(B));};FCKTools.GetElementPosition=function(A,B){var c={ X:0,Y:0 };var C=B||window;var D=FCKTools.GetElementWindow(A);var E=null;while (A){var F=D.getComputedStyle(A,'').position;if (F&&F!='static'&&A.style.zIndex!=FCKConfig.FloatingPanelsZIndex) break;c.X+=A.offsetLeft-A.scrollLeft;c.Y+=A.offsetTop-A.scrollTop;if (!FCKBrowserInfo.IsOpera){var G=E;while (G&&G!=A){c.X-=G.scrollLeft;c.Y-=G.scrollTop;G=G.parentNode;}};E=A;if (A.offsetParent) A=A.offsetParent;else{if (D!=C){A=D.frameElement;E=null;if (A) D=FCKTools.GetElementWindow(A);}else{c.X+=A.scrollLeft;c.Y+=A.scrollTop;break;}}};return c;};
var FCKeditorAPI;function InitializeAPI(){var A=window.parent;if (!(FCKeditorAPI=A.FCKeditorAPI)){var B='window.FCKeditorAPI = {Version : "2.6.8",VersionBuild : "25427",Instances : window.FCKeditorAPI && window.FCKeditorAPI.Instances || {},GetInstance : function( name ){return this.Instances[ name ];},_FormSubmit : function(){for ( var name in FCKeditorAPI.Instances ){var oEditor = FCKeditorAPI.Instances[ name ] ;if ( oEditor.GetParentForm && oEditor.GetParentForm() == this )oEditor.UpdateLinkedField() ;}this._FCKOriginalSubmit() ;},_FunctionQueue : window.FCKeditorAPI && window.FCKeditorAPI._FunctionQueue || {Functions : new Array(),IsRunning : false,Add : function( f ){this.Functions.push( f );if ( !this.IsRunning )this.StartNext();},StartNext : function(){var aQueue = this.Functions ;if ( aQueue.length > 0 ){this.IsRunning = true;aQueue[0].call();}else this.IsRunning = false;},Remove : function( f ){var aQueue = this.Functions;var i = 0, fFunc;while( (fFunc = aQueue[ i ]) ){if ( fFunc == f )aQueue.splice( i,1 );i++ ;}this.StartNext();}}}';if (A.execScript) A.execScript(B,'JavaScript');else{if (FCKBrowserInfo.IsGecko10){eval.call(A,B);}else if(FCKBrowserInfo.IsAIR){FCKAdobeAIR.FCKeditorAPI_Evaluate(A,B);}else if (FCKBrowserInfo.IsSafari){var C=A.document;var D=C.createElement('script');D.appendChild(C.createTextNode(B));C.documentElement.appendChild(D);}else A.eval(B);};FCKeditorAPI=A.FCKeditorAPI;FCKeditorAPI.__Instances=FCKeditorAPI.Instances;};FCKeditorAPI.Instances[FCK.Name]=FCK;};function _AttachFormSubmitToAPI(){var A=FCK.GetParentForm();if (A){FCKTools.AddEventListener(A,'submit',FCK.UpdateLinkedField);if (!A._FCKOriginalSubmit&&(typeof(A.submit)=='function'||(!A.submit.tagName&&!A.submit.length))){A._FCKOriginalSubmit=A.submit;A.submit=FCKeditorAPI._FormSubmit;}}};function FCKeditorAPI_Cleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat&&!window.FCKUnloadFlag) return;delete FCKeditorAPI.Instances[FCK.Name];};function FCKeditorAPI_ConfirmCleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat) window.FCKUnloadFlag=true;};FCKTools.AddEventListener(window,'unload',FCKeditorAPI_Cleanup);FCKTools.AddEventListener(window,'beforeunload',FCKeditorAPI_ConfirmCleanup);
var FCKeditorAPI;function InitializeAPI(){var A=window.parent;if (!(FCKeditorAPI=A.FCKeditorAPI)){var B='window.FCKeditorAPI = {Version : "2.6.10",VersionBuild : "25429",Instances : window.FCKeditorAPI && window.FCKeditorAPI.Instances || {},GetInstance : function( name ){return this.Instances[ name ];},_FormSubmit : function(){for ( var name in FCKeditorAPI.Instances ){var oEditor = FCKeditorAPI.Instances[ name ] ;if ( oEditor.GetParentForm && oEditor.GetParentForm() == this )oEditor.UpdateLinkedField() ;}this._FCKOriginalSubmit() ;},_FunctionQueue : window.FCKeditorAPI && window.FCKeditorAPI._FunctionQueue || {Functions : new Array(),IsRunning : false,Add : function( f ){this.Functions.push( f );if ( !this.IsRunning )this.StartNext();},StartNext : function(){var aQueue = this.Functions ;if ( aQueue.length > 0 ){this.IsRunning = true;aQueue[0].call();}else this.IsRunning = false;},Remove : function( f ){var aQueue = this.Functions;var i = 0, fFunc;while( (fFunc = aQueue[ i ]) ){if ( fFunc == f )aQueue.splice( i,1 );i++ ;}this.StartNext();}}}';if (A.execScript) A.execScript(B,'JavaScript');else{if (FCKBrowserInfo.IsGecko10){eval.call(A,B);}else if(FCKBrowserInfo.IsAIR){FCKAdobeAIR.FCKeditorAPI_Evaluate(A,B);}else if (FCKBrowserInfo.IsSafari){var C=A.document;var D=C.createElement('script');D.appendChild(C.createTextNode(B));C.documentElement.appendChild(D);}else A.eval(B);};FCKeditorAPI=A.FCKeditorAPI;FCKeditorAPI.__Instances=FCKeditorAPI.Instances;};FCKeditorAPI.Instances[FCK.Name]=FCK;};function _AttachFormSubmitToAPI(){var A=FCK.GetParentForm();if (A){FCKTools.AddEventListener(A,'submit',FCK.UpdateLinkedField);if (!A._FCKOriginalSubmit&&(typeof(A.submit)=='function'||(!A.submit.tagName&&!A.submit.length))){A._FCKOriginalSubmit=A.submit;A.submit=FCKeditorAPI._FormSubmit;}}};function FCKeditorAPI_Cleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat&&!window.FCKUnloadFlag) return;delete FCKeditorAPI.Instances[FCK.Name];};function FCKeditorAPI_ConfirmCleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat) window.FCKUnloadFlag=true;};FCKTools.AddEventListener(window,'unload',FCKeditorAPI_Cleanup);FCKTools.AddEventListener(window,'beforeunload',FCKeditorAPI_ConfirmCleanup);
var FCKImagePreloader=function(){this._Images=[];};FCKImagePreloader.prototype={AddImages:function(A){if (typeof(A)=='string') A=A.split(';');this._Images=this._Images.concat(A);},Start:function(){var A=this._Images;this._PreloadCount=A.length;for (var i=0;i<A.length;i++){var B=document.createElement('img');FCKTools.AddEventListenerEx(B,'load',_FCKImagePreloader_OnImage,this);FCKTools.AddEventListenerEx(B,'error',_FCKImagePreloader_OnImage,this);B.src=A[i];_FCKImagePreloader_ImageCache.push(B);}}};var _FCKImagePreloader_ImageCache=[];function _FCKImagePreloader_OnImage(A,B){if ((--B._PreloadCount)==0&&B.OnComplete) B.OnComplete();};
var FCKRegexLib={AposEntity:/'/gi,ObjectElements:/^(?:IMG|TABLE|TR|TD|TH|INPUT|SELECT|TEXTAREA|HR|OBJECT|A|UL|OL|LI)$/i,NamedCommands:/^(?:Cut|Copy|Paste|Print|SelectAll|RemoveFormat|Unlink|Undo|Redo|Bold|Italic|Underline|StrikeThrough|Subscript|Superscript|JustifyLeft|JustifyCenter|JustifyRight|JustifyFull|Outdent|Indent|InsertOrderedList|InsertUnorderedList|InsertHorizontalRule)$/i,BeforeBody:/(^[\s\S]*\<body[^\>]*\>)/i,AfterBody:/(\<\/body\>[\s\S]*$)/i,ToReplace:/___fcktoreplace:([\w]+)/ig,MetaHttpEquiv:/http-equiv\s*=\s*["']?([^"' ]+)/i,HasBaseTag:/<base /i,HasBodyTag:/<body[\s|>]/i,HtmlOpener:/<html\s?[^>]*>/i,HeadOpener:/<head\s?[^>]*>/i,HeadCloser:/<\/head\s*>/i,FCK_Class:/\s*FCK__[^ ]*(?=\s+|$)/,ElementName:/(^[a-z_:][\w.\-:]*\w$)|(^[a-z_]$)/,ForceSimpleAmpersand:/___FCKAmp___/g,SpaceNoClose:/\/>/g,EmptyParagraph:/^<(p|div|address|h\d|center)(?=[ >])[^>]*>\s*(<\/\1>)?$/,EmptyOutParagraph:/^<(p|div|address|h\d|center)(?=[ >])[^>]*>(?:\s*| | )(<\/\1>)?$/,TagBody:/></,GeckoEntitiesMarker:/#\?-\:/g,ProtectUrlsImg:/<img(?=\s).*?\ssrc=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi,ProtectUrlsA:/<a(?=\s).*?\shref=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi,ProtectUrlsArea:/<area(?=\s).*?\shref=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi,Html4DocType:/HTML 4\.0 Transitional/i,DocTypeTag:/<!DOCTYPE[^>]*>/i,HtmlDocType:/DTD HTML/,TagsWithEvent:/<[^\>]+ on\w+[\s\r\n]*=[\s\r\n]*?('|")[\s\S]+?\>/g,EventAttributes:/\s(on\w+)[\s\r\n]*=[\s\r\n]*?('|")([\s\S]*?)\2/g,ProtectedEvents:/\s\w+_fckprotectedatt="([^"]+)"/g,StyleProperties:/\S+\s*:/g,InvalidSelfCloseTags:/(<(?!base|meta|link|hr|br|param|img|area|input)([a-zA-Z0-9:]+)[^>]*)\/>/gi,StyleVariableAttName:/#\(\s*("|')(.+?)\1[^\)]*\s*\)/g,RegExp:/^\/(.*)\/([gim]*)$/,HtmlTag:/<[^\s<>](?:"[^"]*"|'[^']*'|[^<])*>/};
var FCKListsLib={BlockElements:{ address:1,blockquote:1,center:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,marquee:1,noscript:1,ol:1,p:1,pre:1,script:1,table:1,ul:1 },NonEmptyBlockElements:{ p:1,div:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,address:1,pre:1,ol:1,ul:1,li:1,td:1,th:1 },InlineChildReqElements:{ abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },InlineNonEmptyElements:{ a:1,abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },EmptyElements:{ base:1,col:1,meta:1,link:1,hr:1,br:1,param:1,img:1,area:1,input:1 },PathBlockElements:{ address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,de:1 },PathBlockLimitElements:{ body:1,div:1,td:1,th:1,caption:1,form:1 },StyleBlockElements:{ address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1 },StyleObjectElements:{ img:1,hr:1,li:1,table:1,tr:1,td:1,embed:1,object:1,ol:1,ul:1 },NonEditableElements:{ button:1,option:1,script:1,iframe:1,textarea:1,object:1,embed:1,map:1,applet:1 },BlockBoundaries:{ p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1 },ListBoundaries:{ p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1,br:1 }};
var FCKLanguageManager=FCK.Language={AvailableLanguages:{af:'Afrikaans',ar:'Arabic',bg:'Bulgarian',bn:'Bengali/Bangla',bs:'Bosnian',ca:'Catalan',cs:'Czech',da:'Danish',de:'German',el:'Greek',en:'English','en-au':'English (Australia)','en-ca':'English (Canadian)','en-uk':'English (United Kingdom)',eo:'Esperanto',es:'Spanish',et:'Estonian',eu:'Basque',fa:'Persian',fi:'Finnish',fo:'Faroese',fr:'French','fr-ca':'French (Canada)',gl:'Galician',gu:'Gujarati',he:'Hebrew',hi:'Hindi',hr:'Croatian',hu:'Hungarian',is:'Icelandic',it:'Italian',ja:'Japanese',km:'Khmer',ko:'Korean',lt:'Lithuanian',lv:'Latvian',mn:'Mongolian',ms:'Malay',nb:'Norwegian Bokmal',nl:'Dutch',no:'Norwegian',pl:'Polish',pt:'Portuguese (Portugal)','pt-br':'Portuguese (Brazil)',ro:'Romanian',ru:'Russian',sk:'Slovak',sl:'Slovenian',sr:'Serbian (Cyrillic)','sr-latn':'Serbian (Latin)',sv:'Swedish',th:'Thai',tr:'Turkish',uk:'Ukrainian',vi:'Vietnamese',zh:'Chinese Traditional','zh-cn':'Chinese Simplified'},GetActiveLanguage:function(){if (FCKConfig.AutoDetectLanguage){var A;if (navigator.userLanguage) A=navigator.userLanguage.toLowerCase();else if (navigator.language) A=navigator.language.toLowerCase();else{return FCKConfig.DefaultLanguage;};if (A.length>=5){A=A.substr(0,5);if (this.AvailableLanguages[A]) return A;};if (A.length>=2){A=A.substr(0,2);if (this.AvailableLanguages[A]) return A;}};return this.DefaultLanguage;},TranslateElements:function(A,B,C,D){var e=A.getElementsByTagName(B);var E,s;for (var i=0;i<e.length;i++){if ((E=e[i].getAttribute('fckLang'))){if ((s=FCKLang[E])){if (D) s=FCKTools.HTMLEncode(s);e[i][C]=s;}}}},TranslatePage:function(A){this.TranslateElements(A,'INPUT','value');this.TranslateElements(A,'SPAN','innerHTML');this.TranslateElements(A,'LABEL','innerHTML');this.TranslateElements(A,'OPTION','innerHTML',true);this.TranslateElements(A,'LEGEND','innerHTML');},Initialize:function(){if (this.AvailableLanguages[FCKConfig.DefaultLanguage]) this.DefaultLanguage=FCKConfig.DefaultLanguage;else this.DefaultLanguage='en';this.ActiveLanguage={};this.ActiveLanguage.Code=this.GetActiveLanguage();this.ActiveLanguage.Name=this.AvailableLanguages[this.ActiveLanguage.Code];}};
admin/includes/modules/fckeditor/editor/js/fckeditorcode_ie.jsTop ca. Zeile 34
var FCKConfig=FCK.Config={};if (document.location.protocol=='file:'){FCKConfig.BasePath=decodeURIComponent(document.location.pathname.substr(1));FCKConfig.BasePath=FCKConfig.BasePath.replace(/\\/gi,'/');var sFullProtocol=document.location.href.match(/^(file\:\/{2,3})/)[1];if (FCKBrowserInfo.IsOpera) sFullProtocol+='localhost/';FCKConfig.BasePath=sFullProtocol+FCKConfig.BasePath.substring(0,FCKConfig.BasePath.lastIndexOf('/')+1);}else FCKConfig.BasePath=document.location.protocol+'//'+document.location.host+document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')+1);FCKConfig.FullBasePath=FCKConfig.BasePath;FCKConfig.EditorPath=FCKConfig.BasePath.replace(/editor\/$/,'');try{FCKConfig.ScreenWidth=screen.width;FCKConfig.ScreenHeight=screen.height;}catch (e){FCKConfig.ScreenWidth=800;FCKConfig.ScreenHeight=600;};FCKConfig.ProcessHiddenField=function(){this.PageConfig={};var A=window.parent.document.getElementById(FCK.Name+'___Config');if (!A) return;var B=A.value.split('&');for (var i=0;i<B.length;i++){if (B[i].length==0) continue;var C=B[i].split('=');var D=decodeURIComponent(C[0]);var E=decodeURIComponent(C[1]);if (D=='CustomConfigurationsPath') FCKConfig[D]=E;else if (E.toLowerCase()=="true") this.PageConfig[D]=true;else if (E.toLowerCase()=="false") this.PageConfig[D]=false;else if (E.length>0&&!isNaN(E)) this.PageConfig[D]=parseFloat(E);else this.PageConfig[D]=E;}};function FCKConfig_LoadPageConfig(){var A=FCKConfig.PageConfig;for (var B in A) FCKConfig[B]=A[B];};function FCKConfig_PreProcess(){var A=FCKConfig;if (A.AllowQueryStringDebug){try{if ((/fckdebug=true/i).test(window.top.location.search)) A.Debug=true;}catch (e) { }};if (!A.PluginsPath.EndsWith('/')) A.PluginsPath+='/';var B=A.ToolbarComboPreviewCSS;if (!B||B.length==0) A.ToolbarComboPreviewCSS=A.EditorAreaCSS;A.RemoveAttributesArray=(A.RemoveAttributes||'').split(',');if (!FCKConfig.SkinEditorCSS||FCKConfig.SkinEditorCSS.length==0) FCKConfig.SkinEditorCSS=FCKConfig.SkinPath+'fck_editor.css';if (!FCKConfig.SkinDialogCSS||FCKConfig.SkinDialogCSS.length==0) FCKConfig.SkinDialogCSS=FCKConfig.SkinPath+'fck_dialog.css';};FCKConfig.ToolbarSets={};FCKConfig.Plugins={};FCKConfig.Plugins.Items=[];FCKConfig.Plugins.Add=function(A,B,C){FCKConfig.Plugins.Items.push([A,B,C]);};FCKConfig.ProtectedSource={};FCKConfig.ProtectedSource._CodeTag=(new Date()).valueOf();FCKConfig.ProtectedSource.RegexEntries=[/<!--[\s\S]*?-->/g,/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi];FCKConfig.ProtectedSource.Add=function(A){this.RegexEntries.push(A);};FCKConfig.ProtectedSource.Protect=function(A){var B=this._CodeTag;function _Replace(protectedSource){var C=FCKTempBin.AddElement(protectedSource);return '<!--{'+B+C+'}-->';};for (var i=0;i<this.RegexEntries.length;i++){A=A.replace(this.RegexEntries[i],_Replace);};return A;};FCKConfig.ProtectedSource.Revert=function(A,B){function _Replace(m,opener,index){var C=B?FCKTempBin.RemoveElement(index):FCKTempBin.Elements[index];return FCKConfig.ProtectedSource.Revert(C,B);};var D=new RegExp("(<|<)!--\\{"+this._CodeTag+"(\\d+)\\}--(>|>)","g");return A.replace(D,_Replace);};FCKConfig.GetBodyAttributes=function(){var A='';if (this.BodyId&&this.BodyId.length>0) A+=' id="'+this.BodyId+'"';if (this.BodyClass&&this.BodyClass.length>0) A+=' class="'+this.BodyClass+'"';return A;};FCKConfig.ApplyBodyAttributes=function(A){if (this.BodyId&&this.BodyId.length>0) A.id=FCKConfig.BodyId;if (this.BodyClass&&this.BodyClass.length>0) A.className+=' '+FCKConfig.BodyClass;};
var FCKDebug={Output:function(){},OutputObject:function(){}};
var FCKDomTools={MoveChildren:function(A,B,C){if (A==B) return;var D;if (C){while ((D=A.lastChild)) B.insertBefore(A.removeChild(D),B.firstChild);}else{while ((D=A.firstChild)) B.appendChild(A.removeChild(D));}},MoveNode:function(A,B,C){if (C) B.insertBefore(FCKDomTools.RemoveNode(A),B.firstChild);else B.appendChild(FCKDomTools.RemoveNode(A));},TrimNode:function(A){this.LTrimNode(A);this.RTrimNode(A);},LTrimNode:function(A){var B;while ((B=A.firstChild)){if (B.nodeType==3){var C=B.nodeValue.LTrim();var D=B.nodeValue.length;if (C.length==0){A.removeChild(B);continue;}else if (C.length<D){B.splitText(D-C.length);A.removeChild(A.firstChild);}};break;}},RTrimNode:function(A){var B;while ((B=A.lastChild)){if (B.nodeType==3){var C=B.nodeValue.RTrim();var D=B.nodeValue.length;if (C.length==0){B.parentNode.removeChild(B);continue;}else if (C.length<D){B.splitText(C.length);A.lastChild.parentNode.removeChild(A.lastChild);}};break;};if (!FCKBrowserInfo.IsIE&&!FCKBrowserInfo.IsOpera){B=A.lastChild;if (B&&B.nodeType==1&&B.nodeName.toLowerCase()=='br'){B.parentNode.removeChild(B);}}},RemoveNode:function(A,B){if (B){var C;while ((C=A.firstChild)) A.parentNode.insertBefore(A.removeChild(C),A);};return A.parentNode.removeChild(A);},GetFirstChild:function(A,B){if (typeof (B)=='string') B=[B];var C=A.firstChild;while(C){if (C.nodeType==1&&C.tagName.Equals.apply(C.tagName,B)) return C;C=C.nextSibling;};return null;},GetLastChild:function(A,B){if (typeof (B)=='string') B=[B];var C=A.lastChild;while(C){if (C.nodeType==1&&(!B||C.tagName.Equals(B))) return C;C=C.previousSibling;};return null;},GetPreviousSourceElement:function(A,B,C,D){if (!A) return null;if (C&&A.nodeType==1&&A.nodeName.IEquals(C)) return null;if (A.previousSibling) A=A.previousSibling;else return this.GetPreviousSourceElement(A.parentNode,B,C,D);while (A){if (A.nodeType==1){if (C&&A.nodeName.IEquals(C)) break;if (!D||!A.nodeName.IEquals(D)) return A;}else if (B&&A.nodeType==3&&A.nodeValue.RTrim().length>0) break;if (A.lastChild) A=A.lastChild;else return this.GetPreviousSourceElement(A,B,C,D);};return null;},GetNextSourceElement:function(A,B,C,D,E){while((A=this.GetNextSourceNode(A,E))){if (A.nodeType==1){if (C&&A.nodeName.IEquals(C)) break;if (D&&A.nodeName.IEquals(D)) return this.GetNextSourceElement(A,B,C,D);return A;}else if (B&&A.nodeType==3&&A.nodeValue.RTrim().length>0) break;};return null;},GetNextSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.firstChild) E=A.firstChild;else{if (D&&A==D) return null;E=A.nextSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetNextSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetNextSourceNode(E,false,C,D);return E;},GetPreviousSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.lastChild) E=A.lastChild;else{if (D&&A==D) return null;E=A.previousSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetPreviousSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetPreviousSourceNode(E,false,C,D);return E;},InsertAfterNode:function(A,B){return A.parentNode.insertBefore(B,A.nextSibling);},GetParents:function(A){var B=[];while (A){B.unshift(A);A=A.parentNode;};return B;},GetCommonParents:function(A,B){var C=this.GetParents(A);var D=this.GetParents(B);var E=[];for (var i=0;i<C.length;i++){if (C[i]==D[i]) E.push(C[i]);};return E;},GetCommonParentNode:function(A,B,C){var D={};if (!C.pop) C=[C];while (C.length>0) D[C.pop().toLowerCase()]=1;var E=this.GetCommonParents(A,B);var F=null;while ((F=E.pop())){if (D[F.nodeName.toLowerCase()]) return F;};return null;},GetIndexOf:function(A){var B=A.parentNode?A.parentNode.firstChild:null;var C=-1;while (B){C++;if (B==A) return C;B=B.nextSibling;};return-1;},PaddingNode:null,EnforcePaddingNode:function(A,B){try{if (!A||!A.body) return;}catch (e){return;};this.CheckAndRemovePaddingNode(A,B,true);try{if (A.body.lastChild&&(A.body.lastChild.nodeType!=1||A.body.lastChild.tagName.toLowerCase()==B.toLowerCase())) return;}catch (e){return;};var C=A.createElement(B);if (FCKBrowserInfo.IsGecko&&FCKListsLib.NonEmptyBlockElements[B]) FCKTools.AppendBogusBr(C);this.PaddingNode=C;if (A.body.childNodes.length==1&&A.body.firstChild.nodeType==1&&A.body.firstChild.tagName.toLowerCase()=='br'&&(A.body.firstChild.getAttribute('_moz_dirty')!=null||A.body.firstChild.getAttribute('type')=='_moz')) A.body.replaceChild(C,A.body.firstChild);else A.body.appendChild(C);},CheckAndRemovePaddingNode:function(A,B,C){var D=this.PaddingNode;if (!D) return;try{if (D.parentNode!=A.body||D.tagName.toLowerCase()!=B||(D.childNodes.length>1)||(D.firstChild&&D.firstChild.nodeValue!='\xa0'&&String(D.firstChild.tagName).toLowerCase()!='br')){this.PaddingNode=null;return;}}catch (e){this.PaddingNode=null;return;};if (!C){if (D.parentNode.childNodes.length>1) D.parentNode.removeChild(D);this.PaddingNode=null;}},HasAttribute:function(A,B){if (A.hasAttribute) return A.hasAttribute(B);else{var C=A.attributes[B];return (C!=undefined&&C.specified);}},HasAttributes:function(A){var B=A.attributes;for (var i=0;i<B.length;i++){if (FCKBrowserInfo.IsIE){var C=B[i].nodeName;if (C.StartsWith('_fck')){continue;};if (C=='class'){if (A.className.length>0) return true;continue;}};if (B[i].specified) return true;};return false;},RemoveAttribute:function(A,B){if (FCKBrowserInfo.IsIE&&B.toLowerCase()=='class') B='className';return A.removeAttribute(B,0);},RemoveAttributes:function (A,B){for (var i=0;i<B.length;i++) this.RemoveAttribute(A,B[i]);},GetAttributeValue:function(A,B){var C=B;if (typeof B=='string') B=A.attributes[B];else C=B.nodeName;if (B&&B.specified){if (C=='style') return A.style.cssText;else if (C=='class'||C.indexOf('on')==0) return B.nodeValue;else{return A.getAttribute(C,2);}};return null;},Contains:function(A,B){if (A.contains&&B.nodeType==1) return A.contains(B);while ((B=B.parentNode)){if (B==A) return true;};return false;},BreakParent:function(A,B,C){var D=C||new FCKDomRange(FCKTools.GetElementWindow(A));D.SetStart(A,4);D.SetEnd(B,4);var E=D.ExtractContents();D.InsertNode(A.parentNode.removeChild(A));E.InsertAfterNode(A);D.Release(!!C);},GetNodeAddress:function(A,B){var C=[];while (A&&A!=FCKTools.GetElementDocument(A).documentElement){var D=A.parentNode;var E=-1;for(var i=0;i<D.childNodes.length;i++){var F=D.childNodes[i];if (B===true&&F.nodeType==3&&F.previousSibling&&F.previousSibling.nodeType==3) continue;E++;if (D.childNodes[i]==A) break;};C.unshift(E);A=A.parentNode;};return C;},GetNodeFromAddress:function(A,B,C){var D=A.documentElement;for (var i=0;i<B.length;i++){var E=B[i];if (!C){D=D.childNodes[E];continue;};var F=-1;for (var j=0;j<D.childNodes.length;j++){var G=D.childNodes[j];if (C===true&&G.nodeType==3&&G.previousSibling&&G.previousSibling.nodeType==3) continue;F++;if (F==E){D=G;break;}}};return D;},CloneElement:function(A){A=A.cloneNode(false);A.removeAttribute('id',false);return A;},ClearElementJSProperty:function(A,B){if (FCKBrowserInfo.IsIE) A.removeAttribute(B);else delete A[B];},SetElementMarker:function (A,B,C,D){var E=String(parseInt(Math.random()*0xffffffff,10));B._FCKMarkerId=E;B[C]=D;if (!A[E]) A[E]={ 'element':B,'markers':{} };A[E]['markers'][C]=D;},ClearElementMarkers:function(A,B,C){var D=B._FCKMarkerId;if (!D) return;this.ClearElementJSProperty(B,'_FCKMarkerId');for (var j in A[D]['markers']) this.ClearElementJSProperty(B,j);if (C) delete A[D];},ClearAllMarkers:function(A){for (var i in A) this.ClearElementMarkers(A,A[i]['element'],true);},ListToArray:function(A,B,C,D,E){if (!A.nodeName.IEquals(['ul','ol'])) return [];if (!D) D=0;if (!C) C=[];for (var i=0;i<A.childNodes.length;i++){var F=A.childNodes[i];if (!F.nodeName.IEquals('li')) continue;var G={ 'parent':A,'indent':D,'contents':[] };if (!E){G.grandparent=A.parentNode;if (G.grandparent&&G.grandparent.nodeName.IEquals('li')) G.grandparent=G.grandparent.parentNode;}else G.grandparent=E;if (B) this.SetElementMarker(B,F,'_FCK_ListArray_Index',C.length);C.push(G);for (var j=0;j<F.childNodes.length;j++){var H=F.childNodes[j];if (H.nodeName.IEquals(['ul','ol'])) this.ListToArray(H,B,C,D+1,G.grandparent);else G.contents.push(H);}};return C;},ArrayToList:function(A,B,C){if (C==undefined) C=0;if (!A||A.length<C+1) return null;var D=FCKTools.GetElementDocument(A[C].parent);var E=D.createDocumentFragment();var F=null;var G=C;var H=Math.max(A[C].indent,0);var I=null;while (true){var J=A[G];if (J.indent==H){if (!F||A[G].parent.nodeName!=F.nodeName){F=A[G].parent.cloneNode(false);E.appendChild(F);};I=D.createElement('li');F.appendChild(I);for (var i=0;i<J.contents.length;i++) I.appendChild(J.contents[i].cloneNode(true));G++;}else if (J.indent==Math.max(H,0)+1){var K=this.ArrayToList(A,null,G);I.appendChild(K.listNode);G=K.nextIndex;}else if (J.indent==-1&&C==0&&J.grandparent){var I;if (J.grandparent.nodeName.IEquals(['ul','ol'])) I=D.createElement('li');else{if (FCKConfig.EnterMode.IEquals(['div','p'])&&!J.grandparent.nodeName.IEquals('td')) I=D.createElement(FCKConfig.EnterMode);else I=D.createDocumentFragment();};for (var i=0;i<J.contents.length;i++) I.appendChild(J.contents[i].cloneNode(true));if (I.nodeType==11){if (I.lastChild&&I.lastChild.getAttribute&&I.lastChild.getAttribute('type')=='_moz') I.removeChild(I.lastChild);I.appendChild(D.createElement('br'));};if (I.nodeName.IEquals(FCKConfig.EnterMode)&&I.firstChild){this.TrimNode(I);if (FCKListsLib.BlockBoundaries[I.firstChild.nodeName.toLowerCase()]){var M=D.createDocumentFragment();while (I.firstChild) M.appendChild(I.removeChild(I.firstChild));I=M;}};if (FCKBrowserInfo.IsGeckoLike&&I.nodeName.IEquals(['div','p'])) FCKTools.AppendBogusBr(I);E.appendChild(I);F=null;G++;}else return null;if (A.length<=G||Math.max(A[G].indent,0)<H){break;}};if (B){var N=E.firstChild;while (N){if (N.nodeType==1) this.ClearElementMarkers(B,N);N=this.GetNextSourceNode(N);}};return { 'listNode':E,'nextIndex':G };},GetNextSibling:function(A,B){A=A.nextSibling;while (A&&!B&&A.nodeType!=1&&(A.nodeType!=3||A.nodeValue.length==0)) A=A.nextSibling;return A;},GetPreviousSibling:function(A,B){A=A.previousSibling;while (A&&!B&&A.nodeType!=1&&(A.nodeType!=3||A.nodeValue.length==0)) A=A.previousSibling;return A;},CheckIsEmptyElement:function(A,B){var C=A.firstChild;var D;while (C){if (C.nodeType==1){if (D||!FCKListsLib.InlineNonEmptyElements[C.nodeName.toLowerCase()]) return false;if (!B||B(C)===true) D=C;}else if (C.nodeType==3&&C.nodeValue.length>0) return false;C=C.nextSibling;};return D?this.CheckIsEmptyElement(D,B):true;},SetElementStyles:function(A,B){var C=A.style;for (var D in B) C[D]=B[D];},SetOpacity:function(A,B){if (FCKBrowserInfo.IsIE){B=Math.round(B*100);A.style.filter=(B>100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+B+')');}else A.style.opacity=B;},GetCurrentElementStyle:function(A,B){if (FCKBrowserInfo.IsIE) return A.currentStyle[B];else return A.ownerDocument.defaultView.getComputedStyle(A,'').getPropertyValue(B);},GetPositionedAncestor:function(A){var B=A;while (B!=FCKTools.GetElementDocument(B).documentElement){if (this.GetCurrentElementStyle(B,'position')!='static') return B;if (B==FCKTools.GetElementDocument(B).documentElement&¤tWindow!=w) B=currentWindow.frameElement;else B=B.parentNode;};return null;},ScrollIntoView:function(A,B){var C=FCKTools.GetElementWindow(A);var D=FCKTools.GetViewPaneSize(C).Height;var E=D*-1;if (B===false){E+=A.offsetHeight||0;E+=parseInt(this.GetCurrentElementStyle(A,'marginBottom')||0,10)||0;};var F=FCKTools.GetDocumentPosition(C,A);E+=F.y;var G=FCKTools.GetScrollPosition(C).Y;if (E>0&&(E>G||E<G-D)) C.scrollTo(0,E);},CheckIsEditable:function(A){var B=A.nodeName.toLowerCase();var C=FCK.DTD[B]||FCK.DTD.span;return (C['#']&&!FCKListsLib.NonEditableElements[B]);},GetSelectedDivContainers:function(){var A=[];var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.GetTouchedStartNode();var D=B.GetTouchedEndNode();var E=C;if (C==D){while (D.nodeType==1&&D.lastChild) D=D.lastChild;D=FCKDomTools.GetNextSourceNode(D);}while (E&&E!=D){if (E.nodeType!=3||!/^[ \t\n]*$/.test(E.nodeValue)){var F=new FCKElementPath(E);var G=F.BlockLimit;if (G&&G.nodeName.IEquals('div')&&A.IndexOf(G)==-1) A.push(G);};E=FCKDomTools.GetNextSourceNode(E);};return A;}};
var FCKTools={};FCKTools.CreateBogusBR=function(A){var B=A.createElement('br');B.setAttribute('type','_moz');return B;};FCKTools.FixCssUrls=function(A,B){if (!A||A.length==0) return B;return B.replace(/url\s*\(([\s'"]*)(.*?)([\s"']*)\)/g,function(match,opener,path,closer){if (/^\/|^\w?:/.test(path)) return match;else return 'url('+opener+A+path+closer+')';});};FCKTools._GetUrlFixedCss=function(A,B){var C=A.match(/^([^|]+)\|([\s\S]*)/);if (C) return FCKTools.FixCssUrls(C[1],C[2]);else return A;};FCKTools.AppendStyleSheet=function(A,B){if (!B) return [];if (typeof(B)=='string'){if (/[\\\/\.][^{}]*$/.test(B)){return this.AppendStyleSheet(A,B.split(','));}else return [this.AppendStyleString(A,FCKTools._GetUrlFixedCss(B))];}else{var C=[];for (var i=0;i<B.length;i++) C.push(this._AppendStyleSheet(A,B[i]));return C;}};FCKTools.GetStyleHtml=(function(){var A=function(styleDef,markTemp){if (styleDef.length==0) return '';var B=markTemp?' _fcktemp="true"':'';return '<style type="text/css"'+B+'>'+styleDef+'</style>';};var C=function(cssFileUrl,markTemp){if (cssFileUrl.length==0) return '';var B=markTemp?' _fcktemp="true"':'';return '<link href="'+cssFileUrl+'" type="text/css" rel="stylesheet" '+B+'/>';};return function(cssFileOrArrayOrDef,markTemp){if (!cssFileOrArrayOrDef) return '';if (typeof(cssFileOrArrayOrDef)=='string'){if (/[\\\/\.][^{}]*$/.test(cssFileOrArrayOrDef)){return this.GetStyleHtml(cssFileOrArrayOrDef.split(','),markTemp);}else return A(this._GetUrlFixedCss(cssFileOrArrayOrDef),markTemp);}else{var E='';for (var i=0;i<cssFileOrArrayOrDef.length;i++) E+=C(cssFileOrArrayOrDef[i],markTemp);return E;}}})();FCKTools.GetElementDocument=function (A){return A.ownerDocument||A.document;};FCKTools.GetElementWindow=function(A){return this.GetDocumentWindow(this.GetElementDocument(A));};FCKTools.GetDocumentWindow=function(A){if (FCKBrowserInfo.IsSafari&&!A.parentWindow) this.FixDocumentParentWindow(window.top);return A.parentWindow||A.defaultView;};FCKTools.FixDocumentParentWindow=function(A){if (A.document) A.document.parentWindow=A;for (var i=0;i<A.frames.length;i++) FCKTools.FixDocumentParentWindow(A.frames[i]);};FCKTools.HTMLEncode=function(A){if (!A) return '';A=A.replace(/&/g,'&');A=A.replace(/</g,'<');A=A.replace(/>/g,'>');return A;};FCKTools.HTMLDecode=function(A){if (!A) return '';A=A.replace(/>/g,'>');A=A.replace(/</g,'<');A=A.replace(/&/g,'&');return A;};FCKTools._ProcessLineBreaksForPMode=function(A,B,C,D,E){var F=0;var G="<p>";var H="</p>";var I="<br />";if (C){G="<li>";H="</li>";F=1;}while (D&&D!=A.FCK.EditorDocument.body){if (D.tagName.toLowerCase()=='p'){F=1;break;};D=D.parentNode;};for (var i=0;i<B.length;i++){var c=B.charAt(i);if (c=='\r') continue;if (c!='\n'){E.push(c);continue;};var n=B.charAt(i+1);if (n=='\r'){i++;n=B.charAt(i+1);};if (n=='\n'){i++;if (F) E.push(H);E.push(G);F=1;}else E.push(I);}};FCKTools._ProcessLineBreaksForDivMode=function(A,B,C,D,E){var F=0;var G="<div>";var H="</div>";if (C){G="<li>";H="</li>";F=1;}while (D&&D!=A.FCK.EditorDocument.body){if (D.tagName.toLowerCase()=='div'){F=1;break;};D=D.parentNode;};for (var i=0;i<B.length;i++){var c=B.charAt(i);if (c=='\r') continue;if (c!='\n'){E.push(c);continue;};if (F){if (E[E.length-1]==G){E.push(" ");};E.push(H);};E.push(G);F=1;};if (F) E.push(H);};FCKTools._ProcessLineBreaksForBrMode=function(A,B,C,D,E){var F=0;var G="<br />";var H="";if (C){G="<li>";H="</li>";F=1;};for (var i=0;i<B.length;i++){var c=B.charAt(i);if (c=='\r') continue;if (c!='\n'){E.push(c);continue;};if (F&&H.length) E.push (H);E.push(G);F=1;}};FCKTools.ProcessLineBreaks=function(A,B,C){var D=B.EnterMode.toLowerCase();var E=[];var F=0;var G=new A.FCKDomRange(A.FCK.EditorWindow);G.MoveToSelection();var H=G._Range.startContainer;while (H&&H.nodeType!=1) H=H.parentNode;if (H&&H.tagName.toLowerCase()=='li') F=1;if (D=='p') this._ProcessLineBreaksForPMode(A,C,F,H,E);else if (D=='div') this._ProcessLineBreaksForDivMode(A,C,F,H,E);else if (D=='br') this._ProcessLineBreaksForBrMode(A,C,F,H,E);return E.join("");};FCKTools.AddSelectOption=function(A,B,C){var D=FCKTools.GetElementDocument(A).createElement("OPTION");D.text=B;D.value=C;A.options.add(D);return D;};FCKTools.RunFunction=function(A,B,C,D){if (A) this.SetTimeout(A,0,B,C,D);};FCKTools.SetTimeout=function(A,B,C,D,E){return (E||window).setTimeout(function(){if (D) A.apply(C,[].concat(D));else A.apply(C);},B);};FCKTools.SetInterval=function(A,B,C,D,E){return (E||window).setInterval(function(){A.apply(C,D||[]);},B);};FCKTools.ConvertStyleSizeToHtml=function(A){return A.EndsWith('%')?A:parseInt(A,10);};FCKTools.ConvertHtmlSizeToStyle=function(A){return A.EndsWith('%')?A:(A+'px');};FCKTools.GetElementAscensor=function(A,B){var e=A;var C=","+B.toUpperCase()+",";while (e){if (C.indexOf(","+e.nodeName.toUpperCase()+",")!=-1) return e;e=e.parentNode;};return null;};FCKTools.CreateEventListener=function(A,B){var f=function(){var C=[];for (var i=0;i<arguments.length;i++) C.push(arguments[i]);A.apply(this,C.concat(B));};return f;};FCKTools.IsStrictMode=function(A){return ('CSS1Compat'==(A.compatMode||(FCKBrowserInfo.IsSafari?'CSS1Compat':null)));};FCKTools.ArgumentsToArray=function(A,B,C){B=B||0;C=C||A.length;var D=[];for (var i=B;i<B+C&&i<A.length;i++) D.push(A[i]);return D;};FCKTools.CloneObject=function(A){var B=function() {};B.prototype=A;return new B;};FCKTools.AppendBogusBr=function(A){if (!A) return;var B=this.GetLastItem(A.getElementsByTagName('br'));if (!B||(B.getAttribute('type',2)!='_moz'&&B.getAttribute('_moz_dirty')==null)){var C=this.GetElementDocument(A);if (FCKBrowserInfo.IsOpera) A.appendChild(C.createTextNode(''));else A.appendChild(this.CreateBogusBR(C));}};FCKTools.GetLastItem=function(A){if (A.length>0) return A[A.length-1];return null;};FCKTools.GetDocumentPosition=function(w,A){var x=0;var y=0;var B=A;var C=null;var D=FCKTools.GetElementWindow(B);while (B&&!(D==w&&(B==w.document.body||B==w.document.documentElement))){x+=B.offsetLeft-B.scrollLeft;y+=B.offsetTop-B.scrollTop;if (!FCKBrowserInfo.IsOpera){var E=C;while (E&&E!=B){x-=E.scrollLeft;y-=E.scrollTop;E=E.parentNode;}};C=B;if (B.offsetParent) B=B.offsetParent;else{if (D!=w){B=D.frameElement;C=null;if (B) D=B.contentWindow.parent;}else B=null;}};if (FCKDomTools.GetCurrentElementStyle(w.document.body,'position')!='static'||(FCKBrowserInfo.IsIE&&FCKDomTools.GetPositionedAncestor(A)==null)){x+=w.document.body.offsetLeft;y+=w.document.body.offsetTop;};return { "x":x,"y":y };};FCKTools.GetWindowPosition=function(w,A){var B=this.GetDocumentPosition(w,A);var C=FCKTools.GetScrollPosition(w);B.x-=C.X;B.y-=C.Y;return B;};FCKTools.ProtectFormStyles=function(A){if (!A||A.nodeType!=1||A.tagName.toLowerCase()!='form') return [];var B=[];var C=['style','className'];for (var i=0;i<C.length;i++){var D=C[i];if (A.elements.namedItem(D)){var E=A.elements.namedItem(D);B.push([E,E.nextSibling]);A.removeChild(E);}};return B;};FCKTools.RestoreFormStyles=function(A,B){if (!A||A.nodeType!=1||A.tagName.toLowerCase()!='form') return;if (B.length>0){for (var i=B.length-1;i>=0;i--){var C=B[i][0];var D=B[i][1];if (D) A.insertBefore(C,D);else A.appendChild(C);}}};FCKTools.GetNextNode=function(A,B){if (A.firstChild) return A.firstChild;else if (A.nextSibling) return A.nextSibling;else{var C=A.parentNode;while (C){if (C==B) return null;if (C.nextSibling) return C.nextSibling;else C=C.parentNode;}};return null;};FCKTools.GetNextTextNode=function(A,B,C){node=this.GetNextNode(A,B);if (C&&node&&C(node)) return null;while (node&&node.nodeType!=3){node=this.GetNextNode(node,B);if (C&&node&&C(node)) return null;};return node;};FCKTools.Merge=function(){var A=arguments;var o=A[0];for (var i=1;i<A.length;i++){var B=A[i];for (var p in B) o[p]=B[p];};return o;};FCKTools.IsArray=function(A){return (A instanceof Array);};FCKTools.AppendLengthProperty=function(A,B){var C=0;for (var n in A) C++;return A[B||'length']=C;};FCKTools.NormalizeCssText=function(A){var B=document.createElement('span');B.style.cssText=A;return B.style.cssText;};FCKTools.Bind=function(A,B){return function(){ return B.apply(A,arguments);};};FCKTools.GetVoidUrl=function(){if (FCK_IS_CUSTOM_DOMAIN) return "javascript: void( function(){document.open();document.write('<html><head><title></title></head><body></body></html>');document.domain = '"+FCK_RUNTIME_DOMAIN+"';document.close();}() ) ;";if (FCKBrowserInfo.IsIE){if (FCKBrowserInfo.IsIE7||!FCKBrowserInfo.IsIE6) return "";else return "javascript: '';";};return "javascript: void(0);";};FCKTools.ResetStyles=function(A){A.style.cssText='margin:0;padding:0;border:0;background-color:transparent;background-image:none;';};
FCKTools.CancelEvent=function(e){return false;};FCKTools._AppendStyleSheet=function(A,B){return A.createStyleSheet(B).owningElement;};FCKTools.AppendStyleString=function(A,B){if (!B) return null;var s=A.createStyleSheet("");s.cssText=B;return s;};FCKTools.ClearElementAttributes=function(A){A.clearAttributes();};FCKTools.GetAllChildrenIds=function(A){var B=[];for (var i=0;i<A.all.length;i++){var C=A.all[i].id;if (C&&C.length>0) B[B.length]=C;};return B;};FCKTools.RemoveOuterTags=function(e){e.insertAdjacentHTML('beforeBegin',e.innerHTML);e.parentNode.removeChild(e);};FCKTools.CreateXmlObject=function(A){var B;switch (A){case 'XmlHttp':if (document.location.protocol!='file:') try { return new XMLHttpRequest();} catch (e) {};B=['MSXML2.XmlHttp','Microsoft.XmlHttp'];break;case 'DOMDocument':B=['MSXML2.DOMDocument','Microsoft.XmlDom'];break;};for (var i=0;i<2;i++){try { return new ActiveXObject(B[i]);}catch (e){}};if (FCKLang.NoActiveX){alert(FCKLang.NoActiveX);FCKLang.NoActiveX=null;};return null;};FCKTools.DisableSelection=function(A){A.unselectable='on';var e,i=0;while ((e=A.all[i++])){switch (e.tagName){case 'IFRAME':case 'TEXTAREA':case 'INPUT':case 'SELECT':break;default:e.unselectable='on';}}};FCKTools.GetScrollPosition=function(A){var B=A.document;var C={ X:B.documentElement.scrollLeft,Y:B.documentElement.scrollTop };if (C.X>0||C.Y>0) return C;return { X:B.body.scrollLeft,Y:B.body.scrollTop };};FCKTools.AddEventListener=function(A,B,C){A.attachEvent('on'+B,C);};FCKTools.RemoveEventListener=function(A,B,C){A.detachEvent('on'+B,C);};FCKTools.AddEventListenerEx=function(A,B,C,D){var o={};o.Source=A;o.Params=D||[];o.Listener=function(ev){return C.apply(o.Source,[ev].concat(o.Params));};if (FCK.IECleanup) FCK.IECleanup.AddItem(null,function() { o.Source=null;o.Params=null;});A.attachEvent('on'+B,o.Listener);A=null;D=null;};FCKTools.GetViewPaneSize=function(A){var B;var C=A.document.documentElement;if (C&&C.clientWidth) B=C;else B=A.document.body;if (B) return { Width:B.clientWidth,Height:B.clientHeight };else return { Width:0,Height:0 };};FCKTools.SaveStyles=function(A){var B=FCKTools.ProtectFormStyles(A);var C={};if (A.className.length>0){C.Class=A.className;A.className='';};var D=A.style.cssText;if (D.length>0){C.Inline=D;A.style.cssText='';};FCKTools.RestoreFormStyles(A,B);return C;};FCKTools.RestoreStyles=function(A,B){var C=FCKTools.ProtectFormStyles(A);A.className=B.Class||'';A.style.cssText=B.Inline||'';FCKTools.RestoreFormStyles(A,C);};FCKTools.RegisterDollarFunction=function(A){A.$=A.document.getElementById;};FCKTools.AppendElement=function(A,B){return A.appendChild(this.GetElementDocument(A).createElement(B));};FCKTools.ToLowerCase=function(A){return A.toLowerCase();};
var FCKeditorAPI;function InitializeAPI(){var A=window.parent;if (!(FCKeditorAPI=A.FCKeditorAPI)){var B='window.FCKeditorAPI = {Version : "2.6.8",VersionBuild : "25427",Instances : window.FCKeditorAPI && window.FCKeditorAPI.Instances || {},GetInstance : function( name ){return this.Instances[ name ];},_FormSubmit : function(){for ( var name in FCKeditorAPI.Instances ){var oEditor = FCKeditorAPI.Instances[ name ] ;if ( oEditor.GetParentForm && oEditor.GetParentForm() == this )oEditor.UpdateLinkedField() ;}this._FCKOriginalSubmit() ;},_FunctionQueue : window.FCKeditorAPI && window.FCKeditorAPI._FunctionQueue || {Functions : new Array(),IsRunning : false,Add : function( f ){this.Functions.push( f );if ( !this.IsRunning )this.StartNext();},StartNext : function(){var aQueue = this.Functions ;if ( aQueue.length > 0 ){this.IsRunning = true;aQueue[0].call();}else this.IsRunning = false;},Remove : function( f ){var aQueue = this.Functions;var i = 0, fFunc;while( (fFunc = aQueue[ i ]) ){if ( fFunc == f )aQueue.splice( i,1 );i++ ;}this.StartNext();}}}';if (A.execScript) A.execScript(B,'JavaScript');else{if (FCKBrowserInfo.IsGecko10){eval.call(A,B);}else if(FCKBrowserInfo.IsAIR){FCKAdobeAIR.FCKeditorAPI_Evaluate(A,B);}else if (FCKBrowserInfo.IsSafari){var C=A.document;var D=C.createElement('script');D.appendChild(C.createTextNode(B));C.documentElement.appendChild(D);}else A.eval(B);};FCKeditorAPI=A.FCKeditorAPI;FCKeditorAPI.__Instances=FCKeditorAPI.Instances;};FCKeditorAPI.Instances[FCK.Name]=FCK;};function _AttachFormSubmitToAPI(){var A=FCK.GetParentForm();if (A){FCKTools.AddEventListener(A,'submit',FCK.UpdateLinkedField);if (!A._FCKOriginalSubmit&&(typeof(A.submit)=='function'||(!A.submit.tagName&&!A.submit.length))){A._FCKOriginalSubmit=A.submit;A.submit=FCKeditorAPI._FormSubmit;}}};function FCKeditorAPI_Cleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat&&!window.FCKUnloadFlag) return;delete FCKeditorAPI.Instances[FCK.Name];};function FCKeditorAPI_ConfirmCleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat) window.FCKUnloadFlag=true;};FCKTools.AddEventListener(window,'unload',FCKeditorAPI_Cleanup);FCKTools.AddEventListener(window,'beforeunload',FCKeditorAPI_ConfirmCleanup);
FCKTools.CancelEvent=function(e){return false;};FCKTools._AppendStyleSheet=function(A,B){return A.createStyleSheet(B).owningElement;};FCKTools.AppendStyleString=function(A,B){if (!B) return null;var s=A.createStyleSheet("");s.cssText=B;return s;};FCKTools.ClearElementAttributes=function(A){A.clearAttributes();};FCKTools.GetAllChildrenIds=function(A){var B=[];for (var i=0;i<A.all.length;i++){var C=A.all[i].id;if (C&&C.length>0) B[B.length]=C;};return B;};FCKTools.RemoveOuterTags=function(e){e.insertAdjacentHTML('beforeBegin',e.innerHTML);e.parentNode.removeChild(e);};FCKTools.CreateXmlObject=function(A){var B;switch (A){case 'XmlHttp':if (document.location.protocol!='file:') try { return new XMLHttpRequest();} catch (e) {};B=['MSXML2.XmlHttp','Microsoft.XmlHttp'];break;case 'DOMDocument':B=['MSXML2.DOMDocument','Microsoft.XmlDom'];break;};for (var i=0;i<2;i++){try { return new ActiveXObject(B[i]);}catch (e){}};if (FCKLang.NoActiveX){alert(FCKLang.NoActiveX);FCKLang.NoActiveX=null;};return null;};FCKTools.DisableSelection=function(A){A.unselectable='on';var e,i=0;while ((e=A.all[i++])){switch (e.tagName){case 'IFRAME':case 'TEXTAREA':case 'INPUT':case 'SELECT':break;default:e.unselectable='on';}}};FCKTools.GetScrollPosition=function(A){var B=A.document;var C={ X:B.documentElement.scrollLeft,Y:B.documentElement.scrollTop };if (C.X>0||C.Y>0) return C;return { X:B.body.scrollLeft,Y:B.body.scrollTop };};FCKTools.AddEventListener=function(A,B,C){A.attachEvent('on'+B,C);};FCKTools.RemoveEventListener=function(A,B,C){A.detachEvent('on'+B,C);};FCKTools.AddEventListenerEx=function(A,B,C,D){var o={};o.Source=A;o.Params=D||[];o.Listener=function(ev){return C.apply(o.Source,[ev].concat(o.Params));};if (FCK.IECleanup) FCK.IECleanup.AddItem(null,function() { o.Source=null;o.Params=null;});A.attachEvent('on'+B,o.Listener);A=null;D=null;};FCKTools.GetViewPaneSize=function(A){var B;var C=A.document.documentElement;if (C&&C.clientWidth) B=C;else B=A.document.body;if (B) return { Width:B.clientWidth,Height:B.clientHeight };else return { Width:0,Height:0 };};FCKTools.SaveStyles=function(A){var B=FCKTools.ProtectFormStyles(A);var C={};if (A.className.length>0){C.Class=A.className;A.className='';};var D=A.style.cssText;if (D.length>0){C.Inline=D;A.style.cssText='';};FCKTools.RestoreFormStyles(A,B);return C;};FCKTools.RestoreStyles=function(A,B){var C=FCKTools.ProtectFormStyles(A);A.className=B.Class||'';A.style.cssText=B.Inline||'';FCKTools.RestoreFormStyles(A,C);};FCKTools.RegisterDollarFunction=function(targetWindow){targetWindow.$=function(id){return targetWindow.document.getElementById(id);};};FCKTools.AppendElement=function(A,B){return A.appendChild(this.GetElementDocument(A).createElement(B));};FCKTools.ToLowerCase=function(A){return A.toLowerCase();};
var FCKeditorAPI;function InitializeAPI(){var A=window.parent;if (!(FCKeditorAPI=A.FCKeditorAPI)){var B='window.FCKeditorAPI = {Version : "2.6.10",VersionBuild : "25429",Instances : window.FCKeditorAPI && window.FCKeditorAPI.Instances || {},GetInstance : function( name ){return this.Instances[ name ];},_FormSubmit : function(){for ( var name in FCKeditorAPI.Instances ){var oEditor = FCKeditorAPI.Instances[ name ] ;if ( oEditor.GetParentForm && oEditor.GetParentForm() == this )oEditor.UpdateLinkedField() ;}this._FCKOriginalSubmit() ;},_FunctionQueue : window.FCKeditorAPI && window.FCKeditorAPI._FunctionQueue || {Functions : new Array(),IsRunning : false,Add : function( f ){this.Functions.push( f );if ( !this.IsRunning )this.StartNext();},StartNext : function(){var aQueue = this.Functions ;if ( aQueue.length > 0 ){this.IsRunning = true;aQueue[0].call();}else this.IsRunning = false;},Remove : function( f ){var aQueue = this.Functions;var i = 0, fFunc;while( (fFunc = aQueue[ i ]) ){if ( fFunc == f )aQueue.splice( i,1 );i++ ;}this.StartNext();}}}';if (A.execScript) A.execScript(B,'JavaScript');else{if (FCKBrowserInfo.IsGecko10){eval.call(A,B);}else if(FCKBrowserInfo.IsAIR){FCKAdobeAIR.FCKeditorAPI_Evaluate(A,B);}else if (FCKBrowserInfo.IsSafari){var C=A.document;var D=C.createElement('script');D.appendChild(C.createTextNode(B));C.documentElement.appendChild(D);}else A.eval(B);};FCKeditorAPI=A.FCKeditorAPI;FCKeditorAPI.__Instances=FCKeditorAPI.Instances;};FCKeditorAPI.Instances[FCK.Name]=FCK;};function _AttachFormSubmitToAPI(){var A=FCK.GetParentForm();if (A){FCKTools.AddEventListener(A,'submit',FCK.UpdateLinkedField);if (!A._FCKOriginalSubmit&&(typeof(A.submit)=='function'||(!A.submit.tagName&&!A.submit.length))){A._FCKOriginalSubmit=A.submit;A.submit=FCKeditorAPI._FormSubmit;}}};function FCKeditorAPI_Cleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat&&!window.FCKUnloadFlag) return;delete FCKeditorAPI.Instances[FCK.Name];};function FCKeditorAPI_ConfirmCleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat) window.FCKUnloadFlag=true;};FCKTools.AddEventListener(window,'unload',FCKeditorAPI_Cleanup);FCKTools.AddEventListener(window,'beforeunload',FCKeditorAPI_ConfirmCleanup);
var FCKImagePreloader=function(){this._Images=[];};FCKImagePreloader.prototype={AddImages:function(A){if (typeof(A)=='string') A=A.split(';');this._Images=this._Images.concat(A);},Start:function(){var A=this._Images;this._PreloadCount=A.length;for (var i=0;i<A.length;i++){var B=document.createElement('img');FCKTools.AddEventListenerEx(B,'load',_FCKImagePreloader_OnImage,this);FCKTools.AddEventListenerEx(B,'error',_FCKImagePreloader_OnImage,this);B.src=A[i];_FCKImagePreloader_ImageCache.push(B);}}};var _FCKImagePreloader_ImageCache=[];function _FCKImagePreloader_OnImage(A,B){if ((--B._PreloadCount)==0&&B.OnComplete) B.OnComplete();};
var FCKRegexLib={AposEntity:/'/gi,ObjectElements:/^(?:IMG|TABLE|TR|TD|TH|INPUT|SELECT|TEXTAREA|HR|OBJECT|A|UL|OL|LI)$/i,NamedCommands:/^(?:Cut|Copy|Paste|Print|SelectAll|RemoveFormat|Unlink|Undo|Redo|Bold|Italic|Underline|StrikeThrough|Subscript|Superscript|JustifyLeft|JustifyCenter|JustifyRight|JustifyFull|Outdent|Indent|InsertOrderedList|InsertUnorderedList|InsertHorizontalRule)$/i,BeforeBody:/(^[\s\S]*\<body[^\>]*\>)/i,AfterBody:/(\<\/body\>[\s\S]*$)/i,ToReplace:/___fcktoreplace:([\w]+)/ig,MetaHttpEquiv:/http-equiv\s*=\s*["']?([^"' ]+)/i,HasBaseTag:/<base /i,HasBodyTag:/<body[\s|>]/i,HtmlOpener:/<html\s?[^>]*>/i,HeadOpener:/<head\s?[^>]*>/i,HeadCloser:/<\/head\s*>/i,FCK_Class:/\s*FCK__[^ ]*(?=\s+|$)/,ElementName:/(^[a-z_:][\w.\-:]*\w$)|(^[a-z_]$)/,ForceSimpleAmpersand:/___FCKAmp___/g,SpaceNoClose:/\/>/g,EmptyParagraph:/^<(p|div|address|h\d|center)(?=[ >])[^>]*>\s*(<\/\1>)?$/,EmptyOutParagraph:/^<(p|div|address|h\d|center)(?=[ >])[^>]*>(?:\s*| | )(<\/\1>)?$/,TagBody:/></,GeckoEntitiesMarker:/#\?-\:/g,ProtectUrlsImg:/<img(?=\s).*?\ssrc=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi,ProtectUrlsA:/<a(?=\s).*?\shref=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi,ProtectUrlsArea:/<area(?=\s).*?\shref=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi,Html4DocType:/HTML 4\.0 Transitional/i,DocTypeTag:/<!DOCTYPE[^>]*>/i,HtmlDocType:/DTD HTML/,TagsWithEvent:/<[^\>]+ on\w+[\s\r\n]*=[\s\r\n]*?('|")[\s\S]+?\>/g,EventAttributes:/\s(on\w+)[\s\r\n]*=[\s\r\n]*?('|")([\s\S]*?)\2/g,ProtectedEvents:/\s\w+_fckprotectedatt="([^"]+)"/g,StyleProperties:/\S+\s*:/g,InvalidSelfCloseTags:/(<(?!base|meta|link|hr|br|param|img|area|input)([a-zA-Z0-9:]+)[^>]*)\/>/gi,StyleVariableAttName:/#\(\s*("|')(.+?)\1[^\)]*\s*\)/g,RegExp:/^\/(.*)\/([gim]*)$/,HtmlTag:/<[^\s<>](?:"[^"]*"|'[^']*'|[^<])*>/};
var FCKListsLib={BlockElements:{ address:1,blockquote:1,center:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,marquee:1,noscript:1,ol:1,p:1,pre:1,script:1,table:1,ul:1 },NonEmptyBlockElements:{ p:1,div:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,address:1,pre:1,ol:1,ul:1,li:1,td:1,th:1 },InlineChildReqElements:{ abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },InlineNonEmptyElements:{ a:1,abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },EmptyElements:{ base:1,col:1,meta:1,link:1,hr:1,br:1,param:1,img:1,area:1,input:1 },PathBlockElements:{ address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,de:1 },PathBlockLimitElements:{ body:1,div:1,td:1,th:1,caption:1,form:1 },StyleBlockElements:{ address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1 },StyleObjectElements:{ img:1,hr:1,li:1,table:1,tr:1,td:1,embed:1,object:1,ol:1,ul:1 },NonEditableElements:{ button:1,option:1,script:1,iframe:1,textarea:1,object:1,embed:1,map:1,applet:1 },BlockBoundaries:{ p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1 },ListBoundaries:{ p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1,br:1 }};
var FCKLanguageManager=FCK.Language={AvailableLanguages:{af:'Afrikaans',ar:'Arabic',bg:'Bulgarian',bn:'Bengali/Bangla',bs:'Bosnian',ca:'Catalan',cs:'Czech',da:'Danish',de:'German',el:'Greek',en:'English','en-au':'English (Australia)','en-ca':'English (Canadian)','en-uk':'English (United Kingdom)',eo:'Esperanto',es:'Spanish',et:'Estonian',eu:'Basque',fa:'Persian',fi:'Finnish',fo:'Faroese',fr:'French','fr-ca':'French (Canada)',gl:'Galician',gu:'Gujarati',he:'Hebrew',hi:'Hindi',hr:'Croatian',hu:'Hungarian',is:'Icelandic',it:'Italian',ja:'Japanese',km:'Khmer',ko:'Korean',lt:'Lithuanian',lv:'Latvian',mn:'Mongolian',ms:'Malay',nb:'Norwegian Bokmal',nl:'Dutch',no:'Norwegian',pl:'Polish',pt:'Portuguese (Portugal)','pt-br':'Portuguese (Brazil)',ro:'Romanian',ru:'Russian',sk:'Slovak',sl:'Slovenian',sr:'Serbian (Cyrillic)','sr-latn':'Serbian (Latin)',sv:'Swedish',th:'Thai',tr:'Turkish',uk:'Ukrainian',vi:'Vietnamese',zh:'Chinese Traditional','zh-cn':'Chinese Simplified'},GetActiveLanguage:function(){if (FCKConfig.AutoDetectLanguage){var A;if (navigator.userLanguage) A=navigator.userLanguage.toLowerCase();else if (navigator.language) A=navigator.language.toLowerCase();else{return FCKConfig.DefaultLanguage;};if (A.length>=5){A=A.substr(0,5);if (this.AvailableLanguages[A]) return A;};if (A.length>=2){A=A.substr(0,2);if (this.AvailableLanguages[A]) return A;}};return this.DefaultLanguage;},TranslateElements:function(A,B,C,D){var e=A.getElementsByTagName(B);var E,s;for (var i=0;i<e.length;i++){if ((E=e[i].getAttribute('fckLang'))){if ((s=FCKLang[E])){if (D) s=FCKTools.HTMLEncode(s);e[i][C]=s;}}}},TranslatePage:function(A){this.TranslateElements(A,'INPUT','value');this.TranslateElements(A,'SPAN','innerHTML');this.TranslateElements(A,'LABEL','innerHTML');this.TranslateElements(A,'OPTION','innerHTML',true);this.TranslateElements(A,'LEGEND','innerHTML');},Initialize:function(){if (this.AvailableLanguages[FCKConfig.DefaultLanguage]) this.DefaultLanguage=FCKConfig.DefaultLanguage;else this.DefaultLanguage='en';this.ActiveLanguage={};this.ActiveLanguage.Code=this.GetActiveLanguage();this.ActiveLanguage.Name=this.AvailableLanguages[this.ActiveLanguage.Code];}};
ca. Zeile 51
FCK.DTD=(function(){var X=FCKTools.Merge;var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I;A={isindex:1,fieldset:1};B={input:1,button:1,select:1,textarea:1,label:1};C=X({a:1},B);D=X({iframe:1},C);E={hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1};F={ins:1,del:1,script:1};G=X({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1},F);H=X({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},G);I=X({p:1},H);J=X({iframe:1},H,B);K={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1};L=X({a:1},J);M={tr:1};N={'#':1};O=X({param:1},K);P=X({form:1},A,D,E,I);Q={li:1};return {col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:P,td:P,br:{},th:P,center:P,kbd:L,button:X(I,E),basefont:{},h5:L,h4:L,samp:L,h6:L,ol:Q,h1:L,h3:L,option:N,h2:L,form:X(A,D,E,I),select:{optgroup:1,option:1},font:J,ins:P,menu:Q,abbr:L,label:L,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:L,script:N,tfoot:M,cite:L,li:P,input:{},iframe:P,strong:J,textarea:N,noframes:P,big:J,small:J,span:J,hr:{},dt:L,sub:J,optgroup:{option:1},param:{},bdo:L,'var':J,div:P,object:O,sup:J,dd:P,strike:J,area:{},dir:Q,map:X({area:1,form:1,p:1},A,F,E),applet:O,dl:{dt:1,dd:1},del:P,isindex:{},fieldset:X({legend:1},K),thead:M,ul:Q,acronym:L,b:J,a:J,blockquote:P,caption:L,i:J,u:J,tbody:M,s:L,address:X(D,I),tt:J,legend:L,q:L,pre:X(G,C),p:L,em:J,dfn:L};})();
var FCKStyle=function(A){this.Element=(A.Element||'span').toLowerCase();this._StyleDesc=A;};FCKStyle.prototype={GetType:function(){var A=this.GetType_$;if (A!=undefined) return A;var B=this.Element;if (B=='#'||FCKListsLib.StyleBlockElements[B]) A=0;else if (FCKListsLib.StyleObjectElements[B]) A=2;else A=1;return (this.GetType_$=A);},ApplyToSelection:function(A){var B=new FCKDomRange(A);B.MoveToSelection();this.ApplyToRange(B,true);},ApplyToRange:function(A,B,C){switch (this.GetType()){case 0:this.ApplyToRange=this._ApplyBlockStyle;break;case 1:this.ApplyToRange=this._ApplyInlineStyle;break;default:return;};this.ApplyToRange(A,B,C);},ApplyToObject:function(A){if (!A) return;this.BuildElement(null,A);},RemoveFromSelection:function(A){var B=new FCKDomRange(A);B.MoveToSelection();this.RemoveFromRange(B,true);},RemoveFromRange:function(A,B,C){var D;var E=this._GetAttribsForComparison();var F=this._GetOverridesForComparison();if (A.CheckIsCollapsed()){var D=A.CreateBookmark(true);var H=A.GetBookmarkNode(D,true);var I=new FCKElementPath(H.parentNode);var J=[];var K=!FCKDomTools.GetNextSibling(H);var L=K||!FCKDomTools.GetPreviousSibling(H);var M;var N=-1;for (var i=0;i<I.Elements.length;i++){var O=I.Elements[i];if (this.CheckElementRemovable(O)){if (L&&!FCKDomTools.CheckIsEmptyElement(O,function(el){return (el!=H);})){M=O;N=J.length-1;}else{var P=O.nodeName.toLowerCase();if (P==this.Element){for (var Q in E){if (FCKDomTools.HasAttribute(O,Q)){switch (Q){case 'style':this._RemoveStylesFromElement(O);break;case 'class':if (FCKDomTools.GetAttributeValue(O,Q)!=this.GetFinalAttributeValue(Q)) continue;default:FCKDomTools.RemoveAttribute(O,Q);}}}};this._RemoveOverrides(O,F[P]);if (this.GetType()==1) this._RemoveNoAttribElement(O);}}else if (L) J.push(O);L=L&&((K&&!FCKDomTools.GetNextSibling(O))||(!K&&!FCKDomTools.GetPreviousSibling(O)));if (M&&(!L||(i==I.Elements.length-1))){var R=FCKDomTools.RemoveNode(H);for (var j=0;j<=N;j++){var S=FCKDomTools.CloneElement(J[j]);S.appendChild(R);R=S;};if (K) FCKDomTools.InsertAfterNode(M,R);else M.parentNode.insertBefore(R,M);L=false;M=null;}};if (B) A.SelectBookmark(D);if (C) A.MoveToBookmark(D);return;};A.Expand('inline_elements');D=A.CreateBookmark(true);var T=A.GetBookmarkNode(D,true);var U=A.GetBookmarkNode(D,false);A.Release(true);var I=new FCKElementPath(T);var X=I.Elements;var O;for (var i=1;i<X.length;i++){O=X[i];if (O==I.Block||O==I.BlockLimit) break;if (this.CheckElementRemovable(O)) FCKDomTools.BreakParent(T,O,A);};I=new FCKElementPath(U);X=I.Elements;for (var i=1;i<X.length;i++){O=X[i];if (O==I.Block||O==I.BlockLimit) break;b=O.nodeName.toLowerCase();if (this.CheckElementRemovable(O)) FCKDomTools.BreakParent(U,O,A);};var Z=FCKDomTools.GetNextSourceNode(T,true);while (Z){var a=FCKDomTools.GetNextSourceNode(Z);if (Z.nodeType==1){var b=Z.nodeName.toLowerCase();var c=(b==this.Element);if (c){for (var Q in E){if (FCKDomTools.HasAttribute(Z,Q)){switch (Q){case 'style':this._RemoveStylesFromElement(Z);break;case 'class':if (FCKDomTools.GetAttributeValue(Z,Q)!=this.GetFinalAttributeValue(Q)) continue;default:FCKDomTools.RemoveAttribute(Z,Q);}}}}else c=!!F[b];if (c){this._RemoveOverrides(Z,F[b]);this._RemoveNoAttribElement(Z);}};if (a==U) break;Z=a;};this._FixBookmarkStart(T);if (B) A.SelectBookmark(D);if (C) A.MoveToBookmark(D);},CheckElementRemovable:function(A,B){if (!A) return false;var C=A.nodeName.toLowerCase();if (C==this.Element){if (!B&&!FCKDomTools.HasAttributes(A)) return true;var D=this._GetAttribsForComparison();var E=(D._length==0);for (var F in D){if (F=='_length') continue;if (this._CompareAttributeValues(F,FCKDomTools.GetAttributeValue(A,F),(this.GetFinalAttributeValue(F)||''))){E=true;if (!B) break;}else{E=false;if (B) return false;}};if (E) return true;};var G=this._GetOverridesForComparison()[C];if (G){if (!(D=G.Attributes)) return true;for (var i=0;i<D.length;i++){var H=D[i][0];if (FCKDomTools.HasAttribute(A,H)){var I=D[i][1];if (I==null||(typeof I=='string'&&FCKDomTools.GetAttributeValue(A,H)==I)||I.test(FCKDomTools.GetAttributeValue(A,H))) return true;}}};return false;},CheckActive:function(A){switch (this.GetType()){case 0:return this.CheckElementRemovable(A.Block||A.BlockLimit,true);case 1:var B=A.Elements;for (var i=0;i<B.length;i++){var C=B[i];if (C==A.Block||C==A.BlockLimit) continue;if (this.CheckElementRemovable(C,true)) return true;}};return false;},RemoveFromElement:function(A){var B=this._GetAttribsForComparison();var C=this._GetOverridesForComparison();var D=A.getElementsByTagName(this.Element);for (var i=D.length-1;i>=0;i--){var E=D[i];for (var F in B){if (FCKDomTools.HasAttribute(E,F)){switch (F){case 'style':this._RemoveStylesFromElement(E);break;case 'class':if (FCKDomTools.GetAttributeValue(E,F)!=this.GetFinalAttributeValue(F)) continue;default:FCKDomTools.RemoveAttribute(E,F);}}};this._RemoveOverrides(E,C[this.Element]);this._RemoveNoAttribElement(E);};for (var G in C){if (G!=this.Element){D=A.getElementsByTagName(G);for (var i=D.length-1;i>=0;i--){var E=D[i];this._RemoveOverrides(E,C[G]);this._RemoveNoAttribElement(E);}}}},_RemoveStylesFromElement:function(A){var B=A.style.cssText;var C=this.GetFinalStyleValue();if (B.length>0&&C.length==0) return;C='(^|;)\\s*('+C.replace(/\s*([^ ]+):.*?(;|$)/g,'$1|').replace(/\|$/,'')+'):[^;]+';var D=new RegExp(C,'gi');B=B.replace(D,'').Trim();if (B.length==0||B==';') FCKDomTools.RemoveAttribute(A,'style');else A.style.cssText=B.replace(D,'');},_RemoveOverrides:function(A,B){var C=B&&B.Attributes;if (C){for (var i=0;i<C.length;i++){var D=C[i][0];if (FCKDomTools.HasAttribute(A,D)){var E=C[i][1];if (E==null||(E.test&&E.test(FCKDomTools.GetAttributeValue(A,D)))||(typeof E=='string'&&FCKDomTools.GetAttributeValue(A,D)==E)) FCKDomTools.RemoveAttribute(A,D);}}}},_RemoveNoAttribElement:function(A){if (!FCKDomTools.HasAttributes(A)){var B=A.firstChild;var C=A.lastChild;FCKDomTools.RemoveNode(A,true);this._MergeSiblings(B);if (B!=C) this._MergeSiblings(C);}},BuildElement:function(A,B){var C=B||A.createElement(this.Element);var D=this._StyleDesc.Attributes;var E;if (D){for (var F in D){E=this.GetFinalAttributeValue(F);if (F.toLowerCase()=='class') C.className=E;else C.setAttribute(F,E);}};if (this._GetStyleText().length>0) C.style.cssText=this.GetFinalStyleValue();return C;},_CompareAttributeValues:function(A,B,C){if (A=='style'&&B&&C){B=B.replace(/;$/,'').toLowerCase();C=C.replace(/;$/,'').toLowerCase();};return (B==C||((B===null||B==='')&&(C===null||C==='')))},GetFinalAttributeValue:function(A){var B=this._StyleDesc.Attributes;var B=B?B[A]:null;if (!B&&A=='style') return this.GetFinalStyleValue();if (B&&this._Variables) B=B.Replace(FCKRegexLib.StyleVariableAttName,this._GetVariableReplace,this);return B;},GetFinalStyleValue:function(){var A=this._GetStyleText();if (A.length>0&&this._Variables){A=A.Replace(FCKRegexLib.StyleVariableAttName,this._GetVariableReplace,this);A=FCKTools.NormalizeCssText(A);};return A;},_GetVariableReplace:function(){return this._Variables[arguments[2]]||arguments[0];},SetVariable:function(A,B){var C=this._Variables;if (!C) C=this._Variables={};this._Variables[A]=B;},_FromPre:function(A,B,C){var D=B.innerHTML;D=D.replace(/(\r\n|\r)/g,'\n');D=D.replace(/^[ \t]*\n/,'');D=D.replace(/\n$/,'');D=D.replace(/^[ \t]+|[ \t]+$/g,function(match,offset,s){if (match.length==1) return ' ';else if (offset==0) return new Array(match.length).join(' ')+' ';else return ' '+new Array(match.length).join(' ');});var E=new FCKHtmlIterator(D);var F=[];E.Each(function(isTag,value){if (!isTag){value=value.replace(/\n/g,'<br>');value=value.replace(/[ \t]{2,}/g,function (match){return new Array(match.length).join(' ')+' ';});};F.push(value);});C.innerHTML=F.join('');return C;},_ToPre:function(A,B,C){var D=B.innerHTML.Trim();D=D.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,'<br />');var E=new FCKHtmlIterator(D);var F=[];E.Each(function(isTag,value){if (!isTag) value=value.replace(/([ \t\n\r]+| )/g,' ');else if (isTag&&value=='<br />') value='\n';F.push(value);});if (FCKBrowserInfo.IsIE){var G=A.createElement('div');G.appendChild(C);C.outerHTML='<pre>\n'+F.join('')+'</pre>';C=G.removeChild(G.firstChild);}else C.innerHTML=F.join('');return C;},_CheckAndMergePre:function(A,B){if (A!=FCKDomTools.GetPreviousSourceElement(B,true)) return;var C=A.innerHTML.replace(/\n$/,'')+'\n\n'+B.innerHTML.replace(/^\n/,'');if (FCKBrowserInfo.IsIE) B.outerHTML='<pre>'+C+'</pre>';else B.innerHTML=C;FCKDomTools.RemoveNode(A);},_CheckAndSplitPre:function(A){var B;var C=A.firstChild;C=C&&C.nextSibling;while (C){var D=C.nextSibling;if (D&&D.nextSibling&&C.nodeName.IEquals('br')&&D.nodeName.IEquals('br')){FCKDomTools.RemoveNode(C);C=D.nextSibling;FCKDomTools.RemoveNode(D);B=FCKDomTools.InsertAfterNode(B||A,FCKDomTools.CloneElement(A));continue;};if (B){C=C.previousSibling;FCKDomTools.MoveNode(C.nextSibling,B);};C=C.nextSibling;}},_ApplyBlockStyle:function(A,B,C){var D;if (B) D=A.CreateBookmark();var E=new FCKDomRangeIterator(A);E.EnforceRealBlocks=true;var F;var G=A.Window.document;var H;while((F=E.GetNextParagraph())){var I=this.BuildElement(G);var J=I.nodeName.IEquals('pre');var K=F.nodeName.IEquals('pre');var L=J&&!K;var M=!J&&K;if (L) I=this._ToPre(G,F,I);else if (M) I=this._FromPre(G,F,I);else FCKDomTools.MoveChildren(F,I);F.parentNode.insertBefore(I,F);FCKDomTools.RemoveNode(F);if (J){if (H) this._CheckAndMergePre(H,I);H=I;}else if (M) this._CheckAndSplitPre(I);};if (B) A.SelectBookmark(D);if (C) A.MoveToBookmark(D);},_ApplyInlineStyle:function(A,B,C){var D=A.Window.document;if (A.CheckIsCollapsed()){var E=this.BuildElement(D);A.InsertNode(E);A.MoveToPosition(E,2);A.Select();return;};var F=this.Element;var G=FCK.DTD[F]||FCK.DTD.span;var H=this._GetAttribsForComparison();var I;A.Expand('inline_elements');var J=A.CreateBookmark(true);var K=A.GetBookmarkNode(J,true);var L=A.GetBookmarkNode(J,false);A.Release(true);var M=FCKDomTools.GetNextSourceNode(K,true);while (M){var N=false;var O=M.nodeType;var P=O==1?M.nodeName.toLowerCase():null;if (!P||G[P]){if ((FCK.DTD[M.parentNode.nodeName.toLowerCase()]||FCK.DTD.span)[F]||!FCK.DTD[F]){if (!A.CheckHasRange()) A.SetStart(M,3);if (O!=1||M.childNodes.length==0){var Q=M;var R=Q.parentNode;while (Q==R.lastChild&&G[R.nodeName.toLowerCase()]){Q=R;};A.SetEnd(Q,4);if (Q==Q.parentNode.lastChild&&!G[Q.parentNode.nodeName.toLowerCase()]) N=true;}else{A.SetEnd(M,3);}}else N=true;}else N=true;M=FCKDomTools.GetNextSourceNode(M);if (M==L){M=null;N=true;};if (N&&A.CheckHasRange()&&!A.CheckIsCollapsed()){I=this.BuildElement(D);A.ExtractContents().AppendTo(I);if (I.innerHTML.RTrim().length>0){A.InsertNode(I);this.RemoveFromElement(I);this._MergeSiblings(I,this._GetAttribsForComparison());if (!FCKBrowserInfo.IsIE) I.normalize();};A.Release(true);}};this._FixBookmarkStart(K);if (B) A.SelectBookmark(J);if (C) A.MoveToBookmark(J);},_FixBookmarkStart:function(A){var B;while ((B=A.nextSibling)){if (B.nodeType==1&&FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){if (!B.firstChild) FCKDomTools.RemoveNode(B);else FCKDomTools.MoveNode(A,B,true);continue;};if (B.nodeType==3&&B.length==0){FCKDomTools.RemoveNode(B);continue;};break;}},_MergeSiblings:function(A,B){if (!A||A.nodeType!=1||!FCKListsLib.InlineNonEmptyElements[A.nodeName.toLowerCase()]) return;this._MergeNextSibling(A,B);this._MergePreviousSibling(A,B);},_MergeNextSibling:function(A,B){var C=A.nextSibling;var D=(C&&C.nodeType==1&&C.getAttribute('_fck_bookmark'));if (D) C=C.nextSibling;if (C&&C.nodeType==1&&C.nodeName==A.nodeName){if (!B) B=this._CreateElementAttribsForComparison(A);if (this._CheckAttributesMatch(C,B)){var E=A.lastChild;if (D) FCKDomTools.MoveNode(A.nextSibling,A);FCKDomTools.MoveChildren(C,A);FCKDomTools.RemoveNode(C);if (E) this._MergeNextSibling(E);}}},_MergePreviousSibling:function(A,B){var C=A.previousSibling;var D=(C&&C.nodeType==1&&C.getAttribute('_fck_bookmark'));if (D) C=C.previousSibling;if (C&&C.nodeType==1&&C.nodeName==A.nodeName){if (!B) B=this._CreateElementAttribsForComparison(A);if (this._CheckAttributesMatch(C,B)){var E=A.firstChild;if (D) FCKDomTools.MoveNode(A.previousSibling,A,true);FCKDomTools.MoveChildren(C,A,true);FCKDomTools.RemoveNode(C);if (E) this._MergePreviousSibling(E);}}},_GetStyleText:function(){var A=this._StyleDesc.Styles;var B=(this._StyleDesc.Attributes?this._StyleDesc.Attributes['style']||'':'');if (B.length>0) B+=';';for (var C in A) B+=C+':'+A[C]+';';if (B.length>0&&!(/#\(/.test(B))){B=FCKTools.NormalizeCssText(B);};return (this._GetStyleText=function() { return B;})();},_GetAttribsForComparison:function(){var A=this._GetAttribsForComparison_$;if (A) return A;A={};var B=this._StyleDesc.Attributes;if (B){for (var C in B){A[C.toLowerCase()]=B[C].toLowerCase();}};if (this._GetStyleText().length>0){A['style']=this._GetStyleText().toLowerCase();};FCKTools.AppendLengthProperty(A,'_length');return (this._GetAttribsForComparison_$=A);},_GetOverridesForComparison:function(){var A=this._GetOverridesForComparison_$;if (A) return A;A={};var B=this._StyleDesc.Overrides;if (B){if (!FCKTools.IsArray(B)) B=[B];for (var i=0;i<B.length;i++){var C=B[i];var D;var E;var F;if (typeof C=='string') D=C.toLowerCase();else{D=C.Element?C.Element.toLowerCase():this.Element;F=C.Attributes;};E=A[D]||(A[D]={});if (F){var G=(E.Attributes=E.Attributes||[]);for (var H in F){G.push([H.toLowerCase(),F[H]]);}}}};return (this._GetOverridesForComparison_$=A);},_CreateElementAttribsForComparison:function(A){var B={};var C=0;for (var i=0;i<A.attributes.length;i++){var D=A.attributes[i];if (D.specified){B[D.nodeName.toLowerCase()]=FCKDomTools.GetAttributeValue(A,D).toLowerCase();C++;}};B._length=C;return B;},_CheckAttributesMatch:function(A,B){var C=A.attributes;var D=0;for (var i=0;i<C.length;i++){var E=C[i];if (E.specified){var F=E.nodeName.toLowerCase();var G=B[F];if (!G) break;if (G!=FCKDomTools.GetAttributeValue(A,E).toLowerCase()) break;D++;}};return (D==B._length);}};
var FCKStyles=FCK.Styles={_Callbacks:{},_ObjectStyles:{},ApplyStyle:function(A){if (typeof A=='string') A=this.GetStyles()[A];if (A){if (A.GetType()==2) A.ApplyToObject(FCKSelection.GetSelectedElement());else A.ApplyToSelection(FCK.EditorWindow);FCK.Events.FireEvent('OnSelectionChange');}},RemoveStyle:function(A){if (typeof A=='string') A=this.GetStyles()[A];if (A){A.RemoveFromSelection(FCK.EditorWindow);FCK.Events.FireEvent('OnSelectionChange');}},AttachStyleStateChange:function(A,B,C){var D=this._Callbacks[A];if (!D) D=this._Callbacks[A]=[];D.push([B,C]);},CheckSelectionChanges:function(){var A=FCKSelection.GetBoundaryParentElement(true);if (!A) return;var B=new FCKElementPath(A);var C=this.GetStyles();for (var D in C){var E=this._Callbacks[D];if (E){var F=C[D];var G=F.CheckActive(B);if (G!=(F._LastState||null)){F._LastState=G;for (var i=0;i<E.length;i++){var H=E[i][0];var I=E[i][1];H.call(I||window,D,G);}}}}},CheckStyleInSelection:function(A){return false;},_GetRemoveFormatTagsRegex:function (){var A=new RegExp('^(?:'+FCKConfig.RemoveFormatTags.replace(/,/g,'|')+')$','i');return (this._GetRemoveFormatTagsRegex=function(){return A;})&&A;},RemoveAll:function(){var A=new FCKDomRange(FCK.EditorWindow);A.MoveToSelection();if (A.CheckIsCollapsed()) return;A.Expand('inline_elements');var B=A.CreateBookmark(true);var C=A.GetBookmarkNode(B,true);var D=A.GetBookmarkNode(B,false);A.Release(true);var E=this._GetRemoveFormatTagsRegex();var F=new FCKElementPath(C);var G=F.Elements;var H;for (var i=1;i<G.length;i++){H=G[i];if (H==F.Block||H==F.BlockLimit) break;if (E.test(H.nodeName)) FCKDomTools.BreakParent(C,H,A);};F=new FCKElementPath(D);G=F.Elements;for (var i=1;i<G.length;i++){H=G[i];if (H==F.Block||H==F.BlockLimit) break;elementName=H.nodeName.toLowerCase();if (E.test(H.nodeName)) FCKDomTools.BreakParent(D,H,A);};var I=FCKDomTools.GetNextSourceNode(C,true,1);while (I){if (I==D) break;var J=FCKDomTools.GetNextSourceNode(I,false,1);if (E.test(I.nodeName)) FCKDomTools.RemoveNode(I,true);else FCKDomTools.RemoveAttributes(I,FCKConfig.RemoveAttributesArray);I=J;};A.SelectBookmark(B);FCK.Events.FireEvent('OnSelectionChange');},GetStyle:function(A){return this.GetStyles()[A];},GetStyles:function(){var A=this._GetStyles;if (!A){A=this._GetStyles=FCKTools.Merge(this._LoadStylesCore(),this._LoadStylesCustom(),this._LoadStylesXml());};return A;},CheckHasObjectStyle:function(A){return!!this._ObjectStyles[A];},_LoadStylesCore:function(){var A={};var B=FCKConfig.CoreStyles;for (var C in B){var D=A['_FCK_'+C]=new FCKStyle(B[C]);D.IsCore=true;};return A;},_LoadStylesCustom:function(){var A={};var B=FCKConfig.CustomStyles;if (B){for (var C in B){var D=A[C]=new FCKStyle(B[C]);D.Name=C;}};return A;},_LoadStylesXml:function(){var A={};var B=FCKConfig.StylesXmlPath;if (!B||B.length==0) return A;var C=new FCKXml();C.LoadUrl(B);var D=FCKXml.TransformToObject(C.SelectSingleNode('Styles'));var E=D.$Style;if (!E) return A;for (var i=0;i<E.length;i++){var F=E[i];var G=(F.element||'').toLowerCase();if (G.length==0) throw('The element name is required. Error loading "'+B+'"');var H={Element:G,Attributes:{},Styles:{},Overrides:[]};var I=F.$Attribute||[];for (var j=0;j<I.length;j++){H.Attributes[I[j].name]=I[j].value;};var J=F.$Style||[];for (j=0;j<J.length;j++){H.Styles[J[j].name]=J[j].value;};var K=F.$Override;if (K){for (j=0;j<K.length;j++){var L=K[j];var M={Element:L.element};var N=L.$Attribute;if (N){M.Attributes={};for (var k=0;k<N.length;k++){var O=N[k].value||null;if (O){var P=O&&FCKRegexLib.RegExp.exec(O);if (P) O=new RegExp(P[1],P[2]||'');};M.Attributes[N[k].name]=O;}};H.Overrides.push(M);}};var Q=new FCKStyle(H);Q.Name=F.name||G;if (Q.GetType()==2) this._ObjectStyles[G]=true;A[Q.Name]=Q;};return A;}};
var FCKListHandler={OutdentListItem:function(A){var B=A.parentNode;if (B.tagName.toUpperCase().Equals('UL','OL')){var C=FCKTools.GetElementDocument(A);var D=new FCKDocumentFragment(C);var E=D.RootNode;var F=false;var G=FCKDomTools.GetFirstChild(A,['UL','OL']);if (G){F=true;var H;while ((H=G.firstChild)) E.appendChild(G.removeChild(H));FCKDomTools.RemoveNode(G);};var I;var J=false;while ((I=A.nextSibling)){if (!F&&I.nodeType==1&&I.nodeName.toUpperCase()=='LI') J=F=true;E.appendChild(I.parentNode.removeChild(I));if (!J&&I.nodeType==1&&I.nodeName.toUpperCase().Equals('UL','OL')) FCKDomTools.RemoveNode(I,true);};var K=B.parentNode.tagName.toUpperCase();var L=(K=='LI');if (L||K.Equals('UL','OL')){if (F){var G=B.cloneNode(false);D.AppendTo(G);A.appendChild(G);}else if (L) D.InsertAfterNode(B.parentNode);else D.InsertAfterNode(B);if (L) FCKDomTools.InsertAfterNode(B.parentNode,B.removeChild(A));else FCKDomTools.InsertAfterNode(B,B.removeChild(A));}else{if (F){var N=B.cloneNode(false);D.AppendTo(N);FCKDomTools.InsertAfterNode(B,N);};var O=C.createElement(FCKConfig.EnterMode=='p'?'p':'div');FCKDomTools.MoveChildren(B.removeChild(A),O);FCKDomTools.InsertAfterNode(B,O);if (FCKConfig.EnterMode=='br'){if (FCKBrowserInfo.IsGecko) O.parentNode.insertBefore(FCKTools.CreateBogusBR(C),O);else FCKDomTools.InsertAfterNode(O,FCKTools.CreateBogusBR(C));FCKDomTools.RemoveNode(O,true);}};if (this.CheckEmptyList(B)) FCKDomTools.RemoveNode(B,true);}},CheckEmptyList:function(A){return (FCKDomTools.GetFirstChild(A,'LI')==null);},CheckListHasContents:function(A){var B=A.firstChild;while (B){switch (B.nodeType){case 1:if (!B.nodeName.IEquals('UL','LI')) return true;break;case 3:if (B.nodeValue.Trim().length>0) return true;};B=B.nextSibling;};return false;}};
var FCKElementPath=function(A){var B=null;var C=null;var D=[];var e=A;while (e){if (e.nodeType==1){if (!this.LastElement) this.LastElement=e;var E=e.nodeName.toLowerCase();if (FCKBrowserInfo.IsIE&&e.scopeName!='HTML') E=e.scopeName.toLowerCase()+':'+E;if (!C){if (!B&&FCKListsLib.PathBlockElements[E]!=null) B=e;if (FCKListsLib.PathBlockLimitElements[E]!=null){if (!B&&E=='div'&&!FCKElementPath._CheckHasBlock(e)) B=e;else C=e;}};D.push(e);if (E=='body') break;};e=e.parentNode;};this.Block=B;this.BlockLimit=C;this.Elements=D;};FCKElementPath._CheckHasBlock=function(A){var B=A.childNodes;for (var i=0,count=B.length;i<count;i++){var C=B[i];if (C.nodeType==1&&FCKListsLib.BlockElements[C.nodeName.toLowerCase()]) return true;};return false;};
var FCKElementPath=function(A){var B=null;var C=null;var D=[];var e=A;while (e){if (e.nodeType==1){if (!this.LastElement) this.LastElement=e;var E=e.nodeName.toLowerCase();if (FCKBrowserInfo.IsIE&&e.scopeName&&e.scopeName!='HTML') E=e.scopeName.toLowerCase()+':'+E;if (!C){if (!B&&FCKListsLib.PathBlockElements[E]!=null) B=e;if (FCKListsLib.PathBlockLimitElements[E]!=null){if (!B&&E=='div'&&!FCKElementPath._CheckHasBlock(e)) B=e;else C=e;}};D.push(e);if (E=='body') break;};e=e.parentNode;};this.Block=B;this.BlockLimit=C;this.Elements=D;};FCKElementPath._CheckHasBlock=function(A){var B=A.childNodes;for (var i=0,count=B.length;i<count;i++){var C=B[i];if (C.nodeType==1&&FCKListsLib.BlockElements[C.nodeName.toLowerCase()]) return true;};return false;};
var FCKDomRange=function(A){this.Window=A;this._Cache={};};FCKDomRange.prototype={_UpdateElementInfo:function(){var A=this._Range;if (!A) this.Release(true);else{var B=A.startContainer;var C=new FCKElementPath(B);this.StartNode=B.nodeType==3?B:B.childNodes[A.startOffset];this.StartContainer=B;this.StartBlock=C.Block;this.StartBlockLimit=C.BlockLimit;if (A.collapsed){this.EndNode=this.StartNode;this.EndContainer=this.StartContainer;this.EndBlock=this.StartBlock;this.EndBlockLimit=this.StartBlockLimit;}else{var D=A.endContainer;if (B!=D) C=new FCKElementPath(D);var E=D;if (A.endOffset==0){while (E&&!E.previousSibling) E=E.parentNode;if (E) E=E.previousSibling;}else if (E.nodeType==1) E=E.childNodes[A.endOffset-1];this.EndNode=E;this.EndContainer=D;this.EndBlock=C.Block;this.EndBlockLimit=C.BlockLimit;}};this._Cache={};},CreateRange:function(){return new FCKW3CRange(this.Window.document);},DeleteContents:function(){if (this._Range){this._Range.deleteContents();this._UpdateElementInfo();}},ExtractContents:function(){if (this._Range){var A=this._Range.extractContents();this._UpdateElementInfo();return A;};return null;},CheckIsCollapsed:function(){if (this._Range) return this._Range.collapsed;return false;},Collapse:function(A){if (this._Range) this._Range.collapse(A);this._UpdateElementInfo();},Clone:function(){var A=FCKTools.CloneObject(this);if (this._Range) A._Range=this._Range.cloneRange();return A;},MoveToNodeContents:function(A){if (!this._Range) this._Range=this.CreateRange();this._Range.selectNodeContents(A);this._UpdateElementInfo();},MoveToElementStart:function(A){this.SetStart(A,1);this.SetEnd(A,1);},MoveToElementEditStart:function(A){var B;while (A&&A.nodeType==1){if (FCKDomTools.CheckIsEditable(A)) B=A;else if (B) break;A=A.firstChild;};if (B) this.MoveToElementStart(B);},InsertNode:function(A){if (this._Range) this._Range.insertNode(A);},CheckIsEmpty:function(){if (this.CheckIsCollapsed()) return true;var A=this.Window.document.createElement('div');this._Range.cloneContents().AppendTo(A);FCKDomTools.TrimNode(A);return (A.innerHTML.length==0);},CheckStartOfBlock:function(){var A=this._Cache;var B=A.IsStartOfBlock;if (B!=undefined) return B;var C=this.StartBlock||this.StartBlockLimit;var D=this._Range.startContainer;var E=this._Range.startOffset;var F;if (E>0){if (D.nodeType==3){var G=D.nodeValue.substr(0,E).Trim();if (G.length!=0) return A.IsStartOfBlock=false;}else F=D.childNodes[E-1];};if (!F) F=FCKDomTools.GetPreviousSourceNode(D,true,null,C);while (F){switch (F.nodeType){case 1:if (!FCKListsLib.InlineChildReqElements[F.nodeName.toLowerCase()]) return A.IsStartOfBlock=false;break;case 3:if (F.nodeValue.Trim().length>0) return A.IsStartOfBlock=false;};F=FCKDomTools.GetPreviousSourceNode(F,false,null,C);};return A.IsStartOfBlock=true;},CheckEndOfBlock:function(A){var B=this._Cache.IsEndOfBlock;if (B!=undefined) return B;var C=this.EndBlock||this.EndBlockLimit;var D=this._Range.endContainer;var E=this._Range.endOffset;var F;if (D.nodeType==3){var G=D.nodeValue;if (E<G.length){G=G.substr(E);if (G.Trim().length!=0) return this._Cache.IsEndOfBlock=false;}}else F=D.childNodes[E];if (!F) F=FCKDomTools.GetNextSourceNode(D,true,null,C);var H=false;while (F){switch (F.nodeType){case 1:var I=F.nodeName.toLowerCase();if (FCKListsLib.InlineChildReqElements[I]) break;if (I=='br'&&!H){H=true;break;};return this._Cache.IsEndOfBlock=false;case 3:if (F.nodeValue.Trim().length>0) return this._Cache.IsEndOfBlock=false;};F=FCKDomTools.GetNextSourceNode(F,false,null,C);};if (A) this.Select();return this._Cache.IsEndOfBlock=true;},CreateBookmark:function(A){var B={StartId:(new Date()).valueOf()+Math.floor(Math.random()*1000)+'S',EndId:(new Date()).valueOf()+Math.floor(Math.random()*1000)+'E'};var C=this.Window.document;var D;var E;var F;if (!this.CheckIsCollapsed()){E=C.createElement('span');E.style.display='none';E.id=B.EndId;E.setAttribute('_fck_bookmark',true);E.innerHTML=' ';F=this.Clone();F.Collapse(false);F.InsertNode(E);};D=C.createElement('span');D.style.display='none';D.id=B.StartId;D.setAttribute('_fck_bookmark',true);D.innerHTML=' ';F=this.Clone();F.Collapse(true);F.InsertNode(D);if (A){B.StartNode=D;B.EndNode=E;};if (E){this.SetStart(D,4);this.SetEnd(E,3);}else this.MoveToPosition(D,4);return B;},GetBookmarkNode:function(A,B){var C=this.Window.document;if (B) return A.StartNode||C.getElementById(A.StartId);else return A.EndNode||C.getElementById(A.EndId);},MoveToBookmark:function(A,B){var C=this.GetBookmarkNode(A,true);var D=this.GetBookmarkNode(A,false);this.SetStart(C,3);if (!B) FCKDomTools.RemoveNode(C);if (D){this.SetEnd(D,3);if (!B) FCKDomTools.RemoveNode(D);}else this.Collapse(true);this._UpdateElementInfo();},CreateBookmark2:function(){if (!this._Range) return { "Start":0,"End":0 };var A={"Start":[this._Range.startOffset],"End":[this._Range.endOffset]};var B=this._Range.startContainer.previousSibling;var C=this._Range.endContainer.previousSibling;var D=this._Range.startContainer;var E=this._Range.endContainer;while (B&&B.nodeType==3&&D.nodeType==3){A.Start[0]+=B.length;D=B;B=B.previousSibling;}while (C&&C.nodeType==3&&E.nodeType==3){A.End[0]+=C.length;E=C;C=C.previousSibling;};if (D.nodeType==1&&D.childNodes[A.Start[0]]&&D.childNodes[A.Start[0]].nodeType==3){var F=D.childNodes[A.Start[0]];var G=0;while (F.previousSibling&&F.previousSibling.nodeType==3){F=F.previousSibling;G+=F.length;};D=F;A.Start[0]=G;};if (E.nodeType==1&&E.childNodes[A.End[0]]&&E.childNodes[A.End[0]].nodeType==3){var F=E.childNodes[A.End[0]];var G=0;while (F.previousSibling&&F.previousSibling.nodeType==3){F=F.previousSibling;G+=F.length;};E=F;A.End[0]=G;};A.Start=FCKDomTools.GetNodeAddress(D,true).concat(A.Start);A.End=FCKDomTools.GetNodeAddress(E,true).concat(A.End);return A;},MoveToBookmark2:function(A){var B=FCKDomTools.GetNodeFromAddress(this.Window.document,A.Start.slice(0,-1),true);var C=FCKDomTools.GetNodeFromAddress(this.Window.document,A.End.slice(0,-1),true);this.Release(true);this._Range=new FCKW3CRange(this.Window.document);var D=A.Start[A.Start.length-1];var E=A.End[A.End.length-1];while (B.nodeType==3&&D>B.length){if (!B.nextSibling||B.nextSibling.nodeType!=3) break;D-=B.length;B=B.nextSibling;}while (C.nodeType==3&&E>C.length){if (!C.nextSibling||C.nextSibling.nodeType!=3) break;E-=C.length;C=C.nextSibling;};this._Range.setStart(B,D);this._Range.setEnd(C,E);this._UpdateElementInfo();},MoveToPosition:function(A,B){this.SetStart(A,B);this.Collapse(true);},SetStart:function(A,B,C){var D=this._Range;if (!D) D=this._Range=this.CreateRange();switch(B){case 1:D.setStart(A,0);break;case 2:D.setStart(A,A.childNodes.length);break;case 3:D.setStartBefore(A);break;case 4:D.setStartAfter(A);};if (!C) this._UpdateElementInfo();},SetEnd:function(A,B,C){var D=this._Range;if (!D) D=this._Range=this.CreateRange();switch(B){case 1:D.setEnd(A,0);break;case 2:D.setEnd(A,A.childNodes.length);break;case 3:D.setEndBefore(A);break;case 4:D.setEndAfter(A);};if (!C) this._UpdateElementInfo();},Expand:function(A){var B,oSibling;switch (A){case 'inline_elements':if (this._Range.startOffset==0){B=this._Range.startContainer;if (B.nodeType!=1) B=B.previousSibling?null:B.parentNode;if (B){while (FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){this._Range.setStartBefore(B);if (B!=B.parentNode.firstChild) break;B=B.parentNode;}}};B=this._Range.endContainer;var C=this._Range.endOffset;if ((B.nodeType==3&&C>=B.nodeValue.length)||(B.nodeType==1&&C>=B.childNodes.length)||(B.nodeType!=1&&B.nodeType!=3)){if (B.nodeType!=1) B=B.nextSibling?null:B.parentNode;if (B){while (FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){this._Range.setEndAfter(B);if (B!=B.parentNode.lastChild) break;B=B.parentNode;}}};break;case 'block_contents':case 'list_contents':var D=FCKListsLib.BlockBoundaries;if (A=='list_contents'||FCKConfig.EnterMode=='br') D=FCKListsLib.ListBoundaries;if (this.StartBlock&&FCKConfig.EnterMode!='br'&&A=='block_contents') this.SetStart(this.StartBlock,1);else{B=this._Range.startContainer;if (B.nodeType==1){var E=B.childNodes[this._Range.startOffset];if (E) B=FCKDomTools.GetPreviousSourceNode(E,true);else B=B.lastChild||B;}while (B&&(B.nodeType!=1||(B!=this.StartBlockLimit&&!D[B.nodeName.toLowerCase()]))){this._Range.setStartBefore(B);B=B.previousSibling||B.parentNode;}};if (this.EndBlock&&FCKConfig.EnterMode!='br'&&A=='block_contents'&&this.EndBlock.nodeName.toLowerCase()!='li') this.SetEnd(this.EndBlock,2);else{B=this._Range.endContainer;if (B.nodeType==1) B=B.childNodes[this._Range.endOffset]||B.lastChild;while (B&&(B.nodeType!=1||(B!=this.StartBlockLimit&&!D[B.nodeName.toLowerCase()]))){this._Range.setEndAfter(B);B=B.nextSibling||B.parentNode;};if (B&&B.nodeName.toLowerCase()=='br') this._Range.setEndAfter(B);};this._UpdateElementInfo();}},SplitBlock:function(A){var B=A||FCKConfig.EnterMode;if (!this._Range) this.MoveToSelection();if (this.StartBlockLimit==this.EndBlockLimit){var C=this.StartBlock;var D=this.EndBlock;var E=null;if (B!='br'){if (!C){C=this.FixBlock(true,B);D=this.EndBlock;};if (!D) D=this.FixBlock(false,B);};var F=(C!=null&&this.CheckStartOfBlock());var G=(D!=null&&this.CheckEndOfBlock());if (!this.CheckIsEmpty()) this.DeleteContents();if (C&&D&&C==D){if (G){E=new FCKElementPath(this.StartContainer);this.MoveToPosition(D,4);D=null;}else if (F){E=new FCKElementPath(this.StartContainer);this.MoveToPosition(C,3);C=null;}else{this.SetEnd(C,2);var H=this.ExtractContents();D=C.cloneNode(false);D.removeAttribute('id',false);H.AppendTo(D);FCKDomTools.InsertAfterNode(C,D);this.MoveToPosition(C,4);if (FCKBrowserInfo.IsGecko&&!C.nodeName.IEquals(['ul','ol'])) FCKTools.AppendBogusBr(C);}};return {PreviousBlock:C,NextBlock:D,WasStartOfBlock:F,WasEndOfBlock:G,ElementPath:E};};return null;},FixBlock:function(A,B){var C=this.CreateBookmark();this.Collapse(A);this.Expand('block_contents');var D=this.Window.document.createElement(B);this.ExtractContents().AppendTo(D);FCKDomTools.TrimNode(D);if (FCKDomTools.CheckIsEmptyElement(D,function(element) { return element.getAttribute('_fck_bookmark')!='true';})&&FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(D);this.InsertNode(D);this.MoveToBookmark(C);return D;},Release:function(A){if (!A) this.Window=null;this.StartNode=null;this.StartContainer=null;this.StartBlock=null;this.StartBlockLimit=null;this.EndNode=null;this.EndContainer=null;this.EndBlock=null;this.EndBlockLimit=null;this._Range=null;this._Cache=null;},CheckHasRange:function(){return!!this._Range;},GetTouchedStartNode:function(){var A=this._Range;var B=A.startContainer;if (A.collapsed||B.nodeType!=1) return B;return B.childNodes[A.startOffset]||B;},GetTouchedEndNode:function(){var A=this._Range;var B=A.endContainer;if (A.collapsed||B.nodeType!=1) return B;return B.childNodes[A.endOffset-1]||B;}};
FCKDomRange.prototype.MoveToSelection=function(){this.Release(true);this._Range=new FCKW3CRange(this.Window.document);var A=this.Window.document.selection;if (A.type!='Control'){var B=this._GetSelectionMarkerTag(true);var C=this._GetSelectionMarkerTag(false);if (!B&&!C){this._Range.setStart(this.Window.document.body,0);this._UpdateElementInfo();return;};this._Range.setStart(B.parentNode,FCKDomTools.GetIndexOf(B));B.parentNode.removeChild(B);this._Range.setEnd(C.parentNode,FCKDomTools.GetIndexOf(C));C.parentNode.removeChild(C);this._UpdateElementInfo();}else{var D=A.createRange().item(0);if (D){this._Range.setStartBefore(D);this._Range.setEndAfter(D);this._UpdateElementInfo();}}};FCKDomRange.prototype.Select=function(A){if (this._Range) this.SelectBookmark(this.CreateBookmark(true),A);};FCKDomRange.prototype.SelectBookmark=function(A,B){var C=this.CheckIsCollapsed();var D;var E;var F=this.GetBookmarkNode(A,true);if (!F) return;var G;if (!C) G=this.GetBookmarkNode(A,false);var H=this.Window.document.body.createTextRange();H.moveToElementText(F);H.moveStart('character',1);if (G){var I=this.Window.document.body.createTextRange();I.moveToElementText(G);H.setEndPoint('EndToEnd',I);H.moveEnd('character',-1);}else{D=B||!F.previousSibling||F.previousSibling.nodeName.toLowerCase()=='br';E=this.Window.document.createElement('span');E.innerHTML='';F.parentNode.insertBefore(E,F);if (D){F.parentNode.insertBefore(this.Window.document.createTextNode('\ufeff'),F);}};if (!this._Range) this._Range=this.CreateRange();this._Range.setStartBefore(F);F.parentNode.removeChild(F);if (C){if (D){H.moveStart('character',-1);H.select();this.Window.document.selection.clear();}else H.select();FCKDomTools.RemoveNode(E);}else{this._Range.setEndBefore(G);G.parentNode.removeChild(G);H.select();}};FCKDomRange.prototype._GetSelectionMarkerTag=function(A){var B=this.Window.document;var C=B.selection;var D;try{D=C.createRange();}catch (e){return null;};if (D.parentElement().document!=B) return null;D.collapse(A===true);var E='fck_dom_range_temp_'+(new Date()).valueOf()+'_'+Math.floor(Math.random()*1000);D.pasteHTML('<span id="'+E+'"></span>');return B.getElementById(E);};
FCKDomRange.prototype.MoveToSelection=function(){this.Release(true);this._Range=new FCKW3CRange(this.Window.document);var A=this.Window.document.selection;if (A.type!='Control'){var B=this._GetSelectionMarkerTag(true);var C=this._GetSelectionMarkerTag(false);if (!B&&!C){this._Range.setStart(this.Window.document.body,0);this._UpdateElementInfo();return;};this._Range.setStart(B.parentNode,FCKDomTools.GetIndexOf(B));B.parentNode.removeChild(B);this._Range.setEnd(C.parentNode,FCKDomTools.GetIndexOf(C));C.parentNode.removeChild(C);this._UpdateElementInfo();}else{var D=A.createRange().item(0);if (D){this._Range.setStartBefore(D);this._Range.setEndAfter(D);this._UpdateElementInfo();}}};FCKDomRange.prototype.Select=function(A){if (this._Range) this.SelectBookmark(this.CreateBookmark(true),A);};FCKDomRange.prototype.SelectBookmark=function(A,B){var C=this.CheckIsCollapsed();var D;var E;var F=this.GetBookmarkNode(A,true);if (!F) return;var G;if (!C) G=this.GetBookmarkNode(A,false);var H=this.Window.document.body.createTextRange();H.moveToElementText(F);H.moveStart('character',1);if (G){var I=this.Window.document.body.createTextRange();I.moveToElementText(G);H.setEndPoint('EndToEnd',I);H.moveEnd('character',-1);}else{D=B||!F.previousSibling||F.previousSibling.nodeName.toLowerCase()=='br';E=this.Window.document.createElement('span');E.innerHTML='';F.parentNode.insertBefore(E,F);if (D){F.parentNode.insertBefore(this.Window.document.createTextNode('\ufeff'),F);}};if (!this._Range) this._Range=this.CreateRange();this._Range.setStartBefore(F);F.parentNode.removeChild(F);if (C){if (D){H.moveStart('character',-1);H.select();this.Window.document.selection.clear();}else H.select();FCKDomTools.RemoveNode(E);}else{this._Range.setEndBefore(G);G.parentNode.removeChild(G);H.select();}};FCKDomRange.prototype._GetSelectionMarkerTag=function(A){var B=this.Window.document;var C=B.selection;var D;try{D=C.createRange();}catch (e){return null;};if (D.parentElement().document&&D.parentElement().document!=B) return null;D.collapse(A===true);var E='fck_dom_range_temp_'+(new Date()).valueOf()+'_'+Math.floor(Math.random()*1000);D.pasteHTML('<span id="'+E+'"></span>');return B.getElementById(E);};
var FCKDomRangeIterator=function(A){this.Range=A;this.ForceBrBreak=false;this.EnforceRealBlocks=false;};FCKDomRangeIterator.CreateFromSelection=function(A){var B=new FCKDomRange(A);B.MoveToSelection();return new FCKDomRangeIterator(B);};FCKDomRangeIterator.prototype={GetNextParagraph:function(){var A;var B;var C;var D;var E;var F=this.ForceBrBreak?FCKListsLib.ListBoundaries:FCKListsLib.BlockBoundaries;if (!this._LastNode){var B=this.Range.Clone();B.Expand(this.ForceBrBreak?'list_contents':'block_contents');this._NextNode=B.GetTouchedStartNode();this._LastNode=B.GetTouchedEndNode();B=null;};var H=this._NextNode;var I=this._LastNode;this._NextNode=null;while (H){var J=false;var K=(H.nodeType!=1);var L=false;if (!K){var M=H.nodeName.toLowerCase();if (F[M]&&(!FCKBrowserInfo.IsIE||H.scopeName=='HTML')){if (M=='br') K=true;else if (!B&&H.childNodes.length==0&&M!='hr'){A=H;C=H==I;break;};if (B){B.SetEnd(H,3,true);if (M!='br') this._NextNode=FCKDomTools.GetNextSourceNode(H,true,null,I)||H;};J=true;}else{if (H.firstChild){if (!B){B=new FCKDomRange(this.Range.Window);B.SetStart(H,3,true);};H=H.firstChild;continue;};K=true;}}else if (H.nodeType==3){if (/^[\r\n\t ]+$/.test(H.nodeValue)) K=false;};if (K&&!B){B=new FCKDomRange(this.Range.Window);B.SetStart(H,3,true);};C=((!J||K)&&H==I);if (B&&!J){while (!H.nextSibling&&!C){var N=H.parentNode;if (F[N.nodeName.toLowerCase()]){J=true;C=C||(N==I);break;};H=N;K=true;C=(H==I);L=true;}};if (K) B.SetEnd(H,4,true);if ((J||C)&&B){B._UpdateElementInfo();if (B.StartNode==B.EndNode&&B.StartNode.parentNode==B.StartBlockLimit&&B.StartNode.getAttribute&&B.StartNode.getAttribute('_fck_bookmark')) B=null;else break;};if (C) break;H=FCKDomTools.GetNextSourceNode(H,L,null,I);};if (!A){if (!B){this._NextNode=null;return null;};A=B.StartBlock;if (!A&&!this.EnforceRealBlocks&&B.StartBlockLimit.nodeName.IEquals('DIV','TH','TD')&&B.CheckStartOfBlock()&&B.CheckEndOfBlock()){A=B.StartBlockLimit;}else if (!A||(this.EnforceRealBlocks&&A.nodeName.toLowerCase()=='li')){A=this.Range.Window.document.createElement(FCKConfig.EnterMode=='p'?'p':'div');B.ExtractContents().AppendTo(A);FCKDomTools.TrimNode(A);B.InsertNode(A);D=true;E=true;}else if (A.nodeName.toLowerCase()!='li'){if (!B.CheckStartOfBlock()||!B.CheckEndOfBlock()){A=A.cloneNode(false);B.ExtractContents().AppendTo(A);FCKDomTools.TrimNode(A);var O=B.SplitBlock();D=!O.WasStartOfBlock;E=!O.WasEndOfBlock;B.InsertNode(A);}}else if (!C){this._NextNode=A==I?null:FCKDomTools.GetNextSourceNode(B.EndNode,true,null,I);return A;}};if (D){var P=A.previousSibling;if (P&&P.nodeType==1){if (P.nodeName.toLowerCase()=='br') P.parentNode.removeChild(P);else if (P.lastChild&&P.lastChild.nodeName.IEquals('br')) P.removeChild(P.lastChild);}};if (E){var Q=A.lastChild;if (Q&&Q.nodeType==1&&Q.nodeName.toLowerCase()=='br') A.removeChild(Q);};if (!this._NextNode) this._NextNode=(C||A==I)?null:FCKDomTools.GetNextSourceNode(A,true,null,I);return A;}};
var FCKDocumentFragment=function(A){this._Document=A;this.RootNode=A.createElement('div');};FCKDocumentFragment.prototype={AppendTo:function(A){FCKDomTools.MoveChildren(this.RootNode,A);},AppendHtml:function(A){var B=this._Document.createElement('div');B.innerHTML=A;FCKDomTools.MoveChildren(B,this.RootNode);},InsertAfterNode:function(A){var B=this.RootNode;var C;while((C=B.lastChild)) FCKDomTools.InsertAfterNode(A,B.removeChild(C));}};
var FCKW3CRange=function(A){this._Document=A;this.startContainer=null;this.startOffset=null;this.endContainer=null;this.endOffset=null;this.collapsed=true;};FCKW3CRange.CreateRange=function(A){return new FCKW3CRange(A);};FCKW3CRange.CreateFromRange=function(A,B){var C=FCKW3CRange.CreateRange(A);C.setStart(B.startContainer,B.startOffset);C.setEnd(B.endContainer,B.endOffset);return C;};FCKW3CRange.prototype={_UpdateCollapsed:function(){this.collapsed=(this.startContainer==this.endContainer&&this.startOffset==this.endOffset);},setStart:function(A,B){this.startContainer=A;this.startOffset=B;if (!this.endContainer){this.endContainer=A;this.endOffset=B;};this._UpdateCollapsed();},setEnd:function(A,B){this.endContainer=A;this.endOffset=B;if (!this.startContainer){this.startContainer=A;this.startOffset=B;};this._UpdateCollapsed();},setStartAfter:function(A){this.setStart(A.parentNode,FCKDomTools.GetIndexOf(A)+1);},setStartBefore:function(A){this.setStart(A.parentNode,FCKDomTools.GetIndexOf(A));},setEndAfter:function(A){this.setEnd(A.parentNode,FCKDomTools.GetIndexOf(A)+1);},setEndBefore:function(A){this.setEnd(A.parentNode,FCKDomTools.GetIndexOf(A));},collapse:function(A){if (A){this.endContainer=this.startContainer;this.endOffset=this.startOffset;}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset;};this.collapsed=true;},selectNodeContents:function(A){this.setStart(A,0);this.setEnd(A,A.nodeType==3?A.data.length:A.childNodes.length);},insertNode:function(A){var B=this.startContainer;var C=this.startOffset;if (B.nodeType==3){B.splitText(C);if (B==this.endContainer) this.setEnd(B.nextSibling,this.endOffset-this.startOffset);FCKDomTools.InsertAfterNode(B,A);return;}else{B.insertBefore(A,B.childNodes[C]||null);if (B==this.endContainer){this.endOffset++;this.collapsed=false;}}},deleteContents:function(){if (this.collapsed) return;this._ExecContentsAction(0);},extractContents:function(){var A=new FCKDocumentFragment(this._Document);if (!this.collapsed) this._ExecContentsAction(1,A);return A;},cloneContents:function(){var A=new FCKDocumentFragment(this._Document);if (!this.collapsed) this._ExecContentsAction(2,A);return A;},_ExecContentsAction:function(A,B){var C=this.startContainer;var D=this.endContainer;var E=this.startOffset;var F=this.endOffset;var G=false;var H=false;if (D.nodeType==3) D=D.splitText(F);else{if (D.childNodes.length>0){if (F>D.childNodes.length-1){D=FCKDomTools.InsertAfterNode(D.lastChild,this._Document.createTextNode(''));H=true;}else D=D.childNodes[F];}};if (C.nodeType==3){C.splitText(E);if (C==D) D=C.nextSibling;}else{if (E==0){C=C.insertBefore(this._Document.createTextNode(''),C.firstChild);G=true;}else if (E>C.childNodes.length-1){C=C.appendChild(this._Document.createTextNode(''));G=true;}else C=C.childNodes[E].previousSibling;};var I=FCKDomTools.GetParents(C);var J=FCKDomTools.GetParents(D);var i,topStart,topEnd;for (i=0;i<I.length;i++){topStart=I[i];topEnd=J[i];if (topStart!=topEnd) break;};var K,levelStartNode,levelClone,currentNode,currentSibling;if (B) K=B.RootNode;for (var j=i;j<I.length;j++){levelStartNode=I[j];if (K&&levelStartNode!=C) levelClone=K.appendChild(levelStartNode.cloneNode(levelStartNode==C));currentNode=levelStartNode.nextSibling;while(currentNode){if (currentNode==J[j]||currentNode==D) break;currentSibling=currentNode.nextSibling;if (A==2) K.appendChild(currentNode.cloneNode(true));else{currentNode.parentNode.removeChild(currentNode);if (A==1) K.appendChild(currentNode);};currentNode=currentSibling;};if (K) K=levelClone;};if (B) K=B.RootNode;for (var k=i;k<J.length;k++){levelStartNode=J[k];if (A>0&&levelStartNode!=D) levelClone=K.appendChild(levelStartNode.cloneNode(levelStartNode==D));if (!I[k]||levelStartNode.parentNode!=I[k].parentNode){currentNode=levelStartNode.previousSibling;while(currentNode){if (currentNode==I[k]||currentNode==C) break;currentSibling=currentNode.previousSibling;if (A==2) K.insertBefore(currentNode.cloneNode(true),K.firstChild);else{currentNode.parentNode.removeChild(currentNode);if (A==1) K.insertBefore(currentNode,K.firstChild);};currentNode=currentSibling;}};if (K) K=levelClone;};if (A==2){var L=this.startContainer;if (L.nodeType==3){L.data+=L.nextSibling.data;L.parentNode.removeChild(L.nextSibling);};var M=this.endContainer;if (M.nodeType==3&&M.nextSibling){M.data+=M.nextSibling.data;M.parentNode.removeChild(M.nextSibling);}}else{if (topStart&&topEnd&&(C.parentNode!=topStart.parentNode||D.parentNode!=topEnd.parentNode)){var N=FCKDomTools.GetIndexOf(topEnd);if (G&&topEnd.parentNode==C.parentNode) N--;this.setStart(topEnd.parentNode,N);};this.collapse(true);};if(G) C.parentNode.removeChild(C);if(H&&D.parentNode) D.parentNode.removeChild(D);},cloneRange:function(){return FCKW3CRange.CreateFromRange(this._Document,this);}};
var FCKEnterKey=function(A,B,C,D){this.Window=A;this.EnterMode=B||'p';this.ShiftEnterMode=C||'br';var E=new FCKKeystrokeHandler(false);E._EnterKey=this;E.OnKeystroke=FCKEnterKey_OnKeystroke;E.SetKeystrokes([[13,'Enter'],[SHIFT+13,'ShiftEnter'],[8,'Backspace'],[CTRL+8,'CtrlBackspace'],[46,'Delete']]);this.TabText='';if (D>0||FCKBrowserInfo.IsSafari){while (D--) this.TabText+='\xa0';E.SetKeystrokes([9,'Tab']);};E.AttachToElement(A.document);};function FCKEnterKey_OnKeystroke(A,B){var C=this._EnterKey;try{switch (B){case 'Enter':return C.DoEnter();break;case 'ShiftEnter':return C.DoShiftEnter();break;case 'Backspace':return C.DoBackspace();break;case 'Delete':return C.DoDelete();break;case 'Tab':return C.DoTab();break;case 'CtrlBackspace':return C.DoCtrlBackspace();break;}}catch (e){};return false;};FCKEnterKey.prototype.DoEnter=function(A,B){FCKUndo.SaveUndoStep();this._HasShift=(B===true);var C=FCKSelection.GetParentElement();var D=new FCKElementPath(C);var E=A||this.EnterMode;if (E=='br'||D.Block&&D.Block.tagName.toLowerCase()=='pre') return this._ExecuteEnterBr();else return this._ExecuteEnterBlock(E);};FCKEnterKey.prototype.DoShiftEnter=function(){return this.DoEnter(this.ShiftEnterMode,true);};FCKEnterKey.prototype.DoBackspace=function(){var A=false;var B=new FCKDomRange(this.Window);B.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(B,this.Window.document.body)){this._FixIESelectAllBug(B);return true;};var C=B.CheckIsCollapsed();if (!C){if (FCKBrowserInfo.IsIE&&this.Window.document.selection.type.toLowerCase()=="control"){var D=this.Window.document.selection.createRange();for (var i=D.length-1;i>=0;i--){var E=D.item(i);E.parentNode.removeChild(E);};return true;};return false;};if (FCKBrowserInfo.IsIE){var F=FCKDomTools.GetPreviousSourceElement(B.StartNode,true);if (F&&F.nodeName.toLowerCase()=='br'){var G=B.Clone();G.SetStart(F,4);if (G.CheckIsEmpty()){F.parentNode.removeChild(F);return true;}}};var H=B.StartBlock;var I=B.EndBlock;if (B.StartBlockLimit==B.EndBlockLimit&&H&&I){if (!C){var J=B.CheckEndOfBlock();B.DeleteContents();if (H!=I){B.SetStart(I,1);B.SetEnd(I,1);};B.Select();A=(H==I);};if (B.CheckStartOfBlock()){var K=B.StartBlock;var L=FCKDomTools.GetPreviousSourceElement(K,true,['BODY',B.StartBlockLimit.nodeName],['UL','OL']);A=this._ExecuteBackspace(B,L,K);}else if (FCKBrowserInfo.IsGeckoLike){B.Select();}};B.Release();return A;};FCKEnterKey.prototype.DoCtrlBackspace=function(){FCKUndo.SaveUndoStep();var A=new FCKDomRange(this.Window);A.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(A,this.Window.document.body)){this._FixIESelectAllBug(A);return true;};return false;};FCKEnterKey.prototype._ExecuteBackspace=function(A,B,C){var D=false;if (!B&&C&&C.nodeName.IEquals('LI')&&C.parentNode.parentNode.nodeName.IEquals('LI')){this._OutdentWithSelection(C,A);return true;};if (B&&B.nodeName.IEquals('LI')){var E=FCKDomTools.GetLastChild(B,['UL','OL']);while (E){B=FCKDomTools.GetLastChild(E,'LI');E=FCKDomTools.GetLastChild(B,['UL','OL']);}};if (B&&C){if (C.nodeName.IEquals('LI')&&!B.nodeName.IEquals('LI')){this._OutdentWithSelection(C,A);return true;};var F=C.parentNode;var G=B.nodeName.toLowerCase();if (FCKListsLib.EmptyElements[G]!=null||G=='table'){FCKDomTools.RemoveNode(B);D=true;}else{FCKDomTools.RemoveNode(C);while (F.innerHTML.Trim().length==0){var H=F.parentNode;H.removeChild(F);F=H;};FCKDomTools.LTrimNode(C);FCKDomTools.RTrimNode(B);A.SetStart(B,2,true);A.Collapse(true);var I=A.CreateBookmark(true);if (!C.tagName.IEquals(['TABLE'])) FCKDomTools.MoveChildren(C,B);A.SelectBookmark(I);D=true;}};return D;};FCKEnterKey.prototype.DoDelete=function(){FCKUndo.SaveUndoStep();var A=false;var B=new FCKDomRange(this.Window);B.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(B,this.Window.document.body)){this._FixIESelectAllBug(B);return true;};if (B.CheckIsCollapsed()&&B.CheckEndOfBlock(FCKBrowserInfo.IsGeckoLike)){var C=B.StartBlock;var D=FCKTools.GetElementAscensor(C,'td');var E=FCKDomTools.GetNextSourceElement(C,true,[B.StartBlockLimit.nodeName],['UL','OL','TR'],true);if (D){var F=FCKTools.GetElementAscensor(E,'td');if (F!=D) return true;};A=this._ExecuteBackspace(B,C,E);};B.Release();return A;};FCKEnterKey.prototype.DoTab=function(){var A=new FCKDomRange(this.Window);A.MoveToSelection();var B=A._Range.startContainer;while (B){if (B.nodeType==1){var C=B.tagName.toLowerCase();if (C=="tr"||C=="td"||C=="th"||C=="tbody"||C=="table") return false;else break;};B=B.parentNode;};if (this.TabText){A.DeleteContents();A.InsertNode(this.Window.document.createTextNode(this.TabText));A.Collapse(false);A.Select();};return true;};FCKEnterKey.prototype._ExecuteEnterBlock=function(A,B){var C=B||new FCKDomRange(this.Window);var D=C.SplitBlock(A);if (D){var E=D.PreviousBlock;var F=D.NextBlock;var G=D.WasStartOfBlock;var H=D.WasEndOfBlock;if (F){if (F.parentNode.nodeName.IEquals('li')){FCKDomTools.BreakParent(F,F.parentNode);FCKDomTools.MoveNode(F,F.nextSibling,true);}}else if (E&&E.parentNode.nodeName.IEquals('li')){FCKDomTools.BreakParent(E,E.parentNode);C.MoveToElementEditStart(E.nextSibling);FCKDomTools.MoveNode(E,E.previousSibling);};if (!G&&!H){if (F.nodeName.IEquals('li')&&F.firstChild&&F.firstChild.nodeName.IEquals(['ul','ol'])) F.insertBefore(FCKTools.GetElementDocument(F).createTextNode('\xa0'),F.firstChild);if (F) C.MoveToElementEditStart(F);}else{if (G&&H&&E.tagName.toUpperCase()=='LI'){C.MoveToElementStart(E);this._OutdentWithSelection(E,C);C.Release();return true;};var I;if (E){var J=E.tagName.toUpperCase();if (!this._HasShift&&!(/^H[1-6]$/).test(J)){I=FCKDomTools.CloneElement(E);}}else if (F) I=FCKDomTools.CloneElement(F);if (!I) I=this.Window.document.createElement(A);var K=D.ElementPath;if (K){for (var i=0,len=K.Elements.length;i<len;i++){var L=K.Elements[i];if (L==K.Block||L==K.BlockLimit) break;if (FCKListsLib.InlineChildReqElements[L.nodeName.toLowerCase()]){L=FCKDomTools.CloneElement(L);FCKDomTools.MoveChildren(I,L);I.appendChild(L);}}};if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(I);C.InsertNode(I);if (FCKBrowserInfo.IsIE){C.MoveToElementEditStart(I);C.Select();};C.MoveToElementEditStart(G&&!H?F:I);};if (FCKBrowserInfo.IsGeckoLike){if (F){var M=this.Window.document.createElement('span');M.innerHTML=' ';C.InsertNode(M);FCKDomTools.ScrollIntoView(M,false);C.DeleteContents();}else{FCKDomTools.ScrollIntoView(F||I,false);}};C.Select();};C.Release();return true;};FCKEnterKey.prototype._ExecuteEnterBr=function(A){var B=new FCKDomRange(this.Window);B.MoveToSelection();if (B.StartBlockLimit==B.EndBlockLimit){B.DeleteContents();B.MoveToSelection();var C=B.CheckStartOfBlock();var D=B.CheckEndOfBlock();var E=B.StartBlock?B.StartBlock.tagName.toUpperCase():'';var F=this._HasShift;var G=false;if (!F&&E=='LI') return this._ExecuteEnterBlock(null,B);if (!F&&D&&(/^H[1-6]$/).test(E)){FCKDomTools.InsertAfterNode(B.StartBlock,this.Window.document.createElement('br'));if (FCKBrowserInfo.IsGecko) FCKDomTools.InsertAfterNode(B.StartBlock,this.Window.document.createTextNode(''));B.SetStart(B.StartBlock.nextSibling,FCKBrowserInfo.IsIE?3:1);}else{var H;G=E.IEquals('pre');if (G) H=this.Window.document.createTextNode(FCKBrowserInfo.IsIE?'\r':'\n');else H=this.Window.document.createElement('br');B.InsertNode(H);if (FCKBrowserInfo.IsGecko) FCKDomTools.InsertAfterNode(H,this.Window.document.createTextNode(''));if (D&&FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(H.parentNode);if (FCKBrowserInfo.IsIE) B.SetStart(H,4);else B.SetStart(H.nextSibling,1);if (!FCKBrowserInfo.IsIE){var I=null;if (FCKBrowserInfo.IsOpera) I=this.Window.document.createElement('span');else I=this.Window.document.createElement('br');H.parentNode.insertBefore(I,H.nextSibling);FCKDomTools.ScrollIntoView(I,false);I.parentNode.removeChild(I);}};B.Collapse(true);B.Select(G);};B.Release();return true;};FCKEnterKey.prototype._OutdentWithSelection=function(A,B){var C=B.CreateBookmark();FCKListHandler.OutdentListItem(A);B.MoveToBookmark(C);B.Select();};FCKEnterKey.prototype._CheckIsAllContentsIncluded=function(A,B){var C=false;var D=false;if (A.StartContainer==B||A.StartContainer==B.firstChild) C=(A._Range.startOffset==0);if (A.EndContainer==B||A.EndContainer==B.lastChild){var E=A.EndContainer.nodeType==3?A.EndContainer.length:A.EndContainer.childNodes.length;D=(A._Range.endOffset==E);};return C&&D;};FCKEnterKey.prototype._FixIESelectAllBug=function(A){var B=this.Window.document;B.body.innerHTML='';var C;if (FCKConfig.EnterMode.IEquals(['div','p'])){C=B.createElement(FCKConfig.EnterMode);B.body.appendChild(C);}else C=B.body;A.MoveToNodeContents(C);A.Collapse(true);A.Select();A.Release();};
ca. Zeile 64
FCKSelection.GetType=function(){try{var A=FCKSelection.GetSelection().type;if (A=='Control'||A=='Text') return A;if (this.GetSelection().createRange().parentElement) return 'Text';}catch(e){};return 'None';};FCKSelection.GetSelectedElement=function(){if (this.GetType()=='Control'){var A=this.GetSelection().createRange();if (A&&A.item) return this.GetSelection().createRange().item(0);};return null;};FCKSelection.GetParentElement=function(){switch (this.GetType()){case 'Control':var A=FCKSelection.GetSelectedElement();return A?A.parentElement:null;case 'None':return null;default:return this.GetSelection().createRange().parentElement();}};FCKSelection.GetBoundaryParentElement=function(A){switch (this.GetType()){case 'Control':var B=FCKSelection.GetSelectedElement();return B?B.parentElement:null;case 'None':return null;default:var C=FCK.EditorDocument;var D=C.selection.createRange();D.collapse(A!==false);var B=D.parentElement();return FCKTools.GetElementDocument(B)==C?B:null;}};FCKSelection.SelectNode=function(A){FCK.Focus();this.GetSelection().empty();var B;try{B=FCK.EditorDocument.body.createControlRange();B.addElement(A);B.select();}catch(e){B=FCK.EditorDocument.body.createTextRange();B.moveToElementText(A);B.select();}};FCKSelection.Collapse=function(A){FCK.Focus();if (this.GetType()=='Text'){var B=this.GetSelection().createRange();B.collapse(A==null||A===true);B.select();}};FCKSelection.HasAncestorNode=function(A){var B;if (this.GetSelection().type=="Control"){B=this.GetSelectedElement();}else{var C=this.GetSelection().createRange();B=C.parentElement();}while (B){if (B.nodeName.IEquals(A)) return true;B=B.parentNode;};return false;};FCKSelection.MoveToAncestorNode=function(A){var B,oRange;if (!FCK.EditorDocument) return null;if (this.GetSelection().type=="Control"){oRange=this.GetSelection().createRange();for (i=0;i<oRange.length;i++){if (oRange(i).parentNode){B=oRange(i).parentNode;break;}}}else{oRange=this.GetSelection().createRange();B=oRange.parentElement();}while (B&&!B.nodeName.Equals(A)) B=B.parentNode;return B;};FCKSelection.Delete=function(){var A=this.GetSelection();if (A.type.toLowerCase()!="none"){A.clear();};return A;};FCKSelection.GetSelection=function(){this.Restore();return FCK.EditorDocument.selection;};FCKSelection.Save=function(A){var B=FCK.EditorDocument;if (!B) return;if (this.locked) return;this.locked=!!A;var C=B.selection;var D;if (C){try {D=C.createRange();}catch(e) {};if (D){if (D.parentElement&&FCKTools.GetElementDocument(D.parentElement())!=B) D=null;else if (D.item&&FCKTools.GetElementDocument(D.item(0))!=B) D=null;}};this.SelectionData=D;};FCKSelection._GetSelectionDocument=function(A){var B=A.createRange();if (!B) return null;else if (B.item) return FCKTools.GetElementDocument(B.item(0));else return FCKTools.GetElementDocument(B.parentElement());};FCKSelection.Restore=function(){if (this.SelectionData){FCK.IsSelectionChangeLocked=true;try{if (String(this._GetSelectionDocument(FCK.EditorDocument.selection).body.contentEditable)=='true'){FCK.IsSelectionChangeLocked=false;return;};this.SelectionData.select();}catch (e) {};FCK.IsSelectionChangeLocked=false;}};FCKSelection.Release=function(){this.locked=false;delete this.SelectionData;};
var FCKTableHandler={};FCKTableHandler.InsertRow=function(A){var B=FCKSelection.MoveToAncestorNode('TR');if (!B) return;var C=B.cloneNode(true);B.parentNode.insertBefore(C,B);FCKTableHandler.ClearRow(A?C:B);};FCKTableHandler.DeleteRows=function(A){if (!A){var B=FCKTableHandler.GetSelectedCells();var C=[];for (var i=0;i<B.length;i++){var D=B[i].parentNode;C[D.rowIndex]=D;};for (var i=C.length;i>=0;i--){if (C[i]) FCKTableHandler.DeleteRows(C[i]);};return;};var E=FCKTools.GetElementAscensor(A,'TABLE');if (E.rows.length==1){FCKTableHandler.DeleteTable(E);return;};A.parentNode.removeChild(A);};FCKTableHandler.DeleteTable=function(A){if (!A){A=FCKSelection.GetSelectedElement();if (!A||A.tagName!='TABLE') A=FCKSelection.MoveToAncestorNode('TABLE');};if (!A) return;FCKSelection.SelectNode(A);FCKSelection.Collapse();if (A.parentNode.childNodes.length==1) A.parentNode.parentNode.removeChild(A.parentNode);else A.parentNode.removeChild(A);};FCKTableHandler.InsertColumn=function(A){var B=null;var C=this.GetSelectedCells();if (C&&C.length) B=C[A?0:(C.length-1)];if (!B) return;var D=FCKTools.GetElementAscensor(B,'TABLE');var E=B.cellIndex;for (var i=0;i<D.rows.length;i++){var F=D.rows[i];if (F.cells.length<(E+1)) continue;B=F.cells[E].cloneNode(false);if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(B);var G=F.cells[E];F.insertBefore(B,(A?G:G.nextSibling));}};FCKTableHandler.DeleteColumns=function(A){if (!A){var B=FCKTableHandler.GetSelectedCells();for (var i=B.length;i>=0;i--){if (B[i]) FCKTableHandler.DeleteColumns(B[i]);};return;};if (!A) return;var C=FCKTools.GetElementAscensor(A,'TABLE');var D=A.cellIndex;for (var i=C.rows.length-1;i>=0;i--){var E=C.rows[i];if (D==0&&E.cells.length==1){FCKTableHandler.DeleteRows(E);continue;};if (E.cells[D]) E.removeChild(E.cells[D]);}};FCKTableHandler.InsertCell=function(A,B){var C=null;var D=this.GetSelectedCells();if (D&&D.length) C=D[B?0:(D.length-1)];if (!C) return null;var E=FCK.EditorDocument.createElement('TD');if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(E);if (!B&&C.cellIndex==C.parentNode.cells.length-1) C.parentNode.appendChild(E);else C.parentNode.insertBefore(E,B?C:C.nextSibling);return E;};FCKTableHandler.DeleteCell=function(A){if (A.parentNode.cells.length==1){FCKTableHandler.DeleteRows(A.parentNode);return;};A.parentNode.removeChild(A);};FCKTableHandler.DeleteCells=function(){var A=FCKTableHandler.GetSelectedCells();for (var i=A.length-1;i>=0;i--){FCKTableHandler.DeleteCell(A[i]);}};FCKTableHandler._MarkCells=function(A,B){for (var i=0;i<A.length;i++) A[i][B]=true;};FCKTableHandler._UnmarkCells=function(A,B){for (var i=0;i<A.length;i++){FCKDomTools.ClearElementJSProperty(A[i],B);}};FCKTableHandler._ReplaceCellsByMarker=function(A,B,C){for (var i=0;i<A.length;i++){for (var j=0;j<A[i].length;j++){if (A[i][j][B]) A[i][j]=C;}}};FCKTableHandler._GetMarkerGeometry=function(A,B,C,D){var E=0;var F=0;var G=0;var H=0;for (var i=C;A[B][i]&&A[B][i][D];i++) E++;for (var i=C-1;A[B][i]&&A[B][i][D];i--){E++;G++;};for (var i=B;A[i]&&A[i][C]&&A[i][C][D];i++) F++;for (var i=B-1;A[i]&&A[i][C]&&A[i][C][D];i--){F++;H++;};return { 'width':E,'height':F,'x':G,'y':H };};FCKTableHandler.CheckIsSelectionRectangular=function(){var A=FCKTableHandler.GetSelectedCells();if (A.length<1) return false;for (var i=0;i<A.length;i++){if (A[i].parentNode.parentNode!=A[0].parentNode.parentNode) return false;};this._MarkCells(A,'_CellSelected');var B=this._CreateTableMap(A[0]);var C=A[0].parentNode.rowIndex;var D=this._GetCellIndexSpan(B,C,A[0]);var E=this._GetMarkerGeometry(B,C,D,'_CellSelected');var F=D-E.x;var G=C-E.y;if (E.width>=E.height){for (D=F;D<F+E.width;D++){C=G+(D-F) % E.height;if (!B[C]||!B[C][D]){this._UnmarkCells(A,'_CellSelected');return false;};var g=this._GetMarkerGeometry(B,C,D,'_CellSelected');if (g.width!=E.width||g.height!=E.height){this._UnmarkCells(A,'_CellSelected');return false;}}}else{for (C=G;C<G+E.height;C++){D=F+(C-G) % E.width;if (!B[C]||!B[C][D]){this._UnmarkCells(A,'_CellSelected');return false;};var g=this._GetMarkerGeometry(B,C,D,'_CellSelected');if (g.width!=E.width||g.height!=E.height){this._UnmarkCells(A,'_CellSelected');return false;}}};this._UnmarkCells(A,'_CellSelected');return true;};FCKTableHandler.MergeCells=function(){var A=this.GetSelectedCells();if (A.length<2) return;var B=A[0];var C=this._CreateTableMap(B);var D=B.parentNode.rowIndex;var E=this._GetCellIndexSpan(C,D,B);this._MarkCells(A,'_SelectedCells');var F=this._GetMarkerGeometry(C,D,E,'_SelectedCells');var G=E-F.x;var H=D-F.y;var I=FCKTools.GetElementDocument(B).createDocumentFragment();for (var i=0;i<F.height;i++){var J=0;for (var j=0;j<F.width;j++){var K=C[H+i][G+j];while (K.childNodes.length>0){var L=K.removeChild(K.firstChild);if (L.nodeType!=1||(L.getAttribute('type',2)!='_moz'&&L.getAttribute('_moz_dirty')!=null)){I.appendChild(L);J++;}}};if (J>0) I.appendChild(FCK.EditorDocument.createElement('br'));};this._ReplaceCellsByMarker(C,'_SelectedCells',B);this._UnmarkCells(A,'_SelectedCells');this._InstallTableMap(C,B.parentNode.parentNode.parentNode);B.appendChild(I);if (FCKBrowserInfo.IsGeckoLike&&(!B.firstChild)) FCKTools.AppendBogusBr(B);this._MoveCaretToCell(B,false);};FCKTableHandler.MergeRight=function(){var A=this.GetMergeRightTarget();if (A==null) return;var B=A.refCell;var C=A.tableMap;var D=A.nextCell;var E=FCK.EditorDocument.createDocumentFragment();while (D&&D.childNodes&&D.childNodes.length>0) E.appendChild(D.removeChild(D.firstChild));D.parentNode.removeChild(D);B.appendChild(E);this._MarkCells([D],'_Replace');this._ReplaceCellsByMarker(C,'_Replace',B);this._InstallTableMap(C,B.parentNode.parentNode.parentNode);this._MoveCaretToCell(B,false);};FCKTableHandler.MergeDown=function(){var A=this.GetMergeDownTarget();if (A==null) return;var B=A.refCell;var C=A.tableMap;var D=A.nextCell;var E=FCKTools.GetElementDocument(B).createDocumentFragment();while (D&&D.childNodes&&D.childNodes.length>0) E.appendChild(D.removeChild(D.firstChild));if (E.firstChild) E.insertBefore(FCK.EditorDocument.createElement('br'),E.firstChild);B.appendChild(E);this._MarkCells([D],'_Replace');this._ReplaceCellsByMarker(C,'_Replace',B);this._InstallTableMap(C,B.parentNode.parentNode.parentNode);this._MoveCaretToCell(B,false);};FCKTableHandler.HorizontalSplitCell=function(){var A=FCKTableHandler.GetSelectedCells();if (A.length!=1) return;var B=A[0];var C=this._CreateTableMap(B);var D=B.parentNode.rowIndex;var E=FCKTableHandler._GetCellIndexSpan(C,D,B);var F=isNaN(B.colSpan)?1:B.colSpan;if (F>1){var G=Math.ceil(F/2);var H=FCK.EditorDocument.createElement(B.nodeName);if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(H);var I=E+G;var J=E+F;var K=isNaN(B.rowSpan)?1:B.rowSpan;for (var r=D;r<D+K;r++){for (var i=I;i<J;i++) C[r][i]=H;}}else{var L=[];for (var i=0;i<C.length;i++){var M=C[i].slice(0,E);if (C[i].length<=E){L.push(M);continue;};if (C[i][E]==B){M.push(B);M.push(FCK.EditorDocument.createElement(B.nodeName));if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(M[M.length-1]);}else{M.push(C[i][E]);M.push(C[i][E]);};for (var j=E+1;j<C[i].length;j++) M.push(C[i][j]);L.push(M);};C=L;};this._InstallTableMap(C,B.parentNode.parentNode.parentNode);};FCKTableHandler.VerticalSplitCell=function(){var A=FCKTableHandler.GetSelectedCells();if (A.length!=1) return;var B=A[0];var C=this._CreateTableMap(B);var D=B.parentNode.rowIndex;var E=FCKTableHandler._GetCellIndexSpan(C,D,B);var F=isNaN(B.colSpan)?1:B.colSpan;var G=B.rowSpan;if (isNaN(G)) G=1;if (G>1){B.rowSpan=Math.ceil(G/2);var H=D+Math.ceil(G/2);var I=C[H];var J=null;for (var i=E+1;i<I.length;i++){if (I[i].parentNode.rowIndex==H){J=I[i];break;}};var K=FCK.EditorDocument.createElement(B.nodeName);K.rowSpan=Math.floor(G/2);if (F>1) K.colSpan=F;if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(K);B.parentNode.parentNode.parentNode.rows[H].insertBefore(K,J);}else{var L=B.parentNode.sectionRowIndex+1;var M=FCK.EditorDocument.createElement('tr');var N=B.parentNode.parentNode;if (N.rows.length>L) N.insertBefore(M,N.rows[L]);else N.appendChild(M);for (var i=0;i<C[D].length;){var O=C[D][i].colSpan;if (isNaN(O)||O<1) O=1;if (i==E){i+=O;continue;};var P=C[D][i].rowSpan;if (isNaN(P)) P=1;C[D][i].rowSpan=P+1;i+=O;};var K=FCK.EditorDocument.createElement(B.nodeName);if (F>1) K.colSpan=F;if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(K);M.appendChild(K);}};FCKTableHandler._GetCellIndexSpan=function(A,B,C){if (A.length<B+1) return null;var D=A[B];for (var c=0;c<D.length;c++){if (D[c]==C) return c;};return null;};FCKTableHandler._GetCellLocation=function(A,B){for (var i=0;i<A.length;i++){for (var c=0;c<A[i].length;c++){if (A[i][c]==B) return [i,c];}};return null;};FCKTableHandler._CreateTableMap=function(A){var B=(A.nodeName=='TABLE'?A:A.parentNode.parentNode.parentNode);var C=B.rows;var r=-1;var D=[];for (var i=0;i<C.length;i++){r++;if (!D[r]) D[r]=[];var c=-1;for (var j=0;j<C[i].cells.length;j++){var E=C[i].cells[j];c++;while (D[r][c]) c++;var F=isNaN(E.colSpan)?1:E.colSpan;var G=isNaN(E.rowSpan)?1:E.rowSpan;for (var H=0;H<G;H++){if (!D[r+H]) D[r+H]=[];for (var I=0;I<F;I++){D[r+H][c+I]=C[i].cells[j];}};c+=F-1;}};return D;};FCKTableHandler._InstallTableMap=function(A,B){var C=FCKBrowserInfo.IsIE?"_fckrowspan":"rowSpan";for (var i=0;i<A.length;i++){for (var j=0;j<A[i].length;j++){var D=A[i][j];if (D.parentNode) D.parentNode.removeChild(D);D.colSpan=D[C]=1;}};var E=0;for (var i=0;i<A.length;i++){for (var j=0;j<A[i].length;j++){var D=A[i][j];if (!D) continue;if (j>E) E=j;if (D._colScanned===true) continue;if (A[i][j-1]==D) D.colSpan++;if (A[i][j+1]!=D) D._colScanned=true;}};for (var i=0;i<=E;i++){for (var j=0;j<A.length;j++){if (!A[j]) continue;var D=A[j][i];if (!D||D._rowScanned===true) continue;if (A[j-1]&&A[j-1][i]==D) D[C]++;if (!A[j+1]||A[j+1][i]!=D) D._rowScanned=true;}};for (var i=0;i<A.length;i++){for (var j=0;j<A[i].length;j++){var D=A[i][j];FCKDomTools.ClearElementJSProperty(D,'_colScanned');FCKDomTools.ClearElementJSProperty(D,'_rowScanned');}};for (var i=0;i<A.length;i++){var I=FCK.EditorDocument.createElement('tr');for (var j=0;j<A[i].length;){var D=A[i][j];if (A[i-1]&&A[i-1][j]==D){j+=D.colSpan;continue;};I.appendChild(D);if (C!='rowSpan'){D.rowSpan=D[C];D.removeAttribute(C);};j+=D.colSpan;if (D.colSpan==1) D.removeAttribute('colspan');if (D.rowSpan==1) D.removeAttribute('rowspan');};if (FCKBrowserInfo.IsIE){B.rows[i].replaceNode(I);}else{B.rows[i].innerHTML='';FCKDomTools.MoveChildren(I,B.rows[i]);}}};FCKTableHandler._MoveCaretToCell=function (A,B){var C=new FCKDomRange(FCK.EditorWindow);C.MoveToNodeContents(A);C.Collapse(B);C.Select();};FCKTableHandler.ClearRow=function(A){var B=A.cells;for (var i=0;i<B.length;i++){B[i].innerHTML='';if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(B[i]);}};FCKTableHandler.GetMergeRightTarget=function(){var A=this.GetSelectedCells();if (A.length!=1) return null;var B=A[0];var C=this._CreateTableMap(B);var D=B.parentNode.rowIndex;var E=this._GetCellIndexSpan(C,D,B);var F=E+(isNaN(B.colSpan)?1:B.colSpan);var G=C[D][F];if (!G) return null;this._MarkCells([B,G],'_SizeTest');var H=this._GetMarkerGeometry(C,D,E,'_SizeTest');var I=this._GetMarkerGeometry(C,D,F,'_SizeTest');this._UnmarkCells([B,G],'_SizeTest');if (H.height!=I.height||H.y!=I.y) return null;return { 'refCell':B,'nextCell':G,'tableMap':C };};FCKTableHandler.GetMergeDownTarget=function(){var A=this.GetSelectedCells();if (A.length!=1) return null;var B=A[0];var C=this._CreateTableMap(B);var D=B.parentNode.rowIndex;var E=this._GetCellIndexSpan(C,D,B);var F=D+(isNaN(B.rowSpan)?1:B.rowSpan);if (!C[F]) return null;var G=C[F][E];if (!G) return null;if (B.parentNode.parentNode!=G.parentNode.parentNode) return null;this._MarkCells([B,G],'_SizeTest');var H=this._GetMarkerGeometry(C,D,E,'_SizeTest');var I=this._GetMarkerGeometry(C,F,E,'_SizeTest');this._UnmarkCells([B,G],'_SizeTest');if (H.width!=I.width||H.x!=I.x) return null;return { 'refCell':B,'nextCell':G,'tableMap':C };};
FCKTableHandler.GetSelectedCells=function(){if (FCKSelection.GetType()=='Control'){var A=FCKSelection.MoveToAncestorNode(['TD','TH']);return A?[A]:[];};var B=[];var C=FCKSelection.GetSelection().createRange();var D=FCKSelection.GetParentElement();if (D&&D.tagName.Equals('TD','TH')) B[0]=D;else{D=FCKSelection.MoveToAncestorNode('TABLE');if (D){for (var i=0;i<D.cells.length;i++){var E=FCK.EditorDocument.body.createTextRange();E.moveToElementText(D.cells[i]);if (C.inRange(E)||(C.compareEndPoints('StartToStart',E)>=0&&C.compareEndPoints('StartToEnd',E)<=0)||(C.compareEndPoints('EndToStart',E)>=0&&C.compareEndPoints('EndToEnd',E)<=0)){B[B.length]=D.cells[i];}}}};return B;};
var FCKXml=function(){this.Error=false;};FCKXml.GetAttribute=function(A,B,C){var D=A.attributes.getNamedItem(B);return D?D.value:C;};FCKXml.TransformToObject=function(A){if (!A) return null;var B={};var C=A.attributes;for (var i=0;i<C.length;i++){var D=C[i];B[D.name]=D.value;};var E=A.childNodes;for (i=0;i<E.length;i++){var F=E[i];if (F.nodeType==1){var G='$'+F.nodeName;var H=B[G];if (!H) H=B[G]=[];H.push(this.TransformToObject(F));}};return B;};
FCKXml.prototype={LoadUrl:function(A){this.Error=false;var B=FCKTools.CreateXmlObject('XmlHttp');if (!B){this.Error=true;return;};B.open("GET",A,false);B.send(null);if (B.status==200||B.status==304||(B.status==0&&B.readyState==4)){this.DOMDocument=B.responseXML;if (!this.DOMDocument||this.DOMDocument.firstChild==null){this.DOMDocument=FCKTools.CreateXmlObject('DOMDocument');this.DOMDocument.async=false;this.DOMDocument.resolveExternals=false;this.DOMDocument.loadXML(B.responseText);}}else{this.DOMDocument=null;};if (this.DOMDocument==null||this.DOMDocument.firstChild==null){this.Error=true;if (window.confirm('Error loading "'+A+'"\r\nDo you want to see more info?')) alert('URL requested: "'+A+'"\r\nServer response:\r\nStatus: '+B.status+'\r\nResponse text:\r\n'+B.responseText);}},SelectNodes:function(A,B){if (this.Error) return [];if (B) return B.selectNodes(A);else return this.DOMDocument.selectNodes(A);},SelectSingleNode:function(A,B){if (this.Error) return null;if (B) return B.selectSingleNode(A);else return this.DOMDocument.selectSingleNode(A);}};
FCKXml.prototype={LoadUrl:function(A){this.Error=false;var B=FCKTools.CreateXmlObject('XmlHttp');if (!B){this.Error=true;return;};B.open("GET",A,false);try{B.responseType="msxml-document";}catch(e){}B.send(null);if (B.status==200||B.status==304||(B.status==0&&B.readyState==4)){this.DOMDocument=B.responseXML;if (!this.DOMDocument||this.DOMDocument.firstChild==null){this.DOMDocument=FCKTools.CreateXmlObject('DOMDocument');this.DOMDocument.async=false;this.DOMDocument.resolveExternals=false;this.DOMDocument.loadXML(B.responseText);}}else{this.DOMDocument=null;};if (this.DOMDocument==null||this.DOMDocument.firstChild==null){this.Error=true;if (window.confirm('Error loading "'+A+'"\r\nDo you want to see more info?')) alert('URL requested: "'+A+'"\r\nServer response:\r\nStatus: '+B.status+'\r\nResponse text:\r\n'+B.responseText);}},SelectNodes:function(A,B){if (this.Error) return [];if (B) return B.selectNodes(A);else return this.DOMDocument.selectNodes(A);},SelectSingleNode:function(A,B){if (this.Error) return null;if (B) return B.selectSingleNode(A);else return this.DOMDocument.selectSingleNode(A);}};
var FCKNamedCommand=function(A){this.Name=A;};FCKNamedCommand.prototype.Execute=function(){FCK.ExecuteNamedCommand(this.Name);};FCKNamedCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState(this.Name);};
var FCKStyleCommand=function(){};FCKStyleCommand.prototype={Name:'Style',Execute:function(A,B){FCKUndo.SaveUndoStep();if (B.Selected) FCK.Styles.RemoveStyle(B.Style);else FCK.Styles.ApplyStyle(B.Style);FCKUndo.SaveUndoStep();FCK.Focus();FCK.Events.FireEvent('OnSelectionChange');},GetState:function(){if (FCK.EditMode!=0||!FCK.EditorDocument) return -1;if (FCKSelection.GetType()=='Control'){var A=FCKSelection.GetSelectedElement();if (!A||!FCKStyles.CheckHasObjectStyle(A.nodeName.toLowerCase())) return -1;};return 0;}};
var FCKDialogCommand=function(A,B,C,D,E,F,G,H){this.Name=A;this.Title=B;this.Url=C;this.Width=D;this.Height=E;this.CustomValue=H;this.GetStateFunction=F;this.GetStateParam=G;this.Resizable=false;};FCKDialogCommand.prototype.Execute=function(){FCKDialog.OpenDialog('FCKDialog_'+this.Name,this.Title,this.Url,this.Width,this.Height,this.CustomValue,this.Resizable);};FCKDialogCommand.prototype.GetState=function(){if (this.GetStateFunction) return this.GetStateFunction(this.GetStateParam);else return FCK.EditMode==0?0:-1;};var FCKUndefinedCommand=function(){this.Name='Undefined';};FCKUndefinedCommand.prototype.Execute=function(){alert(FCKLang.NotImplemented);};FCKUndefinedCommand.prototype.GetState=function(){return 0;};var FCKFormatBlockCommand=function(){};FCKFormatBlockCommand.prototype={Name:'FormatBlock',Execute:FCKStyleCommand.prototype.Execute,GetState:function(){return FCK.EditorDocument?0:-1;}};var FCKFontNameCommand=function(){};FCKFontNameCommand.prototype={Name:'FontName',Execute:FCKStyleCommand.prototype.Execute,GetState:FCKFormatBlockCommand.prototype.GetState};var FCKFontSizeCommand=function(){};FCKFontSizeCommand.prototype={Name:'FontSize',Execute:FCKStyleCommand.prototype.Execute,GetState:FCKFormatBlockCommand.prototype.GetState};var FCKPreviewCommand=function(){this.Name='Preview';};FCKPreviewCommand.prototype.Execute=function(){FCK.Preview();};FCKPreviewCommand.prototype.GetState=function(){return 0;};var FCKSaveCommand=function(){this.Name='Save';};FCKSaveCommand.prototype.Execute=function(){var A=FCK.GetParentForm();if (typeof(A.onsubmit)=='function'){var B=A.onsubmit();if (B!=null&&B===false) return;};if (typeof(A.submit)=='function') A.submit();else A.submit.click();};FCKSaveCommand.prototype.GetState=function(){return 0;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();FCK.SetData('');FCKUndo.Typing=true;FCK.Focus();};FCKNewPageCommand.prototype.GetState=function(){return 0;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){if (FCKConfig.SourcePopup){var A=FCKConfig.ScreenWidth*0.65;var B=FCKConfig.ScreenHeight*0.65;FCKDialog.OpenDialog('FCKDialog_Source',FCKLang.Source,'dialog/fck_source.html',A,B,null,true);}else FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==0?0:1);};var FCKUndoCommand=function(){this.Name='Undo';};FCKUndoCommand.prototype.Execute=function(){FCKUndo.Undo();};FCKUndoCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return (FCKUndo.CheckUndoState()?0:-1);};var FCKRedoCommand=function(){this.Name='Redo';};FCKRedoCommand.prototype.Execute=function(){FCKUndo.Redo();};FCKRedoCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return (FCKUndo.CheckRedoState()?0:-1);};var FCKPageBreakCommand=function(){this.Name='PageBreak';};FCKPageBreakCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();var e=FCK.EditorDocument.createElement('DIV');e.style.pageBreakAfter='always';e.innerHTML='<span style="DISPLAY:none"> </span>';var A=FCKDocumentProcessor_CreateFakeImage('FCK__PageBreak',e);var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.SplitBlock();B.InsertNode(A);FCK.Events.FireEvent('OnSelectionChange');};FCKPageBreakCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return 0;};var FCKUnlinkCommand=function(){this.Name='Unlink';};FCKUnlinkCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();if (FCKBrowserInfo.IsGeckoLike){var A=FCK.Selection.MoveToAncestorNode('A');if (A) FCKTools.RemoveOuterTags(A);return;};FCK.ExecuteNamedCommand(this.Name);};FCKUnlinkCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;var A=FCK.GetNamedCommandState(this.Name);if (A==0&&FCK.EditMode==0){var B=FCKSelection.MoveToAncestorNode('A');var C=(B&&B.name.length>0&&B.href.length==0);if (C) A=-1;};return A;};var FCKVisitLinkCommand=function(){this.Name='VisitLink';};FCKVisitLinkCommand.prototype={GetState:function(){if (FCK.EditMode!=0) return -1;var A=FCK.GetNamedCommandState('Unlink');if (A==0){var B=FCKSelection.MoveToAncestorNode('A');if (!B.href) A=-1;};return A;},Execute:function(){var A=FCKSelection.MoveToAncestorNode('A');var B=A.getAttribute('_fcksavedurl')||A.getAttribute('href',2);if (!/:\/\//.test(B)){var C=FCKConfig.BaseHref;var D=FCK.GetInstanceObject('parent');if (!C){C=D.document.location.href;C=C.substring(0,C.lastIndexOf('/')+1);};if (/^\//.test(B)){try{C=C.match(/^.*:\/\/+[^\/]+/)[0];}catch (e){C=D.document.location.protocol+'://'+D.parent.document.location.host;}};B=C+B;};if (!window.open(B,'_blank')) alert(FCKLang.VisitLinkBlocked);}};var FCKSelectAllCommand=function(){this.Name='SelectAll';};FCKSelectAllCommand.prototype.Execute=function(){if (FCK.EditMode==0){FCK.ExecuteNamedCommand('SelectAll');}else{var A=FCK.EditingArea.Textarea;if (FCKBrowserInfo.IsIE){A.createTextRange().execCommand('SelectAll');}else{A.selectionStart=0;A.selectionEnd=A.value.length;};A.focus();}};FCKSelectAllCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return 0;};var FCKPasteCommand=function(){this.Name='Paste';};FCKPasteCommand.prototype={Execute:function(){if (FCKBrowserInfo.IsIE) FCK.Paste();else FCK.ExecuteNamedCommand('Paste');},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Paste');}};var FCKRuleCommand=function(){this.Name='Rule';};FCKRuleCommand.prototype={Execute:function(){FCKUndo.SaveUndoStep();FCK.InsertElement('hr');},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('InsertHorizontalRule');}};var FCKCutCopyCommand=function(A){this.Name=A?'Cut':'Copy';};FCKCutCopyCommand.prototype={Execute:function(){var A=false;if (FCKBrowserInfo.IsIE){var B=function(){A=true;};var C='on'+this.Name.toLowerCase();FCK.EditorDocument.body.attachEvent(C,B);FCK.ExecuteNamedCommand(this.Name);FCK.EditorDocument.body.detachEvent(C,B);}else{try{FCK.ExecuteNamedCommand(this.Name);A=true;}catch(e){}};if (!A) alert(FCKLang['PasteError'+this.Name]);},GetState:function(){return FCK.EditMode!=0?-1:FCK.GetNamedCommandState('Cut');}};var FCKAnchorDeleteCommand=function(){this.Name='AnchorDelete';};FCKAnchorDeleteCommand.prototype={Execute:function(){if (FCK.Selection.GetType()=='Control'){FCK.Selection.Delete();}else{var A=FCK.Selection.GetSelectedElement();if (A){if (A.tagName=='IMG'&&A.getAttribute('_fckanchor')) oAnchor=FCK.GetRealElement(A);else A=null;};if (!A){oAnchor=FCK.Selection.MoveToAncestorNode('A');if (oAnchor) FCK.Selection.SelectNode(oAnchor);};if (oAnchor.href.length!=0){oAnchor.removeAttribute('name');if (FCKBrowserInfo.IsIE) oAnchor.className=oAnchor.className.replace(FCKRegexLib.FCK_Class,'');return;};if (A){A.parentNode.removeChild(A);return;};if (oAnchor.innerHTML.length==0){oAnchor.parentNode.removeChild(oAnchor);return;};FCKTools.RemoveOuterTags(oAnchor);};if (FCKBrowserInfo.IsGecko) FCK.Selection.Collapse(true);},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Unlink');}};var FCKDeleteDivCommand=function(){};FCKDeleteDivCommand.prototype={GetState:function(){if (FCK.EditMode!=0) return -1;var A=FCKSelection.GetParentElement();var B=new FCKElementPath(A);return B.BlockLimit&&B.BlockLimit.nodeName.IEquals('div')?0:-1;},Execute:function(){FCKUndo.SaveUndoStep();var A=FCKDomTools.GetSelectedDivContainers();var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.CreateBookmark();for (var i=0;i<A.length;i++) FCKDomTools.RemoveNode(A[i],true);B.MoveToBookmark(C);B.Select();}};var FCKNbsp=function(){this.Name='Non Breaking Space';};FCKNbsp.prototype={Execute:function(){FCK.InsertHtml(' ');},GetState:function(){return (FCK.EditMode!=0?-1:0);}};
var FCKShowBlockCommand=function(A,B){this.Name=A;if (B!=undefined) this._SavedState=B;else this._SavedState=null;};FCKShowBlockCommand.prototype.Execute=function(){var A=this.GetState();if (A==-1) return;var B=FCK.EditorDocument.body;if (A==1) B.className=B.className.replace(/(^| )FCK__ShowBlocks/g,'');else B.className+=' FCK__ShowBlocks';if (FCKBrowserInfo.IsIE){try{FCK.EditorDocument.selection.createRange().select();}catch (e){}}else{var C=FCK.EditorWindow.getSelection().focusNode;if (C){if (C.nodeType!=1) C=C.parentNode;FCKDomTools.ScrollIntoView(C,false);}};FCK.Events.FireEvent('OnSelectionChange');};FCKShowBlockCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;if (!FCK.EditorDocument) return 0;if (/FCK__ShowBlocks(?:\s|$)/.test(FCK.EditorDocument.body.className)) return 1;return 0;};FCKShowBlockCommand.prototype.SaveState=function(){this._SavedState=this.GetState();};FCKShowBlockCommand.prototype.RestoreState=function(){if (this._SavedState!=null&&this.GetState()!=this._SavedState) this.Execute();};
admin/includes/modules/fckeditor/fckeditor.jsTop ca. Zeile 58
* The minimum width used when replacing textareas.
*/
FCKeditor.MinWidth = 750 ;
FCKeditor.prototype.Version = '2.6.8' ;
FCKeditor.prototype.VersionBuild = '25427' ;
FCKeditor.prototype.Version = '2.6.10' ;
FCKeditor.prototype.VersionBuild = '25429' ;
FCKeditor.prototype.Create = function()
{
document.write( this.CreateHtml() ) ;
ca. Zeile 303
// Internet Explorer 5.5+
if ( /*@cc_on!@*/false && sAgent.indexOf("mac") == -1 )
{
var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ;
var sBrowserVersion = navigator.appVersion.match(/MSIE ([\d.]+)/)[1] ;
return ( sBrowserVersion >= 5.5 ) ;
}
if ( navigator.product == "Gecko" )
{
// introduced in Firefox 17.0
if ( sAgent.match(/gecko\/(\d+\.\d+)/i) )
return true ;
// Gecko (Opera 9 tries to behave like Gecko at this point).
if ( navigator.product == "Gecko" && navigator.productSub >= 20030210 && !( typeof(opera) == 'object' && opera.postError ) )
if ( navigator.productSub >= 20030210 && !( typeof(opera) == 'object' && opera.postError ) )
return true ;
}
// Opera 9.50+
if ( window.opera && window.opera.version && parseFloat( window.opera.version() ) >= 9.5 )
return true ;
admin/includes/modules/new_attributes_include.phpTop ca. Zeile 198
?>
</td>
</tr>
</form>
<script src="includes/javascript/jquery-1.8.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function()
{
$('input[name="optionValues[]"]').each(function(){ en_disabled($(this)); });
$('input[type=checkbox]').click(function(){ en_disabled($(this)); });
});
function en_disabled(obj)
{
obj.closest('tr').find('input[type=text], select').not('input[type=checkbox]').attr('disabled', !obj.is(':checked'));
//download fields
obj.closest('tr').next('tr').not('[class^=attributes]').find('input[type=text], select').attr('disabled', !obj.is(':checked'));
}
</script>
admin/includes/modules/products_attributes_values.phpTop ca. Zeile 172
<tr>
<td colspan="3"><?php echo xtc_black_line(); ?></td>
</tr>
<tr>
<td class="main" colspan="3>" style="background-color: #d4d4d4;">
<td class="main" colspan="3" style="background-color: #d4d4d4;">
<div style="margin:10px 0";>
<?php echo TEXT_WARNING_OF_DELETE; ?>
<?php //BOF - webkiste - auf der selben Seite bleiben
echo xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'value_page=' . $_GET['value_page'], 'NONSSL'));
ca. Zeile 189
} else {
?>
<tr>
<td class="main" colspan="3>" style="background-color: #d4d4d4;">
<td class="main" colspan="3" style="background-color: #d4d4d4;">
<div style="margin:10px 0";>
<?php echo TEXT_OK_TO_DELETE; ?>
<?php //BOF - webkiste - auf der selben Seite bleiben
echo xtc_button_link(BUTTON_DELETE, xtc_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_value&value_id=' . $_GET['value_id'] . '&value_page=' . $_GET['value_page'] , 'NONSSL'));
ca. Zeile 200
</div>
</td>
</tr>
<tr>
<td colspan="<3"><?php echo xtc_black_line(); ?></td>
<td colspan="3"><?php echo xtc_black_line(); ?></td>
</tr>
<?php
}
?>
admin/includes/modules/products_images.phpTop ca. Zeile 52
}
}
?>
<script src="includes/javascript/jquery-1.8.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
//disable empty upload fields - fix ticket #459
$(function() {
$('#new_product').submit(function( event ) {
var images = $("[name='products_image'],[name^='mo_pics_']");
images.each(function() {
$(this).prop( "disabled", false );
if ($(this).val() == '') {
$(this).prop( "disabled", true );
}
});
});
});
</script>
admin/includes/version.phpTop ca. Zeile 2
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
// Define the project version
define('PROJECT_VERSION', 'modified eCommerce Shopssoftware v1.06 rev 4642 SP2 dated: 2014-08-12');
define('PROJECT_VERSION', 'modified eCommerce Shopssoftware v1.06 rev 4642 SP3 dated: 2016-01-25');
admin/it_recht_kanzlei.phpTop ca. Zeile 20
require('includes/application_top.php');
require (DIR_WS_INCLUDES.'head.php');
?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<body>
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<table class="tableBody">
<tr>
<td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top">
<table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table>
</td>
<?php //left_navigation
if (USE_ADMIN_TOP_MENU == 'false') {
echo '<td class="columnLeft2">'.PHP_EOL;
echo '<!-- left_navigation //-->'.PHP_EOL;
require_once(DIR_WS_INCLUDES . 'column_left.php');
echo '<!-- left_navigation eof //-->'.PHP_EOL;
echo '</td>'.PHP_EOL;
}
?>
<!-- body_text //-->
<td class="boxCenter" width="100%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
ca. Zeile 52
</td>
</tr>
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<table class="tableCenter">
<tr>
<td width="250" valign="middle" class="dataTableHeadingContent">
<td valign="middle" class="dataTableHeadingContent" style="width:250px;">
Update-Service
</td>
<td valign="middle" class="dataTableHeadingContent" style="border-right: 0px;">
<a href="<?php echo xtc_href_link('module_export.php', 'set=&module=it_recht_kanzlei'); ?>"><u>Einstellungen</u></a>
<td valign="middle" class="dataTableHeadingContent">
<a href="<?php echo xtc_href_link('module_export.php', 'set=module&module=it_recht_kanzlei'); ?>"><u>Einstellungen</u></a>
</td>
</tr>
</table>
<table style="border: 1px solid #dddddd" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr style="background-color: #FFFFFF;">
<td style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; padding: 0px 10px 11px 10px; text-align: justify">
<td colspan="2" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; padding: 0px 10px 11px 10px; text-align: justify">
<br />
<font color="#2B7AC4"><strong>Schnittstellenmodul der IT-Recht Kanzlei München: Entspannter e-Commerce.</strong></font><br />
<font color="#EE7812"><strong>Schnittstellenmodul der IT-Recht Kanzlei München: Entspannter e-Commerce.</strong></font><br /><br />
<img src="images/it_recht_kanzlei/it_recht_kanzlei.png" /><img src="images/it_recht_kanzlei/pruefzeichen-partner3.png" align="right" />
<br />
<br />
<img src="images/it_recht_kanzlei/schutzpaket_grafik.png" align="right" />
admin/module_export.phpTop ca. Zeile 307
}
if ( (xtc_not_null($heading)) && (xtc_not_null($contents)) ) {
echo ' <td width="25%" valign="top">' . "\n";
echo box::infoBoxSt($heading, $contents); // cYbercOsmOnauT - 2011-02-07 - Changed methods of the classes box and tableBox to static
$box = new box;
echo $box->infoBox($heading, $contents);
//BOF NEW MODULE PROCESSING
if ($_GET['action']=='module_processing_do') {
echo $infotext;
}
admin/modules.phpTop ca. Zeile 334
}
}
if ( (xtc_not_null($heading)) && (xtc_not_null($contents)) ) {
echo ' <td width="25%" valign="top">' . "\n";
echo box::infoBoxSt($heading, $contents); // cYbercOsmOnauT - 2011-02-07 - Changed methods of the classes box and tableBox to static
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' </td>' . "\n";
}
?>
</tr>
admin/orders.phpTop ca. Zeile 30
require_once (DIR_FS_INC.'xtc_add_tax.inc.php');
require_once (DIR_FS_INC.'changedataout.inc.php');
require_once (DIR_FS_INC.'xtc_validate_vatid_status.inc.php');
require_once (DIR_FS_INC.'xtc_get_attributes_model.inc.php');
require_once (DIR_FS_INC.'get_tracking_link.inc.php');
//split page results
if(!defined('MAX_DISPLAY_ORDER_RESULTS')) {
define('MAX_DISPLAY_ORDER_RESULTS', 30);
ca. Zeile 83
o.delivery_country_iso_code_2,
ot.text as order_total
';
// track & trace
$carriers = array();
$carriers_query = xtc_db_query("SELECT carrier_id,
carrier_name
FROM ".TABLE_CARRIERS."
ORDER BY carrier_sort_order ASC");
while ($carrier = xtc_db_fetch_array($carriers_query)) {
$carriers[] = array('id' => $carrier['carrier_id'], 'text' => $carrier['carrier_name']);
}
//admin search bar
if ($action == 'search' && $oID) {
$orders_query_raw = "-- /admin/orders.php
SELECT ".$order_select_fields.",
ca. Zeile 147
$smarty->compile_dir = DIR_FS_CATALOG.'templates_c';
$smarty->config_dir = DIR_FS_CATALOG.'lang';
$send_by_admin = true;
$insert_id = $oID;
define('SEND_BY_ADMIN_PATH', DIR_FS_CATALOG);
require_once(DIR_FS_CATALOG.DIR_WS_CLASSES.'xtcPrice.php');
require_once(DIR_FS_INC.'xtc_href_link_from_admin.inc.php'); //-web28 - 2011-01-20 - LINKFIX
include (DIR_FS_CATALOG .'send_order.php');
break;
ca. Zeile 209
//send no order link to customers with guest account
if ($check_status['customers_status'] != DEFAULT_CUSTOMERS_STATUS_ID_GUEST) {
$smarty->assign('ORDER_LINK', xtc_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id='.$oID, 'SSL'));
}
// track & trace
$tracking_array = get_tracking_link($oID, $lang_code);
$smarty->assign('PARCEL_COUNT', count($tracking_array));
$smarty->assign('PARCEL_ARRAY', $tracking_array);
$smarty->assign('ORDER_DATE', xtc_date_long($check_status['date_purchased']));
$smarty->assign('NOTIFY_COMMENTS', nl2br($notify_comments));
$smarty->assign('ORDER_STATUS', $orders_status_array[$status]);
$html_mail = $smarty->fetch(CURRENT_TEMPLATE.'/admin/mail/'.$order->info['language'].'/change_order_mail.html');
ca. Zeile 309
case 'easybill':
include (DIR_WS_MODULES.'easybill.action.php');
xtc_redirect( xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('action')).'action=edit'));
break;
case 'inserttracking':
$oID = (int)$_GET['oID'];
$carrier_id = xtc_db_prepare_input($_POST['carrier_id']);
$parcel_id = xtc_db_prepare_input($_POST['parcel_id']);
if (defined('MODULE_SHIPCLOUD_STATUS') && MODULE_SHIPCLOUD_STATUS == 'True') {
require_once(DIR_FS_EXTERNAL.'shipcloud/class.shipcloud.php');
$shipcloud = new shipcloud($oID);
$shipcloud->create_label($_POST);
} else {
$sql_data_array = array('orders_id' => $oID,
'carrier_id' => $carrier_id,
'parcel_id' => $parcel_id);
xtc_db_perform(TABLE_ORDERS_TRACKING,$sql_data_array);
}
xtc_redirect(xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('action')).'action=edit'));
break;
case 'deletetracking':
$tracking_id = (int)$_GET['tID'];
xtc_db_query("DELETE FROM ".TABLE_ORDERS_TRACKING." WHERE tracking_id = '".(int)$tracking_id."'");
if (defined('MODULE_SHIPCLOUD_STATUS') && MODULE_SHIPCLOUD_STATUS == 'True') {
$messageStack->add_session(TEXT_DELETE_LABEL, 'warning');
}
xtc_redirect(xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('action')).'action=edit'));
break;
}
require (DIR_WS_INCLUDES.'head.php');
?>
ca. Zeile 664
</tr>
</table>
<!-- EOC ORDER BLOCK -->
<!-- BOC ORDER TRACK & TRACE BLOCK -->
<div class="heading"><?php echo TABLE_HEADING_TRACK_TRACE; ?></div>
<?php echo xtc_draw_form('carriers', FILENAME_ORDERS, xtc_get_all_get_params(array('action')) . 'action=inserttracking'); ?>
<table cellspacing="0" cellpadding="5" class="table borderall">
<tr>
<td class="smallText" align="center" style="width:100px;"><strong><?php echo TABLE_HEADING_CARRIER; ?></strong></td>
<td class="smallText" align="center"><strong><?php echo TABLE_HEADING_PARCEL_LINK; ?></strong></td>
<td class="smallText" align="center" style="width:150px;"><strong><?php echo TABLE_HEADING_ACTION; ?></strong></td>
</tr>
<?php
$service_array = array(
array('id' => 'standard', 'text' => 'Standard'),
array('id' => 'one_day', 'text' => 'Express'),
array('id' => 'one_day_early', 'text' => 'Express 10:00'),
array('id' => 'returns', 'text' => 'Retour'),
);
$parcel_array = array();
$dim_array = explode(';', preg_replace("'[\r\n\s]+'", '', MODULE_SHIPCLOUD_PARCEL));
for ($p=0, $pn=count($dim_array); $p<$pn; $p++) {
if ($dim_array[$p] != '') {
$parcel_array[] = array('id' => $dim_array[$p], 'text' => str_replace(',', 'cm x ', $dim_array[$p] .'cm'));
}
}
$tracking_array = get_tracking_link($oID, $lang_code);
if (count($tracking_array) > 0) {
foreach($tracking_array as $tracking) {
echo ' <tr>'.PHP_EOL;
echo ' <td class="smallText" align="center">'.$tracking['carrier_name'].'</td>'.PHP_EOL;
echo ' <td class="smallText" align="left"><a href="'.$tracking['tracking_link'].'" target="_blank">'.$tracking['parcel_id'].'</a></td>'.PHP_EOL;
echo ' <td class="smallText" align="center">
<a href="'.xtc_href_link(FILENAME_ORDERS, 'oID='.$oID.'&tID='.$tracking['tracking_id'].'&action=deletetracking').'">'.xtc_image(DIR_WS_ICONS.'cross.gif', ICON_DELETE).
((isset($tracking['sc_label_url']) && $tracking['sc_label_url'] != '') ? '<a style="margin-left:10px;" target="_blank" href="'.$tracking['sc_label_url'].'">'.xtc_image(DIR_WS_ICONS.'icon_pdf.gif', DOWNLOAD_LABEL).'</a>' : '').'
</td>'.PHP_EOL;
echo ' <tr>'.PHP_EOL;
}
}
?>
<tr>
<?php
if (defined('MODULE_SHIPCLOUD_STATUS') && MODULE_SHIPCLOUD_STATUS == 'True') {
echo '<td class="smallText" align="center" colspan="2">';
echo xtc_draw_pull_down_menu('carrier_id', $carriers, $carriers[0]).' ';
echo xtc_draw_pull_down_menu('service', $service_array, $service_array[0]).' ';
echo xtc_draw_pull_down_menu('parcel', $parcel_array, $parcel_array[0]).' ';
echo xtc_draw_input_field('description', '' , 'style="width:250px;vertical-align:top;" placeholder="'.TEXT_CARRIER_PLACEHOLDER.'"');
echo '</td>';
} else {
echo '<td class="smallText" align="center">'.xtc_draw_pull_down_menu('carrier_id', $carriers, $carriers[0]).'</td>';
echo '<td class="smallText" align="center">'.xtc_draw_input_field('parcel_id', '' ,'style="width: 99%"').'</td>';
}
?>
<td class="smallText" align="center">
<?php
if (defined('MODULE_SHIPCLOUD_STATUS') && MODULE_SHIPCLOUD_STATUS == 'True') {
?>
<input class="button" style="display:block; width:155px; margin: 7px auto" type="submit" value="<?php echo CREATE_LABEL; ?>">
<input class="button" style="display:block; width:155px; margin: 7px auto" type="submit" name="quote" value="<?php echo CHECK_LABEL_PRICE; ?>">
<?php
} else {
?>
<input class="button" type="submit" value="<?php echo BUTTON_INSERT; ?>">
<?php
}
?>
</td>
</tr>
</table>
</form>
<!-- EOC ORDER TRACK & TRACE BLOCK -->
<!-- BOC ORDER HISTORY BLOCK -->
<div class="heading"><?php echo TEXT_ORDER_HISTORY; ?></div>
<table cellspacing="0" cellpadding="2" class="table">
<tr>
ca. Zeile 766
<!-- BOC BUTTONS BLOCK -->
<table cellspacing="0" cellpadding="2" style="width:850px; margin-bottom:10px;">
<tr>
<td align="right">
<a class="button" href="<?php echo xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array ('oID', 'action')).'oID='.$oID.'&action=send&sta=0&stc=1&site=1'); ?>"><?php echo BUTTON_ORDER_CONFIRMATION; ?></a>
<a class="button" href="<?php echo xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array ('oID', 'action')).'oID='.$oID.'&action=send&site=1'); ?>"><?php echo BUTTON_ORDER_CONFIRMATION; ?></a>
<?php
if (ACTIVATE_GIFT_SYSTEM == 'true') {
echo '<a class="button" href="'.xtc_href_link(FILENAME_GV_MAIL, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$order->customer['ID']).'">'.BUTTON_SEND_COUPON.'</a>';
}
ca. Zeile 976
$contents[] = array ('align' => 'center', 'text' => '<a class="button" href="'.xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array ('oID', 'action')).'oID='.$oInfo->orders_id.'&action=edit').'">'.BUTTON_EDIT.'</a> <a class="button" href="'.xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array ('oID', 'action')).'oID='.$oInfo->orders_id.'&action=delete').'">'.BUTTON_DELETE.'</a>');
//BOF - Dokuman - 2012-06-19 - BILLSAFE payment module
if ($oInfo->payment_method === 'billsafe_2') {
$contents[] = array ('align' => 'center', 'text' => '<a class="button" href="billsafe_orders_2.php?oID='.$oInfo->orders_id.'">BillSAFE Details</a>');
} elseif ($oInfo->payment_method === 'billsafe_2hp') {
$contents[] = array ('align' => 'center', 'text' => '<a class="button" href="billsafe_orders_2hp.php?oID='.$oInfo->orders_id.'">BillSAFE Details</a>');
}
//EOF - Dokuman - 2012-06-19 - BILLSAFE payment module
if (AFTERBUY_ACTIVATED == 'true') {
$contents[] = array ('align' => 'center', 'text' => '<a class="button" href="'.xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array ('oID', 'action')).'oID='.$oInfo->orders_id.'&action=afterbuy_send').'">'.BUTTON_AFTERBUY_SEND.'</a>');
admin/payone_config.phpTop ca. Zeile 400
}
function getActiveCountries() {
$query = "SELECT * FROM `countries` WHERE `status` = 1";
$query = "SELECT *
FROM ".TABLE_COUNTRIES."
WHERE status = '1'";
$result = xtc_db_query($query);
$countries = array();
while($row = xtc_db_fetch_array($result)) {
$countries[$row['countries_iso_code_2']] = $row;
ca. Zeile 410
return $countries;
}
function getOrdersStatus($include_hidden = false) {
$query = "SELECT * FROM `orders_status` WHERE language_id = ".(int)$_SESSION['languages_id']." ORDER BY orders_status_id ASC";
$query = "SELECT *
FROM ".TABLE_ORDERS_STATUS."
WHERE language_id = ".(int)$_SESSION['languages_id']."
ORDER BY orders_status_id ASC";
$result = xtc_db_query($query);
$status = array();
if ($include_hidden == true) {
$status[-1] = 'unsichtbar';
ca. Zeile 451
$('h3').click(function(e) {
var the_block = $(this).next('.subblock');
var the_active_block = $(this);
$('h3 + .subblock').not(the_block).hide();
$('h3 + .subblock').not(the_block).slideUp(300);
$('h3').not(the_active_block).removeClass('active');
the_active_block.toggleClass('active');
if (the_active_block.hasClass('active')) {
the_block.show();
the_block.slideDown(300);
} else {
the_block.hide();
the_block.slideUp(300);
}
});
$('h4').click(function(e) {
ca. Zeile 471
$('h4').not(the_active_block).removeClass('active');
the_active_block.toggleClass('active');
if (the_active_block.hasClass('active')) {
the_block.show();
the_block.slideDown(300);
} else {
the_block.hide();
the_block.slideUp(300);
}
});
});
</script>
ca. Zeile 506
<tr>
<td rowspan="2" width="40px"><?php echo xtc_image(DIR_WS_ICONS.'heading_configuration.gif'); ?></td>
</tr>
<tr>
<td class="pageHeading" style="padding: 4px 0;" valign="top"><?php echo PAYONE_CONFIG_TITLE; ?></td>
<td class="pageHeading" style="padding: 4px 0;" valign="top"><?php echo PAYONE_CONFIG_TITLE; ?><span style="float:right;font-size:12px;padding-right:5px;">v<?php echo $payone->integrator_version; ?></span></td>
</tr>
</table>
</td>
</tr>
admin/payone_logs.phpTop ca. Zeile 25
require_once (DIR_FS_EXTERNAL.'payone/classes/PayoneModified.php');
$payone = new PayoneModified();
if ($payone->checkConfig() === false) {
xtc_redirect(xtc_href_link('payone_config.php'));
}
// check start and end Date
$startDate = "";
$startDateG = 0;
if (isset($_GET['startD']) && (xtc_not_null($_GET['startD'])) ) {
ca. Zeile 107
$event_id = (int)$_GET['event_id'];
$event_data = $payone->getLogData($mode, $event_id);
}
$day_array = array();
for ($i = 1; $i < 32; $i++) {
$day_array[] = array('id' => $i, 'text' => $i);
}
$month_array = array();
for ($i = 1; $i < 13; $i++) {
$month_array[] = array('id' => $i, 'text' => utf8_decode(strftime("%B", mktime(0, 0, 0, $i, 1)))); // Funktion decode_utf8 erst ab Shopversion 2.00 vorhanden
}
$year_array = array();
for ($i = 10; $i >= 0; $i--) {
$year_array[] = array('id' => date("Y") - $i, 'text' => date("Y") - $i);
}
require (DIR_WS_INCLUDES.'head.php');
?>
<style>
ca. Zeile 212
<?php foreach($messages as $msg) { ?>
<p class="message"><?php echo $msg; ?></p>
<?php } ?>
<?php echo xtc_draw_form('log', basename($PHP_SELF), '', 'get').xtc_draw_hidden_field(xtc_session_name(), xtc_session_id()); ?>
<?php echo xtc_draw_form('log', basename($PHP_SELF), '', 'get'); ?>
<table style="border: 1px solid #cccccc; width:100%; padding:5px; background:#f1f1f1;">
<tr>
<td class="menuBoxHeading">
<?php echo START_DATE;?>
<select name="startD" size="1">
<?php
if ($startDate) {
$j = date("j", $startDate);
} else {
$j = 1;
}
for ($i = 1; $i < 32; $i++) {
?>
<option value="<?php echo $i; ?>"<?php if ($j == $i) echo " selected"; ?>><?php echo $i; ?></option>
<?php
}
?>
</select>
<select name="startM" size="1">
<?php
if ($startDate) {
$m = date("n", $startDate);
} else {
$m = 1;
}
for ($i = 1; $i < 13; $i++) {
?>
<option value="<?php echo $i; ?>"<?php if ($m == $i) echo " selected"; ?>><?php echo strftime("%B", mktime(0, 0, 0, $i, 1)); ?></option>
<?php
}
?>
</select>
<select name="startY" size="1">
<?php
$day = $month = $year = 1;
if ($startDate) {
$y = date("Y") - date("Y", $startDate);
} else {
$y = 0;
}
for ($i = 10; $i >= 0; $i--) {
$day = date("j", $startDate);
$month = date("n", $startDate);
$year = date("Y") - date("Y", $startDate);
}
echo START_DATE;
echo xtc_draw_pull_down_menu('startD', $day_array, $day);
echo xtc_draw_pull_down_menu('startM', $month_array, $month);
echo xtc_draw_pull_down_menu('startY', $year_array, $year);
?>
<option value="<?php echo date("Y") - $i; ?>"<?php if ($y == $i) echo " selected"; ?>><?php echo date("Y") - $i; ?></option>
<?php
}
?>
</select>
</td>
<td class="menuBoxHeading">
<?php echo END_DATE; ?>
<select name="endD" size="1">
<?php
echo $endDate;
if ($endDate) {
$j = date("j", $endDate - (60 * 60 * 24));
} else {
$j = date("j");
}
for ($i = 1; $i < 32; $i++) {
?>
<option value="<?php echo $i; ?>"<?php if ($j == $i) echo " selected"; ?>><?php echo $i; ?></option>
<?php
}
?>
</select>
<select name="endM" size="1">
<?php
$day = date("j");
$month = date("n");
$year = 0;
if ($endDate) {
$m = date("n", $endDate - 60* 60 * 24);
} else {
$m = date("n");
}
for ($i = 1; $i < 13; $i++) {
$day = date("j", $endDate - (60 * 60 * 24));
$month = date("n", $endDate - 60* 60 * 24);
$year = date("Y") - date("Y", $endDate - 60* 60 * 24);
}
echo END_DATE;
echo xtc_draw_pull_down_menu('endD', $day_array, $day);
echo xtc_draw_pull_down_menu('endM', $month_array, $month);
echo xtc_draw_pull_down_menu('endY', $year_array, $year);
?>
<option value="<?php echo $i; ?>"<?php if ($m == $i) echo " selected"; ?>><?php echo strftime("%B", mktime(0, 0, 0, $i, 1)); ?></option>
<?php
}
?>
</select>
<select name="endY" size="1">
<?php
if ($endDate) {
$y = date("Y") - date("Y", $endDate - 60* 60 * 24);
} else {
$y = 0;
}
for ($i = 10; $i >= 0; $i--) {
?>
<option value="<?php echo date("Y") - $i; ?>"<?php if ($y == $i) echo " selected"; ?>><?php echo date("Y") - $i; ?></option>
<?php
}
?>
</select>
</td>
<td class="menuBoxHeading">
<select name="mode">
<option value="api" <?php echo $_GET['mode'] == 'api' ? 'selected="selected"' : '' ?>><?php echo API; ?></option>
<option value="transactions" <?php echo $_GET['mode'] == 'transactions' ? 'selected="selected"' : '' ?>><?php echo TRANSACTIONS; ?></option>
</select>
<?php echo xtc_draw_pull_down_menu('mode', array(array('id' => 'api', 'text' => API), array('id' => 'transactions', 'text' => TRANSACTIONS)), $_GET['mode']); ?>
</td>
<td class="menuBoxHeading">
<?php
echo SEARCH;
echo xtc_draw_input_field('search', $search, 'style="width: 135px"');
?>
</td>
<td class="menuBoxHeading">
<?php echo PAGE; ?>
<select name="page" id="pageselect">
<?php for($pageno = 1; $pageno <= $total_pages; $pageno++) { ?>
<option value="<?php echo $pageno; ?>" <?php echo (($pageno == $page) ? 'selected="selected"' : ''); ?>><?php echo $pageno ?></option>
<?php } ?>
</select>
<?php
echo PAGE;
$page_array = array();
for ($pageno = 1; $pageno <= $total_pages; $pageno++) {
$page_array[] = array('id' => $pageno, 'text' => $pageno);
}
echo xtc_draw_pull_down_menu('page', $page_array, $page);
?>
</td>
</tr>
</table>
<div class="main mrg5 txta-r">
admin/print_order.phpTop ca. Zeile 41
$smarty->assign('address_label_customer',xtc_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'));
$smarty->assign('address_label_shipping',xtc_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'));
$smarty->assign('address_label_payment',xtc_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />'));
$smarty->assign('csID',$order->customer['csID']);
$smarty->assign('vat_id',$order->customer['vat_id']);
$smarty->assign('vatID',$order->customer['vat_id']);
// get products data
include_once(DIR_FS_CATALOG.DIR_WS_CLASSES .'xtcPrice.php');
$xtPrice = new xtcPrice($order->info['currency'], $order->info['status']);
admin/print_packingslip.phpTop ca. Zeile 41
$smarty->assign('address_label_customer',xtc_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'));
$smarty->assign('address_label_shipping',xtc_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'));
$smarty->assign('address_label_payment',xtc_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />'));
$smarty->assign('csID',$order->customer['csID']);
$smarty->assign('vatID',$order->customer['vat_id']);
// get products data
include_once(DIR_FS_CATALOG.DIR_WS_CLASSES .'xtcPrice.php');
$xtPrice = new xtcPrice($order->info['currency'], $order->info['status']);
admin/products_vpe.phpTop ca. Zeile 228
break;
}
if ( (xtc_not_null($heading)) && (xtc_not_null($contents)) ) {
echo ' <td width="25%" valign="top">' . "\n";
echo box::infoBoxSt($heading, $contents); // cYbercOsmOnauT - 2011-02-07 - Changed methods of the classes box and tableBox to static
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' </td>' . "\n";
}
?>
</tr>
admin/shopgate.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
require_once 'includes/application_top.php';
include_once DIR_FS_CATALOG.'includes/external/shopgate/base/admin/shopgate.php';
include_once DIR_FS_CATALOG
. 'includes/external/shopgate/base/admin/shopgate.php';
api/it-recht-kanzlei/classes/class.api_it_recht_kanzlei.phpTop ca. Zeile 17
class it_recht_kanzlei {
var $modulversion = '1.4';
var $api_action_flag,
$api_version_flag,
$api_username_flag,
$user_password_flag,
ca. Zeile 26
$action,
$post_xml;
function __construct($post_xml) {
$this->set_shopversion();
// Catch errors - no data sent
(string)$post_xml = $post_xml;
// read POST-XML and remove form slashes
ca. Zeile 96
// Catch errors - rechtstext_language
if ($xml->rechtstext_language == '') {
$this->return_error('9');
} else {
require_once(DIR_WS_CLASSES.'language.php');
$lng = new language($xml->rechtstext_language);
$languages_id = $lng->language['id'];
if ($lng->language['code'] != $xml->rechtstext_language) {
$this->return_error('9');
ca. Zeile 159
$this->return_error('7');
}
// verify that file is a pdf
if ($this->check_if_pdf_file($file_pdf_target_temp) !== true) {
@unlink($file_pdf_target);
@unlink($file_pdf_target_temp);
$this->return_error('7');
}
// verify md5-hash, delete file if hash is not equal
if (md5_file($file_pdf_target_temp) != $xml->rechtstext_pdf_md5hash) {
ca. Zeile 204
$content_group = MODULE_API_IT_RECHT_KANZLEI_TYPE_IMP;
}
if ($content_group != '') {
$sql_data_array = array('content_text' => utf8_decode($xml->rechtstext_html.$pdf_file_text));
$check_query = xtc_db_query("SELECT content_text
FROM ".TABLE_CONTENT_MANAGER."
WHERE content_group = '".$content_group."'
AND languages_id = '".$languages_id."'
LIMIT 1");
$check = xtc_db_fetch_array($check_query);
if ($check['content_text'] == $this->charset_decode_utf_8($xml->rechtstext_html.$pdf_file_text)) {
$this->return_success();
} else {
$sql_data_array = array('content_text' => $this->charset_decode_utf_8($xml->rechtstext_html.$pdf_file_text));
xtc_db_perform(TABLE_CONTENT_MANAGER, $sql_data_array, 'update', "content_group = '".$content_group."' AND languages_id = '".$languages_id."'");
if (mysql_affected_rows() < 1) {
$check_content_query = xtc_db_query("SELECT content_text
FROM ".TABLE_CONTENT_MANAGER."
WHERE content_group = '".$content_group."'
AND languages_id = '".$languages_id."'");
$check_content = xtc_db_fetch_array($check_content_query);
if ($check_content['content_text'] != $sql_data_array['content_text']) {
$this->return_error('99');
}
}
}
} else {
$this->return_error('99');
}
ca. Zeile 257
return false;
}
}
function set_shopversion() {
if (!$this->shopversion) {
$query = xtc_db_query('SELECT * FROM database_version');
while ($row = xtc_db_fetch_array($query)) {
$this->shopversion = $row['version'];
}
}
}
function charset_decode_utf_8($string) {
if (!preg_match("/[\200-\237]/", $string) && !preg_match("/[\241-\377]/", $string)) {
return $string;
}
// decode three byte unicode characters
$string = preg_replace("/([\340-\357])([\200-\277])([\200-\277])/e", "'&#'.((ord('\\1')-224)*4096 + (ord('\\2')-128)*64 + (ord('\\3')-128)).';'", $string);
// decode two byte unicode characters
$string = preg_replace("/([\300-\337])([\200-\277])/e", "'&#'.((ord('\\1')-192)*64+(ord('\\2')-128)).';'", $string);
return html_entity_decode($string, ENT_COMPAT, 'ISO-8859-15');
}
// return error and end script
function return_error($errorcode) {
// output error
header('Content-type: application/xml; charset=utf-8');
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
echo "<response>\n";
echo " <status>error</status>\n";
echo " <error>".$errorcode."</error>\n";
echo " <meta_shopversion>".$this->shopversion."</meta_shopversion>\n";
echo " <meta_modulversion>".$this->modulversion."</meta_modulversion>\n";
echo "</response>";
exit();
}
ca. Zeile 276
header('Content-type: application/xml; charset=utf-8');
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
echo "<response>\n";
echo " <status>success</status>\n";
echo " <meta_shopversion>".$this->shopversion."</meta_shopversion>\n";
echo " <meta_modulversion>".$this->modulversion."</meta_modulversion>\n";
echo "</response>";
exit();
}
}
callback/paypal/ipn.phpTop ca. Zeile 1
<?php
/**
* Project: xt:Commerce - eCommerce Engine
* @version $Id
*
* xt:Commerce - Shopsoftware
* (c) 2003-2007 xt:Commerce (Winger/Zanier), http://www.xt-commerce.com
*
* xt:Commerce is a protected trademark and represented by the xt:Commerce GmbH (Austria)
*
* @copyright Copyright 2003-2007 xt:Commerce (Winger/Zanier), www.xt-commerce.com
* @license http://www.xt-commerce.com.com/license/2_0.txt GNU Public License V2.0
*
* For questions, help, comments, discussion, etc., please join the
* xt:Commerce Support Forums at www.xt-commerce.com
*
* Hamburger-Internetdienst Support Forums at www.forum.hamburger-internetdienst.de
* Stand 29.04.2009
*/
/* -----------------------------------------------------------------------------------------
$Id$
modified eCommerce Shopsoftware
http://www.modified-shop.org
Copyright (c) 2009 - 2013 [www.modified-shop.org]
-----------------------------------------------------------------------------------------
based on:
(c) 2003-2007 xt:Commerce (Winger/Zanier), http://www.xt-commerce.com
(c) 2008 Hamburger-Internetdienst, www.forum.hamburger-internetdienst.de
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
include('../../includes/application_top_callback.php');
include(DIR_WS_CLASSES . 'language.php');
$lng = new language(xtc_input_validation($_GET['language'], 'char', ''));
if(!isset($_GET['language']))
if(!isset($_GET['language'])) {
$lng->get_browser_language();
}
include(DIR_WS_LANGUAGES.$lng->language['directory'].'/'.$lng->language['directory'].'.php');
// nur zum Testen Dateien in ein Verzeichnis root/paypaltest
//foreach ($_POST as $key => $value) {
//}
//$file='paypal_'.date('d.m.Y-H.i.s').'.txt';
//$fp = fopen('../../paypaltest/' . $file, "a");
//fwrite($fp, $text);
//fclose($fp);
// testen ende
require_once('../../includes/classes/paypal_checkout.php');
require_once(DIR_WS_CLASSES.'paypal_checkout.php');
$o_paypal = new paypal_checkout();
if(is_array($_POST)) {
$response = $o_paypal->callback_process($_POST,$lng->language['language_charset']);
}
checkout_confirmation.phpTop ca. Zeile 192
$form_action_url = $$_SESSION['payment']->form_action_url;
} else {
$form_action_url = xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
}
$smarty->assign('CHECKOUT_FORM', xtc_draw_form('checkout_confirmation', $form_action_url, 'post'));
$smarty->assign('CHECKOUT_FORM', xtc_draw_form('checkout_confirmation', $form_action_url, 'post', 'name="checkout_confirmation"'));
$payment_button = '';
if (is_array($payment_modules->modules)) {
$payment_button .= $payment_modules->process_button();
}
$smarty->assign('MODULE_BUTTONS', $payment_button);
$smarty->assign('CHECKOUT_BUTTON', xtc_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n");
$smarty->assign('CHECKOUT_BUTTON', xtc_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER, (($_SESSION['payment'] == 'payone_cc') ? 'onclick="return payoneCheck();"' : '')) . '</form>' . "\n");
//check if display conditions on checkout page is true
if (DISPLAY_REVOCATION_ON_CHECKOUT == 'true') {
//revocation
checkout_payment.phpTop ca. Zeile 137
$smarty->assign('BUTTON_ADDRESS', '<a href="' . xtc_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . xtc_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>');
$smarty->assign('BUTTON_CONTINUE', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
$smarty->assign('FORM_END', '</form>');
require (DIR_WS_INCLUDES . 'header.php');
$module_smarty = new Smarty;
$order_total = $xtPrice->xtcFormat($order->info['total'],false); //web28 2012-04-27 - rounded $order_total
if ($order_total > 0) {
if (isset ($_GET['payment_error']) && is_object(${ $_GET['payment_error'] }) && ($error = ${$_GET['payment_error']}->get_error())) {
ca. Zeile 191
if (ACTIVATE_GIFT_SYSTEM == 'true') {
$smarty->assign('module_gift', $order_total_modules->credit_selection());
}
// move header for Javascript form check
require (DIR_WS_INCLUDES . 'header.php');
$module_smarty->caching = 0;
$payment_block = $module_smarty->fetch(CURRENT_TEMPLATE . '/module/checkout_payment_block.html');
$smarty->assign('COMMENTS', xtc_draw_textarea_field('comments', 'soft', '60', '5', isset($_SESSION['comments']) ? $_SESSION['comments'] : '') . xtc_draw_hidden_field('comments_added', 'YES'));
ca. Zeile 210
$smarty->assign('AGB_checkbox', '<input type="checkbox" value="conditions" name="conditions" id="conditions" />');
}
}
//BOF - Dokuman - 2012-06-19 - BILLSAFE payment module
if ($_GET['billsafe_close'] == 'true' || $_GET['payment_error'] == 'billsafe_2' || $_GET['payment_error'] == 'billsafe_2hp') echo '<script type="text/javascript"> if (top.lpg) top.lpg.close("'.xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message='.stripslashes(urlencode(html_entity_decode($_GET['error_message']))), 'SSL').'"); </script>';
//EOF - Dokuman - 2012-06-19 - BILLSAFE payment module
### BILLSAFE payment module
if ((isset($_GET['billsafe_close']) && $_GET['billsafe_close'] == 'true')
|| (isset($_GET['payment_error']) && $_GET['payment_error'] == 'billsafe_2')) {
echo '<script type="text/javascript"> if (top.lpg) top.lpg.close("'.xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message='.stripslashes(urlencode(html_entity_decode($_GET['error_message']))), 'SSL').'"); </script>';
}
### BILLSAFE payment module
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('PAYMENT_BLOCK', $payment_block);
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/checkout_payment.html');
checkout_process.phpTop ca. Zeile 255
$customer_notification = (SEND_EMAILS == 'true') ? '1' : '0';
$sql_data_array = array ('orders_id' => $insert_id,
'orders_status_id' => $order->info['order_status'],
'orders_status_id' => $tmp_status,
'date_added' => 'now()',
'customer_notified' => $customer_notification,
'comments' => $order->info['comments']);
xtc_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
checkout_success.phpTop ca. Zeile 73
$orders = xtc_db_fetch_array($orders_query);
$last_order = $orders['orders_id'];
$order_status = $orders['orders_status'];
//BOF - GTB - 2012-10-10 - include Vorkasse by Sofort
if (isset($_GET['vorkasse']) && $_GET['vorkasse']=='sofort') {
include (DIR_WS_MODULES.'sofort_vorkasse.php');
}
//EOF - GTB - 2012-10-10 - include Vorkasse by Sofort
//BOF - web28 - 2010-03-27 PayPal Bezahl-Link
if (isset($_SESSION['paypal_link']) && MODULE_PAYMENT_PAYPAL_IPN_USE_CHECKOUT == 'True') {
$smarty->assign('PAYPAL_LINK',$_SESSION['paypal_link']);
unset ($_SESSION['paypal_link']);
create_account.phpTop ca. Zeile 277
}
if (ACCOUNT_STATE == 'true') {
if ($zone_id > 0) {
$sql_data_array['entry_zone_id'] = $zone_id;
$sql_data_array['entry_state'] = '';
$sql_data_array['entry_state'] = $state;
} else {
$sql_data_array['entry_zone_id'] = '0';
$sql_data_array['entry_state'] = $state;
}
create_guest_account.phpTop ca. Zeile 259
}
if (ACCOUNT_STATE == 'true') {
if ($zone_id > 0) {
$sql_data_array['entry_zone_id'] = $zone_id;
$sql_data_array['entry_state'] = '';
$sql_data_array['entry_state'] = $state;
} else {
$sql_data_array['entry_zone_id'] = '0';
$sql_data_array['entry_state'] = $state;
}
export/idealo/idealo_csv_definition.phpTop ca. Zeile 71
}
define('NEW_IDEALO_CSV_VERSION_TEXT', $_csv_new_idealo_version_text);
define('MODULE_IDEALO_CSV_TEXT_DESCRIPTION', 'CSV - Idealo');
define('MODULE_IDEALO_CSV_TEXT_TITLE', '<img src="//cdn.idealo.com/ipc/1/-WmNoOZsF/pics/logos/logo_blue_small.png"/> - CSV');
define('MODULE_IDEALO_CSV_TEXT_TITLE', xtc_image(DIR_WS_CATALOG.'export/idealo/logo_blue_small.png').' - CSV');
define('MODULE_IDEALO_CSV_FILE_TITLE' , '<hr noshade>User');
define('MODULE_IDEALO_CSV_FILE_DESC' , 'Geben Sie an, unter welchen Namen die Datei gescheichert werden soll. z.B. idealo.csv' );
export/idealo_realtime/idealo_definition.phpTop ca. Zeile 79
}
define( 'NEW_IDEALO_REALTIME_VERSION_TEXT', $new_idealo_version_text );
define( 'MODULE_IDEALO_REALTIME_TEXT_DESCRIPTION', 'Realtime - Idealo' );
define( 'MODULE_IDEALO_REALTIME_TEXT_TITLE', '<img src="//cdn.idealo.com/ipc/1/-WmNoOZsF/pics/logos/logo_blue_small.png"/> - Realtime');
define( 'MODULE_IDEALO_REALTIME_TEXT_TITLE', xtc_image(DIR_WS_CATALOG.'export/idealo_realtime/logo_blue_small.png').' - Realtime');
define('MODULE_IDEALO_REALTIME_FILE_TITLE' , '<hr noshade>User');
define('MODULE_IDEALO_REALTIME_FILE_DESC' , 'Ihr Benutzername für den Webservice. Falls Sie noch nicht für die Nutzung des Webservice freigeschaltet sind, wenden Sie sich bitte an csv@idealo.de' );
inc/get_cross_sell_name.inc.phpTop ca. Zeile 14
function xtc_get_cross_sell_name($cross_sell_group, $language_id = '') {
if (!$language_id)
$language_id = $_SESSION['languages_id'];
$cross_sell_query = xtc_db_query("select groupname from ".TABLE_PRODUCTS_XSELL_GROUPS." where products_xsell_grp_name_id = '".$cross_sell_group."' and language_id = '".$language_id."'");
$cross_sell_query = xtc_db_query("select groupname from ".TABLE_PRODUCTS_XSELL_GROUPS." where products_xsell_grp_name_id = '".xtc_db_input((int)$cross_sell_group)."' and language_id = '".xtc_db_input((int)$language_id)."'");
$cross_sell = xtc_db_fetch_array($cross_sell_query);
return $cross_sell['groupname'];
}
inc/html_encoding.phpTop ca. Zeile 34
$default_charset = isset($_SESSION['language_charset']) && in_array(strtoupper($_SESSION['language_charset']), $supported_charsets) ? strtoupper($_SESSION['language_charset']) : ENCODE_DEFAULT_CHARSET;
$encoding = !empty($encoding) && in_array(strtoupper($encoding), $supported_charsets) ? strtoupper($encoding) : $default_charset;
return htmlspecialchars($string, $flags , $encoding);
}
/**
* decode_htmlentities
*/
function decode_htmlentities ($string, $flags = ENT_COMPAT, $encoding = '')
{
$supported_charsets = explode(',',strtoupper(ENCODE_DEFINED_CHARSETS));
$default_charset = isset($_SESSION['language_charset']) && in_array(strtoupper($_SESSION['language_charset']), $supported_charsets) ? strtoupper($_SESSION['language_charset']) : ENCODE_DEFAULT_CHARSET;
$encoding = !empty($encoding) && in_array(strtoupper($encoding), $supported_charsets) ? strtoupper($encoding) : $default_charset;
return html_entity_decode($string, $flags , $encoding);
}
/**
* decode_htmlspecialchars
*/
function decode_htmlspecialchars ($string, $flags = ENT_COMPAT, $encoding = '')
{
$supported_charsets = explode(',',strtoupper(ENCODE_DEFINED_CHARSETS));
$default_charset = isset($_SESSION['language_charset']) && in_array(strtoupper($_SESSION['language_charset']), $supported_charsets) ? strtoupper($_SESSION['language_charset']) : ENCODE_DEFAULT_CHARSET;
$encoding = !empty($encoding) && in_array(strtoupper($encoding), $supported_charsets) ? strtoupper($encoding) : $default_charset;
return htmlspecialchars_decode($string, $flags , $encoding);
}
/**
* get_supported_charset
*/
function get_supported_charset($charset = '')
{
$charset = !empty($charset) ? $charset : (isset($_SESSION['language_charset']) ? $_SESSION['language_charset'] : null);
$supported_charsets = explode(',',strtoupper(ENCODE_DEFINED_CHARSETS));
$default_charset = isset($charset) && in_array(strtoupper($charset), $supported_charsets) ? strtoupper($charset) : ENCODE_DEFAULT_CHARSET;
return $default_charset;
}
inc/shopstat_functions.inc.phpTop ca. Zeile 60
require_once(DIR_FS_INC . 'xtc_get_manufacturers.inc.php');
}
//-- XTC
(!isset($languages_id)) ? $languages_id = $_SESSION['languages_id'] : false;
(!isset($languages_id)) ? $languages_id = (int)$_SESSION['languages_id'] : false;
//BOF - web28 - 2010-08-18 -- Die Parameter aufspalten
$pararray = array();
foreach(explode("&",$parameters) as $pair) {
ca. Zeile 79
$pager = (isset($pararray['page']))?$pararray['page']:false;
$lang = (isset($pararray['language']))?$pararray['language']:'';
$sort = (isset($pararray['sort']))?$pararray['sort']:'';
$filter_id = (isset($pararray['filter_id']))?$pararray['filter_id']:'';
$viewmode = (isset($pararray['viewmode']))?$pararray['viewmode']:'';
$view_mode = (isset($pararray['viewmode']))?$pararray['view_mode']:'';
$prllset = (isset($pararray['prllset']))?$pararray['prllset']:'';
$action = (isset($pararray['action']))?$pararray['action']:'';
//EOF - web28 - 2010-08-18 -- Die Parameter aufspalten
$go = true;
ca. Zeile 93
$go = false;
} elseif (strlen($filter_id)>0) {
//-- Sortieren der Herstellerprodukte
$go = false;
} elseif (strlen($view_mode)>0) {
$go = false;
} elseif (strlen($viewmode)>0) {
$go = false;
} elseif (strlen($prllset)>0) {
$go = false;
} elseif (strlen($action)>0) {
//-- Andere Aktion
$go = false;
}
ca. Zeile 173
if(empty($cPath)) {
return;
}
if(empty($language)){
$language = $_SESSION['languages_id'];
$language = (int)$_SESSION['languages_id'];
}
$path = explode("_",$cPath);
$categories = array();
inc/xtc_address_format.inc.phpTop ca. Zeile 18
require_once(DIR_FS_INC . 'xtc_get_zone_code.inc.php');
require_once(DIR_FS_INC . 'xtc_get_country_name.inc.php');
function xtc_address_format($address_format_id, $address, $html, $boln, $eoln) {
$address_format_query = xtc_db_query("select address_format as format from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . $address_format_id . "'");
$address_format_query = xtc_db_query("select address_format as format from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . xtc_db_input((int)$address_format_id) . "'");
$address_format = xtc_db_fetch_array($address_format_query);
$company = addslashes($address['company']);
$firstname = addslashes($address['firstname']);
inc/xtc_address_label.inc.phpTop ca. Zeile 17
// include needed functions
require_once(DIR_FS_INC . 'xtc_get_address_format_id.inc.php');
require_once(DIR_FS_INC . 'xtc_address_format.inc.php');
function xtc_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n") {
$address_query = xtc_db_query("select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customers_id . "' and address_book_id = '" . $address_id . "'");
$address_query = xtc_db_query("select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . xtc_db_input((int)$customers_id) . "' and address_book_id = '" . xtc_db_input((int)$address_id) . "'");
$address = xtc_db_fetch_array($address_query);
$format_id = xtc_get_address_format_id($address['country_id']);
inc/xtc_address_summary.inc.phpTop ca. Zeile 18
function xtc_address_summary($customers_id, $address_id) {
$customers_id = xtc_db_prepare_input($customers_id);
$address_id = xtc_db_prepare_input($address_id);
$address_query = xtc_db_query("select ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_state, ab.entry_country_id, ab.entry_zone_id, c.countries_name, c.address_format_id from " . TABLE_ADDRESS_BOOK . " ab, " . TABLE_COUNTRIES . " c where ab.address_book_id = '" . xtc_db_input($address_id) . "' and ab.customers_id = '" . xtc_db_input($customers_id) . "' and ab.entry_country_id = c.countries_id");
$address_query = xtc_db_query("select ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_state, ab.entry_country_id, ab.entry_zone_id, c.countries_name, c.address_format_id from " . TABLE_ADDRESS_BOOK . " ab, " . TABLE_COUNTRIES . " c where ab.address_book_id = '" . xtc_db_input((int)$address_id) . "' and ab.customers_id = '" . xtc_db_input((int)$customers_id) . "' and ab.entry_country_id = c.countries_id");
$address = xtc_db_fetch_array($address_query);
$street_address = $address['entry_street_address'];
$suburb = $address['entry_suburb'];
ca. Zeile 28
$city = $address['entry_city'];
$state = xtc_get_zone_code($address['entry_country_id'], $address['entry_zone_id'], $address['entry_state']);
$country = $address['countries_name'];
$address_format_query = xtc_db_query("select address_summary from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . $address['address_format_id'] . "'");
$address_format_query = xtc_db_query("select address_summary from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . (int)$address['address_format_id'] . "'");
$address_format = xtc_db_fetch_array($address_format_query);
// eval("\$address = \"{$address_format['address_summary']}\";");
$address_summary = $address_format['address_summary'];
inc/xtc_banner_exists.inc.phpTop ca. Zeile 16
---------------------------------------------------------------------------------------*/
require_once(DIR_FS_INC.'xtc_random_select.inc.php');
function xtc_banner_exists($action, $identifier) {
if ($action == 'dynamic') {
return xtc_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
return xtc_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . xtc_db_input($identifier) . "'");
} elseif ($action == 'static') {
$banner_query = xtc_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . $identifier . "'");
$banner_query = xtc_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . xtc_db_input($identifier) . "'");
return xtc_db_fetch_array($banner_query);
} else {
return false;
}
inc/xtc_check_categories_status.inc.phpTop ca. Zeile 20
parent_id,
categories_status
FROM ".TABLE_CATEGORIES."
WHERE
categories_id = '".(int) $categories_id."'";
categories_id = '".xtc_db_input((int)$categories_id)."'";
$categorie_query = xtDBquery($categorie_query);
$categorie_data = xtc_db_fetch_array($categorie_query, true);
ca. Zeile 42
$categorie_query = "SELECT
categories_id
FROM ".TABLE_PRODUCTS_TO_CATEGORIES."
WHERE products_id='".$product_id."'";
WHERE products_id='".xtc_db_input((int)$product_id)."'";
$categorie_query = xtDBquery($categorie_query);
while ($categorie_data = xtc_db_fetch_array($categorie_query, true)) {
inc/xtc_collect_posts.inc.phpTop ca. Zeile 43
and coupon_active = 'Y'");
$gv_result = xtc_db_fetch_array($gv_query);
if (xtc_db_num_rows($gv_query) != 0) {
$redeem_query = xtc_db_query("select * from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $gv_result['coupon_id'] . "'");
$redeem_query = xtc_db_query("select * from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . xtc_db_input($gv_result['coupon_id']) . "'");
if ( (xtc_db_num_rows($redeem_query) != 0) && ($gv_result['coupon_type'] == 'G') ) {
xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART, 'info_message=' . urlencode(ERROR_NO_INVALID_REDEEM_GV), 'NONSSL')); // web28 - 2011-04-14 - change SSL -> NONSSL
}
} else {
ca. Zeile 60
// customer id of claimant
// date
// redemption flag
// now update customer account with gv_amount
$gv_amount_query = xtc_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $_SESSION['customer_id'] . "'");
$gv_amount_query = xtc_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . xtc_db_input((int)$_SESSION['customer_id']) . "'");
$customer_gv = false;
$total_gv_amount = $gv_amount;
if ($gv_amount_result = xtc_db_fetch_array($gv_amount_query)) {
$total_gv_amount = $gv_amount_result['amount'] + $gv_amount;
$customer_gv = true;
}
$gv_update = xtc_db_query("update " . TABLE_COUPONS . " set coupon_active = 'N' where coupon_id = '" . $gv_result['coupon_id'] . "'");
$gv_redeem = xtc_db_query("insert into " . TABLE_COUPON_REDEEM_TRACK . " (coupon_id, customer_id, redeem_date, redeem_ip) values ('" . $gv_result['coupon_id'] . "', '" . $_SESSION['customer_id'] . "', now(),'" . $REMOTE_ADDR . "')");
$gv_update = xtc_db_query("update " . TABLE_COUPONS . " set coupon_active = 'N' where coupon_id = '" . xtc_db_input($gv_result['coupon_id']) . "'");
$gv_redeem = xtc_db_query("insert into " . TABLE_COUPON_REDEEM_TRACK . " (coupon_id, customer_id, redeem_date, redeem_ip) values ('" . xtc_db_input($gv_result['coupon_id']) . "', '" . xtc_db_input((int)$_SESSION['customer_id']) . "', now(),'" . $REMOTE_ADDR . "')");
if ($customer_gv) {
// already has gv_amount so update
$gv_update = xtc_db_query("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $total_gv_amount . "' where customer_id = '" . $_SESSION['customer_id'] . "'");
$gv_update = xtc_db_query("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $total_gv_amount . "' where customer_id = '" . xtc_db_input((int)$_SESSION['customer_id']) . "'");
} else {
// no gv_amount so insert
$gv_insert = xtc_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $_SESSION['customer_id'] . "', '" . $total_gv_amount . "')");
$gv_insert = xtc_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . xtc_db_input((int)$_SESSION['customer_id']) . "', '" . $total_gv_amount . "')");
}
xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART, 'info=1info_message=' . urlencode(REDEEMED_AMOUNT. $xtPrice->xtcFormat($gv_amount,true,0,true)), 'NONSSL')); // web28 - 2011-04-13 New class distinction error / info // web28 - 2011-04-14 - change SSL -> NONSSL
ca. Zeile 109
if (xtc_db_num_rows($date_query)==0) {
xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART, 'info_message=' . urlencode(ERROR_INVALID_FINISDATE_COUPON), 'NONSSL')); // web28 - 2011-04-14 - change SSL -> NONSSL
}
$coupon_count = xtc_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $gv_result['coupon_id']."'");
$coupon_count_customer = xtc_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $gv_result['coupon_id']."' and customer_id = '" . $_SESSION['customer_id'] . "'");
$coupon_count = xtc_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . xtc_db_input($gv_result['coupon_id'])."'");
$coupon_count_customer = xtc_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $gv_result['coupon_id']."' and customer_id = '" . xtc_db_input((int)$_SESSION['customer_id']) . "'");
if (xtc_db_num_rows($coupon_count)>=$gv_result['uses_per_coupon'] && $gv_result['uses_per_coupon'] > 0) {
xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART, 'info_message=' . urlencode(ERROR_INVALID_USES_COUPON . $gv_result['uses_per_coupon'] . TIMES ), 'NONSSL')); // web28 - 2011-04-14 - change SSL -> NONSSL
}
inc/xtc_count_products_in_category.inc.phpTop ca. Zeile 20
$group_check = ''; //DokuMan - 2010-03-12 - set undefined variable
//BOF - Dokuman - 2009-09-02: do not count products when GROUP_CHECK disabled
if(GROUP_CHECK == 'true') {
$group_check = " AND p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
$group_check = " AND p.group_permission_".xtc_db_input((int)$_SESSION['customers_status']['customers_status_id'])."=1 ";
}
//EOF - Dokuman - 2009-09-02: do not count products when GROUP_CHECK disabled
$products_count = 0;
if ($include_inactive == true) {
//BOF - Dokuman - 2009-09-02: do not count products when GROUP_CHECK disabled
//$products_query = "select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p2c.categories_id = '" . $category_id . "'";
$products_query = "select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p2c.categories_id = '" . $category_id . "'".$group_check;
$products_query = "select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p2c.categories_id = '" . xtc_db_input((int)$category_id) . "'".$group_check;
//EOF - Dokuman - 2009-09-02: do not count products when GROUP_CHECK disabled
} else {
//BOF - Dokuman - 2009-09-02: do not count products when GROUP_CHECK disabled
//$products_query = "select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p.products_status = '1' and p2c.categories_id = '" . $category_id . "'";
$products_query = "select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p.products_status = '1' and p2c.categories_id = '" . $category_id . "'".$group_check;
$products_query = "select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p.products_status = '1' and p2c.categories_id = '" . xtc_db_input((int)$category_id) . "'".$group_check;
//EOF - Dokuman - 2009-09-02: do not count products when GROUP_CHECK disabled
}
$products_query = xtDBquery($products_query);
ca. Zeile 45
$products_count += $products['total'];
//BOF - Dokuman - 2009-09-02: do not count products when GROUP_CHECK disabled
if(GROUP_CHECK == 'true') {
$group_check = " AND group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
$group_check = " AND group_permission_".xtc_db_input((int)$_SESSION['customers_status']['customers_status_id'])."=1 ";
}
//$child_categories_query = "select categories_id from " . TABLE_CATEGORIES . " where parent_id = '" . $category_id . "'";
$child_categories_query = "select categories_id from " . TABLE_CATEGORIES . " where parent_id = '" . $category_id . "'".$group_check;
$child_categories_query = "select categories_id from " . TABLE_CATEGORIES . " where parent_id = '" . xtc_db_input((int)$category_id) . "'".$group_check;
//EOF - Dokuman - 2009-09-02: do not count products when GROUP_CHECK disabled
$child_categories_query = xtDBquery($child_categories_query);
if (xtc_db_num_rows($child_categories_query,true)) {
inc/xtc_currency_exists.inc.phpTop ca. Zeile 18
function xtc_currency_exists($code) {
$param ='/[^a-zA-Z]/';
$code=preg_replace($param,'',$code);
$currency_code = xtc_db_query("SELECT code, currencies_id from " . TABLE_CURRENCIES . " WHERE code = '" . $code . "' LIMIT 1");
$currency_code = xtc_db_query("SELECT code, currencies_id from " . TABLE_CURRENCIES . " WHERE code = '" . xtc_db_input($code) . "' LIMIT 1");
if (xtc_db_num_rows($currency_code)) {
$curr = xtc_db_fetch_array($currency_code);
if ($curr['code'] == $code) {
return $code;
inc/xtc_customer_greeting.inc.phpTop ca. Zeile 19
function xtc_customer_greeting() {
if (isset($_SESSION['customer_last_name']) && isset($_SESSION['customer_id'])) {
if (!isset($_SESSION['customer_gender'])) {
$check_customer_query = "select customers_gender FROM " . TABLE_CUSTOMERS . " where customers_id = '" . $_SESSION['customer_id'] . "'";
$check_customer_query = "select customers_gender FROM " . TABLE_CUSTOMERS . " where customers_id = '" . xtc_db_input((int)$_SESSION['customer_id']) . "'";
$check_customer_query = xtDBquery($check_customer_query);
$check_customer_data = xtc_db_fetch_array($check_customer_query,true);
$_SESSION['customer_gender'] = $check_customer_data['customers_gender'];
}
inc/xtc_display_banner.inc.phpTop ca. Zeile 17
// Display a banner from the specified group or banner id ($identifier)
function xtc_display_banner($action, $identifier) {
if ($action == 'dynamic') {
$banners_query = xtc_db_query("select count(*) as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
$banners_query = xtc_db_query("select count(*) as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . xtc_db_input($identifier) . "'");
$banners = xtc_db_fetch_array($banners_query);
if ($banners['count'] > 0) {
$banner = xtc_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
$banner = xtc_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . xtc_db_input($identifier) . "'");
} else {
return '<strong>XTC ERROR! (xtc_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</strong>';
}
} elseif ($action == 'static') {
if (is_array($identifier)) {
$banner = $identifier;
} else {
$banner_query = xtc_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . $identifier . "'");
$banner_query = xtc_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . xtc_db_input($identifier) . "'");
if (xtc_db_num_rows($banner_query)) {
$banner = xtc_db_fetch_array($banner_query);
} else {
return '<strong>XTC ERROR! (xtc_display_banner(' . $action . ', ' . $identifier . ') -> Banner with ID \'' . $identifier . '\' not found, or status inactive</strong>';
inc/xtc_findTitle.inc.phpTop ca. Zeile 21
---------------------------------------------------------------------------------------*/
function xtc_findTitle($current_pid, $languageFilter) {
$query = "SELECT * FROM ".TABLE_PRODUCTS_DESCRIPTION." where language_id = '" . $_SESSION['languages_id'] . "' AND products_id = '" . $current_pid . "'";
$query = "SELECT * FROM ".TABLE_PRODUCTS_DESCRIPTION." where language_id = '" . xtc_db_input((int)$_SESSION['languages_id']) . "' AND products_id = '" . xtc_db_input((int)$current_pid) . "'";
$result = xtc_db_query($query);
$matches = xtc_db_num_rows($result);
inc/xtc_format_price.inc.phpTop ca. Zeile 24
symbol_right,
decimal_places,
value
FROM ". TABLE_CURRENCIES ." WHERE
code = '".$_SESSION['currency'] ."'");
code = '".xtc_db_input($_SESSION['currency']) ."'");
$currencies_value=xtc_db_fetch_array($currencies_query);
$currencies_data=array();
$currencies_data=array(
'SYMBOL_LEFT'=>$currencies_value['symbol_left'] ,
ca. Zeile 45
decimal_point,
thousands_point,
value
FROM ". TABLE_CURRENCIES ." WHERE
code = '".$_SESSION['currency'] ."'");
code = '".xtc_db_input($_SESSION['currency']) ."'");
$currencies_value=xtc_db_fetch_array($currencies_query);
$price_string=number_format($price_string,$currencies_data['DECIMAL_PLACES'], $currencies_value['decimal_point'], $currencies_value['thousands_point']);
if ($show_currencies == 1) {
$price_string = $currencies_data['SYMBOL_LEFT']. ' '.$price_string.' '.$currencies_data['SYMBOL_RIGHT'];
inc/xtc_format_price_order.inc.phpTop ca. Zeile 23
symbol_right,
decimal_places,
value
FROM ". TABLE_CURRENCIES ." WHERE
code = '".$currency ."'");
code = '".xtc_db_input($currency)."'");
$currencies_value=xtc_db_fetch_array($currencies_query);
$currencies_data=array();
$currencies_data=array(
'SYMBOL_LEFT'=>$currencies_value['symbol_left'] ,
ca. Zeile 41
decimal_point,
thousands_point,
value
FROM ". TABLE_CURRENCIES ." WHERE
code = '".$currency ."'");
code = '".xtc_db_input($currency)."'");
$currencies_value=xtc_db_fetch_array($currencies_query);
$price_string=number_format($price_string,$currencies_data['DECIMAL_PLACES'], $currencies_value['decimal_point'], $currencies_value['thousands_point']);
if ($show_currencies == 1) {
$price_string = $currencies_data['SYMBOL_LEFT']. ' '.$price_string.' '.$currencies_data['SYMBOL_RIGHT'];
inc/xtc_get_address_format_id.inc.phpTop ca. Zeile 15
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
function xtc_get_address_format_id($country_id) {
$address_format_query = xtc_db_query("select address_format_id as format_id from " . TABLE_COUNTRIES . " where countries_id = '" . $country_id . "'");
$address_format_query = xtc_db_query("select address_format_id as format_id from " . TABLE_COUNTRIES . " where countries_id = '" . xtc_db_input((int)$country_id) . "'");
if (xtc_db_num_rows($address_format_query)) {
$address_format = xtc_db_fetch_array($address_format_query);
return $address_format['format_id'];
} else {
inc/xtc_get_attributes_model.inc.phpTop ca. Zeile 15
function xtc_get_attributes_model($product_id, $attribute_name,$options_name,$language='')
{
if ($language=='') $language=(int)$_SESSION['languages_id'];
//BOF - Tomcraft - 2009-10-06 - ADDED addslashes by $option_name, $attribute_name
//BOF - Hetfield - 2009-08-11 - BUGFIX: #0000211 wrong modelnumbers on atrributes
$options_value_id_query=xtc_db_query("SELECT
pa.attributes_model
FROM
".TABLE_PRODUCTS_ATTRIBUTES." pa
INNER JOIN ".TABLE_PRODUCTS_OPTIONS." po ON po.products_options_id = pa.options_id
INNER JOIN ".TABLE_PRODUCTS_OPTIONS_VALUES." pov ON pa.options_values_id = pov.products_options_values_id
WHERE
po.language_id = '".$language."' AND
pa.products_id = '".$product_id."' AND
po.products_options_name = '".addslashes($options_name)."' AND
pov.language_id = '".$language."' AND
pov.products_options_values_name = '".addslashes($attribute_name)."' AND
pa.products_id='".$product_id."'");
po.language_id = '".xtc_db_input((int)$language)."' AND
pa.products_id = '".xtc_db_input((int)$product_id)."' AND
po.products_options_name = '".xtc_db_input($options_name)."' AND
pov.language_id = '".xtc_db_input((int)$language)."' AND
pov.products_options_values_name = '".xtc_db_input($attribute_name)."' AND
pa.products_id = '".xtc_db_input((int)$product_id)."'");
//EOF - Hetfield - 2009-08-11 - BUGFIX: #0000211 wrong modelnumbers on atrributes
//EOF - Tomcraft - 2009-10-06 - ADDED addslashes by $option_name, $attribute_name
$options_attr_data = xtc_db_fetch_array($options_value_id_query);
return $options_attr_data['attributes_model'];
}
inc/xtc_get_categories.inc.phpTop ca. Zeile 25
c.categories_id,
cd.categories_name
from " . TABLE_CATEGORIES . " c,
" . TABLE_CATEGORIES_DESCRIPTION . " cd
where parent_id = '" . xtc_db_input($parent_id) . "'
where parent_id = '" . xtc_db_input((int)$parent_id) . "'
and c.categories_id = cd.categories_id
and c.categories_status != 0
and cd.language_id = '" . $_SESSION['languages_id'] . "'
and cd.language_id = '" . xtc_db_input((int)$_SESSION['languages_id']) . "'
order by sort_order, cd.categories_name";
$categories_query = xtDBquery($categories_query);
inc/xtc_get_countries.inc.phpTop ca. Zeile 18
function xtc_get_countriesList($countries_id = '', $with_iso_codes = false) {
$countries_array = array();
if (xtc_not_null($countries_id)) {
if ($with_iso_codes == true) {
$countries = xtc_db_query("select countries_name, countries_iso_code_2, countries_iso_code_3 from " . TABLE_COUNTRIES . " where countries_id = '" . $countries_id . "' and status = '1' order by countries_name");
$countries = xtc_db_query("select countries_name, countries_iso_code_2, countries_iso_code_3 from " . TABLE_COUNTRIES . " where countries_id = '" . xtc_db_input((int)$countries_id) . "' and status = '1' order by countries_name");
$countries_values = xtc_db_fetch_array($countries);
$countries_array = array('countries_name' => $countries_values['countries_name'],
'countries_iso_code_2' => $countries_values['countries_iso_code_2'],
'countries_iso_code_3' => $countries_values['countries_iso_code_3']);
} else {
$countries = xtc_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . $countries_id . "' and status = '1'");
$countries = xtc_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . xtc_db_input((int)$countries_id) . "' and status = '1'");
$countries_values = xtc_db_fetch_array($countries);
$countries_array = array('countries_name' => $countries_values['countries_name']);
}
} else {
inc/xtc_get_currencies_values.inc.phpTop ca. Zeile 14
---------------------------------------------------------------------------------------*/
function xtc_get_currencies_values($code) {
$currency_values = xtc_db_query("select * from " . TABLE_CURRENCIES . " where code = '" . $code . "'");
$currency_values = xtc_db_query("select * from " . TABLE_CURRENCIES . " where code = '" . xtc_db_input($code) . "'");
$currencie_data=xtc_db_fetch_array($currency_values);
return $currencie_data;
}
inc/xtc_get_customer_status_value.inc.phpTop ca. Zeile 23
// Return all status info values for a customer_id in catalog, need to check session registered customer or will return dafault guest customer status value !
function xtc_get_customer_status_value($customer_id) {
if (isset($_SESSION['customer_id'])) {
$customer_status_query = xtc_db_query("select c.customers_status, c.member_flag, cs.customers_status_id, cs.customers_status_name, cs.customers_status_public, cs.customers_status_show_price, cs_customers_status_min_order, cs.customers_status_max_order, cs.customers_status_show_price_tax, cs.customers_status_image, cs.customers_status_discount, cs.customers_status_ot_discount_flag, cs.customers_status_ot_discount, cs.customers_status_graduated_prices, cs.customers_status_cod_permission, cs.customers_status_cc_permission, cs.customers_status_bt_permission FROM " . TABLE_CUSTOMERS . " as c left join " . TABLE_CUSTOMERS_STATUS . " as cs on customers_status = customers_status_id where c.customers_id='" . $_SESSION['customer_id'] . "' and cs.language_id = '" . $_SESSION['languages_id'] . "'");
$customer_status_query = xtc_db_query("select c.customers_status, c.member_flag, cs.customers_status_id, cs.customers_status_name, cs.customers_status_public, cs.customers_status_show_price, cs_customers_status_min_order, cs.customers_status_max_order, cs.customers_status_show_price_tax, cs.customers_status_image, cs.customers_status_discount, cs.customers_status_ot_discount_flag, cs.customers_status_ot_discount, cs.customers_status_graduated_prices, cs.customers_status_cod_permission, cs.customers_status_cc_permission, cs.customers_status_bt_permission FROM " . TABLE_CUSTOMERS . " as c left join " . TABLE_CUSTOMERS_STATUS . " as cs on customers_status = customers_status_id where c.customers_id='" . xtc_db_input((int)$_SESSION['customer_id']) . "' and cs.language_id = '" . xtc_db_input((int)$_SESSION['languages_id']) . "'");
} else {
$customer_status_query = xtc_db_query("select cs.customers_status_id, cs.customers_status_name, cs.customers_status_public, cs.customers_status_show_price, cs_customers_status_min_order, cs.customers_status_max_order, cs.customers_status_show_price_tax, cs.customers_status_image, cs.customers_status_discount, cs.customers_status_ot_discount_flag, cs.customers_status_ot_discount, cs.customers_status_graduated_prices FROM " . TABLE_CUSTOMERS_STATUS . " as cs where cs.customers_status_id='" . DEFAULT_CUSTOMERS_STATUS_ID_GUEST . "' and cs.language_id = '" . $_SESSION['languages_id'] . "'");
$customer_status_query = xtc_db_query("select cs.customers_status_id, cs.customers_status_name, cs.customers_status_public, cs.customers_status_show_price, cs_customers_status_min_order, cs.customers_status_max_order, cs.customers_status_show_price_tax, cs.customers_status_image, cs.customers_status_discount, cs.customers_status_ot_discount_flag, cs.customers_status_ot_discount, cs.customers_status_graduated_prices FROM " . TABLE_CUSTOMERS_STATUS . " as cs where cs.customers_status_id='" . xtc_db_input((int)DEFAULT_CUSTOMERS_STATUS_ID_GUEST) . "' and cs.language_id = '" . xtc_db_input((int)$_SESSION['languages_id']) . "'");
$customer_status_value['customers_status'] = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
}
$customer_status_value = xtc_db_fetch_array($customer_status_query);
inc/xtc_get_customers_country.inc.phpTop ca. Zeile 15
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
function xtc_get_customers_country($customers_id) {
$customers_query = xtc_db_query("select customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customers_id . "'");
$customers_query = xtc_db_query("select customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_id = '" . xtc_db_input((int)$customers_id) . "'");
$customers = xtc_db_fetch_array($customers_query);
$address_book_query = xtc_db_query("select entry_country_id from " . TABLE_ADDRESS_BOOK . " where address_book_id = '" . $customers['customers_default_address_id'] . "'");
$address_book_query = xtc_db_query("select entry_country_id from " . TABLE_ADDRESS_BOOK . " where address_book_id = '" . xtc_db_input((int)$customers['customers_default_address_id']) . "'");
$address_book = xtc_db_fetch_array($address_book_query);
return $address_book['entry_country_id'];
}
?>
inc/xtc_get_customers_statuses.inc.phpTop ca. Zeile 27
$customers_statuses_array = array(array());
if ($_SESSION['languages_id']=='') {
$customers_statuses_query = xtc_db_query("select * from " . TABLE_CUSTOMERS_STATUS . " where language_id = '1' order by customers_status_id");
} else {
$customers_statuses_query = xtc_db_query("select * from " . TABLE_CUSTOMERS_STATUS . " where language_id = '" . $_SESSION['languages_id'] . "' order by customers_status_id");
$customers_statuses_query = xtc_db_query("select * from " . TABLE_CUSTOMERS_STATUS . " where language_id = '" . xtc_db_input((int)$_SESSION['languages_id']) . "' order by customers_status_id");
}
$i=1;
while ($customers_statuses = xtc_db_fetch_array($customers_statuses_query)) {
inc/xtc_get_download.inc.phpTop ca. Zeile 20
$content_query=xtc_db_query("SELECT
content_file,
content_read
FROM ".TABLE_PRODUCTS_CONTENT."
WHERE content_id='".$content_id."'");
WHERE content_id='".xtc_db_input((int)$content_id)."'");
$content_data=xtc_db_fetch_array($content_query);
// update file counter
xtc_db_query("UPDATE
".TABLE_PRODUCTS_CONTENT."
SET content_read='".($content_data['content_read']+1)."'
WHERE content_id='".$content_id."'");
WHERE content_id='".xtc_db_input((int)$content_id)."'");
// original filename
$filename = DIR_FS_CATALOG.'media/products/'.$content_data['content_file'];
$backup_filename = DIR_FS_CATALOG.'media/products/backup/'.$content_data['content_file'];
inc/xtc_get_geo_zone_code.inc.phpTop ca. Zeile 15
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
function xtc_get_geo_zone_code($country_id) {
$geo_zone_query = xtc_db_query("select geo_zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where zone_country_id = '" . $country_id . "'");
$geo_zone_query = xtc_db_query("select geo_zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where zone_country_id = '" . xtc_db_input((int)$country_id) . "'");
$geo_zone = xtc_db_fetch_array($geo_zone_query);
return $geo_zone['geo_zone_id'];
}
?>
inc/xtc_get_order_data.inc.phpTop ca. Zeile 50
orders_status,
currency,
currency_value
FROM ".TABLE_ORDERS."
WHERE orders_id='".$_GET['oID']."'");
WHERE orders_id='".xtc_db_input((int)$_GET['oID'])."'");
$order_data= xtc_db_fetch_array($order_query);
// get order status name
$order_status_query=xtc_db_query("SELECT
orders_status_name
FROM ".TABLE_ORDERS_STATUS."
WHERE orders_status_id='".$order_data['orders_status']."'
AND language_id='".$_SESSION['languages_id']."'");
WHERE orders_status_id='".xtc_db_input((int)$order_data['orders_status'])."'
AND language_id='".xtc_db_input((int)$_SESSION['languages_id'])."'");
$order_status_data=xtc_db_fetch_array($order_status_query);
$order_data['orders_status']=$order_status_data['orders_status_name'];
// get language name for payment method
include(DIR_WS_LANGUAGES.$_SESSION['language'].'/modules/payment/'.$order_data['payment_method'].'.php');
inc/xtc_get_order_description.inc.phpTop ca. Zeile 18
function xtc_get_order_description($product_id, $language = '') {
if (empty($language)) $language = $_SESSION['languages_id'];
$product_query = "select products_order_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $product_id . "' and language_id = '" . $language . "'";
$product_query = "select products_order_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . xtc_db_input((int)$product_id) . "' and language_id = '" . xtc_db_input((int)$language) . "'";
$product_query = xtDBquery($product_query);
$product = xtc_db_fetch_array($product_query,true);
return $product['products_order_description'];
inc/xtc_get_parent_categories.inc.phpTop ca. Zeile 17
// Recursively go through the categories and retreive all parent categories IDs
// TABLES: categories
function xtc_get_parent_categories(&$categories, $categories_id) {
$parent_categories_query = "select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . $categories_id . "'";
$parent_categories_query = "select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . xtc_db_input((int)$categories_id) . "'";
$parent_categories_query = xtDBquery($parent_categories_query);
while ($parent_categories = xtc_db_fetch_array($parent_categories_query,true)) {
if ($parent_categories['parent_id'] == 0) return true;
$categories[sizeof($categories)] = $parent_categories['parent_id'];
inc/xtc_get_path.inc.phpTop ca. Zeile 23
if ($cp_size == 0) {
$cPath_new = $current_category_id;
} else {
$cPath_new = '';
$last_category_query = "select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . $cPath_array[($cp_size-1)] . "'";
$last_category_query = "select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . xtc_db_input((int)$cPath_array[($cp_size-1)]) . "'";
$last_category_query = xtDBquery($last_category_query);
$last_category = xtc_db_fetch_array($last_category_query,true);
$current_category_query = "select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . $current_category_id . "'";
$current_category_query = "select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . xtc_db_input((int)$current_category_id) . "'";
$current_category_query = xtDBquery($current_category_query);
$current_category = xtc_db_fetch_array($current_category_query,true);
if ($last_category['parent_id'] == $current_category['parent_id']) {
inc/xtc_get_product_path.inc.phpTop ca. Zeile 19
// TABLES: products_to_categories
function xtc_get_product_path($products_id) {
$cPath = '';
$category_query = "select p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = '" . (int)$products_id . "' and p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id != 0 limit 1";
// BOF - Tomcraft - 2015-09-13 - Changed query to version from shop 2.00 to fix canonical for products in inactive categories
//$category_query = "select p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = '" . (int)$products_id . "' and p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id != 0 limit 1";
$category_query = "SELECT p2c.categories_id
FROM " . TABLE_CATEGORIES . " c
JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
ON p2c.categories_id != '0'
AND p2c.categories_id = c.categories_id
AND c.categories_status = '1'
JOIN " . TABLE_PRODUCTS ." p
ON p.products_id = p2c.products_id
AND p.products_id = '" . (int)$products_id . "'
AND p.products_status = '1'";
// EOF - Tomcraft - 2015-09-13 - Changed query to version from shop 2.00 to fix canonical for products in inactive categories
$category_query = xtDBquery($category_query);
if (xtc_db_num_rows($category_query,true)) {
$category = xtc_db_fetch_array($category_query);
inc/xtc_get_products.inc.phpTop ca. Zeile 43
//BOF - Dokuman - 2009-11-30 - check for array in cart
if (is_array($session['cart']->contents)) {
//EOF - Dokuman - 2009-11-30 - check for array in cart
while (list($products_id, ) = each($session['cart']->contents)) {
$products_query = xtc_db_query("select p.products_id, pd.products_name,p.products_image, p.products_model, p.products_price, p.products_discount_allowed, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id='" . xtc_get_prid($products_id) . "' and pd.products_id = p.products_id and pd.language_id = '" . $_SESSION['languages_id'] . "'");
$products_query = xtc_db_query("select p.products_id, pd.products_name,p.products_image, p.products_model, p.products_price, p.products_discount_allowed, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id='" . xtc_db_input((int)xtc_get_prid($products_id)) . "' and pd.products_id = p.products_id and pd.language_id = '" . xtc_db_input((int)$_SESSION['languages_id']) . "'");
if ($products = xtc_db_fetch_array($products_query)) {
$prid = $products['products_id'];
ca. Zeile 82
$xtPrice = new xtcPrice($session['currency'],$session['customers_status']['customers_status_id']);
if (isset($session['contents'][$products_id]['attributes'])) {
reset($session['contents'][$products_id]['attributes']);
while (list($option, $value) = each($session['contents'][$products_id]['attributes'])) {
$attribute_price_query = xtc_db_query("select pd.products_tax_class_id, p.options_values_price, p.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " p, " . TABLE_PRODUCTS . " pd where p.products_id = '" . $products_id . "' and p.options_id = '" . $option . "' and pd.products_id = p.products_id and p.options_values_id = '" . $value . "'");
$attribute_price_query = xtc_db_query("select pd.products_tax_class_id, p.options_values_price, p.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " p, " . TABLE_PRODUCTS . " pd where p.products_id = '" . xtc_db_input((int)$products_id) . "' and p.options_id = '" . xtc_db_input((int)$option) . "' and pd.products_id = p.products_id and p.options_values_id = '" . xtc_db_input((int)$value) . "'");
$attribute_price = xtc_db_fetch_array($attribute_price_query);
if ($attribute_price['price_prefix'] == '+') {
$attributes_price += $xtPrice->xtcFormat($attribute_price['options_values_price'],false,$attribute_price['products_tax_class_id']);
} else {
inc/xtc_get_products_image.inc.phpTop ca. Zeile 16
---------------------------------------------------------------------------------------*/
function xtc_get_products_image($products_id = '') {
$product_query = "select products_image from " . TABLE_PRODUCTS . " where products_id = '" . $products_id . "'";
$product_query = "select products_image from " . TABLE_PRODUCTS . " where products_id = '" . xtc_db_input((int)$products_id) . "'";
$product_query = xtDBquery($product_query);
$products_image = xtc_db_fetch_array($product_query,true);
return $products_image['products_image'];
inc/xtc_get_products_mo_images.inc.phpTop ca. Zeile 10
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
function xtc_get_products_mo_images($products_id = '') {
$mo_query = "select * from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . $products_id ."' ORDER BY image_nr";
$mo_query = "select * from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . xtc_db_input((int)$products_id) ."' ORDER BY image_nr";
$products_mo_images_query = xtDBquery($mo_query);
$results = array();
while ($row = xtc_db_fetch_array($products_mo_images_query,true)) {
inc/xtc_get_products_name.inc.phpTop ca. Zeile 18
function xtc_get_products_name($product_id, $language = '') {
if (empty($language)) $language = $_SESSION['languages_id'];
$product_query = "select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $product_id . "' and language_id = '" . $language . "'";
$product_query = "select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . xtc_db_input((int)$product_id) . "' and language_id = '" . xtc_db_input((int)$language) . "'";
$product_query = xtDBquery($product_query);
$product = xtc_db_fetch_array($product_query,true);
return $product['products_name'];
inc/xtc_get_products_stock.inc.phpTop ca. Zeile 16
---------------------------------------------------------------------------------------*/
function xtc_get_products_stock($products_id) {
$products_id = xtc_get_prid($products_id);
$stock_query = xtDBquery("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . $products_id . "'");
$stock_values = xtc_db_fetch_array($stock_query,true);
$stock_query = xtc_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . xtc_db_input((int)$products_id) . "'");
$stock_values = xtc_db_fetch_array($stock_query);
return $stock_values['products_quantity'];
}
inc/xtc_get_shop_conf.inc.phpTop ca. Zeile 27
configuration_value
FROM
shop_configuration
WHERE
configuration_key = '" . $key . "'
configuration_key = '" . xtc_db_input($key) . "'
LIMIT 1
");
if(xtc_db_num_rows($configuration_query) == 1){
if($configuration_values == false) $configuration_values = array();
ca. Zeile 48
configuration_value
FROM
shop_configuration
WHERE
configuration_key = '" . $configuration_key . "'
configuration_key = '" . xtc_db_input($configuration_key) . "'
LIMIT 1
");
if(xtc_db_num_rows($configuration_query) == 1){
inc/xtc_get_short_description.inc.phpTop ca. Zeile 18
function xtc_get_short_description($product_id, $language = '') {
if (empty($language)) $language = $_SESSION['languages_id'];
$product_query = "select products_short_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $product_id . "' and language_id = '" . $language . "'";
$product_query = "select products_short_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . xtc_db_input((int)$product_id) . "' and language_id = '" . xtc_db_input((int)$language) . "'";
$product_query = xtDBquery($product_query);
$product = xtc_db_fetch_array($product_query,true);
return $product['products_short_description'];
inc/xtc_get_subcategories.inc.phpTop ca. Zeile 15
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
function xtc_get_subcategories(&$subcategories_array, $parent_id = 0) {
$subcategories_query = "select categories_id from " . TABLE_CATEGORIES . " where parent_id = '" . $parent_id . "'";
$subcategories_query = "select categories_id from " . TABLE_CATEGORIES . " where parent_id = '" . xtc_db_input((int)$parent_id) . "'";
$subcategories_query = xtDBquery($subcategories_query);
while ($subcategories = xtc_db_fetch_array($subcategories_query,true)) {
$subcategories_array[sizeof($subcategories_array)] = $subcategories['categories_id'];
if ($subcategories['categories_id'] != $parent_id) {
inc/xtc_get_tax_class_id.inc.phpTop ca. Zeile 14
$tax_query = xtc_db_query("SELECT
products_tax_class_id
FROM ".TABLE_PRODUCTS."
where products_id='".$products_id."'");
where products_id='".xtc_db_input((int)$products_id)."'");
$tax_query_data=xtc_db_fetch_array($tax_query);
return $tax_query_data['products_tax_class_id'];
}
inc/xtc_get_tax_description.inc.phpTop ca. Zeile 29
$country_id = $country_id;
$zone_id = $zone_id;
}
$tax_query = xtDBquery("select tax_description from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . $country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . $zone_id . "') and tr.tax_class_id = '" . $class_id . "' order by tr.tax_priority");
$tax_query = xtDBquery("select tax_description from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . xtc_db_input((int)$country_id) . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . xtc_db_input((int)$zone_id) . "') and tr.tax_class_id = '" . xtc_db_input((int)$class_id) . "' order by tr.tax_priority");
if (xtc_db_num_rows($tax_query,true)) {
$tax_description = '';
while ($tax = xtc_db_fetch_array($tax_query,true)) {
$tax_description .= $tax['tax_description'] . ' + ';
inc/xtc_get_tax_rate.inc.phpTop ca. Zeile 29
$country_id = $country_id;
$zone_id = $zone_id;
}
$tax_query = xtDBquery("select sum(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . $country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . $zone_id . "') and tr.tax_class_id = '" . $class_id . "' group by tr.tax_priority");
$tax_query = xtDBquery("select sum(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . xtc_db_input((int)$country_id) . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . xtc_db_input((int)$zone_id) . "') and tr.tax_class_id = '" . xtc_db_input((int)$class_id) . "' group by tr.tax_priority");
if (xtc_db_num_rows($tax_query,true)) {
$tax_multiplier = 1.0;
while ($tax = xtc_db_fetch_array($tax_query,true)) {
$tax_multiplier *= 1.0 + ($tax['tax_rate'] / 100);
inc/xtc_get_tax_rate_from_desc.inc.phpTop ca. Zeile 40
}
//remove tax info text
$tax_desc = trim(str_replace(array(TAX_ADD_TAX,TAX_NO_TAX), '', $tax_desc));
//get tax_rate from table tax_rates by tax_description
$tax_query = xtc_db_query("select tax_rate from " . TABLE_TAX_RATES . " where tax_description = '" . $tax_desc . "'");
$tax_query = xtc_db_query("select tax_rate from " . TABLE_TAX_RATES . " where tax_description = '" . xtc_db_input($tax_desc) . "'");
if (xtc_db_num_rows($tax_query) > 0) {
$tax = xtc_db_fetch_array($tax_query);
return $tax['tax_rate'];
}
inc/xtc_get_vpe_name.inc.phpTop ca. Zeile 11
function xtc_get_vpe_name($vpeID) {
$vpe_query="SELECT products_vpe_name FROM " . TABLE_PRODUCTS_VPE . " WHERE language_id='".(int)$_SESSION['languages_id']."' and products_vpe_id='".$vpeID."'";
$vpe_query="SELECT products_vpe_name FROM " . TABLE_PRODUCTS_VPE . " WHERE language_id='".xtc_db_input((int)$_SESSION['languages_id'])."' and products_vpe_id='".xtc_db_input((int)$vpeID)."'";
$vpe_query = xtDBquery($vpe_query);
$vpe = xtc_db_fetch_array($vpe_query,true);
return $vpe['products_vpe_name'];
inc/xtc_get_zone_code.inc.phpTop ca. Zeile 15
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
function xtc_get_zone_code($country_id, $zone_id, $default_zone) {
$zone_query = xtc_db_query("select zone_code from " . TABLE_ZONES . " where zone_country_id = '" . $country_id . "' and zone_id = '" . $zone_id . "'");
$zone_query = xtc_db_query("select zone_code from " . TABLE_ZONES . " where zone_country_id = '" . xtc_db_input((int)$country_id) . "' and zone_id = '" . xtc_db_input((int)$zone_id) . "'");
if (xtc_db_num_rows($zone_query)) {
$zone = xtc_db_fetch_array($zone_query);
return $zone['zone_code'];
} else {
inc/xtc_get_zone_name.inc.phpTop ca. Zeile 15
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
function xtc_get_zone_name($country_id, $zone_id, $default_zone) {
$zone_query = xtc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . $country_id . "' and zone_id = '" . $zone_id . "'");
$zone_query = xtc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . xtc_db_input((int)$country_id) . "' and zone_id = '" . xtc_db_input((int)$zone_id) . "'");
if (xtc_db_num_rows($zone_query)) {
$zone = xtc_db_fetch_array($zone_query);
return $zone['zone_name'];
} else {
inc/xtc_gv_account_update.inc.phpTop ca. Zeile 28
---------------------------------------------------------------------------------------*/
// Update the Customers GV account
function xtc_gv_account_update($customer_id, $gv_id) {
$customer_gv_query = xtc_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");
$coupon_gv_query = xtc_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $gv_id . "'");
$customer_gv_query = xtc_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . xtc_db_input((int)$customer_id) . "'");
$coupon_gv_query = xtc_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . xtc_db_input((int)$gv_id) . "'");
$coupon_gv = xtc_db_fetch_array($coupon_gv_query);
if (xtc_db_num_rows($customer_gv_query) > 0) {
$customer_gv = xtc_db_fetch_array($customer_gv_query);
$new_gv_amount = $customer_gv['amount'] + $coupon_gv['coupon_amount'];
//prepare for DB insert
$new_gv_amount = str_replace(",", ".", $new_gv_amount);
$gv_query = xtc_db_query("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $new_gv_amount . "' where customer_id = '" . $customer_id . "'");
$gv_query = xtc_db_query("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . xtc_db_input($new_gv_amount) . "' where customer_id = '" . xtc_db_input((int)$customer_id) . "'");
} else {
$gv_query = xtc_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv['coupon_amount'] . "')");
$gv_query = xtc_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . xtc_db_input((int)$customer_id) . "', '" . xtc_db_input($coupon_gv['coupon_amount']) . "')");
}
}
?>
inc/xtc_has_category_subcategories.inc.phpTop ca. Zeile 15
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
function xtc_has_category_subcategories($category_id) {
$child_category_query = "select count(*) as count from " . TABLE_CATEGORIES . " where parent_id = '" . $category_id . "'";
$child_category_query = "select count(*) as count from " . TABLE_CATEGORIES . " where parent_id = '" . xtc_db_input((int)$category_id) . "'";
$child_category_query = xtDBquery($child_category_query);
$child_category = xtc_db_fetch_array($child_category_query,true);
if ($child_category['count'] > 0) {
inc/xtc_oe_customer_infos.inc.phpTop ca. Zeile 23
---------------------------------------------------------------------------------------*/
function xtc_oe_customer_infos($customers_id) {
$customer_query = xtc_db_query("select a.entry_country_id, a.entry_zone_id from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " a where c.customers_id = '" . $customers_id . "' and c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id");
$customer_query = xtc_db_query("select a.entry_country_id, a.entry_zone_id from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " a where c.customers_id = '" . xtc_db_input((int)$customers_id) . "' and c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id");
$customer = xtc_db_fetch_array($customer_query);
$customer_info_array = array('country_id' => $customer['entry_country_id'],
inc/xtc_oe_get_options_name.inc.phpTop ca. Zeile 27
function xtc_oe_get_options_name($products_options_id, $language = '') {
if (empty($language)) $language = $_SESSION['languages_id'];
$product_query = xtc_db_query("select products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . $products_options_id . "' and language_id = '" . $language . "'");
$product_query = xtc_db_query("select products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . xtc_db_input((int)$products_options_id) . "' and language_id = '" . xtc_db_input((int)$language) . "'");
$product = xtc_db_fetch_array($product_query);
return $product['products_options_name'];
}
inc/xtc_oe_get_options_values_name.inc.phpTop ca. Zeile 27
function xtc_oe_get_options_values_name($products_options_values_id, $language = '') {
if (empty($language)) $language = $_SESSION['languages_id'];
$product_query = xtc_db_query("select products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . $products_options_values_id . "' and language_id = '" . $language . "'");
$product_query = xtc_db_query("select products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . xtc_db_input((int)$products_options_values_id) . "' and language_id = '" . xtc_db_input((int)$language) . "'");
$product = xtc_db_fetch_array($product_query);
return $product['products_options_values_name'];
}
inc/xtc_php_mail.inc.phpTop ca. Zeile 20
$path_to_attachments, $path_to_more_attachments,
$email_subject, $message_body_html, $message_body_plain
)
{
global $mail_error;
global $order, $main;
// include needed function
require_once(DIR_FS_INC.'parse_multi_language_value.inc.php');
// includes main class
if (!is_object($main)) {
require_once(DIR_FS_CATALOG.'includes/classes/main.php');
$main = new main();
}
//*********************************************************************************************
//*********************************************************************************************
$mailsmarty= new Smarty;
$mailsmarty->compile_dir = DIR_FS_CATALOG.'templates_c';
//set language parameters
$lang_data = array();
$lang_data['directory'] = isset($_SESSION['language']) ? $_SESSION['language'] : '';
$lang_data['language_charset'] = isset($_SESSION['language_charset']) ? $_SESSION['language_charset'] : '';
$lang_data['code'] = isset($_SESSION['language_code']) ? $_SESSION['language_code'] : '';
$lang_data['languages_id'] = isset($_SESSION['languages_id']) ? $_SESSION['languages_id'] : '';
$where= '';
if (empty($lang_data['directory']) || empty($lang_data['language_charset']) || empty($lang_data['code'])) {
$where = " WHERE code = '".DEFAULT_LANGUAGE."'";
}
if (isset($order) && is_object($order)) {
$where = " WHERE directory = '".$order->info['language']."'";
$customers_status = $order->info['status'];
}
if ($where) {
$lang_query = xtc_db_query("SELECT *
FROM ".TABLE_LANGUAGES."
".$where."
");
$lang_data = xtc_db_fetch_array($lang_query);
}
// set parameters
$from_email_address = parse_multi_language_value($from_email_address, $lang_data['code']);
$from_email_name = parse_multi_language_value($from_email_name, $lang_data['code']);
$to_email_address = parse_multi_language_value($to_email_address, $lang_data['code']);
$to_name = parse_multi_language_value($to_name, $lang_data['code']);
$forwarding_to = parse_multi_language_value($forwarding_to, $lang_data['code']);
$reply_address = parse_multi_language_value($reply_address, $lang_data['code']);
$reply_address_name = parse_multi_language_value($reply_address_name, $lang_data['code']);
$path_to_attachments = parse_multi_language_value($path_to_attachments, $lang_data['code']);
$email_subject = parse_multi_language_value($email_subject, $lang_data['code']);
// load the signatures only, if the appropriate file(s) exists
$html_signatur = '';
$txt_signatur = '';
if (file_exists(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/signatur.html')) {
$html_signatur = '<br />' .$mailsmarty->fetch(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/signatur.html'); //web28 - 2011-06-10 - ADD Linebreak
}
if (file_exists(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/signatur.txt')) {
$txt_signatur = "\n" . $mailsmarty->fetch(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/signatur.txt'); //web28 - 2011-06-10 - ADD Linebreak
if (file_exists(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/signatur.html')) {
$shop_content_data = $main->getContentData(EMAIL_SIGNATURE_ID, $lang_data['languages_id'], ((isset($customers_status)) ? $customers_status : DEFAULT_CUSTOMERS_STATUS_ID_GUEST));
$mailsmarty->assign('SIGNATURE_HTML', $shop_content_data['content_text']);
$html_signatur = $mailsmarty->fetch(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/signatur.html');
}
if (file_exists(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/signatur.txt')) {
$shop_content_data = $main->getContentData(EMAIL_SIGNATURE_ID, $lang_data['languages_id'], ((isset($customers_status)) ? $customers_status : DEFAULT_CUSTOMERS_STATUS_ID_GUEST));
$mailsmarty->assign('SIGNATURE_TXT', $shop_content_data['content_text']);
$txt_signatur = $mailsmarty->fetch(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/signatur.txt');
}
//EOF - Dokuman - 2009-10-30 - Check for existing signature files
//BOF - web28 - 2010-06-05 - Widerruf in Email
$html_widerruf = '';
$txt_widerruf = '';
if (file_exists(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/widerruf.html')) {
$html_widerruf = '<br />' . $mailsmarty->fetch(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/widerruf.html'); //web28 - 2011-06-10 - ADD Linebreak
if (file_exists(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/widerruf.html')) {
$html_widerruf = $mailsmarty->fetch(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/widerruf.html');
}
if (file_exists(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/widerruf.txt')) {
$txt_widerruf = "\n" . $mailsmarty->fetch(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/widerruf.txt'); //web28 - 2011-06-10 - ADD Linebreak
if (file_exists(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/widerruf.txt')) {
$txt_widerruf = $mailsmarty->fetch(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/widerruf.txt');
}
//Platzhalter [WIDERRUF] durch Widerruf Text ersetzen
if (strpos($message_body_html,'[WIDERRUF]') !== false) {
$message_body_html = str_replace('[WIDERRUF]', $html_widerruf, $message_body_html);
} elseif ($html_widerruf != '') {
$html_widerruf = '<br />'.$html_widerruf;
}
if (strpos($message_body_plain,'[WIDERRUF]') !== false) {
$message_body_plain = str_replace('[WIDERRUF]', $txt_widerruf, $message_body_plain);
} elseif ($txt_widerruf != '') {
$txt_widerruf = "\n".$txt_widerruf;
}
//Platzhalter [NOSIGNATUR] falls keine Signatir notwendig (zB Newsletter)
if (strpos($message_body_html,'[NOSIGNATUR]') !== false) {
$message_body_html = str_replace('[NOSIGNATUR]', '', $message_body_html);
$message_body_plain = str_replace('[NOSIGNATUR]', '', $message_body_plain);
$html_signatur = '';
$txt_signatur = '';
}
//Platzhalter [SIGNATUR] durch Signatur Text ersetzen
if (strpos($message_body_html,'[SIGNATUR]') !== false) {
$message_body_html = str_replace('[SIGNATUR]', $html_signatur, $message_body_html);
$html_signatur = '';
} elseif ($html_signatur != '') {
$html_signatur = '<br />'.$html_signatur;
}
if (strpos($message_body_plain,'[SIGNATUR]') !== false) {
$message_body_plain = str_replace('[SIGNATUR]', $txt_signatur, $message_body_plain);
$txt_signatur = '';
} elseif ($txt_signatur != '') {
$txt_signatur = "\n".$txt_signatur;
}
//EOF - web28 - 2010-06-05 - Widerruf in Email
//**********************************************************************************************
$mail = new PHPMailer();
$mail->PluginDir = DIR_FS_DOCUMENT_ROOT.'includes/classes/';
if (isset ($_SESSION['language_charset'])) {
$mail->CharSet = $_SESSION['language_charset'];
$mail->SetLanguage($_SESSION['language_code'], DIR_WS_CLASSES);
$charset = $_SESSION['language_charset']; // web28 - 2010-07-15 - needed for html_entity_decode
$lang_code = $_SESSION['language_code'];
} else {
$lang_query = "SELECT * FROM ".TABLE_LANGUAGES." WHERE code = '".DEFAULT_LANGUAGE."'";
$lang_query = xtc_db_query($lang_query);
$lang_data = xtc_db_fetch_array($lang_query);
$mail->CharSet = $lang_data['language_charset'];
$mail->SetLanguage(DEFAULT_LANGUAGE, DIR_WS_CLASSES);
$charset = $lang_data['language_charset']; // web28 - 2010-07-15 - needed for html_entity_decode
$lang_code = DEFAULT_LANGUAGE;
}
$mail->SetLanguage($lang_data['code'], DIR_FS_EXTERNAL.'phpmailer/language/');
if (EMAIL_TRANSPORT == 'smtp') {
$mail->IsSMTP();
$mail->SMTPKeepAlive = true; // set mailer to use SMTP
ca. Zeile 108
if (EMAIL_TRANSPORT == 'mail') {
$mail->IsMail();
}
//BOF - web28 - 2010-08-27 - decode html2txt
// decode html2txt
$html_array = array('<br />', '<br/>', '<br>');
$txt_array = array(" \n", " \n", " \n");
// remove html tags
$message_body_plain = strip_tags($message_body_plain);
$message_body_plain = html_entity_decode($message_body_plain, ENT_NOQUOTES, $charset);
//EOF - web28 - 2010-08-27 - decode html2txt
$message_body_plain = html_entity_decode($message_body_plain, ENT_NOQUOTES, $lang_data['language_charset']);
if (EMAIL_USE_HTML == 'true') { // set email format to HTML
$mail->IsHTML(true);
ca. Zeile 131
$mail->Sender = $from_email_address;
$mail->FromName = $from_email_name;
$mail->AddAddress($to_email_address, $to_name);
if ($forwarding_to != '') {
$mail->AddBCC($forwarding_to);
$forwarding = explode(',', $forwarding_to);
foreach ($forwarding as $forwarding_address) {
$mail->AddBCC(trim($forwarding_address));
}
}
$mail->AddReplyTo($reply_address, $reply_address_name);
$mail->WordWrap = 50; // set word wrap to 50 characters
inc/xtc_redirect.inc.phpTop ca. Zeile 26
$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER));
}
}
$_SESSION['REFERER'] = basename(parse_url($_SERVER['SCRIPT_NAME'], PHP_URL_PATH));
$_SESSION['REFERER'] = '';
if (strpos($PHP_SELF, 'admin') === false &&
strpos($PHP_SELF, FILENAME_CHECKOUT_SUCCESS) === false &&
strpos($PHP_SELF, FILENAME_LOGIN) === false &&
strpos($PHP_SELF, FILENAME_PASSWORD_DOUBLE_OPT) === false)
{
$_SESSION['REFERER'] = basename($PHP_SELF);
}
header('Location: ' . preg_replace("/[\r\n]+(.*)$/i", "", html_entity_decode($url)));
xtc_exit();
}
inc/xtc_remove_order.inc.phpTop ca. Zeile 9
-----------------------------------------------------------------------------------------
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require_once(DIR_FS_INC.'xtc_restock_order.inc.php');
function xtc_remove_order($order_id, $restock = false) {
if ($restock == 'on') {
xtc_restock_order($order_id);
}
inc/xtc_restock_order.inc.phpTop ca. Zeile 16
products_quantity
FROM ".TABLE_ORDERS_PRODUCTS."
WHERE orders_id = '".(int)$order_id."'");
while ($order = xtc_db_fetch_array($order_query)) {
xtc_db_query("UPDATE ".TABLE_PRODUCTS."
SET products_quantity = products_quantity + ".$order['products_quantity'].",
products_ordered = products_ordered - ".$order['products_quantity']."
WHERE products_id = '".$order['products_id']."'");
if (ATTRIBUTE_STOCK_CHECK == 'true') {
$orders_attributes_query = xtc_db_query("SELECT orders_products_options_id,
orders_products_options_values_id
FROM ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES."
WHERE orders_id = '" . (int)$order_id . "'
AND orders_products_id = '" . $order['orders_products_id'] . "'");
if (xtc_db_num_rows($orders_attributes_query)) {
$products_update = true;
$orders_attributes_query = xtc_db_query("SELECT pa.orders_products_options_id,
pa.orders_products_options_values_id,
opd.orders_products_filename
FROM ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES." pa
LEFT JOIN ".TABLE_ORDERS_PRODUCTS_DOWNLOAD." opd
ON opd.orders_products_id = pa.orders_products_id
WHERE pa.orders_id = '" . (int)$order_id . "'
AND pa.orders_products_id = '" . $order['orders_products_id'] . "'");
if (xtc_db_num_rows($orders_attributes_query) > 0) {
while ($orders_attributes = xtc_db_fetch_array($orders_attributes_query)) {
if ($orders_attributes['orders_products_filename'] == '') {
xtc_db_query("UPDATE ".TABLE_PRODUCTS_ATTRIBUTES."
SET attributes_stock = attributes_stock + ".$order['products_quantity']."
WHERE options_id = '" . $orders_attributes['orders_products_options_id'] . "'
AND options_values_id = '" . $orders_attributes['orders_products_options_values_id'] . "'
AND products_id = '" . $order['products_id'] . "'
");
AND products_id = '" . $order['products_id'] . "'");
} else {
$products_update = false;
}
}
}
if ($products_update === true) {
xtc_db_query("UPDATE ".TABLE_PRODUCTS."
SET products_quantity = products_quantity + ".$order['products_quantity'].",
products_ordered = products_ordered - ".$order['products_quantity']."
WHERE products_id = '".$order['products_id']."'");
}
}
}
?>
inc/xtc_set_banner_status.inc.phpTop ca. Zeile 17
// Sets the status of a banner
function xtc_set_banner_status($banners_id, $status) {
if ($status == '1') {
return xtc_db_query("update " . TABLE_BANNERS . " set status = '1', date_status_change = now(), date_scheduled = NULL where banners_id = '" . $banners_id . "'");
return xtc_db_query("update " . TABLE_BANNERS . " set status = '1', date_status_change = now(), date_scheduled = NULL where banners_id = '" . xtc_db_input((int)$banners_id) . "'");
} elseif ($status == '0') {
return xtc_db_query("update " . TABLE_BANNERS . " set status = '0', date_status_change = now() where banners_id = '" . $banners_id . "'");
return xtc_db_query("update " . TABLE_BANNERS . " set status = '0', date_status_change = now() where banners_id = '" . xtc_db_input((int)$banners_id) . "'");
} else {
return -1;
}
}
inc/xtc_set_customer_status_upgrade.inc.phpTop ca. Zeile 18
//set customer satus to new customer for upgrade account
function xtc_set_customer_status_upgrade($customer_id){
if ( ($_SESSION['customer_status_value']['customers_status_id'] == "' . DEFAULT_CUSTOMERS_STATUS_ID_NEWSLETTER .'" ) AND ($_SESSION['customer_status_value']['customers_is_newsletter'] == 0 ) ) {
xtc_db_query("update " . TABLE_CUSTOMERS . " set customers_status = '" . DEFAULT_CUSTOMERS_STATUS_ID . "' where customers_id = '" . $_SESSION['customer_id'] . "'");
xtc_db_query("insert into " . TABLE_CUSTOMERS_STATUS_HISTORY . " (customers_id, new_value, old_value, date_added, customer_notified) values ('" . $_SESSION['customer_id'] . "', '" . DEFAULT_CUSTOMERS_STATUS_ID . "', '" . DEFAULT_CUSTOMERS_STATUS_ID_NEWSLETTER . "', now(), '" . $customer_notified . "')");
xtc_db_query("update " . TABLE_CUSTOMERS . " set customers_status = '" . DEFAULT_CUSTOMERS_STATUS_ID . "' where customers_id = '" . xtc_db_input((int)$_SESSION['customer_id']) . "'");
xtc_db_query("insert into " . TABLE_CUSTOMERS_STATUS_HISTORY . " (customers_id, new_value, old_value, date_added, customer_notified) values ('" . xtc_db_input((int)$_SESSION['customer_id']) . "', '" . DEFAULT_CUSTOMERS_STATUS_ID . "', '" . DEFAULT_CUSTOMERS_STATUS_ID_NEWSLETTER . "', now(), '" . $customer_notified . "')");
}
return 1;
}
inc/xtc_set_specials_status.inc.phpTop ca. Zeile 16
---------------------------------------------------------------------------------------*/
// Sets the status of a special product
function xtc_set_specials_status($specials_id, $status) {
return xtc_db_query("update " . TABLE_SPECIALS . " set status = '" . $status . "', date_status_change = now() where specials_id = '" . $specials_id . "'");
return xtc_db_query("update " . TABLE_SPECIALS . " set status = '" . xtc_db_input((int)$status) . "', date_status_change = now() where specials_id = '" . xtc_db_input((int)$specials_id) . "'");
}
?>
inc/xtc_update_banner_click_count.inc.phpTop ca. Zeile 16
---------------------------------------------------------------------------------------*/
// Update the banner click statistics
function xtc_update_banner_click_count($banner_id) {
xtc_db_query("update " . TABLE_BANNERS_HISTORY . " set banners_clicked = banners_clicked + 1 where banners_id = '" . $banner_id . "' and date_format(banners_history_date, '%Y%m%d') = date_format(now(), '%Y%m%d')");
xtc_db_query("update " . TABLE_BANNERS_HISTORY . " set banners_clicked = banners_clicked + 1 where banners_id = '" . xtc_db_input((int)$banner_id) . "' and date_format(banners_history_date, '%Y%m%d') = date_format(now(), '%Y%m%d')");
}
?>
inc/xtc_update_banner_display_count.inc.phpTop ca. Zeile 16
---------------------------------------------------------------------------------------*/
// Update the banner display statistics
function xtc_update_banner_display_count($banner_id) {
$banner_check_query = xtc_db_query("select count(*) as count from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' and date_format(banners_history_date, '%Y%m%d') = date_format(now(), '%Y%m%d')");
$banner_check_query = xtc_db_query("select count(*) as count from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . xtc_db_input((int)$banner_id) . "' and date_format(banners_history_date, '%Y%m%d') = date_format(now(), '%Y%m%d')");
$banner_check = xtc_db_fetch_array($banner_check_query);
if ($banner_check['count'] > 0) {
xtc_db_query("update " . TABLE_BANNERS_HISTORY . " set banners_shown = banners_shown + 1 where banners_id = '" . $banner_id . "' and date_format(banners_history_date, '%Y%m%d') = date_format(now(), '%Y%m%d')");
xtc_db_query("update " . TABLE_BANNERS_HISTORY . " set banners_shown = banners_shown + 1 where banners_id = '" . xtc_db_input((int)$banner_id) . "' and date_format(banners_history_date, '%Y%m%d') = date_format(now(), '%Y%m%d')");
} else {
xtc_db_query("insert into " . TABLE_BANNERS_HISTORY . " (banners_id, banners_shown, banners_history_date) values ('" . $banner_id . "', 1, now())");
xtc_db_query("insert into " . TABLE_BANNERS_HISTORY . " (banners_id, banners_shown, banners_history_date) values ('" . xtc_db_input((int)$banner_id) . "', 1, now())");
}
}
?>
inc/xtc_validate_email.inc.phpTop ca. Zeile 68
if ( substr_count( $email, '@' ) > 1 ) {
$valid_address = false;
}
//web28 - 2011-07-28 - new $regex see http://www.regular-expressions.info/email.html
$regex = "/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)$/i";
//web28 - 2014-02-28 - new $regex see http://www.regular-expressions.info/email.html
$regex = "/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[a-z]{2,15})$/i";
$valid_address = preg_match($regex, $email);
}
if ($valid_address && ENTRY_EMAIL_ADDRESS_CHECK == 'true') {
inc/xtc_validate_vatid_status.inc.phpTop ca. Zeile 17
function xtc_validate_vatid_status($customer_id) {
$customer_status_query = xtc_db_query("SELECT customers_vat_id_status
FROM " . TABLE_CUSTOMERS . "
WHERE customers_id='" . $customer_id . "'");
WHERE customers_id='" . xtc_db_input((int)$customer_id) . "'");
$customer_status_value = xtc_db_fetch_array($customer_status_query);
// BOF - Dokuman - 2011-09-13 - display correct error code of VAT ID check
switch ($customer_status_value['customers_vat_id_status']) {
inc/xtc_write_user_info.inc.phpTop ca. Zeile 16
---------------------------------------------------------------------------------------*/
function xtc_write_user_info($customer_id) {
$sql_data_array = array('customers_id' => $customer_id,
'customers_ip' => $_SESSION['tracking']['ip'],
$sql_data_array = array('customers_id' => xtc_db_input((int)$customer_id),
'customers_ip' => xtc_db_input($_SESSION['tracking']['ip']),
'customers_ip_date' => 'now()',
'customers_host' => $_SESSION['tracking']['http_referer']['host'],
'customers_advertiser' => $_SESSION['tracking']['refID'],
'customers_referer_url' => $_SESSION['tracking']['http_referer']['host'].$_SESSION['tracking']['http_referer']['path'],
'customers_host' => xtc_db_input($_SESSION['tracking']['http_referer']['host']),
'customers_advertiser' => xtc_db_input($_SESSION['tracking']['refID']),
'customers_referer_url' => xtc_db_input($_SESSION['tracking']['http_referer']['host']).xtc_db_input($_SESSION['tracking']['http_referer']['path']),
);
xtc_db_perform(TABLE_CUSTOMERS_IP, $sql_data_array);
return -1;
includes/application_top.phpTop ca. Zeile 38
} else {
include ('includes/configure.php');
}
// call Installer
if (DB_DATABASE == '' && is_dir('./_installer')) {
header("Location: ./_installer");
exit();
}
// LOG dir
define('DIR_FS_LOG', DIR_FS_CATALOG . 'log/');
// external
ca. Zeile 265
ini_set('session.cookie_path', '/');
ini_set('session.cookie_domain', (xtc_not_null($current_domain) ? '.'.$current_domain : ''));
}
// set the session ID if it exists
if (isset ($_POST[session_name()])) {
session_id($_POST[session_name()]);
if (isset($_POST[xtc_session_name()])) {
xtc_session_id($_POST[xtc_session_name()]);
}
elseif ($request_type == 'SSL' && isset($_GET[xtc_session_name()])) {
if (!isset($_COOKIE[xtc_session_name()]) || $_GET[xtc_session_name()] != $_COOKIE[xtc_session_name()]) {
xtc_session_id($_GET[xtc_session_name()]);
}
elseif (($request_type == 'SSL') && isset ($_GET[session_name()])) {
session_id($_GET[session_name()]);
}
// start the session
$session_started = false;
ca. Zeile 330
// Redirect search engines with session id to the same url without session id to prevent indexing session id urls
if ( $truncate_session_id == true ) {
if (preg_match('/' . xtc_session_name() . '/i', $_SERVER['REQUEST_URI']) ){
$location = xtc_href_link(basename($_SERVER['SCRIPT_NAME']), xtc_get_all_get_params(array(xtc_session_name())), 'NONSSL', false);
$uri = preg_replace("/([^\?]*)(\?.*)/", "$1", $_SERVER['REQUEST_URI']);
$params = str_replace($uri,'',$_SERVER['REQUEST_URI']);
$params = ltrim($params,'?');
parse_str($params,$params);
$key = xtc_session_name();
if (isset($params[$key])) unset($params[$key]);
$params = http_build_query($params);
$location = (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $uri . (xtc_not_null($params) ? '?' . $params : '');
header("HTTP/1.0 301 Moved Permanently");
header("Location: $location");
exit();
}
}
if (!(preg_match('/^[a-z0-9]{26}$/i', session_id()) || preg_match('/^[a-z0-9]{32}$/i', session_id()))) {
ca. Zeile 477
$janolaw = new janolaw_content();
}
// EOF - Tomcraft - 2011-06-17 - Added janolaw AGB hosting service
if (defined('MODULE_PROTECTEDSHOPS_STATUS') && MODULE_PROTECTEDSHOPS_STATUS == 'true') {
require_once(DIR_FS_CATALOG.'includes/external/protectedshops/protectedshops_update.php');
$protectedshops = new protectedshops_update();
$protectedshops->check_update();
}
xtc_count_cart();
?>
includes/cart_actions.phpTop ca. Zeile 232
}
xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params($parameters), 'NONSSL'));
break;
// BOF - Tomcraft - 2011-02-01 - Paypal Express Modul
## - Paypal Express Modul
case 'paypal_express_checkout':
if (defined('MODULE_PAYMENT_PAYPALEXPRESS_STATUS')
&& MODULE_PAYMENT_PAYPALEXPRESS_STATUS == 'True')
{
if (!is_object($product)) {
require_once(DIR_WS_CLASSES.'product.php');
$product = new product();
}
$o_paypal->paypal_express_auth_call();
xtc_redirect($o_paypal->payPalURL);
}
break;
// EOF - Tomcraft - 2011-02-01 - Paypal Express Modul
## - Paypal Express Modul
}
}
?>
includes/classes/banktransfer_validation.phpTop ca. Zeile 301
if ($Checksum == substr($AccountNo,$Checkpoint-1,1)) {
$Method16 = 0;
}
if ($Help == 1) {
if ($Checksum == substr($AccountNo,Checkpoint - 2,1)) {
if ($Checksum == substr($AccountNo,$Checkpoint - 2,1)) {
$Method16 = 0;
}
}
return $Method16;
ca. Zeile 1004
$Rest = $Help % 11;
$Gewicht = HexDec(substr($Significance,5,1));
$PZ = -1;
$Help2 = $Rest + ($PZ * $Gewicht);
while ($Help2 % 11 <>10) { //franky_n
$PZ++;
$Help2 = $Rest + ($PZ * $Gewicht);
if ($PZ == 9) {
ca. Zeile 1060
$Rest = $Help % 11;
$Gewicht = HexDec(substr($Significance,5, 1));
$PZ = -1;
$Help2 = $Rest + ($PZ * $Gewicht);
while ($Help2 % 11 <> 10 or $PZ > 9) { //franky_n
$PZ++;
$Help2 = $Rest + ($PZ * $Gewicht);
} //franky_n
ca. Zeile 1203
case ($help01 == 50):
case ($help01 == 91):
case ($help01 == 99):
// Variante 3: Methode 09 (Keine Berechnung).
$PResult = $this->Mark09($AccountNo);;
$PResult = $this->Mark09($AccountNo);
break;
case ($help01 >= 01 && $help <= 31):
case ($help01 >= 01 && $help01 <= 31):
// Variante 4: Dritte und vierte Stelle zwischen 01 und 12
// -UND- siebte bis neunte Stelle kleiner 500.
$help03 = substr($AccountNo,2,2);
$help04 = substr($AccountNo,6,3);
ca. Zeile 1217
$PResult = 0;
}
}
// Ausnahme: Diese Kontonummer ist als richtig zu bewerten.
if ($AccountNo == 0185125434) {
if ((string)$AccountNo == '0185125434') {
$PResult = 0;
}
break;
default:
ca. Zeile 1817
$A5 = $A5 + 5;
}
}
if ($D2 == 0) {
$P = $TAB1[$A5];
$P = $Tab1[$A5];
} else {
$P = $TAB2[$A5];
$P = $Tab2[$A5];
}
if ($P == $AccountNoTemp[10]) {
$Result = 0;
} else {
ca. Zeile 1917
$Help = $this->Method06($AccountNo, '9A5842', TRUE, 7, 11);
}
}
}
return $Help;;
return $Help;
} /* End of Mark91 */
private function Mark92($AccountNo) {
$Mark92 = $this->Method01($AccountNo, '000173173');
ca. Zeile 2278
if ((substr($AccountNo,0,2) == "00")And (substr($AccountNo,2,1) != "0")){
$Significance = '1231231';
$Step3 = 0;
for ($Run = 0;$Run < strlen($Significance);$Run++) {
$Step1 = (substr($AccountNo,$Run + 2,1) * substr($Significance,$Run,1));
$Step2 = $Step1 + substr($Significance,$Run,1);
$Step3 += $Step2 % 11;
ca. Zeile 2299
} elseif ((substr($AccountNo,0,3) == "000")And (substr($AccountNo,3,1) != "0")){
$Significance = '654321';
$Step1 = 0;
for ($Run = 0;$Run < strlen($Significance);$Run++) {
$Step1 += (substr($AccountNo,$Run + 3,1) * substr($Significance,$Run,1));
}
$Checksum = $Step1 % 11;
ca. Zeile 2853
class IbanAccountCheck extends AccountCheck {
private $ibanstructure = Array();
/*
-----------------------------------------------------------------------------------------
Copyright (c) 2013 Christian Rothe
includes/classes/main.phpTop ca. Zeile 180
*
* @param integer $coID
* @return array
*/
function getContentData($coID) {
$group_check = (GROUP_CHECK == 'true') ? "AND group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'" : '';
function getContentData($coID, $lang_id = '', $customers_status = '', $get_inactive = true, $add_select= '') {
$lang_id = !empty($lang_id) ? $lang_id : $_SESSION['languages_id'];
$customers_status = $customers_status != '' ? $customers_status : $_SESSION['customers_status']['customers_status_id'];
$group_check = (GROUP_CHECK == 'true') ? "AND group_ids LIKE '%c_" . (int)$customers_status . "_group%'" : '';
$where = (($get_inactive === true) ? '' : " AND content_active = '1'");
$content_data_query = xtDBquery("-- includes/classes/main.php
SELECT content_id,
SELECT ".$add_select."
content_id,
content_title,
content_heading,
content_text,
content_file
FROM " . TABLE_CONTENT_MANAGER . "
WHERE content_group='". (int)$coID ."'
" . $group_check . "
AND languages_id='" . (int)$_SESSION['languages_id'] . "'
" . $where . "
AND trim(content_title) != ''
AND languages_id='" . (int)$lang_id . "'
LIMIT 1
");
$content_data_array = xtc_db_fetch_array($content_data_query,true);
includes/classes/order.phpTop ca. Zeile 157
'cc_issue' => $order['cc_issue'],
'cc_cvv' => $order['cc_cvv'],
'date_purchased' => $order['date_purchased'],
'orders_status' => $order_status,
'orders_status_id' => $order['orders_status'],
'last_modified' => $order['last_modified'],
'total' => strip_tags($order_total['text']),
// BOF - web28 - 2010-05-06 - PayPal API Modul / Paypal Express Modul
'pp_total' => $order_total['value'],
includes/classes/shipping.phpTop ca. Zeile 97
}
for ($i=0, $size = sizeof($include_quotes); $i<$size; $i++) {
$quotes = $GLOBALS[$include_quotes[$i]]->quote($method);
// BOF - Tomcraft - 2011-02-01 - Paypal Express Modul
// if (is_array($quotes)) $quotes_array[] = $quotes;
if (!isset ($quotes['error'])) {
if (is_array($quotes)) $quotes_array[] = $quotes;
}
// EOF - Tomcraft - 2011-02-01 - Paypal Express Modul
}
}
return $quotes_array;
}
ca. Zeile 114
if (is_array($this->modules)) {
$rates = array();
$ignore_cheapest_array = explode(',',IGNORE_CHEAPEST_MODULES); //web28 ignore shipping modules
$ignore_cheapest_array = explode(',',IGNORE_CHEAPEST_MODULES);
reset($this->modules);
while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if (isset($GLOBALS[$class]) && $GLOBALS[$class]->enabled) {
$quotes = $GLOBALS[$class]->quotes;
//BOF - Dokuman - 2009-10-02 - set undefined index
//$size = sizeof($quotes['methods']);
$size = isset($quotes['methods']) && is_array($quotes['methods']) ? sizeof($quotes['methods']) : 0;
//BOF - Dokuman - 2009-10-02 - set undefined index
for ($i=0; $i<$size; $i++) {
// BOF - Tomcraft - 2011-02-01 - Paypal Express Modul
//if(array_key_exists("cost",$quotes['methods'][$i])) {
if(array_key_exists("cost",$quotes['methods'][$i]) && !isset ($quotes['error'][$i]) && !in_array($quotes['id'],$ignore_cheapest_array)) { //web28 ignore shipping modules
// EOF - Tomcraft - 2011-02-01 - Paypal Express Modul
if(array_key_exists('cost', $quotes['methods'][$i]) && !in_array($quotes['id'], $ignore_cheapest_array)) {
$rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'],
'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')',
'cost' => $quotes['methods'][$i]['cost']);
// echo $quotes['methods'][$i]['cost'];
}
}
}
}
includes/classes/shopping_cart.phpTop ca. Zeile 221
}
// xs:booster end
// EOF - Tomcraft - 2009-11-28 - Included xs:booster
$this->contents[$products_id] = array ('qty' => (int)$quantity);
//$this->contents[$products_id] = array ('qty' => (int)$quantity);
$this->contents[$products_id]['qty'] = (int)$quantity; //don't reset $this->contents[$products_id] by update_quantity
// update database
if (isset ($_SESSION['customer_id'])){
xtc_db_query("update ".TABLE_CUSTOMERS_BASKET."
set customers_basket_quantity = '".(int)$quantity."'
includes/classes/Smarty_2.6.27/Smarty_Compiler.class.phpTop ca. Zeile 25
* @copyright 2001-2005 New Digital Group, Inc.
* @package Smarty
*/
/* $Id: Smarty_Compiler.class.php 3163 2009-06-17 14:39:24Z monte.ohrt $ */
/* $Id: Smarty_Compiler.class.php 4779 2013-09-30 19:14:32Z Uwe.Tews@googlemail.com $ */
/**
* Template compiling class
* @package Smarty
ca. Zeile 261
$this->_folded_blocks = $match;
reset($this->_folded_blocks);
/* replace special blocks by "{php}" */
$source_content = preg_replace($search.'e', "'"
$source_content = preg_replace_callback($search, create_function ('$matches', "return '"
. $this->_quote_replace($this->left_delimiter) . 'php'
. "' . str_repeat(\"\n\", substr_count('\\0', \"\n\")) .'"
. "' . str_repeat(\"\n\", substr_count('\$matches[1]', \"\n\")) .'"
. $this->_quote_replace($this->right_delimiter)
. "'"
. "';")
, $source_content);
/* Gather all template tags. */
preg_match_all("~{$ldq}\s*(.*?)\s*{$rdq}~s", $source_content, $_match);
ca. Zeile 291
/* echo php contents */
$text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '<?php echo \''.str_replace("'", "\'", $sp_match[1][$curr_sp]).'\'; ?>'."\n", $text_blocks[$curr_tb]);
} else if ($this->php_handling == SMARTY_PHP_QUOTE) {
/* quote php tags */
//$text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', htmlspecialchars($sp_match[1][$curr_sp]), $text_blocks[$curr_tb]);
$text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', encode_htmlspecialchars($sp_match[1][$curr_sp]), $text_blocks[$curr_tb]); // web28 2013-01-11 - use encode_htmlentities (PHP5.4 ready)
$text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', encode_htmlspecialchars($sp_match[1][$curr_sp]), $text_blocks[$curr_tb]);
} else if ($this->php_handling == SMARTY_PHP_REMOVE) {
/* remove php tags */
$text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '', $text_blocks[$curr_tb]);
} else {
ca. Zeile 2122
case 'capture':
return null;
case 'template':
$compiled_ref = "'$this->_current_file'";
$compiled_ref = "'" . addslashes($this->_current_file) . "'";
$_max_index = 1;
break;
case 'version':
includes/classes/vat_validation.phpTop ca. Zeile 1
<?php
/* --------------------------------------------------------------
$Id: vat_validation.php 4568 2013-04-03 12:35:19Z Tomcraft1980 $
$Id: vat_validation.php 8351 2015-07-01 08:40:04Z GTB $
modified eCommerce Shopsoftware
http://www.modified-shop.org
Copyright (c) 2009 - 2013 [www.modified-shop.org]
--------------------------------------------------------------
based on:
(c) 2012 Gambio GmbH - vat_validation.php 2012-05-10 gm
(c) 2010 xtcModified - community made shopping http://www.xtc-modified.org ($Id: vat_validation.php 4568 2013-04-03 12:35:19Z Tomcraft1980 $)
(c) 2005 xtc_validate_vatid_status.inc.php 899 2005-04-29
(c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com ($Id: vat_validation.php 4568 2013-04-03 12:35:19Z Tomcraft1980 $)
(c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com ($Id: vat_validation.php 8351 2015-07-01 08:40:04Z GTB $)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
// include needed functions
include_once(DIR_FS_INC . 'xtc_get_countries.inc.php');
//require_once(DIR_FS_EXTERNAL . 'nusoap/nusoap.php');
require_once(DIR_FS_CATALOG . 'includes/classes/nusoap/lib/nusoap.php');
define ('VAT_LIVE_CHECK_URL', 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl');
class vat_validation {
var $vat_info;
var $vat_info, $vat_errors;
function vat_validation($vat_id = '', $customers_id = '', $customers_status = '', $country_id = '', $guest = false) {
$vat_id = str_replace(' ', '', $vat_id);
$this->vat_info = array ();
$this->vat_errors = array(
'INVALID_INPUT' => '94',
'SERVICE_UNAVAILABLE' => '95',
'MS_UNAVAILABLE' => '96',
'TIMEOUT' => '97',
'SERVER_BUSY' => '98',
);
$this->live_check = ACCOUNT_COMPANY_VAT_LIVE_CHECK;
if (xtc_not_null($vat_id)) {
$this->getInfo($vat_id, $customers_id, $customers_status, $country_id, $guest);
} else {
if ($guest) {
if ($guest === true) {
$this->vat_info = array ('status' => DEFAULT_CUSTOMERS_STATUS_ID_GUEST);
} else {
$this->vat_info = array ('status' => DEFAULT_CUSTOMERS_STATUS_ID);
}
}
}
function getInfo($vat_id = '', $customers_id = '', $customers_status = '', $country_id = '', $guest = false) {
if (!$guest) {
if ($vat_id) {
$validate_vatid = $this->validate_vatid($vat_id);
switch ($validate_vatid) {
case '0' :
if (ACCOUNT_VAT_BLOCK_ERROR == 'true') {
$error = true;
}
$status = DEFAULT_CUSTOMERS_STATUS_ID;
$vat_id_status = '0';
break;
case '1' :
if ($country_id == STORE_COUNTRY) {
if (ACCOUNT_COMPANY_VAT_GROUP == 'true') {
$status = DEFAULT_CUSTOMERS_VAT_STATUS_ID_LOCAL;
} else {
$status = DEFAULT_CUSTOMERS_STATUS_ID;
}
} else {
if (ACCOUNT_COMPANY_VAT_GROUP == 'true') {
$status = DEFAULT_CUSTOMERS_VAT_STATUS_ID;
} else {
$status = DEFAULT_CUSTOMERS_STATUS_ID;
}
}
$error = false;
$vat_id_status = '1';
break;
case '8' :
if (ACCOUNT_VAT_BLOCK_ERROR == 'true') {
$error = true;
}
$status = DEFAULT_CUSTOMERS_STATUS_ID;
$vat_id_status = '8';
break;
case '9' :
if (ACCOUNT_VAT_BLOCK_ERROR == 'true') {
$error = true;
}
$status = DEFAULT_CUSTOMERS_STATUS_ID;
$vat_id_status = '9';
break;
case '99' :
case '98' :
case '97' :
case '96' :
case '95' :
case '94' :
if (ACCOUNT_VAT_BLOCK_ERROR == 'true') {
$error = true;
}
$status = DEFAULT_CUSTOMERS_STATUS_ID;
$vat_id_status = $validate_vatid;
break;
default :
$status = DEFAULT_CUSTOMERS_STATUS_ID;
function getInfo($vat_id = '', $customers_id = '', $customers_status = '', $country_id = '', $guest = false) {
}
$customers_status_id = DEFAULT_CUSTOMERS_STATUS_ID;
$customers_vat_status_id = DEFAULT_CUSTOMERS_VAT_STATUS_ID;
$customers_vat_status_id_local = DEFAULT_CUSTOMERS_VAT_STATUS_ID_LOCAL;
} else {
if ($customers_status) {
$status = $customers_status;
} else {
$status = DEFAULT_CUSTOMERS_STATUS_ID;
}
$vat_id_status = '';
$error = false;
if ($guest === true) {
$customers_status_id = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
}
} else {
if ($vat_id) {
$validate_vatid = $this->validate_vatid($vat_id);
if ($vat_id != '') {
$validate_vatid = $this->validate_vatid($vat_id, $country_id);
switch ($validate_vatid) {
case '0' :
if (ACCOUNT_VAT_BLOCK_ERROR == 'true') {
$error = true;
}
ca. Zeile 124
case '0' :
if (ACCOUNT_VAT_BLOCK_ERROR == 'true') {
$error = true;
}
$status = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
$vat_id_status = '0';
$status = $customers_status_id;
$vat_id_status = $validate_vatid;
break;
case '1' :
if ($country_id == STORE_COUNTRY) {
if (ACCOUNT_COMPANY_VAT_GROUP == 'true') {
$status = DEFAULT_CUSTOMERS_VAT_STATUS_ID_LOCAL;
$status = $customers_vat_status_id_local;
} else {
$status = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
$status = $customers_status_id;
}
} else {
if (ACCOUNT_COMPANY_VAT_GROUP == 'true') {
$status = DEFAULT_CUSTOMERS_VAT_STATUS_ID;
$status = $customers_vat_status_id;
} else {
$status = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
$status = $customers_status_id;
}
}
$error = false;
$vat_id_status = '1';
$vat_id_status = $validate_vatid;
break;
case '8' :
if (ACCOUNT_VAT_BLOCK_ERROR == 'true') {
$error = true;
}
ca. Zeile 150
case '8' :
if (ACCOUNT_VAT_BLOCK_ERROR == 'true') {
$error = true;
}
$status = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
$vat_id_status = '8';
$status = $customers_status_id;
$vat_id_status = $validate_vatid;
break;
case '9' :
if (ACCOUNT_VAT_BLOCK_ERROR == 'true') {
$error = true;
}
ca. Zeile 159
case '9' :
if (ACCOUNT_VAT_BLOCK_ERROR == 'true') {
$error = true;
}
$status = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
$vat_id_status = '9';
$status = $customers_status_id;
$vat_id_status = $validate_vatid;
break;
case '99' :
case '98' :
case '97' :
case '96' :
ca. Zeile 172
case '94' :
if (ACCOUNT_VAT_BLOCK_ERROR == 'true') {
$error = true;
}
$status = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
$status = $customers_status_id;
$vat_id_status = $validate_vatid;
break;
default :
$status = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
}
} else {
if ($customers_status) {
$status = $customers_status;
} else {
$status = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
}
$vat_id_status = '';
$error = false;
$status = $customers_status_id;
break;
}
}
if ($customers_id) {
$customers_status_query = xtc_db_query("SELECT customers_status FROM ".TABLE_CUSTOMERS." WHERE customers_id = '".(int)$customers_id."'");
// check if is admin
if ($customers_id != '') {
$customers_status_query = xtc_db_query("SELECT customers_status
FROM ".TABLE_CUSTOMERS."
WHERE customers_id = '".(int)$customers_id."'");
$customers_status_value = xtc_db_fetch_array($customers_status_query);
if ($customers_status_value['customers_status'] != 0) {
$status = $status;
} else {
$status = $customers_status_value['customers_status'];
if ($customers_status_value['customers_status'] == '0') {
$status = '0';
}
}
$this->vat_info = array ('status' => $status, 'vat_id_status' => $vat_id_status, 'error' => $error, 'validate' => $validate_vatid);
$this->vat_info = array ('status' => $status,
'vat_id_status' => $vat_id_status,
'error' => $error,
'validate' => $validate_vatid);
}
//BOF - DokuMan - 2011-08-24 - check UstID live via SOAP at http://ec.europa.eu
function validate_vatid($vat_id) {
function validate_vatid($vat_id, $country_id) {
// remove special chars
$remove = array (' ', '-', '/', '\\', '.', ':', ',');
$vat_id = trim(chop($vat_id));
$vat_id = str_replace($remove, '', $vat_id);
$vatNumber = substr($vat_id, 2);
$country = strtolower(substr($vat_id, 0, 2));
// 0 = 'invalid'
// 1 = 'valid'
// 8 = 'unknown country'
// 9 => 'unknown algorithm'
// 9 = 'unknown algorithm'
//94 = 'INVALID_INPUT' => 'The provided CountryCode is invalid or the VAT number is empty',
//95 = 'SERVICE_UNAVAILABLE' => 'The SOAP service is unavailable, try again later',
//96 = 'MS_UNAVAILABLE' => 'The Member State service is unavailable, try again later or with another Member State',
//97 = 'TIMEOUT' => 'The Member State service could not be reached in time, try again later or with another Member State',
ca. Zeile 233
97 => '97',
98 => '98',
99 => '99');
// sonderzeichen entfernen
for ($i = 0; $i < count($remove); $i ++) {
$vat_id = str_replace($remove[$i], '', $vat_id);
} // end for($i = 0; $i < count($remove)); $i++)
// check country
$country_check = xtc_get_countriesList($country_id, true);
if ($country_check['countries_iso_code_2'] != strtoupper($country)) {
return $results[0];
}
// check store vatid
if (STORE_OWNER_VAT_ID != '') {
$vat_id_store_owner = trim(chop(STORE_OWNER_VAT_ID));
$vat_id_store_owner = str_replace($remove, '', $vat_id_store_owner);
$vat_id_store_owner = substr($vat_id_store_owner, 2);
if ($vat_id_store_owner == $vatNumber) {
return $results[0];
}
}
// land bestimmen
$country = strtolower(substr($vat_id, 0, 2));
// fix for Greece
$search_array = array('gr');
$replace_array = array('el');
$country = str_replace($search_array, $replace_array, $country);
if($this->live_check == 'true') {
$country_iso_code = strtoupper($country);
if ($this->live_check == 'true') {
//Check VAT for EU countries only
switch ($country_iso_code) {
// EU countries
case 'AT':
case 'BE':
case 'BG':
case 'CY':
case 'CZ':
case 'DE':
case 'DK':
case 'EE':
case 'GR':
case 'EL':
case 'ES':
case 'FI':
case 'FR':
case 'GB':
case 'HU':
case 'HR':
case 'IE':
case 'IT':
case 'LT':
case 'LU':
ca. Zeile 274
case 'RO':
case 'SE':
case 'SI':
case 'SK':
$t_result = $this->checkVatID_EU($vat_id, $country_iso_code);
$t_result = $this->checkVatID_EU($vatNumber, $country_iso_code);
break;
default:
$t_result = 8; //unknown country
break;
}
} else {
$vat_id = trim(chop($vat_id));
$t_result = $this->gm_validate_vatid($country, $vat_id);
switch ($country_iso_code) {
case 'BE':
// fix for old vat_id
if (strlen($vatNumber) == 9) {
$vatNumber = str_pad($vatNumber, 10, '0', STR_PAD_LEFT);
}
break;
}
$vat_id = $country_iso_code . $vatNumber;
$t_result = $this->validate_vatid_offline($country, $vat_id);
}
return $results[$t_result];
}
function checkVatID_EU($vat_id, $country_id) {
// Leerzeichen und sonderzeichen entfernen
$remove = array (' ', '-', '/', '\\', '.', ':', ',');
$vat_id = trim(chop($vat_id));
$vat_id = str_replace($remove, '', $vat_id );
$vatNumber = substr($vat_id, 2); // alles ab 2 Stellen der VAT (ohne Land)
function checkVatID_EU($vatNumber, $country_iso_code) {
$params = array('countryCode' => $country_iso_code,
'vatNumber' => $vatNumber);
$coo_soap_client = new nusoap_client(VAT_LIVE_CHECK_URL, true);
$coo_soap_proxy = $coo_soap_client->getProxy();
$soap_client = new nusoap_client(VAT_LIVE_CHECK_URL, true);
$soap_proxy = $soap_client->getProxy();
// check connection
if($coo_soap_client->getError() || !is_object($coo_soap_proxy))
{
$coo_ekomi_log = new FileLog('vat_validation_errors');
$coo_ekomi_log->write(date('Y-m-d H:i:s') . " connection to http://ec.europa.eu/ could not be established. " . print_r($coo_soap_client->getError(), true) . "\n");
if (!$soap_client->getError() && is_object($soap_proxy)) {
$result = $soap_proxy->checkVat($params);
if (is_array($result) && isset($result['valid']) && $result['valid'] == 'true') {
return 1; // VAT-ID is valid
} elseif (is_array($result) && isset($result['valid']) && $result['valid'] == 'false') {
return $this->_checkVatID_EU($vatNumber, $country_iso_code);
return 0; // VAT-ID is NOT valid
} elseif (is_array($result) && isset($result['faultstring'])) {
return $this->vat_errors[$result['faultstring']];
}
else
{
$params = array('countryCode' => $country_id, 'vatNumber' => $vatNumber);
}
return $this->_checkVatID_EU($vatNumber, $country_iso_code);
}
$result = $coo_soap_proxy->checkVat($params);
function _checkVatID_EU($vatNumber, $country_iso_code) {
if(is_array($result) && isset($result['valid']) && $result['valid'] == 'true')
{
return 1; //valid VAT
$params = array('countryCode' => $country_iso_code,
'vatNumber' => $vatNumber);
try {
$options = array('soap_version' => SOAP_1_1,
'exceptions' => true,
'trace' => 1,
'cache_wsdl' => WSDL_CACHE_NONE,
'user_agent' => 'Mozilla');
$client = new SoapClient(VAT_LIVE_CHECK_URL, $options);
} catch (Exception $e) {
trigger_error('SOAP-Fehler: (Fehlernummer: '. $e->faultcode .', Fehlermeldung: '. $e->faultstring .')', E_USER_ERROR);
}
elseif(is_array($result) && isset($result['valid']) && $result['valid'] == 'false')
{
return 0; //invalid VAT
if ($client) {
try {
$result = $client->checkVat($params);
if ($result->valid == true){
return 1; // VAT-ID is valid
} else {
return 0; // VAT-ID is NOT valid
}
elseif(is_array($result) && isset($result['faultstring']))
{
switch($result['faultstring'])
{
case 'INVALID_INPUT':
$t_error_code = '94';
break;
case 'SERVICE_UNAVAILABLE':
$t_error_code = '95';
break;
case 'MS_UNAVAILABLE':
$t_error_code = '96';
break;
case 'TIMEOUT':
$t_error_code = '97';
break;
case 'SERVER_BUSY':
$t_error_code = '98';
break;
} catch (SoapFault $e) {
return $this->vat_errors[$e->faultstring];
}
return $t_error_code;
}
return false;
}
} // end checkVatID_EU
//EOF - DokuMan - 2011-08-24 - check UstID live via SOAP at http://ec.europa.eu
function gm_validate_vatid($country, $vat_id) {
function validate_vatid_offline($country, $vat_id) {
switch ($country) {
default:
return 8;
break;
includes/contact_us.phpTop ca. Zeile 159
$city = '';
$fax = '';
}
// BOF - Tomcraft - 2009-11-05 - Advanced contact form (product question)
$products_info = '';
// BOF - web28 - 2010-07-14 - false clamp fixing
//if (trim($_GET['products_name'] != '')) {$products_info= trim($_GET['products_name']);}
//if (trim($_GET['products_model'] != '')) {$products_info= trim($products_info . ' - ' . trim($_GET['products_model']));}
//if ($products_info != '') {$products_info = trim($_GET['question'])."\n" . $products_info . "\n"; }
if (!empty($_GET['products_name'])) {$products_info = trim($_GET['products_name']);}
if (!empty($_GET['products_model'])) {$products_info = trim($products_info . ' - ' . trim($_GET['products_model']));}
if (!empty($_GET['question'])) {$products_question = trim($_GET['question'])."\n";}
if ($products_info != '') {$products_info = $products_question . $products_info . "\n"; }
// EOF - web28 - 2010-07-14 - false clamp fixing
if (isset($_GET['products_id']) && $_GET['products_id'] && isset($_GET['inq']) && $_GET['inq']) {
$product->product((int)$_GET['products_id']);
$products_info = defined('PRODUCT_INQUIRY') ? PRODUCT_INQUIRY . "\n" : '';
$products_info .= HEADER_ARTICLE . ': '. $product->data['products_name'] . "\n";
$products_info .= ($product->data['products_model'] ? HEADER_MODEL . ': ' .$product->data['products_model'] : '') . "\n";
}
if (!$error) $message_body = $products_info . "\n";
// EOF - Tomcraft - 2009-11-05 - Advanced contact form (product question)
$smarty->assign('CONTACT_CONTENT', $contact_content);
//BOF - Dokuman - 2009-12-23 - send contact form information with SSL
//$smarty->assign('FORM_ACTION', xtc_draw_form('contact_us', xtc_href_link(FILENAME_CONTENT, 'action=send&coID='.(int) $_GET['coID'])));
includes/database_tables.phpTop ca. Zeile 106
define('TABLE_PAYMENT_MONEYBOOKERS','payment_moneybookers');
define('TABLE_PAYMENT_AMONEYBOOKERS_CURRENCIES','payment_AMONEYBOOKERS_currencies');
define('TABLE_PAYMENT_AMONEYBOOKERS_COUNTRIES','payment_AMONEYBOOKERS_countries');
// Sofort?berweisung
define('TABLE_PAYMENT_IPAYMENT', 'payment_ipayment');
define('TABLE_PAYMENT_IPAYMENT_LOG', 'payment_ipayment_log');
// EOF - 2010-01-20 vr - revised unified version based on database_tables.php and admin/incudes/application_top.php
ca. Zeile 119
/******** SHOPGATE **********/
define('TABLE_SHOPGATE_ORDERS', 'orders_shopgate_order');
/******** SHOPGATE **********/
// track & trace
define('TABLE_CARRIERS', 'carriers');
define('TABLE_ORDERS_TRACKING', 'orders_tracking');
?>
includes/external/billsafe/classes/billsafe_2/billsafe_2.phpTop ca. Zeile 14
---------------------------------------------------------------------------------------*/
/*
* id = billsafe_2.php
* location = /includes/classes/billsafe_2
* location = /includes/external/billsafe/classes/billsafe_2 // DokuMan - 2012-06-19 - move billsafe to external directory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
includes/external/billsafe/classes/billsafe_2/Exception.phpTop ca. Zeile 14
---------------------------------------------------------------------------------------*/
/*
* id = Exception.php
* location = /includes/classes/billsafe_2
* location = /includes/external/billsafe/classes/billsafe_2 // DokuMan - 2012-06-19 - move billsafe to external directory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
includes/external/billsafe/classes/billsafe_2/HttpClient.phpTop ca. Zeile 14
---------------------------------------------------------------------------------------*/
/*
* id = HttpClient.php
* location = /includes/classes/billsafe_2
* location = /includes/external/billsafe/classes/billsafe_2 // DokuMan - 2012-06-19 - move billsafe to external directory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
includes/external/billsafe/classes/billsafe_2/HttpResponse.phpTop ca. Zeile 14
---------------------------------------------------------------------------------------*/
/*
* id = HttpResponse.php
* location = /includes/classes/billsafe_2
* location = /includes/external/billsafe/classes/billsafe_2 // DokuMan - 2012-06-19 - move billsafe to external directory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
includes/external/billsafe/classes/billsafe_2/ini.phpTop ca. Zeile 14
---------------------------------------------------------------------------------------*/
/*
* id = ini.php
* location = /includes/classes/billsafe_2
* location = /includes/external/billsafe/classes/billsafe_2 // DokuMan - 2012-06-19 - move billsafe to external directory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
ca. Zeile 39
$ini['merchantLicenseLive'] = '';
//geändert Ben BillSAFE
$ini['applicationSignature'] = '1406801e3073bc303cf0d3fff0fb85f7';
//$ini['applicationSignature'] = '3acef6967aac4c3d460242fe3a2a8468';
$ini['applicationVersion'] = 'modified-shop_v2.6 2013-01-23';
$ini['applicationVersion'] = 'modified-shop-1.06_v2.8 2014-01-04';
//Set this to true if your data is utf-8 encoded.
//Set this to false if your data is latin-1 encoded.
//The encoding of the response object will be affected accordingly.
$ini['isUtf8Mode'] = true;
//API version
$ini['apiVersion'] = 208;
$ini['apiVersion'] = 211;
//Payment Gateway version
$ini['gatewayVersion'] = 200;
?>
includes/external/billsafe/classes/billsafe_2/Logger.phpTop ca. Zeile 14
---------------------------------------------------------------------------------------*/
/*
* id = Logger.php
* location = /includes/classes/billsafe_2
* location = /includes/external/billsafe/classes/billsafe_2 // DokuMan - 2012-06-19 - move billsafe to external directory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
includes/external/billsafe/classes/billsafe_2/LoggerEcho.phpTop ca. Zeile 14
---------------------------------------------------------------------------------------*/
/*
* id = LoggerEcho.php
* location = /includes/classes/billsafe_2
* location = /includes/external/billsafe/classes/billsafe_2 // DokuMan - 2012-06-19 - move billsafe to external directory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
includes/external/billsafe/classes/billsafe_2/LoggerFile.phpTop ca. Zeile 14
---------------------------------------------------------------------------------------*/
/*
* id = LoggerFile.php
* location = /includes/classes/billsafe_2
* location = /includes/external/billsafe/classes/billsafe_2 // DokuMan - 2012-06-19 - move billsafe to external directory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
includes/external/billsafe/classes/billsafe_2/LoggerMail.phpTop ca. Zeile 14
---------------------------------------------------------------------------------------*/
/*
* id = LoggerMail.php
* location = /includes/classes/billsafe_2
* location = /includes/external/billsafe/classes/billsafe_2 // DokuMan - 2012-06-19 - move billsafe to external directory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
includes/external/billsafe/classes/billsafe_2/LoggerNull.phpTop ca. Zeile 14
---------------------------------------------------------------------------------------*/
/*
* id = LoggerNull.php
* location = /includes/classes/billsafe_2
* location = /includes/external/billsafe/classes/billsafe_2 // DokuMan - 2012-06-19 - move billsafe to external directory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
includes/external/klarna/api/Klarna.phpTop ca. Zeile 95
* Port used is 443 for SSL and 80 without.
*
* @var string
*/
private static $_beta_addr = 'payment-beta.klarna.com';
private static $_beta_addr = 'payment.testdrive.klarna.com';
/**
* Indicates whether the communications is over SSL or not.
*
includes/external/klarna/api/pclasses/mysqlstorage.class.phpTop ca. Zeile 95
* MySQL DB link resource.
*
* @var resource
*/
protected $link;
protected $link = 'db_klarna';
/**
* return the name of the storage type
*
ca. Zeile 115
* @return void
*/
protected function connect()
{
$this->link = mysql_connect($this->addr, $this->user, $this->passwd);
if ($this->link === false) {
$this->mysqllink = xtc_db_connect($this->addr, $this->user, $this->passwd, $this->dbName, $this->link);
if ($this->mysqllink === false) {
throw new Klarna_DatabaseException(
'Failed to connect to database! ('.mysql_error().')'
'Failed to connect to database!'
);
}
if (!mysql_query(
"CREATE DATABASE IF NOT EXISTS `{$this->dbName}`",
$this->link
)
) {
throw new Klarna_DatabaseException(
'Failed to create! ('.mysql_error().')'
);
}
$create = mysql_query(
"CREATE TABLE IF NOT EXISTS `{$this->dbName}`.`{$this->dbTable}` (
if (xtc_db_num_rows(xtc_db_query("SHOW TABLES LIKE '".$this->dbTable."'", $this->link)) != '1') {
xtc_db_query("CREATE TABLE IF NOT EXISTS `{$this->dbName}`.`{$this->dbTable}` (
`eid` int(10) unsigned NOT NULL,
`id` int(10) unsigned NOT NULL,
`type` tinyint(4) NOT NULL,
`description` varchar(255) NOT NULL,
ca. Zeile 146
`minamount` decimal(11,2) NOT NULL,
`country` int(11) NOT NULL,
`expire` int(11) NOT NULL,
KEY `id` (`id`)
)", $this->link
);
)", $this->link);
}
if (!$create) {
if (xtc_db_num_rows(xtc_db_query("SHOW TABLES LIKE '".$this->dbTable."'", $this->link)) != '1') {
throw new Klarna_DatabaseException(
'Table not existing, failed to create! ('.mysql_error().')'
'Table not existing, failed to create Klarna table!'
);
}
}
ca. Zeile 229
public function load($uri)
{
$this->splitURI($uri);
$this->connect();
$result = mysql_query(
"SELECT * FROM `{$this->dbName}`.`{$this->dbTable}`",
$this->link
);
$result = xtc_db_query("SELECT * FROM `{$this->dbName}`.`{$this->dbTable}`", $this->link);
if ($result === false) {
throw new Klarna_DatabaseException(
'SELECT query failed! ('.mysql_error().')'
'SELECT query from Klarna table failed!'
);
}
while ($row = mysql_fetch_assoc($result)) {
while ($row = xtc_db_fetch_array($result)) {
$this->addPClass(new KlarnaPClass($row));
}
}
ca. Zeile 263
foreach ($this->pclasses as $pclasses) {
foreach ($pclasses as $pclass) {
//Remove the pclass if it exists.
mysql_query(
"DELETE FROM `{$this->dbName}`.`{$this->dbTable}`
xtc_db_query("DELETE FROM `{$this->dbName}`.`{$this->dbTable}`
WHERE `id` = '{$pclass->getId()}'
AND `eid` = '{$pclass->getEid()}'"
);
AND `eid` = '{$pclass->getEid()}'", $this->link);
$sql_data_array = array('eid' => $pclass->getEid(),
'id' => $pclass->getId(),
'type' => $pclass->getType(),
'description' => $pclass->getDescription(),
'months' => $pclass->getMonths(),
'interestrate' => $pclass->getInterestRate(),
'invoicefee' => $pclass->getInvoiceFee(),
'startfee' => $pclass->getStartFee(),
'minamount' => $pclass->getMinAmount(),
'country' => $pclass->getCountry(),
'expire' => $pclass->getExpire());
xtc_db_perform("`{$this->dbName}`.`{$this->dbTable}`", $sql_data_array, 'insert', '', $this->link);
//Insert it again.
$result = mysql_query(
"INSERT INTO `{$this->dbName}`.`{$this->dbTable}`
(`eid`,
`id`,
`type`,
`description`,
`months`,
`interestrate`,
`invoicefee`,
`startfee`,
`minamount`,
`country`,
`expire`
)
VALUES
('{$pclass->getEid()}',
'{$pclass->getId()}',
'{$pclass->getType()}',
'{$pclass->getDescription()}',
'{$pclass->getMonths()}',
'{$pclass->getInterestRate()}',
'{$pclass->getInvoiceFee()}',
'{$pclass->getStartFee()}',
'{$pclass->getMinAmount()}',
'{$pclass->getCountry()}',
'{$pclass->getExpire()}')", $this->link
);
if ($result === false) {
throw new Klarna_DatabaseException(
'INSERT INTO query failed! ('.mysql_error().')'
'INSERT INTO Klarna table failed!'
);
}
}
}
ca. Zeile 320
try {
$this->splitURI($uri);
unset($this->pclasses);
$this->connect();
mysql_query(
"DELETE FROM `{$this->dbName}`.`{$this->dbTable}`",
$this->link
);
xtc_db_query("DELETE FROM `{$this->dbName}`.`{$this->dbTable}`", $this->link);
} catch(Exception $e) {
throw new Klarna_DatabaseException(
$e->getMessage(), $e->getCode()
);
includes/external/klarna/class.KlarnaBase.phpTop ca. Zeile 118
$this->_utils = new KlarnaUtils($country);
$this->_locale = KiTT::locale($country, $lang, $currency);
$css = '';
if (KlarnaConstant::isAdmin()
&& (!array_key_exists('action', $_GET)
|| !in_array($_GET['action'], array('install', 'remove')))
|| !in_array($_GET['action'], array('install', 'remove', 'removeconfirm')))
) {
echo "<link href='" . KlarnaUtils::getStaticPath() .
$css = "<link href='" . KlarnaUtils::getStaticPath() .
"images.css' type='text/css' rel='stylesheet'/>";
$this->_checkForLatestVersion();
$this->description = $this->_buildDescription();
}
//Set the title for the payment method. This will be displayed on the
//confirmation page and the backend order view.
$this->title = $this->_title();
$this->title = $this->_title() . $css;
$merchantID = KlarnaConstant::merchantID($option, $country);
$secret = KlarnaConstant::secret($option, $country);
ca. Zeile 246
return;
}
// Add CSS and Javascript just once.
$css = $script = '';
if (!self::$_hasRun) {
$templateLoader = KiTT::templateLoader($this->_locale);
$cssLoader = $templateLoader->load('css.mustache');
$jsLoader = $templateLoader->load('javascript.mustache');
ca. Zeile 262
"includes/external/klarna/template/css/xtcstyle.css"
);
self::$_hasRun = true;
echo $jsLoader->render(
$script = $jsLoader->render(
array(
"scripts" => array(
EXTERNAL_KITT . "core/v1.0/js/klarna.min.js",
EXTERNAL_KITT . "res/v1.1/js/klarna.lib.min.js",
ca. Zeile 272
)
)
);
echo $cssLoader->render(array('styles' => $styles));
$css = $cssLoader->render(array('styles' => $styles));
}
KiTT::configuration()->set(
'agb_link', KlarnaConstant::agb($this->_option, $this->_country)
ca. Zeile 320
'module' => KITT_String::decode($view->getTitle(), "UTF-8", "ISO-8859-15"),
'module_cost' => $view->getExtra(),
'fields' => array(
array(
'title' => '',
'title' => $script.$css,
'field' => $view->show()
)
)
);
ca. Zeile 372
* @return array
*/
public function confirmation()
{
$logo_base = KlarnaUtils::getStaticPath() . 'logo/';
$country = strtolower($this->_locale->getCountryCode());
$url_base = "<a href='http://www.klarna.com' target='_blank'>";
$desc = '';
if ($this->_isInvoice()) {
$type = '';
switch ($this->_option) {
case KiTT::INVOICE:
$type = 'invoice';
}
if ($this->_isPart()) {
break;
case KiTT::PART:
$type = 'account';
}
if ($this->_isSpec()) {
break;
case KiTT::SPEC:
$type = 'special';
$desc = '<br>' . KiTT::api($country)->getPClass(
$_POST['klarna_spec_paymentPlan']
)->getDescription();
break;
default:
return array('title' => '');
}
$css = "<link href='" . KlarnaUtils::getStaticPath() .
"images.css' type='text/css' rel='stylesheet'/>";
$logo = "<span class='klarna_logo_{$type}_{$country}'></span>";
$title = "$css<br />{$url_base}{$logo}</a>{$desc}";
$cdn = KlarnaUtils::getStaticPath();
$title = <<<TITLE
<link href='{$cdn}images.css' type='text/css' rel='stylesheet'/>
<a href='http://www.klarna.com' target='_blank'>
<div class='klarna_payment_info'>
<span class='klarna_logo_{$type}_{$country}'></span>
</div>
</a>{$desc}
TITLE;
return array('title' => $title);
}
/**
ca. Zeile 678
* @return string
*/
private function _title()
{
$tulip = '';
if (KlarnaConstant::isAdmin()) {
$tulip = '<span class="klarna_icon"> </span>';
}
if ($this->_isInvoice()) {
return $tulip . KiTT::translator($this->_locale)->translate(
'MODULE_INVOICE_TEXT_TITLE'
);
includes/external/klarna/class.KlarnaConstants.phpTop ca. Zeile 155
* @param string $country country
*
* @return boolean
*/
public function isActivated($option, $country)
public static function isActivated($option, $country)
{
$_activated = self::getActivated($option);
return in_array(
ca. Zeile 170
* retrieve the URI for pclass storage.
*
* @return array
*/
public function pcURI()
public static function pcURI()
{
return array(
'user' => DB_SERVER_USERNAME,
'passwd' => DB_SERVER_PASSWORD,
ca. Zeile 188
* @param string $option payment option
*
* @return array
*/
public function getActivated($option)
public static function getActivated($option)
{
switch (strtolower($option)) {
case KiTT::PART:
return explode(
ca. Zeile 216
* Check if logged in as admin
*
* @return true if logged in as admin
*/
public function isAdmin()
public static function isAdmin()
{
return (defined('DIR_WS_ADMIN'));
}
ca. Zeile 240
* @param string $option payment option
*
* @return boolean true if the specified payment option is enabled
*/
public function isEnabled($option)
public static function isEnabled($option)
{
switch ($option) {
case KiTT::PART:
return (defined('MODULE_PAYMENT_KLARNA_PARTPAYMENT_STATUS')?strtolower(MODULE_PAYMENT_KLARNA_PARTPAYMENT_STATUS) == 'true':false);
includes/external/klarna/class.KlarnaCore.phpTop ca. Zeile 51
KiTT_String::$platformEncoding = $_SESSION['language_charset'];
class KlarnaCore {
public static function getCurrentVersion() {
return '1.0.5';
return '1.0.7';
}
}
includes/external/klarna/class.KlarnaInstaller.phpTop ca. Zeile 165
$merged = array_merge($this->_defaultArray, $config);
$query_string = implode(', ', array_keys($merged));
$query_values = implode(
'", "', array_map(
"mysql_real_escape_string", array_values($merged)
"xtc_db_input", array_values($merged)
)
);
$this->_klarnaDB->query(
includes/external/klarna/class.KlarnaUninstaller.phpTop ca. Zeile 99
);
}
if ($this->_klarnaDB->query("SELECT * FROM klarna_pclasses")->count() == 0) {
$this->_klarnaDB->query("DROP TABLE klarna_pclasses");
$this->_klarnaDB->query("DROP TABLE IF EXISTS klarna_pclasses");
}
}
}
}
includes/external/klarna/class.KlarnaUtils.phpTop ca. Zeile 676
$q = "SELECT address_book_id FROM " . TABLE_ADDRESS_BOOK .
" WHERE customers_id = '" . (int)$customer_id .
"' AND entry_firstname = '" .
mysql_real_escape_string($order->delivery['firstname']) .
xtc_db_input($order->delivery['firstname']) .
"' AND entry_lastname = '" .
mysql_real_escape_string($order->delivery['lastname']) .
xtc_db_input($order->delivery['lastname']) .
"' AND entry_street_address = '" .
mysql_real_escape_string($order->delivery['street_address']) .
xtc_db_input($order->delivery['street_address']) .
"' AND entry_postcode = '" .
mysql_real_escape_string($order->delivery['postcode']) .
xtc_db_input($order->delivery['postcode']) .
"' AND entry_city = '" .
mysql_real_escape_string($order->delivery['city']) .
xtc_db_input($order->delivery['city']) .
"' AND entry_company = '" .
mysql_real_escape_string($order->delivery['company']) . "'";
xtc_db_input($order->delivery['company']) . "'";
$check_address_query = $this->_klarnaDB->query($q);
$check_address = $check_address_query->getArray();
if (is_array($check_address) && $check_address_query->count() > 0) {
ca. Zeile 859
$shippingCost = $this->_getShippingCost();
if ($order == null) {
return $shippingCost + ($_SESSION['cart']->total);
return $shippingCost + ($_SESSION['cart']->show_total());
}
$totalSum = 0;
foreach ($order->products as $product) {
ca. Zeile 1466
public function updateOrderDatabase($customer, $admin)
{
global $insert_id;
$orderid = mysql_real_escape_string($insert_id);
$refno = mysql_real_escape_string($_SESSION['klarna_refno']);
$orderid = xtc_db_input($insert_id);
$refno = xtc_db_input($_SESSION['klarna_refno']);
$sql_data_arr = array(
'orders_id' => $orderid,
'orders_status_id' => $customer,
includes/external/klarna/KITT/data/inputFields.jsonTop ca. Zeile 1 +1
{"fields":{"gender":{"type":"radio","title":"sex","values":[{"value":"1","id":"male","text":"sex_male"},{"value":"0","id":"female","text":"sex_female"}]},"street":{"type":"text","title":"address_street","notice":"notice_streetaddress","size":18},"phone_number":{"type":"text","title":"phone_number","notice":"notice_phoneNumber","size":18},"pno":{"type":"text","title":"socialSecurityNumber","notice":"notice_socialNumber_#country#","size":18},"zipcode":{"type":"text","title":"address_zip","notice":"notice_zip","size":6},"city":{"type":"text","title":"address_city","notice":"notice_city","size":18},"reference":{"type":"text","title":"reference","notice":"notice_reference","size":18},"company_name":{"type":"text","title":"company_name","notice":"notice_companyName","size":18},"invoice_type":{"type":"radio","title":"invoice_type","default":"private","values":[{"value":"private","id":"private","text":"invoice_type_private","class":"invoice_type"},{"value":"company","id":"company","text":"invoice_type_company","class":"invoice_type"}]},"first_name":{"type":"text","title":"first_name","notice":"notice_firstName","size":18},"last_name":{"type":"text","title":"last_name","notice":"notice_lastName","size":18},"house_number":{"type":"text","title":"address_homenumber","notice":"notice_housenumber","size":6},"house_extension":{"type":"text","title":"address_housenumber_addition","notice":"notice_house_extension","size":6},"birth_year":{"type":"select","title":"date_year","values":"#years#"},"birth_month":{"type":"select","title":"date_month","values":"#months#"},"birth_day":{"type":"select","title":"date_day","values":"#days#"},"consent":{"type":"checkbox","title":""}},"country_fields":{"SE":[{"class":"Klarna_pnoInputField","fields":["pno"]},{"condition":"company","fields":["reference"]},{"fields":["phone_number"]}],"NO":[{"class":"Klarna_pnoInputField","fields":["pno"]},{"class":"invoice_type","fields":["invoice_type"]},{"condition":"company","fields":["company_name","reference"]},{"condition":"private","fields":["first_name","last_name"]},{"fields":["phone_number"]},{"fields":["street"]},{"fields":["zipcode","city"]}],"FI":[{"class":"Klarna_pnoInputField","fields":["pno"]},{"class":"invoice_type","fields":["invoice_type"]},{"condition":"company","fields":["company_name","reference"]},{"condition":"private","fields":["first_name","last_name"]},{"fields":["phone_number"]},{"fields":["street"]},{"fields":["zipcode","city"]}],"DK":[{"class":"Klarna_pnoInputField","fields":["pno"]},{"class":"invoice_type","fields":["invoice_type"]},{"condition":"company","fields":["company_name","reference"]},{"condition":"private","fields":["first_name","last_name"]},{"fields":["phone_number"]},{"fields":["street"]},{"fields":["zipcode","city"]}],"DE":[{"fields":["first_name","last_name"]},{"fields":["gender"]},{"fields":["phone_number"]},{"fields":["street","house_number"]},{"fields":["zipcode","city"]},{"title":"birthday","fields":["birth_year","birth_month","birth_day"]},{"custom":"consent","fields":["consent"]}],"NL":[{"fields":["first_name","last_name"]},{"fields":["gender"]},{"fields":["phone_number"]},{"fields":["street","house_number","house_extension"]},{"fields":["zipcode","city"]},{"title":"birthday","fields":["birth_year","birth_month","birth_day"]}],"AT":[{"fields":["first_name","last_name"]},{"fields":["gender"]},{"fields":["phone_number"]},{"fields":["street"]},{"fields":["zipcode","city"]},{"title":"birthday","fields":["birth_year","birth_month","birth_day"]},{"custom":"consent","fields":["consent"]}]}}
{"fields":{"gender":{"type":"radio","title":"sex","values":[{"value":"1","id":"male","text":"sex_male"},{"value":"0","id":"female","text":"sex_female"}]},"street":{"type":"text","title":"address_street","notice":"notice_streetaddress","size":18},"phone_number":{"type":"text","title":"phone_number","notice":"notice_phoneNumber","size":18},"pno":{"type":"text","title":"socialSecurityNumber","notice":"notice_socialNumber_#country#","size":18},"zipcode":{"type":"text","title":"address_zip","notice":"notice_zip","size":6},"city":{"type":"text","title":"address_city","notice":"notice_city","size":18},"reference":{"type":"text","title":"reference","notice":"notice_reference","size":18},"company_name":{"type":"text","title":"company_name","notice":"notice_companyName","size":18},"invoice_type":{"type":"radio","title":"invoice_type","default":"private","values":[{"value":"private","id":"private","text":"invoice_type_private","class":"invoice_type"},{"value":"company","id":"company","text":"invoice_type_company","class":"invoice_type"}]},"first_name":{"type":"text","title":"first_name","notice":"notice_firstName","size":18},"last_name":{"type":"text","title":"last_name","notice":"notice_lastName","size":18},"house_number":{"type":"text","title":"address_homenumber","notice":"notice_housenumber","size":6},"house_extension":{"type":"text","title":"address_housenumber_addition","notice":"notice_house_extension","size":6},"birth_year":{"type":"select","title":"date_year","values":"#years#"},"birth_month":{"type":"select","title":"date_month","values":"#months#"},"birth_day":{"type":"select","title":"date_day","values":"#days#"},"consent":{"type":"checkbox","title":""}},"country_fields":{"SE":[{"class":"Klarna_pnoInputField","fields":["pno"]},{"condition":"company","fields":["reference"]},{"fields":["phone_number"]}],"NO":[{"class":"Klarna_pnoInputField","fields":["pno"]},{"class":"invoice_type","fields":["invoice_type"]},{"condition":"company","fields":["company_name","reference"]},{"condition":"private","fields":["first_name","last_name"]},{"fields":["phone_number"]},{"fields":["street"]},{"fields":["zipcode","city"]}],"FI":[{"class":"Klarna_pnoInputField","fields":["pno"]},{"class":"invoice_type","fields":["invoice_type"]},{"condition":"company","fields":["company_name","reference"]},{"condition":"private","fields":["first_name","last_name"]},{"fields":["phone_number"]},{"fields":["street"]},{"fields":["zipcode","city"]}],"DK":[{"class":"Klarna_pnoInputField","fields":["pno"]},{"class":"invoice_type","fields":["invoice_type"]},{"condition":"company","fields":["company_name","reference"]},{"condition":"private","fields":["first_name","last_name"]},{"fields":["phone_number"]},{"fields":["street"]},{"fields":["zipcode","city"]}],"DE":[{"fields":["first_name","last_name"]},{"fields":["gender"]},{"fields":["phone_number"]},{"fields":["street","house_number"]},{"fields":["zipcode","city"]},{"title":"birthday","fields":["birth_year","birth_month","birth_day"]},{"custom":"consent","fields":["consent"]}],"NL":[{"fields":["first_name","last_name"]},{"fields":["gender"]},{"fields":["phone_number"]},{"fields":["street","house_number","house_extension"]},{"fields":["zipcode","city"]},{"title":"birthday","fields":["birth_year","birth_month","birth_day"]}],"AT":[{"fields":["first_name","last_name"]},{"fields":["gender"]},{"fields":["phone_number"]},{"fields":["street"]},{"fields":["zipcode","city"]},{"title":"birthday","fields":["birth_year","birth_month","birth_day"]},{"custom":"consent","fields":["consent"]}]},"version":"dev"}
includes/external/klarna/KITT/data/lookupTable.jsonTop ca. Zeile 1 +1
{"lookupTable":{"SEK":{"SE":["sv"]},"EUR":{"FI":["fi"],"DE":["de"],"NL":["nl"],"AT":["de"]},"DKK":{"DK":["da"]},"NOK":{"NO":["nb"]}}}
{"lookupTable":{"SEK":{"SE":["sv"]},"EUR":{"FI":["fi"],"DE":["de"],"NL":["nl"],"AT":["de"]},"DKK":{"DK":["da"]},"NOK":{"NO":["nb"]}},"version":"dev"}
includes/external/klarna/template/description.mustacheTop ca. Zeile 6
<br />
<strong>Version:</strong> {{version}}
<br />
<br />
<img src='../lang/german/admin/images/icon.gif' border='0' />
<a href='http://merchants.klarna.com/signup/DE?locale=de&partner_id=eca2bff1823619bbb2932ce140bc3ed728dce4b4&source=0' target='_blank' style='text-decoration: underline; font-weight: bold;'>Jetzt Klarna Konto hier erstellen.</a>
<img src='images/icon_popup.gif' border='0' />
<br /><br />
<img src='../lang/english/admin/images/icon.gif' border='0' />
<a href='http://merchants.klarna.com/signup/DE?locale=de&partner_id=eca2bff1823619bbb2932ce140bc3ed728dce4b4&source=0' target='_blank' style='text-decoration: underline; font-weight: bold;'>Create Klarna account now.</a>
<img src='images/icon_popup.gif' border='0' />
<a href='https://www.klarna.com' target='_blank' style='text-decoration: underline; font-weight: bold;'>Visit Klarna's Website</a>
<br />
{{#pclasses}}
<br />
<br />
includes/external/payone/classes/PayoneAddressCheck.phpTop ca. Zeile 183
$this->set_content_data('note_address_changed', NOTE_ADDRESS_CHANGED);
unset($_SESSION['payone_error']);
}
$this->set_content_data('form_action', xtc_href_link(basename($PHP_SELF), '', 'SSL'));
$this->set_content_data('FORM_ACTION', xtc_draw_form('payone_address_check', xtc_href_link(basename($PHP_SELF), '', 'SSL'), 'post'));
$this->set_content_data('BUTTON_CONFIRM', xtc_image_submit('button_confirm.gif', IMAGE_BUTTON_CONFIRM));
$this->set_content_data('payonecss', DIR_WS_EXTERNAL.'payone/css/payone.css');
$t_html_output = $this->_payone->build_html('checkout_payone_addresscheck.html', $this->content);
includes/external/payone/classes/PayoneModified.phpTop ca. Zeile 25
protected $_client_api_url;
protected $_frontend_url;
protected $_server_api_url;
public $integrator_version = '1.02';
public function __construct() {
$this->_client_api_url = 'https://secure.pay1.de/client-api/';
$this->_frontend_url = 'https://secure.pay1.de/frontend/';
$this->_server_api_url = 'https://api.pay1.de/post-gateway/';
ca. Zeile 318
foreach($flatconfig as $path => $value) {
xtc_db_query("INSERT INTO `payone_config` SET `path` = '".xtc_db_input($path)."', `value` = '".xtc_db_input($value)."'");
}
$this->adjustSortOrders();
//$this->adjustSortOrders();
}
public function adjustSortOrders() {
$gconfig = $this->getGenresConfig();
ca. Zeile 525
'language' => strtolower($_SESSION['language_code']),
'solution_name' => PROJECT_VERSION,
'solution_version' => $db_version_check,
'integrator_name' => 'Modified',
'integrator_version' => '1.00',
'integrator_version' => $this->integrator_version,
);
if ($request !== null) {
$params['request'] = $request;
}
includes/external/payone/classes/PayonePayment.phpTop ca. Zeile 39
$this->global_config = $this->pg_config['global_override'] == 'true' ? $this->pg_config['global'] : $this->config['global'];
$this->tmpStatus = $this->config['orders_status']['tmp'];
!empty($this->code) OR $this->code = 'payone';
$this->title = @constant('MODULE_PAYMENT_'.strtoupper($this->code).'_TEXT_TITLE');
$this->description = @constant('MODULE_PAYMENT_'.strtoupper($this->code).'_TEXT_DESCRIPTION').((defined('_VALID_XTC')) ? MODULE_PAYMENT_PAYONE_LP : '');
$this->sort_order = @constant('MODULE_PAYMENT_'.strtoupper($this->code).'_SORT_ORDER');
$this->enabled = ((@constant('MODULE_PAYMENT_'.strtoupper($this->code).'_STATUS') == 'True') ? true : false);
$this->info = @constant('MODULE_PAYMENT_'.strtoupper($this->code).'_TEXT_INFO');
$this->title = ((defined('MODULE_PAYMENT_'.strtoupper($this->code).'_TEXT_TITLE')) ? constant('MODULE_PAYMENT_'.strtoupper($this->code).'_TEXT_TITLE') : '');
$this->description = ((defined('MODULE_PAYMENT_'.strtoupper($this->code).'_TEXT_DESCRIPTION')) ? constant('MODULE_PAYMENT_'.strtoupper($this->code).'_TEXT_DESCRIPTION').((defined('_VALID_XTC')) ? MODULE_PAYMENT_PAYONE_LP : '') : '');
$this->sort_order = ((defined('MODULE_PAYMENT_'.strtoupper($this->code).'_SORT_ORDER')) ? constant('MODULE_PAYMENT_'.strtoupper($this->code).'_SORT_ORDER') : '');
$this->enabled = ((defined('MODULE_PAYMENT_'.strtoupper($this->code).'_STATUS') && constant('MODULE_PAYMENT_'.strtoupper($this->code).'_STATUS') == 'True') ? true : false);
$this->info = ((defined('MODULE_PAYMENT_'.strtoupper($this->code).'_TEXT_INFO')) ? constant('MODULE_PAYMENT_'.strtoupper($this->code).'_TEXT_INFO') : '');
$this->order_status = $this->config['orders_status']['paid'];
if (is_object($order)) {
$this->update_status();
ca. Zeile 85
if (isset($forbidden_array[$_SESSION['shipping']['id']]) && $forbidden_array[$_SESSION['shipping']['id']] == $this->code) {
$this->enabled = false;
}
if (($this->enabled == true) && ((int) @constant('MODULE_PAYMENT_'.strtoupper($this->code).'_ZONE') > 0)) {
if (($this->enabled == true) && (defined('MODULE_PAYMENT_'.strtoupper($this->code).'_ZONE') && (int)constant('MODULE_PAYMENT_'.strtoupper($this->code).'_ZONE') > 0)) {
$check_flag = false;
$check_query = xtc_db_query("SELECT zone_id
FROM ".TABLE_ZONES_TO_GEO_ZONES."
WHERE geo_zone_id = '".@constant('MODULE_PAYMENT_'.strtoupper($this->code).'_ZONE')."'
WHERE geo_zone_id = '".constant('MODULE_PAYMENT_'.strtoupper($this->code).'_ZONE')."'
AND zone_country_id = '".$order->billing['country']['id']."'
ORDER BY zone_id");
while ($check = xtc_db_fetch_array($check_query)) {
if ($check['zone_id'] < 1) {
ca. Zeile 321
function refresh() {
}
function process_button() {
$order = $GLOBALS['order'];
$pb = '';
return $pb;
}
function payment_action() {
}
ca. Zeile 458
if (xtc_db_num_rows($check_query) > 0) {
$check = xtc_db_fetch_array($check_query);
if ($_SESSION['customer_id'] == $check['customers_id']) {
require_once(DIR_FS_INC.'xtc_remove_order.inc.php');
require_once(DIR_FS_INC.'xtc_restock_order.inc.php');
xtc_remove_order((int)$order_id, true);
xtc_remove_order((int)$order_id, ((STOCK_LIMITED == 'true') ? 'on' : false));
}
}
}
ca. Zeile 563
'aid' => $this->global_config['subaccount_id'],
'key' => $this->global_config['key'],
'clearingtype' => $clearingtype,
'reference' => $insert_id,
'amount' => round($order->info['total'], 2),
'amount' => round(((isset($order->info['pp_total'])) ? $order->info['pp_total'] : $order->info['total']), 2),
'currency' => $order->info['currency'],
'personal_data' => $this->personal_data,
'delivery_data' => $this->delivery_data,
'payment' => $this->payment_method,
includes/external/payone/css/payone.cssTop ca. Zeile 133
font-weight:bold;
}
.payone_cc_container .errormessage {
border:solid #DCA7A7 1px;
padding:10px;
border: 0px;
padding: 0px 10px;
font-size:13px !important;
line-height:17px;
line-height: 30px;
color:#A94442;
background-color:#F2DEDE ;
margin-bottom:8px !important;
text-align:left;
}
iframe, span.inputIframe {
float:left;
}
/* Ende Kreditkartenformular checkout_confirmation */
/* Start Lastschrift Formular */
includes/external/payone/css/payone_config.cssTop ca. Zeile 6
margin: .5ex auto;
background: rgb(240, 230, 140);
border: 1px solid rgb(255, 0, 0);
padding: 1em;
margin: 5px;
}
dl.adminform {
position: relative;
ca. Zeile 75
}
.payone_config h3 {
margin:1px 0px 1px 0px;
background: #ddd;
padding: 7px;
background: #CCC none repeat scroll 0px 0px;
font-size: 10px;
font-weight: bold;
line-height: 14px;
padding: 12px 5px;
border-top: 1px solid #AAA;
border-bottom: 1px solid #AAA;
color: #AF417E;
cursor: pointer;
font-size:14px;
color:#555;
line-height:20px;
margin: 5px;
}
.payone_config h3:hover {
background:#eee;
color:#333;
background: #EEE none repeat scroll 0% 0%;
color: #AF417E;
}
.payone_config h3.active {
background: #ddd;
margin-bottom: 0px !important;
background: #DDD none repeat scroll 0% 0%;
color: #6D2551;
}
includes/external/payone/lang/english.phpTop ca. Zeile 17
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
// error messages
define('NOTE_ADDRESS_CHANGED', 'Die Adresse hat sich geändert.');
define('ADDRESSES_MUST_BE_EQUAL','Bei der gewählten Zahlungsart müssen Rechnungs- und Lieferadresse übereinstimmen!');
define('INSTALLMENT_TYPE_NOT_SELECTED', 'Keinen Typ gewählt.');
define('PAYDATA_INCOMPLETE', 'Die Angaben zur Zahlungsweise sind unvollständig.');
define('PAYMENT_ERROR', 'Es ist ein Fehler bei der Verarbeitung aufgetreten.');
define('ERROR_MUST_CONFIRM_MANDATE', 'Bitte bestätigen Sie, dass Sie das SEPA-Lastschriftmandat erteilen möchten.');
define('NOTE_ADDRESS_CHANGED', 'The address has changed.');
define('ADDRESSES_MUST_BE_EQUAL','With the payment method choosen billing and delivery address must correspond!');
define('INSTALLMENT_TYPE_NOT_SELECTED', 'No type selected.');
define('PAYDATA_INCOMPLETE', 'The indications for the payment method are incomplete.');
define('PAYMENT_ERROR', 'An error occurred while processing.');
define('ERROR_MUST_CONFIRM_MANDATE', 'Please confirm that you want to grant the SEPA direct debit mandate.');
// credit risk check
define('CREDIT_RISK_HEADING', 'Bonitätsprüfung');
define('BUTTON_CONFIRM', 'Ja, Prüfung durchführen');
define('BUTTON_NOCONFIRM', 'Nein, keine Prüfung durchführen');
define('TEXT_CREDIT_RISK_INFO', 'Es wird eine Bonitätsabfrage durchgeführt.');
define('TEXT_CREDIT_RISK_COMFIRM', 'Möchten Sie dem zustimmen?');
define('CREDIT_RISK_FAILED', 'Bitte wählen Sie eine andere Zahlungsweise.');
define('CREDIT_RISK_CONFIGURATION', 'Bonitätsprüfung');
define('CR_ACTIVE', 'aktiv');
define('CR_OPERATING_MODE', 'Betriebsmodus');
define('CR_TIMEOFCHECK', 'Zeitpunkt der Prüfung');
define('CR_TIMEOFCHECK_BEFORE', 'vor der Zahlartauswahl');
define('CR_TIMEOFCHECK_AFTER', 'nach der Zahlartauswahl');
define('CR_TYPEOFCHECK', 'Prüfungsart');
define('CR_TYPEOFCHECK_ISCOREHARD', 'Infoscore (harte Kriterien)');
define('CR_TYPEOFCHECK_ISCOREALL', 'Infoscore (alle Merkmale)');
define('CR_TYPEOFCHECK_ISCOREBSCORE', 'Infoscore (alle Merkmale + Boniscore');
define('CR_NEWCLIENTDEFAULT', 'Standardwert für Neukunden');
define('CR_VALIDITY', 'Gültigkeit');
define('CR_MIN_CART_VALUE', 'minimaler Warenwert');
define('CR_MAX_CART_VALUE', 'maximaler Warenwert');
define('CR_CHECKFORGENRE', 'Prüfung bei');
define('CR_ERROR_MODE', 'Fehlerverhalten');
define('CR_ERROR_MODE_ABORT', 'Vorgang abbrechen');
define('CR_ERROR_MODE_CONTINUE', 'fortfahren');
define('CR_NOTICE', 'Hinweistext');
define('CR_CONFIRMATION', 'Zustimmungsabfrage');
define('CR_ABTEST', 'A/B-Test');
define('CREDIT_RISK_HEADING', 'Credit check');
define('BUTTON_CONFIRM', 'Yes, perform credit check');
define('BUTTON_NOCONFIRM', 'No, don\'t execute a verification');
define('TEXT_CREDIT_RISK_INFO', 'A credit assessment is being executed.');
define('TEXT_CREDIT_RISK_COMFIRM', 'Do you want to agree with this?');
define('CREDIT_RISK_FAILED', 'Please choose another payment method.');
define('CREDIT_RISK_CONFIGURATION', 'Credit check');
define('CR_ACTIVE', 'active');
define('CR_OPERATING_MODE', 'Operating mode');
define('CR_TIMEOFCHECK', 'Point in time of the evaluation');
define('CR_TIMEOFCHECK_BEFORE', 'before choice of the payment method');
define('CR_TIMEOFCHECK_AFTER', 'after the choice of the payment method');
define('CR_TYPEOFCHECK', 'Method of evaluation');
define('CR_TYPEOFCHECK_ISCOREHARD', 'Infoscore (hard criteria)');
define('CR_TYPEOFCHECK_ISCOREALL', 'Infoscore (all criterions)');
define('CR_TYPEOFCHECK_ISCOREBSCORE', 'Infoscore (all criterions + score of boni');
define('CR_NEWCLIENTDEFAULT', 'Default value for new customers');
define('CR_VALIDITY', 'Validity');
define('CR_MIN_CART_VALUE', 'Minimum value of goods');
define('CR_MAX_CART_VALUE', 'Maximum value of goods');
define('CR_CHECKFORGENRE', 'Evaluation with');
define('CR_ERROR_MODE', 'Error behavior');
define('CR_ERROR_MODE_ABORT', 'Cancel process');
define('CR_ERROR_MODE_CONTINUE', 'continue');
define('CR_NOTICE', 'Notice');
define('CR_CONFIRMATION', 'Inquiry of approval');
define('CR_ABTEST', 'A/B testing');
// address check
define('TEXT_ADDRESS_CHECK_HEADING', 'Adresse korrigieren');
define('TEXT_ADDRESS_CHECK_CHANGED', 'korrigiert');
define('AC_ACTIVE', 'aktiv');
define('AC_OPERATING_MODE', 'Betriebsmodus');
define('AC_BILLING_ADDRESS', 'Rechnungsadresse');
define('AC_DELIVERY_ADDRESS', 'Lieferadresse');
define('AC_AUTOMATIC_CORRECTION', 'Automatische Korrektur');
define('AC_ERROR_MODE', 'Fehlerverhalten');
define('AC_MIN_CART_VALUE', 'Minimaler Warenwert');
define('AC_MAX_CART_VALUE', 'Maximaler Warenwert');
define('AC_VALIDITY', 'Gültigkeit');
define('AC_ERROR_MESSAGE', 'Fehlermeldung');
define('AC_PSTATUS_MAPPING', 'Personenstatusmapping');
define('AC_BACHECK_NONE', 'nicht prüfen');
define('AC_BACHECK_BASIC', 'Basis');
define('AC_BACHECK_PERSON', 'Person (nur DE!)');
define('AC_AUTOMATIC_CORRECTION_NO', 'nein');
define('AC_AUTOMATIC_CORRECTION_YES', 'ja');
define('AC_AUTOMATIC_CORRECTION_USER', 'Benutzerentscheidung');
define('AC_ERROR_MODE_ABORT', 'Vorgang abbrechen');
define('AC_ERROR_MODE_REENTER', 'Neueingabe');
define('AC_ERROR_MODE_CONTINUE', 'fortfahren');
define('DAYS', 'Tage');
define('ERROR_MESSAGE_INFO', 'Verwenden Sie {payone_error} als Platzhalter für die Rückmeldung der PAYONE-Plattform');
define('AC_PSTATUS_NOPCHECK', 'keine Personenprüfung durchgeführt');
define('AC_PSTATUS_FULLNAMEKNOWN', 'Vor- und Nachname bekannt');
define('AC_PSTATUS_LASTNAMEKNOWN', 'Nachname bekannt');
define('AC_PSTATUS_NAMEUNKNOWN', 'Vor- und Nachname nicht bekannt');
define('AC_PSTATUS_NAMEADDRAMBIGUITY', 'Mehrdeutigkeit bei Name zu Anschrift');
define('AC_PSTATUS_UNDELIVERABLE', 'nicht (mehr) zustellbar');
define('AC_PSTATUS_DEAD', 'Person verstorben');
define('AC_PSTATUS_POSTALERROR', 'Adresse postalisch falsch');
define('TEXT_ADDRESS_CHECK_HEADING', 'Correct address');
define('TEXT_ADDRESS_CHECK_CHANGED', 'corrected');
define('AC_ACTIVE', 'active');
define('AC_OPERATING_MODE', 'Operating mode');
define('AC_BILLING_ADDRESS', 'Billing address');
define('AC_DELIVERY_ADDRESS', 'Shipping address');
define('AC_AUTOMATIC_CORRECTION', 'Automatic correction');
define('AC_ERROR_MODE', 'Error behavior');
define('AC_MIN_CART_VALUE', 'Minimum value of goods');
define('AC_MAX_CART_VALUE', 'Maximum value of goods');
define('AC_VALIDITY', 'Validity');
define('AC_ERROR_MESSAGE', 'Error message');
define('AC_PSTATUS_MAPPING', 'Persons status mapping');
define('AC_BACHECK_NONE', 'don\'t check');
define('AC_BACHECK_BASIC', 'Basic');
define('AC_BACHECK_PERSON', 'Person (only DE!)');
define('AC_AUTOMATIC_CORRECTION_NO', 'no');
define('AC_AUTOMATIC_CORRECTION_YES', 'yes');
define('AC_AUTOMATIC_CORRECTION_USER', 'Users decision');
define('AC_ERROR_MODE_ABORT', 'Cancel process');
define('AC_ERROR_MODE_REENTER', 'Retype');
define('AC_ERROR_MODE_CHECK', 'Perform subsequent credit check');
define('AC_ERROR_MODE_CONTINUE', 'continue');
define('DAYS', 'Days');
define('ERROR_MESSAGE_INFO', 'Use {payone_error} as a placeholder for the response of the PAYONE platform');
define('AC_PSTATUS_NOPCHECK', 'No person audit executed');
define('AC_PSTATUS_FULLNAMEKNOWN', 'First name and surname are known');
define('AC_PSTATUS_LASTNAMEKNOWN', 'Surname is known');
define('AC_PSTATUS_NAMEUNKNOWN', 'First name and surname unknown');
define('AC_PSTATUS_NAMEADDRAMBIGUITY', 'Ambiguity in name to address');
define('AC_PSTATUS_UNDELIVERABLE', 'not deliverable (any more)');
define('AC_PSTATUS_DEAD', 'Person deceased');
define('AC_PSTATUS_POSTALERROR', 'Wrong postal address');
// api
define('STATUS_UPDATED_BY_PAYONE', 'Status aktualisiert durch PAYONE');
define('STATUS_UPDATED_BY_PAYONE', 'Status updated by PAYONE');
define('COMMENT_ERROR', 'comment_error');
define('COMMENT_REDIRECTION_INITIATED', 'comment_redirection_initiated');
define('COMMENT_AUTH_APPROVED', 'Zahlung bewilligt');
define('COMMENT_PREAUTH_APPROVED', 'Zahlung bewilligt');
define('COMMENT_AUTH_APPROVED', 'Payment approved');
define('COMMENT_PREAUTH_APPROVED', 'Payment approved');
define('VOUCHER_OR_DISCOUNT', 'voucher_or_discount');
define('MISC_HANDLING', 'misc_handling');
define('SHIPPING_COST', 'shipping_cost');
ca. Zeile 110
define('paymenttype_maestro', 'Maestro');
define('paymenttype_billsafe', 'BillSAFE');
define('paymenttype_klarna', 'Klarna');
define('paymenttype_commerzfinanz', 'CommerzFinanz');
define('paymenttype_lastschrift', 'Lastschrift');
define('paymenttype_invoice', 'Rechnung');
define('paymenttype_prepay', 'Vorkasse');
define('paymenttype_cod', 'Nachnahme');
define('paymenttype_lastschrift', 'Direct debit');
define('paymenttype_invoice', 'Sale on account');
define('paymenttype_prepay', 'Cash in advance');
define('paymenttype_cod', 'Cash on delivery');
define('paymenttype_paypal', 'PayPal');
define('paymenttype_sofortueberweisung', 'Sofortüberweisung');
define('paymenttype_giropay', 'GiroPay');
define('paymenttype_eps', 'EPS');
ca. Zeile 123
define('paymenttype_pfcard', 'Post-Finance Card');
define('paymenttype_ideal', 'iDEAL');
// payment form
define('selection_type', 'Zahlungsweise:');
define('customers_dob', 'Geburtsdatum (TT.MM.JJJJ):');
define('customers_telephone', 'Telefon:');
define('selection_type', 'Payment method:');
define('customers_dob', 'Date of birth (DD.MM.YYYY):');
define('customers_telephone', 'Phone:');
define('personalid', 'Personal ID:');
define('addressaddition', 'Adresszusatz:');
define('addressaddition', 'Additional address:');
// installment
define('TEXT_KLARNA_CONFIRM', 'Mit der Datenverarbeitung der für die Abwicklung des Rechnungskaufes und einer Identitäts- und Bonitätsprüfung erforderlichen Daten durch Klarna bin ich einverstanden. Meine %s kann ich jederzeit mit Wirkung für die Zukunft widerrufen. Es gelten die AGB des Händlers.');
define('TEXT_KLARNA_INVOICE', 'Weitere Informationen zum Rechnungskauf finden sie in den');
define('TEXT_KLARNA_CONFIRM', ' I agree with the data processing required for the execution of the sale on account and an identity and credit check by Klarna. I can revoke my %s at any time with effect for the future. Terms and conditions of the dealer apply.');
define('TEXT_KLARNA_ERROR_CONDITIONS', 'If you do not accept the conditions of invoice from Klarna, we unfortunately can not accept your order!');
define('TEXT_KLARNA_INVOICE', 'For more information on sale on account, see the');
define('KLARNA_STOREID', 'Klarna SoreID');
define('KLARNA_COUNTRIES', 'Klarna Länder');
define('KLARNA_COUNTRIES', 'Klarna Countries');
// otrans
define('onlinetransfer_type', 'Typ:');
define('bankaccountholder', 'Kontoinhaber:');
define('onlinetransfer_type', 'Type:');
define('bankaccountholder', 'Account holder:');
define('iban', 'IBAN:');
define('bic', 'BIC:');
define('ideal', 'Bankgruppe:');
define('eps', 'Bankgruppe:');
define('bankaccount', 'Kontonummer:');
define('bankcode', 'Bankleitzahl:');
define('ideal', 'Bank group:');
define('eps', 'Bank group:');
define('bankaccount', 'Account number:');
define('bankcode', 'Bank code:');
// ELV
define('SEPA_MANDATE_HEADING', 'SEPA-Lastschrift');
define('SEPA_MANDATE_INFO', 'Damit wir den Betrag per Lastschrift von Ihrem Konto einziehen können, benötigen wir von Ihnen ein SEPA-Lastschriftmandat.');
define('SEPA_MANDATE_CONFIRM_LABEL', 'Ich möchte das Mandat erteilen (elektronische Übermittlung)');
define('NOTE_GERMAN_ACCOUNT', 'oder bezahlen Sie wie gewohnt mit ihren bekannten Kontodaten (nur für deutsche Kontoverbindungen)');
define('SEPA_MANDATE_HEADING', 'SEPA direct debit');
define('SEPA_MANDATE_INFO', 'For redeeming the amount by direct debit from your bank account, we need a SEPA direct debit mandate.');
define('SEPA_MANDATE_CONFIRM_LABEL', 'I would like to grant a mandate (electronic transmission)');
define('NOTE_GERMAN_ACCOUNT', 'or pay as usual with your known bank details (only for German bank accounts)');
define('ELV_IBAN', 'IBAN:');
define('ELV_BIC', 'BIC:');
define('ELV_ACCOUNT_HOLDER', 'Kontoinhaber:');
define('ELV_BANKCODE', 'Bankleitzahl:');
define('ELV_ACCOUNT_NUMBER', 'Kontonummer:');
define('ELV_COUNTRY', 'Land:');
define('ELV_COUNTRY_DE', 'Deutschland');
define('ELV_COUNTRY_AT', 'Österreich');
define('ELV_COUNTRY_NL', 'Niederlande');
define('SEPA_COUNTRIES', 'Kontoländer für SEPA-Lastschrift');
define('SEPA_DISPLAY_KTOBLZ', 'Zusatzfelder Konto/BLZ');
define('SEPA_DISPLAY_KTOBLZ_NOTE', 'Bei SEPA-Lastschrift zusätzlich Felder für Kontonummer/Bankleitzahl anzeigen (nur dt. Konten)');
define('SEPA_USE_MANAGEMANDATE', 'Mandatserteilung aktivieren');
define('SEPA_USE_MANAGEMANDATE_NOTE', 'Die Mandatserteilung erfolgt mit dem kostenpflichtigen Request "managemandate". Der Request beinhaltet einen bankaccountcheck. Allerdings ist hier keine Abfrage der POS-Sperrliste möglich.');
define('SEPA_DOWNLOAD_PDF', 'Download Mandat als PDF');
define('SEPA_DOWNLOAD_PDF_NOTE', 'Download des SEPA-Lastschriftmandats als PDF-Datei anbieten (nur, wenn bei PAYONE das Produkt "SEPA-Mandate als PDF" gebucht wurde)');
define('DOWNLOAD_MANDATE_HERE', 'Das im Zuge der SEPA-Lastschriftzahlung erteilte Mandat können Sie jetzt herunterladen: ');
define('MANDATE_PDF', 'PDF-Datei');
define('CHECK_BANKDATA', 'Kontodaten prüfen');
define('DONT_CHECK', 'nicht prüfen');
define('CHECK_BASIC', 'Basis');
define('CHECK_POS', 'mit POS-Sperrliste');
define('ELV_ACCOUNT_HOLDER', 'Account holder:');
define('ELV_BANKCODE', 'Bank code:');
define('ELV_ACCOUNT_NUMBER', 'Account number:');
define('ELV_COUNTRY', 'Country:');
define('ELV_COUNTRY_DE', 'Germany');
define('ELV_COUNTRY_AT', 'Austria');
define('ELV_COUNTRY_NL', 'Netherlands');
define('SEPA_COUNTRIES', 'List of supported SEPA direct debit countries');
define('SEPA_DISPLAY_KTOBLZ', 'Additional fields bank account/bank code');
define('SEPA_DISPLAY_KTOBLZ_NOTE', 'Show additional fields for account number/bank code (only german bank accounts)');
define('SEPA_USE_MANAGEMANDATE', 'Enable grant of mandate');
define('SEPA_USE_MANAGEMANDATE_NOTE', 'The grant of mandate takes place with the charged request "managemandate". The request includes a bank account check. However, no inquiry for the POS blocklist is possible with this.');
define('SEPA_DOWNLOAD_PDF', 'Download mandate as PDF');
define('SEPA_DOWNLOAD_PDF_NOTE', 'Offer download of the SEPA direct debit mandate as PDF file (only available if you expensed the product "SEPA mandates as PDF" at PAYONE)');
define('DOWNLOAD_MANDATE_HERE', 'You can now download the mandate as part of the SEPA direct debit payment here: ');
define('MANDATE_PDF', 'PDF-File');
define('CHECK_BANKDATA', 'Check account data');
define('DONT_CHECK', 'don\'t check account data');
define('CHECK_BASIC', 'Basic');
define('CHECK_POS', 'with POS blocklist');
// cc
define('TEXT_CARDOWNER', 'Karteninhaber:');
define('TEXT_CARDTYPE', 'Kartentyp:');
define('TEXT_CARDNO', 'Kartennummer:');
define('TEXT_CARDEXPIRES', 'Gültig bis (Monat / Jahr):');
define('TEXT_CARDCHECKNUM', 'Prüfziffer:');
define('TEXT_CARDOWNER', 'Card holder:');
define('TEXT_CARDTYPE', 'Card type:');
define('TEXT_CARDNO', 'Card number:');
define('TEXT_CARDEXPIRES', 'Valid until (Month / Year):');
define('TEXT_CARDCHECKNUM', 'Check digit:');
define('TEXT_CHECK_DATA', 'Please check your data.');
// orders status
define('ORDERS_STATUS_CONFIGURATION', 'Konfiguration der Bestellstatus');
define('ORDERS_STATUS_TMP', 'temporärer Status');
define('ORDERS_STATUS_PENDING', 'Zahlungseingang unsicher/erwartet');
define('ORDERS_STATUS_PAID', 'Zahlung erfolgreich');
define('ORDERS_STATUS_DENIED', 'Zahlung fehlgeschlagen/abgelehnt');
define('ORDERS_STATUS_APPROVED', 'Zahlung bewilligt');
define('ORDERS_STATUS_APPOINTED', 'Zahlung angekündigt');
define('ORDERS_STATUS_CAPTURE', 'Zahlung Capture');
define('ORDERS_STATUS_UNDERPAID', 'Zahlung zu gering');
define('ORDERS_STATUS_CANCELATION', 'Zahlung storniert');
define('ORDERS_STATUS_REFUND', 'Zahlung Gutschrift');
define('ORDERS_STATUS_DEBIT', 'Zahlung Einzug');
define('ORDERS_STATUS_TRANSFER', 'Zahlung Überweisung');
define('ORDERS_STATUS_REMINDER', 'Zahlung Erinnerung');
define('ORDERS_STATUS_VAUTHORIZATION', 'Zahlung vAuth');
define('ORDERS_STATUS_VSETTLEMENT', 'Zahlung vSettlement');
define('ORDERS_STATUS_INVOICE', 'Zahlung Rechnung');
define('TEXT_EXTERN_CALLBACK_URL', 'URL Statusweiterleitung');
define('ORDERS_STATUS_CONFIGURATION', 'Orders status configuration');
define('ORDERS_STATUS_TMP', 'temporary status');
define('ORDERS_STATUS_PENDING', 'Payment receipt insecure/expected');
define('ORDERS_STATUS_PAID', 'Payment successful');
define('ORDERS_STATUS_DENIED', 'Payment failed/refused');
define('ORDERS_STATUS_APPROVED', 'Payment approved');
define('ORDERS_STATUS_APPOINTED', 'Payment appointed');
define('ORDERS_STATUS_CAPTURE', 'Payment capture');
define('ORDERS_STATUS_UNDERPAID', 'Payment insufficient');
define('ORDERS_STATUS_CANCELATION', 'Payment canceled');
define('ORDERS_STATUS_REFUND', 'Payment refund');
define('ORDERS_STATUS_DEBIT', 'Payment collection');
define('ORDERS_STATUS_TRANSFER', 'Payment transaction');
define('ORDERS_STATUS_REMINDER', 'Payment reminder');
define('ORDERS_STATUS_VAUTHORIZATION', 'Payment vAuth');
define('ORDERS_STATUS_VSETTLEMENT', 'Payment vSettlement');
define('ORDERS_STATUS_INVOICE', 'Payment sale on account');
define('TEXT_EXTERN_CALLBACK_URL', 'URL status forwarding');
define('TEXT_EXTERN_CALLBACK_TIMEOUT', 'Timeout');
// global
define('TEXT_YES', 'Ja');
define('TEXT_NO', 'Nein');
define('ERROR_OCCURED', 'Fehler aufgetreten');
define('BOX_PAYONE_CONFIG', 'PAYONE Konfiguration');
define('TEXT_YES', 'Yes');
define('TEXT_NO', 'No');
define('ERROR_OCCURED', 'Error occurred');
define('BOX_PAYONE_CONFIG', 'PAYONE configuration');
define('BOX_PAYONE_LOGS', 'PAYONE API Log');
define('PAYONE_CONFIG_TITLE', 'PAYONE Konfiguration');
define('PAYMENT_CONFIGURATION', 'Zahlungskonfiguration');
define('GLOBAL_CONFIGURATION', 'Globale Parameter');
define('PAYONE_CONFIG_TITLE', 'PAYONE configuration');
define('PAYMENT_CONFIGURATION', 'Payment configuration');
define('GLOBAL_CONFIGURATION', 'Global parameters');
define('MERCHANT_ID', 'Merchant-ID');
define('PORTAL_ID', 'Portal-ID');
define('SUBACCOUNT_ID', 'Unterkonto-ID');
define('KEY', 'Schlüssel');
define('OPERATING_MODE', 'Betriebsmodus');
define('OPMODE_TEST', 'Testmodus');
define('OPMODE_LIVE', 'Live-Modus');
define('AUTHORIZATION_METHOD', 'Autorisierungsmethode');
define('AUTHMETHOD_AUTH', 'Sofortautorisierung');
define('AUTHMETHOD_PREAUTH', 'Vorautorisierung');
define('SEND_CART', 'Warenkorb übertragen');
define('SENDCART_TRUE', 'ja');
define('SENDCART_FALSE', 'nein');
define('SUBACCOUNT_ID', 'Subaccount-ID');
define('KEY', 'Key');
define('OPERATING_MODE', 'Operating mode');
define('OPMODE_TEST', 'Test mode');
define('OPMODE_LIVE', 'Live mode');
define('AUTHORIZATION_METHOD', 'Authorization method');
define('AUTHMETHOD_AUTH', 'Instant authorization');
define('AUTHMETHOD_PREAUTH', 'Pre-authorization');
define('SEND_CART', 'Transfer cart');
define('SENDCART_TRUE', 'yes');
define('SENDCART_FALSE', 'no');
// payment genre
define('PAYMENT_GENRE', 'Zahlungsart');
define('PAYMENTGENRE_CONFIGURATION', 'Konfiguration der Zahlungsarten');
define('PG_ACTIVE', 'aktiv');
define('PG_ORDER', 'Reihenfolge');
define('PG_NAME', 'Interner Name');
define('PG_MIN_CART_VALUE', 'minimaler Warenwert');
define('PG_MAX_CART_VALUE', 'maximaler Warenwert');
define('PG_OPERATING_MODE', 'Betriebsmodus');
define('PG_GLOBAL_OVERRIDE', 'globale Parameter überschreiben');
define('PG_COUNTRIES', 'aktive Länder');
define('PG_SCORING_ALLOWED', 'zugelassene Ampelwerte');
define('PG_RED', 'rot');
define('PG_YELLOW', 'gelb');
define('PG_GREEN', 'grün');
define('PG_PAYMENT_TYPES', 'Zahlarttypen');
define('PAYMENT_GENRE', 'Payment method');
define('PAYMENTGENRE_CONFIGURATION', 'Payment methods configuration');
define('PG_ACTIVE', 'active');
define('PG_ORDER', 'Sort order');
define('PG_NAME', 'Internal name');
define('PG_MIN_CART_VALUE', 'Minimum value of goods');
define('PG_MAX_CART_VALUE', 'Maximum value of goods');
define('PG_OPERATING_MODE', 'Operating mode');
define('PG_GLOBAL_OVERRIDE', 'override global parameters');
define('PG_COUNTRIES', 'active countries');
define('PG_SCORING_ALLOWED', 'allowed scoring values');
define('PG_RED', 'red');
define('PG_YELLOW', 'yellow');
define('PG_GREEN', 'green');
define('PG_PAYMENT_TYPES', 'Payment method types');
define('PG_PAYMENTTYPE_VISA', 'Visa');
define('PG_PAYMENTTYPE_MASTERCARD', 'Mastercard');
define('PG_PAYMENTTYPE_AMEX', 'American Express');
define('PG_PAYMENTTYPE_CARTEBLEUE', 'Carte Bleue');
define('PG_PAYMENTTYPE_DINERSCLUB', 'Diners Club');
define('PG_PAYMENTTYPE_DISCOVER', 'Discover');
define('PG_PAYMENTTYPE_JCB', 'JCB');
define('PG_PAYMENTTYPE_MAESTRO', 'Maestro');
define('PG_PAYMENTTYPE_LASTSCHRIFT', 'Lastschrift');
define('PG_PAYMENTTYPE_INVOICE', 'Rechnung');
define('PG_PAYMENTTYPE_PREPAY', 'Vorkasse');
define('PG_PAYMENTTYPE_COD', 'Nachnahme');
define('PG_PAYMENTTYPE_LASTSCHRIFT', 'Direct debit');
define('PG_PAYMENTTYPE_INVOICE', 'Sale on account');
define('PG_PAYMENTTYPE_PREPAY', 'Cash in advance');
define('PG_PAYMENTTYPE_COD', 'Cash on delivery');
define('PG_PAYMENTTYPE_PAYPAL', 'PayPal');
define('PG_PAYMENTTYPE_BILLSAFE', 'BillSAFE');
define('PG_PAYMENTTYPE_COMMERZFINANZ', 'CommerzFinanz');
define('PG_TYPE_ACTIVE', 'aktiv');
define('PG_CHECK_CAV', 'Abfrage Kartenprüfziffer');
define('PG_TYPE_ACTIVE', 'active');
define('PG_CHECK_CAV', 'Check digit inquiry');
define('PG_PAYMENTTYPE_SOFORTUEBERWEISUNG', 'Sofortüberweisung (Überweisung by SOFORT)');
define('PG_PAYMENTTYPE_GIROPAY', 'GiroPay');
define('PG_PAYMENTTYPE_EPS', 'EPS');
define('PG_PAYMENTTYPE_PFEFINANCE', 'Post-Finance EFinance');
define('PG_PAYMENTTYPE_PFCARD', 'Post-Finance Card');
define('PG_PAYMENTTYPE_IDEAL', 'iDEAL');
define('OVERRIDE_DATA', 'Lokale Parameter');
define('ADD_PAYMENT_GENRE', 'Zahlungsart hinzufügen');
define('PAYGENRE_CREDITCARD', 'Kreditkarten');
define('PAYGENRE_ONLINETRANSFER', 'Online-Überweisungen');
define('OVERRIDE_DATA', 'Local parameters');
define('ADD_PAYMENT_GENRE', 'Add payment method');
define('PAYGENRE_CREDITCARD', 'Credit cards');
define('PAYGENRE_ONLINETRANSFER', 'Online transaction');
define('PAYGENRE_EWALLET', 'e-Wallet');
define('PAYGENRE_ACCOUNTBASED', 'Kontobasierte Zahlarten');
define('PAYGENRE_INSTALLMENT', 'Finanzierung/Ratenkauf');
define('PAYGENRE_ACCOUNTBASED', 'Bank account based payment methods');
define('PAYGENRE_INSTALLMENT', 'Hire purchase/Factoring');
// config
define('ACTIVE', 'aktiv');
define('CONFIG_SAVE', 'Konfiguration speichern');
define('NO_PAYMENTGENRE_CONFIGURED', 'Es ist noch keine Zahlungsart konfiguriert.');
define('ADDRESS_CHECK_CONFIGURATION', 'Adressüberprüfung');
define('SELECT_ALL_COUNTRIES', 'alle Länder aktivieren');
define('SELECT_NO_COUNTRY', 'alle Länder deaktivieren');
define('REMOVE_PAYMENT_GENRE', 'Zahlart entfernen');
define('REMOVE_THIS_GENRE', 'Diese Zahlart beim Speichern der Konfiguration entfernen');
define('CONFIGURATION_SAVED', 'Konfiguration gespeichert');
define('PAYMENTGENRE_ADDED', 'Zahlart hinzugefügt');
define('PAYONE_ORDERS_HEADING', 'PAYONE-Zahlung');
define('TRANSACTIONS', 'Transaktionen');
define('TXID', 'Transaktions-ID');
define('USERID', 'Benutzer-ID');
define('CREATED', 'angelegt');
define('LAST_MODIFIED', 'letzte Änderung');
define('ACTIVE', 'active');
define('CONFIG_SAVE', 'Save configuration');
define('NO_PAYMENTGENRE_CONFIGURED', 'There is no payment method configured yet.');
define('ADDRESS_CHECK_CONFIGURATION', 'Address verification');
define('SELECT_ALL_COUNTRIES', 'activate all countries');
define('SELECT_NO_COUNTRY', 'deactivate all countries');
define('REMOVE_PAYMENT_GENRE', 'Remove payment method');
define('REMOVE_THIS_GENRE', 'Remove this payment method upon saving');
define('CONFIGURATION_SAVED', 'Configuration saved');
define('PAYMENTGENRE_ADDED', 'Payment method added');
define('PAYONE_ORDERS_HEADING', 'PAYONE payment');
define('TRANSACTIONS', 'Transactions');
define('TXID', 'Transactions-ID');
define('USERID', 'User-ID');
define('CREATED', 'created');
define('LAST_MODIFIED', 'last modification');
define('STATUS', 'Status');
define('TRANSACTION_STATUS', 'Transaktionsstatus');
define('NO_TRANSACTION_STATUS_RECEIVED', 'noch kein Transaktionsstatus empfangen');
define('ERROR_OCCURRED', 'Fehler aufgetreten');
define('ERROR_ADDRESSES_MUST_BE_EQUAL', 'Bei der gewählten Zahlungsart müssen Rechnungs- und Lieferadresse übereinstimmen!');
define('TABLE_HEADING_CHECK', 'Auswählen');
define('DUMP_CONFIG', 'Konfiguration exportieren');
define('CONFIGURATION_DUMPED_TO', 'Konfiguration gespeichert in Datei');
define('ERROR_DUMPING_CONFIGURATION', 'Beim Exportieren der Konfiguration ist ein Fehler aufgetreten.');
define('INSTALL_CONFIG', 'PAYONE Installieren');
define('TRANSACTION_STATUS', 'Transaction status');
define('NO_TRANSACTION_STATUS_RECEIVED', 'no transaction status received yet');
define('ERROR_OCCURRED', 'Error occurred');
define('ERROR_ADDRESSES_MUST_BE_EQUAL', 'With the payment method choosen billing and delivery address must correspond!');
define('TABLE_HEADING_CHECK', 'Choose');
define('DUMP_CONFIG', 'Export configuration');
define('CONFIGURATION_DUMPED_TO', 'Configuration saved to file');
define('ERROR_DUMPING_CONFIGURATION', 'There was an error during the export of the configuration.');
define('INSTALL_CONFIG', 'Install PAYONE');
// Capture
define('CAPTURE_TRANSACTION', 'Zahlung einfordern');
define('CAPTURE_AMOUNT', 'Betrag');
define('CAPTURE_SUBMIT', 'Jetzt einfordern');
define('AMOUNT_CAPTURED', 'Betrag eingefordert');
define('CAPTURE_TRANSACTION', 'Capture paymnt');
define('CAPTURE_AMOUNT', 'Amount');
define('CAPTURE_SUBMIT', 'Capture now');
define('AMOUNT_CAPTURED', 'Amount captured');
// Clearing
define('CLEARING_INTRO', 'Bitte überweisen Sie den Rechnungsbetrag auf das folgende Konto:');
define('CLEARING_OUTRO', 'Die Ware wird erst ausgeliefert, wenn der Betrag auf dem Konto eingegangen ist.');
define('CLEARING_ACCOUNTHOLDER', 'Kontoinhaber: ');
define('CLEARING_ACCOUNT', 'Kontonummer: ');
define('CLEARING_BANKCODE', 'Bankleitzahl: ');
define('CLEARING_INTRO', 'Please transfer the billing amount to the following bank account:');
define('CLEARING_OUTRO', 'Your order will not be shipped until we receive your payment in our bank account.');
define('CLEARING_ACCOUNTHOLDER', 'Account holder: ');
define('CLEARING_ACCOUNT', 'Account number: ');
define('CLEARING_BANKCODE', 'Bank code: ');
define('CLEARING_IBAN', 'IBAN: ');
define('CLEARING_BIC', 'BIC: ');
define('CLEARING_BANK', 'Bank: ');
define('CLEARING_AMOUNT', 'Betrag');
define('CLEARING_TEXT', 'Verwendungszweck: ');
define('CLEARING_AMOUNT', 'Amount');
define('CLEARING_TEXT', 'Reference: ');
// Refund
define('REFUND_TRANSACTION', 'Gutschrift');
define('REFUND_SUBMIT', 'Gutschrift ausführen');
define('REFUND_AMOUNT', 'Betrag');
define('REFUND_BANKCOUNTRY', 'Land');
define('REFUND_COUNTRY_DE', 'Deutschland');
define('REFUND_COUNTRY_FR', 'Frankreich');
define('REFUND_COUNTRY_NL', 'Niederlande');
define('REFUND_COUNTRY_AT', 'Österreich');
define('REFUND_COUNTRY_CH', 'Schweiz');
define('REFUND_BANKACCOUNT', 'Kto.Nr.');
define('REFUND_BANKCODE', 'BLZ');
define('REFUND_BANKBRANCHCODE', 'Filiale');
define('REFUND_BANKCHECKDIGIT', 'Prüfziffer');
define('REFUND_TRANSACTION', 'Credit advice');
define('REFUND_SUBMIT', 'Process credit advice');
define('REFUND_AMOUNT', 'Amount');
define('REFUND_BANKCOUNTRY', 'Country');
define('REFUND_COUNTRY_DE', 'Germany');
define('REFUND_COUNTRY_FR', 'France');
define('REFUND_COUNTRY_NL', 'Netherlands');
define('REFUND_COUNTRY_AT', 'Austria');
define('REFUND_COUNTRY_CH', 'Switzerland');
define('REFUND_BANKACCOUNT', 'Account number');
define('REFUND_BANKCODE', 'Bank code');
define('REFUND_BANKBRANCHCODE', 'Branch');
define('REFUND_BANKCHECKDIGIT', 'Check digit');
define('REFUND_IBAN', 'IBAN');
define('REFUND_BIC', 'BIC');
define('AMOUNT_REFUNDED', 'Betrag gutgeschrieben');
define('AMOUNT_REFUNDED', 'Amount credited');
// Log
define('PAYONE_LOGS_TITLE', 'PAYONE API Log');
define('EVENT_ID', 'Ereignis-ID');
define('DATETIME', 'Zeitpunkt');
define('CUSTOMER', 'Kunde (sofern erfasst)');
define('START_DATE', 'Anfang');
define('END_DATE', 'Ende');
define('PAGE', 'Seite');
define('SEARCH', 'Suche');
define('SHOW', 'anzeigen');
define('EVENT_LOG_COUNT', 'Unterereignis-Nr.');
define('NO_LOGS', 'Für den gewählten Zeitraum liegen keine Einträge dieser Art vor.');
define('EVENT_ID', 'Event-ID');
define('DATETIME', 'Point of time');
define('CUSTOMER', 'Customer (as long as known)');
define('START_DATE', 'Start');
define('END_DATE', 'End');
define('PAGE', 'Page');
define('SEARCH', 'Search');
define('SHOW', 'show');
define('EVENT_LOG_COUNT', 'Subevent-No.');
define('NO_LOGS', 'There are no entries for the chosen period.');
define('API', 'API');
?>
includes/external/payone/lang/german.phpTop ca. Zeile 180
define('TEXT_CARDTYPE', 'Kartentyp:');
define('TEXT_CARDNO', 'Kartennummer:');
define('TEXT_CARDEXPIRES', 'Gültig bis (Monat / Jahr):');
define('TEXT_CARDCHECKNUM', 'Prüfziffer:');
define('TEXT_CHECK_DATA', 'Bitte überprüfen Sie Ihre Angaben.');
// orders status
define('ORDERS_STATUS_CONFIGURATION', 'Konfiguration der Bestellstatus');
define('ORDERS_STATUS_CONFIGURATION', 'Konfiguration der Bestellstati');
define('ORDERS_STATUS_TMP', 'temporärer Status');
define('ORDERS_STATUS_PENDING', 'Zahlungseingang unsicher/erwartet');
define('ORDERS_STATUS_PAID', 'Zahlung erfolgreich');
define('ORDERS_STATUS_DENIED', 'Zahlung fehlgeschlagen/abgelehnt');
includes/external/payone/modules/orders_payone.phpTop ca. Zeile 148
<script type="text/javascript" src="includes/javascript/jquery-1.8.3.min.js"></script>
<tr>
<td colspan="2" style="width:840px;">
<style type="text/css">
p.message { padding: 1ex 1em; margin: 5px 1px; border: 2px solid red; background-color: #ffa; }
p.message { padding: 1ex 1em; margin: 5px 1px; color: #A94442; border: 1px solid #DCA7A7; background-color: #F2DEDE; }
div.p1_box { background: #E2E2E2; float: left; padding: 1ex; margin: 1px; min-height: 125px; min-width:48.4%; width:48.4%; }
.p1_box_full {width:98.3% !important;}
div.p1_boxheading { font-size: 1.2em; font-weight: bold; background: #CCCCCC; padding: .2ex .5ex;}
dl.p1_transaction { overflow: auto; margin: 0 0; border-bottom: 1px dotted #999; padding:2px 0px; }
ca. Zeile 185
if (!empty($payone_messages)) {
foreach($payone_messages as $msg) {
echo '<p class="message">'.$msg.'</p>';
}
?>
<script type="text/javascript">
$('div#payone').toggleClass('payone_active');
$('.payone_data').toggleClass('payone_active');
$('.payone_data').show();
</script>
<?php
}
?>
<div class="p1_transactions p1_box">
includes/external/payone/php/Payone/Api/Adapter/Http/Abstract.phpTop ca. Zeile 38
* @todo use timeout from config and fallback to default
*/
const DEFAULT_TIMEOUT = 45;
const SDK_VERSION_KEY = 'sdk_version';
const SDK_TYPE_KEY = 'sdk_type';
const SDK_VERSION = '2.0.0';
const SDK_TYPE = 'php';
/**
* @var string
*/
protected $url = '';
ca. Zeile 63
$this->setParams($params);
$this->validate();
$this->params[self::SDK_TYPE_KEY] = self::SDK_TYPE;
$this->params[self::SDK_VERSION_KEY] = self::SDK_VERSION;
$responseRaw = $this->doRequest();
$result = $this->parseResponse($responseRaw);
includes/external/payone/php/Payone/Api/Adapter/Interface.phpTop ca. Zeile 19
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_Api
* @subpackage Adapter
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
interface Payone_Api_Adapter_Interface
{
/**
* @abstract
includes/external/payone/php/Payone/Api/Config.phpTop ca. Zeile 39
'default' => array(
'validator' => 'Payone_Api_Validator_DefaultParameters',
'protocol' => array(
'filter' => array(
'mask_value' => array(
Payone_Protocol_Filter_MaskValue::FILTER_KEY => array(
'enabled' => 1,
'percent' => 100
)
),
'loggers' => array(
'Payone_Protocol_Logger_Log4php' => array(
'filename' => 'payone_api.log',
'max_file_size' => '1MB',
'max_file_count' => 20
Payone_Protocol_Filter_MaskAllValue::FILTER_KEY => array(
'enabled' => 1
)
),
),
'mapper' => array(
includes/external/payone/php/Payone/Api/Enum/FinancingType.phpTop ca. Zeile 34
{
const BSV = 'BSV'; // BILLSAFE
const CFR = 'CFR'; // COMMERZ FINANZ
const KLV = 'KLV'; // KLARNA INVOICING
const KLS = 'KLS'; // KLARNA FINANCING
}
includes/external/payone/php/Payone/Api/Enum/OnlinebanktransferType.phpTop ca. Zeile 37
const EPS_ONLINE_BANK_TRANSFER = 'EPS';
const POSTFINANCE_EFINANCE = 'PFF';
const POSTFINANCE_CARD = 'PFC';
const IDEAL = 'IDL';
const P24 = 'P24';
}
includes/external/payone/php/Payone/Api/Enum/RequestType.phpTop ca. Zeile 47
const UPDATEACCESS = 'updateaccess';
const MANAGEMANDATE = 'managemandate';
const GETFILE = 'getfile';
const VAUTHORIZATION = 'vauthorization';
/*
* init paypal express checkout
*/
const GENERICPAYMENT = 'genericpayment';
}
includes/external/payone/php/Payone/Api/Enum/ResponseType.phpTop ca. Zeile 38
const INVALID = 'INVALID';
const BLOCKED = 'BLOCKED';
const ENROLLED = 'ENROLLED';
const ERROR = 'ERROR';
const OK = 'OK'; //GenericPayment Requests
}
includes/external/payone/php/Payone/Api/Enum/WalletType.phpTop ca. Zeile 29
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_Api_Enum_WalletType
{
class Payone_Api_Enum_WalletType {
const PAYPAL_EXPRESS = 'PPE';
/* Example
*
*
* $builder = new Payone_Builder();
* $service = $builder->buildServicePaymentAuthorize();
*
* $requestData = array(
* 'clearingtype' => Payone_Enum_ClearingType::WALLET,
* 'reference' => 'your order number',
* 'amount' => 12.95,
* 'currency' => 'EUR',
* 'personalData' => new Payone_Api_Request_Parameter_Authorization_PersonalData(array(...customer data ...)),
* 'payment' => new Payone_Api_Request_Parameter_Authorization_PaymentMethod_Wallet(array(
* 'wallettype' => Payone_Api_Enum_WalletType::YAPITAL,
* 'successurl' => 'http://your-shop.com/success.php',
* 'errorurl' => 'http://your-shop.com/error.php',
* 'backurl' => 'http://your-shop.com/back.php'
* ))
* );
*
* $authorization = new Payone_Api_Request_Authorization(array_merge($this->getAccountData(), $requestData));
*
* $response = $service->authorize($authorization);
*
* Response:
*
* Payone_Api_Response_Authorization_Redirect Object
* (
* [txid:protected] => 155901830
* [userid:protected] => 57080810
* [redirecturl:protected] => https://demo.dev.yapital.com/web-ui/widget.html?id=01-9XXX
* [status:protected] => REDIRECT
* ...
* )
*
* If response status is REDIRECT, send customer to the redirecturl (Yapital).
*/
const YAPITAL = 'YPL';
}
includes/external/payone/php/Payone/Api/Factory.phpTop ca. Zeile 18
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_Api_Factory {
/**
*
* @category Payone
* @package Payone_Api
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_Api_Factory
{
/** @var Payone_Api_Config */
protected $config = null;
/**
* @constructor
* @param Payone_Api_Config $config
*/
public function __construct(Payone_Api_Config $config = null)
{
public function __construct(Payone_Api_Config $config = null) {
$this->config = $config;
}
/**
* @return Payone_Api_Adapter_Interface
*/
protected function buildHttpClient()
{
protected function buildHttpClient() {
if ($this->isEnabledCurl()) {
$adapter = new Payone_Api_Adapter_Http_Curl();
}
else {
} else {
$adapter = new Payone_Api_Adapter_Http_Socket();
}
$adapter->setUrl('https://api.pay1.de/post-gateway/');
return $adapter;
ca. Zeile 59
/**
* @return bool
*/
protected function isEnabledCurl()
{
protected function isEnabledCurl() {
return extension_loaded('curl');
}
/**
* @param string $key Service Key, e.g. 'payment/refund'
* @return Payone_Api_Service_Payment_Authorize|Payone_Api_Service_Payment_Debit|Payone_Api_Service_Payment_Preauthorize|Payone_Api_Service_Payment_Refund
* @throws Exception
*/
public function buildService($key)
{
public function buildService($key) {
$methodKey = str_replace(' ', '', ucwords(str_replace('/', ' ', $key)));
$methodName = 'buildService' . $methodKey;
if (method_exists($this, $methodName)) {
return $this->$methodName();
}
else {
} else {
throw new Exception('Could not build service with key "' . $key . '"');
}
}
/**
* @return Payone_Api_Mapper_Currency
*/
public function buildMapperCurrency()
{
public function buildMapperCurrency() {
$mapper = new Payone_Api_Mapper_Currency();
$mapper->setPathToProperties($this->getCurrencyPropertiesPath());
return $mapper;
}
ca. Zeile 96
/**
* Returns Path to currency.properties file
* @return string
*/
protected function getCurrencyPropertiesPath()
{
protected function getCurrencyPropertiesPath() {
return $this->getConfig()->getValue('default/mapper/currency/currency_properties');
}
/**
* @return Payone_Api_Mapper_Request_Payment_Preauthorization
*/
public function buildMapperRequestPreauthorize()
{
public function buildMapperRequestPreauthorize() {
$mapper = new Payone_Api_Mapper_Request_Payment_Preauthorization();
$mapper->setMapperCurrency($this->buildMapperCurrency());
return $mapper;
}
/**
* @return Payone_Api_Mapper_Request_Payment_Authorization
*/
public function buildMapperRequestAuthorize()
{
public function buildMapperRequestAuthorize() {
$mapper = new Payone_Api_Mapper_Request_Payment_Authorization();
$mapper->setMapperCurrency($this->buildMapperCurrency());
return $mapper;
}
/**
* @return Payone_Api_Mapper_Request_Payment_Capture
*/
public function buildMapperRequestCapture()
{
public function buildMapperRequestCapture() {
$mapper = new Payone_Api_Mapper_Request_Payment_Capture();
$mapper->setMapperCurrency($this->buildMapperCurrency());
return $mapper;
}
/**
* @return Payone_Api_Mapper_Request_Payment_Debit
*/
public function buildMapperRequestDebit()
{
public function buildMapperRequestDebit() {
$mapper = new Payone_Api_Mapper_Request_Payment_Debit();
$mapper->setMapperCurrency($this->buildMapperCurrency());
return $mapper;
}
/**
* @return Payone_Api_Mapper_Request_Payment_Refund
*/
public function buildMapperRequestRefund()
{
public function buildMapperRequestRefund() {
$mapper = new Payone_Api_Mapper_Request_Payment_Refund();
$mapper->setMapperCurrency($this->buildMapperCurrency());
return $mapper;
}
/**
* @return Payone_Api_Mapper_Request_Payment_Vauthorization
*/
public function buildMapperRequestVauthorize()
{
public function buildMapperRequestVauthorize() {
$mapper = new Payone_Api_Mapper_Request_Payment_Vauthorization();
$mapper->setMapperCurrency($this->buildMapperCurrency());
return $mapper;
}
/**
* @return Payone_Api_Mapper_Request_Payment_CreateAccess
*/
public function buildMapperRequestCreateAccess()
{
public function buildMapperRequestCreateAccess() {
$mapper = new Payone_Api_Mapper_Request_Payment_CreateAccess();
$mapper->setMapperCurrency($this->buildMapperCurrency());
return $mapper;
}
/**
* @return Payone_Api_Mapper_Request_Payment_Genericpayment
*/
public function buildMapperRequestGenericpayment() {
$mapper = new Payone_Api_Mapper_Request_Payment_Genericpayment();
$mapper->setMapperCurrency($this->buildMapperCurrency());
return $mapper;
}
/**
* @return Payone_Api_Mapper_Request_Management_UpdateAccess
*/
public function buildMapperRequestUpdateAccess()
{
public function buildMapperRequestUpdateAccess() {
$mapper = new Payone_Api_Mapper_Request_Management_UpdateAccess();
$mapper->setMapperCurrency($this->buildMapperCurrency());
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_Preauthorization
*/
protected function buildMapperResponsePreauthorize()
{
protected function buildMapperResponsePreauthorize() {
$mapper = new Payone_Api_Mapper_Response_Preauthorization();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_Authorization
*/
protected function buildMapperResponseAuthorize()
{
protected function buildMapperResponseAuthorize() {
$mapper = new Payone_Api_Mapper_Response_Authorization();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_Capture
*/
protected function buildMapperResponseCapture()
{
protected function buildMapperResponseCapture() {
$mapper = new Payone_Api_Mapper_Response_Capture();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_Debit
*/
protected function buildMapperResponseDebit()
{
protected function buildMapperResponseDebit() {
$mapper = new Payone_Api_Mapper_Response_Debit();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_Refund
*/
protected function buildMapperResponseRefund()
{
protected function buildMapperResponseRefund() {
$mapper = new Payone_Api_Mapper_Response_Refund();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_3dsCheck
*/
protected function buildMapperResponse3dsCheck()
{
protected function buildMapperResponse3dsCheck() {
$mapper = new Payone_Api_Mapper_Response_3dsCheck();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_AddressCheck
*/
protected function buildMapperResponseAddressCheck()
{
protected function buildMapperResponseAddressCheck() {
$mapper = new Payone_Api_Mapper_Response_AddressCheck();
return $mapper;
}
ca. Zeile 244
$mapper = new Payone_Api_Mapper_Response_AddressCheck();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_BankAccountCheck
*/
protected function buildMapperResponseBankAccountCheck()
{
protected function buildMapperResponseBankAccountCheck() {
$mapper = new Payone_Api_Mapper_Response_BankAccountCheck();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_Consumerscore
*/
protected function buildMapperResponseConsumerscore()
{
protected function buildMapperResponseConsumerscore() {
$mapper = new Payone_Api_Mapper_Response_Consumerscore();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_CreditCardCheck
*/
protected function buildMapperResponseCreditCardCheck()
{
protected function buildMapperResponseCreditCardCheck() {
$mapper = new Payone_Api_Mapper_Response_CreditCardCheck();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_GetInvoice
*/
protected function buildMapperResponseGetInvoice()
{
protected function buildMapperResponseGetInvoice() {
$mapper = new Payone_Api_Mapper_Response_GetInvoice();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_GetFile
*/
protected function buildMapperResponseGetFile()
{
protected function buildMapperResponseGetFile() {
$mapper = new Payone_Api_Mapper_Response_GetFile();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_Vauthorization
*/
public function buildMapperResponseVauthorize()
{
public function buildMapperResponseVauthorize() {
$mapper = new Payone_Api_Mapper_Response_Vauthorization();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_CreateAccess
*/
public function buildMapperResponseCreateAccess()
{
public function buildMapperResponseCreateAccess() {
$mapper = new Payone_Api_Mapper_Response_CreateAccess();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_Genericpayment
*/
public function buildMapperResponseGenericpayment() {
$mapper = new Payone_Api_Mapper_Response_Genericpayment();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_UpdateAccess
*/
public function buildMapperResponseUpdateAccess()
{
public function buildMapperResponseUpdateAccess() {
$mapper = new Payone_Api_Mapper_Response_UpdateAccess();
return $mapper;
}
/**
* @return Payone_Api_Mapper_Response_ManageMandate
*/
public function buildMapperResponseManageMandate()
{
public function buildMapperResponseManageMandate() {
$mapper = new Payone_Api_Mapper_Response_ManageMandate();
return $mapper;
}
/**
* @return Payone_Api_Service_Payment_Preauthorize
*/
public function buildServicePaymentPreauthorize()
{
public function buildServicePaymentPreauthorize() {
$service = new Payone_Api_Service_Payment_Preauthorize();
$service->setAdapter($this->buildHttpClient());
$service->setMapperRequest($this->buildMapperRequestPreauthorize());
$service->setMapperResponse($this->buildMapperResponsePreauthorize());
ca. Zeile 339
$service->setValidator($this->buildValidatorDefault());
return $service;
}
/**
* @return Payone_Api_Service_Payment_Authorize
*/
public function buildServicePaymentAuthorize()
{
public function buildServicePaymentAuthorize() {
$service = new Payone_Api_Service_Payment_Authorize();
$service->setAdapter($this->buildHttpClient());
$service->setMapperRequest($this->buildMapperRequestAuthorize());
$service->setMapperResponse($this->buildMapperResponseAuthorize());
ca. Zeile 353
$service->setValidator($this->buildValidatorDefault());
return $service;
}
/**
* @return Payone_Api_Service_Payment_Capture
*/
public function buildServicePaymentCapture()
{
public function buildServicePaymentCapture() {
$service = new Payone_Api_Service_Payment_Capture();
$service->setAdapter($this->buildHttpClient());
$service->setMapperRequest($this->buildMapperRequestCapture());
$service->setMapperResponse($this->buildMapperResponseCapture());
ca. Zeile 365
$service->setMapperRequest($this->buildMapperRequestCapture());
$service->setMapperResponse($this->buildMapperResponseCapture());
$service->setValidator($this->buildValidatorDefault());
return $service;
}
/**
* @return Payone_Api_Service_Payment_Debit
*/
public function buildServicePaymentDebit()
{
public function buildServicePaymentDebit() {
$service = new Payone_Api_Service_Payment_Debit();
$service->setAdapter($this->buildHttpClient());
$service->setMapperRequest($this->buildMapperRequestDebit());
$service->setMapperResponse($this->buildMapperResponseDebit());
ca. Zeile 386
/**
* @return Payone_Api_Service_Payment_Refund
*/
public function buildServicePaymentRefund()
{
public function buildServicePaymentRefund() {
$service = new Payone_Api_Service_Payment_Refund();
$service->setAdapter($this->buildHttpClient());
$service->setMapperRequest($this->buildMapperRequestRefund());
$service->setMapperResponse($this->buildMapperResponseRefund());
ca. Zeile 400
/**
* @return Payone_Api_Service_Verification_3dsCheck
*/
public function buildServiceVerification3dscheck()
{
public function buildServiceVerification3dscheck() {
$service = new Payone_Api_Service_Verification_3dsCheck();
$service->setAdapter($this->buildHttpClient());
$service->setMapperResponse($this->buildMapperResponse3dsCheck());
$service->setValidator($this->buildValidatorDefault());
ca. Zeile 413
/**
* @return Payone_Api_Service_Verification_AddressCheck
*/
public function buildServiceVerificationAddressCheck()
{
public function buildServiceVerificationAddressCheck() {
$service = new Payone_Api_Service_Verification_AddressCheck();
$service->setAdapter($this->buildHttpClient());
$service->setMapperResponse($this->buildMapperResponseAddressCheck());
$service->setValidator($this->buildValidatorDefault());
ca. Zeile 426
/**
* @return Payone_Api_Service_Verification_BankAccountCheck
*/
public function buildServiceVerificationBankAccountCheck()
{
public function buildServiceVerificationBankAccountCheck() {
$service = new Payone_Api_Service_Verification_BankAccountCheck();
$service->setAdapter($this->buildHttpClient());
$service->setMapperResponse($this->buildMapperResponseBankAccountCheck());
$service->setValidator($this->buildValidatorDefault());
ca. Zeile 439
/**
* @return Payone_Api_Service_Verification_Consumerscore
*/
public function buildServiceVerificationConsumerscore()
{
public function buildServiceVerificationConsumerscore() {
$service = new Payone_Api_Service_Verification_Consumerscore();
$service->setAdapter($this->buildHttpClient());
$service->setMapperResponse($this->buildMapperResponseConsumerscore());
$service->setValidator($this->buildValidatorDefault());
ca. Zeile 452
/**
* @return Payone_Api_Service_Verification_CreditCardCheck
*/
public function buildServiceVerificationCreditCardCheck()
{
public function buildServiceVerificationCreditCardCheck() {
$service = new Payone_Api_Service_Verification_CreditCardCheck();
$service->setAdapter($this->buildHttpClient());
$service->setMapperResponse($this->buildMapperResponseCreditCardCheck());
$service->setValidator($this->buildValidatorDefault());
ca. Zeile 465
/**
* @return Payone_Api_Service_Management_GetInvoice
*/
public function buildServiceManagementGetInvoice()
{
public function buildServiceManagementGetInvoice() {
$service = new Payone_Api_Service_Management_GetInvoice();
$service->setAdapter($this->buildHttpClient());
$service->setMapperResponse($this->buildMapperResponseGetInvoice());
$service->setValidator($this->buildValidatorDefault());
ca. Zeile 478
/**
* @return Payone_Api_Service_Management_GetFile
*/
public function buildServiceManagementGetFile()
{
public function buildServiceManagementGetFile() {
$service = new Payone_Api_Service_Management_GetFile();
$service->setAdapter($this->buildHttpClient());
$service->setMapperResponse($this->buildMapperResponseGetFile());
$service->setValidator($this->buildValidatorDefault());
ca. Zeile 491
/**
* @return Payone_Api_Service_Management_ManageMandate
*/
public function buildServiceManagementManageMandate()
{
public function buildServiceManagementManageMandate() {
$service = new Payone_Api_Service_Management_ManageMandate();
$service->setAdapter($this->buildHttpClient());
$service->setMapperResponse($this->buildMapperResponseManageMandate());
$service->setValidator($this->buildValidatorDefault());
ca. Zeile 504
/**
* @return Payone_Api_Service_Payment_Vauthorize
*/
public function buildServicePaymentVauthorize()
{
public function buildServicePaymentVauthorize() {
$service = new Payone_Api_Service_Payment_Vauthorize();
$service->setAdapter($this->buildHttpClient());
$service->setMapperRequest($this->buildMapperRequestVauthorize());
$service->setMapperResponse($this->buildMapperResponseVauthorize());
ca. Zeile 517
/**
* @return Payone_Api_Service_Payment_CreateAccess
*/
public function buildServicePaymentCreateAccess()
{
public function buildServicePaymentCreateAccess() {
$service = new Payone_Api_Service_Payment_CreateAccess();
$service->setAdapter($this->buildHttpClient());
$service->setMapperRequest($this->buildMapperRequestCreateAccess());
$service->setMapperResponse($this->buildMapperResponseCreateAccess());
ca. Zeile 528
return $service;
}
/**
* Create service for genericpayment request.
* @return Payone_Api_Service_Payment_Genericpayment
*/
public function buildServicePaymentGenericpayment() {
$service = new Payone_Api_Service_Payment_Genericpayment();
$service->setAdapter($this->buildHttpClient());
$service->setMapperRequest($this->buildMapperRequestGenericpayment());
$service->setMapperResponse($this->buildMapperResponseGenericpayment());
$service->setValidator($this->buildValidatorDefault());
return $service;
}
/**
* @return Payone_Api_Service_Management_UpdateAccess
*/
public function buildServiceManagementUpdateAccess()
{
public function buildServiceManagementUpdateAccess() {
$service = new Payone_Api_Service_Management_UpdateAccess();
$service->setAdapter($this->buildHttpClient());
$service->setMapperRequest($this->buildMapperRequestUpdateAccess());
$service->setMapperResponse($this->buildMapperResponseUpdateAccess());
ca. Zeile 543
/**
* @return Payone_Api_Service_ProtocolRequest
*/
public function buildServiceProtocolRequest()
{
public function buildServiceProtocolRequest() {
$servicePR = new Payone_Api_Service_ProtocolRequest();
return $servicePR;
}
/**
* @return Payone_Api_Validator_DefaultParameters
*/
public function buildValidatorDefault()
{
public function buildValidatorDefault() {
$validator = new Payone_Api_Validator_DefaultParameters();
return $validator;
}
/**
* @param Payone_Api_Config $config
*/
public function setConfig($config)
{
public function setConfig($config) {
$this->config = $config;
}
/**
* @return Payone_Api_Config
*/
public function getConfig()
{
public function getConfig() {
return $this->config;
}
}
includes/external/payone/php/Payone/Api/Request/Abstract.phpTop ca. Zeile 32
*/
abstract class Payone_Api_Request_Abstract
implements Payone_Api_Request_Interface, Payone_Protocol_Filter_Filterable
implements Payone_Api_Request_Interface
{
/**
* @var int
*/
ca. Zeile 93
*/
protected $integrator_version = NULL;
/**
* @var Payone_Protocol_Service_ApplyFilters
*/
private $applyFilters = NULL;
/**
* @param array $data
*/
public function __construct(array $data = array())
{
ca. Zeile 135
* @var Payone_Api_Request_Parameter_Interface $data
*/
$result = array_merge($result, $data->toArray());
}
else {
elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
$result[$key] = $data;
}
}
ca. Zeile 150
* @return string
*/
public function __toString()
{
$stringArray = array();
foreach ($this->toArray() as $key => $value) {
$stringArray[] = $key . '=' . $value;
if($this->applyFilters) {
$result = $this->applyFilters->apply($this->toArray());
} else {
$protocolFactory = new Payone_Protocol_Factory();
$defaultApplyFilters = $protocolFactory->buildServiceApplyFilters();
$result = $defaultApplyFilters->apply($this->toArray());
}
$result = implode('|', $stringArray);
return $result;
}
/**
* @param string $key
* @return null|mixed
*/
public function getValue($key)
{
return $this->get($key);
}
/**
* @param string $key
* @param string $name
* @return boolean|null
*/
public function setValue($key, $name)
{
return $this->set($key, $name);
}
/**
* @param $name
* @return null|mixed
ca. Zeile 410
{
return $this->solution_version;
}
/**
* @param Payone_Protocol_Service_ApplyFilters $applyFilters
*/
public function setApplyFilters(Payone_Protocol_Service_ApplyFilters $applyFilters)
{
$this->applyFilters = $applyFilters;
}
}
includes/external/payone/php/Payone/Api/Request/Authorization/Abstract.phpTop ca. Zeile 95
* @var Payone_Api_Request_Parameter_Invoicing_Transaction
*/
protected $invoicing = null;
/**
* Mandatory for PayPal Express Checkout
* Alphanumeric max 16 chars
* @var string
*/
protected $workorderid = null;
protected $customer_is_present = 'yes';
protected $recurrence = null;
/**
* @param int $aid
*/
ca. Zeile 289
{
return $this->invoicing;
}
/**
* @return string
*/
function getWorkorderId() {
return $this->workorderid;
}
/**
* @param string $workorderid
*/
function setWorkorderId($workorderid) {
$this->workorderid = $workorderid;
}
function getCustomerIsPresent() {
return $this->customer_is_present;
}
function getRecurrence() {
return $this->recurrence;
}
function setCustomerIsPresent($customer_is_present) {
$this->customer_is_present = $customer_is_present;
}
function setRecurrence($recurrence) {
$this->recurrence = $recurrence;
}
}
includes/external/payone/php/Payone/Api/Request/Interface.phpTop ca. Zeile 29
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
interface Payone_Api_Request_Interface
interface Payone_Api_Request_Interface extends Payone_Protocol_Filter_Filterable
{
/**
* @abstract
* @param array $data
includes/external/payone/php/Payone/Api/Request/Parameter/Abstract.phpTop ca. Zeile 30
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
abstract class Payone_Api_Request_Parameter_Abstract
implements Payone_Api_Request_Parameter_Interface, Payone_Protocol_Filter_Filterable
implements Payone_Api_Request_Parameter_Interface
{
/**
* @param array $data
*/
ca. Zeile 69
{
if (!is_array($data) and !is_object($data)) {
$result[$key] = $data;
}
else if ($data instanceof Payone_Api_Request_Parameter_Interface) {
/**
* @var Payone_Api_Request_Parameter_Interface $data
*/
$result = array_merge($result, $data->toArray());
}
}
return $result;
}
includes/external/payone/php/Payone/Api/Request/Parameter/Authorization/PaymentMethod/Financing.phpTop ca. Zeile 51
* @var string
*/
protected $backurl = NULL;
protected $paydata = NULL;
/**
* @param string $financingtype
*/
public function setFinancingtype($financingtype)
ca. Zeile 115
{
return $this->successurl;
}
/**
* @param Payone_Api_Request_Parameter_Paydata_Paydata $paydata
*/
public function setPaydata($paydata) {
$this->paydata = $paydata;
}
/**
*
* @return Payone_Api_Request_Parameter_Paydata_Paydata
*/
public function getPaydata() {
return $this->paydata;
}
}
includes/external/payone/php/Payone/Api/Request/Preauthorization.phpTop ca. Zeile 32
*/
class Payone_Api_Request_Preauthorization extends Payone_Api_Request_Authorization_Abstract
{
protected $request = Payone_Api_Enum_RequestType::PREAUTHORIZATION;
protected $api_version = null;
protected $cashtype = null;
function getApiVersion() {
return $this->api_version;
}
function getCashtype() {
return $this->cashtype;
}
function setApiVersion($api_version) {
$this->api_version = $api_version;
}
function setCashtype($cashtype) {
$this->cashtype = $cashtype;
}
}
includes/external/payone/php/Payone/Api/Response/Abstract.phpTop ca. Zeile 36
protected $rawResponse = NULL;
/**
* @var Payone_Protocol_Service_ApplyFilters
*/
private $applyFilters = NULL;
/**
* @param array $params
*/
function __construct(array $params = array())
{
ca. Zeile 70
foreach ($this as $key => $data) {
if ($data === null) {
continue;
}
else {
elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
$result[$key] = $data;
}
}
ca. Zeile 83
* @return string
*/
public function __toString()
{
$stringArray = array();
foreach ($this->toArray() as $key => $value) {
$stringArray[] = $key . '=' . $value;
if($this->applyFilters) {
$result = $this->applyFilters->apply($this->toArray());
} else {
$protocolFactory = new Payone_Protocol_Factory();
$defaultApplyFilters = $protocolFactory->buildServiceApplyFilters();
$result = $defaultApplyFilters->apply($this->toArray());
}
$result = implode('|', $stringArray);
return $result;
}
ca. Zeile 245
public function getRawResponse()
{
return $this->rawResponse;
}
/**
* @param Payone_Protocol_Service_ApplyFilters $applyFilters
*/
public function setApplyFilters(Payone_Protocol_Service_ApplyFilters $applyFilters)
{
$this->applyFilters = $applyFilters;
}
}
includes/external/payone/php/Payone/Api/Response/Preauthorization/Approved.phpTop ca. Zeile 29
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_Api_Response_Preauthorization_Approved
extends Payone_Api_Response_Authorization_Abstract
{
class Payone_Api_Response_Preauthorization_Approved extends Payone_Api_Response_Authorization_Abstract {
/**
* add_paydata[workorderid] = workorderid from payone
* add_paydata[...] = delivery data
* @var Payone_Api_Response_Parameter_Paydata_Paydata
*/
protected $paydata = NULL;
/**
* @param array $params
*/
function __construct(array $params = array()) {
parent::__construct($params);
$this->setRawResponse($params);
$this->initPaydata($params);
}
protected function initPaydata($param) {
$payData = new Payone_Api_Response_Parameter_Paydata_Paydata($param);
if ($payData->hasItems()) {
$this->setPaydata($payData);
} else {
$this->setPaydata(NULL);
}
}
/**
* usage:
* $request = new Payone_Api_Request_Preauthorization(array_merge( $your_accountData, $requestData));
* $builder = $this->getPayoneBuilder();
*
* $service = $builder->buildServicePaymentPreauthorize();
* $response = $service->request($request);
* print_r($response->getPaydata()->toAssocArray());
*
* you get an array like that:
*
* Array
* (
* [content_encoding]=>UTF-8
* [instruction_notes]=> "content"
* [content_format]=>HTML
* )
*
* @return Payone_Api_Response_Parameter_Paydata_Paydata
*/
public function getPaydata() {
return $this->paydata;
}
/**
* @param Payone_Api_Response_Parameter_Paydata_Paydata $paydata
*/
public function setPaydata($paydata) {
$this->paydata = $paydata;
}
}
includes/external/payone/php/Payone/Api/Service/ProtocolRequest.phpTop ca. Zeile 45
*/
public function protocol(Payone_Api_Request_Interface $request,
Payone_Api_Response_Interface $response = null)
{
// @todo hs: This Service can not work without a service apply filters.
$this->getServiceApplyFilters()->apply($request);
$this->getServiceApplyFilters()->apply($response);
foreach ($this->loggers as $key => $logger) {
/** @var $logger Payone_Protocol_Logger_Interface */
$request->setApplyFilters($this->getServiceApplyFilters());
$response->setApplyFilters($this->getServiceApplyFilters());
$requestAsString = $request->__toString();
$responseAsString = $response->__toString();
foreach ($this->loggers as $key => $logger) {
$logger->log($requestAsString);
$logger->log($responseAsString);
}
ca. Zeile 71
* @param null|Payone_Api_Request_Interface $request
*/
public function protocolException(Exception $e, Payone_Api_Request_Interface $request = null)
{
if ($request !== null) {
$this->getServiceApplyFilters()->apply($request);
}
foreach ($this->loggers as $key => $logger) {
/** @var $logger Payone_Protocol_Logger_Interface */
$logger->log(get_class($e) . ' ' . $e->getMessage(), Payone_Protocol_Logger_Interface::LEVEL_ERROR);
includes/external/payone/php/Payone/Autoload.phpTop ca. Zeile 18
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
* This class provides an autoloader for the PAYONE SDK
*
* @category Payone
* @package Payone
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_Autoload
{
/**
* all classes for which the autoloader feels responsible must start with this prefix
includes/external/payone/php/Payone/Builder.phpTop ca. Zeile 27
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_Builder
{
class Payone_Builder {
const KEY_API = 'api';
const KEY_CLIENTAPI = 'client_api';
const KEY_PROTOCOL = 'protocol';
const KEY_SETTINGS = 'settings';
ca. Zeile 45
/**
* @constructor
* @param null|Payone_Config $config config can be set via constructor or setConfig()
*/
public function __construct(Payone_Config $config = null)
{
public function __construct(Payone_Config $config = null) {
if ($config === null) {
$config = new Payone_Config(); // Default config
}
$this->config = $config;
ca. Zeile 66
* @api
*
* @return Payone_ClientApi_Service_GenerateHash
*/
public function buildServiceClientApiGenerateHash()
{
public function buildServiceClientApiGenerateHash() {
return $this->buildService(self::KEY_CLIENTAPI . '/generateHash');
}
/**
* @api
*
* @return Payone_Api_Service_Payment_Authorize
*/
public function buildServicePaymentAuthorize()
{
public function buildServicePaymentAuthorize() {
return $this->buildService(self::KEY_API . '/payment/authorize');
}
/**
* @api
*
* @return Payone_Api_Service_Payment_Preauthorize
*/
public function buildServicePaymentPreauthorize()
{
public function buildServicePaymentPreauthorize() {
return $this->buildService(self::KEY_API . '/payment/preauthorize');
}
/**
* @api
*
* @return Payone_Api_Service_Payment_Capture
*/
public function buildServicePaymentCapture()
{
public function buildServicePaymentCapture() {
return $this->buildService(self::KEY_API . '/payment/capture');
}
/**
* @api
*
* @return Payone_Api_Service_Payment_Debit
*/
public function buildServicePaymentDebit()
{
public function buildServicePaymentDebit() {
return $this->buildService(self::KEY_API . '/payment/debit');
}
/**
* @api
*
* @return Payone_Api_Service_Payment_Refund
*/
public function buildServicePaymentRefund()
{
public function buildServicePaymentRefund() {
return $this->buildService(self::KEY_API . '/payment/refund');
}
/**
* @api
*
* @return Payone_Api_Service_Verification_3dsCheck
*/
public function buildServiceVerification3dsCheck()
{
public function buildServiceVerification3dsCheck() {
return $this->buildService(self::KEY_API . '/verification/3dscheck');
}
/**
* @api
*
* @return Payone_Api_Service_Management_GetInvoice
*/
public function buildServiceManagementGetInvoice()
{
public function buildServiceManagementGetInvoice() {
return $this->buildService(self::KEY_API . '/management/getInvoice');
}
/**
* @api
*
* @return Payone_Api_Service_Management_GetFile
*/
public function buildServiceManagementGetFile()
{
public function buildServiceManagementGetFile() {
return $this->buildService(self::KEY_API . '/management/getFile');
}
/**
* @api
*
* @return Payone_Api_Service_Management_ManageMandate
*/
public function buildServiceManagementManageMandate()
{
public function buildServiceManagementManageMandate() {
return $this->buildService(self::KEY_API . '/management/manageMandate');
}
/**
* @api
*
* @return Payone_Api_Service_Verification_AddressCheck
*/
public function buildServiceVerificationAddressCheck()
{
public function buildServiceVerificationAddressCheck() {
return $this->buildService(self::KEY_API . '/verification/addressCheck');
}
/**
* @api
*
* @return Payone_Api_Service_Verification_CreditCardCheck
*/
public function buildServiceVerificationCreditCardCheck()
{
public function buildServiceVerificationCreditCardCheck() {
return $this->buildService(self::KEY_API . '/verification/creditCardCheck');
}
/**
* @api
*
* @return Payone_Api_Service_Verification_BankAccountCheck
*/
public function buildServiceVerificationBankAccountCheck()
{
public function buildServiceVerificationBankAccountCheck() {
return $this->buildService(self::KEY_API . '/verification/bankAccountCheck');
}
/**
* @api
*
* @return Payone_Api_Service_Verification_Consumerscore
*/
public function buildServiceVerificationConsumerscore()
{
public function buildServiceVerificationConsumerscore() {
return $this->buildService(self::KEY_API . '/verification/consumerscore');
}
/**
* @api
*
* @return Payone_Settings_Service_XmlGenerate
*/
public function buildServiceSettingsXmlGenerate()
{
public function buildServiceSettingsXmlGenerate() {
return $this->buildService(self::KEY_SETTINGS . '/xmlgenerate');
}
/**
* Service to start the paypal express checkout and
* in step two get customers shipping address from paypal.
* usage:
* $builder = $this->getPayoneBuilder();
* $service = $builder->buildServicePaymentGenericpayment();
* $response = $service->request($request);
*
* @api
* @return Payone_Api_Service_Payment_Genericpayment
*/
public function buildServicePaymentGenericpayment() {
return $this->buildService(self::KEY_API . '/payment/genericpayment');
}
/**
* @api
* @param $key
* @param array $validIps
* @return Payone_TransactionStatus_Service_HandleRequest
*/
public function buildServiceTransactionStatusHandleRequest($key, array $validIps)
{
public function buildServiceTransactionStatusHandleRequest($key, array $validIps) {
/** @var $service Payone_TransactionStatus_Service_HandleRequest */
$service = $this->buildService(self::KEY_TRANSACTIONSTATUS . '/handlerequest');
$validators = $service->getValidators();
foreach ($validators as $validator) {
if ($validator instanceof Payone_TransactionStatus_Validator_DefaultParameters) {
/** @var $validator Payone_TransactionStatus_Validator_DefaultParameters */
$validator->setKey($key);
}
elseif($validator instanceof Payone_TransactionStatus_Validator_Ip)
{
} elseif ($validator instanceof Payone_TransactionStatus_Validator_Ip) {
/** @var $validator Payone_TransactionStatus_Validator_Ip */
$validator->setValidIps($validIps);
$validator->setConfig($this->getConfig()->getTransactionStatusConfig());
}
ca. Zeile 245
* @param $key
* @param array $validIps
* @return Payone_SessionStatus_Service_HandleRequest
*/
public function buildServiceSessionStatusHandleRequest($key, array $validIps)
{
public function buildServiceSessionStatusHandleRequest($key, array $validIps) {
/** @var $service Payone_SessionStatus_Service_HandleRequest */
$service = $this->buildService(self::KEY_SESSIONSTATUS . '/handlerequest');
$validators = $service->getValidators();
foreach ($validators as $validator) {
if ($validator instanceof Payone_SessionStatus_Validator_DefaultParameters) {
/** @var $validator Payone_SessionStatus_Validator_DefaultParameters */
$validator->setKey($key);
}
elseif($validator instanceof Payone_SessionStatus_Validator_Ip)
{
} elseif ($validator instanceof Payone_SessionStatus_Validator_Ip) {
/** @var $validator Payone_SessionStatus_Validator_Ip */
$validator->setValidIps($validIps);
$validator->setConfig($this->getConfig()->getSessionStatusConfig());
}
ca. Zeile 272
* @param string $key Service key, e.g. "api/payment/authorize"
* @return Payone_Api_Service_Payment_Abstract
* @throws Exception
*/
protected function buildService($key)
{
protected function buildService($key) {
$config = $this->getConfig();
$keyArray = explode('/', $key);
$factoryKey = array_shift($keyArray);
ca. Zeile 325
* @param array $protocolConfig
* @param string $factoryKey
* @return Payone_Protocol_Service_Protocol_Abstract
*/
protected function buildServiceProtocol(array $protocolConfig, $factoryKey)
{
protected function buildServiceProtocol(array $protocolConfig, $factoryKey) {
$serviceProtocol = $this->getFactory($factoryKey)->buildServiceProtocolRequest();
$serviceApplyFilters = $this->getFactory(self::KEY_PROTOCOL)->buildServiceApplyFilters();
// Load filters by config:
ca. Zeile 341
$filterMaskValue = new Payone_Protocol_Filter_MaskValue();
$filterMaskValue->setConfig('percent', $options['percent']);
$serviceApplyFilters->addFilter($filterMaskValue);
break;
case Payone_Protocol_Filter_MaskAllValue::FILTER_KEY :
$filterMaskAllValue = new Payone_Protocol_Filter_MaskAllValue();
$serviceApplyFilters->addFilter($filterMaskAllValue);
break;
}
}
}
}
ca. Zeile 388
/**
* @param $validatorConfig
* @return null|validator
*/
protected function buildServiceValidation($validatorConfig)
{
protected function buildServiceValidation($validatorConfig) {
if (is_array($validatorConfig)) {
$validator = array();
foreach ($validatorConfig as $config) {
if ($config === 'default' or !class_exists($config)) {
return null;
}
else {
} else {
$validator[] = new $config();
}
}
return $validator;
}
else {
} else {
// Load validator by config (if non-default):
if ($validatorConfig === 'default' or !class_exists($validatorConfig)) {
return null;
}
else {
} else {
$validator = new $validatorConfig();
return $validator;
}
}
ca. Zeile 418
/**
* @param \Payone_Config $config
*/
public function setConfig(Payone_Config $config)
{
public function setConfig(Payone_Config $config) {
$this->config = $config;
}
/**
* @return \Payone_Config
*/
protected function getConfig()
{
protected function getConfig() {
return $this->config;
}
/**
* @param $key
* @return null|Payone_Api_Factory|Payone_Protocol_Factory|Payone_Settings_Factory|Payone_TransactionStatus_Factory
* @throws Exception
*/
protected function getFactory($key)
{
protected function getFactory($key) {
if (array_key_exists($key, $this->factories)) {
return $this->factories[$key];
}
else {
} else {
throw new Exception('Could not get internal factory with key "' . $key . '"');
}
}
}
includes/external/payone/php/Payone/ClientApi/Factory.phpTop ca. Zeile 18
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_ClientApi
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_ClientApi_Factory
{
/**
includes/external/payone/php/Payone/Config/Abstract.phpTop ca. Zeile 11
* Do not edit or add to this file if you wish to upgrade Payone to newer
* versions in the future. If you wish to customize Payone for your
* needs please refer to http://www.payone.de for more information.
*
* @category Payone
* @package Payone
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
* Configuration for Payone SDK
*
* <b>Example: Replacing the default logging mechanism for Payone Api</b>
* <pre class="prettyprint">
ca. Zeile 62
* $config->setValue('api/default/protocol/loggers/Payone_Protocol_Logger_Log4php/filename', 'my_file.log'); *
* </pre>
*
* @category Payone
* @package Payone
* @package Payone_Config
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
abstract class Payone_Config_Abstract
includes/external/payone/php/Payone/Enum/ClearingType.phpTop ca. Zeile 18
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_Enum
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_Enum_ClearingType
{
const DEBITPAYMENT = 'elv';
const CREDITCARD = 'cc';
ca. Zeile 37
const ONLINEBANKTRANSFER = 'sb';
const CASHONDELIVERY = 'cod';
const WALLET = 'wlt';
const FINANCING = 'fnc';
const CASH = 'csh';
}
includes/external/payone/php/Payone/Enum/Mode.phpTop ca. Zeile 18
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_Enum
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_Enum_Mode
{
const TEST = 'test';
const LIVE = 'live';
includes/external/payone/php/Payone/Enum/Reminderlevel.phpTop ca. Zeile 18
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_Enum
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_Enum_Reminderlevel
{
const LVL_1 = '1';
const LVL_2 = '2';
includes/external/payone/php/Payone/Protocol/Factory.phpTop ca. Zeile 18
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_Protocol
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_Protocol_Factory
{
/**
* @return Payone_Protocol_Service_ApplyFilters
ca. Zeile 36
public function buildServiceApplyFilters()
{
$serviceAF = new Payone_Protocol_Service_ApplyFilters();
$config = $this->buildConfigFilter();
$filters = $this->buildFiltersDefault();
$serviceAF->setConfig($config);
$serviceAF->setFilters($filters);
return $serviceAF;
}
/**
* @return Payone_Protocol_Config_Filter
*/
protected function buildConfigFilter()
{
$config = new Payone_Protocol_Config_Filter();
return $config;
}
/**
* @return Payone_Protocol_Filter_Interface[]
*/
protected function buildFiltersDefault()
{
$filters = array();
$filterMaskValue = new Payone_Protocol_Filter_MaskValue();
$filterMaskValue->setConfigPercent(50); // @todo hs: This default value should be defined somewhere else, configuration?.
$filters = array(0 => $filterMaskValue);
return $filters;
}
array_push($filters, $filterMaskValue);
/**
* @return Payone_Protocol_Logger_Log4php
*/
public function buildLoggerDefault()
{
$config = array(
'filename' => 'payone.log'
);
$filterMaskAllValue = new Payone_Protocol_Filter_MaskAllValue();
array_push($filters, $filterMaskAllValue);
$logger = new Payone_Protocol_Logger_Log4php($config);
return $logger;
return $filters;
}
}
includes/external/payone/php/Payone/Protocol/Filter/Filterable.phpTop ca. Zeile 32
*/
interface Payone_Protocol_Filter_Filterable
{
/**
* @abstract
* @param string $key
* @param Payone_Protocol_Service_ApplyFilters $applyFilters
*/
public function getValue($key);
/**
* @abstract
* @param string $key
* @param string $name
*/
public function setValue($key, $name);
public function setApplyFilters(Payone_Protocol_Service_ApplyFilters $applyFilters);
}
includes/external/payone/php/Payone/Protocol/Service/ApplyFilters.phpTop ca. Zeile 31
* @link http://www.noovias.com
*/
class Payone_Protocol_Service_ApplyFilters
{
const CONFIG_FILTER_KEY = 'filter_key';
const CONFIG_FILTER_CONFIG = 'config';
/**
* @var Payone_Protocol_Config_Filter
*/
protected $config = null;
/**
* @var Payone_Protocol_Filter_Interface[]
*/
protected $filters = array();
/**
* @param null|Payone_Protocol_Config_Filter $config
*/
public function __construct(Payone_Protocol_Config_Filter $config = null)
{
if ($config !== null) {
$this->setConfig($config);
}
}
/**
* @param Payone_Protocol_Filter_Filterable $object
* @return bool
* @throws Payone_Protocol_Exception_FilterNotFound|Payone_Protocol_Exception_InvalidConfig
*/
public function apply(Payone_Protocol_Filter_Filterable $object)
{
$class = get_class($object);
if ($this->getConfig() === null) {
throw new Payone_Protocol_Exception_InvalidConfig();
}
$filtersForClass = $this->getConfig()->getFiltersByClass($class);
// No Filters found for this Class
if (!is_array($filtersForClass)) {
return false;
}
foreach ($filtersForClass as $key => $filterConfig)
{
$config = null;
$filterKey = '';
// Init
if (is_array($filterConfig) and array_key_exists(self::CONFIG_FILTER_KEY, $filterConfig)) {
$filterKey = $filterConfig[self::CONFIG_FILTER_KEY];
if (array_key_exists(self::CONFIG_FILTER_CONFIG, $filterConfig)) {
$config = $filterConfig[self::CONFIG_FILTER_CONFIG];
}
}
else {
$filterKey = $filterConfig;
}
// Fetch Filter
$filter = $this->getFilter($filterKey);
/**
* @var Payone_Protocol_Filter_Interface|null $filter
*/
if (!($filter instanceof Payone_Protocol_Filter_Interface)) {
throw new Payone_Protocol_Exception_FilterNotFound($filterKey);
protected $filters_config = array(
Payone_Protocol_Filter_MaskAllValue::FILTER_KEY => array(
'bankaccount',
'iban',
'cardpan',
'cardcvc2',
'cardexpiredate',
'key'
),
Payone_Protocol_Filter_MaskValue::FILTER_KEY => array(
'bankaccountholder',
'cardholder',
'firstname',
'lastname',
'company',
'street',
'streetname',
'streetnumber',
'addressaddition',
'email',
'telephonenumber',
'birthday',
'shipping_firstname',
'shipping_lastname',
'shipping_company',
'shipping_street',
'shipping_addressaddition',
),
);
/**
* @param array $objectArray
* @return string
*/
public function apply(array $objectArray)
{
$stringArray = array();
foreach ($objectArray as $key => $value) {
if($value instanceof Payone_Api_Response_Parameter_Interface){
$stringArray[] = $this->apply($value->toArray());
} elseif ($value !== null) {
$filter = $this->getFilterConfig($key);
if ($filter != null) {
$value = $filter->filterValue($value);
}
if (is_array($config)) {
$filter->initConfig($config);
}
// Filter Value
$objectValue = $object->getValue($key);
if ($objectValue !== null) {
$filteredValue = $filter->filterValue($objectValue);
$object->setValue($key, $filteredValue);
}
$stringArray[] = $key . '=' . $value;
}
return true;
return implode('|', $stringArray);
}
/**
* @param Payone_Protocol_Filter_Interface $filter
ca. Zeile 136
return false;
}
/**
* @param \Payone_Protocol_Config_Filter $config
*/
public function setConfig(Payone_Protocol_Config_Filter $config)
{
$this->config = $config;
}
/**
* @return \Payone_Protocol_Config_Filter
*/
public function getConfig()
{
return $this->config;
}
/**
* @param Payone_Protocol_Filter_Interface[] $filters
*/
public function setFilters(array $filters)
{
ca. Zeile 173
}
/**
* @param $key
* @return null|Payone_Protocol_Filter_Interface
* @return Payone_Protocol_Filter_Interface
*/
public function getFilter($key)
{
if (array_key_exists($key, $this->filters)) {
return $this->filters[$key];
}
// if the requested filter was not found return Payone_Protocol_Filter_MaskAllValue
return new Payone_Protocol_Filter_MaskAllValue();
}
/**
* @param $key
* @return null|Payone_Protocol_Filter_Interface
*/
public function getFilterConfig($key)
{
foreach($this->filters_config as $filter => $config) {
if(in_array($key, $config)) {
return $this->getFilter($filter);
}
}
return null;
}
}
includes/external/payone/php/Payone/SessionStatus/Config.phpTop ca. Zeile 12
* versions in the future. If you wish to customize Payone for your
* needs please refer to http://www.payone.de for more information.
*
* @category Payone
* @package Payone_Api
* @package Payone_SessionStatus
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_Api
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_SessionStatus_Config extends Payone_Config_Abstract
{
/**
* @return array
ca. Zeile 42
'Payone_SessionStatus_Validator_DefaultParameters',
),
'protocol' => array(
'filter' => array(
'mask_value' => array(
Payone_Protocol_Filter_MaskValue::FILTER_KEY => array(
'enabled' => 1,
'percent' => 100
)
),
'loggers' => array(
'Payone_Protocol_Logger_Log4php' => array(
'filename' => 'payone_sessionstatus.log',
'max_file_size' => '1MB',
'max_file_count' => 20
Payone_Protocol_Filter_MaskAllValue::FILTER_KEY => array(
'enabled' => 1
)
),
),
)
includes/external/payone/php/Payone/SessionStatus/Factory.phpTop ca. Zeile 18
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_SessionStatus
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_SessionStatus_Factory
{
/** @var Payone_SessionStatus_Config */
includes/external/payone/php/Payone/SessionStatus/Mapper/Request.phpTop ca. Zeile 37
{
$request = new Payone_SessionStatus_Request();
// @todo currently simple mapping, could be more complex
$this->mapDefaultParameters($data, &$request);
$this->mapStatusItems($data, &$request);
$this->mapDefaultParameters($data, $request);
$this->mapStatusItems($data, $request);
return $request;
}
includes/external/payone/php/Payone/SessionStatus/Request/Abstract.phpTop ca. Zeile 33
abstract class Payone_SessionStatus_Request_Abstract
implements Payone_SessionStatus_Request_Interface, Payone_Protocol_Filter_Filterable
implements Payone_SessionStatus_Request_Interface
{
/**
* @var Payone_Protocol_Service_ApplyFilters
*/
private $applyFilters = NULL;
function __construct(array $params = array())
{
if (count($params) > 0) {
$this->init($params);
ca. Zeile 55
* @return string
*/
public function __toString()
{
$stringArray = array();
foreach ($this->toArray() as $key => $value) {
$stringArray[] = $key . '=' . $value;
if($this->applyFilters) {
$result = $this->applyFilters->apply($this->toArray());
} else {
$protocolFactory = new Payone_Protocol_Factory();
$defaultApplyFilters = $protocolFactory->buildServiceApplyFilters();
$result = $defaultApplyFilters->apply($this->toArray());
}
$result = implode('|', $stringArray);
return $result;
}
/**
ca. Zeile 75
{
if ($data === null) {
continue;
}
else {
elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
$result[$key] = $data;
}
}
ca. Zeile 86
return $result;
}
/**
* @param string $key
* @return null|mixed
*/
public function getValue($key)
{
return $this->get($key);
}
/**
* @param string $key
* @param string $name
* @return boolean|null
*/
public function setValue($key, $name)
{
return $this->set($key, $name);
}
/**
* @param $name
* @return null|mixed
*/
public function get($name)
ca. Zeile 129
return true;
}
return null;
}
/**
* @param Payone_Protocol_Service_ApplyFilters $applyFilters
*/
public function setApplyFilters(Payone_Protocol_Service_ApplyFilters $applyFilters)
{
$this->applyFilters = $applyFilters;
}
}
includes/external/payone/php/Payone/SessionStatus/Request/Interface.phpTop ca. Zeile 29
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
interface Payone_SessionStatus_Request_Interface
interface Payone_SessionStatus_Request_Interface extends Payone_Protocol_Filter_Filterable
{
/**
* @abstract
* @param array $data
includes/external/payone/php/Payone/SessionStatus/Request/Item/Abstract.phpTop ca. Zeile 33
abstract class Payone_SessionStatus_Request_Item_Abstract
implements Payone_SessionStatus_Request_Item_Interface, Payone_Protocol_Filter_Filterable
implements Payone_SessionStatus_Request_Item_Interface
{
/**
* @var Payone_Protocol_Service_ApplyFilters
*/
private $applyFilters = NULL;
function __construct(array $params = array())
{
if (count($params) > 0) {
$this->init($params);
ca. Zeile 55
* @return string
*/
public function __toString()
{
$stringArray = array();
foreach ($this->toArray() as $key => $value) {
$stringArray[] = $key . '=' . $value;
if($this->applyFilters) {
$result = $this->applyFilters->apply($this->toArray());
} else {
$protocolFactory = new Payone_Protocol_Factory();
$defaultApplyFilters = $protocolFactory->buildServiceApplyFilters();
$result = $defaultApplyFilters->apply($this->toArray());
}
$result = implode('|', $stringArray);
return $result;
}
/**
ca. Zeile 75
{
if ($data === null) {
continue;
}
else {
elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
$result[$key] = $data;
}
}
ca. Zeile 86
return $result;
}
/**
* @param string $key
* @return null|mixed
*/
public function getValue($key)
{
return $this->get($key);
}
/**
* @param string $key
* @param string $name
* @return boolean|null
*/
public function setValue($key, $name)
{
return $this->set($key, $name);
}
/**
* @param $name
* @return null|mixed
*/
public function get($name)
ca. Zeile 129
return true;
}
return null;
}
/**
* @param Payone_Protocol_Service_ApplyFilters $applyFilters
*/
public function setApplyFilters(Payone_Protocol_Service_ApplyFilters $applyFilters)
{
$this->applyFilters = $applyFilters;
}
}
includes/external/payone/php/Payone/SessionStatus/Request/Item/Interface.phpTop ca. Zeile 29
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
interface Payone_SessionStatus_Request_Item_Interface
interface Payone_SessionStatus_Request_Item_Interface extends Payone_Protocol_Filter_Filterable
{
/**
* @abstract
* @param array $data
includes/external/payone/php/Payone/SessionStatus/Request.phpTop ca. Zeile 13
* needs please refer to http://www.payone.de for more information.
*
* @category Payone
* @package Payone_SessionStatus
* @subpackage Request
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_SessionStatus
* @subpackage Request
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_SessionStatus_Request extends Payone_SessionStatus_Request_Abstract
{
/**
* @var string Payment portal key as MD5 value
includes/external/payone/php/Payone/SessionStatus/Response/Abstract.phpTop ca. Zeile 33
abstract class Payone_SessionStatus_Response_Abstract
implements Payone_SessionStatus_Response_Interface, Payone_Protocol_Filter_Filterable
implements Payone_SessionStatus_Response_Interface
{
/**
* @param string $key
* @return null|mixed
*/
public function getValue($key)
{
return $this->get($key);
}
/**
* @param string $key
* @param string $name
* @return boolean|null
*/
public function setValue($key, $name)
{
return $this->set($key, $name);
}
/**
* @param $name
* @return null|mixed
*/
protected function get($name)
includes/external/payone/php/Payone/SessionStatus/Response.phpTop ca. Zeile 13
* needs please refer to http://www.payone.de for more information.
*
* @category Payone
* @package Payone_SessionStatus
* @subpackage Response
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_SessionStatus
* @subpackage Response
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_SessionStatus_Response extends Payone_SessionStatus_Response_Abstract
{
const STATUS_OK = 'SSOK';
includes/external/payone/php/Payone/Settings/Factory.phpTop ca. Zeile 18
* @author Harald Schroeder <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_Settings
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_Settings_Factory
{
/**
* Constructs an XML generator (config to XML)
includes/external/payone/php/Payone/TransactionStatus/Config.phpTop ca. Zeile 42
'Payone_TransactionStatus_Validator_DefaultParameters',
),
'protocol' => array(
'filter' => array(
'mask_value' => array(
Payone_Protocol_Filter_MaskValue::FILTER_KEY => array(
'enabled' => 1,
'percent' => 100
)
),
'loggers' => array(
'Payone_Protocol_Logger_Log4php' => array(
'filename' => 'payone_transactionstatus.log',
'max_file_size' => '1MB',
'max_file_count' => 20
Payone_Protocol_Filter_MaskAllValue::FILTER_KEY => array(
'enabled' => 1
)
),
),
)
includes/external/payone/php/Payone/TransactionStatus/Factory.phpTop ca. Zeile 18
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_TransactionStatus
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_TransactionStatus_Factory
{
/** @var Payone_TransactionStatus_Config */
includes/external/payone/php/Payone/TransactionStatus/Request/Abstract.phpTop ca. Zeile 33
abstract class Payone_TransactionStatus_Request_Abstract
implements Payone_TransactionStatus_Request_Interface, Payone_Protocol_Filter_Filterable
implements Payone_TransactionStatus_Request_Interface
{
/**
* @var Payone_Protocol_Service_ApplyFilters
*/
private $applyFilters = NULL;
function __construct(array $params = array())
{
if (count($params) > 0) {
$this->init($params);
ca. Zeile 55
* @return string
*/
public function __toString()
{
$stringArray = array();
foreach ($this->toArray() as $key => $value) {
$stringArray[] = $key . '=' . $value;
if($this->applyFilters) {
$result = $this->applyFilters->apply($this->toArray());
} else {
$protocolFactory = new Payone_Protocol_Factory();
$defaultApplyFilters = $protocolFactory->buildServiceApplyFilters();
$result = $defaultApplyFilters->apply($this->toArray());
}
$result = implode('|', $stringArray);
return $result;
}
/**
ca. Zeile 75
{
if ($data === null) {
continue;
}
else {
elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
$result[$key] = $data;
}
}
ca. Zeile 86
return $result;
}
/**
* @param string $key
* @return null|mixed
*/
public function getValue($key)
{
return $this->get($key);
}
/**
* @param string $key
* @param string $name
* @return boolean|null
*/
public function setValue($key, $name)
{
return $this->set($key, $name);
}
/**
* @param $name
* @return null|mixed
*/
public function get($name)
ca. Zeile 129
return true;
}
return null;
}
/**
* @param Payone_Protocol_Service_ApplyFilters $applyFilters
*/
public function setApplyFilters(Payone_Protocol_Service_ApplyFilters $applyFilters)
{
$this->applyFilters = $applyFilters;
}
}
includes/external/payone/php/Payone/TransactionStatus/Request.phpTop ca. Zeile 13
* needs please refer to http://www.payone.de for more information.
*
* @category Payone
* @package Payone_TransactionStatus
* @subpackage Request
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
includes/external/payone/php/Payone/TransactionStatus/Response/Abstract.phpTop ca. Zeile 33
abstract class Payone_TransactionStatus_Response_Abstract
implements Payone_TransactionStatus_Response_Interface, Payone_Protocol_Filter_Filterable
implements Payone_TransactionStatus_Response_Interface
{
/**
* @param string $key
* @return null|mixed
*/
public function getValue($key)
{
return $this->get($key);
}
/**
* @param string $key
* @param string $name
* @return boolean|null
* @var Payone_Protocol_Service_ApplyFilters
*/
public function setValue($key, $name)
{
return $this->set($key, $name);
}
private $applyFilters = NULL;
/**
* @param $name
* @return null|mixed
ca. Zeile 80
}
return null;
}
/**
* @param Payone_Protocol_Service_ApplyFilters $applyFilters
*/
public function setApplyFilters(Payone_Protocol_Service_ApplyFilters $applyFilters)
{
$this->applyFilters = $applyFilters;
}
}
includes/external/payone/php/Payone/TransactionStatus/Response/Interface.phpTop ca. Zeile 29
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
interface Payone_TransactionStatus_Response_Interface
interface Payone_TransactionStatus_Response_Interface extends Payone_Protocol_Filter_Filterable
{
public function __toString();
}
includes/external/payone/php/Payone/TransactionStatus/Response.phpTop ca. Zeile 13
* needs please refer to http://www.payone.de for more information.
*
* @category Payone
* @package Payone_TransactionStatus
* @subpackage Response
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_TransactionStatus
* @subpackage Response
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
class Payone_TransactionStatus_Response extends Payone_TransactionStatus_Response_Abstract
{
const STATUS_OK = 'TSOK';
includes/external/payone/templates/checkout_payone_addresscheck.htmlTop ca. Zeile 14
{if $content_data.note_address_changed}
<p class="p1_note">{$content_data.note_address_changed}</p>
{/if}
<form action="{$content_data.form_action}" method="POST">
{$content_data.FORM_ACTION}
{if $content_data.billto_corrected_street}
<h4 class="payone">{$smarty.const.AC_BILLING_ADDRESS}</h4>
{if $content_data.billto_customermessage}
includes/external/payone/templates/checkout_payone_cc_form.htmlTop ca. Zeile 1
<link rel="stylesheet" href="{$payonecss}" type="text/css" media="screen" />
<div class="payone_cc_container">
{if $error}<div class="errormessage">{$error}</div>{/if}
<script type="text/javascript" src="https://secure.pay1.de/client-api/js/v1/payone_hosted_min.js"></script>
<div id="test_cc" class="payone_cc_container">
<div class="errormessage" id="errorOutput"></div>
<table width="100%" class="payone_cc_table">
<tr>
<td class="label">{$smarty.const.TEXT_CARDOWNER}</td>
<td><input id="p1_cc_cardholder" name="p1_cardholder" type="text" class="clear_before_submit" value="{$smarty.session.customer_first_name} {$smarty.session.customer_last_name}"></td>
<td><input id="p1_cc_cardholder" name="cardholder" type="text" class="clear_before_submit" value="{$smarty.session.customer_first_name} {$smarty.session.customer_last_name}"></td>
</tr>
{*
<tr>
<td class="label">{$smarty.const.TEXT_CARDTYPE}</td>
<td>
<select name="cardtype">
{foreach name=outer item=data from=$cctypes}
<option value="{$data.shorttype}">{$data.typename}</option>
{/foreach}
</select>
</td>
<td><span id="cardtype" class="inputIframe cf"></span></td>
</tr>
*}
<tr>
<td class="label">{$smarty.const.TEXT_CARDNO}</td>
<td><input name="cardpan" type="text" value="" autocomplete="off"></td>
<td><span class="inputIframe cf" id="cardpan"></span></td>
</tr>
<tr>
<td class="label">{$smarty.const.TEXT_CARDEXPIRES}</td>
<td>
<select name="cardexpiredate">
{foreach name=outer item=year from=$ccexpires_years}
{foreach name=outer item=month from=$ccexpires_months}
<option value="{$year}{$month}">{$month} / {$year}</option>
{/foreach}
{/foreach}
</select>
<td style="text-align:left;">
<span id="cardexpiremonth" class="inputIframe cf" style="margin-right: 10px;"></span>
<span id="cardexpireyear" class="inputIframe cf"></span>
</td>
</tr>
{if $genre_specific.check_cav == 'true'}
<tr>
<td class="label">{$smarty.const.TEXT_CARDCHECKNUM}</td>
<td><input name="cardcvc2" type="text" value="" autocomplete="off"></td>
<td><span id="cardcvc2" class="inputIframe cf"></span></td>
</tr>
{/if}
</table>
{$hidden}
</div>
<input type="hidden" name="pseudocardpan" id="pseudocardpan">
<input type="hidden" name="truncatedcardpan" id="truncatedcardpan">
{$cc_javascript}
includes/external/shopgate/api.phpTop ca. Zeile 1
<?php
/**
* application_top.php must included in this File because errors on other xtc3 extensions
/*
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
/**
* Entry point for this plugin is now the shopgate.php file in root directory.
* This file is only for compatibility to older versions.
*/
date_default_timezone_set("Europe/Berlin");
include_once dirname(__FILE__).'/shopgate_library/shopgate.php';
ca. Zeile 9
include_once dirname(__FILE__).'/shopgate_library/shopgate.php';
// Change to a base directory to include all files from
$dir = realpath(dirname(__FILE__)."/../");
##### XTCM BOF #####
chdir( $dir );
##### XTCM EOF #####
// @chdir hack for warning: "open_basedir restriction in effect"
if(@chdir( $dir ) === FALSE){
chdir( $dir .'/');
}
// fix for bot-trap. Sometimes they block requests by mistake.
define("PRES_CLIENT_IP", @$_SERVER["SERVER_ADDR"]);
/**
* application_top.php must be included in this file because of errors on other xtc3 extensions
*
*/
include_once('includes/application_top.php');
include_once dirname(__FILE__).'/plugin.php';
##### XTCM BOF #####
$ShopgateFramework = new ShopgateModifiedPlugin();
##### XTCM EOF #####
$ShopgateFramework->handleRequest($_REQUEST);
includes/external/shopgate/base/admin/includes/column_left.phpTop ca. Zeile 1
<?php
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
if(strpos(MODULE_PAYMENT_INSTALLED, 'shopgate.php') !== false){
if (empty($_SESSION['customer_id'])) {
return;
}
if (MODULE_PAYMENT_SHOPGATE_STATUS == 'True' && $admin_access['shopgate'] == 1) {
// determine configuration language: $_GET > $_SESSION > global
$sg_language_get = (!empty($_GET['sg_language'])
? '&sg_language='.$_GET['sg_language']
: ''
$sg_language_get = (!empty($_GET['sg_language']) ? '&sg_language=' . $_GET['sg_language'] : '');
$displayCssClass = 'menuBoxContentLink';
$linkNamePrefix = ' -';
if (defined('NEW_ADMIN_STYLE') && defined('PROJECT_MAJOR_VERSION')) {
$surroundingHtml = array(
'start' => '<li>' .
'<a class="menuBoxContentLinkSub" href="#">-' . BOX_SHOPGATE . '</a>' .
'<ul>',
'end' => '</ul></li>',
);
} else {
$surroundingHtml = array(
'start' => '<li>' .
'<div class="dataTableHeadingContent"><strong>' . BOX_SHOPGATE . '</strong></div>' .
'<ul>',
'end' => '</ul></li>',
);
}
$surroundingTags = array(
'start' => '<li>',
'end' => '</li>',
);
$hrefIdList = array(
'basic' => '',
'merchant' => '',
);
echo ('<li>');
echo ('<div class="dataTableHeadingContent"><b>'.BOX_SHOPGATE.'</b></div>');
echo ('<ul>');
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['shopgate'] == '1'))
echo '<li><a href="' . xtc_href_link(FILENAME_SHOPGATE."?sg_option=info{$sg_language_get}", '', 'NONSSL') . '" class="menuBoxCon"> -' . BOX_SHOPGATE_INFO . '</a></li>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['shopgate'] == '1'))
echo '<li><a href="' . xtc_href_link(FILENAME_SHOPGATE."?sg_option=help{$sg_language_get}", '', 'NONSSL') . '" class="menuBoxCon"> -'.BOX_SHOPGATE_HELP.'</a></li>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['shopgate'] == '1'))
echo '<li><a href="' . xtc_href_link(FILENAME_SHOPGATE."?sg_option=register{$sg_language_get}", '', 'NONSSL') . '" class="menuBoxCon"> -'.BOX_SHOPGATE_REGISTER.'</a></li>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['shopgate'] == '1'))
echo '<li><a href="' . xtc_href_link(FILENAME_SHOPGATE."?sg_option=config{$sg_language_get}", '', 'NONSSL') . '" class="menuBoxCon"> -'.BOX_SHOPGATE_CONFIG.'</a></li>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['shopgate'] == '1'))
echo '<li><a href="' . xtc_href_link(FILENAME_SHOPGATE."?sg_option=merchant{$sg_language_get}", '', 'NONSSL') . '" class="menuBoxCon"> -'.BOX_SHOPGATE_MERCHANT.'</a></li>';
echo ('</ul>');
echo ('</li>');
echo(
$surroundingHtml['start'] .
$surroundingTags['start'] .
'<a ' . $hrefIdList['basic'] . 'href="' . xtc_href_link(
FILENAME_SHOPGATE . "?sg_option=info{$sg_language_get}", '', 'NONSSL'
) . '" class="' . $displayCssClass . '">' . $linkNamePrefix . BOX_SHOPGATE_INFO . '</a>' .
$surroundingTags['end']
.
$surroundingTags['start'] .
'<a ' . $hrefIdList['basic'] . 'href="' . xtc_href_link(
FILENAME_SHOPGATE . "?sg_option=help{$sg_language_get}", '', 'NONSSL'
) . '" class="' . $displayCssClass . '">' . $linkNamePrefix . BOX_SHOPGATE_HELP . '</a>' .
$surroundingTags['end']
.
$surroundingTags['start'] .
'<a ' . $hrefIdList['basic'] . 'href="' . xtc_href_link(
FILENAME_SHOPGATE . "?sg_option=config{$sg_language_get}", '', 'NONSSL'
) . '" class="' . $displayCssClass . '">' . $linkNamePrefix . BOX_SHOPGATE_CONFIG . '</a>' .
$surroundingTags['end'] .
$surroundingHtml['end']
);
}
includes/external/shopgate/base/admin/orders.phpTop ca. Zeile 1
<?php
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
include_once DIR_FS_CATALOG.'includes/external/shopgate/shopgate_library/shopgate.php';
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
include_once DIR_FS_CATALOG
. 'includes/external/shopgate/shopgate_library/shopgate.php';
include_once DIR_FS_CATALOG.'includes/external/shopgate/plugin.php';
/**
* Wrapper for setShopgateOrderlistStatus() with only one order.
ca. Zeile 12
*
* @param int $orderId The ID of the order in the shop system.
* @param int $status The ID of the order status that has been set in the shopping system.
*/
function setShopgateOrderStatus($orderId, $status) {
function setShopgateOrderStatus($orderId, $status)
{
if (empty($orderId)) {
return;
}
ca. Zeile 26
*
* @param int[] $orderIds The IDs of the orders in the shop system.
* @param int $status The ID of the order status that has been set in the shopping system.
*/
function setShopgateOrderlistStatus($orderIds, $status) {
function setShopgateOrderlistStatus($orderIds, $status)
{
if (empty($orderIds) || !is_array($orderIds)) {
return;
}
includes/external/shopgate/base/admin/shopgate.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
require_once 'includes/application_top.php';
require(DIR_FS_CATALOG . 'includes/external/shopgate/shopgate_library/shopgate.php');
require(DIR_FS_CATALOG . 'includes/external/shopgate/base/shopgate_config.php');
defined( '_VALID_XTC' ) or die('Direct Access not allowed.');
require(DIR_FS_CATALOG.'/includes/external/shopgate/shopgate_library/shopgate.php');
require(DIR_FS_CATALOG.'/includes/external/shopgate/base/shopgate_config.php');
$encodings = array('UTF-8', 'ISO-8859-1', 'ISO-8859-15');
$error = array();
// determine configuration language: $_GET > $_SESSION > global (null)
ca. Zeile 13
? $_GET['sg_language']
: null
);
// remove '?' characters from the language id. This can happen if a wrong formatted link is used
if (!empty($sg_language)) {
$sg_language = trim($sg_language, '?');
if (strpos($sg_language, '?') !== false) {
$sg_language = explode('?', $sg_language);
$sg_language = $sg_language[0];
}
}
// determine redirect_languages for global configuration
if (($sg_language === null) && !isset($_POST['_shopgate_config']['redirect_languages'])) {
$_POST['_shopgate_config']['redirect_languages'] = array();
}
ca. Zeile 22
// load configuration
if (isset($_GET['action']) && ($_GET["action"] === "save")) {
try {
$shopgateConfig = new ShopgateConfigModified();
// check if some settings are selected, keep default if not
$sgEmptySettings = array(
'language', 'currency', 'country', 'tax_zone_id', 'customer_price_group', 'customer_status_id',
'order_status_open', 'order_status_shipping_blocked', 'order_status_shipped', 'order_status_cancled'
'language', 'currency', 'country', 'tax_zone_id', 'customer_price_group',
'order_status_open', 'order_status_shipping_blocked', 'order_status_shipped', 'order_status_canceled'
);
foreach ($sgEmptySettings as $sgEmptySetting) {
if ($_POST['_shopgate_config'][$sgEmptySetting] == '-') {
$_POST['_shopgate_config'][$sgEmptySetting] = $shopgateConfig->{'get'.$shopgateConfig->camelize($sgEmptySetting, true)}();
$_POST['_shopgate_config'][$sgEmptySetting] =
$shopgateConfig->{'get' . $shopgateConfig->camelize($sgEmptySetting, true)}();
}
}
$shopgateConfig->loadArray($_POST['_shopgate_config']);
ca. Zeile 41
} else {
$shopgateConfig->saveFileForLanguage(array_keys($_POST['_shopgate_config']), $sg_language);
}
xtc_redirect(FILENAME_SHOPGATE.'?sg_option='.$_GET['sg_option'].(($sg_language === null) ? '' : '&sg_language='.$sg_language));
xtc_redirect(
FILENAME_SHOPGATE . '?sg_option=' . $_GET['sg_option'] . (($sg_language === null)
? '' : '&sg_language=' . $sg_language)
);
} catch (ShopgateLibraryException $e) {
$shopgate_message = SHOPGATE_CONFIG_ERROR_SAVING;
switch ($e->getCode()) {
case ShopgateLibraryException::CONFIG_READ_WRITE_ERROR:
ca. Zeile 83
$shopgateConfig = $shopgateConfig->toArray();
}
}
$catIdQuery = "SELECT MAX(c.categories_id) as maxid FROM " . TABLE_CATEGORIES . " AS c ";
$catIdResult = xtc_db_query($catIdQuery);
$maxCatId = xtc_db_fetch_array($catIdResult);
$maxCatId = $maxCatId['maxid'];
// load all languages
$qry = xtc_db_query("SELECT LOWER(code) AS code, name, directory FROM `".TABLE_LANGUAGES."` ORDER BY code");
$sgLanguages = array();
ca. Zeile 94
// gather information about the system configuration for the plugin configuration
if($_GET["sg_option"] === "config") {
// get order states
$qry = xtc_db_query("
$qry = xtc_db_query(
"
SELECT
orders_status_id,
".(($sg_language === null)
? "CONCAT(orders_status_name, ' (', code, ')') AS orders_status_name"
ca. Zeile 113
while ($row = xtc_db_fetch_array($qry)) {
$sgOrderStates[$row['orders_status_id']] = $row;
}
// get customer groups
$qry = xtc_db_query("
SELECT
s.customers_status_id,
".(($sg_language === null)
? "CONCAT(customers_status_name, ' (', code, ')') AS customers_status_name"
: 'customers_status_name'
)."
FROM `".TABLE_CUSTOMERS_STATUS."` s
INNER JOIN `".TABLE_LANGUAGES."` l ON s.language_id = l.languages_id
WHERE
".(($sg_language === null) ? '' : "LOWER(l.code) = '{$sg_language}' AND")."
customers_status_id != '0'
");
$sgCustomerGroups = array();
while ($row = xtc_db_fetch_array($qry)) {
$sgCustomerGroups[$row['customers_status_id']] = $row;
}
$sgExportDescriptionTypes = array(
SHOPGATE_SETTING_EXPORT_DESCRIPTION => SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_DESC_ONLY,
SHOPGATE_SETTING_EXPORT_SHORTDESCRIPTION => SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_SHORTDESC_ONLY,
SHOPGATE_SETTING_EXPORT_DESCRIPTION_SHORTDESCRIPTION => SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_DESC_SHORTDESC,
SHOPGATE_SETTING_EXPORT_SHORTDESCRIPTION_DESCRIPTION => SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_SHORTDESC_DESC,
);
// get tax zones
$qry = xtc_db_query("
$qry = xtc_db_query(
"
SELECT
geo_zone_id,
geo_zone_name,
geo_zone_description
FROM `".TABLE_GEO_ZONES."`
ORDER BY geo_zone_id
");
"
);
$sgTaxZones = array();
while ($row = xtc_db_fetch_array($qry)) {
$sgTaxZones[$row['geo_zone_id']] = $row;
}
// get currencies
$qry = xtc_db_query("
$qry = xtc_db_query(
"
SELECT
*
FROM `".TABLE_CURRENCIES."`
ORDER BY title
");
"
);
$sgCurrencies = array();
while ($row = xtc_db_fetch_array($qry)) {
$sgCurrencies[$row["code"]] = $row["title"];
}
// get countries
$qry = xtc_db_query("
$qry = xtc_db_query(
"
SELECT
UPPER(countries_iso_code_2) AS countries_iso_code_2,
countries_name
FROM `".TABLE_COUNTRIES."`
WHERE status = 1
ORDER BY countries_name
");
"
);
$sgCountries = array();
while ($row = xtc_db_fetch_array($qry)) {
$sgCountries[$row['countries_iso_code_2']] = $row;
ca. Zeile 188
// create a list of all installed shipping modules
$sgInstalledShippingModules = array('' => SHOPGATE_CONFIG_EXTENDED_SHIPPING_NO_SELECTION);
$installedShippingModules = explode(';', MODULE_SHIPPING_INSTALLED);
foreach($installedShippingModules as $shippingModule) {
if(isset($shippingModule) && is_file(DIR_FS_LANGUAGES . $languageDirectory . '/modules/shipping/' . $shippingModule)) {
if (isset($shippingModule)
&& is_file(
DIR_FS_LANGUAGES . $languageDirectory . '/modules/shipping/' . $shippingModule
)
) {
require(DIR_FS_LANGUAGES . $languageDirectory . '/modules/shipping/' . $shippingModule);
$shippingModule = substr($shippingModule, 0, strrpos($shippingModule, '.'));
$sgInstalledShippingModules[$shippingModule] = constant(MODULE_SHIPPING_.strtoupper($shippingModule)._TEXT_TITLE);
$sgInstalledShippingModules[$shippingModule] =
constant('MODULE_SHIPPING_' . strtoupper($shippingModule) . '_TEXT_TITLE');
}
}
}
$shopgateWikiLink = 'http://wiki.shopgate.com/Modified/de';
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
if (defined('RUN_MODE_ADMIN')) {
require(DIR_WS_INCLUDES . 'head.php');
} else {
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html ' . HTML_PARAMS . '>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_SESSION['language_charset']; ?>">
<meta http-equiv="Content-Type" content="text/html; charset=' . $_SESSION['language_charset'] . '">
<meta name="robots" content="noindex,nofollow">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<title>' . TITLE . '</title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css" />' . "\n";
}
?>
<script type="text/javascript" src="includes/general.js"></script>
<script type="text/javascript">
<!--
function sgDisplayLanguageSelection(sg_button) {
ca. Zeile 241
// -->
</script>
<style type="text/css">
.shopgate_iframe {
width: 1000px;
width: 100%;
min-height: 600px;
height: 100%;
border: 0;
}
table.shopgate_setting {
}
td.shopgate_setting {
width: 1050px;
}
tr.shopgate_even {
}
tr.shopgate_uneven {
}
td.shopgate_input div {
background: #f9f0f1;
border: 1px solid #cccccc;
margin-bottom: 10px;
ca. Zeile 286
}
div.shopgate_red_message {
background: #ffd6d9;
width; 100%;
width;
100%;
padding: 10px;
}
div.shopgate_blue_message {
background: #d6e9ff;
width; 100%;
width;
100%;
padding: 10px;
}
div.shopgate_language_selection div {
ca. Zeile 308
div.sg_submit input {
padding: 2px;
}
#shopgate_image_wiki {
text-align: center;
background-color: white;
padding-top: 50px;
padding-bottom: 50px;
}
#shopgate_image_wiki img {
width: 500px;
}
#shopgate_image_settings {
background-color: white;
padding: 20px;
}
#shopgate_image_settings img {
width: 200px;
}
</style>
</head>
<?php $tableClass = 'dataTableContent'; ?>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top">
<table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1"
cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table>
</td>
<!-- body_text //-->
<td class="boxCenter" width="100%" valign="top" style="height: 100%;">
<table border="0" width="100%" cellspacing="0" cellpadding="2" style="height:100%;">
<tr>
<td>
<div class="pageHeading">
<?php echo SHOPGATE_CONFIG_TITLE; ?>
</div>
</td>
</tr>
<tr style="height: 100%;">
<td class="main" style="height: 100%; vertical-align: top;">
<?php
if (defined('PROJECT_MAJOR_VERSION')) {
require(DIR_FS_CATALOG . 'includes/external/shopgate/base/admin/templates/shopgate_header_v2.php');
} else {
require(DIR_FS_CATALOG . 'includes/external/shopgate/base/admin/templates/shopgate_header_v1.php');
}
?>
<?php if(!empty($shopgate_message)):?>
<div class="shopgate_red_message">
<strong style="color: red;"><?php echo SHOPGATE_CONFIG_ERROR; ?></strong>
<?php echo htmlentities($shopgate_message , ENT_COMPAT, "UTF-8") ?>
ca. Zeile 349
<?php endif; ?>
<?php if ($_GET["sg_option"] === "info"): ?>
<iframe src="<?php echo SHOPGATE_LINK_HOME; ?>" class="shopgate_iframe"></iframe>
<?php elseif($_GET["sg_option"] === "help"): ?>
<iframe src="<?php echo $shopgateWikiLink; ?>" class="shopgate_iframe"></iframe>
<?php elseif($_GET["sg_option"] === "register"): ?>
<iframe src="<?php echo SHOPGATE_LINK_REGISTER; ?>" class="shopgate_iframe"></iframe>
<div id="shopgate_image_wiki">
<a target="_blank" href="<?php echo SHOPGATE_LINK_WIKI; ?>">
<img src="../includes/external/shopgate/base/admin/includes/img/shopgate_manual_logo.jpg" alt="Shopgate Wiki"/>
</a>
</div>
<?php elseif($_GET["sg_option"] === "config"): ?>
<?php echo xtc_draw_form('shopgate', FILENAME_SHOPGATE, 'sg_option=config&action=save'.(($sg_language === null) ? '' : '&sg_language='.$sg_language)); ?>
<?php if (count($sgLanguages) > 1): ?>
<?php if ($sg_language === null): ?>
<br />
<div id="shopgate_image_settings">
<a target="_blank" href="<?php echo SHOPGATE_LINK_WIKI; ?>">
<img src="../includes/external/shopgate/base/admin/includes/img/shopgate_manual_logo.jpg" alt="Shopgate Wiki"/>
</a>
</div>
<br /> <?php if ($sg_language === null): ?>
<?php if (!empty($shopgate_info)): ?>
<div class="shopgate_blue_message"><strong style="color: blue;">Info:</strong> <?php echo $shopgate_info; ?></div>
<br />
<?php endif; ?>
<button onclick="sgDisplayLanguageSelection(this); return false;" id="sg_multiple_shops_button"><?php echo SHOPGATE_CONFIG_MULTIPLE_SHOPS_BUTTON ?></button>
ca. Zeile 367
<div><?php echo SHOPGATE_CONFIG_LANGUAGE_SELECTION; ?></div>
<select onchange="sgLoadLanguage('<?php echo $_GET["sg_option"] ?>')" id="sg_language">
<option value=""><?php echo SHOPGATE_CONFIG_GLOBAL_CONFIGURATION; ?></option>
<?php foreach ($sgLanguages as $sgLanguage): ?>
<option value="<?php echo $sgLanguage['code']; ?>"<?php if ($sgLanguage['code'] == $sg_language) echo ' selected="selected"'; ?>>
<option value="<?php echo $sgLanguage['code']; ?>"<?php if ($sgLanguage['code'] == $sg_language) {echo ' selected="selected"';} ?>>
- <?php echo $sgLanguage['name']; ?>
</option>
<?php endforeach; ?>
</select>
ca. Zeile 390
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_CUSTOMER_NUMBER; ?></b></td>
<td class="<?php echo $tableClass; ?> shopgate_input<?php echo empty($error['customer_number']) ? '' : ' error' ?>">
<div><input type="text" name="_shopgate_config[customer_number]" value="<?php echo $shopgateConfig["customer_number"]?>" /></div>
<?php echo SHOPGATE_CONFIG_CUSTOMER_NUMBER_DESCRIPTION; ?>
[<a href="http://www.shopgate.com/merchant/" target="_blank">LINK</a>]
</td>
</tr>
</table>
</td>
ca. Zeile 404
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_SHOP_NUMBER; ?></b></td>
<td class="<?php echo $tableClass; ?> shopgate_input<?php echo empty($error['shop_number']) ? '' : ' error' ?>">
<div><input type="text" name="_shopgate_config[shop_number]" value="<?php echo $shopgateConfig["shop_number"]?>" /></div>
<?php echo SHOPGATE_CONFIG_SHOP_NUMBER_DESCRIPTION; ?>
[<a href="http://www.shopgate.com/merchant/" target="_blank">LINK</a>]
</td>
</tr>
</table>
</td>
ca. Zeile 418
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_APIKEY; ?></b></td>
<td class="<?php echo $tableClass; ?> shopgate_input<?php echo empty($error['apikey']) ? '' : ' error' ?>">
<div><input type="text" name="_shopgate_config[apikey]" value="<?php echo $shopgateConfig["apikey"]?>" /></div>
<?php echo SHOPGATE_CONFIG_APIKEY_DESCRIPTION; ?>
[<a href="http://www.shopgate.com/merchant/" target="_blank">LINK</a>]
</td>
</tr>
</table>
</td>
ca. Zeile 435
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_ALIAS; ?></b></td>
<td class="<?php echo $tableClass; ?> shopgate_input<?php echo empty($error['alias']) ? '' : ' error' ?>">
<div><input type="text" name="_shopgate_config[alias]" value="<?php echo $shopgateConfig["alias"]?>" /></div>
<?php echo SHOPGATE_CONFIG_ALIAS_DESCRIPTION; ?>
[<a href="http://www.shopgate.com/merchant/" target="_blank">LINK</a>]
</td>
</tr>
</table>
</td>
ca. Zeile 449
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_CNAME; ?></b></td>
<td class="<?php echo $tableClass; ?> shopgate_input<?php echo empty($error['cname']) ? '' : ' error' ?>">
<div><input type="text" name="_shopgate_config[cname]" value="<?php echo $shopgateConfig["cname"]?>" /></div>
<?php echo SHOPGATE_CONFIG_CNAME_DESCRIPTION; ?>
[<a href="http://www.shopgate.com/merchant/" target="_blank">LINK</a>]
</td>
</tr>
</table>
</td>
ca. Zeile 619
<tr>
<td class="shopgate_setting" align="right">
<table width="100%" cellspacing="0" cellpadding="4" border="0" class="shopgate_setting">
<tr valign="top" class="<?php echo ($alt == 'shopgate_uneven') ? $alt = 'shopgate_even' : $alt = 'shopgate_uneven' ?>">
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_EXTENDED_CUSTOMER_PRICE_GROUP; ?></b></td>
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION; ?></b></td>
<td class="<?php echo $tableClass; ?> shopgate_input">
<div>
<select name="_shopgate_config[customer_price_group]">
<?php if (!in_array($shopgateConfig['customer_price_group'], array_keys($sgCustomerGroups)) && $shopgateConfig['customer_price_group'] != '0'): ?>
<option value="-"></option>
<?php endif; ?>
<option value="0"><?php echo SHOPGATE_CONFIG_EXTENDED_CUSTOMER_PRICE_GROUP_OFF; ?></option>
<?php foreach($sgCustomerGroups as $sgCustomerGroup): ?>
<option value="<?php echo $sgCustomerGroup["customers_status_id"]?>"
<?php echo $shopgateConfig["customer_price_group"]==$sgCustomerGroup["customers_status_id"]?'selected=""':''?>>
<?php echo $sgCustomerGroup["customers_status_name"]?>
<select name="_shopgate_config[export_description_type]">
<?php foreach($sgExportDescriptionTypes as $sgDescriptionType => $sgDescriptionTypeName): ?>
<option value="<?php echo $sgDescriptionType; ?>"
<?php echo $shopgateConfig["export_description_type"]==$sgDescriptionType?'selected=""':''?>>
<?php echo $sgDescriptionTypeName; ?>
</option>
<?php endforeach; ?>
</select>
</div>
<?php echo SHOPGATE_CONFIG_EXTENDED_CUSTOMER_PRICE_GROUP_DESCRIPTION; ?>
<?php echo SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_DESCRIPTION; ?>
</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2"> </td></tr>
<tr><th colspan="2" style="text-align: left;"><?php echo SHOPGATE_CONFIG_ORDER_IMPORT_SETTINGS; ?></th></tr>
<tr>
<td class="shopgate_setting" align="right">
<table width="100%" cellspacing="0" cellpadding="4" border="0" class="shopgate_setting">
<tr valign="top" class="<?php echo ($alt == 'shopgate_uneven') ? $alt = 'shopgate_even' : $alt = 'shopgate_uneven' ?>">
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_EXTENDED_CUSTOMER_GROUP; ?></b></td>
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY; ?></b></td>
<td class="<?php echo $tableClass; ?> shopgate_input">
<div>
<select name="_shopgate_config[customers_status_id]">
<?php if (!in_array($shopgateConfig['customers_status_id'], array_keys($sgCustomerGroups))): ?>
<option value="-"></option>
<?php endif; ?>
<?php foreach($sgCustomerGroups as $sgCustomerGroup): ?>
<option value="<?php echo $sgCustomerGroup["customers_status_id"]?>"
<?php echo $shopgateConfig["customers_status_id"]==$sgCustomerGroup["customers_status_id"]?'selected=""':''?>>
<?php echo $sgCustomerGroup["customers_status_name"]?>
</option>
<?php endforeach; ?>
</select>
<input type="radio" <?php echo $shopgateConfig["export_new_products_category"]?'checked=""':''?> value="1" name="_shopgate_config[export_new_products_category]">
<?php echo SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY_ON; ?><br>
<input type="radio" <?php echo !$shopgateConfig["export_new_products_category"]?'checked=""':''?> value="0" name="_shopgate_config[export_new_products_category]">
<?php echo SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY_OFF; ?>
</div>
<div>
<input type="text" value="<?php echo $shopgateConfig["export_new_products_category_id"]?>" name="_shopgate_config[export_new_products_category_id]">
<?php echo SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY_MAX_ID . ":" . $maxCatId ?>
</div>
<?php echo SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY_DESCRIPTION; ?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="shopgate_setting" align="right">
<table width="100%" cellspacing="0" cellpadding="4" border="0" class="shopgate_setting">
<tr valign="top" class="<?php echo ($alt == 'shopgate_uneven') ? $alt = 'shopgate_even' : $alt = 'shopgate_uneven' ?>">
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_EXPORT_OPTIONS_AS_INPUT_FIELD; ?></b></td>
<td class="<?php echo $tableClass; ?> shopgate_input">
<div>
<textarea type="text" name="_shopgate_config[export_option_as_input_field]"><?php echo $shopgateConfig["export_option_as_input_field"] ?></textarea>
</div>
<?php echo SHOPGATE_CONFIG_EXTENDED_CUSTOMER_GROUP_DESCRIPTION; ?>
<?php echo SHOPGATE_CONFIG_EXPORT_OPTIONS_AS_INPUT_FIELD_DESCRIPTION; ?>
</td>
</tr>
</table>
</td>
ca. Zeile 673
<tr>
<td class="shopgate_setting" align="right">
<table width="100%" cellspacing="0" cellpadding="4" border="0" class="shopgate_setting">
<tr valign="top" class="<?php echo ($alt == 'shopgate_uneven') ? $alt = 'shopgate_even' : $alt = 'shopgate_uneven' ?>">
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY; ?></b></td>
<td class="<?php echo $tableClass; ?> shopgate_input">
<div>
<input type="radio" <?php echo $shopgateConfig["export_special_products_category"]?'checked=""':''?> value="1" name="_shopgate_config[export_special_products_category]">
<?php echo SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY_ON; ?><br>
<input type="radio" <?php echo !$shopgateConfig["export_special_products_category"]?'checked=""':''?> value="0" name="_shopgate_config[export_special_products_category]">
<?php echo SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY_OFF; ?>
</div>
<div>
<input type="text" value="<?php echo $shopgateConfig["export_special_products_category_id"]?>" name="_shopgate_config[export_special_products_category_id]">
<?php echo SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY_MAX_ID . ":" . $maxCatId ?>
</div>
<?php echo SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY_DESCRIPTION; ?>
</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2"> </td></tr>
<tr><th colspan="2" style="text-align: left;"><?php echo SHOPGATE_CONFIG_ORDER_IMPORT_SETTINGS; ?></th></tr>
<tr>
<td class="shopgate_setting" align="right">
<table width="100%" cellspacing="0" cellpadding="4" border="0" class="shopgate_setting">
<tr valign="top" class="<?php echo ($alt == 'shopgate_uneven') ? $alt = 'shopgate_even' : $alt = 'shopgate_uneven' ?>">
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_EXTENDED_SHIPPING; ?></b></td>
<td class="<?php echo $tableClass; ?> shopgate_input">
<div>
<select name="_shopgate_config[shipping]">
ca. Zeile 794
<tr valign="top" class="<?php echo ($alt == 'shopgate_uneven') ? $alt = 'shopgate_even' : $alt = 'shopgate_uneven' ?>">
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_CANCELED; ?></b></td>
<td class="<?php echo $tableClass; ?> shopgate_input">
<div>
<select name="_shopgate_config[order_status_cancled]">
<?php if (!in_array($shopgateConfig['order_status_cancled'], array_keys($sgOrderStates)) && $shopgateConfig['customer_price_group'] != '-1'): ?>
<select name="_shopgate_config[order_status_canceled]">
<?php if (!in_array($shopgateConfig['order_status_canceled'], array_keys($sgOrderStates)) && $shopgateConfig['customer_price_group'] != '-1'): ?>
<option value="-"></option>
<?php endif; ?>
<option value="-1"><?php echo SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_CANCELED_NOT_SET; ?></option>
<?php foreach($sgOrderStates as $sgOrderState): ?>
<?php $selected = (
($shopgateConfig['order_status_cancled'] == $sgOrderState['orders_status_id']) &&
($shopgateConfig['order_status_canceled'] == $sgOrderState['orders_status_id']) &&
($shopgateConfig['language'] == $sgOrderState['code']))
? 'selected="selected"'
: ($shopgateConfig['order_status_cancled'] == $sgOrderState['orders_status_id'])
: ($shopgateConfig['order_status_canceled'] == $sgOrderState['orders_status_id'])
? 'selected="selected"'
: '';
?>
<option value="<?php echo $sgOrderState["orders_status_id"]?>" <?php echo $selected; ?>>
ca. Zeile 820
</tr>
</table>
</td>
</tr>
<tr>
<td class="shopgate_setting" align="right">
<table width="100%" cellspacing="0" cellpadding="4" border="0" class="shopgate_setting">
<tr valign="top" class="<?php echo ($alt == 'shopgate_uneven') ? $alt = 'shopgate_even' : $alt = 'shopgate_uneven' ?>">
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_SEND_ORDER_EMAIL; ?></b></td>
<td class="<?php echo $tableClass; ?> shopgate_input<?php echo empty($error['redirect_languages']) ? '' : ' error' ?>">
<div>
<input type="radio" <?php echo $shopgateConfig["send_order_confirmation_mail"] ? 'checked=""' : ''?> value="1" name="_shopgate_config[send_order_confirmation_mail]">
<?php echo SHOPGATE_CONFIG_SEND_ORDER_EMAIL_ON; ?><br>
<input type="radio" <?php echo !$shopgateConfig["send_order_confirmation_mail"] ? 'checked=""' : ''?> value="0" name="_shopgate_config[send_order_confirmation_mail]">
<?php echo SHOPGATE_CONFIG_SEND_ORDER_EMAIL_OFF; ?><br>
</div>
<?php echo SHOPGATE_CONFIG_SEND_ORDER_EMAIL_DESCRIPTION; ?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="shopgate_setting" align="right">
<table width="100%" cellspacing="0" cellpadding="4" border="0" class="shopgate_setting">
<tr valign="top" class="<?php echo ($alt == 'shopgate_uneven') ? $alt = 'shopgate_even' : $alt = 'shopgate_uneven' ?>">
<td width="300" class="<?php echo $tableClass; ?>"><b><?php echo SHOPGATE_CONFIG_PAYMENT_NAME_MAPPING; ?></b></td>
<td class="<?php echo $tableClass; ?> shopgate_input">
<div>
<textarea type="text" name="_shopgate_config[payment_name_mapping]"><?php echo $shopgateConfig["payment_name_mapping"] ?></textarea>
</div>
<?php echo SHOPGATE_CONFIG_PAYMENT_NAME_MAPPING_DESCRIPTION; ?>
<a target="_blank" href="<?php echo SHOPGATE_CONFIG_PAYMENT_NAME_MAPPING_LINK; ?>">
<?php echo SHOPGATE_CONFIG_PAYMENT_NAME_MAPPING_LINK_DESCRIPTION; ?>
</a>
</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2"> </td></tr>
<tr><th colspan="2" style="text-align: left;"><?php echo SHOPGATE_CONFIG_SYSTEM_SETTINGS; ?></th></tr>
<tr>
ca. Zeile 832
<td class="<?php echo $tableClass; ?> shopgate_input">
<div>
<select name="_shopgate_config[encoding]">
<?php foreach ($encodings as $encoding): ?>
<option <?php if ($shopgateConfig['encoding'] == $encoding) echo 'selected="selected"'; ?>>
<option <?php if ($shopgateConfig['encoding'] == $encoding) {echo 'selected="selected"';} ?>>
<?php echo $encoding; ?>
</option>
<?php endforeach; ?>
</select>
ca. Zeile 874
</tr>
</table>
<div class="sg_submit"><input type="submit" value="<?php echo SHOPGATE_CONFIG_SAVE; ?>" onclick="this.blur();" class="button"></div>
</form>
<?php elseif ($_GET["sg_option"] === "merchant"): ?>
<iframe src="<?php echo SHOPGATE_LINK_LOGIN; ?>" style="width: 1000px; min-height: 600px; height: 100%; border: 0;"></iframe>
<?php endif; ?>
</td>
</tr>
</table>
includes/external/shopgate/base/includes/application_top.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
if (!empty($_GET['shopgate_redirect'])) {
$_SESSION['shopgate_redirect'] = 1;
}
includes/external/shopgate/base/includes/header.phpTop ca. Zeile 1
<?php
$shopgateMobileHeader = '';// compatibility to older versions
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
// compatibility to older versions
$shopgateMobileHeader = '';
$shopgateJsHeader = '';
if(defined('MODULE_PAYMENT_INSTALLED') && strpos(MODULE_PAYMENT_INSTALLED, 'shopgate.php') !== false){
include_once DIR_FS_CATALOG.'includes/external/shopgate/shopgate_library/shopgate.php';
include_once DIR_FS_CATALOG.'includes/external/shopgate/base/shopgate_config.php';
if (MODULE_PAYMENT_SHOPGATE_STATUS == 'True') {
include_once DIR_FS_CATALOG
. 'includes/external/shopgate/shopgate_library/shopgate.php';
include_once DIR_FS_CATALOG
. 'includes/external/shopgate/base/shopgate_config.php';
try {
$shopgateCurrentLanguage = isset($_SESSION['language_code']) ? strtolower($_SESSION['language_code']) : 'de';
$shopgateCurrentLanguage = isset($_SESSION['language_code'])
? strtolower($_SESSION['language_code']) : 'de';
$shopgateHeaderConfig = new ShopgateConfigModified();
$shopgateHeaderConfig->loadByLanguage($shopgateCurrentLanguage);
if ($shopgateHeaderConfig->checkUseGlobalFor($shopgateCurrentLanguage)) {
$shopgateRedirectThisLanguage = in_array($shopgateCurrentLanguage, $shopgateHeaderConfig->getRedirectLanguages());
if ($shopgateHeaderConfig->checkUseGlobalFor(
$shopgateCurrentLanguage
)
) {
$shopgateRedirectThisLanguage = in_array(
$shopgateCurrentLanguage,
$shopgateHeaderConfig->getRedirectLanguages()
);
} else {
$shopgateRedirectThisLanguage = true;
}
if ($shopgateRedirectThisLanguage) {
// SEO modules fix (for Commerce:SEO and others): if session variable was set, SEO did a redirect and most likely cut off our GET parameter
// SEO modules fix (for Commerce:SEO and others): if session variable was set,
// SEO did a redirect and most likely cut off our GET parameter
// => reconstruct here, then unset the session variable
if (!empty($_SESSION['shopgate_redirect'])) {
$_GET['shopgate_redirect'] = 1;
unset($_SESSION['shopgate_redirect']);
}
// instantiate and set up redirect class
$shopgateBuilder = new ShopgateBuilder($shopgateHeaderConfig);
$shopgateRedirector = &$shopgateBuilder->buildRedirect();
$shopgateRedirector = $shopgateBuilder->buildRedirect();
##################
# redirect logic #
##################
if (($product instanceof product) && $product->isProduct && !empty($product->pID)) {
$shopgateJsHeader = $shopgateRedirector->buildScriptItem($product->pID);
if (($product instanceof product) && $product->isProduct
&& !empty($product->pID)
) {
$shopgateJsHeader = $shopgateRedirector->buildScriptItem(
$product->pID
);
} elseif (!empty($current_category_id)) {
$shopgateJsHeader = $shopgateRedirector->buildScriptCategory($current_category_id);
$shopgateJsHeader = $shopgateRedirector->buildScriptCategory(
$current_category_id
);
} elseif (shopgateIsHomepage()) {
if (isset($_GET['manufacturers_id']) && $brand = shopgateGetManufactureNameById($_GET['manufacturers_id'])) {
$shopgateJsHeader = $shopgateRedirector->buildScriptBrand($brand);
} else {
$shopgateJsHeader = $shopgateRedirector->buildScriptShop();
}
} elseif (!empty($search_keywords) && is_array($search_keywords)) {
$invalidSearchPattern = array(
'and',
'or',
'(',
')'
);
foreach ($search_keywords as $key => $keyword) {
if (in_array($keyword, $invalidSearchPattern)) {
unset($search_keywords[$key]);
}
}
$shopgateJsHeader = $shopgateRedirector->buildScriptSearch(implode(' ', $search_keywords));
} else {
$shopgateJsHeader = $shopgateRedirector->buildScriptDefault();
}
}
} catch (ShopgateLibraryException $e) { }
} catch (ShopgateLibraryException $e) {
}
}
function shopgateIsHomepage()
{
$scriptName = explode('/', $_SERVER['SCRIPT_NAME']);
$scriptName = end($scriptName);
if ($scriptName != 'index.php') {
return false;
}
return true;
}
/**
* @param int $id
*
* @return string
*/
function shopgateGetManufactureNameById($id)
{
$manufacturers_query = xtDBquery(
"select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$id . "'"
);
$manufacturers = xtc_db_fetch_array($manufacturers_query, true);
if (is_array($manufacturers) && count($manufacturers) == 1) {
return $manufacturers['manufacturers_name'];
}
return false;
}
includes/external/shopgate/base/includes/modules/payment/shopgate.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
include_once DIR_FS_CATALOG.'includes/external/shopgate/base/shopgate_config.php';
include_once DIR_FS_CATALOG . 'includes/external/shopgate/base/includes/modules/payment/ShopgateInstallHelper.php';
class shopgate {
var $code, $title, $description, $enabled;
function shopgate() {
global $order;
class shopgate
{
var $code, $title, $description, $enabled, $sort_order;
function shopgate()
{
$this->code = 'shopgate';
$this->title = MODULE_PAYMENT_SHOPGATE_TEXT_TITLE;
$this->description = MODULE_PAYMENT_SHOPGATE_TEXT_DESCRIPTION;
$this->enabled = false;
$this->enabled = ((MODULE_PAYMENT_SHOPGATE_STATUS == 'True') ? true : false);
$this->sort_order = MODULE_PAYMENT_SHOPGATE_SORT_ORDER;
}
function mobile_payment() {
global $order;
function mobile_payment()
{
$this->code = 'shopgate';
$this->title = MODULE_PAYMENT_SHOPGATE_TEXT_TITLE;
$this->description = MODULE_PAYMENT_SHOPGATE_TEXT_DESCRIPTION;
$this->enabled = false;
$this->sort_order = MODULE_PAYMENT_SHOPGATE_SORT_ORDER;
}
function update_status() {
function update_status()
{
}
function javascript_validation() {
function javascript_validation()
{
return false;
}
function selection() {
function selection()
{
return array ('id' => $this->code, 'module' => $this->title, 'description' => $this->info);
}
function pre_confirmation_check() {
function pre_confirmation_check()
{
return false;
}
function confirmation() {
function confirmation()
{
return array ('title' => MODULE_PAYMENT_SHOPGATE_TEXT_DESCRIPTION);
}
function process_button() {
function process_button()
{
return false;
}
function before_process() {
function before_process()
{
return false;
}
function after_process() {
function after_process()
{
global $insert_id;
if ($this->order_status){
xtc_db_query("UPDATE ".TABLE_ORDERS." SET orders_status='".$this->order_status."' WHERE orders_id='".$insert_id."'");
xtc_db_query(
"UPDATE " . TABLE_ORDERS . " SET orders_status='" . $this->order_status . "' WHERE orders_id='"
. $insert_id . "'"
);
}
}
function get_error() {
function get_error()
{
return false;
}
function check() {
function check()
{
if (!isset ($this->_check)) {
$check_query = xtc_db_query("select configuration_value from ".TABLE_CONFIGURATION." where configuration_key = 'MODULE_PAYMENT_SHOPGATE_STATUS'");
$check_query = xtc_db_query(
"select configuration_value from " . TABLE_CONFIGURATION
. " where configuration_key = 'MODULE_PAYMENT_SHOPGATE_STATUS'"
);
$this->_check = xtc_db_num_rows($check_query);
}
return $this->_check;
return $this->_check ? true : false;
}
/**
* install the module
ca. Zeile 77
* MODULE_PAYMENT_SHOPGATE_STATUS - The state of the module ( true / false )
* MODULE_PAYMENT_SHOPGATE_ALLOWED - Is the module allowed on frontend
* MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID - (DEPRECATED) keep it for old installations
*/
function install() {
if(!defined('TABLE_ORDERS_SHOPGATE_ORDER'))define('TABLE_ORDERS_SHOPGATE_ORDER', 'orders_shopgate_order');
xtc_db_query("insert into ".TABLE_CONFIGURATION." ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_SHOPGATE_STATUS', 'True', '6', '0', now())");
xtc_db_query("insert into ".TABLE_CONFIGURATION." ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_SHOPGATE_ALLOWED', '0', '6', '0', now())");
function install()
{
xtc_db_query(
"delete from " . TABLE_CONFIGURATION
. " where configuration_key in ('MODULE_PAYMENT_SHOPGATE_STATUS', 'MODULE_PAYMENT_SHOPGATE_ALLOWED', 'MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID')"
);
xtc_db_query(
"insert into " . TABLE_CONFIGURATION
. " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_PAYMENT_SHOPGATE_STATUS', 'True', '6', '1', 'xtc_cfg_select_option(array(\'True\', \'False\'), ', now())"
);
xtc_db_query(
"insert into " . TABLE_CONFIGURATION
. " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_SHOPGATE_ALLOWED', '0', '6', '1', now())"
);
xtc_db_query(
"insert into " . TABLE_CONFIGURATION
. " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_SHOPGATE_SORT_ORDER', '0', '6', '1', now())"
);
$result = xtc_db_query(
'select configuration_key,configuration_value from configuration as c where c.configuration_key = "'
. ShopgateInstallHelper::SHOPGATE_DATABASE_CONFIG_KEY . '"'
);
$row = xtc_db_fetch_array($result);
if (empty($row)) {
xtc_db_query(
"insert into " . TABLE_CONFIGURATION
. " ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_SHOPGATE_IDENT' , '0', '6', '"
. $this->sort_order . "', now())"
);
}
$this->installTable();
$this->updateDatabase();
$this->grantAdminAccess();
$installHelper = new ShopgateInstallHelper();
$installHelper->sendData();
}
/**
* remove the shopgate module
*/
function remove() {
function remove()
{
// MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID - Keep this on removing for old installation
xtc_db_query("delete from ".TABLE_CONFIGURATION." where configuration_key in ('MODULE_PAYMENT_SHOPGATE_STATUS', 'MODULE_PAYMENT_SHOPGATE_ALLOWED', 'MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID')");
if( !$this->checkColumn("shopgate", TABLE_ADMIN_ACCESS) ) {
xtc_db_query("alter table ".TABLE_ADMIN_ACCESS." DROP COLUMN shopgate");
}
xtc_db_query(
"delete from " . TABLE_CONFIGURATION
. " where configuration_key in ('MODULE_PAYMENT_SHOPGATE_STATUS', 'MODULE_PAYMENT_SHOPGATE_ALLOWED', 'MODULE_PAYMENT_SHOPGATE_SORT_ORDER', 'MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID')"
);
}
/**
* Keep the array empty to disable all configuration options
*
* @return multitype:
*/
function keys() {
return array ( );
function keys()
{
return array('MODULE_PAYMENT_SHOPGATE_STATUS', 'MODULE_PAYMENT_SHOPGATE_SORT_ORDER');
}
/**
* set grant access to shopgate configuration
* to the current user and main administrator
*/
private function grantAdminAccess() {
private function grantAdminAccess()
{
if( $this->checkColumn("shopgate", TABLE_ADMIN_ACCESS) ) {
// Create column shopgate in admin_access...
xtc_db_query("alter table ".TABLE_ADMIN_ACCESS." ADD shopgate INT( 1 ) NOT NULL");
// ... grant access to to shopgate for main administrator
xtc_db_query("update ".TABLE_ADMIN_ACCESS." SET shopgate=1 where customers_id=1 LIMIT 1");
if( $_SESSION['customer_id'] !=1 ) {
if (!empty($_SESSION['customer_id']) && $_SESSION['customer_id'] != 1) {
// grant access also to current user
xtc_db_query("update ".TABLE_ADMIN_ACCESS." SET shopgate = 1 where customers_id=".$_SESSION['customer_id']." LIMIT 1");
xtc_db_query(
"update " . TABLE_ADMIN_ACCESS . " SET shopgate = 1 where customers_id='" . $_SESSION['customer_id']
. "' LIMIT 1"
);
}
xtc_db_query("update ".TABLE_ADMIN_ACCESS." SET shopgate = 5 where customers_id = 'groups'");
}
ca. Zeile 133
/**
* Install the shopgate order table
*/
private function installTable() {
xtc_db_query("
private function installTable()
{
xtc_db_query(
"
CREATE TABLE IF NOT EXISTS `".TABLE_ORDERS_SHOPGATE_ORDER."` (
`shopgate_order_id` INT(11) NOT NULL AUTO_INCREMENT,
`orders_id` INT(11) NOT NULL,
`shopgate_order_number` BIGINT(20) NOT NULL,
`shopgate_shop_number` BIGINT(20) UNSIGNED DEFAULT NULL,
`is_paid` tinyint(1) UNSIGNED DEFAULT NULL,
`is_shipping_blocked` tinyint(1) UNSIGNED DEFAULT NULL,
`payment_infos` TEXT NULL,
`is_sent_to_shopgate` tinyint(1) UNSIGNED DEFAULT NULL,
`is_cancellation_sent_to_shopgate` tinyint(1) UNSIGNED DEFAULT NULL,
`modified` datetime DEFAULT NULL,
`created` datetime DEFAULT NULL,
PRIMARY KEY (`shopgate_order_id`)
) ENGINE=MyISAM; ");
) ENGINE=MyISAM; "
);
xtc_db_query(
"
CREATE TABLE IF NOT EXISTS `" . TABLE_CUSTOMERS_SHOPGATE_CUSTOMER . "` (
`shopgate_customer_id` INT(11) NOT NULL AUTO_INCREMENT,
`customer_id` INT(11) NOT NULL,
`customer_token` VARCHAR(255) NULL,
`modified` TIMESTAMP NULL DEFAULT NULL,
`created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`shopgate_customer_id`)
) ENGINE=MyISAM;
"
);
}
/**
* update existing database
*/
private function updateDatabase() {
if( $this->checkColumn("is_paid") ) {
$qry = "ALTER TABLE `".TABLE_ORDERS_SHOPGATE_ORDER."` ADD `is_paid` TINYINT( 1 ) UNSIGNED NULL AFTER `shopgate_order_number`";
private function updateDatabase()
{
if ($this->checkColumn('shopgate_shop_number')) {
$qry = 'ALTER TABLE `' . TABLE_ORDERS_SHOPGATE_ORDER
. '` ADD `shopgate_shop_number` BIGINT(20) UNSIGNED NULL AFTER `shopgate_order_number`;';
xtc_db_query($qry);
}
if( $this->checkColumn("is_shipping_blocked") ) {
$qry = "ALTER TABLE `".TABLE_ORDERS_SHOPGATE_ORDER."` ADD `is_shipping_blocked` TINYINT( 1 ) UNSIGNED NULL AFTER `is_paid`";
if ($this->checkColumn('is_paid')) {
$qry = 'ALTER TABLE `' . TABLE_ORDERS_SHOPGATE_ORDER
. '` ADD `is_paid` TINYINT(1) UNSIGNED NULL AFTER `shopgate_shop_number`;';
xtc_db_query($qry);
}
if( $this->checkColumn("payment_infos") ) {
$qry = "ALTER TABLE `".TABLE_ORDERS_SHOPGATE_ORDER."` ADD `payment_infos` TEXT NULL AFTER `is_shipping_blocked`";
if ($this->checkColumn('is_shipping_blocked')) {
$qry = 'ALTER TABLE `' . TABLE_ORDERS_SHOPGATE_ORDER
. '` ADD `is_shipping_blocked` TINYINT(1) UNSIGNED NULL AFTER `is_paid`;';
xtc_db_query($qry);
}
if( $this->checkColumn("is_sent_to_shopgate") ) {
$qry = "ALTER TABLE `".TABLE_ORDERS_SHOPGATE_ORDER."` ADD `is_sent_to_shopgate` TINYINT( 1 ) UNSIGNED NULL AFTER `payment_infos`";
if ($this->checkColumn('payment_infos')) {
$qry = 'ALTER TABLE `' . TABLE_ORDERS_SHOPGATE_ORDER
. '` ADD `payment_infos` TEXT NULL AFTER `is_shipping_blocked`;';
xtc_db_query($qry);
}
$languages = xtc_db_query("SELECT `languages_id`, `code` FROM `".TABLE_LANGUAGES."`;");
if ($this->checkColumn('is_sent_to_shopgate')) {
$qry = 'ALTER TABLE `' . TABLE_ORDERS_SHOPGATE_ORDER
. '` ADD `is_sent_to_shopgate` TINYINT(1) UNSIGNED NULL AFTER `payment_infos`;';
xtc_db_query($qry);
}
if ($this->checkColumn('is_cancellation_sent_to_shopgate')) {
$qry = 'ALTER TABLE `' . TABLE_ORDERS_SHOPGATE_ORDER
. '` ADD `is_cancellation_sent_to_shopgate` TINYINT(1) UNSIGNED NULL AFTER `is_sent_to_shopgate`;';
xtc_db_query($qry);
}
if ($this->checkColumn('modified')) {
$qry = 'ALTER TABLE `' . TABLE_ORDERS_SHOPGATE_ORDER
. '` ADD `modified` DATETIME NULL AFTER `is_cancellation_sent_to_shopgate`;';
xtc_db_query($qry);
}
if ($this->checkColumn('created')) {
$qry = 'ALTER TABLE `' . TABLE_ORDERS_SHOPGATE_ORDER . '` ADD `created` DATETIME NULL AFTER `modified`;';
xtc_db_query($qry);
}
$languages = xtc_db_query('SELECT `languages_id`, `code` FROM `' . TABLE_LANGUAGES . '`;');
if (empty($languages)) {
echo MODULE_PAYMENT_SHOPGATE_ERROR_READING_LANGUAGES;
return;
}
// load global configuration
try {
$config = new ShopgateConfigModified();
$config = new ShopgateConfigModified();// load global configuration
$config->loadFile();
} catch (ShopgateLibraryException $e) {
if (!($config instanceof ShopgateConfig)) {
echo MODULE_PAYMENT_SHOPGATE_ERROR_LOADING_CONFIG;
return;
}
}
$languageCodes = array();
$configFieldList = array('language', 'redirect_languages');
while ($language = xtc_db_fetch_array($languages)) {
// collect language codes to enable redirect
$languageCodes[] = $language['code'];
switch ($language['code']) {
case 'de': $statusName = 'Versand blockiert (Shopgate)'; break;
case 'en': $statusName = 'Shipping blocked (Shopgate)'; break;
default: continue 2;
case 'de':
$statusNameNew = 'Versand blockiert (Shopgate)';
$statusNameSearch = '%shopgate%';
break;
case 'en':
$statusNameNew = 'Shipping blocked (Shopgate)';
$statusNameSearch = '%shopgate%';
break;
default:
continue 2;
}
$checkShippingBlocked = xtc_db_fetch_array(xtc_db_query(
$result = xtc_db_query(
"SELECT `orders_status_id`, `orders_status_name` ".
"FROM `".TABLE_ORDERS_STATUS."` ".
"WHERE `orders_status_name` = '".xtc_db_input($statusName)."' ".
"WHERE LOWER(`orders_status_name`) LIKE '" . xtc_db_input($statusNameSearch) . "' " .
"AND `language_id` = ".xtc_db_input($language['languages_id']).";"
));
);
$checkShippingBlocked = xtc_db_fetch_array($result);
if (!empty($checkShippingBlocked)) {
$orderStatusShippingBlockedId = $checkShippingBlocked['orders_status_id'];
} else {
// if no orders_status_id has been determined yet and the status could not be found, create a new one
if (!isset($orderStatusShippingBlockedId)) {
$nextId = xtc_db_fetch_array(xtc_db_query("SELECT max(orders_status_id) AS orders_status_id FROM " . TABLE_ORDERS_STATUS));
$result =
xtc_db_query("SELECT max(orders_status_id) AS orders_status_id FROM " . TABLE_ORDERS_STATUS);
$nextId = xtc_db_fetch_array($result);
$orderStatusShippingBlockedId = $nextId['orders_status_id'] + 1;
}
// insert the status into the database
xtc_db_query(
"INSERT INTO `".TABLE_ORDERS_STATUS."` ".
"(`orders_status_id`, `language_id`, `orders_status_name`) VALUES ".
"(".xtc_db_input($orderStatusShippingBlockedId).", ".xtc_db_input($language['languages_id']).", '".xtc_db_input($statusName)."');"
"(" . xtc_db_input($orderStatusShippingBlockedId) . ", " . xtc_db_input($language['languages_id'])
. ", '" . xtc_db_input($statusNameNew) . "');"
);
}
// set global order status id
ca. Zeile 233
$configFieldList[] = 'order_status_shipping_blocked';
}
}
// get the actual definition of the plugin version
if (!defined("SHOPGATE_PLUGIN_VERSION")) {
require_once(DIR_FS_CATALOG . 'includes/external/shopgate/plugin.php');
}
// shopgate table version equals to the SHOPGATE_PLUGIN_VERSION, save that version to the config file
$config->setShopgateTableVersion(SHOPGATE_PLUGIN_VERSION);
$configFieldList[] = 'shopgate_table_version';
// save default language, order_status_id and redirect languages in the configuration
try {
$config->setLanguage(DEFAULT_LANGUAGE);
$config->setRedirectLanguages($languageCodes);
ca. Zeile 248
* Check if the column exists in the specified table
*
* @param string $columnName
* @param string $table
*
* @return bool
*/
private function checkColumn($columnName, $table = TABLE_ORDERS_SHOPGATE_ORDER) {
private function checkColumn($columnName, $table = TABLE_ORDERS_SHOPGATE_ORDER)
{
$result = xtc_db_query("show columns from `{$table}`");
$exists = false;
while ($field = xtc_db_fetch_array($result)) {
includes/external/shopgate/base/includes/modules/product_info.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
// load mobile webpage redirect script for products (to override whitespaces put out by xt:Commerce 3 after this)
include_once DIR_FS_CATALOG.'includes/external/shopgate/base/includes/header.php';
includes/external/shopgate/base/lang/english/admin/english.phpTop ca. Zeile 1
<?php
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
### Plugin ###
define('SHOPGATE_CONFIG_EXTENDED_ENCODING', 'Shop system encoding');
define('SHOPGATE_CONFIG_EXTENDED_ENCODING_DESCRIPTION', 'Choose the encoding of your shop system. This is usually "ISO-8859-15" for versions before 1.06.');
define('SHOPGATE_CONFIG_WIKI_LINK', 'http://wiki.shopgate.com/Modified/de');
#define('SHOPGATE_CONFIG_WIKI_LINK', 'http://wiki.shopgate.com/Modified/de'); // Tomcraft- Wird nicht mehr verwendet
### Menu ###
define('BOX_SHOPGATE', 'Shopgate');
define('BOX_SHOPGATE_INFO', 'What is Shopgate');
define('BOX_SHOPGATE_HELP', 'Installation aid');
define('BOX_SHOPGATE_REGISTER', 'Registration');
define('BOX_SHOPGATE_CONFIG', 'Settings');
define('BOX_SHOPGATE_MERCHANT', 'Shopgate login');
### Links ###
define('SHOPGATE_LINK_HOME', 'http://www.shopgate.com');
define('SHOPGATE_LINK_REGISTER', 'http://www.shopgate.com/welcome/shop_register');
define('SHOPGATE_LINK_LOGIN', 'https://www.shopgate.com/users/login/0/2');
define('SHOPGATE_LINK_HOME', 'https://www.shopgate.com/en/?partner=30051');
#define('SHOPGATE_LINK_REGISTER', 'https://www.shopgate.com/en/free-trial/?partner=30051'); // Tomcraft- Wird nicht mehr verwendet
#define('SHOPGATE_LINK_LOGIN', 'https://admin.shopgate.com/us/users/login/0/2/?partner=30051'); // Tomcraft- Wird nicht mehr verwendet
define('SHOPGATE_LINK_WIKI', 'https://support.shopgate.com/hc/en-us/articles/202911763');
### Configuration ###
define('SHOPGATE_CONFIG_TITLE', 'SHOPGATE');
define('SHOPGATE_CONFIG_ERROR', 'ERROR:');
ca. Zeile 32
define('SHOPGATE_CONFIG_SAVE', 'Save');
define('SHOPGATE_CONFIG_GLOBAL_CONFIGURATION', 'Global configuration');
define('SHOPGATE_CONFIG_USE_GLOBAL_CONFIG', 'Use the global configuration for this language.');
define('SHOPGATE_CONFIG_MULTIPLE_SHOPS_BUTTON', 'Setup multiple Shopgate marketplaces');
define('SHOPGATE_CONFIG_LANGUAGE_SELECTION',
'At Shopgate you need a shop for each marketplace restricted to one language and currency. Here you can map the configured languages to your Shopgate shops on different '.
'marketplaces. Choose a language and enter the credentials of your Shopgate shop at the corresponding marketplace. If you do not have a Shopgate shop for a certain language '.
define(
'SHOPGATE_CONFIG_LANGUAGE_SELECTION',
'At Shopgate you need a shop for each marketplace restricted to one language and currency. Here you can map the configured languages to your Shopgate shops on different '
.
'marketplaces. Choose a language and enter the credentials of your Shopgate shop at the corresponding marketplace. If you do not have a Shopgate shop for a certain language '
.
'the global configuration will be used for this one.'
);
### Connection Settings ###
ca. Zeile 57
define('SHOPGATE_CONFIG_ALIAS', 'Shop alias');
define('SHOPGATE_CONFIG_ALIAS_DESCRIPTION', 'You can find the alias at the "Integration" section of your shop.');
define('SHOPGATE_CONFIG_CNAME', 'Custom URL to mobile webpage (CNAME) incl. http://');
define('SHOPGATE_CONFIG_CNAME_DESCRIPTION',
'Enter a custom URL (defined by CNAME) for your mobile website. You can find the URL at the "Integration" section of your shop '.
define(
'SHOPGATE_CONFIG_CNAME_DESCRIPTION',
'Enter a custom URL (defined by CNAME) for your mobile website. You can find the URL at the "Integration" section of your shop '
.
'after you activated this option in the "Settings" => "Mobile website / webapp" section.'
);
define('SHOPGATE_CONFIG_REDIRECT_LANGUAGES', 'Redirected languages');
define('SHOPGATE_CONFIG_REDIRECT_LANGUAGES_DESCRIPTION',
define(
'SHOPGATE_CONFIG_REDIRECT_LANGUAGES_DESCRIPTION',
'Choose the languages that should be redirected to this Shopgate shop. At least one language must be selected. Hold CTRL to select multiple entries.'
);
### Export ###
ca. Zeile 85
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_CATEGORIES_SORT_ORDER', 'Reverse category sort order');
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_CATEGORIES_SORT_ORDER_ON', 'Yes');
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_CATEGORIES_SORT_ORDER_OFF', 'No');
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_CATEGORIES_SORT_ORDER_DESCRIPTION',
'Choose "Yes" if the sort order of the categories in your mobile shop appears upside down.');
define(
'SHOPGATE_CONFIG_EXTENDED_REVERSE_CATEGORIES_SORT_ORDER_DESCRIPTION',
'Choose "Yes" if the sort order of the categories in your mobile shop appears upside down.'
);
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_ITEMS_SORT_ORDER', 'Reverse products sort order');
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_ITEMS_SORT_ORDER_ON', 'Yes');
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_ITEMS_SORT_ORDER_OFF', 'No');
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_ITEMS_SORT_ORDER_DESCRIPTION',
'Choose "Yes" if the sort order of the products in your mobile shop appears upside down.');
define(
'SHOPGATE_CONFIG_EXTENDED_REVERSE_ITEMS_SORT_ORDER_DESCRIPTION',
'Choose "Yes" if the sort order of the products in your mobile shop appears upside down.'
);
define('SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION', 'Products description');
define('SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_DESC_ONLY', 'Description only');
define('SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_SHORTDESC_ONLY', 'Short description only');
define('SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_DESC_SHORTDESC', 'Description and short description');
define('SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_SHORTDESC_DESC', 'Short description and description');
define('SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_DESCRIPTION', 'Please select the method to be used to build descriptions for the mobile shop.');
define('SHOPGATE_CONFIG_EXTENDED_CUSTOMER_PRICE_GROUP', 'Price group for Shopgate');
define('SHOPGATE_CONFIG_EXTENDED_CUSTOMER_PRICE_GROUP_DESCRIPTION', 'Choose the valid price group for Shopgate (the customer group of which the price information is taken for the products export).');
define('SHOPGATE_CONFIG_EXTENDED_CUSTOMER_PRICE_GROUP_OFF', '-- Deactivated --');
define('SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY', 'Export the "New" category');
define('SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY_DESCRIPTION', 'This shopsystem allows you to show all new products in an virtual category. With this option it is possible to export the new products in an real category. Therefore you can use the input field to change the category id.');
define('SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY_ON', 'Yes');
define('SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY_OFF', 'No');
define('SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY_MAX_ID', 'Currently highest categorie-Id in the shopsystem');
define('SHOPGATE_CONFIG_EXPORT_OPTIONS_AS_INPUT_FIELD', 'Product options to be exported as input fields');
define('SHOPGATE_CONFIG_EXPORT_OPTIONS_AS_INPUT_FIELD_DESCRIPTION', 'Add the option IDs (see "Product Options") that should be exported as input fields. Example: 1,2,3');
define('SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY', 'Export the "Special" category');
define('SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY_DESCRIPTION', 'This shopsystem allows you to show all special products in an virtual category. With this option it is possible to export the new products in an real category. Therefore you can use the input field to change the category id.');
define('SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY_ON', 'Yes');
define('SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY_OFF', 'No');
define('SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY_MAX_ID', 'Currently highest categorie-Id in the shopsystem');
define('SHOPGATE_PLUGIN_FIELD_AVAILABLE_TEXT_AVAILABLE_ON_DATE', 'Available on #DATE#');
### Orders Import ###
define('SHOPGATE_CONFIG_ORDER_IMPORT_SETTINGS', 'Importing Orders');
define('SHOPGATE_ORDER_CUSTOM_FIELD', 'Custom field(s) of this Shopgate order:');
define('SHOPGATE_CONFIG_EXTENDED_CUSTOMER_GROUP', 'Customer group');
define('SHOPGATE_CONFIG_EXTENDED_CUSTOMER_GROUP_DESCRIPTION', 'Choose the Shopgate customer group (the customer group that all guest customers will be set to on importing orders).');
ca. Zeile 121
define('SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_CANCELED', 'Cancelled');
define('SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_CANCELED_NOT_SET', '- Status not set -');
define('SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_CANCELED_DESCRIPTION', 'Choose the status for orders that have been cancelled.');
define('SHOPGATE_CONFIG_SEND_ORDER_EMAIL', 'Confirmation Mail');
define('SHOPGATE_CONFIG_SEND_ORDER_EMAIL_ON', 'Yes');
define('SHOPGATE_CONFIG_SEND_ORDER_EMAIL_OFF', 'No');
define('SHOPGATE_CONFIG_SEND_ORDER_EMAIL_DESCRIPTION', 'After an shopgate order has been successfully completed, an confirmation mail will be send to the customer.if the product(s) were downloadble the download link is included in this mail.');
define('SHOPGATE_CONFIG_PAYMENT_NAME_MAPPING', 'Display names for payment methods');
define('SHOPGATE_CONFIG_PAYMENT_NAME_MAPPING_DESCRIPTION', "Individual names for payment methods, which are used on order import. Defined by '=' and separated by ';'.<br/>(Example: PREPAY=Prepay;SHOPGATE=Handled by Shopgate)<br/>");
define('SHOPGATE_CONFIG_PAYMENT_NAME_MAPPING_LINK', 'https://support.shopgate.com/hc/en-us/articles/202911763-Connecting-to-modified-eCommerce#4.4');
define('SHOPGATE_CONFIG_PAYMENT_NAME_MAPPING_LINK_DESCRIPTION', "Link to the support page");
### System Settings ###
define('SHOPGATE_CONFIG_SYSTEM_SETTINGS', 'System Settings');
define('SHOPGATE_CONFIG_SERVER_TYPE', 'Shopgate server');
includes/external/shopgate/base/lang/english/modules/payment/shopgate.phpTop ca. Zeile 1
<?php
//
//
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
define('MODULE_PAYMENT_SHOPGATE_TEXT_TITLE', 'Shopgate');
define('MODULE_PAYMENT_SHOPGATE_TEXT_DESCRIPTION', 'Shopgate - Mobile Shopping.');
define('MODULE_PAYMENT_SHOPGATE_TEXT_INFO','Orders are already paid at Shopgate.');
define('MODULE_PAYMENT_SHOPGATE_ORDER_LINE_TEXT_SHIPPING', 'Shipping');
define('MODULE_PAYMENT_SHOPGATE_ORDER_LINE_TEXT_SUBTOTAL', 'Subtotal');
define('MODULE_PAYMENT_SHOPGATE_ORDER_LINE_TEXT_PAYMENTFEE', 'Payment Fees');
define('MODULE_PAYMENT_SHOPGATE_ORDER_LINE_TEXT_TOTAL', 'Total');
define('MODULE_PAYMENT_SHOPGATE_TEXT_EMAIL_FOOTER', "");
define('MODULE_PAYMENT_SHOPGATE_STATUS_TITLE' , 'Shopgate payment module activated:');
define('MODULE_PAYMENT_SHOPGATE_STATUS_DESC' , '');
define('MODULE_PAYMENT_SHOPGATE_ALLOWED_TITLE' , '');
define('MODULE_PAYMENT_SHOPGATE_ALLOWED_DESC' , '');
define('MODULE_PAYMENT_SHOPGATE_PAYTO_TITLE' , '');
define('MODULE_PAYMENT_SHOPGATE_PAYTO_DESC' , '');
define('MODULE_PAYMENT_SHOPGATE_SORT_ORDER_TITLE' , '');
define('MODULE_PAYMENT_SHOPGATE_SORT_ORDER_DESC' , '');
define('MODULE_PAYMENT_SHOPGATE_SORT_ORDER_TITLE', 'Sort order of display');
define('MODULE_PAYMENT_SHOPGATE_SORT_ORDER_DESC', 'Sort order of display. Lowest is displayed first.');
define('MODULE_PAYMENT_SHOPGATE_ZONE_TITLE' , '');
define('MODULE_PAYMENT_SHOPGATE_ZONE_DESC' , '');
define('MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID_TITLE' , 'Status');
define('MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID_DESC' , 'Set status of orders imported by this module to:');
define('MODULE_PAYMENT_SHOPGATE_ERROR_READING_LANGUAGES', 'Error configuring language settings.');
define('MODULE_PAYMENT_SHOPGATE_ERROR_LOADING_CONFIG', 'Error loading configuration.');
define('MODULE_PAYMENT_SHOPGATE_ERROR_SAVING_CONFIG',
define(
'MODULE_PAYMENT_SHOPGATE_ERROR_SAVING_CONFIG',
'Error saving configuration. '.
'Please check the permissions (777) for the folder '.
'"/shopgate_library/config" of the Shopgate plugin.'
);
define("MODULE_PAYMENT_SHOPGATE_LABEL_NEW_PRODUCTS", "New products");
define("MODULE_PAYMENT_SHOPGATE_LABEL_SPECIAL_PRODUCTS", "Special products");
define('SHOPGATE_ORDER_CUSTOM_FIELD', 'Custom field(s) of this Shopgate order:');
define("SHOPGATE_COUPON_ERROR_NEED_ACCOUNT", "You need do be logged in to use this coupon");
define("SHOPGATE_COUPON_ERROR_RESTRICTED_PRODUCTS", "This coupon is restricted to special products");
define("SHOPGATE_COUPON_ERROR_RESTRICTED_CATEGORIES", "This coupon is restricted to special categories");
define("SHOPGATE_COUPON_ERROR_MINIMUM_ORDER_AMOUNT_NOT_REACHED", "This coupon has a minimum order amount which has not been reached");
includes/external/shopgate/base/lang/german/admin/german.phpTop ca. Zeile 1
<?php
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
### Plugin ###
define('SHOPGATE_CONFIG_EXTENDED_ENCODING', 'Encoding des Shopsystems');
define('SHOPGATE_CONFIG_EXTENDED_ENCODING_DESCRIPTION',
'Wählen Sie das Encoding Ihres Shopsystems. Üblicherweise ist für Versionen vor 1.06 "ISO-8859-15" zu wählen.');
define('SHOPGATE_CONFIG_WIKI_LINK', 'http://wiki.shopgate.com/Modified/de');
define('SHOPGATE_CONFIG_EXTENDED_ENCODING_DESCRIPTION', 'Wählen Sie das Encoding Ihres Shopsystems. Üblicherweise ist für Versionen vor 1.06 "ISO-8859-15" zu wählen.');
#define('SHOPGATE_CONFIG_WIKI_LINK', 'http://wiki.shopgate.com/Modified/de'); // Tomcraft- Wird nicht mehr verwendet
### Menu ###
define('BOX_SHOPGATE', 'Shopgate');
define('BOX_SHOPGATE_INFO', 'Was ist Shopgate');
define('BOX_SHOPGATE_HELP', 'Installationshilfe');
define('BOX_SHOPGATE_REGISTER', 'Registrierung');
define('BOX_SHOPGATE_CONFIG', 'Einstellungen');
define('BOX_SHOPGATE_MERCHANT', 'Shopgate-Login');
### Links ###
define('SHOPGATE_LINK_HOME', 'http://www.shopgate.com');
define('SHOPGATE_LINK_REGISTER', 'https://www.shopgate.com/welcome/shop_register');
define('SHOPGATE_LINK_LOGIN', 'https://www.shopgate.com/users/login/0/2');
define('SHOPGATE_LINK_HOME', 'https://www.shopgate.com/de/?partner=30051');
#define('SHOPGATE_LINK_REGISTER', 'https://www.shopgate.com/de/registrierung/?partner=30051'); // Tomcraft- Wird nicht mehr verwendet
#define('SHOPGATE_LINK_LOGIN', 'https://admin.shopgate.com/de/users/login/0/2/?partner=30051'); // Tomcraft- Wird nicht mehr verwendet
define('SHOPGATE_LINK_WIKI', 'https://support.shopgate.com/hc/de/articles/202911763');
### Konfiguration ###
define('SHOPGATE_CONFIG_TITLE', 'SHOPGATE');
define('SHOPGATE_CONFIG_ERROR', 'FEHLER:');
ca. Zeile 33
define('SHOPGATE_CONFIG_SAVE', 'Speichern');
define('SHOPGATE_CONFIG_GLOBAL_CONFIGURATION', 'Globale Konfiguration');
define('SHOPGATE_CONFIG_USE_GLOBAL_CONFIG', 'Für diese Sprache die globale Konfiguration nutzen.');
define('SHOPGATE_CONFIG_MULTIPLE_SHOPS_BUTTON', 'Mehrere Shopgate-Marktplätze einrichten');
define('SHOPGATE_CONFIG_LANGUAGE_SELECTION',
'Bei Shopgate benötigen Sie pro Marktplatz einen Shop, der auf eine Sprache und eine Währung festgelegt ist. Hier haben Sie die Möglichkeit, Ihre konfigurierten '.
'Sprachen mit Ihren Shopgate-Shops auf unterschiedlichen Marktplätzen zu verbinden. Wählen Sie eine Sprache und tragen Sie die Zugangsdaten zu Ihrem Shopgate-Shop auf '.
define(
'SHOPGATE_CONFIG_LANGUAGE_SELECTION',
'Bei Shopgate benötigen Sie pro Marktplatz einen Shop, der auf eine Sprache und eine Währung festgelegt ist. Hier haben Sie die Möglichkeit, Ihre konfigurierten '
.
'Sprachen mit Ihren Shopgate-Shops auf unterschiedlichen Marktplätzen zu verbinden. Wählen Sie eine Sprache und tragen Sie die Zugangsdaten zu Ihrem Shopgate-Shop auf '
.
'dem entsprechenden Marktplatz ein. Wenn Sie für eine Sprache keinen eigenen Shop bei Shopgate haben, wird dafür die "Globale Konfiguration" genutzt.'
);
### Verbindungseinstellungen ###
ca. Zeile 58
define('SHOPGATE_CONFIG_ALIAS', 'Shop-Alias');
define('SHOPGATE_CONFIG_ALIAS_DESCRIPTION', 'Tragen Sie hier den Alias Ihres Shops ein. Sie finden diese im Tab "Integration" Ihres Shops.');
define('SHOPGATE_CONFIG_CNAME', 'Eigene URL zur mobilen Webseite (mit http://)');
define('SHOPGATE_CONFIG_CNAME_DESCRIPTION',
'Tragen Sie hier eine eigene (per CNAME definierte) URL zur mobilen Webseite Ihres Shops ein. Sie finden die URL im Tab "Integration" Ihres Shops, '.
define(
'SHOPGATE_CONFIG_CNAME_DESCRIPTION',
'Tragen Sie hier eine eigene (per CNAME definierte) URL zur mobilen Webseite Ihres Shops ein. Sie finden die URL im Tab "Integration" Ihres Shops, '
.
'nachdem Sie diese Option unter "Einstellungen" => "Mobile Webseite / Webapp" aktiviert haben.'
);
define('SHOPGATE_CONFIG_REDIRECT_LANGUAGES', 'Weitergeleitete Sprachen');
define('SHOPGATE_CONFIG_REDIRECT_LANGUAGES_DESCRIPTION',
define(
'SHOPGATE_CONFIG_REDIRECT_LANGUAGES_DESCRIPTION',
'Wählen Sie die Sprachen aus, die auf diesen Shopgate-Shop weitergeleitet werden sollen. Es muss mindestens '.
'eine Sprache ausgewählt werden. Halten Sie STRG gedrückt, um mehrere Einträge zu wählen.'
);
ca. Zeile 87
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_CATEGORIES_SORT_ORDER', 'Kategorie-Reihenfolge umkehren');
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_CATEGORIES_SORT_ORDER_ON', 'Ja');
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_CATEGORIES_SORT_ORDER_OFF', 'Nein');
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_CATEGORIES_SORT_ORDER_DESCRIPTION',
'Wählen Sie hier "Ja" aus, wenn die Sortierung Ihrer Kategorien in Ihrem mobilen Shop genau falsch herum ist.');
define(
'SHOPGATE_CONFIG_EXTENDED_REVERSE_CATEGORIES_SORT_ORDER_DESCRIPTION',
'Wählen Sie hier "Ja" aus, wenn die Sortierung Ihrer Kategorien in Ihrem mobilen Shop genau falsch herum ist.'
);
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_ITEMS_SORT_ORDER', 'Produkt-Reihenfolge umkehren');
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_ITEMS_SORT_ORDER_ON', 'Ja');
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_ITEMS_SORT_ORDER_OFF', 'Nein');
define('SHOPGATE_CONFIG_EXTENDED_REVERSE_ITEMS_SORT_ORDER_DESCRIPTION',
'Wählen Sie hier "Ja" aus, wenn die Sortierung Ihrer Produkte in Ihrem mobilen Shop genau falsch herum ist.');
define(
'SHOPGATE_CONFIG_EXTENDED_REVERSE_ITEMS_SORT_ORDER_DESCRIPTION',
'Wählen Sie hier "Ja" aus, wenn die Sortierung Ihrer Produkte in Ihrem mobilen Shop genau falsch herum ist.'
);
define('SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION', 'Produktbeschreibung');
define('SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_DESC_ONLY', 'Nur Beschreibung');
define('SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_SHORTDESC_ONLY', 'Nur Kurzbeschreibung');
define('SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_DESC_SHORTDESC', 'Beschreibung + Kurzbeschreibung');
define('SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_SHORTDESC_DESC', 'Kurzbeschreibung + Beschreibung');
define('SHOPGATE_CONFIG_EXTENDED_PRODUCTSDESCRIPTION_DESCRIPTION', 'Wählen Sie hier aus, wie die Produktbeschreibung im mobilen Shop zusammengesetzt sein soll.');
define('SHOPGATE_CONFIG_EXTENDED_CUSTOMER_PRICE_GROUP', 'Preisgruppe für Shopgate');
define('SHOPGATE_CONFIG_EXTENDED_CUSTOMER_PRICE_GROUP_DESCRIPTION', 'Wählen Sie die Preisgruppe, die für Shopgate gilt (bzw. die Kundengruppe, aus welcher die Preisinformationen beim Produktexport verwendet werden).');
define('SHOPGATE_CONFIG_EXTENDED_CUSTOMER_PRICE_GROUP_OFF', '-- Deaktiviert --');
define('SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY', 'Export der "Neu" Kategorie');
define('SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY_DESCRIPTION', 'Dieses Shopsystem bietet die Möglichekeit eine virtuelle Kategorie für neue Produkte anzulegen. Diese kann mit Hilfe dieser Option als Kategorie exportiert werden. Weiterhin ist es möglich, im Eingabefeld, eine einzigartige ID für diese Kategorie festzulegen.');
define('SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY_ON', 'Ja');
define('SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY_OFF', 'Nein');
define('SHOPGATE_CONFIG_EXPORT_NEW_PRODUCTS_CATEGORY_MAX_ID', 'Aktuell höchste Kategorie Id ihres Shopsystems');
define('SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY', 'Export der "Spezial" Kategorie');
define('SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY_DESCRIPTION', 'Dieses Shopsystem bietet die Möglichekeit eine virtuelle Kategorie für Spezial-Produkte anzulegen. Diese kann mit Hilfe dieser Option als Kategorie exportiert werden. Weiterhin ist es möglich, im Eingabefeld, eine einzigartige ID für diese Kategorie festzulegen.');
define('SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY_ON', 'Ja');
define('SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY_OFF', 'Nein');
define('SHOPGATE_CONFIG_EXPORT_SPECIAL_PRODUCTS_CATEGORY_MAX_ID', 'Aktuell höchste Kategorie Id ihres Shopsystems');
define('SHOPGATE_CONFIG_EXPORT_OPTIONS_AS_INPUT_FIELD', 'Export von Produkoptionen als Eingabefelder');
define('SHOPGATE_CONFIG_EXPORT_OPTIONS_AS_INPUT_FIELD_DESCRIPTION', 'Die IDs der Produktoptionen (siehe "Artikelmerkmale"), die als Eingabefelder exportiert werden müssen. Beispiel: 1,2,3');
define('SHOPGATE_PLUGIN_FIELD_AVAILABLE_TEXT_AVAILABLE_ON_DATE', 'Verfügbar ab dem #DATE#');
### Bestellungsimport ###
define('SHOPGATE_CONFIG_ORDER_IMPORT_SETTINGS', 'Bestellungsimport');
define('SHOPGATE_ORDER_CUSTOM_FIELD', 'Benutzerdefinierte Eingabefelder zu einer Shopgate Bestellung:');
define('SHOPGATE_CONFIG_EXTENDED_CUSTOMER_GROUP', 'Kundengruppe');
define('SHOPGATE_CONFIG_EXTENDED_CUSTOMER_GROUP_DESCRIPTION', 'Wählen Sie die Gruppe für Shopgate-Kunden (die Kundengruppe, unter welcher alle Gastkunden von Shopgate beim Bestellungsimport eingerichtet werden).');
ca. Zeile 111
define('SHOPGATE_CONFIG_EXTENDED_SHIPPING_DESCRIPTION', 'Wählen Sie die Versandart für den Bestellungsimport. Diese wird für die Ausweisung der Steuern der Versandkosten genutzt, sofern eine Steuerklasse für die Versandart ausgewählt ist.');
define('SHOPGATE_CONFIG_EXTENDED_SHIPPING_NO_SELECTION', '-- keine Auswahl --');
define('SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_SHIPPING_APPROVED', 'Versand nicht blockiert');
define('SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_SHIPPING_APPROVED_DESCRIPTION',
define(
'SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_SHIPPING_APPROVED_DESCRIPTION',
'Wählen Sie den Status für Bestellungen, deren Versand bei Shopgate nicht blockiert ist.'
);
define('SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_SHIPPING_BLOCKED', 'Versand blockiert');
define('SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_SHIPPING_BLOCKED_DESCRIPTION',
define(
'SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_SHIPPING_BLOCKED_DESCRIPTION',
'Wählen Sie den Status für Bestellungen, deren Versand bei Shopgate blockiert ist.'
);
define('SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_SENT', 'Versendet');
ca. Zeile 127
define('SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_CANCELED', 'Storniert');
define('SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_CANCELED_NOT_SET', '- Status nicht ausgewählt -');
define('SHOPGATE_CONFIG_EXTENDED_STATUS_ORDER_CANCELED_DESCRIPTION', 'Wählen Sie den Status für stornierte Bestellungen.');
define('SHOPGATE_CONFIG_SEND_ORDER_EMAIL', 'Bestätigunsemail');
define('SHOPGATE_CONFIG_SEND_ORDER_EMAIL_ON', 'Ja');
define('SHOPGATE_CONFIG_SEND_ORDER_EMAIL_OFF', 'Nein');
define('SHOPGATE_CONFIG_SEND_ORDER_EMAIL_DESCRIPTION', 'Nachdem eine Bestellung über Shopgate abgeschlossen wurde, bekommt der Kunde eine Bestätigungsmail. Sollte der Shop Produkte zum Kauf anbieten, welche Heruntergeladen werden können, enthält diese Mail den Downloadlink');
define('SHOPGATE_CONFIG_PAYMENT_NAME_MAPPING', 'Anzeigenamen für Zahlungsweisen');
define('SHOPGATE_CONFIG_PAYMENT_NAME_MAPPING_DESCRIPTION', "Individuelle Namen für Zahlungsweisen, die beim Bestellungsimport verwendet werden. Definiert durch '=' und getrennt durch ';'.<br/>(Beispiel: PREPAY=Vorkasse;SHOPGATE=Abwicklung durch Shopgate)<br/>");
define('SHOPGATE_CONFIG_PAYMENT_NAME_MAPPING_LINK', 'https://support.shopgate.com/hc/de/articles/202911763-Anbindung-an-modified-eCommerce#4.4');
define('SHOPGATE_CONFIG_PAYMENT_NAME_MAPPING_LINK_DESCRIPTION', "Link zur Anleitung");
### Systemeinstellungen ###
define('SHOPGATE_CONFIG_SYSTEM_SETTINGS', 'Systemeinstellungen');
define('SHOPGATE_CONFIG_SERVER_TYPE', 'Shopgate Server');
includes/external/shopgate/base/lang/german/modules/payment/shopgate.phpTop ca. Zeile 1
<?php
//
//
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
define('MODULE_PAYMENT_SHOPGATE_TEXT_TITLE', 'Shopgate');
define('MODULE_PAYMENT_SHOPGATE_TEXT_DESCRIPTION', 'Shopgate - Mobile Shopping.');
define('MODULE_PAYMENT_SHOPGATE_TEXT_INFO','Bestellungen sind bereits bei Shopgate bezahlt.');
define('MODULE_PAYMENT_SHOPGATE_ORDER_LINE_TEXT_SHIPPING', 'Versand');
define('MODULE_PAYMENT_SHOPGATE_ORDER_LINE_TEXT_SUBTOTAL', 'Zwischensumme');
define('MODULE_PAYMENT_SHOPGATE_ORDER_LINE_TEXT_PAYMENTFEE', 'Zahlungsartkosten');
define('MODULE_PAYMENT_SHOPGATE_ORDER_LINE_TEXT_TOTAL', 'Summe');
define('MODULE_PAYMENT_SHOPGATE_TEXT_EMAIL_FOOTER', '');
define('MODULE_PAYMENT_SHOPGATE_STATUS_TITLE' , 'Shopgate-Zahlungsmodul aktiviert:');
define('MODULE_PAYMENT_SHOPGATE_STATUS_DESC' , '');
define('MODULE_PAYMENT_SHOPGATE_ALLOWED_TITLE' , '');
define('MODULE_PAYMENT_SHOPGATE_ALLOWED_DESC' , '');
define('MODULE_PAYMENT_SHOPGATE_PAYTO_TITLE' , '');
define('MODULE_PAYMENT_SHOPGATE_PAYTO_DESC' , '');
define('MODULE_PAYMENT_SHOPGATE_SORT_ORDER_TITLE' , '');
define('MODULE_PAYMENT_SHOPGATE_SORT_ORDER_DESC' , '');
define('MODULE_PAYMENT_SHOPGATE_SORT_ORDER_TITLE', 'Anzeigereihenfolge');
define('MODULE_PAYMENT_SHOPGATE_SORT_ORDER_DESC', 'Reihenfolge der Anzeige. Kleinste Ziffer wird zuerst angezeigt.');
define('MODULE_PAYMENT_SHOPGATE_ZONE_TITLE' , '');
define('MODULE_PAYMENT_SHOPGATE_ZONE_DESC' , '');
define('MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID_TITLE' , 'Status');
define('MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID_DESC' , 'Bestellungen, die mit diesem Modul importiert werden, auf diesen Status setzen:');
define('MODULE_PAYMENT_SHOPGATE_ERROR_READING_LANGUAGES', 'Fehler beim Konfigurieren der Spracheinstellungen.');
define('MODULE_PAYMENT_SHOPGATE_ERROR_LOADING_CONFIG', 'Fehler beim Laden der Konfiguration.');
define('MODULE_PAYMENT_SHOPGATE_ERROR_SAVING_CONFIG',
define(
'MODULE_PAYMENT_SHOPGATE_ERROR_SAVING_CONFIG',
'Fehler beim Speichern der Konfiguration. '.
'Bitte überprüfen Sie die Schreibrechte (777) für '.
'den Ordner "/shopgate_library/config/" des Shopgate-Plugins.'
);
define("MODULE_PAYMENT_SHOPGATE_LABEL_NEW_PRODUCTS", "Neue Produkte");
define("MODULE_PAYMENT_SHOPGATE_LABEL_SPECIAL_PRODUCTS", "Spezial Produkte");
define('SHOPGATE_ORDER_CUSTOM_FIELD', 'Benutzerdefinierte Eingabefelder zu einer Shopgate Bestellung:');
define("SHOPGATE_COUPON_ERROR_NEED_ACCOUNT", "Um diesen Gutschein verwenden zu können, müssen Sie angemeldet sein.");
define("SHOPGATE_COUPON_ERROR_RESTRICTED_PRODUCTS", "Dieser Gutschein ist auf bestimmte Produkte beschränkt");
define("SHOPGATE_COUPON_ERROR_RESTRICTED_CATEGORIES", "Dieser Gutschein ist auf bestimmte Kategorien beschränkt");
define("SHOPGATE_COUPON_ERROR_MINIMUM_ORDER_AMOUNT_NOT_REACHED", "Der Mindestbestellwert, um diesen Gutschein nutzen zu können, wurde nicht erreicht");
includes/external/shopgate/base/shopgate_config.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
include_once DIR_FS_CATALOG
. 'includes/external/shopgate/shopgate_library/shopgate.php';
define('SHOPGATE_SETTING_EXPORT_DESCRIPTION', 0);
define('SHOPGATE_SETTING_EXPORT_SHORTDESCRIPTION', 1);
define('SHOPGATE_SETTING_EXPORT_DESCRIPTION_SHORTDESCRIPTION', 2);
define('SHOPGATE_SETTING_EXPORT_SHORTDESCRIPTION_DESCRIPTION', 3);
define('TABLE_ORDERS_SHOPGATE_ORDER', 'orders_shopgate_order');
define('TABLE_CUSTOMERS_SHOPGATE_CUSTOMER', 'customers_shopgate_customer');
include_once DIR_FS_CATALOG.'includes/external/shopgate/shopgate_library/shopgate.php';
class ShopgateConfigModified extends ShopgateConfig
{
class ShopgateConfigModified extends ShopgateConfig {
protected $redirect_languages;
protected $shipping;
protected $tax_zone_id;
protected $customers_status_id;
protected $customer_price_group;
protected $order_status_open;
protected $order_status_shipped;
protected $order_status_shipping_blocked;
protected $order_status_cancled;
protected $order_status_canceled;
protected $payment_name_mapping;
protected $reverse_categories_sort_order;
protected $reverse_items_sort_order;
protected $export_description_type;
protected $shopgate_table_version;
public function startup() {
protected $maximum_category_export_depth;
protected $send_order_confirmation_mail;
protected $export_new_products_category;
protected $export_new_products_category_id;
protected $export_special_products_category;
protected $export_special_products_category_id;
protected $export_option_as_input_field;
public function startup()
{
// overwrite some library defaults
$this->plugin_name = 'Modified';
$this->enable_redirect_keyword_update = 24;
$this->enable_ping = 1;
$this->enable_add_order = 1;
$this->enable_update_order = 1;
$this->enable_get_orders = 0;
$this->enable_get_orders = 1;
$this->enable_get_customer = 1;
$this->enable_get_items_csv = 1;
$this->enable_get_items = 1;
$this->enable_get_categories_csv = 1;
$this->enable_get_categories = 1;
$this->enable_get_reviews_csv = 1;
$this->enable_get_reviews = 1;
$this->enable_get_pages_csv = 0;
$this->enable_get_log_file = 1;
$this->enable_mobile_website = 1;
$this->enable_cron = 1;
$this->enable_clear_log_file = 1;
$this->enable_clear_cache = 1;
$this->enable_get_settings = 1;
$this->enable_check_cart = 1;
$this->enable_check_stock = 1;
$this->enable_register_customer = 1;
$this->shop_is_active = 1;
$this->encoding = 'ISO-8859-15';
// default filenames if no language was selected
ca. Zeile 46
$this->request_log_filename = 'request-undefined.log';
$this->error_log_filename = 'error-undefined.log';
$this->debug_log_filename = 'debug-undefined.log';
$this->redirect_keyword_cache_filename = 'redirect_keywords-undefined.txt';
$this->redirect_skip_keyword_cache_filename = 'skip_redirect_keywords-undefined.txt';
$this->redirect_keyword_cache_filename
= 'redirect_keywords-undefined.txt';
$this->redirect_skip_keyword_cache_filename
= 'skip_redirect_keywords-undefined.txt';
// initialize plugin specific stuff
$this->redirect_languages = array();
$this->shipping = '';
$this->tax_zone_id = 5;
$this->customers_status_id = 1;
$this->customer_price_group = 0;
$this->order_status_open = 1;
$this->order_status_shipped = 3;
$this->order_status_shipping_blocked = 1;
$this->order_status_cancled = 0;
$this->order_status_canceled = 0;
$this->reverse_categories_sort_order = false;
$this->reverse_items_sort_order = false;
}
$this->export_description_type
= SHOPGATE_SETTING_EXPORT_DESCRIPTION;
/**
* Checks for duplicate shop numbers in multiple configurations.
*
* This checks all files in the configuration folder and shop numbers in all
* configuration files.
*
* @param string $shopNumber The shop number to test or null to test all shop numbers found.
* @return bool true if there are duplicates, false otherwise.
*/
public function checkDuplicates() {
$shopNumbers = array();
$files = scandir($this->config_folder_path);
$this->shopgate_table_version = '';
foreach ($files as $file) {
if (!is_file($this->config_folder_path.DS.$file)) {
continue;
$this->maximum_category_export_depth = '';
$this->send_order_confirmation_mail = false;
$this->export_new_products_category = 0;
$this->export_new_products_category_id = 999;
$this->export_special_products_category = 0;
$this->export_special_products_category_id = 1000;
$this->export_option_as_input_field = '';
$this->payment_name_mapping = '';
$this->supported_fields_check_cart = array(
'customer', 'external_coupons', 'items', 'shipping_methods'
);
}
$shopgate_config = null;
include($this->config_folder_path.DS.$file);
if (isset($shopgate_config) && isset($shopgate_config['shop_number'])) {
if (in_array($shopgate_config['shop_number'], $shopNumbers)) {
return true;
} else {
$shopNumbers[] = $shopgate_config['shop_number'];
protected function validateCustom(array $fieldList = array())
{
$failedFields = array();
foreach ($fieldList as $field) {
switch ($field) {
case 'redirect_languages':
// at least one redirect language must be selected
if (empty($this->redirect_languages)) {
$failedFields[] = $field;
}
break;
}
}
return false;
return $failedFields;
}
/**
* Checks if there is more than one configuration file available.
* @return mixed
*/
public function checkMultipleConfigs() {
$files = scandir($this->config_folder_path);
$counter = 0;
foreach ($files as $file) {
if (!is_file($this->config_folder_path.DS.$file)) {
continue;
public function getRedirectLanguages()
{
return $this->redirect_languages;
}
$counter++;
/**
* @return mixed
*/
public function getShipping()
{
return $this->shipping;
}
return ($counter > 1);
/**
* @return mixed
*/
public function getTaxZoneId()
{
return $this->tax_zone_id;
}
/**
* Checks if there is a configuration for the language requested.
*
* @param string $language the ISO-639 code of the language or null to load global configuration
* @return bool true if global configuration should be used, false if the language has separate configuration
* @return mixed
*/
public function checkUseGlobalFor($language) {
return !file_exists($this->config_folder_path.DS.'myconfig-'.$language.'.php');
public function getCustomerPriceGroup()
{
return $this->customer_price_group;
}
/**
* Removes the configuration for the language requested.
*
* @param string $language the ISO-639 code of the language or null to load global configuration
* @throws ShopgateLibraryException in case the file exists but cannot be deleted.
* @return mixed
*/
public function useGlobalFor($language) {
$fileName = $this->config_folder_path.DS.'myconfig-'.$language.'.php';
if (file_exists($fileName)) {
if (!@unlink($fileName)) {
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_READ_WRITE_ERROR, 'Error deleting configuration file "'.$fileName."'.");
public function getOrderStatusOpen()
{
return $this->order_status_open;
}
/**
* @return mixed
*/
public function getOrderStatusShipped()
{
return $this->order_status_shipped;
}
/**
* @return mixed
*/
public function getOrderStatusShippingBlocked()
{
return $this->order_status_shipping_blocked;
}
/**
* Loads the configuration file by a given language or the global configuration file.
*
* @param string|null $language the ISO-639 code of the language or null to load global configuration
*
* @override
* @see ShopgateConfig::loadByLanguage()
* @return mixed
*/
public function loadByLanguage($language) {
if (!is_null($language)) {
if (!file_exists($this->config_folder_path.DS.'myconfig-'.$language.'.php')) {
return false;
public function getOrderStatusCanceled()
{
return $this->order_status_canceled;
}
parent::loadByLanguage($language);
} else {
parent::loadFile();
/**
* @return mixed
*/
public function getReverseCategoriesSortOrder()
{
return $this->reverse_categories_sort_order;
}
/**
* @return mixed
*/
public function getReverseItemsSortOrder()
{
return $this->reverse_items_sort_order;
}
/**
* Saves the desired fields to the configuration file for a given language or global configuration
*
* @param string[] $fieldList the list of fieldnames that should be saved to the configuration file.
* @param string $language the ISO-639 code of the language or null to save to global configuration
* @param bool $validate true to validate the fields that should be set.
*
* @override
* @throws ShopgateLibraryException in case the configuration can't be loaded or saved.
* @see ShopgateConfig::saveFileForLanguage()
* @return mixed
*/
public function saveFileForLanguage(array $fieldList, $language = null, $validate = true) {
if (!is_null($language)) {
$this->setLanguage($language);
$fieldList[] = 'language';
parent::saveFileForLanguage($fieldList, $language, $validate);
} else {
parent::saveFile($fieldList, null, $validate);
public function getExportDescriptionType()
{
return $this->export_description_type;
}
/**
* @return mixed
*/
public function getShopgateTableVersion()
{
return $this->shopgate_table_version;
}
protected function validateCustom(array $fieldList = array()) {
$failedFields = array();
/**
* @return mixed
*/
public function getMaximumCategoryExportDepth()
{
return $this->maximum_category_export_depth;
}
foreach ($fieldList as $field) {
switch ($field) {
case 'redirect_languages':
// at least one redirect language must be selected
if (empty($this->redirect_languages)) {
$failedFields[] = $field;
/**
* @return mixed
*/
public function getSendOrderConfirmationMail()
{
return $this->send_order_confirmation_mail;
}
break;
/**
* @return mixed
*/
public function getExportNewProductsCategory()
{
return $this->export_new_products_category;
}
/**
* @return mixed
*/
public function getExportNewProductsCategoryId()
{
return $this->export_new_products_category_id;
}
return $failedFields;
/**
* @return mixed
*/
public function getExportSpecialProductsCategory()
{
return $this->export_special_products_category;
}
/**
* @return mixed
*/
public function getExportSpecialProductsCategoryId()
{
return $this->export_special_products_category_id;
}
public function getRedirectLanguages() {
return $this->redirect_languages;
/**
* @return string
*/
public function getExportOptionAsInputField()
{
return $this->export_option_as_input_field;
}
public function getShipping() {
return $this->shipping;
/**
* @return string
*/
public function getPaymentNameMapping()
{
return $this->payment_name_mapping;
}
public function getTaxZoneId() {
return $this->tax_zone_id;
/**
* @param $value
*/
public function setRedirectLanguages($value)
{
$this->redirect_languages = $value;
}
public function getCustomersStatusId() {
return $this->customers_status_id;
/**
* @param $value
*/
public function setShipping($value)
{
$this->shipping = $value;
}
public function getCustomerPriceGroup() {
return $this->customer_price_group;
/**
* @param $value
*/
public function setTaxZoneId($value)
{
$this->tax_zone_id = $value;
}
public function getOrderStatusOpen() {
return $this->order_status_open;
/**
* @param $value
*/
public function setCustomerPriceGroup($value)
{
$this->customer_price_group = $value;
}
public function getOrderStatusShipped() {
return $this->order_status_shipped;
/**
* @param $value
*/
public function setOrderStatusOpen($value)
{
$this->order_status_open = $value;
}
public function getOrderStatusShippingBlocked() {
return $this->order_status_shipping_blocked;
/**
* @param $value
*/
public function setOrderStatusShipped($value)
{
$this->order_status_shipped = $value;
}
public function getOrderStatusCancled() {
return $this->order_status_cancled;
/**
* @param $value
*/
public function setOrderStatusShippingBlocked($value)
{
$this->order_status_shipping_blocked = $value;
}
public function getReverseCategoriesSortOrder() {
return $this->reverse_categories_sort_order;
/**
* @param $value
*/
public function setOrderStatusCanceled($value)
{
$this->order_status_canceled = $value;
}
public function getReverseItemsSortOrder() {
return $this->reverse_items_sort_order;
/**
* @param $value
*/
public function setReverseCategoriesSortOrder($value)
{
$this->reverse_categories_sort_order = $value;
}
public function setRedirectLanguages($value) {
$this->redirect_languages = $value;
/**
* @param $value
*/
public function setReverseItemsSortOrder($value)
{
$this->reverse_items_sort_order = $value;
}
public function setShipping($value) {
$this->shipping = $value;
/**
* @param $value
*/
public function setExportDescriptionType($value)
{
$this->export_description_type = $value;
}
public function setTaxZoneId($value) {
$this->tax_zone_id = $value;
/**
* @param $value
*/
public function setShopgateTableVersion($value)
{
$this->shopgate_table_version = $value;
}
public function setCustomersStatusId($value) {
$this->customers_status_id = $value;
/**
* @param $value
*/
public function setMaximumCategoryExportDepth($value)
{
$this->maximum_category_export_depth = $value;
}
public function setCustomerPriceGroup($value) {
$this->customer_price_group = $value;
/**
* @param $value
*/
public function setSendOrderConfirmationMail($value)
{
$this->send_order_confirmation_mail = $value;
}
public function setOrderStatusOpen($value) {
$this->order_status_open = $value;
/**
* @param $value
*/
public function setExportNewProductsCategory($value)
{
$this->export_new_products_category = $value;
}
public function setOrderStatusShipped($value) {
$this->order_status_shipped = $value;
/**
* @param $value
*/
public function setExportNewProductsCategoryId($value)
{
$this->export_new_products_category_id = $value;
}
public function setOrderStatusShippingBlocked($value) {
$this->order_status_shipping_blocked = $value;
/**
* @param $value
*/
public function setExportSpecialProductsCategory($value)
{
$this->export_special_products_category = $value;
}
public function setOrderStatusCancled($value) {
$this->order_status_cancled = $value;
/**
* @param $value
*/
public function setExportSpecialProductsCategoryId($value)
{
$this->export_special_products_category_id = $value;
}
public function setReverseCategoriesSortOrder($value) {
$this->reverse_categories_sort_order = $value;
/**
* @param string $value
*/
public function setExportOptionAsInputField($value)
{
$this->export_option_as_input_field = $value;
}
public function setReverseItemsSortOrder($value) {
$this->reverse_items_sort_order = $value;
/**
* @param string $value
*/
public function setPaymentNameMapping($value)
{
$this->payment_name_mapping = $value;
}
}
includes/external/shopgate/changelog.txtTop ca. Zeile 1
'''Deutsch'''
'''Version 2.9.27’’’
* uses Shopgate Library 2.9.36
* fixed reduction type fixed in tier prices
* checkCart will only return shipping methods if a delivery address is given
'''Version 2.1.16'''
* überarbeitete Konfigurationsseite
* es können jetzt mehrere Sprachen für die mobile Weiterleitung ausgewählt werden
* globale Konfigurationseinstellungen hinzugefügt
* nutzt die Shopgate Library 2.1.23
'''Version 2.9.26'''
* fixed a bug in the real-time synchronization of shipping methods
* fixed tier prices
* fixed bug with amount based coupons
'''Version 2.1.15'''
* Korrektur der Verzeichnisstruktur
* nutzt die Shopgate Library 2.1.22
'''Version 2.9.25'''
* fixed issue on initializing the module
* fixed tax export
'''Version 2.1.14'''
* Problem bei der mobilen Weiterleitung bei nicht konfigurierten Sprachen behoben
'''Version 2.9.24'''
* added configuration to define display names for payment methods on order import
* implemented voucher support
* restored compatibility with PHP 5.2
'''Version 2.1.13'''
* Verzeichnisstruktur für einfachere Plugininstallation optimiert
* nutzt die Shopgate Library 2.1.21
'''Version 2.9.23'''
* implemented tier price support
'''Version 2.1.12'''
* Es wurde ein Fehler behoben, bei dem die Kategorien eine genau umgekehrte Reihenfolge in manchen Shops aufwiesen
* Eine Einstellung ist für Shops hinzugekommen, die den Sortierungsindex in umgekehrter Reihenfolge nutzen, um so die Kategorien darzustellen
* Es kann nun eine Einstellung vorgenommen werden, welche die Umkehrung der Reihenfolge von Produkten bewirkt
* Fehler im Zusammenhang mit Artikelrabatten behoben, wodurch in manchen Fällen falsche Produktpreise exportiert wurden
* nutzt die Shopgate Library 2.1.21
* Einstellungsfelder "mobile Weiterleitung" / "Shop ist freigeschaltet" entfernt
* JS-Header wird im <head> HTML-Tag eingebunden
* <link rel="alternate" ...> HTML-Tag wird nun eingebunden
'''Version 2.9.22'''
* fixed categories in xml product export
'''Version 2.1.11'''
* Problem bei der Bestellsynchronisation behoben
'''Version 2.9.21'''
* helper loading logic changed
* saving customer custom fields to DB
* implement mobile redirect for search and brand
* implemented product xml export
'''Version 2.1.10'''
* Default Charset wird beim Erstellen der Shopgate Tabelle nicht länger gesetzt, da es bei manchen Providern Probleme gibt
* MySQL Abfragen mit Joins werden nun explizit angegeben, für Fälle wo das Schlüsselwort "JOIN" alleine nicht benutzt werden darf
* Sonderpreise für Kundengruppen und Artikelrabatt wird nun unterstützt und ist so umgesetzt, wie es das Shopsystem nutzt. Maximale Rabatte aus Kundengruppen werden berücksichtigt
* Unterstützung für mehrere Sprachen: pro Sprache kann jetzt ein Shopgate-Shop konfiguriert werden
* Versandart für Bestellungsimport kann nun in der Konfiguration ausgewählt werden. Der Steuersatz dieser Versandart-Steuerklasse wird für die Ausweisung von Steuern auf der Bestellungsdetailseite verwendet
* Zahlungsartkosten werden nicht mehr als Artikel hinzugefügt
* Doppelt Artikel-Optionswertnamen werden automatisch durchnumeriert
* Fehler behoben, bei dem Artikel-Attributpreise bei anderer Währung falsch berechnet wurden
* Nutzt Shopgate Library 2.1.18
'''Version 2.9.20'''
* saving custom fields to DB or printing in order page history
'''Version 2.1.9'''
* Bestellungen, die bereits als versendet bei Shopgate markiert wurden, werden beim Cronjob nun auch korrekt in der Datenbank aktualisiert
'''Version 2.9.19'''
* uses Shopgate Library 2.9.24
* implemented category XML export
* implemented review XML export
'''Version 2.1.8'''
* Fehler bei der Sortierung von Produkten und Kategorien mit negativen Sortierungsindizes behoben
'''Version 2.9.18'''
* removed german changelog
* implemented cronjob function for transferring order cancellations back to Shopgate
'''Version 2.1.7'''
* Inkompatibilitätsproblem mit älteren MySQL-Versionen behoben
* nutzt die Shopgate Library 2.1.12
'''Version 2.9.17'''
* fixed a bug in the real-time synchronization of shipping methods
'''Version 2.1.6'''
* Fehler beim Export der Artikelnummern für Varianten behoben
* Debuglogging erweitert
* nutzt die Shopgate Library 2.1.8
* Umbenennung in Modified
'''Version 2.9.16'''
* product options won't be exported simultaneously as text field
* the shipping method is now displayed in the order detail view
'''Version 2.1.5'''
* Die Kommentare zu Shopgate-Bestellungen wurden überarbeitet, da es hier in der Vergangenheit zu Missverständnissen kam.
: Bestellungen, bei denen Shopgate den Versand nicht blockiert, sind ''nicht'' automatisch zum Versand freigegeben. Bei Bestellungen über eigene Zahlungsarten des Händlers muss die Abwicklung vor dem Versand überprüft werden.
* Artikelnummer bei eindimensionalen Varianten werden exportiert
'''Version 2.9.15'''
* User_Groups are now returned by checkCart, getCustomer and getSettings
'''Version 2.1.4'''
* Probleme beim Produktexport behoben
* Fehler bei der Installation des Shopgate Zahlungsmoduls behoben
* nutzt die Shopgate Library 2.1.6
'''Version 2.9.14'''
* version of the shopping system was not recognized correctly under certain circumstances
* implemented function check_cart
'''Version 2.1.3'''
* Fehler bei der Installation des Shopgate Zahlungsmoduls behoben
* verbesserte Fehleranzeige in der Konfigurationsoberfläche
* Fehler beim Push nach Afterbuy behoben
* nutzt die Shopgate Library 2.1.5
'''Version 2.9.13'''
* implemented function check_stock
* fixed encoding issue on creating new user accounts
'''Version 2.1.2'''
* ein Fehler in der Shopgate Library wurde behoben
* nutzt die Shopgate Library 2.1.3
'''Version 2.9.12'''
* products with of quantity of zero will be exported now
* fixed a bug in exporting product images
* added new plugin configuration setting to allow exporting certain product options as input fields
'''Version 2.1.1'''
* (Multibyte-)Zeichensatz-Probleme bei der Konvertierung von HTML-Entities bei Kategorienamen behoben
* nutzt die Shopgate Library 2.1.1
'''Version 2.9.11'''
* fixed a bug in getting the valid shipping methods
* bug in generating in product images fixed
'''Version 2.1.0'''
* die Installations-Routine des Zahlungsmoduls legt jetzt den Versandstatus "Versand blockiert (Shopgate)" an
* allgemeine Fehlerbehebungen
* nutzt die Shopgate Library 2.1.0
'''Version 2.9.10'''
* fixed a bug in importing orders for very old versions of the shopping cart
* fixed a bug while initializing of the plugin
'''Version 2.0.33'''
* Fehler beim Export von Preisen für personalisierte Angebote behoben
* nutzt die Shopgate Library 2.0.34
* wenn die Produkt-Beschreibung leer ist, wird stattdessen die Kurzbeschreibung genommen
* Fehler beim Neuinstallation des Shopgate Zahlungsmoduls behoben
* nicht mehr benötigte Einstellungen aus Shopgate Zahlungsmodul entfernt
* Anpassungen an der Datenbank müssen nicht mehr manuell vorgenommen werden. Sie sind jetzt Teil der automatischen Installationsroutine des Shopgate Zahlungsmoduls.
'''Version 2.9.9'''
* Small changes provided by Modified eCommerce
* Compatibility changes for the new version 2.00 of Modified eCommerce
'''Version 2.0.32'''
* Bestellungsimport nutzt jetzt die "Encoding"-Einstellung für Kommentare
'''Version 2.9.8'''
* fixed bug in product image export
'''Version 2.0.31'''
* (Multibyte-)Zeichensatz-Probleme bei der Konvertierung von HTML-Entities bei Attributen behoben
'''Version 2.9.7'''
* bug in splitted product export fixed
'''Version 2.0.30'''
* nutzt die Shopgate Library 2.0.31
* Export der Produktvarianten geändert
* "use of undefined constant" bei der mobilen Weiterleitung behoben
'''Version 2.9.6'''
* adapted link to the Shopgate wiki
* fixed a bug in exporting product images
* empty variation values are now exported as double dashes (--)
'''Version 2.0.29'''
* changelog.txt hinzugefügt
* nutzt die Shopgate Library 2.0.27
* unterstützt die Einstellung "Auf Tablets weiterleiten (ja/nein)"
* unterstützt Remote-Cronjobs über die Shopgate Plugin API
* Remote-Cronjob für die Synchronisierung des Bestellstatus bei Shopgate
'''Version 2.9.5'''
* uses Shopgate Library 2.9.10
'''Version 2.9.4'''
* bug in setting the right shipping status fixed
* fixed a bug that prevented registration with an email address that has previously been added as guest user by Shopgate
'''Version 2.9.3'''
* fixed a bug in accessing request parameters for mobile redirect
* uses Shopgate Library 2.9.6
'''Version 2.9.2'''
* fixed a bug in getting the valid shipping methods(tax calculation)
'''Version 2.9.1'''
* updated Shopgate menu links
* the default redirect cannot be enabled in the plugin's configuration page anymore
* fixed a bug in getting the valid shipping methods
* fixed a bug in the mobile redirect for the welcome page
'''Version 2.9.0'''
* dynamic initialising of shipping module constants improved
* Shopgate wiki link will be red out of the config now
* bug in export shipping methods fixed
* uses Shopgate Library 2.9.4
'''Version 2.8.1'''
* bug while reading textfield information from database fixed
* bug in parsing the tax classes fixed
'''Version 2.8.0'''
* uses Shopgate Library 2.8.3
'''Version 2.7.2'''
* bug in tax rules datastructure fixed
'''Version 2.7.1'''
* added missing instantiation of an Smarty Objektes
'''Version 2.7.0'''
* uses Shopgate Library 2.7.0
* bug finding out shop version fixed
'''Version 2.6.9'''
* send order confirmation mail in modified lower than 1.05
'''Version 2.6.8'''
* Bug in Shopgate Connect fixed
'''Version 2.6.7'''
* Now textfields were considered while order import
* While senden the order confirmation mail the language is set correctly
* Shopgate Connect sets the second user-id now
'''Version 2.6.6'''
* improved stock check logic
* Textfields in orders are supported now
'''Version 2.6.5'''
* supports paypal_ipn payment module at orders import
'''Version 2.6.4'''
* shopgate config variable set
'''Version 2.6.3'''
* shipping price will now be exported as net
'''Version 2.6.2'''
* Shipping methods can be selected
'''Version 2.6.1'''
* request plugin configuration extended
'''Version 2.6.0'''
* virtual category "new products" can now be exported
* virtual category "special products" can now be exported
'''Version 2.5.5'''
* uses Shopgate Library 2.6.6
* VAT bug fixed in Shopgate order import
'''Version 2.5.4'''
* uses Shopgate Library 2.5.6
* plugin ping function extended
'''Version 2.5.3'''
* uses Shopgate Library 2.5.5
* request Shopgate plugin properties
'''Version 2.5.2'''
* order confirmation mail can now be sent through the shop system
'''Version 2.5.1'''
* bug fixed in plugin installation
'''Version 2.5.0'''
* uses Shopgate Library 2.5.0
'''Version 2.4.9'''
* plugin installation optimized
'''Version 2.4.8'''
* installation problem fixedf (column_left)
'''Version 2.4.7'''
* Bug fixed which disabled the Shopgate-Menue
'''Version 2.4.6'''
* uses Shopgate Library 2.4.13
* Bug fixed which disabled the Shopgate-Menue
'''Version 2.4.5'''
* uses Shopgate Library 2.4.12
'''Version 2.4.4'''
* Shipping class and method are now set correctly in shopgate orders
'''Version 2.4.3'''
* added head comment (license) into plugin files
'''Version 2.4.2'''
* register customer implemented
'''Version 2.4.1'''
* Fixed a Css problem in the Admin Backend Menü
* nutzt Shopgate Library 2.4.6
'''Version 2.4.0'''
* uses Shopgate Library 2.4.0
'''Version 2.3.3'''
* Output buffer will be deleted to prevent error which caused through linebreaks/spaces
'''Version 2.3.2'''
* fixed special prices deactiviation issue on order import with special prices
'''Version 2.3.1'''
* uses Shopgate Library 2.3.8
* fixed issue on editing English orders
'''Version 2.3.0'''
* fixed issue in the import of orders with customer group discount
'''Version 2.1.26'''
* the country and state-zone is now set correctly for guest customers while importing an order without Shopgate-Connect
'''Version 2.1.25'''
* fixed issue in install script
* fixed issue with item csv export. Items with more than 10 options are ignored, since they would break the export file
* Only home page, product detail pages and category pages are always redirected to the mobile web site from now on. There's a new setting for specifying whether or not other pages should also be redirected.
* a problem has been solved, that happened to cause warnings while redirect on servers that has set its error level to strict
* uses Shopgate Library 2.3.0
'''Version 2.1.24'''
* applied all plugin modifications, done by the modified eCommerce team
* it's now possible to reduce the category depth to a maximum value upon request, where products deeper will be assigned to the deepest exported parent
* a problem has been solved, that happened to cause warnings while csv exports and order imports on servers that has set its error level to strict
* uses Shopgate Library 2.1.29
'''Version 2.1.23'''
* added support for SEO URLs to export of products and categories
* adapted CSS classes for backend
'''Version 2.1.22'''
* it is now possible to choose a combination of the products description and the short description on the Shopgate settings page
* the additional address field on Shopgate orders is now appended to the address while importing orders
* the customers data while importing orders is now taken from the shop customer data, instead of the customer data, given by the addOrder request
'''Version 2.1.21'''
* the add order request doesn't stop anymore with an error message, when optional database fields are missing
'''Version 2.1.20'''
* the stock of the products attributes is now exported correctly
'''Version 2.1.19'''
* the selected shipping method should now consulted correctly to be able to calculate taxes for the shipping costs
'''Version 2.1.18'''
* fixed an issue where the shopgate payment module could not be installed properly
'''English'''
'''Version 2.1.17'''
* the stock level options are now accessed on importing orders and adapted to the ordered products, attributes and specials. Products and specials are now deactivated according to the shoppingsystem
* support for the older products structure to avoid false order imports after updating to a newer shopgate plugin is already included
* preorder products are now exported as such
* method updateOrder() doesn't throw an exception anymore if payment is done after shipping and shipping was not blocked by Shopgate.
* the Shopgate configuration file can now be saved without any problems, even if false formatted GET parameters are appended on navigation to the Shopgate configuration page
* the orders status "Shipping blocked (Shopgate)" can now be recognized while installing the Shopgate payment module even if its name has been changed, as long as it is marked with the keyword "Shopgate" (without quoutes)
* fixed an issue with DreamRobot and shipping costs
* moved functionality for handling of global and language dependend configurations to Shopgate Library
* fixed a bug in saving of log files
* uses Shopgate Library 2.1.26
'''Version 2.1.16'''
* revised configuration interface
* it's now possible to select multiple languages for the Mobile Redirect
ca. Zeile 173
* rename in Modified
'''Version 2.1.5'''
* The comments for orders via Shopgate have been revised due to misconceptions in the past.
: Orders that are not blocked for shipping by Shopgaste are ''not'' approved for shipping either. When an order is placed with a merchant's payment method the transaction must be reviewed before shipping.
: Orders that are not blocked for shipping by Shopgate are ''not'' approved for shipping either. When an order is placed with a merchant's payment method the transaction must be reviewed before shipping.
* item number export for one dimension variants
'''Version 2.1.4'''
* fixed issues in products export
includes/external/shopgate/plugin.phpTop ca. Zeile 1
<?php
define('SHOPGATE_PLUGIN_VERSION', '2.1.16');
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
define('SHOPGATE_PLUGIN_VERSION', '2.9.27');
/**
* Modified eCommerce Plugin for Shopgate
*/
class ShopgateModifiedPlugin extends ShopgatePlugin {
class ShopgateModifiedPlugin extends ShopgatePlugin
{
/**
* @var ShopgateConfigModified
*/
protected $config;
/**
* @var int
*/
private $languageId;
/**
* @var int
*/
private $countryId;
/**
* @var int
*/
private $zoneId;
/**
* @var string
*/
private $currency;
/**
* @var string
*/
private $language = "german";
public function startup() {
$requiredFiles = array(
'inc/xtc_validate_password.inc.php',
'inc/xtc_format_price_order.inc.php',
'inc/xtc_db_prepare_input.inc.php',
'includes/classes/xtcPrice.php',
'inc/xtc_get_products_stock.inc.php',
);
foreach($requiredFiles as $file) {
require_once(DIR_FS_CATALOG.$file);
}
// initialize configuration
require_once(DIR_FS_CATALOG.'includes/external/shopgate/base/shopgate_config.php');
$this->config = new ShopgateConfigModified();
/**
* @var int
*/
private $currencyId;
protected $modifiedVersion;
public function startup()
{
$this->requireFiles();
$initHelper = new ShopgatePluginInitHelper();
$initHelper->defineXtcValidationConstant();
$this->config = new ShopgateConfigModified();// initialize configuration
$initHelper->getDefaultLanguageData($this->config->getLanguage(), $this->languageId, $this->language);
$initHelper->getDefaultCurrencyData(
$this->config->getCurrency(), $this->exchangeRate, $this->currencyId, $this->currency
);
$this->countryId = $initHelper->getDefaultCountryId($this->config->getCountry());// fetch country
if (!isset($_REQUEST['shop_number'])) {
$this->config->loadFile();
} else {
$this->config->loadByShopNumber($_REQUEST['shop_number']);
}
// fetch country
$qry = "SELECT * FROM `".TABLE_COUNTRIES."` WHERE UPPER(countries_iso_code_2) = UPPER('".$this->config->getCountry()."')";
$qry = xtc_db_fetch_array(xtc_db_query($qry));
$this->countryId = !empty($qry['countries_id']) ? $qry['countries_id'] : 'DE';
// fetch language
$qry = "SELECT * FROM `".TABLE_LANGUAGES."` WHERE UPPER(code) = UPPER('".$this->config->getLanguage()."')";
$qry = xtc_db_fetch_array(xtc_db_query($qry));
$this->languageId = !empty($qry['languages_id']) ? $qry['languages_id'] : 2;
$this->language = !empty($qry['directory']) ? $qry['directory'] : 'german';
// fetch currency
$qry = "SELECT * FROM `".TABLE_CURRENCIES."` WHERE UPPER(code) = UPPER('".$this->config->getCurrency()."')";
$qry = xtc_db_fetch_array(xtc_db_query($qry));
$this->exchangeRate = !empty($qry['value']) ? $qry['value'] : 1;
$this->currencyId = !empty($qry['currencies_id']) ? $qry['currencies_id'] : 1;
$this->currency = !empty($qry)
? $qry
: array('code' => 'EUR', 'symbol_left' => '', 'symbol_right' => ' EUR', 'decimal_point' => ',', 'thousands_point' => '.', 'decimal_places' => '2', 'value' => 1.0);
$this->zoneId = $this->config->getTaxZoneId();
if (!defined('DIR_FS_LANGUAGES')) {
define('DIR_FS_LANGUAGES', rtrim(DIR_FS_CATALOG, '/'). '/lang/');
if (file_exists(DIR_FS_CATALOG . "admin/includes/version.php")) {
$versionContent = file_get_contents(DIR_FS_CATALOG . "admin/includes/version.php");
if (preg_match_all("/define\(\s*'([^']+)'\,\s*'([^']+)'\);/si", $versionContent, $resultVersion)) {
$resultVersion = end($resultVersion);
$this->modifiedVersion = $this->getVersionNumber($resultVersion[0]);
}
}
// $langFiles = array(
// 'admin/categories.php',
// 'admin/content_manager.php',
// );
// foreach ($langFiles as $langFile) {
// include_once DIR_FS_LANGUAGES."/$this->language/$langFile";
// }
if (empty($this->modifiedVersion)) {
$this->modifiedVersion = PROJECT_VERSION;
}
return true;
}
protected function createCategoriesCsv() {
public function registerCustomer($user, $pass, ShopgateCustomer $customer)
{
require_once(DIR_FS_INC . 'xtc_encrypt_password.inc.php');
/** @var ShopgateCustomer $customer */
$customer = $customer->utf8Decode($this->config->getEncoding());
$user = $this->stringFromUtf8($user, $this->config->getEncoding());
$userExistResult =
xtc_db_query("SELECT count(1) AS exist FROM customers AS c WHERE c.customers_email_address = \"{$user}\";");
$userCount = xtc_db_fetch_array($userExistResult);
$userCount = $userCount['exist'];
$encPass = xtc_encrypt_password($pass);
$date = date("Y-m-d H:i:s");
$customField = new ShopgateCustomFieldModel();
$couponModel = new ShopgateCouponModel(
$this->config, $this->languageId, $this->language, $this->currency, $this->countryId
);
if($this->config->getReverseCategoriesSortOrder()){
$maxOrder = 0;
} else {
$qry = "SELECT MAX( sort_order ) sort_order FROM " . TABLE_CATEGORIES;
$maxOrder = xtc_db_fetch_array( xtc_db_query( $qry ) );
$maxOrder = $maxOrder["sort_order"] + 1;
if ((int)$userCount >= 1) {
throw new ShopgateLibraryException(ShopgateLibraryException::REGISTER_USER_ALREADY_EXISTS, '', true);
}
$this->_buildCategoriesTree(0, $maxOrder);
if (!defined(TABLE_CUSTOMERS_MEMO)) {
define(TABLE_CUSTOMERS_MEMO, "customers_memo");
}
private function _buildCategoriesTree($parentId = 0, $maxOrder = 0 ) {
$qry = "
SELECT DISTINCT
c.categories_id,
c.parent_id,
c.categories_image,
c.categories_status,
c.sort_order,
cd.categories_name
FROM ".TABLE_CATEGORIES." c
LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd ON (c.categories_id = cd.categories_id
AND cd.language_id = $this->languageId)
WHERE c.parent_id = $parentId ORDER BY c.categories_id ASC
";
if (!defined(TABLE_CUSTOMERS_INFO)) {
define(TABLE_CUSTOMERS_INFO, "customers_info");
}
$customerData = array(
'customers_firstname' => $customer->getFirstName(),
'customers_lastname' => $customer->getLastName(),
'customers_email_address' => $customer->getMail(),
'customers_telephone' => $customer->getPhone(),
'customers_newsletter' => 0,
"customers_gender" => $customer->getGender(),
'customers_password' => $encPass,
'customers_date_added' => $date,
'customers_last_modified' => $date,
'delete_user' => 0,
'customers_status' => DEFAULT_CUSTOMERS_STATUS_ID,
);
$customerData =
array_merge($customerData, $customField->prepareCustomFields(clone $customer, TABLE_CUSTOMERS));
$qry = xtc_db_query( $qry );
xtc_db_perform(TABLE_CUSTOMERS, $customerData);
$userId = xtc_db_insert_id();
while( $item = xtc_db_fetch_array( $qry ) ) {
if (ShopgateWrapper::db_column_exists(TABLE_CUSTOMERS, 'customers_cid')) {
$query = "UPDATE " . TABLE_CUSTOMERS . " SET customers_cid = {$userId} WHERE customers_id = {$userId};";
xtc_db_query($query);
}
$customersInfo = array(
'customers_info_id' => $userId,
'customers_info_number_of_logons' => 1,
'customers_info_date_account_created' => $date,
'customers_info_date_account_last_modified' => $date,
);
xtc_db_perform(TABLE_CUSTOMERS_INFO, $customersInfo);
$row = $this->buildDefaultCategoryRow();
$memoData = array(
'customers_id' => $userId,
'memo_date' => $date,
'memo_title' => 'Shopgate - Account angelegt',
'memo_text' => 'Account wurde von Shopgate angelegt',
);
xtc_db_perform(TABLE_CUSTOMERS_MEMO, $memoData);
$row["category_number"] = $item["categories_id"];
$row["parent_id"] = (empty($item["parent_id"]) || ($item['parent_id'] == $item['categories_id']))
? ""
: $item["parent_id"];
$row["category_name"] = htmlentities($item["categories_name"], ENT_NOQUOTES, $this->config->getEncoding());
if(!empty($item["categories_image"])){
$row["url_image"] = HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_IMAGES."categories/".$item["categories_image"];
}
/** @var ShopgateAddress[] $addresses */
$addressList = $customer->getAddresses();
$customerModel = new ShopgateCustomerModel($this->config, $this->languageId);
$defaultAddress = true;
if ($customerModel->areAddressesEqual($addressList)) {
array_pop($addressList);
}
foreach ($addressList as $address) {
$stateCode = ShopgateXtcMapper::getXtcStateCode($address->getState());
$zoneQuery =
xtc_db_query("SELECT z.zone_id,z.zone_name FROM zones AS z WHERE z.zone_code = '" . $stateCode . "'");
$zoneResult = xtc_db_fetch_array($zoneQuery);
$countryQuery = xtc_db_query(
"SELECT c.countries_id FROM countries AS c WHERE c.countries_iso_code_2 ='" . $address->getCountry()
. "'"
);
if (!empty($item["sort_order"]) || ((string) $item['sort_order'] === '0')) {
if($this->config->getReverseCategoriesSortOrder()){
// reversed means the contrary to ordering system in shopgate - order_index is a priority system - high number = top position
// so just taking over the values means reversing the order
$row["order_index"] = $item["sort_order"];
} else {
$row["order_index"] = $maxOrder - $item["sort_order"];
$countryResult = xtc_db_fetch_array($countryQuery);
$addressData = array(
"customers_id" => $userId,
"entry_company" => $address->getCompany(),
"entry_zone_id" => $zoneResult['zone_id'],
"entry_country_id" => $countryResult['countries_id'],
"entry_firstname" => $address->getFirstName(),
"entry_lastname" => $address->getLastName(),
"entry_gender" => $address->getGender(),
"entry_street_address" => $address->getStreet1(),
"entry_postcode" => $address->getZipcode(),
"entry_city" => $address->getCity(),
"entry_state" => $zoneResult['zone_name'],
"address_date_added" => "now()",
"address_last_modified" => "now()",
);
$addressData =
array_merge($addressData, $customField->prepareCustomFields(clone $address, TABLE_ADDRESS_BOOK));
xtc_db_perform(TABLE_ADDRESS_BOOK, $addressData);
if ($defaultAddress) {
$addressId = xtc_db_insert_id();
$query = "UPDATE " . TABLE_CUSTOMERS
. " as c SET customers_default_address_id = {$addressId} WHERE c.customers_id={$userId}";
xtc_db_query($query);
$defaultAddress = false;
}
}
$couponModel->insertWelcomeVoucher(
$customer->getMail(), $customer->getFirstName() . " " . $customer->getLastName()
);
}
$row["is_active"] = $item["categories_status"];
$row["url_deeplink"] = HTTP_SERVER.DIR_WS_CATALOG."index.php?cat=c" . $item["categories_id"];
public function createPluginInfo()
{
$return = array(
'modifed eCommerce Version' => '-',
);
$this->addCategoryRow($row);
if (file_exists('admin/includes/version.php')) {
$versionInfo = file_get_contents('admin/includes/version.php');
if ($item['parent_id'] != $item['categories_id']) {
$this->_buildCategoriesTree($item["categories_id"], $maxOrder);
if (preg_match('/define\(\'PROJECT_VERSION\',(.+)\)/', $versionInfo, $match)) {
$return['modifed eCommerce Version'] = $match[1];
}
} elseif (defined('PROJECT_VERSION')) {
$return['modifed eCommerce Version'] = PROJECT_VERSION;
}
return $return;
}
/**
* @see ShopgatePluginApi::createItemsCsv()
*/
protected function createItemsCsv() {
$customerGroupMaxPriceDiscount = 0;
$customerGroupDiscountAttributes = false;
protected function createCategoriesCsv()
{
$this->log("Start export categories tree...", ShopgateLogger::LOGTYPE_DEBUG);
$categoryModel = new ShopgateCategoryModel();
$categoryModel->setLanguageId($this->languageId);
$maxOrder = $categoryModel->getCategoryMaxOrder($this->config->getReverseCategoriesSortOrder());
// get customer-group first
$qry = "SELECT"
. " status.customers_status_name,"
. " status.customers_status_discount,"
. " status.customers_status_discount_attributes"
. " FROM " . TABLE_CUSTOMERS_STATUS . " AS status"
. " WHERE status.customers_status_id = " . $this->config->getCustomerPriceGroup()
. " AND status.language_id = " . $this->languageId
. ";";
$this->buildCategoriesTree(0, $maxOrder);
$row = $this->buildDefaultCategoryRow();
if ($this->config->getExportNewProductsCategory()) {
$this->addCategoryRow(
array_merge(
$row,
$categoryModel->getNewProductsCategoryData(
$this->config->getExportNewProductsCategoryId()
)
// Check if the customer group exists (ignore if not)
$queryResult = xtc_db_query($qry);
if($queryResult) {
$customerGroupResult = xtc_db_fetch_array($queryResult);
if(!empty($customerGroupResult) && isset($customerGroupResult['customers_status_discount'])) {
$customerGroupMaxPriceDiscount = $customerGroupResult['customers_status_discount'];
)
);
}
if(!empty($customerGroupResult) && isset($customerGroupResult['customers_status_discount'])) {
$customerGroupDiscountAttributes = $customerGroupResult['customers_status_discount_attributes'] ? true : false;
if ($this->config->getExportSpecialProductsCategory()) {
$this->addCategoryRow(
array_merge(
$row,
$categoryModel->getSpecialProductsCategoryData(
$this->config->getExportSpecialProductsCategoryId()
)
)
);
}
}
$qry = "
SELECT DISTINCT
p.products_id,
p.products_model,
p.products_ean,
p.products_quantity,
p.products_image,
p.products_price,
DATE_FORMAT(p.products_last_modified, '%Y-%m-%d') as products_last_modified,
p.products_weight,
p.products_status,
sp.specials_new_products_price,
sp.specials_quantity,
pdsc.products_keywords,
pdsc.products_name,
pdsc.products_description,
pdsc.products_short_description,
shst.shipping_status_name,
mf.manufacturers_name,
p.products_tax_class_id,
p.products_fsk18,
p.products_vpe_status,
p.products_vpe_value,
vpe.products_vpe_name,
p.products_sort,
p.products_startpage,
p.products_startpage_sort,
p.products_discount_allowed
FROM ".TABLE_PRODUCTS." p
LEFT JOIN ".TABLE_PRODUCTS_DESCRIPTION." pdsc ON (p.products_id = pdsc.products_id AND pdsc.language_id = '".$this->languageId."')
LEFT JOIN ".TABLE_SHIPPING_STATUS." shst ON (p.products_shippingtime = shst.shipping_status_id AND shst.language_id = '".$this->languageId."')
LEFT JOIN ".TABLE_MANUFACTURERS." mf ON (mf.manufacturers_id = p.manufacturers_id)
LEFT JOIN ".TABLE_SPECIALS." sp ON (sp.products_id = p.products_id AND sp.status = 1 AND (sp.expires_date > now() OR sp.expires_date = '0000-00-00 00:00:00' OR sp.expires_date IS NULL))
LEFT JOIN ".TABLE_PRODUCTS_VPE." vpe ON (vpe.products_vpe_id = p.products_vpe AND vpe.language_id = pdsc.language_id)
WHERE p.products_status = 1
AND (p.products_date_available < NOW() OR p.products_date_available IS NULL)
";
protected function createItemsCsv()
{
$this->log("Start export items ...", ShopgateLogger::LOGTYPE_DEBUG);
$itemModel = new ShopgateItemModel($this->config);
$itemModel->setLog(ShopgateLogger::getInstance());
$itemModel->setLanguageId($this->languageId);
$itemModel->setDefaultCustomerPriceGroup(DEFAULT_CUSTOMERS_STATUS_ID_GUEST);
$itemModel->setStringHelper($this->getHelper(ShopgateObject::HELPER_STRING));
$itemModel->setCurrencyData($this->currency);
$itemModel->setCountryId($this->countryId);
$itemModel->setZoneId($this->zoneId);
$itemModel->setExchangeRate($this->exchangeRate);
if ($this->splittedExport) {
$itemModel->setExportLimit($this->exportLimit);
$itemModel->setExportOffset($this->exportOffset);
}
// sp.specials_quantity > 0 deleted, to handle the check in the loop
$this->log("execute SQL customer group ...", ShopgateLogger::LOGTYPE_DEBUG);// get customer-group first
$customerGroupMaxPriceDiscount = 0;
$customerGroupDiscountAttributes = false;
$itemModel->getDiscountToCustomerGroups($customerGroupMaxPriceDiscount, $customerGroupDiscountAttributes);
if(STOCK_CHECK == "true" && STOCK_ALLOW_CHECKOUT == 'false') {
$qry .= " AND p.products_quantity > 0 ";
$categoryReducedMap = array();
$maxCatDepth = $this->config->getMaximumCategoryExportDepth();
if (!empty($maxCatDepth)) {
$categoryReducedMap = $itemModel->getCategoryReducementMap($maxCatDepth);
}
// Ahorn24 fix. 10 products were not found without sorting.
$qry .= ' ORDER BY p.products_id ASC ';
$maxId = xtc_db_fetch_array( xtc_db_query("SELECT MAX(products_id) max_id FROM ".TABLE_PRODUCTS) );
$maxId = $maxId["max_id"];
$maxOrder = $minOrder = $addToOrderIndex = 0;
$itemModel->getProductOrderValues($maxOrder, $minOrder, $addToOrderIndex);
// order_index for the products
$orderIndices = xtc_db_fetch_array( xtc_db_query("SELECT MIN(products_sort) AS 'min_order', MAX(products_sort) AS 'max_order' FROM ".TABLE_PRODUCTS) );
$maxOrder = $orderIndices["max_order"]+1;
$minOrder = $orderIndices["min_order"];
$addToOrderIndex = 0;
if($minOrder < 0) {
// make the sort_order positive
$addToOrderIndex += abs($minOrder);
if ($this->config->getExportNewProductsCategory()) {
$newProducts = $this->getNewProducts($itemModel);
}
if($this->splittedExport) $qry .= " LIMIT {$this->exportOffset}, {$this->exportLimit}";
if ($this->config->getExportSpecialProductsCategory()) {
$specialProducts = $this->getSpecialProducts($itemModel);
}
$uids = !empty($_REQUEST['item_numbers']) && is_array($_REQUEST['item_numbers'])
? $_REQUEST['item_numbers']
: '';
$this->log("execute SQL get products ...", ShopgateLogger::LOGTYPE_DEBUG);
$query = xtc_db_query($itemModel->getProductQuery($uids));
$query = xtc_db_query($qry);
while($item = xtc_db_fetch_array($query)) {
$this->log("start export products_id = " . $item["products_id"] . " ...", ShopgateLogger::LOGTYPE_DEBUG);
$itemArr = $this->buildDefaultItemRow();
$orderInfos = array();
$tax_rate = xtc_get_tax_rate($item["products_tax_class_id"], $this->countryId, $this->zoneId);
$variations =
$this->getVariations($itemModel, $item["products_id"], $tax_rate);// Get variantions and input fields
$inputFields = $this->getInputFields($itemModel, $item["products_id"]);
$categories = $this->getProductPath($item["products_id"]);// Get categories
$images = $this->getProductsImages($itemModel, $item);// Get Image Urls
$deeplink =
$itemModel->generateDeepLinkToProduct($item['products_id'], $item['products_name']);// get deeplink
// Get variantions and input fields
$variations = $this->_getVariations($item["products_id"], $tax_rate);
$inputFields = $this->_getInputFields($item["products_id"]);
// Get categories
$categories = $this->_getProductPath($item["products_id"]);
// Get Image Urls
$images = $this->_getProductsImages($item);
$httpServer = HTTP_SERVER;
if(empty($httpServer)) $httpServer = "http://".$_SERVER["HTTP_HOST"];
$deeplink = $httpServer.DIR_WS_CATALOG."product_info.php?". xtc_product_link($item['products_id'], $item['products_name']);
// Calculate the price
$price = $item["products_price"];
$price = $item["products_price"];// Calculate the price
$oldPrice = '';
$itemModel->calculateProductPrice(
$item, $tax_rate, $customerGroupMaxPriceDiscount, $price, $oldPrice
);
// Special offers for a Customer group
$pOffers = $this->_getPersonalOffersPrice($item, $tax_rate);
if(!empty($pOffers) && round($pOffers, 2) > 0) {
$price = $pOffers;
// Ignore the "old price" if it is lower than the offer amount (xtc3 also tells the old price here, but it's not very intuitive)
if($pOffers < $item["products_price"]) {
$oldPrice = $item["products_price"];
$itemModel->setReverseItemSortOrder($this->config->getReverseItemsSortOrder());
$category_numbers = $itemModel->getProductCategoryNumbers($item);
// check if there is a category replacement map to reduce categories depth
if (!empty($categoryReducedMap)) {
foreach ($category_numbers as &$categoryNumber) {
// can possibly contain a split symbol "=>"
if (strpos($categoryNumber, '=>') !== false) {
$catNumberParts = explode('=>', $categoryNumber);
$catNumberParts[0] = $categoryReducedMap[$catNumberParts[0]];
$categoryNumber = implode('=>', $catNumberParts);
} else {
$categoryNumber = $categoryReducedMap[$categoryNumber];
}
}
}
// General special offer or customer group price reduction
$productDiscount = 0;
if(!empty($item["specials_new_products_price"])) {
if(STOCK_CHECK == 'true' && STOCK_ALLOW_CHECKOUT == 'false') {
if($item["specials_quantity"] > 0){
// Nur wenn die quantity > 0 ist dann specialprice setzen, ansonsten normalen Preis mit normalem Stock
$item["products_quantity"] = $item["specials_quantity"] > $item["products_quantity"] ? $item["products_quantity"] : $item["specials_quantity"];
if ($this->config->getExportNewProductsCategory() && !empty($newProducts)) {
foreach ($newProducts as $newProduct) {
if ($newProduct['products_id'] == $item['products_id']) {
$category_numbers[] = "{$this->config->getExportNewProductsCategoryId()}=>0";
}
}
// setting specialprice
$oldPrice = $item["products_price"];
$price = $item["specials_new_products_price"];
$orderInfos['is_special_price'] = 1;
} elseif(!empty($customerGroupMaxPriceDiscount) && round($customerGroupMaxPriceDiscount, 2) > 0
&& !empty($item['products_discount_allowed']) && round($item['products_discount_allowed'], 2) > 0) {
$productDiscount = round($item['products_discount_allowed'], 2);
// Limit discount to the customer groups maximum discount
if(round($customerGroupMaxPriceDiscount, 2) < $productDiscount) {
$productDiscount = round($customerGroupMaxPriceDiscount, 2);
}
$oldPrice = $price;
if($oldPrice < $item['products_price']) {
$oldPrice = $item['products_price'];
if ($this->config->getExportSpecialProductsCategory() && !empty($specialProducts)) {
foreach ($specialProducts as $specialProduct) {
if ($specialProduct['products_id'] == $item['products_id']) {
$category_numbers[] = "{$this->config->getExportSpecialProductsCategoryId()}=>0";
}
}
// Reduce price to the discounted price
$price = $this->_getDiscountPrice($price, $productDiscount);
$orderInfos['is_special_price'] = 1;
}
$category_numbers = $this->_getProductCategoryNumbers($item, $maxOrder, $addToOrderIndex);
$price *= $this->exchangeRate;
$price = $price * ( 1 + ( $tax_rate / 100 ) );
ca. Zeile 314
$oldPrice = $oldPrice * $this->exchangeRate;
$oldPrice = $this->formatPriceNumber( $oldPrice * ( 1 + ( $tax_rate / 100 ) ) );
}
$description = $this->removeTagsFromString($item["products_description"]);
// check if description is empty, use short description in that case
// if the description is something like '<p> </p>' that is considered "empty". hence the dirty $dummyDescription
$dummyDescription = trim(str_replace(array(' '), array(''), $this->removeTagsFromString($description, array('P', 'p', 'br'))));
if(empty($dummyDescription)){
// if no "full"-description is available use the short_description
$description = $this->removeTagsFromString($item["products_short_description"]);
}
$description = preg_replace("/\n|\r/", "", $description);
$itemArr['item_number'] = $item["products_id"];
$itemArr['item_number_public'] = $item['products_model'];
$itemArr['manufacturer'] = $item["manufacturers_name"];
$itemArr['item_name'] = trim( preg_replace('/<[^>]+>/',' ', $item["products_name"]) );
$itemArr['description'] = $description;
$itemArr['item_name'] =
trim(preg_replace('/<[^>]+>/', ' ', $item["products_name"]));
$itemArr['description'] =
$itemModel->getDescriptionToProduct($item, $this->config->getExportDescriptionType());
$itemArr['unit_amount'] = $this->formatPriceNumber($price);
$itemArr['currency'] = $this->currency["code"];
$itemArr['is_available'] = $item["products_status"];
$itemArr['available_text'] = (string) $item["shipping_status_name"];
$itemArr['available_text'] = $itemModel->getAvailableText($item);
$itemArr['url_deeplink'] = $deeplink;
$itemArr['urls_images'] = $images;
$itemArr['categories'] = $categories;
$itemArr['category_numbers'] = implode("||", $category_numbers);
$itemArr['use_stock'] = (STOCK_ALLOW_CHECKOUT == 'true' || STOCK_CHECK != 'true') ? 0 : 1;
$itemArr['use_stock'] =
(STOCK_ALLOW_CHECKOUT == 'true' || STOCK_CHECK != 'true') ? 0 : 1;
$itemArr['active_status'] =
(STOCK_ALLOW_CHECKOUT == 'false' && STOCK_CHECK == 'true') ? "active" : "stock";
$itemArr['stock_quantity'] = $item['products_quantity'];
$itemArr['weight'] = $item["products_weight"]*1000;
$itemArr['tags'] = trim($item["products_keywords"]);
$itemArr['tax_percent'] = $tax_rate;
$itemArr['shipping_costs_per_order'] = 0;
$itemArr['additional_shipping_costs_per_unit'] = 0;
$itemArr['ean'] = preg_replace("/\s+/i",'',$item["products_ean"]);
$itemArr['last_update'] = $item["products_last_modified"];
$itemArr['block_pricing'] = $this->_getPackeges($item, $tax_rate);
$itemArr['block_pricing'] = $this->getPackages($item, $tax_rate);
$itemArr['age_rating'] = $item["products_fsk18"] == 1 ? '18' : '';
$itemArr['related_shop_item_numbers'] = $this->_getRelatedShopItems($item["products_id"]);
$itemArr['basic_price'] = $this->_getProductVPE($item, $price);
$itemArr['related_shop_item_numbers'] = $itemModel->getRelatedShopItems($item["products_id"]);
$itemArr['basic_price'] = $itemModel->getProductVPE($item, $price);
$itemArr['is_highlight'] = $item["products_startpage"];
$itemArr['highlight_order_index'] = $item["products_startpage_sort"];
if($this->config->getReverseItemsSortOrder()){
// $addToOrderIndex to make positive sort_order
$itemArr['sort_order'] = $item["products_sort"] + $addToOrderIndex;
$itemArr['sort_order'] =
$item["products_sort"] + $addToOrderIndex;// $addToOrderIndex to make positive sort_order
} else {
$itemArr['sort_order'] = ($maxOrder - $item["products_sort"])+$addToOrderIndex;
}
if(!empty($orderInfos)){
$itemArr['internal_order_info'] = $this->jsonEncode($orderInfos);
}
$itemNumber = 0 ;
if(!empty($oldPrice) && round($oldPrice, 2) > 0) {
$itemArr['old_unit_amount'] = $oldPrice;
} else {
$itemArr['old_unit_amount'] = '';
ca. Zeile 386
if(!empty($variations)) {
if($variations["has_options"]) {
$itemArr['has_options']=1;
// fix for products with more than 10 options:
if (isset($variations['option_11'])) {
continue; // don't import
}
$this->addItemRow(array_merge($itemArr, $variations));
} else {
if(isset($variations['has_options'])){
unset($variations['has_options']);
ca. Zeile 421
// Variations also need to be discounted if products discount is set
if(!empty($productDiscount) && round($productDiscount, 2) > 0) {
if($customerGroupDiscountAttributes) { // Seems to be buggy in gambio so it is ignored here
$variation["offset_amount"] = $this->_getDiscountPrice($variation["offset_amount"], $productDiscount);
$variation["offset_amount"] =
$itemModel->getDiscountPrice($variation["offset_amount"], $productDiscount);
$variations[$key]["offset_amount"] = $variation["offset_amount"];
}
}
$price = $variation["offset_amount"]*(1+($tax_rate/100));
}
if(isset($variation["offset_weight"]))
if (isset($variation["offset_weight"])) {
$weight = $variation["offset_weight"] * 1000;
}
$hash = "";
for($i=1; $i < 10 && isset($variation["attribute_$i"]); $i++) {
$hash .= $variation["attribute_$i"];
$itemArr["attribute_$i"] = htmlentities($variation["attribute_$i"], ENT_NOQUOTES, $this->config->getEncoding());
$itemArr["attribute_$i"] =
htmlentities($variation["attribute_$i"], ENT_NOQUOTES, $this->config->getEncoding());
}
$hash = md5($hash);
$hash = substr($hash, 0, 5);
if(empty($variation)) $variation = array("order_info" => array());
if (empty($variation)) {
$variation = array("order_info" => array());
}
// Set Order Info from parent product
if(!empty($variation['order_info']) && is_array($variation['order_info'])){
$variation["order_info"] = array_merge($orderInfos, $variation['order_info']);
ca. Zeile 462
}
$itemArr["unit_amount"] = $this->formatPriceNumber($basePrice + $price);
if(!empty($baseOldPrice) && round($baseOldPrice, 2) > 0) {
$itemArr["old_unit_amount"] = $this->formatPriceNumber($baseOldPrice + $originalOffsetAmount);
$itemArr["old_unit_amount"] =
$this->formatPriceNumber($baseOldPrice + $originalOffsetAmount);
} else {
$itemArr["old_unit_amount"] = '';
}
$itemArr["weight"] = $baseWeight + $weight;
if($isFirst == false){
$itemArr["use_stock"] = (STOCK_ALLOW_CHECKOUT == 'true' || ATTRIBUTE_STOCK_CHECK != 'true') ? 0 : 1;
$itemArr["use_stock"] =
(STOCK_ALLOW_CHECKOUT == 'true' || ATTRIBUTE_STOCK_CHECK != 'true') ? 0 : 1;
}
// Overwrite stock only if its set up in the configuration
if(ATTRIBUTE_STOCK_CHECK == 'true' && $isFirst == false){
if(!empty($item["specials_new_products_price"]) && $item["specials_quantity"] > 0){
$itemArr["stock_quantity"] = $variation["stock_quantity"] > $item["specials_quantity"] ? $item["specials_quantity"] : $variation["stock_quantity"];
$itemArr["stock_quantity"] = $variation["stock_quantity"] > $item["specials_quantity"]
? $item["specials_quantity"] : $variation["stock_quantity"];
} else {
$itemArr["stock_quantity"] = $variation["stock_quantity"];
}
}
$itemArr['properties'] = $this->_buildProperties($item, $itemArr);
$itemArr['properties'] = $itemModel->generatePropertiesToProduct($item);
$this->addItemRow($itemArr);
$isFirst = false;
ca. Zeile 492
}
}
} else {
$itemArr['has_children']=0;
$itemArr['properties'] = $this->_buildProperties($item, $itemArr);
$itemArr['properties'] = $itemModel->generatePropertiesToProduct($item);
$this->addItemRow($itemArr);
}
}
}
private function _getPackeges($product, $tax_rate) {
$customerStatusId = $this->config->getCustomerPriceGroup();
if($customerStatusId > 0) return '';
$qry = "
SELECT *
FROM ".TABLE_PERSONAL_OFFERS_BY."$customerStatusId
WHERE products_id = '".$product["products_id"]."'
AND quantity > 1
ORDER BY quantity
";
$specialOffers = array();
$_specialOffers = xtc_db_query($qry);
while($specialOffer = xtc_db_fetch_array($_specialOffers)) {
$specialOffers[] = implode("=>", array(
"qty" => $specialOffer["quantity"],
"personal_offer" => round($specialOffer["personal_offer"] * (1+($tax_rate/100)), 2),
));
}
public function getCustomer($user, $pass)
{
// save the UTF-8 version for logging etc.
$userUtf8 = $user;
return implode("||", $specialOffers);
}
// decode the parameters if necessary to make them work with xtc_* functions
$user = $this->stringFromUtf8($user, $this->config->getEncoding());
$pass = $this->stringFromUtf8($pass, $this->config->getEncoding());
private function _getProductVPE($product, $price) {
$vpe = "";
// find customer
$qry = "SELECT"
if(!empty($product["products_vpe_value"]) && !empty($product["products_vpe_name"]) && $product["products_vpe_value"] != 0.0000){
// basic user information
. " customer.customers_id,"
. " customer.customers_cid,"
. " status.customers_status_name,"
. " status.customers_status_id,"
. " customer.customers_gender,"
. " customer.customers_firstname,"
. " customer.customers_lastname,"
. " date_format(customer.customers_dob,'%Y-%m-%d') as customers_birthday,"
. " customer.customers_telephone,"
. " customer.customers_email_address,"
if($product["products_vpe_status"] == 1){
// additional information for password verification, default address etc.
. " customer.customers_password,"
. " customer.customers_default_address_id"
$factor = 1;
switch(strtolower($product["products_vpe_name"])) {
case "ml":
case "mg":
$factor = $product["products_vpe_value"]<250?100:1000;
break;
}
. " FROM " . TABLE_CUSTOMERS . " AS customer"
$_price = ( $price / $product["products_vpe_value"] ) * $factor;
. " INNER JOIN " . TABLE_CUSTOMERS_STATUS . " AS status"
. " ON customer.customers_status = status.customers_status_id"
. " AND status.language_id = " . $this->languageId
$vpe = $this->currency["symbol_left"];
. " WHERE customers_email_address = '" . xtc_db_input($user) . "';";
$vpe .= $this->formatPriceNumber(
$_price,
$this->currency["decimal_places"],
$this->currency["decimal_point"],
$this->currency["thousands_point"]
// user exists?
$customerResult = xtc_db_query($qry);
if (empty($customerResult)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_WRONG_USERNAME_OR_PASSWORD, 'User: ' . $userUtf8
);
$vpe .= " " . trim($this->currency["symbol_right"]);
$vpe .= ' pro '.(($factor == 1) ? '' : $factor.' ');
$vpe .= $product["products_vpe_name"];
}
}
return $vpe;
// password's correct?
$customerData = xtc_db_fetch_array($customerResult);
if (defined('PROJECT_MAJOR_VERSION')
&& !xtc_validate_password(
$pass, $customerData['customers_password'], $customerData['customers_id']
)
|| !defined('PROJECT_MAJOR_VERSION') && !xtc_validate_password($pass, $customerData['customers_password'])
) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_WRONG_USERNAME_OR_PASSWORD, 'User: ' . $userUtf8
);
}
/**
* Exportiere alle Produktbilder
*
* @param string $product
*/
private function _getProductsImages($product) {
$qry = "
SELECT *
FROM ".TABLE_PRODUCTS_IMAGES."
WHERE products_id = '".$product["products_id"]."'
ORDER BY image_nr
";
$images = array();
// fetch customers' addresses
$qry = "SELECT"
if(!empty($product['products_image'])){
if(file_exists(DIR_FS_CATALOG.DIR_WS_ORIGINAL_IMAGES.$product['products_image'])){
$images[] = HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_ORIGINAL_IMAGES.$product['products_image'];
}elseif(file_exists(DIR_FS_CATALOG.DIR_WS_POPUP_IMAGES.$product['products_image'])){
$images[] = HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_POPUP_IMAGES.$product['products_image'];
}
}
. " address.address_book_id,"
. " address.entry_gender,"
. " address.entry_firstname,"
. " address.entry_lastname,"
. " address.entry_company,"
. " address.entry_street_address,"
. " address.entry_postcode,"
. " address.entry_city,"
. " country.countries_iso_code_2,"
. " zone.zone_code"
$query = xtc_db_query($qry);
while($image = xtc_db_fetch_array($query)) {
if(file_exists(DIR_FS_CATALOG.DIR_WS_ORIGINAL_IMAGES.$image['image_name'])){
$images[] = HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_ORIGINAL_IMAGES.$image['image_name'];
}elseif(file_exists(DIR_FS_CATALOG.DIR_WS_POPUP_IMAGES.$image['image_name'])){
$images[] = HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_POPUP_IMAGES.$image['image_name'];
}
}
$images = implode("||", $images);
. " FROM " . TABLE_ADDRESS_BOOK . " AS address"
return $images;
}
. " LEFT JOIN " . TABLE_COUNTRIES . " AS country"
. " ON country.countries_id = address.entry_country_id"
private function _getProductCategoryNumbers($item, $maxId, $addToOrderIndex) {
$category_numbers = array();
. " LEFT JOIN " . TABLE_ZONES . " AS zone"
. " ON address.entry_zone_id = zone.zone_id"
. " AND country.countries_id = zone.zone_country_id"
$catsQry = "
SELECT DISTINCT
ptc.categories_id,
c.products_sorting2
FROM ".TABLE_PRODUCTS_TO_CATEGORIES." ptc
INNER JOIN ".TABLE_CATEGORIES." c ON (ptc.categories_id = c.categories_id)
WHERE ptc.products_id = '".$item["products_id"]."'
AND c.categories_status = 1
";
$catsQuery = xtc_db_query($catsQry);
. " WHERE address.customers_id = " . xtc_db_input($customerData['customers_id']) . ";";
while($category = xtc_db_fetch_array($catsQuery)) {
if(empty($category["categories_id"])) {
continue;
$addressResult = xtc_db_query($qry);
if (empty($addressResult)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_NO_ADDRESSES_FOUND, 'User: ' . $userUtf8
);
}
$catNumber = "";
if($category["products_sorting2"] != "ASC"){
if($this->config->getReverseItemsSortOrder()){
$sort = $maxId - $item["products_sort"];
} else {
$sort = $item["products_sort"];
$addresses = array();
while ($addressData = xtc_db_fetch_array($addressResult)) {
try {
$stateCode = ShopgateXtcMapper::getShopgateStateCode(
$addressData["countries_iso_code_2"], $addressData["zone_code"]
);
} catch (ShopgateLibraryException $e) {
// if state code can't be mapped to ISO use xtc3 state code
$stateCode = $addressData['zone_code'];
}
} else {
$address = new ShopgateAddress();
$address->setId($addressData['address_book_id']);
$address->setAddressType(ShopgateAddress::BOTH); // xtc3 doesn't make a difference
$address->setGender($addressData["entry_gender"]);
$address->setFirstName($addressData["entry_firstname"]);
$address->setLastName($addressData["entry_lastname"]);
$address->setCompany($addressData["entry_company"]);
$address->setStreet1($addressData["entry_street_address"]);
$address->setZipcode($addressData["entry_postcode"]);
$address->setCity($addressData["entry_city"]);
$address->setCountry($addressData["countries_iso_code_2"]);
$address->setState($stateCode);
if($this->config->getReverseItemsSortOrder()){
$sort = $item["products_sort"];
// put default address in front, append the others
if ($address->getId() == $customerData['customers_default_address_id']) {
array_unshift($addresses, $address);
} else {
$sort = $maxId - $item["products_sort"];
}
}
if (!empty($sort) || ((string) $sort === '0')) {
$sort += $addToOrderIndex;
$catNumber = "=>".$sort;
}
$catNumber = $category["categories_id"].$catNumber;
$category_numbers[] = $catNumber;
$addresses[] = $address;
}
return $category_numbers;
}
//modified only allows exactly one customer group
$customerGroup = new ShopgateCustomerGroup();
$customerGroup->setId($customerData['customers_status_id']);
$customerGroup->setName($customerData['customers_status_name']);
$customerGroups[] = $customerGroup;
/**
*
* @param mixed[] $product
* @param mixed[] $tax
* @return float
*/
private function _getPersonalOffersPrice($product, $tax) {
$customerStatusId = $this->config->getCustomerPriceGroup();
if(empty($customerStatusId)) return false;
$qry = "SELECT * FROM ".TABLE_PERSONAL_OFFERS_BY."$customerStatusId
WHERE products_id = '".$product["products_id"]."'
AND quantity = 1";
$qry = xtc_db_query($qry);
if(!$qry) return false;
$specialOffer = xtc_db_fetch_array( $qry );
$customer = new ShopgateCustomer();
$customer->setCustomerId($customerData["customers_id"]);
$customer->setCustomerNumber($customerData["customers_cid"]);
$customer->setCustomerGroup($customerData['customers_status_name']);
$customer->setCustomerGroupId($customerData['customers_status_id']);
$customer->setCustomerGroups($customerGroups);
$customer->setGender($customerData["customers_gender"]);
$customer->setFirstName($customerData["customers_firstname"]);
$customer->setLastName($customerData["customers_lastname"]);
$customer->setBirthday($customerData["customers_birthday"]);
$customer->setPhone($customerData["customers_telephone"]);
$customer->setMail($customerData["customers_email_address"]);
$customer->setAddresses($addresses);
$customer->setCustomerToken($this->getCustomerToken($customerData));
return floatval($specialOffer["personal_offer"]);
try {
// utf-8 encode the values recursively
$customer = $customer->utf8Encode($this->config->getEncoding());
} catch (ShopgateLibraryException $e) {
// don't abort here
}
/**
* Takes a price value and a discount percent value and returns the new discounted price
* @param float $price
* @param float $discountPercent
* @return float
*/
private function _getDiscountPrice($price, $discountPercent) {
$discountedPrice = $price * (1-$discountPercent/100);
return $discountedPrice;
return $customer;
}
/**
* Load all Categories of the product and build its category-path
*
* The categories are seperated by a =>. The Paths are seperated b< a double-pipe ||
*
* Example: kategorie_1=>kategorie_2||other_1=>other_2
* @param int $productId
* @return string
*/
private function _getProductPath($productId) {
$catsQry = "
SELECT DISTINCT ptc.categories_id
FROM ".TABLE_PRODUCTS_TO_CATEGORIES." ptc
INNER JOIN ".TABLE_CATEGORIES." c ON ptc.categories_id = c.categories_id
WHERE ptc.products_id = '$productId'
AND c.categories_status = 1
ORDER BY products_sorting
";
$catsQuery = xtc_db_query($catsQry);
$categories = "";
while($category = xtc_db_fetch_array($catsQuery)) {
$cats = xtc_get_category_path($category["categories_id"]);
$cats = preg_replace("/\_/", ",", $cats);
$q = "
SELECT DISTINCT cd.categories_name
FROM ".TABLE_CATEGORIES_DESCRIPTION." cd
WHERE cd.categories_id IN (".$cats.")
AND cd.language_id = ".$this->languageId."
ORDER BY find_in_set(cd.categories_id, '$cats')
";
$q = xtc_db_query($q);
$cats = "";
while($cd = xtc_db_fetch_array($q)) {
if(!empty($cats))$cats.="=>";
$cats.=$cd["categories_name"];
}
if(!empty($categories))$categories.="||";
$categories.=$cats;
}
public function addOrder(ShopgateOrder $order)
{
// save UTF-8 payment info (to build proper json)
$paymentInfoUtf8 = $order->getPaymentInfos();
$couponModel = new ShopgateCouponModel(
$this->config, $this->languageId, $this->language, $this->currency, $this->countryId
);
$this->log('start add_order()', ShopgateLogger::LOGTYPE_DEBUG);
return $categories;
}
// data needs to be utf-8 decoded for äöüß and the like to be saved correctly
$order = $order->utf8Decode($this->config->getEncoding());
if ($order instanceof ShopgateOrder) {
;
} // for Eclipse auto-completion
/**
* Returns a array with all Variations of the Product
* @param int $productId
*/
private function _getVariations($productId, $tax_rate) {
$sg_prod_var = array();
$this->log('db: duplicate_order', ShopgateLogger::LOGTYPE_DEBUG);
// check that the order is not imported already
$qry = "
SELECT
pa.products_attributes_id,
po.products_options_id,
pov.products_options_values_id,
po.products_options_name,
pov.products_options_values_name,
pa.attributes_model,
pa.options_values_price,
pa.price_prefix,
pa.options_values_weight,
pa.attributes_stock,
pa.weight_prefix
FROM ".TABLE_PRODUCTS_ATTRIBUTES." pa
INNER JOIN ".TABLE_PRODUCTS_OPTIONS." po ON (pa.options_id = po.products_options_id AND po.language_id = $this->languageId)
INNER JOIN ".TABLE_PRODUCTS_OPTIONS_VALUES." pov ON (pa.options_values_id = pov.products_options_values_id AND pov.language_id = $this->languageId)
WHERE pa.products_id = '".$productId."'
AND pov.products_options_values_name != 'TEXTFELD'
o.*,
so.shopgate_order_number
FROM " . TABLE_ORDERS . " o
INNER JOIN " . TABLE_SHOPGATE_ORDERS . " so ON (so.orders_id = o.orders_id)
WHERE so.shopgate_order_number = '{$order->getOrderNumber()}'
";
$result = xtc_db_query($qry);
$dbOrder = xtc_db_fetch_array($result);
$qry .= " ORDER BY po.products_options_id, pa.sortorder ASC";
$query = xtc_db_query($qry);
// $options = array_pad(array(), 5, "");
$options = array();
$i=-1;
$old = null;
while($variation = xtc_db_fetch_array($query)) {
if($variation["products_options_id"] != $old || is_null($old)){
$i++;
$old = $variation["products_options_id"];
}
$options[$i][] = $variation;
if (!empty($dbOrder)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_DUPLICATE_ORDER, 'external_order_number: ' . $dbOrder["orders_id"],
true
);
}
if(empty($options)) return array();
// retrieve address information
$delivery = $order->getDeliveryAddress();
$invoice = $order->getInvoiceAddress();
// Find and rename duplicate option-value names
foreach($options as $optionIndex => $singleOption) {
// Check all option-value names for duplicate names
foreach($singleOption as $key => $optionVariation) {
if(!empty($optionVariation)) {
// Compare with following entries
$indexNumber = 1;
for($i = $key+1; $i < count($singleOption); $i++) {
if(trim($singleOption[$i]['products_options_values_name']) == trim($optionVariation['products_options_values_name'])) {
$indexNumber++;
$options[$optionIndex][$i]['products_options_values_name'] .= " $indexNumber";
}
}
// Add index 1 to the actual name if duplicate name-entries found
if($indexNumber > 1) {
$options[$optionIndex][$key]['products_options_values_name'] .= " 1";
// find customer
$customerId = $order->getExternalCustomerId();
// Refresh the working variable for further operation
$singleOption = $options[$optionIndex];
$shopCustomer = array();
if (!empty($customerId)) {
$this->log('db: customer', ShopgateLogger::LOGTYPE_DEBUG);
$result = xtc_db_query("SELECT * FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '{$customerId}'");
$shopCustomer = xtc_db_fetch_array($result);
}
if (empty($shopCustomer)) {
$this->log('create Guest User', ShopgateLogger::LOGTYPE_DEBUG);
$shopCustomer = $this->createGuestUser($order);
}
// get customers address
$qry = "SELECT * FROM `" . TABLE_ADDRESS_BOOK . "` AS `ab`
WHERE `ab`.`customers_id` = '{$shopCustomer['customers_id']}'"
. (!empty($shopCustomer['customers_default_address_id']) ? ("
AND `ab`.`address_book_id` = '{$shopCustomer['customers_default_address_id']}'") : "") . ";";
$qryResult = xtc_db_query($qry);
$customersAddress = xtc_db_fetch_array($qryResult);
// get address format
if (!empty($customersAddress)) {
$addressFormatCustomer = $this->getAddressFormatId(null, $customersAddress['entry_country_id']);
} else {
$customersAddress = array(
'entry_gender' => $shopCustomer['customers_gender'],
'entry_company' => '',
'entry_firstname' => $shopCustomer['customers_firstname'],
'entry_lastname' => $shopCustomer['customers_lastname'],
'entry_street_address' => '',
'entry_suburb' => '',
'entry_postcode' => '',
'entry_city' => '',
'entry_state' => '',
'entry_country_id' => '',
'entry_zone_id' => '',
);
}
$addressFormatDelivery = $this->getAddressFormatId($delivery->getCountry());
$addressFormatInvoice = $this->getAddressFormatId($invoice->getCountry());
if (empty($addressFormatCustomer)) {
$addressFormatCustomer = $addressFormatInvoice;
}
$countVariations = 1;
foreach($options as $option){
$countVariations *= count($option);
if (empty($addressFormatCustomer)) {
$addressFormatCustomer = $addressFormatDelivery;
}
if($countVariations > $this->config->getMaxAttributes()) {
$this->_buildOptions($sg_prod_var, $options, $tax_rate);
$sg_prod_var["has_options"] = 1;
} else {
$this->_buildAttributes($sg_prod_var, $options);
$sg_prod_var["has_options"] = 0;
}
$this->log('db: customer_status', ShopgateLogger::LOGTYPE_DEBUG);
return $sg_prod_var;
$result = xtc_db_query(
"SELECT * FROM " . TABLE_CUSTOMERS_STATUS
. " WHERE language_id = '{$this->languageId}' AND customers_status_id = '{$shopCustomer["customers_status"]}'"
);
$customersStatus = xtc_db_fetch_array($result);
if (empty($customersStatus)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_NO_CUSTOMER_GROUP_FOUND, print_r($shopCustomer, true)
);
}
/**
* Build the Productvariations as options
*
* @param &array $sg_prod_var
* @param array $variations
* @param float $tax_rate
*/
private function _buildOptions(&$sg_prod_var, $variations, $tax_rate) {
$tmp=array();
$i = 0;
foreach($variations as $_variation) {
$i++;
$tmp["option_$i"] = strip_tags($_variation[0]["products_options_name"]);
$this->log('before ShopgateMapper', ShopgateLogger::LOGTYPE_DEBUG);
$options = array();
foreach($_variation as $option) {
// Currency and tax must be included here because the data is directly used for the item
$optionOffsetPrice = $option["options_values_price"]*$this->exchangeRate*(1+($tax_rate/100)); // Include Tax
$optionOffsetPrice = round($optionOffsetPrice * 100, 0); // get euro-cent
// map state codes (called "zone id" in shopsystem)
$customersStateCode = $customersAddress['entry_state'];
$invoiceStateCode = $invoice->getState();
$deliveryStateCode = $delivery->getState();
$field = strip_tags($option["products_options_values_id"])."=".strip_tags($option["products_options_values_name"]);
$field .= ($option["options_values_price"] != 0)
? "=>".$option["price_prefix"].$optionOffsetPrice
: "";
$this->log('db: countries', ShopgateLogger::LOGTYPE_DEBUG);
$options[] = $field;
$result = xtc_db_query(
"SELECT * FROM " . TABLE_COUNTRIES . " WHERE countries_id = '{$customersAddress['entry_country_id']}'"
);
$customersCountry = xtc_db_fetch_array($result);
$result = xtc_db_query(
"SELECT * FROM " . TABLE_COUNTRIES . " WHERE countries_iso_code_2 = '{$delivery->getCountry()}'"
);
$deliveryCountry = xtc_db_fetch_array($result);
$result = xtc_db_query(
"SELECT * FROM " . TABLE_COUNTRIES . " WHERE countries_iso_code_2 = '{$invoice->getCountry()}'"
);
$invoiceCountry = xtc_db_fetch_array($result);
if (empty($customersCountry)) {
$customersCountry = $invoiceCountry;
}
$tmp["option_".$i."_values"] = implode("||", $options);
if (empty($customersCountry)) {
$customersCountry = $deliveryCountry;
}
$sg_prod_var = $tmp;
}
///////////////////////////////////////////////////////////////////////
// Save order
///////////////////////////////////////////////////////////////////////
/**
* Build the Productvariations recursively
*
* @param &array $sg_prod_var
* @param array $variations
* @param int $index
* @param array $tmp
*/
private function _buildAttributes(&$sg_prod_var, $variations, $index=0, $tmp=array()) {
if($index == 0) {
// Index 0 sind die Überschriften. Diese müssen als erstes hinzugefügt werden
for($i=0;$i<count($variations);$i++){
$sg_prod_var[0]["attribute_".($i+1)] = $variations[$i][0]["products_options_name"];
}
}
$orderData = array();
$orderData["customers_id"] = $shopCustomer["customers_id"];
$orderData["customers_cid"] = $shopCustomer["customers_cid"];
$orderData["customers_vat_id"] = $shopCustomer["customers_vat_id"];
$orderData["customers_status"] = $customersStatus["customers_status_id"];
$orderData["customers_status_name"] = $customersStatus["customers_status_name"];
$orderData["customers_status_image"] = $customersStatus["customers_status_image"];
$orderData["customers_status_discount"] = 0;
foreach($variations[$index] as $variation) {
if(count($variations) == 1){
// only if 1 dimension
$tmp["item_number"] = $variation["attributes_model"];
}
$orderData["customers_name"] =
$customersAddress['entry_firstname'] . " " . $customersAddress['entry_lastname'];
$orderData["customers_firstname"] = $customersAddress['entry_firstname'];
$orderData["customers_lastname"] = $customersAddress['entry_lastname'];
$orderData["customers_company"] = $customersAddress['entry_company'];
$orderData["customers_street_address"] = $customersAddress['entry_street_address'];
$orderData["customers_suburb"] = $customersAddress['entry_suburb'];
$orderData["customers_city"] = $customersAddress['entry_city'];
$orderData["customers_postcode"] = $customersAddress['entry_postcode'];
$orderData["customers_state"] = $customersStateCode;
$orderData["customers_country"] = $customersCountry['countries_name'];
$orderData["customers_telephone"] = $shopCustomer['customers_telephone'];
$orderData["customers_email_address"] = $shopCustomer['customers_email_address'];
$orderData["customers_address_format_id"] = $addressFormatCustomer;
$tmp["attribute_".($index+1)] = $variation["products_options_values_name"];
$tmp["order_info"]["attribute_".($index+1)] = $variation["products_attributes_id"];
$orderData["delivery_name"] = $delivery->getFirstName() . " " . $delivery->getLastName();
$orderData["delivery_firstname"] = $delivery->getFirstName();
$orderData["delivery_lastname"] = $delivery->getLastName();
$orderData["delivery_company"] = $delivery->getCompany();
$orderData["delivery_street_address"] =
$delivery->getStreet1() . (strlen($delivery->getStreet2()) > 0 ? (' ' . $delivery->getStreet2()) : '');
$orderData["delivery_suburb"] = "";
$orderData["delivery_city"] = $delivery->getCity();
$orderData["delivery_postcode"] = $delivery->getZipcode();
$orderData["delivery_state"] = $deliveryStateCode;
$orderData["delivery_country"] = $deliveryCountry["countries_name"];
$orderData["delivery_country_iso_code_2"] = $delivery->getCountry();
$orderData["delivery_address_format_id"] = $addressFormatDelivery;
if (isset($tmp['stock_quantity'])) {
$oldStock = $tmp['stock_quantity'];
}
if(isset($tmp["stock_quantity"]) && $variation["attributes_stock"] < $tmp["stock_quantity"] || !isset($tmp["stock_quantity"])){
$tmp["stock_quantity"] = $variation["attributes_stock"];
}
$orderData["billing_name"] = $invoice->getFirstName() . " " . $invoice->getLastName();
$orderData["billing_firstname"] = $invoice->getFirstName();
$orderData["billing_lastname"] = $invoice->getLastName();
$orderData["billing_company"] = $invoice->getCompany();
$orderData["billing_street_address"] =
$invoice->getStreet1() . (strlen($invoice->getStreet2()) > 0 ? (' ' . $invoice->getStreet2()) : '');
$orderData["billing_suburb"] = "";
$orderData["billing_city"] = $invoice->getCity();
$orderData["billing_postcode"] = $invoice->getZipcode();
$orderData["billing_state"] = $invoiceStateCode;
$orderData["billing_country"] = $invoiceCountry["countries_name"];
$orderData["billing_country_iso_code_2"] = $invoice->getCountry();
$orderData["billing_address_format_id"] = $addressFormatInvoice;
// Kalkuliere den Preisunterschied (Steuern und Währung werden noch nicht hier berücksichtigt)
$price = $variation["options_values_price"];
if($variation["price_prefix"] == "-"){
$price = -1 * $price;
}
if (empty($tmp['offset_amount'])) {
$tmp['offset_amount'] = 0;
}
$tmp["offset_amount"] += $price;
// load all languages
$qry = xtc_db_query("SELECT directory as dir FROM languages as l WHERE l.languages_id = {$this->languageId};");
// Kalkuliere den Gewichtsunterschied
$weight = (float) $variation["options_values_weight"];
if($variation["weight_prefix"] == "-"){
$weight = -1 * $weight;
}
if (empty($tmp['offset_weight'])) {
$tmp['offset_weight'] = 0;
$languageDirectory = 'german';
while ($row = xtc_db_fetch_array($qry)) {
$languageDirectory = $row['dir'];
}
$tmp["offset_weight"] += (double) $weight;
if($index < (count($variations)-1)) {
// Fahre mit nächstem Attribute fort
$this->_buildAttributes($sg_prod_var, $variations, $index+1, $tmp);
unset($tmp["stock_quantity"]);
unset($tmp["item_number"]);
} else {
// Wenn kein Attribut mehr existiert, dieses auf den Stack legen
$sg_prod_var[] = $tmp;
}
$shippingInfos = $order->getShippingInfos();
$shippingModuleName = strtolower($shippingInfos->getName());
// Preis und Gewicht und stock_quantity wieder rückgängig machen
$tmp["offset_amount"] -= $price;
$tmp["offset_weight"] -= $weight;
if (!empty($oldStock)) {
$tmp["stock_quantity"] = $oldStock;
}
}
if (empty($shippingModuleName)
|| !file_exists(
DIR_FS_LANGUAGES . $languageDirectory . '/modules/shipping/' . $shippingModuleName . '.php'
)
) {
$shippingModuleName = $this->config->getShipping();
}
private function _getRelatedShopItems($products_id) {
$qry = "
SELECT px.xsell_id
FROM ".TABLE_PRODUCTS_XSELL." px
INNER JOIN ".TABLE_PRODUCTS." p ON (px.products_id = p.products_id)
WHERE p.products_id = '$products_id'
AND (p.products_date_available < NOW() OR p.products_date_available IS NULL)
ORDER BY px.sort_order
";
if (empty($shippingModuleName)
|| !file_exists(
DIR_FS_LANGUAGES . $languageDirectory . '/modules/shipping/' . $shippingModuleName . '.php'
)
) {
$shippingModuleName = 'flat';
}
$xSellIds = array();
require_once(DIR_FS_LANGUAGES . $languageDirectory . '/modules/shipping/' . $shippingModuleName . '.php');
$shippingMethod = constant('MODULE_SHIPPING_' . strtoupper($shippingModuleName) . '_TEXT_TITLE');
$shippingClass = $shippingModuleName . '_' . $shippingModuleName;
$query = xtc_db_query($qry);
for($i = 0; $i < xtc_db_num_rows($query); $i++) {
$array = xtc_db_fetch_array($query);
$xSellIds[] = $array["xsell_id"];
}
$orderData["shipping_method"] = $shippingMethod;
$orderData["shipping_class"] = $shippingClass;
return implode("||", $xSellIds);
}
$orderData["cc_type"] = "";
$orderData["cc_owner"] = "";
$orderData["cc_number"] = "";
$orderData["cc_expires"] = "";
$orderData["cc_start"] = "";
$orderData["cc_issue"] = "";
$orderData["cc_cvv"] = "";
$orderData["comments"] = "";
private function _buildProperties($product, $itemArr) {
$properties = array();
$orderData["last_modified"] = date('Y-m-d H:i:s');
$orderData["date_purchased"] = $order->getCreatedTime('Y-m-d H:i:s');
if(!empty($product["products_fsk18"]) && $product["products_fsk18"] == 1)
$properties[] = "Altersbeschränkung=>18 Jahre";
$orderData["currency"] = $order->getCurrency();
$orderData["currency_value"] = $this->exchangeRate;
return implode("||", $properties);
}
$orderData["account_type"] = "";
$orderData["payment_method"] = "shopgate";
$orderData["payment_class"] = "shopgate";
private function _getInputFields($productId){
$qry = "
SELECT
pa.products_attributes_id,
po.products_options_id,
pov.products_options_values_id,
po.products_options_name,
pov.products_options_values_name,
pa.attributes_model,
pa.options_values_price,
pa.price_prefix,
pa.options_values_weight,
pa.attributes_stock,
pa.weight_prefix
FROM ".TABLE_PRODUCTS_ATTRIBUTES." pa
INNER JOIN ".TABLE_PRODUCTS_OPTIONS." po ON pa.options_id = po.products_options_id
INNER JOIN ".TABLE_PRODUCTS_OPTIONS_VALUES." pov ON (pa.options_values_id = pov.products_options_values_id AND pov.language_id = $this->languageId)
WHERE pa.products_id = '$productId'
AND pov.products_options_values_name = 'TEXTFELD'
ORDER BY po.products_options_id, pa.sortorder
";
$query = xtc_db_query($qry);
while($inputFields = xtc_db_fetch_array($query)) {
if($inputFields["products_options_id"] != $old){
$i++;
$old = $inputFields["products_options_id"];
}
$inputFieldsAll[$i][] = $inputFields;
}
if(empty($inputFieldsAll)){
return;
}
$sg_product_var = $this->_buildInputFields($inputFieldsAll);
return $sg_product_var;
}
$orderData["customers_ip"] = "";
$orderData["language"] = $this->language;
private function _buildInputFields($inputFieldsAll){
$sg_product_var = array();
$i = 0;
foreach($inputFieldsAll as $inputField) {
$i++;
$orderData["afterbuy_success"] = 0;
$orderData["afterbuy_id"] = 0;
// $sg_product_var["has_input_fields"] = 1;
$sg_product_var["input_field_".$i."_type"] = 'text';
$sg_product_var["input_field_".$i."_label"] = strip_tags($inputField[0]["products_options_name"]);
$sg_product_var["input_field_".$i."_add_amount"] = ($inputField["options_values_price"] != 0)
? "=>".$option["price_prefix"].round($inputField["options_values_price"], 2)
: "";
// keine Angabe möglich
$sg_product_var["input_field_".$i."_infotext"] = '';
$sg_product_var["input_field_".$i."_required"] = 0;
}
$orderData["refferers_id"] = 0;
$orderData["conversion_type"] = "2";
return $sg_product_var;
}
$orderData["orders_status"] = $this->config->getOrderStatusOpen();
$orderData["orders_date_finished"] = null;
/**
* @see ShopgatePlugin::getCustomer()
* Add custom variables to order database if columns exist, else print
* The objects are cloned as they are destructively manipulated
*/
public function getCustomer($user, $pass) {
// save the UTF-8 version for logging etc.
$userUtf8 = $user;
// decode the parameters if necessary to make them work with xtc_* functions
$user = $this->stringFromUtf8($user, $this->config->getEncoding());
$pass = $this->stringFromUtf8($pass, $this->config->getEncoding());
// find customer
$qry = "SELECT"
// basic user information
. " customer.customers_id,"
. " customer.customers_cid,"
. " status.customers_status_name,"
. " status.customers_status_id,"
. " customer.customers_gender,"
. " customer.customers_firstname,"
. " customer.customers_lastname,"
. " date_format(customer.customers_dob,'%Y-%m-%d') as customers_birthday,"
. " customer.customers_telephone,"
. " customer.customers_email_address,"
// additional information for password verification, default address etc.
. " customer.customers_password,"
. " customer.customers_default_address_id"
. " FROM " . TABLE_CUSTOMERS . " AS customer"
. " INNER JOIN " . TABLE_CUSTOMERS_STATUS . " AS status"
. " ON customer.customers_status = status.customers_status_id"
. " AND status.language_id = ".$this->languageId
. " WHERE customers_email_address = '" . xtc_db_input($user) . "';";
// user exists?
$customerResult = xtc_db_query($qry);
if (empty($customerResult)) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_WRONG_USERNAME_OR_PASSWORD, 'User: '.$userUtf8);
}
// password's correct?
$customerData = xtc_db_fetch_array($customerResult);
if (!xtc_validate_password($pass, $customerData['customers_password'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_WRONG_USERNAME_OR_PASSWORD, 'User: '.$userUtf8);
$customFieldObj = new ShopgateCustomFieldModel();
$comment = '';
foreach (array(clone $delivery, clone $order, clone $invoice) as $object) {
$orderData = array_merge($orderData, $customFieldObj->prepareCustomFields($object));
$comment .= $customFieldObj->printShopgateCustomFields($object);
}
// fetch customers' addresses
$qry = "SELECT"
$this->log('db: save order', ShopgateLogger::LOGTYPE_DEBUG);
. " address.address_book_id,"
. " address.entry_gender,"
. " address.entry_firstname,"
. " address.entry_lastname,"
. " address.entry_company,"
. " address.entry_street_address,"
. " address.entry_postcode,"
. " address.entry_city,"
. " country.countries_iso_code_2,"
. " zone.zone_code"
// Speichere die Bestellung
xtc_db_perform(TABLE_ORDERS, $orderData);
$dbOrderId = xtc_db_insert_id();
$this->log('db: save', ShopgateLogger::LOGTYPE_DEBUG);
. " FROM " . TABLE_ADDRESS_BOOK . " AS address"
$ordersShopgateOrder = array(
"orders_id" => $dbOrderId,
"shopgate_order_number" => $order->getOrderNumber(),
"is_paid" => $order->getIsPaid(),
"is_shipping_blocked" => $order->getIsShippingBlocked(),
"payment_infos" => $this->jsonEncode($paymentInfoUtf8),
"is_sent_to_shopgate" => 0,
"is_cancellation_sent_to_shopgate" => 0,
"modified" => "now()",
"created" => "now()",
);
xtc_db_perform(TABLE_SHOPGATE_ORDERS, $ordersShopgateOrder);
. " LEFT JOIN " . TABLE_COUNTRIES . " AS country"
. " ON country.countries_id = address.entry_country_id"
$this->log('method: _insertStatusHistory() ', ShopgateLogger::LOGTYPE_DEBUG);
$this->insertStatusHistory($order, $dbOrderId, $orderData['orders_status']);
. " LEFT JOIN " . TABLE_ZONES . " AS zone"
. " ON address.entry_zone_id = zone.zone_id"
. " AND country.countries_id = zone.zone_country_id"
$this->log('method: _setOrderPayment() ', ShopgateLogger::LOGTYPE_DEBUG);
$this->setOrderPayment($order, $dbOrderId, $orderData['orders_status']);
. " WHERE address.customers_id = " . xtc_db_input($customerData['customers_id']) . ";";
$this->log('method: _insertOrderItems() ', ShopgateLogger::LOGTYPE_DEBUG);
$this->insertOrderItems($order, $dbOrderId, $orderData['orders_status'], $couponModel);
$addressResult = xtc_db_query($qry);
if (empty($addressResult)) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_NO_ADDRESSES_FOUND, 'User: '.$userUtf8);
}
$this->log('method: _insertOrderTotal() ', ShopgateLogger::LOGTYPE_DEBUG);
//todo return product infos for email
$this->insertOrderTotal($order, $dbOrderId, $couponModel);
$addresses = array();
while ($addressData = xtc_db_fetch_array($addressResult)) {
try {
$stateCode = ShopgateXtcMapper::getShopgateStateCode($addressData["countries_iso_code_2"], $addressData["zone_code"]);
} catch (ShopgateLibraryException $e) {
// if state code can't be mapped to ISO use xtc3 state code
$stateCode = $addressData['zone_code'];
}
/**
* Print custom variables in the comments
*/
$orderModel = new ShopgateOrderModel();
$orderModel->setOrderId($dbOrderId);
$orderModel->saveHistory($orderData['orders_status'], $comment);
try {
$address = new ShopgateAddress();
$address->setId($addressData['address_book_id']);
$address->setAddressType(ShopgateAddress::BOTH); // xtc3 doesn't make a difference
$address->setGender($addressData["entry_gender"]);
$address->setFirstName($addressData["entry_firstname"]);
$address->setLastName($addressData["entry_lastname"]);
$address->setCompany($addressData["entry_company"]);
$address->setStreet1($addressData["entry_street_address"]);
$address->setZipcode($addressData["entry_postcode"]);
$address->setCity($addressData["entry_city"]);
$address->setCountry($addressData["countries_iso_code_2"]);
$address->setState($stateCode);
} catch (ShopgateLibraryException $e) {
// don't abort here
}
$this->log('db: update order ', ShopgateLogger::LOGTYPE_DEBUG);
// put default address in front, append the others
if ($address->getId() == $customerData['customers_default_address_id']) {
array_unshift($addresses, $address);
} else {
$addresses[] = $address;
}
}
// Save status in order
$orderUpdateData = array();
$orderUpdateData["orders_status"] = $orderData["orders_status"];
$orderUpdateData["last_modified"] = date('Y-m-d H:i:s');
xtc_db_perform(TABLE_ORDERS, $orderUpdateData, "update", "orders_id = {$dbOrderId}");
try {
$customer = new ShopgateCustomer();
$customer->setCustomerId($customerData["customers_id"]);
$customer->setCustomerNumber($customerData["customers_cid"]);
$customer->setCustomerGroup($customerData['customers_status_name']);
$customer->setCustomerGroupId($customerData['customers_status_id']);
$customer->setGender($customerData["customers_gender"]);
$customer->setFirstName($customerData["customers_firstname"]);
$customer->setLastName($customerData["customers_lastname"]);
$customer->setBirthday($customerData["customers_birthday"]);
$customer->setPhone($customerData["customers_telephone"]);
$customer->setMail($customerData["customers_email_address"]);
$customer->setAddresses($addresses);
$this->log('method: _pushOrderToAfterbuy', ShopgateLogger::LOGTYPE_DEBUG);
$this->pushOrderToAfterbuy($dbOrderId, $order);
$this->log('method: _pushOrderToDreamRobot', ShopgateLogger::LOGTYPE_DEBUG);
$this->pushOrderToDreamRobot($dbOrderId, $order);
// utf-8 encode the values recursively
$customer = $customer->utf8Encode($this->config->getEncoding());
} catch (ShopgateLibraryException $e) {
// don't abort here
if ($this->config->getSendOrderConfirmationMail()) {
$this->sendOrderEmail($dbOrderId, $shopCustomer['customers_id']);
}
$this->log('return: end addOrder()', ShopgateLogger::LOGTYPE_DEBUG);
return $customer;
return array(
'external_order_id' => $dbOrderId,
'external_order_number' => $dbOrderId
);
}
/**
* @see ShopgatePluginCore::addOrder()
*/
public function addOrder(ShopgateOrder $order) {
public function updateOrder(ShopgateOrder $order)
{
// save UTF-8 payment infos (to build proper json)
$paymentInfosUtf8 = $order->getPaymentInfos();
$this->log('start add_order()', ShopgateLogger::LOGTYPE_DEBUG);
// data needs to be utf-8 decoded for äöüß and the like to be saved correctly
/** @var ShopgateOrder $order */
$order = $order->utf8Decode($this->config->getEncoding());
if ($order instanceof ShopgateOrder); // for Eclipse auto-completion
$this->log('db: duplicate_order', ShopgateLogger::LOGTYPE_DEBUG);
// check that the order is not imported already
$qry = "
SELECT
o.*,
so.shopgate_order_number
so.shopgate_order_id,
so.shopgate_order_number,
so.is_paid,
so.is_shipping_blocked,
so.payment_infos
FROM ".TABLE_ORDERS." o
INNER JOIN ".TABLE_SHOPGATE_ORDERS." so ON (so.orders_id = o.orders_id)
WHERE so.shopgate_order_number = '{$order->getOrderNumber()}'
";
$dbOrder = xtc_db_fetch_array( xtc_db_query( $qry ) );
$result = xtc_db_query($qry);
$dbOrder = xtc_db_fetch_array($result);
if(!empty($dbOrder)) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_DUPLICATE_ORDER, 'external_order_number: '. $dbOrder["orders_id"], true);
if ($dbOrder == false) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_ORDER_NOT_FOUND, "Shopgate order number: '{$order->getOrderNumber()}'."
);
}
// retrieve address information
$delivery = $order->getDeliveryAddress();
$invoice = $order->getInvoiceAddress();
$this->log('before ShopgateMapper', ShopgateLogger::LOGTYPE_DEBUG);
$errorOrderStatusIsSent = false;
$errorOrderStatusAlreadySet = array();
$statusShoppingSystemOrderIsPaid = $dbOrder['is_paid'];
$statusShoppingSystemOrderIsShippingBlocked = $dbOrder['is_shipping_blocked'];
$status = $dbOrder["orders_status"];
// map state codes (called "zone id" in shopsystem)
$invoiceStateCode = (!$invoice->getState()) ? null : ShopgateXtcMapper::getXtcStateCode($invoice->getState());
$deliveryStateCode = (!$delivery->getState()) ? null : ShopgateXtcMapper::getXtcStateCode($delivery->getState());
// check if shipping is already done, then throw at end of method a OrderStatusIsSent - Exception
if ($status == $this->config->getOrderStatusShipped()
&& ($statusShoppingSystemOrderIsShippingBlocked
|| $order->getIsShippingBlocked())
) {
$errorOrderStatusIsSent = true;
}
// find customer
$customerId = $order->getExternalCustomerId();
if ($order->getUpdatePayment() == 1) {
$shopCustomer = array();
if (!empty($customerId)) {
$this->log('db: customer', ShopgateLogger::LOGTYPE_DEBUG);
$shopCustomer = xtc_db_fetch_array(xtc_db_query("SELECT * FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '{$customerId}'"));
}
if (empty($shopCustomer)) {
$this->log('create Guest User', ShopgateLogger::LOGTYPE_DEBUG);
$shopCustomer = $this->_createGuestUser($order);
if (!is_null($statusShoppingSystemOrderIsPaid) && $order->getIsPaid() == $statusShoppingSystemOrderIsPaid
&& !is_null($dbOrder['payment_infos'])
&& $dbOrder['payment_infos'] == $this->jsonEncode($paymentInfosUtf8)
) {
$errorOrderStatusAlreadySet[] = 'payment';
}
$phone_number = $order->getMobile();
if(empty($phone_number)) {
$phone_number = $order->getPhone();
}
if (!is_null($statusShoppingSystemOrderIsPaid) && $order->getIsPaid() == $statusShoppingSystemOrderIsPaid) {
// do not update is_paid
} else {
$addressFormat = $this->_getAddressFormatId();
// Save order status
$orderStatus = array();
$orderStatus["orders_id"] = $dbOrder["orders_id"];
$orderStatus["orders_status_id"] = $status;
$orderStatus["date_added"] = date('Y-m-d H:i:s');
$orderStatus["customer_notified"] = false;
if ($order->getIsPaid()) {
$orderStatus['comments'] = 'Bestellstatus von Shopgate geändert: Zahlung erhalten';
} else {
$orderStatus['comments'] = 'Bestellstatus von Shopgate geändert: Zahlung noch nicht erhalten';
}
$this->log('db: customer_status', ShopgateLogger::LOGTYPE_DEBUG);
$orderStatus['comments'] =
$this->stringFromUtf8($orderStatus['comments'], $this->config->getEncoding());
$cStatus = xtc_db_fetch_array(xtc_db_query("SELECT * FROM " . TABLE_CUSTOMERS_STATUS . " WHERE language_id = '{$this->languageId}' AND customers_status_id = '{$shopCustomer["customers_status"]}'"));
if (empty($cStatus)) throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_NO_CUSTOMER_GROUP_FOUND, print_r($shopCustomer,true));
xtc_db_perform(TABLE_ORDERS_STATUS_HISTORY, $orderStatus);
$this->log('db: countries', ShopgateLogger::LOGTYPE_DEBUG);
// update the shopgate order status information
$ordersShopgateOrder = array(
"is_paid" => (int)$order->getIsPaid(),
"modified" => "now()",
);
xtc_db_perform(
TABLE_SHOPGATE_ORDERS, $ordersShopgateOrder, "update",
"shopgate_order_id = {$dbOrder['shopgate_order_id']}"
);
$deliveryCountry = xtc_db_fetch_array(xtc_db_query("SELECT * FROM ".TABLE_COUNTRIES." WHERE countries_iso_code_2 = '{$delivery->getCountry()}'"));
$invoiceCountry = xtc_db_fetch_array(xtc_db_query("SELECT * FROM ".TABLE_COUNTRIES." WHERE countries_iso_code_2 = '{$invoice->getCountry()}'"));
///////////////////////////////////////////////////////////////////////
// Save order
///////////////////////////////////////////////////////////////////////
$orderData = array();
$orderData["customers_id"] = $shopCustomer["customers_id"];
$orderData["customers_cid"] = $shopCustomer["customers_cid"];
$orderData["customers_vat_id"] = $shopCustomer["customers_vat_id"];
$orderData["customers_status"] = $cStatus["customers_status_id"];
$orderData["customers_status_name"] = $cStatus["customers_status_name"];
$orderData["customers_status_image"] = $cStatus["customers_status_image"];
$orderData["customers_status_discount"] = 0;
$orderData["customers_name"] = $invoice->getFirstName()." ".$invoice->getLastName();
$orderData["customers_firstname"] = $invoice->getFirstName();
$orderData["customers_lastname"] = $invoice->getLastName();
$orderData["customers_company"] = $invoice->getCompany();
$orderData["customers_street_address"] = $invoice->getStreet1();
$orderData["customers_suburb"] = "";
$orderData["customers_city"] = $invoice->getCity();
$orderData["customers_postcode"] = $invoice->getZipcode();
$orderData["customers_state"] = $invoiceStateCode;
$orderData["customers_country"] = $invoiceCountry["countries_name"];
$orderData["customers_telephone"] = $phone_number;
$orderData["customers_email_address"] = $order->getMail();
$orderData["customers_address_format_id"] = $addressFormat;
$orderData["delivery_name"] = $delivery->getFirstName()." ".$delivery->getLastName();
$orderData["delivery_firstname"] = $delivery->getFirstName();
$orderData["delivery_lastname"] = $delivery->getLastName();
$orderData["delivery_company"] = $delivery->getCompany();
$orderData["delivery_street_address"] = $delivery->getStreet1();
$orderData["delivery_suburb"] = "";
$orderData["delivery_city"] = $delivery->getCity();
$orderData["delivery_postcode"] = $delivery->getZipcode();
$orderData["delivery_state"] = $deliveryStateCode;
$orderData["delivery_country"] = $deliveryCountry["countries_name"];
$orderData["delivery_country_iso_code_2"] = $delivery->getCountry();
$orderData["delivery_address_format_id"] = $addressFormat;
$orderData["billing_name"] = $invoice->getFirstName()." ".$invoice->getLastName();
$orderData["billing_firstname"] = $invoice->getFirstName();
$orderData["billing_lastname"] = $invoice->getLastName();
$orderData["billing_company"] = $invoice->getCompany();
$orderData["billing_street_address"] = $invoice->getStreet1();
$orderData["billing_suburb"] = "";
$orderData["billing_city"] = $invoice->getCity();
$orderData["billing_postcode"] = $invoice->getZipcode();
$orderData["billing_state"] = $invoiceStateCode;
$orderData["billing_country"] = $invoiceCountry["countries_name"];
$orderData["billing_country_iso_code_2"] = $invoice->getCountry();
$orderData["billing_address_format_id"] = $addressFormat;
$orderData["shipping_method"] = "Pauschal"; // TODO
$orderData["shipping_class"] = "flat_flat"; // TODO
$orderData["cc_type"] = "";
$orderData["cc_owner"] = "";
$orderData["cc_number"] = "";
$orderData["cc_expires"] = "";
$orderData["cc_start"] = "";
$orderData["cc_issue"] = "";
$orderData["cc_cvv"] = "";
$orderData["comments"] = "";
$orderData["last_modified"] = date( 'Y-m-d H:i:s' );
$orderData["date_purchased"] = $order->getCreatedTime( 'Y-m-d H:i:s' );
$orderData["currency"] = $this->currency["code"];
$orderData["currency_value"] = $this->exchangeRate;
$orderData["account_type"] = "";
$orderData["payment_method"] = "shopgate";
$orderData["payment_class"] = "shopgate";
$orderData["customers_ip"] = "";
$orderData["language"] = $this->language;
$orderData["afterbuy_success"] = 0;
$orderData["afterbuy_id"] = 0;
$orderData["refferers_id"] = 0;
$orderData["conversion_type"] = "2";
$orderData["orders_status"] = $this->config->getOrderStatusOpen();
$orderData["orders_date_finished"] = null;
$this->log('db: save order', ShopgateLogger::LOGTYPE_DEBUG);
// Speichere die Bestellung
xtc_db_perform(TABLE_ORDERS,$orderData);
$dbOrderId = xtc_db_insert_id();
$this->log('db: save', ShopgateLogger::LOGTYPE_DEBUG);
$ordersShopgateOrder = array(
"orders_id" => $dbOrderId,
"shopgate_order_number" => $order->getOrderNumber(),
"is_paid" => $order->getIsPaid(),
"is_shipping_blocked" => $order->getIsShippingBlocked(),
"payment_infos" => $this->jsonEncode($paymentInfosUtf8, true),
"is_sent_to_shopgate" => 0,
"modified" => "now()",
"created" => "now()",
);
xtc_db_perform(TABLE_SHOPGATE_ORDERS, $ordersShopgateOrder);
$this->log('method: _insertStatusHistory() ', ShopgateLogger::LOGTYPE_DEBUG);
$this->_insertStatusHistory($order, $dbOrderId, $orderData['orders_status']);
$this->log('method: _setOrderPayment() ', ShopgateLogger::LOGTYPE_DEBUG);
$this->_setOrderPayment($order, $dbOrderId, $orderData['orders_status']);
$this->log('method: _insertOrderItems() ', ShopgateLogger::LOGTYPE_DEBUG);
$this->_insertOrderItems($order, $dbOrderId, $orderData['orders_status']);
$this->log('method: _insertOrderTotal() ', ShopgateLogger::LOGTYPE_DEBUG);
$this->_insertOrderTotal($order, $dbOrderId);
$this->log('db: update order ', ShopgateLogger::LOGTYPE_DEBUG);
// Save status in order
$orderUpdateData = array();
$orderUpdateData["orders_status"] = $orderData["orders_status"];
$orderUpdateData["last_modified"] = date( 'Y-m-d H:i:s' );
xtc_db_perform(TABLE_ORDERS,$orderUpdateData, "update", "orders_id = {$dbOrderId}");
$this->log('method: _pushOrderToAfterbuy', ShopgateLogger::LOGTYPE_DEBUG);
$this->_pushOrderToAfterbuy($dbOrderId, $order);
$this->log('method: _pushOrderToDreamRobot', ShopgateLogger::LOGTYPE_DEBUG);
$this->_pushOrderToDreamRobot($dbOrderId, $order);
$this->log('return: end addOrder()', ShopgateLogger::LOGTYPE_DEBUG);
return array(
'external_order_id'=>$dbOrderId,
'external_order_number'=>$dbOrderId
);
}
public function updateOrder(ShopgateOrder $order) {
// save UTF-8 payment infos (to build proper json)
$paymentInfosUtf8 = $order->getPaymentInfos();
// data needs to be utf-8 decoded for äöüß and the like to be saved correctly
$order = $order->utf8Decode($this->config->getEncoding());
if ($order instanceof ShopgateOrder); // for Eclipse auto-completion
$qry = "
SELECT
o.*,
so.shopgate_order_id,
so.shopgate_order_number,
so.is_paid,
so.is_shipping_blocked,
so.payment_infos
FROM ".TABLE_ORDERS." o
INNER JOIN ".TABLE_SHOPGATE_ORDERS." so ON (so.orders_id = o.orders_id)
WHERE so.shopgate_order_number = '{$order->getOrderNumber()}'
";
$dbOrder = xtc_db_fetch_array( xtc_db_query( $qry ) );
if($dbOrder == false){
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_ORDER_NOT_FOUND, "Shopgate order number: '{$order->getOrderNumber()}'.");
}
$errorOrderStatusIsSent = false;
$errorOrderStatusAlreadySet = array();
$statusShoppingsystemOrderIsPaid = $dbOrder['is_paid'];
$statusShoppingsystemOrderIsShippingBlocked = $dbOrder['is_shipping_blocked'];
$status = $dbOrder["orders_status"];
if( $order->getUpdatePayment() == 1 ) {
if(!is_null($statusShoppingsystemOrderIsPaid) && $order->getIsPaid() == $statusShoppingsystemOrderIsPaid &&
!is_null($dbOrder['payment_infos']) && $dbOrder['payment_infos'] == $this->jsonEncode($paymentInfosUtf8)){
$errorOrderStatusAlreadySet[] = 'payment';
}
if(!is_null($statusShoppingsystemOrderIsPaid) && $order->getIsPaid() == $statusShoppingsystemOrderIsPaid){
// do not update is_paid
} else {
if ($status == $this->config->getOrderStatusShipped()) {
$errorOrderStatusIsSent = true;
} else {
// do not change status
}
// Save order status
$orderStatus = array();
$orderStatus["orders_id"] = $dbOrder["orders_id"];
$orderStatus["orders_status_id"] = $status;
$orderStatus["date_added"] = date( 'Y-m-d H:i:s');
$orderStatus["customer_notified"] = false;
if($order->getIsPaid()) {
$orderStatus['comments'] = 'Bestellstatus von Shopgate geändert: Zahlung erhalten';
} else {
$orderStatus['comments'] = 'Bestellstatus von Shopgate geändert: Zahlung noch nicht erhalten';
}
$orderStatus['comments'] = $this->stringFromUtf8($orderStatus['comments'], $this->config->getEncoding());
xtc_db_perform(TABLE_ORDERS_STATUS_HISTORY,$orderStatus);
// update the shopgate order status information
$ordersShopgateOrder = array(
"is_paid" => (int)$order->getIsPaid(),
"modified" => "now()",
);
xtc_db_perform(TABLE_SHOPGATE_ORDERS, $ordersShopgateOrder, "update", "shopgate_order_id = {$dbOrder['shopgate_order_id']}");
// update var
$statusShoppingsystemOrderIsPaid = $order->getIsPaid();
// update var
$statusShoppingSystemOrderIsPaid = $order->getIsPaid();
// Save status in order
$orderData = array();
$orderData["orders_status"] = $status;
ca. Zeile 1440
}
// update paymentinfos
if(!is_null($dbOrder['payment_infos']) && $dbOrder['payment_infos'] != $this->jsonEncode($paymentInfosUtf8)){
if (!is_null($dbOrder['payment_infos'])
&& $dbOrder['payment_infos'] != $this->jsonEncode(
$paymentInfosUtf8
)
) {
$dbPaymentInfos = $this->jsonDecode($dbOrder['payment_infos'], true);
$paymentInfos = $order->getPaymentInfos();
$dbPaymentInfo = $this->jsonDecode($dbOrder['payment_infos'], true);
$paymentInfo = $order->getPaymentInfos();
$histories = array();
switch($order->getPaymentMethod()) {
case ShopgateOrder::SHOPGATE:
ca. Zeile 1453
case ShopgateOrder::COD:
break;
case ShopgateOrder::PREPAY:
if(isset($dbPaymentInfos['purpose']) && $paymentInfos['purpose'] != $dbPaymentInfos['purpose']){
$comments = $this->stringFromUtf8("Shopgate: Zahlungsinformationen wurden aktualisiert: \n\nDer Kunde wurde angewiesen Ihnen das Geld mit dem Verwendungszweck \"", $this->config->getEncoding());
$comments .= $paymentInfos["purpose"];
$comments .= $this->stringFromUtf8("\" auf Ihr Bankkonto zu überweisen", $this->config->getEncoding());
if (isset($dbPaymentInfo['purpose'])
&& $paymentInfo['purpose'] != $dbPaymentInfo['purpose']
) {
$comments = $this->stringFromUtf8(
"Shopgate: Zahlungsinformationen wurden aktualisiert: \n\nDer Kunde wurde angewiesen Ihnen das Geld mit dem Verwendungszweck \"",
$this->config->getEncoding()
);
$comments .= $paymentInfo["purpose"];
$comments .= $this->stringFromUtf8(
"\" auf Ihr Bankkonto zu überweisen", $this->config->getEncoding()
);
// Order is not paid yet
$histories[] = array(
"orders_id"=> $dbOrder["orders_id"],
"orders_status_id"=>$status,
"date_added"=>date( 'Y-m-d H:i:s'),
"customer_notified"=>false,
"comments"=>xtc_db_prepare_input($comments)
"comments" => ShopgateWrapper::db_prepare_input($comments)
);
}
break;
ca. Zeile 1475
SELECT
*
FROM banktransfer b
WHERE b.orders_id = '{$dbOrder['orders_id']}'";
$dbBanktransfer = xtc_db_fetch_array( xtc_db_query( $qry ) );
$result = xtc_db_query($qry);
$dbBanktransfer = xtc_db_fetch_array($result);
if(!empty($dbBanktransfer)){
$banktransferData = array();
$banktransferData["banktransfer_owner"] = $paymentInfos["bank_account_holder"];
$banktransferData["banktransfer_number"] = $paymentInfos["bank_account_number"];
$banktransferData["banktransfer_bankname"] = $paymentInfos["bank_name"];
$banktransferData["banktransfer_blz"] = $paymentInfos["bank_code"];
xtc_db_perform("banktransfer", $banktransferData, "update", "orders_id = {$dbOrder['orders_id']}");
$banktransferData["banktransfer_owner"] = $paymentInfo["bank_account_holder"];
$banktransferData["banktransfer_number"] = $paymentInfo["bank_account_number"];
$banktransferData["banktransfer_bankname"] = $paymentInfo["bank_name"];
$banktransferData["banktransfer_blz"] = $paymentInfo["bank_code"];
xtc_db_perform(
"banktransfer", $banktransferData, "update", "orders_id = {$dbOrder['orders_id']}"
);
$comments = $this->stringFromUtf8("Shopgate: Zahlungsinformationen wurden aktualisiert: \n\n", $this->config->getEncoding());
$comments .= $this->_createPaymentInfos($paymentInfos, $dbOrder['orders_id'], $status, false);
$comments = $this->stringFromUtf8(
"Shopgate: Zahlungsinformationen wurden aktualisiert: \n\n",
$this->config->getEncoding()
);
$comments .= $this->createPaymentInfos(
$paymentInfo, $dbOrder['orders_id'], $status, false
);
$histories[] = array(
"orders_id"=> $dbOrder["orders_id"],
"orders_status_id"=>$status,
"date_added"=>date( 'Y-m-d H:i:s'),
"customer_notified"=>false,
"comments"=>xtc_db_prepare_input($comments)
"comments" => ShopgateWrapper::db_prepare_input($comments)
);
}
break;
case ShopgateOrder::PAYPAL:
// Save paymentinfos in history
$history = $this->_createPaymentInfos($paymentInfos, $dbOrder["orders_id"], $status);
$history['comments'] = $this->stringFromUtf8("Shopgate: Zahlungsinformationen wurden aktualisiert: \n\n", $this->config->getEncoding()).$history['comments'];
// Save payment info in history
$history =
$this->createPaymentInfos($paymentInfo, $dbOrder["orders_id"], $status);
$history['comments'] = $this->stringFromUtf8(
"Shopgate: Zahlungsinformationen wurden aktualisiert: \n\n",
$this->config->getEncoding()
) . $history['comments'];
$histories[] = $history;
break;
default:
// mobile_payment
// Save paymentinfos in history
$history = $this->_createPaymentInfos($paymentInfos, $dbOrder["orders_id"], $status);
$history['comments'] = $this->stringFromUtf8("Shopgate: Zahlungsinformationen wurden aktualisiert: \n\n", $this->config->getEncoding()).$history['comments'];
$history =
$this->createPaymentInfos($paymentInfo, $dbOrder["orders_id"], $status);
$history['comments'] = $this->stringFromUtf8(
"Shopgate: Zahlungsinformationen wurden aktualisiert: \n\n",
$this->config->getEncoding()
) . $history['comments'];
$histories[] = $history;
break;
}
ca. Zeile 1526
$ordersShopgateOrder = array(
"payment_infos" => $this->jsonEncode($paymentInfosUtf8),
"modified" => "now()",
);
xtc_db_perform(TABLE_SHOPGATE_ORDERS, $ordersShopgateOrder, "update", "shopgate_order_id = {$dbOrder['shopgate_order_id']}");
xtc_db_perform(
TABLE_SHOPGATE_ORDERS, $ordersShopgateOrder, "update",
"shopgate_order_id = {$dbOrder['shopgate_order_id']}"
);
}
if($order->getUpdateShipping() == 1){
if(!is_null($statusShoppingsystemOrderIsShippingBlocked) && $order->getIsShippingBlocked() == $statusShoppingsystemOrderIsShippingBlocked){
if (!is_null($statusShoppingSystemOrderIsShippingBlocked)
&& $order->getIsShippingBlocked() == $statusShoppingSystemOrderIsShippingBlocked
) {
$errorOrderStatusAlreadySet[] = 'shipping';
} else {
if($status == $this->config->getOrderStatusShipped()){
$errorOrderStatusIsSent = true;
} else {
if ($status != $this->config->getOrderStatusShipped()) {
if($order->getIsShippingBlocked() == 1){
$status = $this->config->getOrderStatusShippingBlocked();
} else {
$status = $this->config->getOrderStatusOpen();
ca. Zeile 1557
} else {
$orderStatus['comments'] = 'Bestellstatus von Shopgate geändert: Versand ist blockiert!';
}
$orderStatus['comments'] = $this->stringFromUtf8($orderStatus['comments'], $this->config->getEncoding());
$orderStatus['comments'] =
$this->stringFromUtf8($orderStatus['comments'], $this->config->getEncoding());
xtc_db_perform(TABLE_ORDERS_STATUS_HISTORY,$orderStatus);
$ordersShopgateOrder = array(
"is_shipping_blocked" => (int)$order->getIsShippingBlocked(),
"modified" => "now()",
);
xtc_db_perform(TABLE_SHOPGATE_ORDERS, $ordersShopgateOrder, "update", "shopgate_order_id = {$dbOrder['shopgate_order_id']}");
$statusShoppingsystemOrderIsShippingBlocked = $order->getIsShippingBlocked();
xtc_db_perform(
TABLE_SHOPGATE_ORDERS, $ordersShopgateOrder, "update",
"shopgate_order_id = {$dbOrder['shopgate_order_id']}"
);
// Save status in order
$orderData = array();
$orderData["orders_status"] = $status;
$orderData["last_modified"] = date( 'Y-m-d H:i:s' );
xtc_db_perform(TABLE_ORDERS,$orderData, "update", "orders_id = {$dbOrder['orders_id']}");
$this->_pushOrderToAfterbuy($dbOrder["orders_id"], $order);
$this->_pushOrderToDreamRobot($dbOrder["orders_id"], $order);
$this->pushOrderToAfterbuy($dbOrder["orders_id"], $order);
$this->pushOrderToDreamRobot($dbOrder["orders_id"], $order);
}
}
if($errorOrderStatusIsSent){
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_ORDER_STATUS_IS_SENT);
}
if(!empty($errorOrderStatusAlreadySet)){
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_ORDER_ALREADY_UP_TO_DATE, implode(',', $errorOrderStatusAlreadySet), true);
}
if (!empty($errorOrderStatusAlreadySet)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_ORDER_ALREADY_UP_TO_DATE, implode(',', $errorOrderStatusAlreadySet),
true
);
}
return array(
'external_order_id' => $dbOrder["orders_id"],
'external_order_number' => $dbOrder["orders_id"]
);
}
protected function createReviewsCsv()
{
$reviewModel = new ShopgateReviewModel();
$reviewModel->setLanguageId($this->languageId);
$limit = 10;
$page = 1;
$offset = ($page - 1) * $limit;
while ($query = xtc_db_query($reviewModel->getReviewQuery($limit, $offset))) {
$count = xtc_db_num_rows($query);
if ($count == 0) {
break;
}
$reviews = array();
while ($entry = xtc_db_fetch_array($query)) {
$review = $this->buildDefaultReviewRow();
$review['item_number'] = $entry['products_id'];
$review['update_review_id'] = $entry['reviews_id'];
$review['score'] = $entry['reviews_rating'] * 2;
$review['name'] = $entry['customers_name'];
$review['date'] = $entry['date_added'];
$review['title'] = '';
$review['text'] = $entry['reviews_text'];
$reviews[] = $review;
}
foreach ($reviews as $review) {
$this->addReviewRow($review);
}
$page++;
$offset = ($page - 1) * $limit;
}
}
public function getSettings()
{
$customerModel = new ShopgateCustomerModel($this->config, $this->languageId);
$customerGroups = $customerModel->getCustomerGroups();
// Tax rates are pretty much a combination of tax rules and tax rates in osCommerce. So we're using them to generate both:
$oscTaxRates = $this->getTaxRates();
$customerTaxClass = array(
'id' => "1",
'key' => 'default',
'is_default' => "1");
$taxRates = array();
$taxRules = array();
foreach ($oscTaxRates as $oscTaxRate) {
// build and append tax rate
$taxRates[] = array(
'id' => $oscTaxRate['countries_iso_code_2'] . '-' . $oscTaxRate['tax_rates_id'],
'key' => $oscTaxRate['countries_iso_code_2'] . '-' . $oscTaxRate['tax_rates_id'],
'display_name' => $oscTaxRate['tax_description'],
'tax_percent' => $oscTaxRate['tax_rate'],
'country' => $oscTaxRate['countries_iso_code_2'],
'state' => (!empty($oscTaxRate['countries_iso_code_2']) && !empty($oscTaxRate['zone_code']))
? ShopgateXtcMapper::getShopgateStateCode(
$oscTaxRate['countries_iso_code_2'], $oscTaxRate['zone_code']
)
: '',
'zip_code_type' => 'all',
);
// build and append tax rule
if (!empty($taxRules[$oscTaxRate['tax_rates_id']])) {
$taxRules[$oscTaxRate['tax_rates_id']]['tax_rates'][] = array(
// one rate per rule (since rates are in fact also rules) in xtModified
'id' => $oscTaxRate['countries_iso_code_2'] . '-' . $oscTaxRate['tax_rates_id'],
'key' => $oscTaxRate['countries_iso_code_2'] . '-' . $oscTaxRate['tax_rates_id'],
);
} else {
$taxRules[$oscTaxRate['tax_rates_id']] = array(
'id' => $oscTaxRate['tax_rates_id'],
'name' => $oscTaxRate['tax_description'],
'priority' => $oscTaxRate['tax_priority'],
'product_tax_classes' => array(
array(
'id' => $oscTaxRate['tax_class_id'],
'key' => $oscTaxRate['tax_class_title'],
)
),
'customer_tax_classes' => array(
array(
'id' => 1,
'key' => 'default'
)
),
'tax_rates' => array(
array(
'id' => $oscTaxRate['countries_iso_code_2'] . '-' . $oscTaxRate['tax_rates_id'],
'key' => $oscTaxRate['countries_iso_code_2'] . '-' . $oscTaxRate['tax_rates_id'],
)
),
);
}
}
return array(
'customer_groups' => $customerGroups,
'tax' => array(
'product_tax_classes' => $this->getTaxClasses(),
'customer_tax_classes' => array($customerTaxClass),
'tax_rates' => $taxRates,
'tax_rules' => $taxRules,
),
);
}
public function createShopInfo()
{
$shopInfo = array();
$productCountQuery = "SELECT count(*) cnt FROM " . TABLE_PRODUCTS . " AS p WHERE p.products_status = 1";
$result = xtc_db_query($productCountQuery);
$row = xtc_db_fetch_array($result);
$shopInfo['item_count'] = $row['cnt'];
$catQry = "SELECT count(*) cnt FROM " . TABLE_CATEGORIES;
$result = xtc_db_query($catQry);
$row = xtc_db_fetch_array($result);
$shopInfo['category_count'] = $row['cnt'];
$revQry = "SELECT COUNT(*) AS cnt FROM " . TABLE_REVIEWS;
$result = xtc_db_query($revQry);
$row = xtc_db_fetch_array($result);
$shopInfo['review_count'] = $row['cnt'];
// Not provided by Osc
$shopInfo['plugins_installed '] = array();
return $shopInfo;
}
public function checkCart(ShopgateCart $cart)
{
$locationModel = new ShopgateLocationModel();
$cartItemModel = new ShopgateItemCartModel();
$customerModel = new ShopgateCustomerModel($this->config, $this->languageId);
$customer = $customerModel->getCustomerById($cart->getExternalCustomerId());
$customerGroupId = (empty($customer) && empty($customer['customers_status'])
? DEFAULT_CUSTOMERS_STATUS_ID
: $customer['customers_status']);
$includeXtcFiles = array(
"/inc/xtc_get_tax_class_id.inc.php",
"/inc/xtc_get_products_stock.inc.php",
);
foreach ($includeXtcFiles as $xtcFile) {
$file = rtrim(DIR_FS_CATALOG, "/") . $xtcFile;
if (file_exists($file)) {
include_once $file;
}
}
$result["shipping_methods"] = $this->getShipping($cart, $locationModel, $cartItemModel);
$result["currency"] = $this->config->getCurrency();
$result["items"] = $this->checkCartItems($cart, $customerGroupId);
$result['external_coupons'] = $this->checkCoupons($cart, $customerGroupId);
$customerId = $cart->getExternalCustomerId();
if (!empty($customerId)) {
$result["customer"] = $this->getCustomerById($customerId);
}
return $result;
}
/**
* check the validity of coupons
*
* @param ShopgateCart $cart
* @param int $customerGroupId
*
* @return array
*/
public function checkCoupons(ShopgateCart $cart, $customerGroupId)
{
if (!defined("MODULE_ORDER_TOTAL_COUPON_STATUS") || MODULE_ORDER_TOTAL_COUPON_STATUS !== "true") {
return array();
}
$result = array();
$couponModel = new ShopgateCouponModel(
$this->config, $this->languageId, $this->language, $this->currency, $this->countryId
);
$cartItemModel = new ShopgateItemCartModel();
$orderAmount = $cartItemModel->getCompleteAmount($cart);
foreach ($cart->getExternalCoupons() as $sgCoupon) {
$coupon = $couponModel->getCouponByCode($sgCoupon->getCode());
if (empty($coupon)) {
$sgCoupon->setNotValidMessage(ShopgateLibraryException::COUPON_CODE_NOT_VALID);
$sgCoupon->setIsValid(false);
$result[] = $sgCoupon;
continue;
}
$validationResult = $couponModel->validateCoupon($cart, $cartItemModel, $coupon, $orderAmount);
if (!empty($validationResult)) {
$sgCoupon->setNotValidMessage($validationResult);
$sgCoupon->setIsValid(false);
} else {
$sgCoupon->setIsValid(true);
$couponModel->setCouponData($coupon, $sgCoupon, $cart, $cartItemModel, $customerGroupId);
}
$result[] = $sgCoupon;
}
$reverse = array_reverse($result);
$validCouponFound = false;
/** @var ShopgateExternalCoupon $cp */
foreach ($reverse as $cp) {
if ($cp->getIsValid()) {
if (!$validCouponFound) {
$validCouponFound = true;
} else {
$cp->setIsValid(false);
}
}
}
return $result;
}
public function redeemCoupons(ShopgateCart $cart)
{
}
public function cron($jobname, $params, &$message, &$errorcount)
{
switch ($jobname) {
case 'set_shipping_completed':
$this->cronSetOrdersShippingCompleted($message, $errorcount);
break;
case 'cancel_orders':
$this->cronCancelOrders($message, $errorcount);
break;
default:
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_CRON_UNSUPPORTED_JOB, 'Job name: "' . $jobname . '"', true
);
}
}
public function checkStock(ShopgateCart $cart)
{
$includeXtcFiles = array(
"/inc/xtc_get_tax_class_id.inc.php",
"/inc/xtc_get_products_stock.inc.php",
);
foreach ($includeXtcFiles as $xtcFile) {
$file = rtrim(DIR_FS_CATALOG, "/") . $xtcFile;
if (file_exists($file)) {
include_once $file;
}
}
$result = array();
$itemModel = new ShopgateItemModel($this->config);
$itemModel->setLanguageId($this->languageId);
$itemModel->setStringHelper($this->getHelper(ShopgateObject::HELPER_STRING));
foreach ($cart->getItems() as $orderItem) {
$sgCartItem = new ShopgateCartItem();
$sgOrderInfos = $this->jsonDecode($orderItem->getInternalOrderInfo(), true);
$id = $itemModel->getProductIdFromOrderItem($orderItem);
$sgCartItem->setItemNumber($id);
$quantity = xtc_get_products_stock($id);
$sgCartItem->setStockQuantity($quantity);
$status = $this->xtc_get_products_status($id);
$sgCartItem->setIsBuyable($status);
if (!$status) {
$sgCartItem->setIsBuyable(false);
$sgCartItem->setStockQuantity(0);
$sgCartItem->setError(ShopgateLibraryException::CART_ITEM_PRODUCT_NOT_FOUND);
$result[] = $sgCartItem;
continue;
}
if (STOCK_CHECK == 'true' && STOCK_ALLOW_CHECKOUT == 'false') {
if ($quantity <= 0) {
$sgCartItem->setIsBuyable(false);
$sgCartItem->setStockQuantity(0);
$sgCartItem->setError(ShopgateLibraryException::CART_ITEM_OUT_OF_STOCK);
$result[] = $sgCartItem;
continue;
}
if ($quantity < $orderItem->getQuantity()) {
$sgCartItem->setIsBuyable(true);
$sgCartItem->setError(ShopgateLibraryException::CART_ITEM_REQUESTED_QUANTITY_NOT_AVAILABLE);
$result[] = $sgCartItem;
continue;
}
}
$orderItemTaxClassId = xtc_get_tax_class_id($id);
$orderItemTaxRate = xtc_get_tax_rate(
$orderItemTaxClassId, $this->countryId, $this->zoneId
);
$attributeIds = array();
foreach ($sgOrderInfos as $infoName => $infoValue) {
if (strpos($infoName, "attribute_") === 0) {
if (is_array($infoValue)) {
foreach ($infoValue as $attributeKey => $attributeArray) {
$attributeIds[] = array_merge(
array("products_attributes_id" => $attributeKey),
$attributeArray
);
}
}
}
}
$sgCartItem->setOptions(
$itemModel->getOptionsToProduct(
$id, $attributeIds, $orderItemTaxRate
)
);
$sgCartItem->setAttributes($itemModel->getAttributesToProduct($orderItem));
// not supported
$sgCartItem->setInputs(array());
$result[] = $sgCartItem;
}
return $result;
}
protected function createCategories($limit = null, $offset = null, array $uids = array())
{
$model = new ShopgateCategoryXmlModel();
$model->setLanguageId($this->languageId);
$maxOrder = $model->getCategoryMaxOrder($this->config->getReverseCategoriesSortOrder());
$this->buildCategoriesTree(0, $maxOrder, 'xml', $limit, $offset, $uids);
if ($this->config->getExportNewProductsCategory()) {
/** @var mixed[] $row */
$row = $this->buildDefaultCategoryRow();
$row['parent_id'] = '';
$row['category_number'] =
$this->config->getExportNewProductsCategoryId();
$row['category_name'] = 'Neue Produkte';
$row["is_active"] = 1;
$row['url_deeplink'] = xtc_href_link('products_new.php');
$this->addCategoryRow($row);
}
}
public function getOrders(
$customerToken, $customerLanguage, $limit = 10, $offset = 0, $orderDateFrom = '', $sortOrder = 'created_desc'
) {
$orderModel = new ShopgateCustomerOrderModel($this->config, $this->languageId);
return $orderModel->getOrders($customerToken, $customerLanguage, $limit, $offset, $orderDateFrom, $sortOrder);
}
protected function createMediaCsv()
{
// TODO: Implement createMediaCsv() method.
}
protected function createItems($limit = null, $offset = null, array $uids = array())
{
$customerModel = new ShopgateCustomerModel($this->config, $this->languageId);
$itemXmlModel = new ShopgateItemXmlModel($this->config);
$itemXmlModel->setLanguageId($this->languageId);
$itemXmlModel->setDefaultCustomerPriceGroup(DEFAULT_CUSTOMERS_STATUS_ID_GUEST);
$itemXmlModel->setExportLimit($limit);
$itemXmlModel->setExportOffset($offset);
$itemXmlModel->setCountryId($this->countryId);
$itemXmlModel->setZoneId($this->zoneId);
$itemXmlModel->setExchangeRate($this->exchangeRate);
$itemXmlModel->setCurrencyData($this->currency);
$itemXmlModel->setStringHelper($this->getHelper(ShopgateObject::HELPER_STRING));
$itemXmlModel->setReverseItemSortOrder($this->config->getReverseItemsSortOrder());
$itemXmlModel->setLog(ShopgateLogger::getInstance());
$_SESSION['languages_id'] = $this->languageId;
$_SESSION['country'] = $this->countryId;
$xtPricesByCustomerGroups = array();
foreach ($customerModel->getCustomerGroups() as $customerGroup) {
// In modified will be checked if the customer group id is empty on price calculation.
// In this case the default group id will be set. This causes that one group will be exported twice.
// This causes issues.(Group with id zero is admin group.)
if ($customerGroup['id'] == 0) {
continue;
}
$xtPricesByCustomerGroups[$customerGroup['id']] =
new xtcPrice($this->currency['code'], $customerGroup['id']);
$xtPricesByCustomerGroups[$customerGroup['id']]->cStatus['customers_status_show_price_tax'] = 1;
}
$itemXmlModel->setXtPricesByCustomerGroups($xtPricesByCustomerGroups);
$result = ShopgateWrapper::db_query($itemXmlModel->getProductQuery($uids));
while ($item = ShopgateWrapper::db_fetch_array($result)) {
$actualXmlModel = clone $itemXmlModel;
$actualXmlModel->setItem($item);
$this->addItemModel($actualXmlModel->generateData());
}
}
public function syncFavouriteList($customerToken, $items)
{
// TODO: Implement syncFavouriteList() method.
}
protected function createReviews($limit = null, $offset = null, array $uids = array())
{
$model = new ShopgateReviewXmlModel($this->config);
$model->setLanguageId($this->languageId);
$query = $model->getReviewQuery($limit, $offset, $uids);
$result = ShopgateWrapper::db_query($query);
while ($row = ShopgateWrapper::db_fetch_array($result)) {
$actualDataModel = clone $model;
$actualDataModel->setItem($row);
$this->addReviewModel($actualDataModel->generateData());
}
}
/**
* parses the version number out of a string like
* 'modified eCommerce Shopssoftware v1.06 rev 4642 SP2 dated: 2014-08-12'
*
* @param string $versionString
*
* @return string
*/
private function getVersionNumber($versionString)
{
$pattern = '#v([0-9]+\.[0-9]+)#';
if (preg_match($pattern, $versionString, $matches) && !empty($matches[1])) {
return $matches[1];
}
$pattern = '#^([0-9]+\.[0-9]+)(\.[0-9]+)*$#';
if (preg_match($pattern, $versionString, $matches) && !empty($matches[1])) {
return $matches[1];
}
return '1.00';
}
/**
* generates a customer token if no exist
*
* @param array $customerData
*
* @return bool|string
*/
private function getCustomerToken($customerData)
{
$customerModel = new ShopgateCustomerModel($this->config, $this->languageId);
if (!$customerModel->hasCustomerToken($customerData["customers_id"])) {
return $customerModel->insertToken(
$customerData["customers_id"], $customerData["customers_email_address"]
);
}
return $customerModel->getCustomerToken($customerData["customers_id"]);
}
/**
* get all products to the virtual category "special products"
*
* @var ShopgateItemModel $itemModel
* @return array
*/
private function getSpecialProducts($itemModel)
{
$result = array();
$specialProductsResult = xtc_db_query($itemModel->getProductsToSpecialCategoryQuery());
while ($specialProduct = xtc_db_fetch_array($specialProductsResult)) {
$result[] = $specialProduct;
}
return $result;
}
/**
* get all products to the virtual category "new products"
*
* @var ShopgateItemModel $itemModel
* @return array
*/
private function getNewProducts($itemModel)
{
$result = array();
$newProductsResult = xtc_db_query($itemModel->getProductsToNewCategoryQuery());
while ($products_new = xtc_db_fetch_array($newProductsResult)) {
$result[] = $products_new;
}
return $result;
}
/**
* tax classes
*
* @return array
* @throws ShopgateLibraryException
*/
protected function getTaxClasses()
{
$sqlQuery = "SELECT `tbl_tc`.`tax_class_id` 'id', `tbl_tc`.`tax_class_title` 'key' FROM `" . TABLE_TAX_CLASS
. "` AS tbl_tc";
$queryResult = xtc_db_query($sqlQuery);
$result = array();
if (!$queryResult) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_DATABASE_ERROR, "Shopgate Plugin - Error selecting.", true
);
} else {
while ($row = xtc_db_fetch_array($queryResult)) {
foreach ($row AS &$value) {
$value = utf8_encode($value);
}
array_push($result, $row);
}
}
return $result;
}
/**
* get tax rates
*
* @return array<string, mixed>[]
* @throws ShopgateLibraryException
*/
protected function getTaxRates()
{
$query =
"SELECT tr.tax_rates_id, tr.tax_description, tr.tax_rate, tr.tax_priority, " .
"c.countries_iso_code_2, z.zone_code, tc.tax_class_id, tc.tax_class_title " .
"FROM `" . TABLE_TAX_RATES . "` AS tr " .
"JOIN `" . TABLE_GEO_ZONES . "` AS gz ON tr.tax_zone_id = gz.geo_zone_id " .
"JOIN `" . TABLE_ZONES_TO_GEO_ZONES . "` AS ztgz ON gz.geo_zone_id = ztgz.geo_zone_id " .
"JOIN `" . TABLE_COUNTRIES . "` AS c ON ztgz.zone_country_id = c.countries_id " .
"LEFT OUTER JOIN `" . TABLE_ZONES . "` AS z ON ztgz.zone_id = z.zone_id "
. // zone (aka state) might not be mapped, rate applies for whole country in that case
"JOIN `" . TABLE_TAX_CLASS . "` tc ON tr.tax_class_id = tc.tax_class_id;";
$result = xtc_db_query($query);
if (!$result) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_DATABASE_ERROR, "Shopgate Plugin - Error selecting.", true
);
}
$taxRates = array();
while ($row = xtc_db_fetch_array($result)) {
foreach ($row AS &$value) {
$value = utf8_encode($value);
}
$taxRates[] = $row;
}
return $taxRates;
}
/**
* return an array with all valid shipping methods to an order
*
* @param ShopgateCart $sgShoppingCart
* @param ShopgateLocationModel $locationModel
* @param ShopgateItemCartModel $cartItemModel
*
* @return array
*/
private function getShipping(
ShopgateCart $sgShoppingCart, ShopgateLocationModel $locationModel, ShopgateItemCartModel $cartItemModel
) {
$this->log("Start getting the shop system's shipping methods.", ShopgateLogger::LOGTYPE_DEBUG);
$resultShippingMethods = array();
$sgDeliveryAddress = $sgShoppingCart->getDeliveryAddress();
if (empty($sgDeliveryAddress) || !defined('MODULE_SHIPPING_INSTALLED') || MODULE_SHIPPING_INSTALLED == "") {
return $resultShippingMethods;
}
/* include globals */
global $total_count, $total_weight,
$shipping_num_boxes, $cart, $order, $sendto, $billto, $ot_shipping;
$neededFilesFromShopSystem = array(
"/shopping_cart.php",
"/order.php",
"/order_total/ot_shipping.php",
"/shipping.php"
);
foreach ($neededFilesFromShopSystem as $file) {
if (file_exists(rtrim(DIR_WS_CLASSES, "/") . $file)) {
include_once(rtrim(DIR_WS_CLASSES, "/") . $file);
}
if (file_exists(rtrim(DIR_WS_MODULES, "/") . $file)) {
include_once(rtrim(DIR_WS_MODULES, "/") . $file);
}
}
$total_count = count($sgShoppingCart->getItems());
$total_weight = 0;
if ($total_count > 0) {
$total_weight = $cartItemModel->getProductsWeight($sgShoppingCart->getItems());
}
$shipping_num_boxes = 1;
$cart = new shoppingCart();
foreach ($sgShoppingCart->getItems() as $product) {
$options = $product->getOptions();
$sgOptions = array();
$itemNumber = !is_null($product->getParentItemNumber())
? $product->getParentItemNumber()
: $product->getItemNumber();
foreach ($options as $option) {
$sgOptions[$option->getOptionNumber()] = $option->getValueNumber();
}
$cart->add_cart($itemNumber, $product->getQuantity(), $sgOptions);
}
if (is_array($_SESSION)) {
$_SESSION['cart'] = $cart;
}
$country = $locationModel->getCountryByIso2Name($sgDeliveryAddress->getCountry());
$zone = $locationModel->getZoneByCountryId($country["countries_id"]);
$deliveryPostcode = $sgDeliveryAddress->getZipcode();
$sendto = array(
"firstname" => $sgDeliveryAddress->getFirstName(),
"lastname" => $sgDeliveryAddress->getLastName(),
"company" => $sgDeliveryAddress->getCompany(),
"street_address" => $sgDeliveryAddress->getStreet1(),
"suburb" => "",
"postcode" => $deliveryPostcode,
"city" => $sgDeliveryAddress->getCity(),
"zone_id" => $zone["zone_id"],
"zone_name" => $zone["zone_name"],
"country_id" => $country["countries_id"],
"country_iso_code_2" => $country["countries_iso_code_2"],
"country_iso_code_3" => $country["countries_iso_code_3"],
"address_format_id" => "",
);
$sgInvoiceAddress = $sgShoppingCart->getInvoiceAddress();
if (empty($sgInvoiceAddress)) {
$billto = $sendto;
} else {
$country = $locationModel->getCountryByIso2Name($sgInvoiceAddress->getCountry());
$zone = $locationModel->getZoneByCountryId($country["countries_id"]);
$postcode = $sgInvoiceAddress->getZipcode();
$billto = array(
"firstname" => $sgInvoiceAddress->getFirstName(),
"lastname" => $sgInvoiceAddress->getLastName(),
"company" => $sgInvoiceAddress->getCompany(),
"street_address" => $sgInvoiceAddress->getStreet1(),
"suburb" => "",
"postcode" => $postcode,
"city" => $sgInvoiceAddress->getCity(),
"zone_id" => $zone["zone_id"],
"zone_name" => $zone["zone_name"],
"country_id" => $country["countries_id"],
"country_iso_code_2" => $country["countries_iso_code_2"],
"country_iso_code_3" => $country["countries_iso_code_3"],
"address_format_id" => "",
);
}
$order = new order();
$order->cart();
$order->delivery['country']['iso_code_2'] = $country["countries_iso_code_2"];
$order->delivery['country']['id'] = $country["countries_id"];
$order->delivery['country']['zone_id'] = $zone["zone_id"];
$order->delivery['postcode'] = $deliveryPostcode;
$_SESSION['delivery_zone'] = $country["countries_iso_code_2"];
$ot_shipping = new ot_shipping();
$ot_shipping->process();
$shipping_modules = new shipping;
if (defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING')
&& (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true')
) {
$pass = false;
switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
case 'national':
if ($order->delivery['country_id'] == STORE_COUNTRY) {
$pass = true;
}
break;
case 'international':
if ($order->delivery['country_id'] != STORE_COUNTRY) {
$pass = true;
}
break;
case 'both':
$pass = true;
break;
}
$free_shipping = false;
if (($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) {
$free_shipping = true;
include(DIR_WS_LANGUAGES . $this->language . '/modules/order_total/ot_shipping.php');
}
} else {
$free_shipping = false;
}
//if shipping is free all other shipping methods will be ignored
if ($free_shipping) {
$sgShippingMethod = new ShopgateShippingMethod();
$sgShippingMethod->setDescription(
"Total amount over "
. MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER . " is free"
);
$sgShippingMethod->setTitle("Free Shipping");
$sgShippingMethod->setAmount(0);
return array($sgShippingMethod);
}
$quotes = $shipping_modules->quote();
$unsupportedModules = array("United States Postal Service");
foreach ($quotes AS $shippingModule) {
//we dont support usps as shopgate plugin shipping method, also on error continue
foreach ($unsupportedModules AS $moduleName) {
if (strpos($shippingModule['module'], $moduleName) !== false || !empty($shippingModule['error'])) {
continue;
}
}
$sgShippingMethod = new ShopgateShippingMethod();
$sgShippingMethod->setId($shippingModule["id"]);
$sgShippingMethod->setTitle($shippingModule["module"]);
$sgShippingMethod->setTaxPercent($shippingModule["tax"]);
if (isset($shippingModule["tax"]) && !empty($shippingModule["tax"])) {
$sgShippingMethod->setTaxClass($locationModel->getTaxClassByValue($shippingModule["tax"]));
}
if (!empty($shippingModule["methods"]) && is_array($shippingModule["methods"])) {
foreach ($shippingModule["methods"] as $method) {
$tmp_shipping = $sgShippingMethod;
$cost = $method["cost"];
if (isset($shippingModule["tax"]) && !empty($shippingModule["tax"])) {
$costWithTax = $this->formatPriceNumber($cost * (1 + ($shippingModule["tax"] / 100)), 2);
$tmp_shipping->setAmountWithTax($costWithTax);
$tmp_shipping->setAmount($cost);
} else {
$tmp_shipping->setAmountWithTax($cost);
}
$resultShippingMethods[] = $tmp_shipping;
}
}
}
return $resultShippingMethods;
}
/**
* get customer data by id from the database
*
* @param $customerId
*
* @return array|bool|mixed
*/
public function getCustomerById($customerId)
{
$qry = "SELECT"
. " customers_status"
. " FROM " . TABLE_CUSTOMERS
. " WHERE customers_id = " . $customerId . ";";
// user exists?
$customerResult = xtc_db_query($qry);
if (empty($customerResult)) {
return null;
}
$customerData = xtc_db_fetch_array($customerResult);
$customerGroup = new ShopgateCartCustomerGroup();
$customerGroup->setId($customerData['customers_status']);
$customerGroups[] = $customerGroup;
$sgCustomer = new ShopgateCartCustomer();
$sgCustomer->setCustomerGroups($customerGroups);
return $sgCustomer;
}
/**
* validate all items which the cart contains
*
* @param ShopgateCart $cart
*
* @param int $customerGroupId
*
* @return array
* @throws ShopgateLibraryException
*/
private function checkCartItems(ShopgateCart $cart, $customerGroupId)
{
$return = array();
$itemModel = new ShopgateItemModel($this->config);
$itemModel->setLanguageId($this->languageId);
$itemModel->setStringHelper($this->getHelper(ShopgateObject::HELPER_STRING));
foreach ($cart->getItems() AS $orderItem) {
$sgCartItem = new ShopgateCartItem();
$sgOrderInfo =
$this->jsonDecode($orderItem->getInternalOrderInfo(), true);
$id = $itemModel->getProductIdFromOrderItem($orderItem);
$sgCartItem->setItemNumber($id);
$status = $this->xtc_get_products_status($id);
$sgCartItem->setIsBuyable($status);
if (!$status) {
$sgCartItem->setIsBuyable(false);
$sgCartItem->setQtyBuyable(0);
$sgCartItem->setStockQuantity(0);
$sgCartItem->setError(
ShopgateLibraryException::CART_ITEM_PRODUCT_NOT_FOUND
);
$return[] = $sgCartItem;
continue;
}
//tax
$orderItemTaxClassId = xtc_get_tax_class_id($id);
$orderItemTaxRate = xtc_get_tax_rate(
$orderItemTaxClassId, $this->countryId, $this->zoneId
);
//price
$xtcPrice = new xtcPrice($this->currency["code"], $customerGroupId);
$priceWithTax = $xtcPrice->xtcGetPrice(
$id,
false,
$orderItem->getQuantity(),
$orderItemTaxClassId,
$orderItem->getUnitAmount(),
1
);
$price = $xtcPrice->xtcGetPrice(
$id,
false,
$orderItem->getQuantity(),
null,
$orderItem->getUnitAmount(),
1
);
$sgCartItem->setUnitAmount($price);
$sgCartItem->setUnitAmountWithTax($priceWithTax);
$quantity = xtc_get_products_stock($id);
$sgCartItem->setStockQuantity($quantity);
$sgCartItem->setQtyBuyable($quantity);
if (STOCK_CHECK == 'true' && STOCK_ALLOW_CHECKOUT == 'false') {
if ($quantity <= 0) {
$sgCartItem->setIsBuyable(false);
$sgCartItem->setQtyBuyable(0);
$sgCartItem->setStockQuantity(0);
$sgCartItem->setError(ShopgateLibraryException::CART_ITEM_OUT_OF_STOCK);
$return[] = $sgCartItem;
continue;
}
if ($quantity < $orderItem->getQuantity()) {
$sgCartItem->setIsBuyable(true);
$sgCartItem->setError(ShopgateLibraryException::CART_ITEM_REQUESTED_QUANTITY_NOT_AVAILABLE);
$return[] = $sgCartItem;
continue;
}
}
$attributeIds = array();
foreach ($sgOrderInfo as $infoName => $infoValue) {
if (strpos($infoName, "attribute_") === 0) {
if (is_array($infoValue)) {
foreach ($infoValue as $attributeKey => $attributeArray) {
$attributeIds[] = array_merge(
array("products_attributes_id" => $attributeKey),
$attributeArray
);
}
}
}
}
$sgCartItem->setOptions(
$itemModel->getOptionsToProduct(
$id, $attributeIds, $orderItemTaxRate
)
);
$sgCartItem->setAttributes($itemModel->getAttributesToProduct($orderItem));
// not supported
$sgCartItem->setInputs(array());
$return[] = $sgCartItem;
}
return $return;
}
/**
* get all orders which has been flagged as set int the setting "$this->config->getOrderStatusCanceled()"
* and send information of this orders to shopgate
*
* @param string $message
* @param int $errorCount
*/
protected function cronCancelOrders(&$message, &$errorCount)
{
$query = "SELECT `sgo`.`orders_id`, `sgo`.`shopgate_order_number`" .
" FROM `" . TABLE_SHOPGATE_ORDERS . "` sgo" .
" INNER JOIN `" . TABLE_ORDERS . "` xto ON (`xto`.`orders_id` = `sgo`.`orders_id`) " .
" INNER JOIN `" . TABLE_LANGUAGES . "` xtl ON (`xtl`.`directory` = `xto`.`language`) " .
" WHERE `sgo`.`is_cancellation_sent_to_shopgate` = 0" .
" AND `xto`.`orders_status` = " . xtc_db_input($this->config->getOrderStatusCanceled()) .
" AND `xtl`.`code` = '" . xtc_db_input($this->config->getLanguage()) . "';";
$result = xtc_db_query($query);
while ($shopgateOrder = xtc_db_fetch_array($result)) {
try {
$this->sendOrderCancellation($shopgateOrder['shopgate_order_number'], $this->merchantApi);
$message .= "full cancellation sent for shopgate order: {$shopgateOrder['shopgate_order_number']}\n";
} catch (Exception $e) {
$errorCount++;
$message .= "Shopgate order number {$shopgateOrder['shopgate_order_number']} error: {$e->getMessage()}\n";
}
}
}
/**
* send a cancellation request from an order to shopgate
*
* @param int $shopgateOrderNumber
* @param ShopgateMerchantApiInterface $merchantApi
*
* @throws ShopgateMerchantApiException
*/
protected function sendOrderCancellation($shopgateOrderNumber, ShopgateMerchantApiInterface $merchantApi)
{
try {
$merchantApi->cancelOrder($shopgateOrderNumber, true);
} catch (ShopgateMerchantApiException $e) {
if ($e->getCode() != ShopgateMerchantApiException::ORDER_ALREADY_CANCELLED) {
throw $e;
}
}
$updateQuery = 'UPDATE `' . TABLE_SHOPGATE_ORDERS
. "` SET `is_cancellation_sent_to_shopgate` = 1 WHERE `shopgate_order_number` = {$shopgateOrderNumber}";
xtc_db_query($updateQuery);
}
/**
* fills the referenced array "$categories" with categories
* hint: this function is recursive
*
* @param int $parentId
* @param int $maxOrder
* @param string $type
* @param null $limit
* @param null $offset
* @param array $uids
*/
private function buildCategoriesTree(
$parentId = 0, $maxOrder = 0, $type = "csv", $limit = null, $offset = null, array $uids = array()
) {
$this->log(
"Start buldiding Categories tree: parent_id = " . $parentId . "...",
ShopgateLogger::LOGTYPE_DEBUG
);
$qry = "
SELECT DISTINCT
c.categories_id,
c.parent_id,
c.categories_image,
c.categories_status,
c.sort_order,
cd.categories_name
FROM " . TABLE_CATEGORIES . " c
LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON (c.categories_id = cd.categories_id
AND cd.language_id = $this->languageId)";
if (!($uids == array())) {
$qry .= " WHERE c.categories_id IN (" . implode(',', $uids) . ")";
}
$qry .= " ORDER BY c.categories_id ASC";
if (is_numeric($limit) && is_numeric($offset)) {
$qry .= " LIMIT " . $offset . "," . $limit . "";
}
$qry = xtc_db_query($qry);
while ($item = xtc_db_fetch_array($qry)) {
$this->log(
"cheking if category is blacklisted ...",
ShopgateLogger::LOGTYPE_DEBUG
);
/** @var mixed[] $row */
$row = $this->buildDefaultCategoryRow();
$row["category_number"] = $item["categories_id"];
$row["parent_id"] = (empty($item["parent_id"])
|| ($item['parent_id'] == $item['categories_id'])) ? ""
: $item["parent_id"];
$row["category_name"] = htmlentities(
$item["categories_name"], ENT_NOQUOTES,
$this->config->getEncoding()
);
if (!empty($item["categories_image"])) {
$row["url_image"] =
HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . "categories/"
. $item["categories_image"];
}
if (!empty($item["sort_order"])
|| ((string)$item['sort_order'] === '0')
) {
if ($this->config->getReverseCategoriesSortOrder()) {
// reversed means the contrary to ordering system in shopgate - order_index is a priority system - high number = top position
// so just taking over the values means reversing the order
$row["order_index"] = $item["sort_order"];
} else {
$row["order_index"] = $maxOrder - $item["sort_order"];
}
}
$row["is_active"] = $item["categories_status"];
$row['url_deeplink'] = xtc_href_link(
FILENAME_DEFAULT, xtc_category_link(
$item['categories_id'], $item['categories_name']
), 'NONSSL', false
);
if ($type == 'csv') {
$this->addCategoryRow($row);
} else {
$node = new ShopgateCategoryXmlModel($this->config);
$node->setItem($row);
$this->addCategoryModel($node->generateData());
}
}
}
/**
* Returns a array with all Variations of the Product
*
* @param int $productId
* @param ShopgateItemModel $itemModel
*
* @return array
*/
private function getVariations(ShopgateItemModel $itemModel, $productId, $tax_rate)
{
$this->log("execute _getVariations() ...", ShopgateLogger::LOGTYPE_DEBUG);
$sg_prod_var = array();
$query = xtc_db_query(
$itemModel->getAttributesToProductQuery($productId, $this->config->getExportOptionAsInputField())
);
// $options = array_pad(array(), 5, "");
$options = array();
$i = -1;
$old = null;
while ($variation = xtc_db_fetch_array($query)) {
// empty option value names are not allowed at Shopgate, so display double dashes instead
if (trim($variation['products_options_values_name']) == '') {
$variation['products_options_values_name'] = '--';
}
if ($variation["products_options_id"] != $old || is_null($old)) {
$i++;
$old = $variation["products_options_id"];
}
$options[$i][] = $variation;
}
if (empty($options)) {
return array();
}
// Find and rename duplicate option-value names
foreach ($options as $optionIndex => $singleOption) {
// Check all option-value names for duplicate names
foreach ($singleOption as $key => $optionVariation) {
if (!empty($optionVariation)) {
// Compare with following entries
$indexNumber = 1;
for ($i = $key + 1; $i < count($singleOption); $i++) {
if (trim($singleOption[$i]['products_options_values_name']) == trim(
$optionVariation['products_options_values_name']
)
) {
$indexNumber++;
$options[$optionIndex][$i]['products_options_values_name'] =
trim($singleOption[$i]['products_options_values_name']) . " $indexNumber";
}
}
// Add index 1 to the actual name if duplicate name-entries found
if ($indexNumber > 1) {
$options[$optionIndex][$key]['products_options_values_name'] .= " 1";
// Refresh the working variable for further operation
$singleOption = $options[$optionIndex];
}
}
}
}
$countVariations = 1;
foreach ($options as $option) {
$countVariations *= count($option);
}
if ($countVariations > $this->config->getMaxAttributes()) {
$this->buildOptions($sg_prod_var, $options, $tax_rate);
$sg_prod_var["has_options"] = 1;
} else {
$this->buildAttributes($sg_prod_var, $options);
$sg_prod_var["has_options"] = 0;
}
return $sg_prod_var;
}
/**
* Build the Productvariations as options
*
* @param &array $sg_prod_var
* @param array $variations
* @param float $tax_rate
*/
private function buildOptions(&$sg_prod_var, $variations, $tax_rate)
{
$this->log("execute _buildOptions() ...", ShopgateLogger::LOGTYPE_DEBUG);
$tmp = array();
$i = 0;
foreach ($variations as $_variation) {
$i++;
$tmp["option_$i"] =
$_variation[0]["products_options_id"] . '=' . strip_tags($_variation[0]["products_options_name"]);
$options = array();
foreach ($_variation as $option) {
// Currency and tax must be included here because the data is directly used for the item
$optionOffsetPrice =
$option["options_values_price"] * $this->exchangeRate * (1 + ($tax_rate / 100)); // Include Tax
$optionOffsetPrice = round($optionOffsetPrice * 100, 0); // get euro-cent
$field = strip_tags($option["products_options_values_id"]) . "=" . strip_tags(
$option["products_options_values_name"]
);
$field .= ($option["options_values_price"] != 0)
? "=>" . $option["price_prefix"] . $optionOffsetPrice
: "";
$options[] = $field;
}
$tmp["option_" . $i . "_values"] = implode("||", $options);
}
$sg_prod_var = $tmp;
}
/**
* Build the Productvariations recursively
*
* @param $sg_prod_var
* @param $variations
* @param int $index
* @param array $baseVar
*/
private function buildAttributes(&$sg_prod_var, $variations, $index = 0, $baseVar = array())
{
$this->log("execute _buildAttributes() ...", ShopgateLogger::LOGTYPE_DEBUG);
if ($index == 0) {
// Index 0 sind die Überschriften. Diese müssen als erstes hinzugefügt werden
for ($i = 0; $i < count($variations); $i++) {
$sg_prod_var[0]['attribute_' . ($i + 1)] = $variations[$i][0]['products_options_name'];
}
}
foreach ($variations[$index] as $variation) {
$tmpNewVariation = array();
// copy all prvious attributes (inclusive the order info)
if (!empty($baseVar)) {
for ($i = 1; $i <= 10; $i++) {
$keyName = 'attribute_' . $i;
if (array_key_exists($keyName, $baseVar)) {
$tmpNewVariation[$keyName] = $baseVar[$keyName];
$tmpNewVariation['order_info'][$keyName] = $baseVar['order_info'][$keyName];
} else {
break;
}
}
}
if (count($variations) == 1) {
// only if 1 dimension
$tmpNewVariation['item_number'] = $variation['attributes_model'];
}
$tmpNewVariation['attribute_' . ($index + 1)] = $variation['products_options_values_name'];
$tmpNewVariation['order_info']['attribute_' . ($index + 1)] = array(
$variation['products_attributes_id'] => array(
'options_id' => $variation['products_options_id'],
'options_values_id' => $variation['products_options_values_id'],
),
);
$tmpNewVariation['stock_quantity'] = $variation['attributes_stock'];
if (isset($baseVar['stock_quantity']) && $baseVar['stock_quantity'] < $variation['attributes_stock']) {
$tmpNewVariation['stock_quantity'] = $baseVar['stock_quantity'];
}
// Kalkuliere den Preisunterschied (Steuern und Währung werden noch nicht hier berücksichtigt)
$price = $variation['options_values_price'];
if ($variation['price_prefix'] == '-') {
$price = -1 * $price;
}
if (empty($baseVar['offset_amount'])) {
$baseVar['offset_amount'] = 0;
}
$tmpNewVariation['offset_amount'] = $baseVar['offset_amount'] + $price;
// Kalkuliere den Gewichtsunterschied
$weight = (float)$variation['options_values_weight'];
if ($variation['weight_prefix'] == '-') {
$weight = -1 * $weight;
}
if (empty($baseVar['offset_weight'])) {
$baseVar['offset_weight'] = 0;
}
$tmpNewVariation['offset_weight'] = $baseVar['offset_weight'] + (double)$weight;
if ($index < (count($variations) - 1)) {
// Fahre mit nächstem Attribute fort (mit aktuellem Zwischenattribut als Basis für die Gewicht, Stock und Preisberechnung)
// Das aktuelle Zwischenattribut enthält das Gesamtgewicht, den Gesamtpreis und den max-Stock, der für weitere Berechnungen notwendig ist
$this->buildAttributes($sg_prod_var, $variations, $index + 1, $tmpNewVariation);
} else {
// Wenn kein Attribut mehr existiert, dieses auf den Stack legen
$sg_prod_var[] = $tmpNewVariation;
}
}
}
/**
* gathers input field data to a product
*
* @param $productId
* @param ShopgateItemModel $itemModel
*
* @return array|void
*/
private function getInputFields(ShopgateItemModel $itemModel, $productId)
{
$this->log("execute _getInputFields() ...", ShopgateLogger::LOGTYPE_DEBUG);
$query = xtc_db_query(
$itemModel->getAttributesInputFieldsToProductsQuery(
$productId, $this->config->getExportOptionAsInputField()
)
);
$i = 0;
$old = '';
while ($inputFields = xtc_db_fetch_array($query)) {
if ($inputFields["products_options_id"] != $old) {
$i++;
$old = $inputFields["products_options_id"];
}
$inputFieldsAll[$i][] = $inputFields;
}
if (empty($inputFieldsAll)) {
return;
}
$sg_product_var = $this->buildInputFields($inputFieldsAll);
return $sg_product_var;
}
/**
* convert the input field data from the shop system into the Shopgate-specific structure
*
* @param $inputFieldsAll
*
* @return array
*/
private function buildInputFields($inputFieldsAll)
{
$sg_product_var = array();
$i = 0;
foreach ($inputFieldsAll as $inputField) {
$i++;
// $sg_product_var["has_input_fields"] = 1;
$sg_product_var["input_field_" . $i . "_number"] = $inputField[0]['products_options_id'];
$sg_product_var["input_field_" . $i . "_type"] = 'text';
$sg_product_var["input_field_" . $i . "_label"] = strip_tags($inputField[0]["products_options_name"]);
$sg_product_var["input_field_" . $i . "_add_amount"] = ($inputField[0]["options_values_price"] != 0)
? $inputField[0]["price_prefix"] . round($inputField[0]["options_values_price"], 2)
: "";
// keine Angabe möglich
$sg_product_var["input_field_" . $i . "_infotext"] = '';
$sg_product_var["input_field_" . $i . "_required"] = 0;
}
return $sg_product_var;
}
/**
* Load all Categories of the product and build its category-path
*
* The categories are seperated by a =>. The Paths are seperated b< a double-pipe ||
*
* Example: kategorie_1=>kategorie_2||other_1=>other_2
*
* @param int $productId
*
* @return string
*/
private function getProductPath($productId)
{
$this->log("execute _getProductPath() ...", ShopgateLogger::LOGTYPE_DEBUG);
$catsQry = "
SELECT DISTINCT ptc.categories_id
FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc
INNER JOIN " . TABLE_CATEGORIES . " c ON ptc.categories_id = c.categories_id
WHERE ptc.products_id = '$productId'
AND c.categories_status = 1
ORDER BY products_sorting
";
$catsQuery = xtc_db_query($catsQry);
$categories = "";
while ($category = xtc_db_fetch_array($catsQuery)) {
$cats = xtc_get_category_path($category["categories_id"]);
$cats = preg_replace("/\_/", ",", $cats);
$q = "
SELECT DISTINCT cd.categories_name
FROM " . TABLE_CATEGORIES_DESCRIPTION . " cd
WHERE cd.categories_id IN (" . $cats . ")
AND cd.language_id = " . $this->languageId . "
ORDER BY find_in_set(cd.categories_id, '$cats')
";
$q = xtc_db_query($q);
$cats = "";
while ($cd = xtc_db_fetch_array($q)) {
if (!empty($cats)) {
$cats .= "=>";
}
$cats .= $cd["categories_name"];
}
if (!empty($categories)) {
$categories .= "||";
}
$categories .= $cats;
}
return $categories;
}
/**
* generates a string containing the image urls to an product separated by the delimiter ||
*
* @param ShopgateItemModel $itemModel
* @param string $product
*
* @return array
*/
private function getProductsImages($itemModel, $product)
{
$this->log("execute _getProductImages() ...", ShopgateLogger::LOGTYPE_DEBUG);
$images = $itemModel->generateImageUrls($product);
return implode("||", $images);
}
/**
* generates a string containing special offer data to products, separated by the delimiter ||
*
* @param $product
* @param $tax_rate
*
* @return string
*/
private function getPackages($product, $tax_rate)
{
$customerStatusId = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
$qry = "
SELECT *
FROM " . TABLE_PERSONAL_OFFERS_BY . "$customerStatusId
WHERE products_id = '" . $product["products_id"] . "'
AND quantity > 1
ORDER BY quantity
";
$specialOffers = array();
$_specialOffers = xtc_db_query($qry);
while ($specialOffer = xtc_db_fetch_array($_specialOffers)) {
$specialOffers[] = implode(
"=>", array(
"qty" => $specialOffer["quantity"],
"personal_offer" => round($specialOffer["personal_offer"] * (1 + ($tax_rate / 100)), 2),
)
);
}
return implode("||", $specialOffers);
}
/**
* creates a guest user in the shop system
*
* @param ShopgateOrder $order
*
* @return array
*/
private function createGuestUser(ShopgateOrder $order)
{
// $order = new ShopgateOrder();
$address = $order->getInvoiceAddress();
$customerStatus = DEFAULT_CUSTOMERS_STATUS_ID;
$customer = array();
$customer["customers_vat_id_status"] = 0;
$customer["customers_status"] = $customerStatus;
$customer["customers_gender"] = $address->getGender();
$customer["customers_firstname"] = $address->getFirstName();
$customer["customers_lastname"] = $address->getLastName();
$customer["customers_email_address"] = $order->getMail();
$customer["customers_default_address_id"] = "";
$customer["customers_telephone"] = $order->getPhone();
$customer["customers_fax"] = "";
$customer["customers_newsletter"] = 0;
$customer["customers_newsletter_mode"] = 0;
$customer["member_flag"] = 0;
$customer["delete_user"] = 1;
$customer["account_type"] = 1;
$customer["refferers_id"] = 0;
$customer["customers_date_added"] = date('Y-m-d H:i:s');
$customer["customers_last_modified"] = date('Y-m-d H:i:s');
xtc_db_perform(TABLE_CUSTOMERS, $customer);
$customerId = xtc_db_insert_id();
$qry = "SELECT countries_id FROM " . TABLE_COUNTRIES
. " WHERE UPPER(countries_iso_code_2) = UPPER('" . $address->getCountry() . "')";
$qry = xtc_db_query($qry);
$country = xtc_db_fetch_array($qry);
if (empty($country)) {
$country = array(
'countries_id' => 81,
);
}
$qry = "SELECT zone_id, zone_name FROM " . TABLE_ZONES
. " WHERE zone_country_id = {$country['countries_id']} AND zone_code = '"
. ShopgateXtcMapper::getXtcStateCode($address->getState()) . "'";
$qry = xtc_db_query($qry);
$zone = xtc_db_fetch_array($qry);
if (empty($zone)) {
$zone = array(
'zone_id' => null,
'zone_name' => $address->getState(),
);
}
$_address = array(
"customers_id" => $customerId,
"entry_gender" => $address->getGender(),
"entry_company" => $address->getCompany(),
"entry_firstname" => $address->getFirstName(),
"entry_lastname" => $address->getLastName(),
"entry_street_address" => $address->getStreet1() . (strlen($address->getStreet2()) > 0 ? (' '
. $address->getStreet2()) : ''),
"entry_suburb" => "",
"entry_postcode" => $address->getZipcode(),
"entry_city" => $address->getCity(),
"entry_state" => $zone['zone_name'],
"entry_country_id" => $country["countries_id"],
"entry_zone_id" => $zone['zone_id'],
"address_date_added" => date('Y-m-d H:i:s'),
"address_last_modified" => date('Y-m-d H:i:s'),
);
xtc_db_perform(TABLE_ADDRESS_BOOK, $_address);
$addressId = xtc_db_insert_id();
$customer = array(
"customers_default_address_id" => $addressId
);
xtc_db_perform(TABLE_CUSTOMERS, $customer, "update", "customers_id = $customerId");
$_info = array(
"customers_info_id" => $customerId,
"customers_info_date_of_last_logon" => date('Y-m-d H:i:s'),
"customers_info_number_of_logons" => '1',
"customers_info_date_account_created" => date('Y-m-d H:i:s'),
"customers_info_date_account_last_modified" => date('Y-m-d H:i:s'),
"global_product_notifications" => 0
);
xtc_db_perform(TABLE_CUSTOMERS_INFO, $_info);
$customerMemo = array();
$customerMemo["customers_id"] = $customerId;
$customerMemo["memo_date"] = date('Y-m-d');
$customerMemo["memo_title"] = "Shopgate - Account angelegt";
$customerMemo["memo_text"] = "Account wurde von Shopgate angelegt";
$customerMemo["poster_id"] = null;
xtc_db_perform("customers_memo", $customerMemo);
$result = xtc_db_query("SELECT * FROM " . TABLE_CUSTOMERS . " WHERE customers_id = " . $customerId);
$customer = xtc_db_fetch_array($result);
return $customer;
}
/**
* get the address format id from the database, regarding the iso2 code and if set the country id
*
* @param string $isoCode2
* @param null $countryId
*
* @return mixed
*/
private function getAddressFormatId($isoCode2 = 'DE', $countryId = null)
{
$isoCode2 = strtoupper($isoCode2);
if (!empty($countryId)) {
$qry = "
SELECT c.address_format_id
FROM " . TABLE_COUNTRIES . " c
WHERE c.countries_id = '$countryId'
";
} else {
$qry = "
SELECT c.address_format_id
FROM " . TABLE_COUNTRIES . " c
WHERE UPPER(c.countries_iso_code_2) = '$isoCode2'
";
}
$result = xtc_db_query($qry);
$item = xtc_db_fetch_array($result);
return array(
'external_order_id'=>$dbOrder["orders_id"],
'external_order_number'=>$dbOrder["orders_id"]
);
return $item["address_format_id"];
}
private function _insertStatusHistory(ShopgateOrder $order, $dbOrderId, &$currentOrderStatus) {
/**
* inserts the status to an order into the database
*
* @param ShopgateOrder $order
* @param $dbOrderId
* @param $currentOrderStatus
*/
private function insertStatusHistory(ShopgateOrder $order, $dbOrderId, &$currentOrderStatus)
{
///////////////////////////////////////////////////////////////////////
// Speicher Kommentare zur Bestellung in der Historie
///////////////////////////////////////////////////////////////////////
ca. Zeile 1617
} else {
$comment .= "\nHinweis: Der Versand der Bestellung ist bei Shopgate blockiert!";
$currentOrderStatus = $this->config->getOrderStatusShippingBlocked();
}
if ($order->getIsCustomerInvoiceBlocked()) {
$comment .= "\nHinweis: Für diese Bestellung darf keine Rechnung versendet werden!";
}
$comment = $this->stringFromUtf8($comment, $this->config->getEncoding());
$histories = array(
array(
"orders_id"=> $dbOrderId,
"orders_status_id"=>$currentOrderStatus,
"date_added"=>date('Y-m-d H:i:s'),
"customer_notified"=>false,
"comments"=>xtc_db_prepare_input($comment),
)
);
foreach($histories as $history){
xtc_db_perform(TABLE_ORDERS_STATUS_HISTORY,$history);
}
$orderModel = new ShopgateOrderModel();
$orderModel->setOrderId($dbOrderId);
$orderModel->saveHistory($currentOrderStatus, $comment);
}
private function _setOrderPayment(ShopgateOrder $order, $dbOrderId, &$currentOrderStatus) {
/**
* stores the payment information to an order in the database
*
* @param ShopgateOrder $order
* @param $dbOrderId
* @param $currentOrderStatus
*/
private function setOrderPayment(ShopgateOrder $order, $dbOrderId, &$currentOrderStatus)
{
$payment = $order->getPaymentMethod();
$paymentGroup = $order->getPaymentGroup();
$paymentInfos = $order->getPaymentInfos();
$orderData = array();
$defaultPayment = 'mobile_payment';
$histories = array();
$paymentName = '';
$paymentWasMapped = false;
$paymentMapping = array();
$paymentMappingStrings = explode(';', $this->config->getPaymentNameMapping());
foreach ($paymentMappingStrings as $paymentMappingString) {
$paymentMappingArray = explode('=', $paymentMappingString);
if (isset($paymentMappingArray[1])) {
$paymentMapping[$paymentMappingArray[0]] = $paymentMappingArray[1];
}
}
if (isset($paymentMapping[$payment])) {
$comments = $this->stringFromUtf8(
"Zahlungsweise '" . $payment . "' durch '" . $paymentMapping[$payment] . "' ersetzt",
$this->config->getEncoding()
);
$histories[] = array(
"orders_id" => $dbOrderId,
"orders_status_id" => $currentOrderStatus,
"date_added" => date('Y-m-d H:i:s'),
"customer_notified" => false,
"comments" => xtc_db_prepare_input($comments)
);
$paymentName = $paymentMapping[$payment];
$paymentWasMapped = true;
}
switch($payment) {
case ShopgateOrder::SHOPGATE:
$orderData["payment_method"] = "shopgate";
$orderData["payment_method"] = ($paymentWasMapped) ? $paymentName : "shopgate";
$orderData["payment_class"] = "shopgate";
break;
case ShopgateOrder::PREPAY:
$orderData["payment_method"] = "eustandardtransfer";
$orderData["payment_method"] = ($paymentWasMapped) ? $paymentName : "eustandardtransfer";
$orderData["payment_class"] = "eustandardtransfer";
if(!$order->getIsPaid()){
$comments = $this->stringFromUtf8("Der Kunde wurde angewiesen Ihnen das Geld mit dem Verwendungszweck \"", $this->config->getEncoding());
$comments = $this->stringFromUtf8(
"Der Kunde wurde angewiesen Ihnen das Geld mit dem Verwendungszweck \"",
$this->config->getEncoding()
);
$comments .= $paymentInfos['purpose'];
$comments .= $this->stringFromUtf8("\" auf Ihr Bankkonto zu überweisen", $this->config->getEncoding());
$comments .= $this->stringFromUtf8(
"\" auf Ihr Bankkonto zu überweisen", $this->config->getEncoding()
);
// Order is not paid yet
$histories[] = array(
"orders_id"=> $dbOrderId,
"orders_status_id"=>$currentOrderStatus,
"date_added"=>date( 'Y-m-d H:i:s'),
"customer_notified"=>false,
"comments"=>xtc_db_prepare_input($comments)
"comments" => ShopgateWrapper::db_prepare_input($comments)
);
}
break;
case ShopgateOrder::INVOICE:
$orderData["payment_method"] = "invoice";
$orderData["payment_method"] = ($paymentWasMapped) ? $paymentName : "invoice";
$orderData["payment_class"] = "invoice";
break;
case ShopgateOrder::COD:
$orderData["payment_method"] = "cod";
$orderData["payment_method"] = ($paymentWasMapped) ? $paymentName : "cod";
$orderData["payment_class"] = "cod";
break;
case ShopgateOrder::DEBIT:
$orderData["payment_method"] = "banktransfer";
$orderData["payment_method"] = ($paymentWasMapped) ? $paymentName : "banktransfer";
$orderData["payment_class"] = "banktransfer";
$banktransferData = array();
$banktransferData["orders_id"] = $dbOrderId;
ca. Zeile 1695
$banktransferData["banktransfer_prz"] = $dbOrderId;
$banktransferData["banktransfer_fax"] = null;
xtc_db_perform("banktransfer", $banktransferData);
$comments = $this->stringFromUtf8("Sie müssen nun den Geldbetrag per Lastschrift von dem Bankkonto des Kunden abbuchen: \n\n", $this->config->getEncoding());
$comments .= $this->_createPaymentInfos($paymentInfos, $dbOrderId, $currentOrderStatus, false);
$comments = $this->stringFromUtf8(
"Sie müssen nun den Geldbetrag per Lastschrift von dem Bankkonto des Kunden abbuchen: \n\n",
$this->config->getEncoding()
);
$comments .= $this->createPaymentInfos($paymentInfos, $dbOrderId, $currentOrderStatus, false);
$histories[] = array(
"orders_id"=> $dbOrderId,
"orders_status_id"=>$currentOrderStatus,
"date_added"=>date( 'Y-m-d H:i:s'),
"customer_notified"=>false,
"comments"=>xtc_db_prepare_input($comments)
"comments" => ShopgateWrapper::db_prepare_input($comments)
);
break;
case ShopgateOrder::PAYPAL:
$orderData["payment_method"] = "paypal";
$paymentModulesInstalledQuery = 'SELECT c.configuration_value AS cv
FROM configuration AS c
WHERE c.configuration_key LIKE "%MODULE_PAYMENT_INSTALLED%" LIMIT 1;';
$paymentModulesInstalledResult = xtc_db_query($paymentModulesInstalledQuery);
$installedPaymentModules = xtc_db_fetch_array($paymentModulesInstalledResult);
if (strpos($installedPaymentModules["cv"], "paypal_ipn") !== false) {
$orderData["payment_method"] = ($paymentWasMapped) ? $paymentName : "paypal_ipn";
$orderData["payment_class"] = "paypal_ipn";
} else {
$orderData["payment_method"] = ($paymentWasMapped) ? $paymentName : "paypal";
$orderData["payment_class"] = "paypal";
}
// Save paymentinfos in history
$histories[] = $this->_createPaymentInfos($paymentInfos, $dbOrderId, $currentOrderStatus);
$histories[] = $this->createPaymentInfos($paymentInfos, $dbOrderId, $currentOrderStatus);
break;
default:
$orderData["payment_method"] = "mobile_payment";
$orderData["payment_method"] = ($paymentWasMapped) ? $paymentName : "mobile_payment";
$orderData["payment_class"] = "shopgate";
// Save paymentinfos in history
$histories[] = $this->_createPaymentInfos($paymentInfos, $dbOrderId, $currentOrderStatus);
$histories[] = $this->createPaymentInfos($paymentInfos, $dbOrderId, $currentOrderStatus);
break;
}
ca. Zeile 1741
* @param Integer $currentOrderStatus
*
* @return mixed History-Array or String
*/
private function _createPaymentInfos($paymentInfos, $dbOrderId, $currentOrderStatus, $asArray = true){
private function createPaymentInfos($paymentInfos, $dbOrderId, $currentOrderStatus, $asArray = true)
{
$paymentInformation = '';
foreach($paymentInfos as $key => $value){
$paymentInformation .= $key.': '.$value."\n";
}
ca. Zeile 1753
"orders_id"=> $dbOrderId,
"orders_status_id"=>$currentOrderStatus,
"date_added"=>date('Y-m-d H:i:s'),
"customer_notified"=>false,
"comments"=>xtc_db_prepare_input($paymentInformation)
"comments" => ShopgateWrapper::db_prepare_input($paymentInformation)
);
} else {
return $paymentInformation;
}
}
private function _insertOrderItems(ShopgateOrder $order, $dbOrderId, &$currentOrderStatus) {
/**
* inserts all items to an order into the database
*
* @param ShopgateOrder $order
* @param $dbOrderId
* @param $currentOrderStatus
* @param ShopgateCouponModel $couponModel
*/
private function insertOrderItems(
ShopgateOrder $order, $dbOrderId, &$currentOrderStatus, ShopgateCouponModel $couponModel
) {
///////////////////////////////////////////////////////////////////////
// Speicher die Produkte
// Speichert die Produkte
///////////////////////////////////////////////////////////////////////
$errors = '';
foreach($order->getItems() as $orderItem) {
$order_infos = $orderItem->getInternalOrderInfo();
$order_infos = $this->jsonDecode($order_infos, true);
$orderInfo = $orderItem->getInternalOrderInfo();
$orderInfo = $this->jsonDecode($orderInfo, true);
$item_number = $orderItem->getItemNumber();
if(isset($order_infos["base_item_number"])){
$item_number = $order_infos["base_item_number"];
if (isset($orderInfo["base_item_number"])) {
$item_number = $orderInfo["base_item_number"];
}
$this->log('db: get product ', ShopgateLogger::LOGTYPE_DEBUG);
$qry = xtc_db_query(
"SELECT * FROM ".TABLE_PRODUCTS . " WHERE"
. " products_id = '" . $item_number ."'"
. " LIMIT 1");
. " LIMIT 1"
);
$dbProduct = xtc_db_fetch_array($qry);
if(empty($dbProduct) && ($item_number == 'COUPON' || $item_number == 'PAYMENT_FEE')){
$this->log('product is COUPON or PAYMENTFEE', ShopgateLogger::LOGTYPE_DEBUG);
ca. Zeile 1790
// workaround for shopgate coupons
$dbProduct = array();
$dbProduct['products_id'] = 0;
$dbProduct['products_model'] = $item_number;
} else if(empty($dbProduct)){
} else {
if (empty($dbProduct)) {
$this->log('no product found', ShopgateLogger::LOGTYPE_DEBUG);
$this->log(ShopgateLibraryException::buildLogMessageFor(ShopgateLibraryException::PLUGIN_ORDER_ITEM_NOT_FOUND, 'Shopgate-Order-Number: '. $order->getOrderNumber() .', DB-Order-Id: '. $dbOrderId .'; item (item_number: '.$products_model.'). The item will be skipped.'));
$errors .= "\nItem (item_number: ".$item_number.") can not be found in your shoppingsystem. Please contact Shopgate. The item will be skipped.";
$this->log(
ShopgateLibraryException::buildLogMessageFor(
ShopgateLibraryException::PLUGIN_ORDER_ITEM_NOT_FOUND,
'Shopgate-Order-Number: ' . $order->getOrderNumber() . ', DB-Order-Id: ' . $dbOrderId
. '; item (item_number: ' . $orderItem->getItemNumber() . '). The item will be skipped.'
)
);
$errors .= "\nItem (item_number: " . $item_number
. ") can not be found in your shoppingsystem. Please contact Shopgate. The item will be skipped.";
$dbProduct['products_id'] = 0;
$dbProduct['products_model'] = $item_number;
}
}
$this->log('db: orders_products', ShopgateLogger::LOGTYPE_DEBUG);
$productData = array(
"orders_id" => $dbOrderId,
"products_model" => $dbProduct["products_model"],
"products_id" => $item_number,
"products_name" => xtc_db_prepare_input($orderItem->getName()),
"products_name" => ShopgateWrapper::db_prepare_input($orderItem->getName()),
"products_price" => $orderItem->getUnitAmountWithTax(),
"products_discount_made"=> 0,
"final_price" => $orderItem->getQuantity() * ($orderItem->getUnitAmountWithTax()),
"products_shipping_time"=> "",
ca. Zeile 1816
"products_quantity" => $orderItem->getQuantity(),
"allow_tax" => 1,
);
$qry = xtc_db_perform(TABLE_ORDERS_PRODUCTS, $productData);
xtc_db_perform(TABLE_ORDERS_PRODUCTS, $productData);
$productsOrderId = xtc_db_insert_id();
$qry = "SHOW FIELDS FROM " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES;
$result = xtc_db_query($qry);
while ($tmpData = xtc_db_fetch_array($result)) {
$titleKeyNames = array_keys($tmpData);
$fieldName = $tmpData[$titleKeyNames[0]];
$tblAttributeFields[$fieldName] = $fieldName;
}
$options = $orderItem->getOptions();
if(!empty($options)) {
$this->log('process options', ShopgateLogger::LOGTYPE_DEBUG);
foreach($options as $option) {
$attribute_model = $option->getValueNumber();
$attribute_number = $option->getOptionNumber();
$this->log('db: get attributes', ShopgateLogger::LOGTYPE_DEBUG);
// Hole das Attribut aus der Datenbank
ca. Zeile 1839
INNER JOIN ".TABLE_PRODUCTS_OPTIONS." po ON pa.options_id = po.products_options_id AND po.language_id = $this->languageId
INNER JOIN ".TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS." povtpo ON povtpo.products_options_id = po.products_options_id
INNER JOIN ".TABLE_PRODUCTS_OPTIONS_VALUES." pov ON (povtpo.products_options_values_id = pov.products_options_values_id AND pa.options_values_id = pov.products_options_values_id AND pov.language_id = $this->languageId)
WHERE pa.products_id = '".$dbProduct["products_id"]."'
AND pa.options_values_id = ".$attribute_model."
" . (!empty($attribute_number)
? "AND pa.options_id = '{$attribute_number}'
"
: "") .
"AND pa.options_values_id = '{$attribute_model}'
LIMIT 1
";
$qry = xtc_db_query($qry);
$dbattribute = xtc_db_fetch_array($qry);
if(empty($dbattribute)) continue; //Fehler
$dbAttribute = xtc_db_fetch_array($qry);
if (empty($dbAttribute)) {
continue;
} //Fehler
$this->log('db: save order product attributes', ShopgateLogger::LOGTYPE_DEBUG);
$productAttributeData = array(
"orders_id"=>$dbOrderId,
"orders_products_id"=>$productsOrderId,
"products_options"=>$dbattribute['products_options_name'],
"products_options_values"=>$dbattribute["products_options_values_name"],
"options_values_price"=>$dbattribute["options_values_price"],
"price_prefix"=>$dbattribute["price_prefix"],
"products_options" => $dbAttribute['products_options_name'],
"products_options_values" => $dbAttribute["products_options_values_name"],
"options_values_price" => $dbAttribute["options_values_price"],
"price_prefix" => $dbAttribute["price_prefix"],
);
// check if the optional fields are available and set them if so
$optionalAttributeFields = array(
'orders_products_options_id' => $attribute_number,
'orders_products_options_values_id' => $attribute_model,
);
foreach ($optionalAttributeFields as $fieldName => $value) {
if (!empty($tblAttributeFields[$fieldName])) {
$productAttributeData[$fieldName] = $value;
}
}
xtc_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $productAttributeData);
}
} else {
$this->log('attributes?', ShopgateLogger::LOGTYPE_DEBUG);
for($i=1;$i<=10;$i++) {
if(!isset($order_infos["attribute_$i"])){
if (!isset($orderInfo["attribute_$i"])) {
break;
}
$attribute_model = $order_infos["attribute_$i"];
$tmpAttr = $orderInfo["attribute_$i"];
$attribute_number = "";
// Code for support of the old internal_order_info structure
if (!is_array($tmpAttr)) {
$attribute_model = $tmpAttr;
} else {
// Den ersten und einzigen key nutzen (zur Sicherheit auf den start des Arrays setzen)
reset($tmpAttr);
$attribute_number = $tmpAttr[key($tmpAttr)]['options_id'];
$attribute_model = $tmpAttr[key($tmpAttr)]['options_values_id'];
}
$this->log('db: get attribute', ShopgateLogger::LOGTYPE_DEBUG);
// Hole das Attribut aus der Datenbank
ca. Zeile 1877
SELECT
po.products_options_name,
pov.products_options_values_name,
pa.options_values_price,
pa.price_prefix
FROM ".TABLE_PRODUCTS_ATTRIBUTES." pa
INNER JOIN ".TABLE_PRODUCTS_OPTIONS." po ON pa.options_id = po.products_options_id AND po.language_id = $this->languageId
pa.price_prefix "
. " FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa "
. " INNER JOIN " . TABLE_PRODUCTS_OPTIONS . " po ON pa.options_id = po.products_options_id AND po.language_id = $this->languageId
INNER JOIN ".TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS." povtpo ON povtpo.products_options_id = po.products_options_id
INNER JOIN ".TABLE_PRODUCTS_OPTIONS_VALUES." pov ON (povtpo.products_options_values_id = pov.products_options_values_id AND pa.options_values_id = pov.products_options_values_id AND pov.language_id = $this->languageId)
WHERE pa.products_id = '".$dbProduct["products_id"]."'
AND pa.products_attributes_id = '".$attribute_model."'
LIMIT 1
" .
// Still support the old internal_order_info structure
(!empty($attribute_id)
? "AND pa.products_attributes_id = '" . $attribute_model . "'
"
: "AND pa.options_id = '{$attribute_number}'
AND pa.options_values_id = '{$attribute_model}'
") .
"LIMIT 1
";
$qry = xtc_db_query($qry);
$dbattribute = xtc_db_fetch_array($qry);
if(empty($dbattribute)) continue; //Fehler
$dbAttribute = xtc_db_fetch_array($qry);
if (empty($dbAttribute)) {
continue;
} //Fehler
$this->log('db: save order product attributes', ShopgateLogger::LOGTYPE_DEBUG);
$productAttributeData = array(
"orders_id"=>$dbOrderId,
"orders_products_id"=>$productsOrderId,
"products_options"=>$dbattribute["products_options_name"],
"products_options_values"=>$dbattribute["products_options_values_name"],
"options_values_price"=>$dbattribute["options_values_price"],
"price_prefix"=>$dbattribute["price_prefix"],
"products_options" => $dbAttribute["products_options_name"],
"products_options_values" => $dbAttribute["products_options_values_name"],
"options_values_price" => $dbAttribute["options_values_price"],
"price_prefix" => $dbAttribute["price_prefix"],
);
// check if the optional fields are available and set them if so
$optionalAttributeFields = array(
'orders_products_options_id' => $attribute_number,
'orders_products_options_values_id' => $attribute_model,
);
foreach ($optionalAttributeFields as $fieldName => $value) {
if (!empty($tblAttributeFields[$fieldName])) {
$productAttributeData[$fieldName] = $value;
}
}
xtc_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $productAttributeData);
// $query = 'select configuration_value from `configuration` WHERE configuration_key = "DOWNLOAD_ENABLED" LIMIT 1';
//$result = $qry = xtc_db_query($qry);
//$download = xtc_db_fetch_array($qry);
if (DOWNLOAD_ENABLED == 'true') {
$query =
" SELECT pad.products_attributes_maxdays, pad.products_attributes_maxcount, pad.products_attributes_filename FROM "
. TABLE_PRODUCTS_ATTRIBUTES . " pa "
. " LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD
. " pad ON pa.products_attributes_id=pad.products_attributes_id "
. " WHERE pa.options_id = '{$attribute_number}' AND pa.options_values_id = '{$attribute_model}' AND pa.products_id = '"
. $dbProduct["products_id"] . "'";
$this->log('query : ' . $query, ShopgateLogger::LOGTYPE_DEBUG);
$result = xtc_db_query($query);
$dlEntry = xtc_db_fetch_array($result);
if (isset ($dlEntry['products_attributes_filename'])
&& xtc_not_null(
$dlEntry['products_attributes_filename']
)
&& !empty($dlEntry['products_attributes_filename'])
) {
$sql_data_array = array(
'orders_id' => $dbOrderId,
'orders_products_id' => $productsOrderId,
'orders_products_filename' => $dlEntry['products_attributes_filename'],
'download_maxdays' => $dlEntry['products_attributes_maxdays'],
'download_count' => $dlEntry['products_attributes_maxcount']
);
xtc_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array);
}
}
}
}
$inputFields = $orderItem->getInputs();
if (!empty($inputFields)) {
foreach ($inputFields as $inputField) {
$price = ($inputField->getAdditionalAmountWithTax() < 0)
? ($inputField->getAdditionalAmountWithTax() * -1)
: $inputField->getAdditionalAmountWithTax();
$pricePrefix = ($inputField->getAdditionalAmountWithTax() < 0)
? '-'
: '+';
$data = array();
$data["orders_id"] = $dbOrderId;
$data["orders_products_id"] = $productsOrderId;
$data["products_options_values"] = $inputField->getUserInput();
$data["products_options"] = $inputField->getLabel();
$data["products_options_values"] = $inputField->getUserInput();
$data["options_values_price"] = $price;
$data["price_prefix"] = $pricePrefix;
xtc_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $data);
}
}
}
$coupons = $order->getExternalCoupons();
if (!empty($coupons)) {
foreach ($coupons as $coupon) {
$couponModel->redeemCoupon($coupon, $order->getExternalCustomerId());
}
}
$this->log('method: updateItemsStock', ShopgateLogger::LOGTYPE_DEBUG);
$this->updateItemsStock($order);
if(!empty($errors)){
$this->log('db: save errors in history', ShopgateLogger::LOGTYPE_DEBUG);
$comments = $this->stringFromUtf8('Es sind Fehler beim Importieren der Bestellung aufgetreten: ', $this->config->getEncoding());
$comments = $this->stringFromUtf8(
'Es sind Fehler beim Importieren der Bestellung aufgetreten: ', $this->config->getEncoding()
);
$comments .= $errors;
$history = array(
"orders_id"=> $dbOrderId,
"orders_status_id"=>$currentOrderStatus,
"date_added"=>date("Y-m-d H:i:s", time()-5),// "-5" Damit diese Meldung als erstes oben angezeigt wird
"date_added" => date("Y-m-d H:i:s", time() - 5),
// "-5" Damit diese Meldung als erstes oben angezeigt wird
"customer_notified"=>false,
"comments"=>xtc_db_prepare_input($comments),
"comments" => ShopgateWrapper::db_prepare_input($comments),
);
xtc_db_perform(TABLE_ORDERS_STATUS_HISTORY,$history);
}
}
private function _insertOrderTotal(ShopgateOrder $order, $dbOrderId) {
/**
* updates the stock value of items to an order in the database
*
* @param ShopgateOrder $order
*/
private function updateItemsStock(ShopgateOrder $order)
{
foreach ($order->getItems() as $item) {
// Skip "coupon" and "payment_fee" items
if ($item->getItemNumber() == 'COUPON' || $item->getItemNumber() == 'PAYMENT_FEE') {
continue;
}
// Attribute ids are set inside the internal order info
$internalOrderInfo = $this->jsonDecode($item->getInternalOrderInfo(), true);
$usesProductsAttributes = false;
// Get id (parent id for child products)
$productId = $item->getItemNumber();
if (!empty($internalOrderInfo['base_item_number'])) {
$productId = $internalOrderInfo['base_item_number'];
$usesProductsAttributes = true;
}
$itemOptions = $item->getOptions();
if (!empty($itemOptions)) {
$usesProductsAttributes = true;
}
// Update products stock if reduction enabled
if (STOCK_LIMITED == 'true') {
$qry = "UPDATE `" . TABLE_PRODUCTS . "` AS `p`
SET `p`.`products_quantity` = `p`.`products_quantity` - {$item->getQuantity()}
WHERE `p`.`products_id` = '{$productId}';";
xtc_db_query($qry);
$stock_query = xtc_db_query(
"SELECT products_quantity FROM " . TABLE_PRODUCTS . " WHERE products_id = '" . $productId . "'"
);
$stock_values = xtc_db_fetch_array($stock_query);
$stock_left = $stock_values['products_quantity'];
// Deactivate product if checkout is not allowed and the stock level reaches zero
if (STOCK_ALLOW_CHECKOUT == 'false') {
// commerce:seo has an additional constant that tells if the product may be deactivated (STOCK_ALLOW_CHECKOUT_DEACTIVATE)
if ($stock_left < 1
&& STOCK_CHECKOUT_UPDATE_PRODUCTS_STATUS == 'true'
) { // don't update if defined and not true
$qry = "
UPDATE `" . TABLE_PRODUCTS . "` AS `p`
SET `p`.`products_status` = 0
WHERE `p`.`products_id` = '{$productId}' AND `p`.`products_quantity` <= 0
;";
xtc_db_query($qry);
}
}
}
// Attribute items also need to be reduced in stock
if ($usesProductsAttributes) {
// Build additional SQL snippets to update the attributes stock (not using the products_attributes_id because they all change on each update of any attribute in the backend)
$attributeSQLQueryParts = array();
if (!empty($internalOrderInfo['base_item_number'])) {
for ($i = 1; $i <= 10; $i++) {
if (!empty($internalOrderInfo["attribute_{$i}"])) {
$tmpAttr = $internalOrderInfo["attribute_{$i}"];
if (!is_array($tmpAttr)) {
$attributeSQLQueryParts[] = " ATTRIBUTES_ID='{$tmpAttr}'";
} else {
// Only the first element is relevant since there can only be one per attribute-number
reset($tmpAttr);
$attributeSQLQueryParts[] = 'OPTIONS_ID=\'' . $tmpAttr[key($tmpAttr)]['options_id']
. '\' AND OPTIONS_VALUES_ID=\'' . $tmpAttr[key($tmpAttr)]['options_values_id']
. '\'';
}
}
}
} else {
// Attributes was exported as options
foreach ($itemOptions as $itemOption) {
$attributeSQLQueryParts[] =
'OPTIONS_ID=\'' . $itemOption->getOptionNumber() . '\' AND OPTIONS_VALUES_ID=\''
. $itemOption->getValueNumber() . '\'';
}
}
if (!empty($attributeSQLQueryParts)) {
// Attribute stock is ALWAYS reduced (no matter what is set as STOCK_LIMITED or the other constants)!
$attributeSQLConditionSnippet = '(' . str_replace(
array('OPTIONS_ID', 'OPTIONS_VALUES_ID', 'ATTRIBUTES_ID'),
array('`pa`.`options_id`', '`pa`.`options_values_id`', '`pa`.`products_attributes_id`'),
implode(') OR (', $attributeSQLQueryParts)
) . ')';
// Update attributes stock
$qry = "
UPDATE `" . TABLE_PRODUCTS_ATTRIBUTES . "` AS `pa`
SET `pa`.`attributes_stock` = `pa`.`attributes_stock` - {$item->getQuantity()}
WHERE `pa`.`products_id` = '{$productId}'
AND ({$attributeSQLConditionSnippet})
;";
xtc_db_query($qry);
}
}
// Specials stock and active status
if (!empty($internalOrderInfo['is_special_price'])) {
// Always update specials quantity if it is a special
$qry = "
UPDATE `" . TABLE_SPECIALS . "` AS `s`
SET `s`.`specials_quantity` = `s`.`specials_quantity` - {$item->getQuantity()}
WHERE `s`.`products_id` = '{$productId}'
;";
xtc_db_query($qry);
$reduceQuantitySqlSnippet = '';
if (STOCK_CHECK == 'true') {
// only if stock check is active we have to deactivate specials
$reduceQuantitySqlSnippet = " OR `s`.specials_quantity <= 0 AND `s`.`products_id` = '{$productId}'";
}
// Always deactivate specials that have turned to a value equal to or less than zero and deactivate all specials that are expired
$qry = "
UPDATE `" . TABLE_SPECIALS . "` AS `s`
SET `s`.`status` = 0
WHERE
`s`.`status` != 0
AND
(`s`.`expires_date` < NOW() AND `s`.`expires_date` != '0000-00-00 00:00:00' AND `s`.`expires_date` IS NOT NULL
" . $reduceQuantitySqlSnippet . ")
;";
xtc_db_query($qry);
}
}
}
/**
* inserts the total amounts to an order into the database
*
* @param ShopgateOrder $order
* @param int $dbOrderId
* @param ShopgateCouponModel $couponModel
*/
private function insertOrderTotal(ShopgateOrder $order, $dbOrderId, ShopgateCouponModel $couponModel)
{
///////////////////////////////////////////////////////////////////////
// Speicher den Gesamtbetrag
///////////////////////////////////////////////////////////////////////
$amountWithTax = $order->getAmountComplete();
$shippingTaxRate = $this->_getOrderShippingTaxRate($order);
$taxes = $this->_getOrderTaxes($order, $dbOrderId, $shippingTaxRate);
$xtPrice = new xtcPrice($this->currency["code"], 1);
$amountWithTax = $order->getAmountComplete();
$taxes = $this->getOrderTaxes($order);
$xtPrice = new xtcPrice($this->currency["code"], DEFAULT_CUSTOMERS_STATUS_ID_GUEST);
$shippingCosts = $order->getAmountShipping();
$sort = 10;
$shippingInfo = $order->getShippingInfos();
$shippingSortOrder = MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER;
$this->log('_insertOrderTotal(): add subtotal', ShopgateLogger::LOGTYPE_DEBUG);
$ordersTotal = array();
$ordersTotal["orders_id"] = $dbOrderId;
$ordersTotal["title"] = xtc_db_prepare_input("Zwischensumme:");
$ordersTotal["title"] =
ShopgateWrapper::db_prepare_input(MODULE_PAYMENT_SHOPGATE_ORDER_LINE_TEXT_SUBTOTAL . ":");
$ordersTotal["text"] = $xtPrice->xtcFormat($order->getAmountItems(), true);
$ordersTotal["value"] = $order->getAmountItems();
$ordersTotal["class"] = "ot_subtotal";
$ordersTotal["sort_order"] = $sort++;
$ordersTotal["sort_order"] = MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER;
xtc_db_perform(TABLE_ORDERS_TOTAL, $ordersTotal);
$this->log('_insertOrderTotal(): add shipping costs total', ShopgateLogger::LOGTYPE_DEBUG);
$couponAmount = 0;
$coupons = $order->getExternalCoupons();
if (!empty($coupons)) {
foreach ($coupons as $coupon) {
$couponAmount += $couponModel->insertOrderTotal($dbOrderId, $coupon);
}
}
$ordersTotal = array();
$ordersTotal["orders_id"] = $dbOrderId;
$ordersTotal["title"] = xtc_db_prepare_input("Versand:");
$ordersTotal["title"] = ShopgateWrapper::db_prepare_input(
MODULE_PAYMENT_SHOPGATE_ORDER_LINE_TEXT_SHIPPING . ($shippingInfo && $shippingInfo->getDisplayName()
? ' (' . $shippingInfo->getDisplayName() . ')'
: ($shippingInfo->getName() ? ' (' . $shippingInfo->getName() . ')' : '')) . ':'
);
$ordersTotal["text"] = $xtPrice->xtcFormat($shippingCosts, true);
$ordersTotal["value"] = $shippingCosts;
$ordersTotal["class"] = "ot_shipping";
$ordersTotal["sort_order"] = $sort++;
$ordersTotal["sort_order"] = $shippingSortOrder;
xtc_db_perform(TABLE_ORDERS_TOTAL, $ordersTotal);
// insert payment costs.
//
//WARNING: On modify: Change the taxes calculation too!
if($order->getAmountShopPayment() != 0){
ca. Zeile 1963
//
//WARNING: On modify: Change the taxes calculation too!
if($order->getAmountShopPayment() != 0){
$this->log('db: save payment fee', ShopgateLogger::LOGTYPE_DEBUG);
$paymentInfos = $order->getPaymentInfos();
$paymentInfo = $order->getPaymentInfos();
$ordersTotal = array();
$ordersTotal["orders_id"] = $dbOrderId;
$ordersTotal["title"] = xtc_db_prepare_input('Zahlungsartkosten'. (!empty($paymentInfos['shopgate_payment_name']) ? ' ('.$paymentInfos['shopgate_payment_name'].'):' : ''));
$ordersTotal["title"] = ShopgateWrapper::db_prepare_input(
MODULE_PAYMENT_SHOPGATE_ORDER_LINE_TEXT_PAYMENTFEE . (!empty($paymentInfo['shopgate_payment_name'])
? ' (' . $paymentInfo['shopgate_payment_name'] . '):' : '')
);
$ordersTotal["text"] = $xtPrice->xtcFormat($order->getAmountShopPayment(), true);
$ordersTotal["value"] = $order->getAmountShopPayment();
$ordersTotal["class"] = "ot_shipping";
$ordersTotal["sort_order"] = $sort++;
$ordersTotal["sort_order"] = ++$shippingSortOrder;
xtc_db_perform(TABLE_ORDERS_TOTAL, $ordersTotal);
}
$this->log('_insertOrderTotal(): add tax totals', ShopgateLogger::LOGTYPE_DEBUG);
foreach($taxes as $percent => $tax_value) {
$ordersTotal = array();
$ordersTotal["orders_id"] = $dbOrderId;
$ordersTotal["title"] = "inkl. UST {$percent} %";
$ordersTotal["text"] = $xtPrice->xtcFormat($tax_value, true);
$ordersTotal["value"] = $tax_value;
$ordersTotal["class"] = "ot_tax";
$ordersTotal["sort_order"] = $sort++;
$ordersTotal["sort_order"] = MODULE_ORDER_TOTAL_TAX_SORT_ORDER;
xtc_db_perform(TABLE_ORDERS_TOTAL, $ordersTotal);
}
$this->log('_insertOrderTotal(): add order total', ShopgateLogger::LOGTYPE_DEBUG);
$ordersTotal = array();
$ordersTotal["orders_id"] = $dbOrderId;
$ordersTotal["title"] = "<b>Summe:</b>";
$ordersTotal["title"] = "<b>" . MODULE_PAYMENT_SHOPGATE_ORDER_LINE_TEXT_TOTAL . ":</b>";
$ordersTotal["text"] = "<b>".$xtPrice->xtcFormat($amountWithTax, true)."</b>";
$ordersTotal["value"] = $amountWithTax;
$ordersTotal["class"] = "ot_total";
$ordersTotal["sort_order"] = $sort++;
$ordersTotal["sort_order"] = MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER;
xtc_db_perform(TABLE_ORDERS_TOTAL, $ordersTotal);
}
private function _getOrderTaxes(ShopgateOrder $order, $dbOrderId, $shippingTaxRate = 0) {
/**
* calculate the taxes to an complete order
*
* @param ShopgateOrder $order
*
* @return array
*/
private function getOrderTaxes(ShopgateOrder $order)
{
$this->log('_getOrderTaxes(): start', ShopgateLogger::LOGTYPE_DEBUG);
$taxes = array();
foreach($order->getItems() as $orderItem) {
$tax = $orderItem->getTaxPercent();
$tax = intval($tax*100)/100;
$tax_value = $orderItem->getUnitAmountWithTax() - $orderItem->getUnitAmount();
if(!isset($taxes[$tax])) $taxes[$tax]= 0;
if (!isset($taxes[$tax])) {
$taxes[$tax] = 0;
}
$taxes[$tax] += $tax_value * $orderItem->getQuantity();
}
$shippingTaxRate = $this->getOrderShippingTaxRate($order);
if(!empty($shippingTaxRate)) {
$shippingTaxRate = intval($shippingTaxRate*100)/100;
if(!isset($taxes[$shippingTaxRate])) $taxes[$shippingTaxRate]= 0;
$taxes[$shippingTaxRate] += $order->getAmountShipping()-$this->_getOrderShippingAmountWithoutTax($order, $shippingTaxRate);
if (!isset($taxes[$shippingTaxRate])) {
$taxes[$shippingTaxRate] = 0;
}
$taxes[$shippingTaxRate] += $order->getAmountShipping() - $this->getOrderShippingAmountWithoutTax(
$order, $shippingTaxRate
);
}
// set taxes for payment method
if($order->getAmountShopPayment() != 0){
$tax = $order->getPaymentTaxPercent();
$tax = intval($tax*100)/100;
$tax_value = $order->getAmountShopPayment() - round(($order->getAmountShopPayment()*100)/($order->getPaymentTaxPercent()+100),2);
$tax_value = $order->getAmountShopPayment() - round(
($order->getAmountShopPayment() * 100) / ($order->getPaymentTaxPercent() + 100), 2
);
if (!isset($taxes[$tax])) {
$taxes[$tax] = 0;
};
if(!isset($taxes[$tax])) $taxes[$tax]= 0;
$taxes[$tax] += $tax_value;
}
$this->log('_getOrderTaxes(): end', ShopgateLogger::LOGTYPE_DEBUG);
return $taxes;
}
private function _getOrderShippingTaxRate(ShopgateOrder $order) {
/**
* calculates the tax rate to an shipping method
*
* @param ShopgateOrder $order
*
* @return float|int
*/
private function getOrderShippingTaxRate(ShopgateOrder $order)
{
$this->log('_getOrderShippingTaxRate(): start', ShopgateLogger::LOGTYPE_DEBUG);
$shippingTaxRate = 0;
// Check if a shipping method is set in config
$shippingMethod = $this->config->getShipping();
$orderCountryCode2 = $order->getInvoiceAddress()->getCountry();
if(!empty($shippingMethod)) {
$this->log('db: get configuration value ', ShopgateLogger::LOGTYPE_DEBUG);
// Get tax value from shipping module
$qry =
$taxQuery =
"SELECT `c`.`configuration_value`, `tr`.`tax_rate` " .
"FROM `" . TABLE_CONFIGURATION . "` AS `c` " .
"INNER JOIN `" . TABLE_TAX_RATES . "` AS `tr` ON(`c`.`configuration_value`=`tr`.`tax_class_id`) " .
"INNER JOIN `" . TABLE_ZONES_TO_GEO_ZONES . "` AS `geozones` ON(`tr`.`tax_zone_id`=`geozones`.`geo_zone_id`) " .
"INNER JOIN `" . TABLE_ZONES_TO_GEO_ZONES
. "` AS `geozones` ON(`tr`.`tax_zone_id`=`geozones`.`geo_zone_id`) " .
"INNER JOIN `" . TABLE_COUNTRIES . "` AS `co` ON(`geozones`.`zone_country_id`=`co`.`countries_id`) " .
"WHERE " .
"`c`.`configuration_key` = 'MODULE_SHIPPING_".strtoupper($shippingMethod)."_TAX_CLASS' " .
"AND " .
"`co`.`countries_iso_code_2`='$orderCountryCode2';";
$result = xtc_db_query($qry);
} else {
$taxQuery = "SELECT MAX(tr.tax_rate) AS tax_rate FROM tax_rates AS tr";
}
$result = xtc_db_query($taxQuery);
$moduleTaxSetting = xtc_db_fetch_array($result);
if(!empty($moduleTaxSetting) && !empty($moduleTaxSetting['configuration_value']) && !empty($moduleTaxSetting['tax_rate'])) {
// get the tax rate for the shipping costs
if (!empty($moduleTaxSetting) && !empty($moduleTaxSetting['tax_rate'])) {
$shippingTaxRate = intval($moduleTaxSetting['tax_rate']*100)/100;
}
}
$this->log('_getOrderShippingTaxRate(): end', ShopgateLogger::LOGTYPE_DEBUG);
return $shippingTaxRate;
}
private function _getOrderShippingAmountWithoutTax(ShopgateOrder $order, $shippingTaxRate = 0) {
/**
* add tax to the complete shipping amount
*
* @param ShopgateOrder $order
* @param int $shippingTaxRate
*
* @return float|int
*/
private function getOrderShippingAmountWithoutTax(ShopgateOrder $order, $shippingTaxRate = 0)
{
$shippingAmountWithoutTax = $order->getAmountShipping();
// Check if a shipping method is set in config
$shippingMethod = $this->config->getShipping();
ca. Zeile 2073
return $shippingAmountWithoutTax;
}
private function updateItemsStock(ShopgateOrder $order) {
if(STOCK_LIMITED != "true") return; /* STOCK_LIMITED ist vom System gegeben */
/**
* send order information to afterbuy
*
* @param $iOrderId
* @param ShopgateOrder $order
*/
private function pushOrderToAfterbuy($iOrderId, ShopgateOrder $order)
{
if (!$order->getIsShippingBlocked() && defined('AFTERBUY_ACTIVATED') && AFTERBUY_ACTIVATED == 'true') {
$this->log("START TO SEND ORDER TO AFTERBUY", ShopgateLogger::LOGTYPE_ACCESS);
foreach($order->getItems() as $item) {
if($item->getItemNumber() == 'COUPON' || $item->getItemNumber() == 'PAYMENT_FEE'){
continue;
require_once(DIR_WS_CLASSES . 'afterbuy.php');
$aBUY = new xtc_afterbuy_functions($iOrderId);
if ($aBUY->order_send()) {
$aBUY->process_order();
$this->log("SUCCESSFUL ORDER SEND TO AFTERBUY", ShopgateLogger::LOGTYPE_ACCESS);
} else {
$this->log("ORDER ALREADY SEND TO AFTERBUY", ShopgateLogger::LOGTYPE_ACCESS);
}
$options = $this->jsonDecode($item->getInternalOrderInfo(), true);
$productId = $item->getItemNumber();
if(!empty($options) && isset($options["base_item_number"])) {
$productId = $options["base_item_number"];
$this->log("FINISH SEND ORDER TO AFTERBUY", ShopgateLogger::LOGTYPE_ACCESS);
}
$stock = $this->xtc_get_products_stock($productId);
$stock -= $item->getQuantity();
$data = array(
"products_quantity" => $stock,
);
if($stock <= 0 && STOCK_ALLOW_CHECKOUT == "false") {
$data["products_status"] = 0;
}
xtc_db_perform(TABLE_PRODUCTS, $data, "update", "products_id = '$productId'");
// Special price überprüfen
$qry = "
SELECT
sp.specials_quantity,
sp.specials_new_products_price,
sp.status
FROM ".TABLE_SPECIALS." sp
WHERE sp.products_id = '".$productId."' AND sp.status = 1 AND (sp.expires_date > now() OR sp.expires_date = '0000-00-00 00:00:00' OR sp.expires_date IS NULL)
LIMIT 1
";
$qry = xtc_db_query($qry);
$productSpecials = xtc_db_fetch_array($qry);
$orderInfo = $this->jsonDecode($item->getInternalOrderInfo(), true);
if(!empty($productSpecials) && !empty($orderInfo['is_special_price'])){
$stock = $productSpecials["specials_quantity"];
$stock -= $item->getQuantity();
$data = array(
"specials_quantity" => $stock,
);
/**
* send order information to dreambot
*
* @param $dbOrderId
* @param ShopgateOrder $shopgateOrder
*/
private function pushOrderToDreamRobot($dbOrderId, ShopgateOrder $shopgateOrder)
{
if (!$shopgateOrder->getIsShippingBlocked() && file_exists(DIR_FS_CATALOG . 'dreamrobot_checkout.inc.php')) {
require_once(DIR_FS_CATALOG . 'includes/classes/order.php');
$this->log("START TO SEND ORDER TO DREAMROBOT", ShopgateLogger::LOGTYPE_ACCESS);
if($stock <= 0 && STOCK_ALLOW_CHECKOUT == "false"){
$data["status"] = 0;
}
$order = new order($dbOrderId);
$_SESSION['tmp_oID'] = $dbOrderId;
$order->info['shipping_cost'] = $shopgateOrder->getAmountShipping();
include_once('./dreamrobot_checkout.inc.php');
xtc_db_perform(TABLE_SPECIALS, $data, "update", "products_id = '$productId'");
}
$this->log("FINISH SEND ORDER TO DREAMROBOT", ShopgateLogger::LOGTYPE_ACCESS);
}
}
protected function createReviewsCsv() {
$sql = "
SELECT
r.reviews_id,
r.products_id,
r.customers_name,
r.reviews_rating,
r.date_added,
rd.reviews_text
FROM
" . TABLE_REVIEWS . " as r
INNER JOIN
" . TABLE_REVIEWS_DESCRIPTION . " as rd ON r.reviews_id = rd.reviews_id
WHERE rd.languages_id = '".$this->languageId."'
ORDER BY r.products_id ASC";
$limit = 10;
$page = 1;
$offset = ($page-1)*$limit;
$pg = " LIMIT $offset,$limit";
while($query = xtc_db_query($sql.$pg)) {
$count = xtc_db_num_rows($query);
if($count == 0) {
break;
/**
* @param $version
*
* @return bool
*/
private function assertMinimumVersion($version)
{
return version_compare($this->modifiedVersion, $version, '>=');
}
$reviews = array();
while($entry = xtc_db_fetch_array($query)) {
$review = $this->buildDefaultReviewRow();
/**
* logic for sending mails was taken out of the shop system
*
* @param $insert_id
* @param $userId
*
* @throws ShopgateLibraryException
*/
private function sendOrderEmail($insert_id, $userId)
{
if (!$this->assertMinimumVersion('1.00')) {
return;
}
$review['item_number'] = $entry['products_id'] ;
$review['update_review_id'] = $entry['reviews_id'];
$review['score'] = $entry['reviews_rating']*2;
$review['name'] = $entry['customers_name'];
$review['date'] = $entry['date_added'];
$review['title'] = '';
$review['text'] = $entry['reviews_text'];
$_SESSION['customer_id'] = $userId;
require_once(DIR_FS_INC . 'xtc_get_order_data.inc.php');
require_once(DIR_FS_INC . 'xtc_get_attributes_model.inc.php');
require_once(DIR_WS_INCLUDES . "classes/order.php");
if (!defined('SEND_EMAILS')) {
define('SEND_EMAILS', 'true');
}
if (!$this->assertMinimumVersion('1.05')) {
require_once(DIR_FS_CATALOG
. "includes/external/shopgate/base/inc/shopgate_php_mail_older_shop_version.inc.php");
// check if customer is allowed to send this order!
$order_query_check = xtc_db_query(
"SELECT
customers_id
FROM " . TABLE_ORDERS . "
WHERE orders_id='" . $insert_id . "'"
);
$reviews[] = $review;
$order_check = xtc_db_fetch_array($order_query_check);
if ($_SESSION['customer_id'] == $order_check['customers_id']) {
$order = new order($insert_id);
$smarty = new Smarty;
$smarty->assign(
'address_label_customer',
xtc_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />')
);
$smarty->assign(
'address_label_shipping',
xtc_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />')
);
if ($_SESSION['credit_covers'] != '1') {
$smarty->assign(
'address_label_payment',
xtc_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />')
);
}
$smarty->assign('csID', $order->customer['csID']);
$order_total = $order->getTotalData($insert_id);
$smarty->assign('order_data', $order->getOrderData($insert_id));
$smarty->assign('order_total', $order_total['data']);
// assign language to template for caching
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$smarty->assign('logo_path', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/img/');
$smarty->assign('oID', $insert_id);
if ($order->info['payment_method'] != '' && $order->info['payment_method'] != 'no_payment') {
include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/'
. $order->info['payment_method'] . '.php');
$payment_method =
constant(strtoupper('MODULE_PAYMENT_' . $order->info['payment_method'] . '_TEXT_TITLE'));
}
$smarty->assign('PAYMENT_METHOD', $payment_method);
$smarty->assign('DATE', xtc_date_long($order->info['date_purchased']));
$smarty->assign('NAME', $order->customer['name']);
$smarty->assign('COMMENTS', $order->info['comments']);
$smarty->assign('EMAIL', $order->customer['email_address']);
$smarty->assign('PHONE', $order->customer['telephone']);
/** BEGIN BILLPAY CHANGED **/
require_once(DIR_FS_CATALOG . 'includes/billpay/utils/billpay_mail.php');
/** EOF BILLPAY CHANGED **/
//BOF - web28 - 2010-03-27 PayPal Bezahl-Link
unset ($_SESSION['paypal_link']);
if ($order->info['payment_method'] == 'paypal_ipn') {
$paypal_link = array();
$payment_modules = new paypal_ipn;
$payment_modules->create_paypal_link();
$smarty->assign('PAYMENT_INFO_HTML', $paypal_link['html']);
$smarty->assign('PAYMENT_INFO_TXT', MODULE_PAYMENT_PAYPAL_IPN_TXT_EMAIL . $paypal_link['text']);
$_SESSION['paypal_link'] = $paypal_link['checkout'];
}
//EOF - web28 - 2010-03-27 PayPal Bezahl-Link
// PAYMENT MODUL TEXTS
// EU Bank Transfer
if ($order->info['payment_method'] == 'eustandardtransfer') {
$smarty->assign('PAYMENT_INFO_HTML', MODULE_PAYMENT_EUTRANSFER_TEXT_DESCRIPTION);
$smarty->assign(
'PAYMENT_INFO_TXT', str_replace("<br />", "\n", MODULE_PAYMENT_EUTRANSFER_TEXT_DESCRIPTION)
);
}
foreach($reviews as $review) {
$this->addReviewRow($review);
// MONEYORDER
if ($order->info['payment_method'] == 'moneyorder') {
$smarty->assign('PAYMENT_INFO_HTML', MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION);
$smarty->assign(
'PAYMENT_INFO_TXT', str_replace("<br />", "\n", MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION)
);
}
// -------Trustedshops Kundenbewertung -----------
if (TS_SHOW_RATING_MAIL) {
getTSRatingButtonOrder($_SESSION['customer_id'], $ts_rating_button_dest_url, $ts_rating_button_img);
$smarty->assign('TS_RATING_MAIL_TXT', TS_RATING_EMAIL . ":\n" . $ts_rating_button_dest_url);
$smarty->assign('TS_RATING_MAIL_HTML', TS_RATING_EMAIL . ":<br/>" . $ts_rating_button_dest_url);
}
// -------Trustedshops Kundenbewertung -----------
// dont allow cache
$smarty->caching = false;
$html_mail = $smarty->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/order_mail.html');
$txt_mail = $smarty->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/order_mail.txt');
// create subject
$order_subject = str_replace('{$nr}', $insert_id, EMAIL_BILLING_SUBJECT_ORDER);
$order_subject = str_replace('{$date}', strftime(DATE_FORMAT_LONG), $order_subject);
$order_subject = str_replace('{$lastname}', $order->customer['lastname'], $order_subject);
$order_subject = str_replace('{$firstname}', $order->customer['firstname'], $order_subject);
// send mail to admin
//BOF Dokuman - 2009-08-19 - BUGFIX: #0000227 customers surname in reply address in orders mail to admin
// xtc_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, EMAIL_BILLING_ADDRESS, STORE_NAME, EMAIL_BILLING_FORWARDING_STRING, $order->customer['email_address'], $order->customer['firstname'], '', '', $order_subject, $html_mail, $txt_mail);
//xtc_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, EMAIL_BILLING_ADDRESS, STORE_NAME, EMAIL_BILLING_FORWARDING_STRING, $order->customer['email_address'], $order->customer['firstname'].' '.$order->customer['lastname'], '', '', $order_subject, $html_mail, $txt_mail);
if (!shopgate_php_mail(
EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, EMAIL_BILLING_ADDRESS, STORE_NAME,
EMAIL_BILLING_FORWARDING_STRING, $order->customer['email_address'],
$order->customer['firstname'] . ' ' . $order->customer['lastname'], '', '', $order_subject,
$html_mail, $txt_mail
)
) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_EMAIL_SEND_ERROR,
"Error while sending order confirmation mail to customer"
);
}
//EOF Dokuman - 2009-08-19 - BUGFIX: #0000227 customers surname in reply address in orders mail to admin
$page++;
$offset = ($page-1)*$limit;
$pg = " LIMIT $offset,$limit";
// send mail to customer
//BOF - Dokuman - 2009-10-17 - Send emails to customer only, when set to "true" in admin panel
if (SEND_EMAILS == 'true') {
//EOF - Dokuman - 2009-10-17 - Send emails to customer only, when set to "true" in admin panel
//xtc_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $order->customer['email_address'], $order->customer['firstname'].' '.$order->customer['lasNtname'], '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, '', '', $order_subject, $html_mail, $txt_mail);
if (!shopgate_php_mail(
EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $order->customer['email_address'],
$order->customer['firstname'] . ' ' . $order->customer['lastname'], '',
EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, '', '', $order_subject,
$html_mail, $txt_mail
)
) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_EMAIL_SEND_ERROR,
"Error while sending order confirmation mail to customer"
);
}
//BOF - Dokuman - 2009-10-17 - Send emails to customer only, when set to "true" in admin panel
}
//EOF - Dokuman - 2009-10-17 - Send emails to customer only, when set to "true" in admin panel
protected function createPagesCsv() {
if (AFTERBUY_ACTIVATED == 'true') {
require_once(DIR_WS_CLASSES . 'afterbuy.php');
$aBUY = new xtc_afterbuy_functions($insert_id);
if ($aBUY->order_send()) {
$aBUY->process_order();
}
}
}
} else {
require_once(DIR_FS_CATALOG . "includes/external/shopgate/base/inc/shopgate_xtc_php_mail.inc.php");
$smarty = new Smarty;
private function _getAddressFormatId() {
$qry = "
SELECT c.address_format_id
FROM ".TABLE_COUNTRIES." c
WHERE UPPER(c.countries_iso_code_2) = 'DE'
";
// check if customer is allowed to send this order!
$order_query_check = xtc_db_query(
"SELECT customers_id
FROM " . TABLE_ORDERS . "
WHERE orders_id='" . $insert_id . "'"
);
$item = xtc_db_fetch_array(xtc_db_query($qry));
return $item["address_format_id"];
$order_check = xtc_db_fetch_array($order_query_check);
//BOF - web28 - 2010-03-20 - Send Order by Admin
if ($_SESSION['customer_id'] == $order_check['customers_id'] || $send_by_admin) {
//EOF - web28 - 2010-03-20 - Send Order by Admin
$order = new order($insert_id);
if (empty($order->info['language'])) {
$order->info['language'] = $this->language;
}
// BOF - Tomcraft - 2009-10-03 - Paypal Express Modul
if (isset($_SESSION['paypal_express_new_customer'])
&& $_SESSION['paypal_express_new_customer'] == 'true'
&& isset($_SESSION['ACCOUNT_PASSWORD'])
&& $_SESSION['ACCOUNT_PASSWORD'] == 'true'
) {
require_once(DIR_FS_INC . 'xtc_create_password.inc.php');
require_once(DIR_FS_INC . 'xtc_encrypt_password.inc.php');
$password_encrypted = xtc_RandomString(ENTRY_PASSWORD_MIN_LENGTH * 2);
$password = xtc_encrypt_password($password_encrypted);
if (!defined('PROJECT_MAJOR_VERSION')) {
xtc_db_query(
"update " . TABLE_CUSTOMERS . " set customers_password = '" . $password
. "' where customers_id = '" . (int)$_SESSION['customer_id'] . "'"
);
} else {
xtc_db_query(
"update " . TABLE_CUSTOMERS . " set customers_password = '" . $password
. "', password_request_time = now() where customers_id = '" . (int)$_SESSION['customer_id']
. "'"
);
}
private function _createGuestUser(ShopgateOrder $order) {
// $order = new ShopgateOrder();
$address = $order->getInvoiceAddress();
$customerStatus = $this->config->getCustomersStatusId();
if($customerStatus === -1) $customerStatus = DEFAULT_CUSTOMERS_STATUS_ID;
$smarty->assign('NEW_PASSWORD', $password_encrypted);
}
// EOF - Tomcraft - 2009-10-03 - Paypal Express Modul
//BOF - web28 - 2010-03-20 - Send Order by Admin
if (isset($send_by_admin)) {//DokuMan - 2010-09-18 - Undefined variable: send_by_admin
$xtPrice = new xtcPrice($order->info['currency'], $order->info['status']);
}
//EOF - web28 - 2010-03-20 - Send Order by Admin
$smarty->assign(
'address_label_customer',
xtc_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />')
);
$smarty->assign(
'address_label_shipping',
xtc_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />')
);
$smarty->assign(
'address_label_payment',
xtc_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />')
);
$smarty->assign('csID', $order->customer['csID']);
$customer = array();
$customer["customers_vat_id_status"] = 0;
$customer["customers_status"] = $customerStatus;
$customer["customers_gender"] = $address->getGender();
$customer["customers_firstname"] = $address->getFirstName();
$customer["customers_lastname"] = $address->getLastName();
$customer["customers_email_address"] = $order->getMail();
$customer["customers_default_address_id"] = "";
$customer["customers_telephone"] = $order->getPhone();
$customer["customers_fax"] = "";
$customer["customers_newsletter"] = 0;
$customer["customers_newsletter_mode"] = 0;
$customer["member_flag"] = 0;
$customer["delete_user"] = 1;
$customer["account_type"] = 0;
$customer["refferers_id"] = 0;
$customer["customers_date_added"] = date( 'Y-m-d H:i:s' );
$customer["customers_last_modified"] = date( 'Y-m-d H:i:s' );
$order_total = $order->getTotalData(
$insert_id
); //ACHTUNG für Bestellbestätigung aus Admin Funktion in admin/includes/classes/order.php
$smarty->assign(
'order_data', $order->getOrderData($insert_id)
); //ACHTUNG für Bestellbestätigung aus Admin Funktion in admin/includes/classes/order.php
$smarty->assign('order_total', $order_total['data']);
// assign language to template for caching Web28 2012-04-25 - change all $_SESSION['language'] to $order->info['language']
$smarty->assign('language', $order->info['language']);
$smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$smarty->assign('logo_path', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/img/');
//$smarty->assign('oID', $insert_id);
$smarty->assign('oID', $order->info['order_id']); //DokuMan - 2011-08-31 - fix order_id assignment
//shipping method
if ($order->info['shipping_class'] != '') {
$shipping_class = explode('_', $order->info['shipping_class']);
include(DIR_FS_CATALOG . 'lang/' . $order->info['language'] . '/modules/shipping/'
. $shipping_class[0] . '.php');
$shipping_method = constant(strtoupper('MODULE_SHIPPING_' . $shipping_class[0] . '_TEXT_TITLE'));
}
$smarty->assign('SHIPPING_METHOD', $shipping_method);
//payment method
if ($order->info['payment_method'] != '' && $order->info['payment_method'] != 'no_payment') {
include_once(DIR_FS_CATALOG . 'lang/' . $order->info['language'] . '/modules/payment/'
. $order->info['payment_method'] . '.php');
$payment_method =
constant(strtoupper('MODULE_PAYMENT_' . $order->info['payment_method'] . '_TEXT_TITLE'));
}
$smarty->assign('PAYMENT_METHOD', $payment_method);
$smarty->assign('DATE', xtc_date_long($order->info['date_purchased']));
$smarty->assign('NAME', $order->customer['name']);
//BOF - web28 - 2010-08-20 - Fix for more personalized e-mails to the customer (show salutation and surname)
$gender_query = xtc_db_query(
"SELECT customers_gender FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '"
. $order->customer['id'] . "'"
);
$gender = xtc_db_fetch_array($gender_query);
if ($gender['customers_gender'] == 'f') {
$smarty->assign('GENDER', FEMALE);
} elseif ($gender['customers_gender'] == 'm') {
$smarty->assign('GENDER', MALE);
} else {
$smarty->assign('GENDER', '');
}
//EOF - web28 - 2010-08-20 - Fix for more personalized e-mails to the customer (show salutation and surname)
//BOF - web28 - 2010-08-20 - Erweiterung Variablen für Bestätigungsmail
$smarty->assign('CITY', $order->customer['city']);
$smarty->assign('POSTCODE', $order->customer['postcode']);
$smarty->assign('STATE', $order->customer['state']);
$smarty->assign('COUNTRY', $order->customer['country']);
$smarty->assign('COMPANY', $order->customer['company']);
$smarty->assign('STREET', $order->customer['street_address']);
$smarty->assign('FIRSTNAME', $order->customer['firstname']);
$smarty->assign('LASTNAME', $order->customer['lastname']);
//EOF - web28 - 2010-08-20 - Erweiterung Variablen für Bestätigungsmail
$smarty->assign('COMMENTS', $order->info['comments']);
$smarty->assign('EMAIL', $order->customer['email_address']);
$smarty->assign('PHONE', $order->customer['telephone']);
//BOF - web28 - 2010-03-27 PayPal Bezahl-Link
unset ($_SESSION['paypal_link']);
if ($order->info['payment_method'] == 'paypal_ipn') {
//BOF - web28 - 2010-06-11 - Send Order by Admin Paypal IPN
if (isset($send_by_admin)) { //DokuMan - 2010-09-18 - Undefined variable: send_by_admin
require(DIR_FS_CATALOG_MODULES . 'payment/paypal_ipn.php');
include(DIR_FS_LANGUAGES . $order->info['language'] . '/modules/payment/paypal_ipn.php');
$payment_modules = new paypal_ipn;
}
//EOF - web28 - 2010-06-11 - Send Order by Admin Paypal IPN
$paypal_link = array();
$payment_modules->create_paypal_link();
$smarty->assign('PAYMENT_INFO_HTML', $paypal_link['html']);
$smarty->assign('PAYMENT_INFO_TXT', MODULE_PAYMENT_PAYPAL_IPN_TXT_EMAIL . $paypal_link['text']);
$_SESSION['paypal_link'] = $paypal_link['checkout'];
}
//EOF - web28 - 2010-03-27 PayPal Bezahl-Link
// PAYMENT MODUL TEXTS
// EU Bank Transfer
if ($order->info['payment_method'] == 'eustandardtransfer') {
$smarty->assign('PAYMENT_INFO_HTML', MODULE_PAYMENT_EUTRANSFER_TEXT_DESCRIPTION);
$smarty->assign(
'PAYMENT_INFO_TXT', str_replace("<br />", "\n", MODULE_PAYMENT_EUTRANSFER_TEXT_DESCRIPTION)
);
}
xtc_db_perform(TABLE_CUSTOMERS, $customer);
$customerId = xtc_db_insert_id();
// MONEYORDER
if ($order->info['payment_method'] == 'moneyorder') {
$smarty->assign('PAYMENT_INFO_HTML', MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION);
$smarty->assign(
'PAYMENT_INFO_TXT', str_replace("<br />", "\n", MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION)
);
}
$qry = "SELECT countries_id FROM ".TABLE_COUNTRIES." WHERE UPPER(countries_iso_code_2) = UPPER('".$address->getCountry() ."')";
$qry = xtc_db_query($qry);
$country = xtc_db_fetch_array($qry);
$country = $country["countries_id"];
// Cash on Delivery
if ($order->info['payment_method'] == 'cod') {
$smarty->assign('PAYMENT_INFO_HTML', MODULE_PAYMENT_COD_TEXT_INFO);
$smarty->assign('PAYMENT_INFO_TXT', str_replace("<br />", "\n", MODULE_PAYMENT_COD_TEXT_INFO));
}
$_address = array(
"customers_id" => $customerId,
"entry_gender" => $address->getGender(),
"entry_company" => $address->getCompany(),
"entry_firstname" => $address->getFirstName(),
"entry_lastname" => $address->getLastName(),
"entry_street_address" => $address->getStreet1(),
"entry_suburb" => "",
"entry_postcode" => $address->getZipcode(),
"entry_city" => $address->getCity(),
"entry_state" => "",
"entry_country_id" => 81,
"entry_zone_id" => null,
"address_date_added" => date( 'Y-m-d H:i:s' ),
"address_last_modified" => date( 'Y-m-d H:i:s' ),
//allow duty-note in email
if (empty($main) || !is_object($main)) {
require_once(DIR_FS_CATALOG . 'includes/classes/main.php');
$main = new main();
}
if (method_exists($main, "getDeliveryDutyInfo")) {
$smarty->assign(
'DELIVERY_DUTY_INFO', $main->getDeliveryDutyInfo($order->delivery['country_iso_2'])
);
xtc_db_perform(TABLE_ADDRESS_BOOK, $_address);
$addressId = xtc_db_insert_id();
$customer = array(
"customers_default_address_id" =>$addressId
//absolute image path
$smarty->assign(
'img_path', HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . 'product_images/' . (defined(
'SHOW_IMAGES_IN_EMAIL_DIR'
) ? SHOW_IMAGES_IN_EMAIL_DIR : 'thumbnail') . '_images/'
);
xtc_db_perform(TABLE_CUSTOMERS, $customer, "update", "customers_id = $customerId");
// dont allow cache
$smarty->caching = 0;
$_info = array (
"customers_info_id" => $customerId,
"customers_info_date_of_last_logon" => date( 'Y-m-d H:i:s' ),
"customers_info_number_of_logons" => '1',
"customers_info_date_account_created" => date( 'Y-m-d H:i:s' ),
"customers_info_date_account_last_modified" => date( 'Y-m-d H:i:s' ),
"global_product_notifications" => 0
// BOF - Tomcraft - 2011-06-17 - Added revocation to email
$shop_content_data = $main->getContentData(REVOCATION_ID);
$revocation = $shop_content_data['content_text'];
$smarty->assign('REVOCATION_HTML', $revocation);
$smarty->assign(
'REVOCATION_TXT', $revocation
); //replace br, strip_tags, html_entity_decode are allready execute in xtc_php_mail function
}
// EOF - Tomcraft - 2011-06-17 - Added revocation to email
$html_mail =
$smarty->fetch(CURRENT_TEMPLATE . '/mail/' . $order->info['language'] . '/order_mail.html');
$txt_mail = $smarty->fetch(CURRENT_TEMPLATE . '/mail/' . $order->info['language'] . '/order_mail.txt');
//email attachments
$email_attachments = defined('EMAIL_BILLING_ATTACHMENTS') ? EMAIL_BILLING_ATTACHMENTS : '';
// create subject
$order_subject = str_replace('{$nr}', $insert_id, EMAIL_BILLING_SUBJECT_ORDER);
$order_subject = str_replace(
'{$date}', xtc_date_long($order->info['date_purchased']), $order_subject
); // Tomcraft - 2011-12-28 - Use date_puchased instead of current date in E-Mail subject
$order_subject = str_replace('{$lastname}', $order->customer['lastname'], $order_subject);
$order_subject = str_replace('{$firstname}', $order->customer['firstname'], $order_subject);
// send mail to admin
if (!shopgate_php_mail(
EMAIL_BILLING_ADDRESS,
EMAIL_BILLING_NAME,
EMAIL_BILLING_ADDRESS,
STORE_NAME,
EMAIL_BILLING_FORWARDING_STRING,
$order->customer['email_address'],
$order->customer['firstname'] . ' ' . $order->customer['lastname'],
$email_attachments,
'',
$order_subject,
$html_mail,
$txt_mail
)
) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_EMAIL_SEND_ERROR,
"Error while sending order confirmation mail to admin"
);
xtc_db_perform(TABLE_CUSTOMERS_INFO, $_info);
$customerMemo = array();
$customerMemo["customers_id"] = $customerId;
$customerMemo["memo_date"] = date( 'Y-m-d' );
$customerMemo["memo_title"] = "Shopgate - Account angelegt";
$customerMemo["memo_text"] = "Account wurde von Shopgate angelegt";
$customerMemo["poster_id"] = null;
xtc_db_perform("customers_memo", $customerMemo);
$customer = xtc_db_fetch_array(xtc_db_query("SELECT * FROM ".TABLE_CUSTOMERS." WHERE customers_id = " . $customerId));
return $customer;
}
// send mail to customer
if (SEND_EMAILS == 'true' || $send_by_admin) {
if (!shopgate_php_mail(
EMAIL_BILLING_ADDRESS,
EMAIL_BILLING_NAME,
$order->customer['email_address'],
$order->customer['firstname'] . ' ' . $order->customer['lastname'],
'',
EMAIL_BILLING_REPLY_ADDRESS,
EMAIL_BILLING_REPLY_ADDRESS_NAME,
$email_attachments,
'',
$order_subject,
$html_mail,
$txt_mail
)
) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_EMAIL_SEND_ERROR,
"Error while sending order confirmation mail to customer"
);
}
}
private function _pushOrderToAfterbuy($iOrderId, ShopgateOrder $order) {
if (!$order->getIsShippingBlocked() && defined('AFTERBUY_ACTIVATED') && AFTERBUY_ACTIVATED == 'true') {
$this->log("START TO SEND ORDER TO AFTERBUY", ShopgateLogger::LOGTYPE_ACCESS);
if (AFTERBUY_ACTIVATED == 'true') {
require_once (DIR_WS_CLASSES.'afterbuy.php');
$aBUY = new xtc_afterbuy_functions( $iOrderId );
$aBUY = new xtc_afterbuy_functions($insert_id);
if ($aBUY->order_send()) {
$aBUY->process_order();
$this->log("SUCCESSFUL ORDER SEND TO AFTERBUY", ShopgateLogger::LOGTYPE_ACCESS);
} else {
$this->log("ORDER ALREADY SEND TO AFTERBUY", ShopgateLogger::LOGTYPE_ACCESS);
}
$this->log("FINISH SEND ORDER TO AFTERBUY", ShopgateLogger::LOGTYPE_ACCESS);
}
}
//BOF - web28 - 2010-03-20 - Send Order by Admin
if (isset($send_by_admin)) { //DokuMan - 2010-09-18 - Undefined variable: send_by_admin
$customer_notified = '1';
//Comment out the next line for setting the $orders_status_id= '1 '- Auskommentieren der nächste Zeile, um die $orders_status_id = '1' zu setzen
$orders_status_id = ($order->info['orders_status'] < 1) ? '1' : $order->info['orders_status'];
//web28 - 2011-03-20 - Fix order status
xtc_db_query(
"UPDATE " . TABLE_ORDERS . "
SET orders_status = '" . xtc_db_input($orders_status_id) . "',
last_modified = now()
WHERE orders_id = '" . xtc_db_input($insert_id) . "'"
);
private function _pushOrderToDreamRobot($dbOrderId, ShopgateOrder $order) {
if (!$order->getIsShippingBlocked() && file_exists(DIR_FS_CATALOG.'dreamrobot_checkout.inc.php')) {
require_once(DIR_FS_CATALOG.'includes/classes/order.php');
$this->log("START TO SEND ORDER TO DREAMROBOT", ShopgateLogger::LOGTYPE_ACCESS);
//web28 - 2011-08-26 - Fix order status history
xtc_db_query(
"INSERT INTO " . TABLE_ORDERS_STATUS_HISTORY . "
SET orders_id = '" . xtc_db_input($insert_id) . "',
orders_status_id = '" . xtc_db_input($orders_status_id) . "',
date_added = now(),
customer_notified = '" . $customer_notified . "',
comments = '" . COMMENT_SEND_ORDER_BY_ADMIN . "'"
);
$order = new order($dbOrderId);
$_SESSION['tmp_oID'] = $dbOrderId;
include_once ('./dreamrobot_checkout.inc.php');
$messageStack->add_session(SUCCESS_ORDER_SEND, 'success');
$this->log("FINISH SEND ORDER TO DREAMROBOT", ShopgateLogger::LOGTYPE_ACCESS);
if (isset($_GET['site']) && $_GET['site'] == 1) { //DokuMan - 2010-09-18 - Undefined variable
xtc_redirect(xtc_href_link(FILENAME_ORDERS, 'oID=' . $_GET['oID'] . '&action=edit'));
} else {
xtc_redirect(xtc_href_link(FILENAME_ORDERS, 'oID=' . $_GET['oID']));
}
}
public function cron($jobname, $params, &$message, &$errorcount) {
switch ($jobname) {
case 'set_shipping_completed': $this->cronSetOrdersShippingCompleted($message, $errorcount); break;
default: throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_CRON_UNSUPPORTED_JOB, 'Job name: "'.$jobname.'"', true);
//EOF - web28 - 2010-03-20 - Send Order by Admin
}
}
}
/**
ca. Zeile 2325
*
* @param string $message Process log will be appended to this reference.
* @param int $errorcount This reference gets incremented on errors.
*/
protected function cronSetOrdersShippingCompleted(&$message, &$errorcount) {
protected function cronSetOrdersShippingCompleted(&$message, &$errorcount)
{
$query =
"SELECT `sgo`.`orders_id`, `sgo`.`shopgate_order_number` ".
"FROM `".TABLE_SHOPGATE_ORDERS."` sgo ".
"INNER JOIN `".TABLE_ORDERS."` xto ON (`xto`.`orders_id` = `sgo`.`orders_id`) ".
ca. Zeile 2341
return;
}
while ($shopgateOrder = xtc_db_fetch_array($result)) {
if (!$this->setOrderShippingCompleted($shopgateOrder['shopgate_order_number'], $shopgateOrder['orders_id'], $this->merchantApi)) {
if (!$this->setOrderShippingCompleted(
$shopgateOrder['shopgate_order_number'], $shopgateOrder['orders_id'], $this->merchantApi, $this->config
)
) {
$errorcount++;
$message .= 'Shopgate order number "'.$shopgateOrder['shopgate_order_number'].'": error'."\n";
}
}
}
/**
* Set the shipping status for a list of order IDs.
*
* @param int[] $orderIds The IDs of the orders in the shop system.
* @param int $status The ID of the order status that has been set in the shopping system.
*/
public function updateOrdersStatus($orderIds, $status) {
$query = xtc_db_input(
"SELECT `sgo`.`orders_id`, `sgo`.`shopgate_order_number`, `xtl`.`code` ".
"FROM `".TABLE_SHOPGATE_ORDERS."` sgo ".
"INNER JOIN `".TABLE_ORDERS."` xto ON (`xto`.`orders_id` = `sgo`.`orders_id`) ".
"INNER JOIN `".TABLE_LANGUAGES."` xtl ON (`xtl`.`directory` = `xto`.`language`) ".
"WHERE `sgo`.`orders_id` IN (".xtc_db_input(implode(", ", $orderIds)).")");
$result = xtc_db_query($query);
if (empty($result)) {
return;
}
$configurations = array();
$merchantApis = array();
while ($shopgateOrder = xtc_db_fetch_array($result)) {
$language = $shopgateOrder['code'];
if (empty($merchantApis[$language])) {
try {
$config = new ShopgateConfigModified();
$config->loadByLanguage($language);
$builder = new ShopgateBuilder($config);
$merchantApis[$language] = &$builder->buildMerchantApi();
$configurations[$language] = $config;
} catch (ShopgateLibraryException $e) {
// do not abort. the error will be logged
}
}
if ($status != $configurations[$language]->getOrderStatusShipped()) {
return;
}
$this->setOrderShippingCompleted($shopgateOrder['shopgate_order_number'], $shopgateOrder['orders_id'], $merchantApis[$language]);
}
}
/**
* Sets the order status of a Shopgate order to "shipped" via Shopgate Merchant API
*
* @param string $shopgateOrderNumber The number of the order at Shopgate.
* @param int $orderId The ID of the order in the shop system.
* @param ShopgateMerchantApi The SMA object to use for the request.
* @param ShopgateConfigModified The configuration to use for the order's status history.
*
* @return bool true on success, false on failure.
*/
protected function setOrderShippingCompleted($shopgateOrderNumber, $orderId, ShopgateMerchantApi &$merchantApi) {
protected function setOrderShippingCompleted(
$shopgateOrderNumber, $orderId, ShopgateMerchantApi &$merchantApi, ShopgateConfigModified &$config
) {
$success = false;
// These are expected and should not be added to error count:
$ignoreCodes = array(ShopgateMerchantApiException::ORDER_ALREADY_COMPLETED, ShopgateMerchantApiException::ORDER_SHIPPING_STATUS_ALREADY_COMPLETED);
$ignoreCodes = array(
ShopgateMerchantApiException::ORDER_ALREADY_COMPLETED,
ShopgateMerchantApiException::ORDER_SHIPPING_STATUS_ALREADY_COMPLETED
);
try {
$merchantApi->setOrderShippingCompleted($shopgateOrderNumber);
$statusArr = array(
"orders_id" => $orderId,
"orders_status_id" => $this->config->getOrderStatusShipped(),
"orders_status_id" => $config->getOrderStatusShipped(),
"date_added" => date( 'Y-m-d H:i:s' ),
"customer_notified" => 1,
"comments" => "[Shopgate] Bestellung wurde bei Shopgate als versendet markiert",
);
ca. Zeile 2421
xtc_db_perform(TABLE_ORDERS_STATUS_HISTORY, $statusArr);
$success = true;
} catch (ShopgateLibraryException $e) {
$response = $this->stringFromUtf8($e->getAdditionalInformation(), $this->config->getEncoding());
$response = $this->stringFromUtf8($e->getAdditionalInformation(), $config->getEncoding());
$statusArr = array(
"orders_id" => $orderId,
"orders_status_id" => $this->config->getOrderStatusShipped(),
"orders_status_id" => $config->getOrderStatusShipped(),
"date_added" => date( 'Y-m-d H:i:s' ),
"customer_notified" => 0,
"comments" => "[Shopgate] Ein Fehler ist im Shopgate Modul aufgetreten ({$e->getCode()}): {$response}",
);
xtc_db_perform(TABLE_ORDERS_STATUS_HISTORY, $statusArr);
} catch (ShopgateMerchantApiException $e) {
$response = $this->stringFromUtf8($e->getMessage(), $this->config->getEncoding());
$response = $this->stringFromUtf8($e->getMessage(), $config->getEncoding());
$statusArr = array(
"orders_id" => $orderId,
"orders_status_id" => $this->config->getOrderStatusShipped(),
"orders_status_id" => $config->getOrderStatusShipped(),
"date_added" => date( 'Y-m-d H:i:s' ),
"customer_notified" => 0,
"comments" => "[Shopgate] Ein Fehler ist bei Shopgate aufgetreten ({$e->getCode()}): {$response}",
);
ca. Zeile 2447
xtc_db_perform(TABLE_ORDERS_STATUS_HISTORY, $statusArr);
$success = (in_array($e->getCode(), $ignoreCodes)) ? true : false;
} catch (Exception $e) {
$response = $this->stringFromUtf8($e->getMessage(), $this->config->getEncoding());
$response = $this->stringFromUtf8($e->getMessage(), $config->getEncoding());
$statusArr = array(
"orders_id" => $orderId,
"orders_status_id" => $this->config->getOrderStatusShipped(),
"orders_status_id" => $config->getOrderStatusShipped(),
"date_added" => date( 'Y-m-d H:i:s' ),
"customer_notified" => 0,
"comments" => "[Shopgate] Ein unbekannter Fehler ist aufgetreten ({$e->getCode()}): {$response}",
);
ca. Zeile 2462
}
// Update shopgate order on success
if($success) {
$qry = 'UPDATE `'.TABLE_SHOPGATE_ORDERS.'` SET `is_sent_to_shopgate` = 1 WHERE `shopgate_order_number` = '.$shopgateOrderNumber.';';
$qry =
'UPDATE `' . TABLE_SHOPGATE_ORDERS . '` SET `is_sent_to_shopgate` = 1 WHERE `shopgate_order_number` = '
. $shopgateOrderNumber . ';';
xtc_db_query($qry);
}
return $success;
}
private function xtc_get_products_stock($products_id) {
/**
* Set the shipping status for a list of order IDs.
*
* @param int[] $orderIds The IDs of the orders in the shop system.
* @param int $status The ID of the order status that has been set in the shopping system.
*/
public function updateOrdersStatus($orderIds, $status)
{
if (empty($orderIds) || !is_array($orderIds)) {
return;
}
$query = xtc_db_input(
"SELECT `sgo`.`orders_id`, `sgo`.`shopgate_order_number`, `xtl`.`code` " .
"FROM `" . TABLE_SHOPGATE_ORDERS . "` sgo " .
"INNER JOIN `" . TABLE_ORDERS . "` xto ON (`xto`.`orders_id` = `sgo`.`orders_id`) " .
"INNER JOIN `" . TABLE_LANGUAGES . "` xtl ON (`xtl`.`directory` = `xto`.`language`) " .
"WHERE `sgo`.`orders_id` IN (" . xtc_db_input(implode(", ", $orderIds)) . ")"
);
$result = xtc_db_query($query);
if (empty($result)) {
return;
}
/** @var ShopgateConfigModified[] $configurations */
$configurations = array();
$merchantApis = array();
while ($shopgateOrder = xtc_db_fetch_array($result)) {
$language = $shopgateOrder['code']; // convenience
if (empty($merchantApis[$language])) {
try {
$config = new ShopgateConfigModified();
$config->loadByLanguage($language);
$builder = new ShopgateBuilder($config);
$merchantApis[$language] = &$builder->buildMerchantApi();
$configurations[$language] = $config;
} catch (ShopgateLibraryException $e) {
// do not abort. the error will be logged
}
}
if ($status == $configurations[$language]->getOrderStatusShipped()) {
$this->setOrderShippingCompleted(
$shopgateOrder['shopgate_order_number'], $shopgateOrder['orders_id'], $merchantApis[$language],
$configurations[$language]
);
}
if ($status == $configurations[$language]->getOrderStatusCanceled()) {
$this->sendOrderCancellation($shopgateOrder['shopgate_order_number'], $merchantApis[$language]);
}
}
}
/**
* Function to Parse Options like [TAB:xxxx] in the Description
*
* @param $description
*
* @return mixed
*/
private function parseDescription($description)
{
$tabs = array();
preg_match_all("/\[TAB:[\w\s\d\&\;]*\]/", $description, $tabs);
foreach ($tabs[0] as $replace) {
$replacement = preg_replace("/(\[TAB:)|\]/", "", $replace);
$replacement = "<h1>" . $replacement . "</h1>";
$description = preg_replace("/" . preg_quote($replace) . "/", $replacement, $description);
}
return $description;
}
/**
* get the status of a product from database
*
* @param int $products_id
*
* @return int
*/
private function xtc_get_products_status($products_id)
{
$products_id = xtc_get_prid($products_id);
$stock_query = xtc_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . $products_id . "'");
$stock_query = xtc_db_query(
"SELECT products_status FROM " . TABLE_PRODUCTS . " WHERE products_id = '" . $products_id . "'"
);
$stock_values = xtc_db_fetch_array($stock_query);
return $stock_values['products_quantity'];
return $stock_values['products_status'];
}
/**
* Requires all files the plugin depends on with require_once.
*/
private function requireFiles()
{
// load helper class(es)
require_once(dirname(__FILE__) . '/helper/ShopgatePluginInitHelper.php');
// load model classes
require_once(dirname(__FILE__) . '/Model/category/ShopgateCategoryModel.php');
require_once(dirname(__FILE__) . '/Model/category/ShopgateCategoryXmlModel.php');
require_once(dirname(__FILE__) . '/Model/coupon/ShopgateCouponModel.php');
require_once(dirname(__FILE__) . '/Model/customer/ShopgateCustomerModel.php');
require_once(dirname(__FILE__) . '/Model/customer/ShopgateCustomerOrderModel.php');
require_once(dirname(__FILE__) . '/Model/global/ShopgateCustomFieldModel.php');
require_once(dirname(__FILE__) . '/Model/item/ShopgateItemModel.php');
require_once(dirname(__FILE__) . '/Model/item/ShopgateItemCartModel.php');
require_once(dirname(__FILE__) . '/Model/item/ShopgateItemXmlModel.php');
require_once(dirname(__FILE__) . '/Model/location/ShopgateLocationModel.php');
require_once(dirname(__FILE__) . '/Model/location/ShopgateShippingModel.php');
require_once(dirname(__FILE__) . '/Model/order/ShopgateOrderModel.php');
require_once(dirname(__FILE__) . '/Model/review/ShopgateReviewModel.php');
require_once(dirname(__FILE__) . '/Model/review/ShopgateReviewXmlModel.php');
// load modified eCommerce files
require_once(dirname(__FILE__) . '/../../../inc/xtc_validate_password.inc.php');
require_once(dirname(__FILE__) . '/../../../inc/xtc_format_price_order.inc.php');
require_once(dirname(__FILE__) . '/../../../inc/xtc_get_tax_class_id.inc.php');
require_once(dirname(__FILE__) . '/../../../inc/xtc_get_products_stock.inc.php');
require_once(dirname(__FILE__) . '/../../../includes/classes/xtcPrice.php');
if (file_exists(dirname(__FILE__) . '/../../../admin/includes/version.php')) {
require_once(dirname(__FILE__) . '/../../../admin/includes/version.php');
}
if (!defined('PROJECT_MAJOR_VERSION')) {
require_once(dirname(__FILE__) . '/../../../inc/xtc_db_prepare_input.inc.php');
} else {
require_once(dirname(__FILE__) . '/../../../inc/db_functions_mysql.inc.php');
}
// include Shopgate plugin files
require_once(dirname(__FILE__) . '/../../../includes/external/shopgate/base/shopgate_wrapper.php');
require_once(dirname(__FILE__) . '/../../../includes/external/shopgate/base/shopgate_config.php');
require_once(
dirname(__FILE__) . '/../../../includes/external/shopgate/base/lang/' .
$this->language .
'/modules/payment/shopgate.php'
);
}
}
class ShopgateXtcMapper {
class ShopgateXtcMapper
{
/**
* The countries with non-ISO-3166-2 state codes in xt:Commerce 3 are mapped here.
*
* @var string[][]
*/
protected static $stateCodesByCountryCode = array(
'DE' => array(
ca. Zeile 2523
* Finds the corresponding Shopgate state code for a given xt:Commerce 3 state code (zone_code).
*
* @param string $countryCode The code of the country to which the state belongs
* @param string $xtcStateCode The code of the state / zone as found in the default "zones" table of xt:Commerce 3
*
* @return string The state code as defined at Shopgate Wiki
*
* @throws ShopgateLibraryException if one of the given codes is unknown
*/
public static function getShopgateStateCode($countryCode, $xtcStateCode) {
public static function getShopgateStateCode($countryCode, $xtcStateCode)
{
$countryCode = strtoupper($countryCode);
$xtcStateCode = strtoupper($xtcStateCode);
if (!isset(self::$stateCodesByCountryCode[$countryCode])) {
ca. Zeile 2548
/**
* Finds the corresponding xt:Commerce 3 state code (zone_code) for a given Shopgate state code
*
* @param string $shopgateStateCode The Shopgate state code as defined at Shopgate Wiki
*
* @return string The zone code for xt:Commerce 3
*
* @throws ShopgateLibraryException if the given code is unknown
*/
public static function getXtcStateCode($shopgateStateCode) {
public static function getXtcStateCode($shopgateStateCode)
{
$splitCodes = null;
preg_match('/^([A-Z]{2})\-([A-Z]{2})$/', $shopgateStateCode, $splitCodes);
if (empty($splitCodes) || empty($splitCodes[1]) || empty($splitCodes[2])){
return null;
}
if(!isset(self::$stateCodesByCountryCode[$splitCodes[1]]) || !isset(self::$stateCodesByCountryCode[$splitCodes[1]][$splitCodes[2]])) {
if (!isset(self::$stateCodesByCountryCode[$splitCodes[1]])
|| !isset(self::$stateCodesByCountryCode[$splitCodes[1]][$splitCodes[2]])
) {
//throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_UNKNOWN_STATE_CODE, 'Code: '.$shopgateStateCode);
return $splitCodes[2];
} else {
return self::$stateCodesByCountryCode[$splitCodes[1]][$splitCodes[2]];
includes/external/shopgate/shopgate_library/assets/js_header.htmlTop ca. Zeile 1
<!-- BEGIN SHOPGATE -->
<link rel="alternate" media="only screen and (max-width: 640px)" href="{$mobile_url}"/>
{$link_tag}
<script type="text/javascript">
var _shopgate = new Object();
_shopgate.shop_number = "{$shop_number}";
_shopgate.redirect = "{$redirect_code}";
includes/external/shopgate/shopgate_library/classes/apis.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
class ShopgatePluginApi extends ShopgateObject implements ShopgatePluginApiInterface {
/**
* @var ShopgatePlugin
*/
ca. Zeile 15
*/
protected $merchantApi;
/**
* @var ShopgateAuthentificationServiceInterface
* @var ShopgateAuthenticationServiceInterface
*/
protected $authService;
/**
ca. Zeile 41
* @var ShopgatePluginApiResponse
*/
protected $response;
/** @var bool */
protected $preventResponseOutput;
/**
* this list is used for setting max_execution_time and memory_limt
* @var array of string
*/
protected $exportActionList;
/**
* @var string The trace ID of the incoming request.
*/
protected $trace_id;
public function __construct(
ShopgateConfigInterface $config,
ShopgateAuthentificationServiceInterface $authService,
ShopgateAuthenticationServiceInterface $authService,
ShopgateMerchantApiInterface $merchantApi,
ShopgatePlugin $plugin,
ShopgatePluginApiResponse $response = null
) {
ca. Zeile 59
$this->merchantApi = $merchantApi;
$this->plugin = $plugin;
$this->response = $response;
$this->responseData = array();
$this->preventResponseOutput = false;
// list of action that do not require authentication
$this->authlessActionWhitelist = array(
'receive_authorization',
);
// initialize action whitelist
$this->actionWhitelist = array(
'ping',
'cron',
'add_order',
'update_order',
'check_cart',
'check_stock',
'clear_cache',
'clear_log_file',
'cron',
'get_categories',
'get_categories_csv',
'get_customer',
'get_debug_info',
'get_items',
'get_items_csv',
'get_log_file',
'get_media_csv',
'get_orders',
'get_reviews',
'get_reviews_csv',
'get_settings',
'ping',
'receive_authorization',
'redeem_coupons',
'register_customer',
'set_settings',
'sync_favourite_list',
'update_order',
);
$this->exportActionList = array(
'get_items',
'get_items_csv',
'get_categories',
'get_categories_csv',
'get_reviews',
'get_reviews_csv',
'get_pages_csv',
'get_log_file',
'clear_log_file',
'clear_cache',
'check_coupon',
'redeem_coupon'
'get_media_csv',
);
}
public function handleRequest(array $data = array()) {
$errortext = '';
$this->setEnableErrorReporting();
// log incoming request
$this->log(ShopgateLogger::getInstance()->cleanParamsForLog($data), ShopgateLogger::LOGTYPE_ACCESS);
// save the params
ca. Zeile 92
$this->trace_id = $this->params['trace_id'];
}
try {
$this->authService->checkAuthentification();
if (!in_array($this->params['action'], $this->authlessActionWhitelist)) {
$this->authService->checkAuthentication();
}
// set error handler to Shopgate's handler if requested
if (!empty($this->params['use_errorhandler'])) {
if (isset($this->params['print_stack_trace'])) {
$printStackTrace = $this->params['print_stack_trace'];
}
set_error_handler('ShopgateErrorHandler');
$this->setEnablePrintErrorsToLog($this->config->getErrorLogPath());
}
if (!empty($this->params['use_shutdown_handler'])) {
register_shutdown_function('ShopgateShutdownHandler');
}
// enable debugging if requested
if (!empty($this->params['debug_log'])) {
ShopgateLogger::getInstance()->enableDebug();
ShopgateLogger::getInstance()->keepDebugLog(!empty($this->params['keep_debug_log']));
}
// enable error reporting if requested
if (!empty($this->params['error_reporting'])) {
error_reporting($this->params['error_reporting']);
ini_set('display_errors', (version_compare(PHP_VERSION, '5.2.4', '>=')) ? 'stdout' : true);
}
// memory logging size unit setup
if (!empty($this->params['memory_logging_unit'])) {
ShopgateLogger::getInstance()->setMemoryAnalyserLoggingSizeUnit($this->params['memory_logging_unit']);
} else {
// MB by default if none is set
ShopgateLogger::getInstance()->setMemoryAnalyserLoggingSizeUnit('MB');
}
// check if the request is for the correct shop number
if (!empty($this->params['shop_number']) && ($this->params['shop_number'] != $this->config->getShopNumber())) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_UNKNOWN_SHOP_NUMBER, "'{$this->params['shop_number']}'");
// check if the request is for the correct shop number or an adapter-plugin
if (
!$this->config->getIsShopgateAdapter() &&
!empty($this->params['shop_number']) &&
($this->params['shop_number'] != $this->config->getShopNumber())
) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_UNKNOWN_SHOP_NUMBER, "{$this->params['shop_number']}");
}
// check if an action to call has been passed, is known and enabled
if (empty($this->params['action'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_ACTION, 'Passed parameters: '.var_export($data, true));
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_ACTION, 'Passed parameters: '.var_export($this->params, true));
}
// check if the action is white-listed
if (!in_array($this->params['action'], $this->actionWhitelist)) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_UNKNOWN_ACTION, "'{$this->params['action']}'");
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_UNKNOWN_ACTION, "{$this->params['action']}");
}
// check if action is enabled in the config
$configArray = $this->config->toArray();
if (empty($configArray['enable_'.$this->params['action']])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_DISABLED_ACTION, "'{$this->params['action']}'");
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_DISABLED_ACTION, "{$this->params['action']}");
}
// enable debugging if requested
if (!empty($data['debug_log'])) {
ShopgateLogger::getInstance()->enableDebug();
}
// response output is active by default and can be deactivated to allow actions to print a custom output
$this->preventResponseOutput = false;
// call the action
$action = $this->camelize($this->params['action']);
if (in_array($this->params['action'], $this->exportActionList)) {
if (isset($this->params['memory_limit'])) {
$this->plugin->setExportMemoryLimit((int) $this->params['memory_limit']);
} else {
$this->plugin->setExportMemoryLimit($this->config->getDefaultMemoryLimit());
}
if (isset($this->params['max_execution_time'])) {
$this->plugin->setExportTimeLimit((int) $this->params['max_execution_time']);
} else {
$this->plugin->setExportTimeLimit($this->config->getDefaultExecutionTime());
}
}
$this->{$action}();
} catch (ShopgateLibraryException $e) {
$error = $e->getCode();
$errortext = $e->getMessage();
} catch (ShopgateMerchantApiException $e) {
$error = ShopgateLibraryException::MERCHANT_API_ERROR_RECEIVED;
$errortext = ShopgateLibraryException::getMessageFor(ShopgateLibraryException::MERCHANT_API_ERROR_RECEIVED).': "'.$e->getCode() . ' - ' . $e->getMessage().'"';
} catch (Exception $e) {
$message = "\n".get_class($e)."\n";
$message .= 'with code: '.$e->getCode()."\n";
$message .= 'and message: \''.$e->getMessage()."'\n";
$message = get_class($e) . " with code: {$e->getCode()} and message: '{$e->getMessage()}'";
// new ShopgateLibraryException to build proper error message and perform logging
$se = new ShopgateLibraryException($message);
$se = new ShopgateLibraryException($message, null, false, true, $e);
$error = $se->getCode();
$errortext = $se->getMessage();
}
ca. Zeile 155
if (empty($this->response)) {
trigger_error('No response object defined. This should _never_ happen.', E_USER_ERROR);
}
if (!$this->preventResponseOutput) {
$this->response->setData($this->responseData);
if (empty($this->params['error_reporting']) && ob_get_contents()) {
ob_clean();
}
$this->response->send();
}
// return true or false
return (empty($error));
}
ca. Zeile 170
/**
* Represents the "ping" action.
*
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_ping/
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_ping
*/
protected function ping() {
// obfuscate data relevant for authentication
$config = $this->config->toArray();
$config['customer_number'] = ShopgateLogger::OBFUSCATION_STRING;
$config['shop_number'] = ShopgateLogger::OBFUSCATION_STRING;
$config['apikey'] = ShopgateLogger::OBFUSCATION_STRING;
$config['oauth_access_token'] = ShopgateLogger::OBFUSCATION_STRING;
// prepare response data array
$this->responseData['pong'] = 'OK';
$this->responseData['configuration'] = $config;
$this->responseData['plugin_info'] = $this->plugin->createPluginInfo();
$this->responseData['permissions'] = $this->getPermissions();
$this->responseData['php_version'] = phpversion();
$this->responseData['php_config'] = $this->getSettings();
$this->responseData['php_config'] = $this->getPhpSettings();
$this->responseData['php_curl'] = function_exists('curl_version') ? curl_version() : 'No PHP-CURL installed';
$this->responseData['php_extensions'] = get_loaded_extensions();
$this->responseData['shopgate_library_version'] = SHOPGATE_LIBRARY_VERSION;
$this->responseData['plugin_version'] = defined('SHOPGATE_PLUGIN_VERSION') ? SHOPGATE_PLUGIN_VERSION : 'UNKNOWN';
$this->responseData['shop_info'] = $this->plugin->createShopInfo();
// set data and return response
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
}
/**
* Represents the "debug" action.
*
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_ping
*/
protected function getDebugInfo() {
// prepare response data array
$this->responseData = $this->plugin->getDebugInfo();
// set data and return response
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
}
ca. Zeile 230
$this->plugin->cron($job['job_name'], $job['job_params'], $message, $jobErrorcount);
// check error count
if ($jobErrorcount > 0) {
$message .= 'Errors happend in job: "'.$job['job_name'].'" ('.$jobErrorcount.' errors)';
$message .= "{$jobErrorcount} errors occured while executing cron job '{$job['job_name']}'\n";
$errorcount += $jobErrorcount;
}
} catch (Exception $e) {
$errorcount++;
ca. Zeile 251
$responses['execution_error_count'] = $errorcount;
$responses['execution_time'] = $runtime;
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
$this->responseData = array_merge($responses);
$this->responseData = $responses;
}
/**
* Represents the "add_order" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_add_order/
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_add_order
*/
protected function addOrder() {
if (!isset($this->params['order_number'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_ORDER_NUMBER);
ca. Zeile 277
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
$orderData = $this->plugin->addOrder($orders[0]);
if (is_array($orderData)) {
$this->responseData = array_merge($orderData, $this->responseData);
$this->responseData = $orderData;
} else {
$this->responseData['external_order_id'] = $orderData;
$this->responseData['external_order_number'] = null;
}
ca. Zeile 288
/**
* Represents the "update_order" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_update_order/
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_update_order
*/
protected function updateOrder() {
if (!isset($this->params['order_number'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_ORDER_NUMBER);
ca. Zeile 322
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
$orderData = $this->plugin->updateOrder($orders[0]);
if (is_array($orderData)) {
$this->responseData = array_merge($orderData, $this->responseData);
$this->responseData = $orderData;
} else {
$this->responseData['external_order_id'] = $orderData;
$this->responseData['external_order_number'] = null;
}
}
/**
* Represents the "redeem_coupons" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_redeem_coupons
*/
protected function redeemCoupons() {
if (!isset($this->params['cart'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_CART);
}
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
$cart = new ShopgateCart($this->params['cart']);
$couponData = $this->plugin->redeemCoupons($cart);
if (!is_array($couponData)) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT, 'Plugin Response: '.var_export($couponData, true));
}
// Workaround:
// $couponData was specified to be a ShopgateExternalCoupon[].
// Now supports the same format as checkCart(), i.e. array('external_coupons' => ShopgateExternalCoupon[]).
if (!empty($couponData['external_coupons']) && is_array($couponData['external_coupons'])) {
$couponData = $couponData['external_coupons'];
}
$responseData = array("external_coupons" => array());
foreach ($couponData as $coupon) {
if (!is_object($coupon) || !($coupon instanceof ShopgateExternalCoupon)) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT, 'Plugin Response: '.var_export($coupon, true));
}
$coupon = $coupon->toArray();
unset($coupon["order_index"]);
$responseData["external_coupons"][] = $coupon;
}
$this->responseData = $responseData;
}
/**
* Represents the "check_cart" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_check_cart
*/
protected function checkCart() {
if (!isset($this->params['cart'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_CART);
}
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
$cart = new ShopgateCart($this->params['cart']);
$cartData = $this->plugin->checkCart($cart);
$responseData = array();
$responseData['internal_cart_info'] = (isset($cartData['internal_cart_info'])) ? $cartData['internal_cart_info'] : null;
if (!is_array($cartData)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT,
'$cartData is of type: ' . is_object($cartData)
? get_class($cartData)
: gettype($cartData)
);
}
$responseData['currency'] = '';
if ($cart->getCurrency()) {
$responseData['currency'] = $cart->getCurrency();
}
if (!empty($cartData['currency'])) {
$responseData['currency'] = $cartData['currency'];
}
if (!empty($cartData['customer']) && $cartCustomer = $cartData['customer']) {
/** @var ShopgateCartCustomer $cartCustomer */
if (!is_object($cartCustomer) || !($cartCustomer instanceof ShopgateCartCustomer)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT,
"$cartCustomer is of type: " . is_object($cartCustomer)
? get_class($cartCustomer)
: gettype($cartCustomer)
);
}
foreach ($cartCustomer->getCustomerGroups() as $cartCustomerGroup) {
/** @var ShopgateCartCustomerGroup $cartCustomerGroup */
if (!is_object($cartCustomerGroup) || !($cartCustomerGroup instanceof ShopgateCartCustomerGroup)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT,
'$cartCustomerGroup is of type: ' . is_object($cartCustomerGroup)
? get_class($cartCustomerGroup)
: gettype($cartCustomerGroup)
);
}
}
$responseData["customer"] = $cartCustomer->toArray();
}
$shippingMethods = array();
if (!empty($cartData['shipping_methods'])) {
foreach ($cartData["shipping_methods"] as $shippingMethod) {
/** @var ShopgateShippingMethod $shippingMethod */
if (!is_object($shippingMethod) || !($shippingMethod instanceof ShopgateShippingMethod)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT,
'$shippingMethod is of type: ' . is_object($shippingMethod)
? get_class($shippingMethod)
: gettype($shippingMethod)
);
}
$shippingMethods[] = $shippingMethod->toArray();
}
}
$responseData["shipping_methods"] = $shippingMethods;
$paymentMethods = array();
if (!empty($cartData['payment_methods'])) {
foreach ($cartData["payment_methods"] as $paymentMethod) {
/** @var ShopgatePaymentMethod $paymentMethod */
if (!is_object($paymentMethod) || !($paymentMethod instanceof ShopgatePaymentMethod)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT,
'$paymentMethod is of type: ' . is_object($paymentMethod)
? get_class($paymentMethod)
: gettype($paymentMethod)
);
}
$paymentMethods[] = $paymentMethod->toArray();
}
}
$responseData["payment_methods"] = $paymentMethods;
$cartItems = array();
if (!empty($cartData['items'])) {
foreach ($cartData["items"] as $cartItem) {
/** @var ShopgateCartItem $cartItem */
if (!is_object($cartItem) || !($cartItem instanceof ShopgateCartItem)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT,
'$cartItem is of type: ' . is_object($cartItem) ? get_class($cartItem) : gettype($cartItem)
);
}
$cartItems[] = $cartItem->toArray();
}
}
$responseData["items"] = $cartItems;
$coupons = array();
if (!empty($cartData['external_coupons'])) {
foreach ($cartData["external_coupons"] as $coupon) {
/** @var ShopgateExternalCoupon $coupon */
if (!is_object($coupon) || !($coupon instanceof ShopgateExternalCoupon)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT,
'$coupon is of type: ' . is_object($coupon) ? get_class($coupon) : gettype($coupon)
);
}
$coupon = $coupon->toArray();
unset($coupon["order_index"]);
$coupons[] = $coupon;
}
}
$responseData["external_coupons"] = $coupons;
$this->responseData = $responseData;
}
/**
* Represents the "check_stock" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_check_stock
*/
protected function checkStock()
{
if (!isset($this->params['items'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_ITEMS);
}
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
$cart = new ShopgateCart();
$cart->setItems($this->params['items']);
$items = $this->plugin->checkStock($cart);
$responseData = array();
if (!is_array($items)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT,
'$cartData Is type of : ' . is_object($items)
? get_class($items)
: gettype($items)
);
}
$cartItems = array();
if (!empty($items)) {
foreach ($items as $cartItem) {
/** @var ShopgateCartItem $cartItem */
if (!is_object($cartItem) || !($cartItem instanceof ShopgateCartItem)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT,
'$cartItem Is type of : ' . is_object($cartItem) ? get_class($cartItem) : gettype($cartItem)
);
}
$item = $cartItem->toArray();
$notNeededArrayKeys = array('qty_buyable', 'unit_amount', 'unit_amount_with_tax');
foreach ($notNeededArrayKeys as $key) {
if (array_key_exists($key, $item)) {
unset($item[$key]);
}
}
$cartItems[] = $item;
}
}
$responseData["items"] = $cartItems;
$this->responseData = $responseData;
}
/**
* Represents the "get_settings" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_settings
*/
protected function getSettings() {
$this->responseData = $this->plugin->getSettings();
// set data and return response
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
}
/**
* Represents the "set_settings" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_set_settings
*/
protected function setSettings() {
if (empty($this->params['shopgate_settings']) || !is_array($this->params['shopgate_settings'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_SHOPGATE_SETTINGS, 'Request: '.var_export($this->params, true));
}
// settings that may never be changed:
$shopgateSettingsBlacklist = array(
'shop_number',
'customer_number',
'apikey',
'plugin_name',
'export_folder_path',
'log_folder_path',
'cache_folder_path',
'items_csv_filename',
'categories_csv_filename',
'reviews_csv_filename',
'access_log_filename',
'error_log_filename',
'request_log_filename',
'debug_log_filename',
'redirect_keyword_cache_filename',
'redirect_skip_keyword_cache_filename',
);
// filter the new settings
$shopgateSettingsNew = array();
$shopgateSettingsOld = $this->config->toArray();
foreach ($this->params['shopgate_settings'] as $setting) {
if (!isset($setting['name'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_SHOPGATE_SETTINGS, 'Wrong format: '.var_export($setting, true));
}
if (in_array($setting['name'], $shopgateSettingsBlacklist)) {
continue;
}
if (!in_array($setting['name'], array_keys($shopgateSettingsOld))) {
continue;
}
$shopgateSettingsNew[$setting['name']] = isset($setting['value']) ? $setting['value'] : null;
}
$this->config->load($shopgateSettingsNew);
$this->config->save(array_keys($shopgateSettingsNew), true);
$diff = array();
foreach ($shopgateSettingsNew as $setting => $value) {
$diff[] = array('name' => $setting, 'old' => $shopgateSettingsOld[$setting], 'new' => $value);
}
// set data and return response
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
$this->responseData['shopgate_settings'] = $diff;
}
protected function getOrders() {
if (!isset($this->params['customer_token'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_NO_CUSTOMER_TOKEN);
}
if (!isset($this->params['customer_language'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_NO_CUSTOMER_LANGUAGE);
}
if (empty($this->response)) {
$this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
}
$orders = $this->plugin->getOrders(
$this->params['customer_token'],
$this->params['customer_language'],
isset($this->params['limit']) ? $this->params['limit'] : 10,
isset($this->params['offset']) ? $this->params['offset'] : 0,
isset($this->params['order_date_from']) ? $this->params['order_date_from'] : '',
isset($this->params['sort_order']) ? $this->params['sort_order'] : 'created_desc'
);
if (!is_array($orders)) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT, 'Plugin Response: '.var_export($orders, true));
}
$resOrders = array();
foreach ($orders as $order) {
if (!($order instanceof ShopgateExternalOrder)) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT, 'Plugin Response: '.var_export($orders, true));
}
$resOrders[] = $order->toArray();
}
$this->responseData['orders'] = $resOrders;
}
protected function syncFavouriteList() {
if (!isset($this->params['customer_token'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_NO_CUSTOMER_TOKEN);
}
if (empty($this->params['items'])) {
$this->params['items'] = array(); // a hack because there is no "empty array" representation in POST
}
if (empty($this->response)) {
$this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
}
$syncItems = array();
foreach ($this->params['items'] as $syncItem) {
if (!isset($syncItem['item_number'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_WRONG_ITEM_FORMAT, 'missing required param "item_number"');
}
if (!isset($syncItem['status'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_WRONG_ITEM_FORMAT, 'missing required param "status"');
}
$syncItems[] = new ShopgateSyncItem($syncItem);
}
$updatedSyncItems = $this->plugin->syncFavouriteList($this->params['customer_token'], $syncItems);
if (!is_array($updatedSyncItems)) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT, 'Plugin Response: '.var_export($updatedSyncItems, true));
}
$resItems = array();
foreach ($updatedSyncItems as $updatedSyncItem) {
if (!($updatedSyncItem instanceof ShopgateSyncItem)) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT, 'Plugin Response: '.var_export($updatedSyncItem, true));
}
$resItem = $updatedSyncItem->toArray();
unset($resItem['status']);
$resItems[] = $resItem;
}
$this->responseData['items'] = $resItems;
}
/**
* Represents the "get_customer" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_customer/
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_customer
*/
protected function getCustomer() {
if (!isset($this->params['user'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_USER);
ca. Zeile 347
$customer = $this->plugin->getCustomer($this->params['user'], $this->params['pass']);
if (!is_object($customer) || !($customer instanceof ShopgateCustomer)) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT, 'Plugin Response: '.var_export($customer, true));
foreach ($customer->getCustomerGroups() as $customerGroup) {
/** @var ShopgateCustomerGroup $customerGroup */
if (!is_object($customerGroup) || !($customerGroup instanceof ShopgateCustomerGroup)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_WRONG_RESPONSE_FORMAT,
'$customerGroup is of type: ' . is_object($customerGroup)
? get_class($customerGroup)
: gettype($customerGroup)
);
}
}
}
$customerData = $customer->toArray();
$addressList = $customerData['addresses'];
ca. Zeile 359
$this->responseData["addresses"] = $addressList;
}
/**
*
* Represents the "register_customer" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_register_customer
*/
protected function registerCustomer() {
if (!isset($this->params['user'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_USER);
}
if (!isset($this->params['pass'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_PASS);
}
if (!isset($this->params['user_data'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_USER_DATA, "missing user_data", true);
}
if (!$this->config->getEnableGetCustomer()) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_DISABLED_ACTION, "Action 'get_customer' is not activated but is needed by register_customer", true);
}
$user = $this->params['user'];
$pass = $this->params['pass'];
$customer = new ShopgateCustomer($this->params['user_data']);
$userData = $this->params["user_data"];
if (isset($userData['addresses']) && is_array($userData['addresses'])) {
$addresses = array();
foreach ($userData['addresses'] as $address) {
$addresses[] = new ShopgateAddress($address);
}
$customer->setAddresses($addresses);
}
$this->plugin->registerCustomer($user, $pass, $customer);
$newCustomer = $this->plugin->getCustomer($user, $pass);
$customerData = $newCustomer->toArray();
$addressList = $customerData['addresses'];
unset($customerData['addresses']);
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
$this->responseData["user_data"] = $customerData;
$this->responseData["addresses"] = $addressList;
}
/**
* Represents the "get_media_csv" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_media_csv
*/
protected function getMediaCsv() {
if (isset($this->params['limit']) && isset($this->params['offset'])) {
$this->plugin->setExportLimit((int) $this->params['limit']);
$this->plugin->setExportOffset((int) $this->params['offset']);
$this->plugin->setSplittedExport(true);
}
// generate / update items csv file if requested
$this->plugin->startGetMediaCsv();
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseTextCsvExport($this->trace_id);
$this->responseData = $this->config->getMediaCsvPath();
}
/**
* Represents the "get_items_csv" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_items_csv/
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_items_csv
*/
protected function getItemsCsv() {
if (isset($this->params['limit']) && isset($this->params['offset'])) {
$this->plugin->setExportLimit((int) $this->params['limit']);
ca. Zeile 374
// generate / update items csv file if requested
$this->plugin->startGetItemsCsv();
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseTextCsv($this->trace_id);
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseTextCsvExport($this->trace_id);
$this->responseData = $this->config->getItemsCsvPath();
}
/**
* Represents the "get_items" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_items
*/
protected function getItems() {
$limit = isset($this->params['limit']) ? (int) $this->params['limit'] : null;
$offset = isset($this->params['offset']) ? (int) $this->params['offset'] : null;
$uids = isset($this->params['uids']) ? (array) $this->params['uids'] : array();
$responseType = isset($this->params['response_type']) ? $this->params['response_type'] : false;
$supportedResponseTypes = $this->config->getSupportedResponseTypes();
if (!empty($responseType) && !in_array($responseType, $supportedResponseTypes['get_items'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_UNSUPPORTED_RESPONSE_TYPE, 'Requested type: "'.$responseType.'"');
}
$this->plugin->startGetItems($limit, $offset, $uids, $responseType);
switch ($responseType) {
default: case 'xml':
$response = new ShopgatePluginApiResponseAppXmlExport($this->trace_id);
$responseData = $this->config->getItemsXmlPath();
break;
case 'json':
$response = new ShopgatePluginApiResponseAppJsonExport($this->trace_id);
$responseData = $this->config->getItemsJsonPath();
break;
}
if (empty($this->response)) {
$this->response = $response;
}
$this->responseData = $responseData;
}
/**
* Represents the "get_categories" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_categories
*/
protected function getCategories() {
$limit = isset($this->params['limit']) ? (int) $this->params['limit'] : null;
$offset = isset($this->params['offset']) ? (int) $this->params['offset'] : null;
$uids = isset($this->params['uids']) ? (array) $this->params['uids'] : array();
$responseType = isset($this->params['response_type']) ? $this->params['response_type'] : false;
$supportedResponseTypes = $this->config->getSupportedResponseTypes();
if (!empty($responseType) && !in_array($responseType, $supportedResponseTypes['get_categories'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_UNSUPPORTED_RESPONSE_TYPE, 'Requested type: "'.$responseType.'"');
}
$this->plugin->startGetCategories($limit, $offset, $uids, $responseType);
switch ($responseType) {
default: case 'xml':
$response = new ShopgatePluginApiResponseAppXmlExport($this->trace_id);
$responseData = $this->config->getCategoriesXmlPath();
break;
case 'json':
$response = new ShopgatePluginApiResponseAppJsonExport($this->trace_id);
$responseData = $this->config->getCategoriesJsonPath();
break;
}
if (empty($this->response)) {
$this->response = $response;
}
$this->responseData = $responseData;
}
/**
* Represents the "get_categories_csv" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_categories_csv/
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_categories_csv
*/
protected function getCategoriesCsv() {
if (isset($this->params['limit']) && isset($this->params['offset'])) {
$this->plugin->setExportLimit((int) $this->params['limit']);
$this->plugin->setExportOffset((int) $this->params['offset']);
$this->plugin->setSplittedExport(true);
}
// generate / update categories csv file
$this->plugin->startGetCategoriesCsv();
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseTextCsv($this->trace_id);
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseTextCsvExport($this->trace_id);
$this->responseData = $this->config->getCategoriesCsvPath();
}
/**
* Represents the "get_reviews_csv" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_reviews_csv/
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_reviews_csv
*/
protected function getReviewsCsv() {
if (isset($this->params['limit']) && isset($this->params['offset'])) {
$this->plugin->setExportLimit((int) $this->params['limit']);
$this->plugin->setExportOffset((int) $this->params['offset']);
$this->plugin->setSplittedExport(true);
}
// generate / update reviews csv file
$this->plugin->startGetReviewsCsv();
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseTextCsv($this->trace_id);
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseTextCsvExport($this->trace_id);
$this->responseData = $this->config->getReviewsCsvPath();
}
/**
* Represents the "get_pages_csv" action.
* Represents the "get_categories" action.
*
* @todo
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_pages_csv/
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_categories
*/
protected function getPagesCsv() {
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseTextCsv($this->trace_id);
$this->responseData = $this->config->getPagesCsvPath();
protected function getReviews() {
$limit = isset($this->params['limit']) ? (int)$this->params['limit'] : null;
$offset = isset($this->params['offset']) ? (int)$this->params['offset'] : null;
$uids = isset($this->params['uids']) ? (array)$this->params['uids'] : array();
$responseType = isset($this->params['response_type']) ? $this->params['response_type'] : false;
$supportedResponseTypes = $this->config->getSupportedResponseTypes();
if (!empty($responseType) && !in_array($responseType, $supportedResponseTypes['get_reviews'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_UNSUPPORTED_RESPONSE_TYPE, 'Requested type: "' . $responseType . '"');
}
$this->plugin->startGetReviews($limit, $offset, $uids, $responseType);
switch ($responseType) {
default:
case 'xml':
$response = new ShopgatePluginApiResponseAppXmlExport($this->trace_id);
$responseData = $this->config->getReviewsXmlPath();
break;
case 'json':
$response = new ShopgatePluginApiResponseAppJsonExport($this->trace_id);
$responseData = $this->config->getReviewsJsonPath();
break;
}
if (empty($this->response)) {
$this->response = $response;
}
$this->responseData = $responseData;
}
/**
* Represents the "get_log_file" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_log_file/
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_log_file
*/
protected function getLogFile() {
// disable debug log for this action
$logger = ShopgateLogger::getInstance();
ca. Zeile 445
/**
* Represents the "clear_log_file" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_clear_log_file/
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_clear_log_file
*/
private function clearLogFile() {
if (empty($this->params['log_type'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_UNKNOWN_LOGTYPE);
ca. Zeile 471
}
$logFilePointer = @fopen($logFilePath, 'w');
if ($logFilePointer === false) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_FILE_OPEN_ERROR, "Cannot open file {$logFilePath}");
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_FILE_OPEN_ERROR, "File: $logFilePath", true);
}
fclose($logFilePointer);
// return the path of the deleted log file
ca. Zeile 483
/**
* Represents the "clear_cache" action.
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_clear_cache/
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_clear_cache
*/
private function clearCache() {
$files = array();
ca. Zeile 508
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
}
/**
* Represents the "get_orders" action.
* Represents the "receive_authorization" action (OAUTH ONLY!).
* Please make sure to allow calls to this action only for admin users with proper rights (only call inside of the
* admin area or check for admin-login set when providing an action from outside of the admin area)
* @see ShopgatePlugin::checkAdminLogin method
*
* @throws ShopgateLibraryException
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_orders/
* @todo
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_receive_authorization
*/
protected function getOrders() {
/**** not yet implemented ****/
protected function receiveAuthorization() {
if ($this->config->getSmaAuthServiceClassName() != ShopgateConfigInterface::SHOPGATE_AUTH_SERVICE_CLASS_NAME_OAUTH) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_INVALID_ACTION, '=> "receive_authorization" action can only be called for plugins with SMA-AuthService set to "OAuth" type', true);
}
if (empty($this->params['code'])) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_AUTHORIZATION_CODE);
}
//if (!empty($this->params['external_customer_number'])) {
$tokenRequestUrl = $this->buildShopgateOAuthUrl('token');
// the "receive_authorization" action url is needed (again) for requesting an access token
$calledScriptUrl = $this->plugin->getActionUrl($this->params['action']);
// Re-initialize the OAuth auth service object and the ShopgateMerchantAPI object
$smaAuthService = new ShopgateAuthenticationServiceOAuth();
$accessToken = $smaAuthService->requestOAuthAccessToken($this->params['code'], $calledScriptUrl, $tokenRequestUrl);
// at this Point there is a valid access token available, since this point would not be reached otherwise
// -> get a new ShopgateMerchantApi object, containing a fully configured OAuth auth service including the access token
$this->merchantApi = new ShopgateMerchantApi($smaAuthService, null, $this->config->getApiUrl());
// load all shop info via the MerchantAPI and store it in the config (via OAuth and a valid access token)
$shopInfo = $this->merchantApi->getShopInfo()->getData();
if (empty($shopInfo)) {
throw new ShopgateLibraryException(ShopgateLibraryException::MERCHANT_API_INVALID_RESPONSE, '-> "shop info" not set. Response data: '.var_export($shopInfo, true));
}
// create a new settings array
$shopgateSettingsNew = array(
$field = 'oauth_access_token' => $shopInfo[$field],
$field = 'customer_number' => $shopInfo[$field],
$field = 'shop_number' => $shopInfo[$field],
$field = 'apikey' => $shopInfo[$field],
$field = 'alias' => $shopInfo[$field],
$field = 'cname' => $shopInfo[$field],
);
// save all shop config data to plugin-config using the configs save method
$this->config->load($shopgateSettingsNew);
$this->config->save(array_keys($shopgateSettingsNew), true);
// no specific data needs to be returned
if (empty($this->response)) $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
$this->responseData = array();
}
###############
### Helpers ###
###############
ca. Zeile 525
###############
### Helpers ###
###############
private function getSettings() {
public function buildShopgateOAuthUrl($shopgateOAuthActionName) {
// based on the oauth action name the subdomain can differ
switch($shopgateOAuthActionName) {
case 'authorize':
$subdomain = 'admin';
break;
case 'token':
$subdomain = 'api';
break;
default:
$subdomain = 'www';
break;
}
// the access token needs to be requested first (compute a request target url for this)
$merchantApiUrl = $this->config->getApiUrl();
if ($this->config->getServer() == 'custom') {
// defaults to https://<subdomain>.<hostname>/api[controller]/<merchant-action-name> for custom server
$requestServerHost = explode('/api/', $merchantApiUrl);
$requestServerHost[0] = str_replace('://api.', "://{$subdomain}.", $requestServerHost[0]);
$requestServerHost = trim($requestServerHost[0], '/');
} else {
// defaults to https://<subdomain>.<hostname>/<merchant-action-name> for live, pg and sl server
$matches = array();
preg_match('/^(?P<protocol>http(s)?:\/\/)api.(?P<hostname>[^\/]+)\/merchant.*$/', $merchantApiUrl, $matches);
$protocol = (!empty($matches['protocol']) ? $matches['protocol'] : 'https://');
$hostname = (!empty($matches['hostname']) ? $matches['hostname'] : 'shopgate.com');
$requestServerHost = "{$protocol}{$subdomain}.{$hostname}";
}
return $requestServerHost . '/oauth/' . $shopgateOAuthActionName;
}
private function getPhpSettings() {
$settingDetails = array();
$allSettings = function_exists('ini_get_all') ? ini_get_all() : array();
ca. Zeile 566
$this->config->getItemsCsvPath(),
$this->config->getCategoriesCsvPath(),
$this->config->getReviewsCsvPath(),
# xml files
$this->config->getItemsXmlPath(),
$this->config->getCategoriesXmlPath(),
# log files
$this->config->getAccessLogPath(),
$this->config->getRequestLogPath(),
$this->config->getErrorLogPath(),
ca. Zeile 578
$this->config->getRedirectSkipKeywordCachePath(),
);
foreach ($files as $file) {
$permission = array();
$permission['file'] = $file;
$permission['exist'] = (bool) file_exists($file);
$permission['writeable'] = (bool) is_writable($file);
$permission['permission'] = '-';
if (file_exists($file)) {
$permission['last_modification_time'] = date('d.m.Y H:i:s.', filemtime($file));
$permissions[] = $this->_getFileMeta($file, 1);
}
return $permissions;
}
/**
* get meta data for given file.
* if file doesn't exists, move up to parent directory
*
* @param string $file (max numbers of parent directory lookups)
* @param number $parentLevel
* @return array with file meta data
*/
private function _getFileMeta($file, $parentLevel = 0) {
$meta = array('file' => $file);
if ($meta['exist'] = (bool) file_exists($file)) {
$meta['writeable'] = (bool) is_writable($file);
$uid = fileowner($file);
if (function_exists('posix_getpwuid')) {
$uinfo = posix_getpwuid($uid);
$uid = $uinfo['name'];
}
$gid = filegroup($file);
if (function_exists('posix_getgrgid')) {
$ginfo = posix_getgrgid($gid);
$gid = $ginfo['name'];
}
$meta['owner'] = $uid;
$meta['group'] = $gid;
$meta['permission'] = substr(sprintf('%o', fileperms($file)), -4);
$meta['last_modification_time'] = date('d.m.Y H:i:s', filemtime($file));
if (is_file($file)) {
$meta['filesize'] = round(filesize($file)/(1024*1024), 4) .' MB';
}
}
else if ($parentLevel > 0) {
$fInfo = pathinfo($file);
if (file_exists($file)) {
$permission['permission'] = substr(sprintf('%o', fileperms($file)), -4);
} else {
if (file_exists($fInfo['dirname'])) {
$permission['parent_permission'] = substr(sprintf('%o', fileperms($fInfo['dirname'])), -4);
$meta['parent_dir'] = $this->_getFileMeta($fInfo['dirname'], --$parentLevel);
}
}
$permissions[] = $permission;
return $meta;
}
return $permissions;
/**
* enable error reporting to show exeption on request
*/
private function setEnableErrorReporting() {
@error_reporting(E_ERROR | E_CORE_ERROR | E_USER_ERROR);
@ini_set('display_errors', 1);
}
/**
* @param $errorFile
*/
private function setEnablePrintErrorsToLog($errorFile) {
$logFileHandler = @fopen($errorFile, 'a');
@fclose($logFileHandler);
@chmod($errorFile,0777);
@chmod($errorFile,0755);
@error_reporting(E_ALL ^ E_DEPRECATED);
@ini_set('log_errors', 1);
@ini_set('error_log', $errorFile);
@ini_set('ignore_repeated_errors', 1);
@ini_set('html_errors', 0);
}
}
class ShopgateMerchantApi extends ShopgateObject implements ShopgateMerchantApiInterface {
/**
* @var ShopgateAuthentificationServiceInterface
* @var ShopgateAuthenticationServiceInterface
*/
private $authService;
/**
ca. Zeile 619
* @var string
*/
private $apiUrl;
private $curlOpt = array();
public function __construct(ShopgateAuthentificationServiceInterface $authService, $shopNumber, $apiUrl) {
public function __construct(ShopgateAuthenticationServiceInterface $authService, $shopNumber = null, $apiUrl = null) {
$this->authService = $authService;
$this->shopNumber = $shopNumber;
$this->apiUrl = $apiUrl;
$this->curlOpt = $this->getCurlOptArray();
}
/**
* Returns an array of curl-options for requests
*
* @return mixed[]
* @param mixed[] $override cURL options to override for this request.
* @return mixed[] The default cURL options for a Shopgate Merchant API request merged with the options in $override.
*/
protected function getCurlOptArray() {
protected function getCurlOptArray($override = array()) {
$opt = array();
$opt[CURLOPT_HEADER] = false;
$opt[CURLOPT_USERAGENT] = 'ShopgatePlugin/'.(defined('SHOPGATE_PLUGIN_VERSION') ? SHOPGATE_PLUGIN_VERSION : 'called outside plugin');
ca. Zeile 643
$opt[CURLOPT_RETURNTRANSFER] = true;
$opt[CURLOPT_HTTPHEADER] = array(
'X-Shopgate-Library-Version: '. SHOPGATE_LIBRARY_VERSION,
'X-Shopgate-Plugin-Version: '.(defined('SHOPGATE_PLUGIN_VERSION') ? SHOPGATE_PLUGIN_VERSION : 'called outside plugin'),
$this->authService->buildAuthUserHeader(),
$this->authService->buildMerchantApiAuthTokenHeader()
);
$opt[CURLOPT_HTTPHEADER] = !empty($opt[CURLOPT_HTTPHEADER])
? ($this->authService->getAuthHttpHeaders() + $opt[CURLOPT_HTTPHEADER])
: $this->authService->getAuthHttpHeaders()
;
$opt[CURLOPT_TIMEOUT] = 30; // Default timeout 30sec
$opt[CURLOPT_POST] = true;
return $opt;
return ($override + $opt);
}
/**
* Prepares the request and sends it to the configured Shopgate Merchant API.
*
* @param mixed[] $parameters The parameters to send.
* @param mixed[] $curlOptOverride cURL options to override for this request.
* @return ShopgateMerchantApiResponse The response object.
* @throws ShopgateLibraryException in case the connection can't be established, the response is invalid or an error occured.
*/
protected function sendRequest($parameters) {
protected function sendRequest($parameters = array(), $curlOptOverride = array()) {
if (!empty($this->shopNumber)) {
$parameters['shop_number'] = $this->shopNumber;
}
$parameters = !empty($parameters)
? array_merge($this->authService->getAuthPostParams(), $parameters)
: $this->authService->getAuthPostParams()
;
$parameters['trace_id'] = 'spa-'.uniqid();
$this->log('Sending request to "'.$this->apiUrl.'": '.ShopgateLogger::getInstance()->cleanParamsForLog($parameters), ShopgateLogger::LOGTYPE_REQUEST);
// init new auth session and generate cURL options
$this->authService->startNewSession();
$curlOpt = $this->getCurlOptArray($curlOptOverride);
// init cURL connection and send the request
$curl = curl_init($this->apiUrl);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($parameters));
curl_setopt_array($curl, $this->curlOpt);
curl_setopt_array($curl, $curlOpt);
$response = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
ca. Zeile 705
## Following methods represent the Shopgate Merchant API's actions: ##
######################################################################
######################################################################
## Shop ##
######################################################################
public function getShopInfo($parameters = array()) {
$request = array(
'action' => 'get_shop_info',
);
$request = array_merge($request, $parameters);
return $this->sendRequest($request);
}
######################################################################
## Orders ##
######################################################################
public function getOrders($parameters) {
$request = array(
ca. Zeile 731
$response->setData($orders);
return $response;
}
public function addOrderDeliveryNote($orderNumber, $shippingServiceId, $trackingNumber, $markAsCompleted = false) {
public function addOrderDeliveryNote($orderNumber, $shippingServiceId, $trackingNumber = '', $markAsCompleted = false, $sendCustomerEmail = false) {
$request = array(
'action' => 'add_order_delivery_note',
'order_number' => $orderNumber,
'shipping_service_id' => $shippingServiceId,
'tracking_number' => (string) $trackingNumber,
'mark_as_completed' => $markAsCompleted,
'send_customer_email' => $sendCustomerEmail,
);
return $this->sendRequest($request);
}
public function setOrderShippingCompleted($orderNumber) {
public function setOrderShippingCompleted($orderNumber, $sendCustomerEmail = false) {
$request = array(
'action' => 'set_order_shipping_completed',
'order_number' => $orderNumber,
'send_customer_email' => $sendCustomerEmail,
);
return $this->sendRequest($request);
}
public function cancelOrder($orderNumber, $cancelCompleteOrder = false, $cancellationItems = array(), $cancelShipping = false, $cancellationNote = '') {
public function cancelOrder($orderNumber, $cancelCompleteOrder = true, $cancellationItems = array(), $cancelShipping = false, $cancellationNote = '') {
$request = array(
'action' => 'cancel_order',
'order_number' => $orderNumber,
'cancel_complete_order' => $cancelCompleteOrder,
ca. Zeile 773
* This method is deprecated, please use getMobileRedirectUserAgents().
* @deprecated
*/
public function getMobileRedirectKeywords() {
// Set timeout to 1 second
$this->curlOpt[CURLOPT_TIMEOUT] = 1;
$request = array(
'action' => 'get_mobile_redirect_keywords',
);
$response = $this->sendRequest($request);
$response = $this->sendRequest($request, array(CURLOPT_TIMEOUT => 1));
return $response->getData();
}
public function getMobileRedirectUserAgents() {
// Set timeout to 1 second
$this->curlOpt[CURLOPT_TIMEOUT] = 1;
$request = array(
'action' => 'get_mobile_redirect_user_agents',
);
$response = $this->sendRequest($request);
$response = $this->sendRequest($request, array(CURLOPT_TIMEOUT => 1));
$responseData = $response->getData();
if (!isset($responseData["keywords"]) || !isset($responseData["skip_keywords"])) {
throw new ShopgateLibraryException(ShopgateLibraryException::MERCHANT_API_INVALID_RESPONSE, "\"keyword\" or \"skip_keyword\" is not set. Response: " . var_export($responseData, true));
}
return $response->getData();
}
######################################################################
ca. Zeile 960
return $this->sendRequest($request);
}
}
class ShopgateAuthentificationService extends ShopgateObject implements ShopgateAuthentificationServiceInterface {
class ShopgateAuthenticationServiceShopgate extends ShopgateObject implements ShopgateAuthenticationServiceInterface {
private $customerNumber;
private $apiKey;
private $timestamp;
ca. Zeile 972
$this->startNewSession();
}
/**
* @param ShopgateConfigInterface $config
*/
public function setup(ShopgateConfigInterface $config) {
// nothing to do here
}
public function startNewSession() {
$this->timestamp = time();
}
public function getAuthPostParams() {
return array();
}
public function getAuthHttpHeaders() {
return array(
$this->buildAuthUserHeader(),
$this->buildMerchantApiAuthTokenHeader(),
);
}
public function buildAuthUser() {
return $this->customerNumber.'-'.$this->getTimestamp();
}
ca. Zeile 1000
public function buildPluginApiAuthTokenHeader() {
return $this->buildAuthTokenHeader('SPA');
}
public function checkAuthentification() {
public function checkAuthentication() {
if (defined('SHOPGATE_DEBUG') && SHOPGATE_DEBUG === 1) return;
if (empty($_SERVER[self::PHP_X_SHOPGATE_AUTH_USER]) || empty($_SERVER[self::PHP_X_SHOPGATE_AUTH_TOKEN])) {
throw new ShopgateLibraryException(ShopgateLibraryException::AUTHENTICATION_FAILED, 'No authentication data present.');
}
// for convenience
$name = $_SERVER[self::PHP_X_SHOPGATE_AUTH_USER];
$token = $_SERVER[self::PHP_X_SHOPGATE_AUTH_TOKEN];
// extract customer number and timestamp from username
$matches = array();
if (!preg_match('/(?P<customer_number>[1-9][0-9]+)-(?P<timestamp>[1-9][0-9]+)/', $name, $matches)) {
throw new ShopgateLibraryException(ShopgateLibraryException::AUTHENTICATION_FAILED, 'Cannot parse: '.$name.'.');
}
// for convenience
$customer_number = $matches['customer_number'];
$timestamp = $matches['timestamp'];
// request shouldn't be older than 30 minutes or more than 30 minutes in the future
if (abs($this->getTimestamp() - $timestamp) > (30*60)) {
throw new ShopgateLibraryException(ShopgateLibraryException::AUTHENTICATION_FAILED, 'Request too old or too far in the future.');
}
// create the authentication-password
$generatedPassword = $this->buildCustomAuthToken('SPA', $customer_number, $timestamp, $this->apiKey);
// compare customer-number and auth-password and make sure, the API key was set in the configuration
if (($customer_number != $this->customerNumber) || ($token != $generatedPassword) || (empty($this->apiKey))) {
throw new ShopgateLibraryException(ShopgateLibraryException::AUTHENTICATION_FAILED, 'Invalid authentication data.');
}
}
/**
* Return current timestamp
*
* @return int
*/
protected function getTimestamp() {
return $this->timestamp;
}
/**
* Generates the auth token with the given parameters.
*
* @param string $prefix
* @param string $customerNumber
* @param int $timestamp
* @param string $apiKey
* @throws ShopgateLibraryException when no customer number or API key is set
* @return string The SHA-1 hash Auth Token for Shopgate's Authentication
*/
protected function buildCustomAuthToken($prefix, $customerNumber, $timestamp, $apiKey) {
if (empty($customerNumber) || empty($apiKey)) {
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_INVALID_VALUE, 'Shopgate customer number or API key not set.', true, false);
}
return sha1("{$prefix}-{$customerNumber}-{$timestamp}-{$apiKey}");
}
}
class ShopgateAuthenticationServiceOAuth extends ShopgateObject implements ShopgateAuthenticationServiceInterface {
private $accessToken;
private $timestamp;
public function __construct($accessToken = null) {
$this->accessToken = $accessToken;
$this->startNewSession();
}
/**
* @param ShopgateConfigInterface $config
*/
public function setup(ShopgateConfigInterface $config) {
// needs to check if an old config is present without any access token
if ($config->getCustomerNumber() && $config->getShopNumber() && $config->getApiKey() && !$config->getOauthAccessToken()) {
// needs to load the non-oauth-url since the new access token needs to be generated using the classic shopgate merchant api authentication
$apiUrls = $config->getApiUrls();
$apiUrl = $config->getServer() == 'custom' ? str_replace('/api/merchant2', '/api/merchant', $config->getApiUrl()) : $apiUrls[$config->getServer()][ShopgateConfigInterface::SHOPGATE_AUTH_SERVICE_CLASS_NAME_SHOPGATE];
$smaAuthServiceShopgate = new ShopgateAuthenticationServiceShopgate($config->getCustomerNumber(), $config->getApiKey());
$smaAuthServiceShopgate->setup($config);
$classicSma = new ShopgateMerchantApi($smaAuthServiceShopgate, $config->getShopNumber(), $apiUrl);
// the "get_shop_info" returns an oauth access token
$shopInfo = $classicSma->getShopInfo()->getData();
// set newly generated access token
$this->accessToken = $shopInfo['oauth_access_token'];
// create a new settings array
$shopgateSettingsNew = array(
$field = 'oauth_access_token' => $shopInfo[$field],
$field = 'customer_number' => $shopInfo[$field],
$field = 'shop_number' => $shopInfo[$field],
$field = 'apikey' => $shopInfo[$field],
$field = 'alias' => $shopInfo[$field],
$field = 'cname' => $shopInfo[$field],
);
// save all shop config data to plugin-config using the configs save method
$config->load($shopgateSettingsNew);
$config->save(array_keys($shopgateSettingsNew), true);
} elseif (!$this->accessToken && $config->getOauthAccessToken()) {
// this would mean the data was somehow not in sync (should no be happening by default)
$this->accessToken = $config->getOauthAccessToken();
} else {
// skip this since the connection is fully functional or there has not been made any connection at all, yet
// -> missing data (except the oauth access token) is treated as "no valid connection available"
// -> in either case there is nothing to do here
}
}
public function startNewSession() {
$this->timestamp = time();
}
public function getAuthPostParams() {
return array('access_token' => $this->accessToken);
}
public function getAuthHttpHeaders() {
return array();
}
public function checkAuthentication() {
if(defined('SHOPGATE_DEBUG') && SHOPGATE_DEBUG === 1) return;
if (empty($_SERVER[self::PHP_X_SHOPGATE_AUTH_USER]) || empty($_SERVER[self::PHP_X_SHOPGATE_AUTH_TOKEN])){
throw new ShopgateLibraryException(ShopgateLibraryException::AUTHENTICATION_FAILED, 'No authentication data present.');
ca. Zeile 1026
if (abs($this->getTimestamp() - $timestamp) > (30*60)) {
throw new ShopgateLibraryException(ShopgateLibraryException::AUTHENTICATION_FAILED, 'Request too old or too far in the future.');
}
// create the authentification-password
// create the authentication-password
$generatedPassword = $this->buildCustomAuthToken('SPA', $customer_number, $timestamp, $this->apiKey);
// compare customer-number and auth-password and make sure, the API key was set in the configuration
if (($customer_number != $this->customerNumber) || ($token != $generatedPassword) || (empty($this->apiKey))) {
throw new ShopgateLibraryException(ShopgateLibraryException::AUTHENTICATION_FAILED, 'Invalid authentication data.');
}
}
public function requestOAuthAccessToken($code, $calledScriptUrl, $tokenRequestUrl) {
// setup request POST parameters
$parameters = array(
'client_id' => 'ShopgatePlugin',
'grant_type' => 'authorization_code',
'redirect_uri' => $calledScriptUrl,
'code' => $code,
);
// -> setup request headers
$curlOpt = array(
CURLOPT_HEADER => false,
CURLOPT_USERAGENT => 'ShopgatePlugin/'.(defined('SHOPGATE_PLUGIN_VERSION') ? SHOPGATE_PLUGIN_VERSION : 'called outside plugin'),
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
'X-Shopgate-Library-Version: '.SHOPGATE_LIBRARY_VERSION,
'X-Shopgate-Plugin-Version: '.(defined('SHOPGATE_PLUGIN_VERSION') ? SHOPGATE_PLUGIN_VERSION : 'called outside plugin'),
),
CURLOPT_TIMEOUT => 30, // Default timeout 30sec
CURLOPT_POST => true,
);
// -> init cURL connection and send the request
$curl = curl_init($tokenRequestUrl);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($parameters));
curl_setopt_array($curl, $curlOpt);
$response = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
// check the curl-result
if (!$response) {
// exception without logging - this might cause spamming your logs and we will know when our API is offline anyways
throw new ShopgateLibraryException(ShopgateLibraryException::SHOPGATE_OAUTH_NO_CONNECTION, null, false, false);
}
if (empty($response)) {
// exception without logging - this might cause spamming your logs and we will know when our API is offline anyways
throw new ShopgateLibraryException(ShopgateLibraryException::MERCHANT_API_INVALID_RESPONSE, 'Response: '.$response, true, false);
}
// convert returned json string
$decodedResponse = $this->jsonDecode($response, true);
// check for valid access token
$this->accessToken = !empty($decodedResponse['access_token']) ? $decodedResponse['access_token'] : '';
if (empty($this->accessToken)) {
throw new ShopgateLibraryException(
ShopgateLibraryException::SHOPGATE_OAUTH_MISSING_ACCESS_TOKEN,
((!empty($decodedResponse['error']) && !empty($decodedResponse['error_description']))
? ' [Shopgate authorization failure "'.$decodedResponse['error'].'": ' . $decodedResponse['error_description'] . ']'
: ' [Shopgate authorization failure: Unexpected server response]'
),
true
);
}
return $this->accessToken;
}
/**
* Return current timestamp
*
* @return int
ca. Zeile 1051
* @param string $prefix
* @param string $customerNumber
* @param int $timestamp
* @param string $apiKey
* @throws ShopgateLibraryException when no customer number or API key is set
* @return string The SHA-1 hash Auth Token for Shopgate's Authentication
*/
protected function buildCustomAuthToken($prefix, $customerNumber, $timestamp, $apiKey) {
if (empty($customerNumber) || empty($apiKey)) {
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_INVALID_VALUE, 'Shopgate customer number or API key not set.', true, false);
}
return sha1("{$prefix}-{$customerNumber}-{$timestamp}-{$apiKey}");
}
}
ca. Zeile 1082
}
/**
* Marks the response as error.
* @param $code
* @param $message
*/
public function markError($code, $message) {
$this->error = $code;
$this->error_text = $message;
ca. Zeile 1110
/**
* @author Shopgate GmbH, 35510 Butzbach, DE
*/
class ShopgatePluginApiResponseTextCsv extends ShopgatePluginApiResponse {
class ShopgatePluginApiResponseAppJson extends ShopgatePluginApiResponse {
public function send() {
$data = array();
$data['error'] = $this->error;
$data['error_text'] = $this->error_text;
$data['trace_id'] = $this->trace_id;
$data['shopgate_library_version'] = $this->version;
if (!empty($this->pluginVersion)) {
$data['plugin_version'] = $this->pluginVersion;
}
$this->data = array_merge($data, $this->data);
header("HTTP/1.0 200 OK");
header("Content-Type: application/json");
echo $this->jsonEncode($this->data);
}
}
/**
* @author Shopgate GmbH, 35510 Butzbach, DE
*/
abstract class ShopgatePluginApiResponseExport extends ShopgatePluginApiResponse {
public function setData($data) {
if (!file_exists($data)) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_FILE_NOT_FOUND, 'File: '.$data);
if (!file_exists($data) && !preg_match("/^php/", $data)) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_FILE_NOT_FOUND, 'File: '.$data, true);
}
$this->data = $data;
}
public function send() {
if (preg_match("/^php/", $this->data)) { // don't output files when the "file" is a stream
exit;
}
$fp = @fopen($this->data, 'r');
if (!$fp) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_FILE_OPEN_ERROR, 'File: '.$this->data);
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_FILE_OPEN_ERROR, 'File: '.$this->data, true);
}
// output headers ...
header('HTTP/1.0 200 OK');
header('Content-Type: text/csv');
header('Content-Disposition: attachment; filename="'.basename($this->data).'"');
$headers = $this->getHeaders();
foreach ($headers as $header) {
header($header);
}
// ... and csv file
while ($line = fgets($fp)) echo $line;
// ... and the file
while ($line = fgets($fp, 4096)) {
echo $line;
}
// clean up and leave
fclose($fp);
exit;
}
/**
* Returns all except the "200 OK" HTTP headers to send before outputting the file.
*
* @return string[]
*/
protected abstract function getHeaders();
}
/**
* @author Shopgate GmbH, 35510 Butzbach, DE
*/
class ShopgatePluginApiResponseAppJson extends ShopgatePluginApiResponse {
public function send() {
$data = array();
$data['error'] = $this->error;
$data['error_text'] = $this->error_text;
$data['trace_id'] = $this->trace_id;
$data['version'] = $this->version;
if (!empty($this->pluginVersion)) {
$data['plugin_version'] = $this->pluginVersion;
class ShopgatePluginApiResponseTextCsvExport extends ShopgatePluginApiResponseExport {
protected function getHeaders() {
return array(
'Content-Type: text/csv',
'Content-Disposition: attachment; filename="'.basename($this->data).'"',
);
}
}
$this->data = array_merge($data, $this->data);
header("HTTP/1.0 200 OK");
header("Content-Type: application/json");
echo $this->jsonEncode($this->data);
/**
* @author Shopgate GmbH, 35510 Butzbach, DE
*/
class ShopgatePluginApiResponseAppXmlExport extends ShopgatePluginApiResponseExport {
protected function getHeaders() {
return array(
'Content-Type: application/xml',
'Content-Disposition: attachment; filename="'.basename($this->data).'"',
);
}
}
/**
* @author Shopgate GmbH, 35510 Butzbach, DE
*/
class ShopgatePluginApiResponseAppJsonExport extends ShopgatePluginApiResponseExport {
protected function getHeaders() {
return array(
'Content-Type: application/json',
'Content-Disposition: attachment; filename="'.basename($this->data).'"',
);
}
}
class ShopgatePluginApiResponseAppGzipExport extends ShopgatePluginApiResponseExport {
protected function getHeaders() {
return array(
'Content-Type: application/gzip',
'Content-Disposition: attachment; filename="'.basename($this->data).'"',
);
}
}
/**
ca. Zeile 1299
* This interface represents the Shopgate Plugin API as described in our wiki.
*
* It provides all available actions and calls the plugin implementation's callback methods for data retrieval if necessary.
*
* @see http://wiki.shopgate.com/Shopgate_Plugin_API/
* @see http://wiki.shopgate.com/Shopgate_Plugin_API
* @author Shopgate GmbH, 35510 Butzbach, DE
*/
interface ShopgatePluginApiInterface {
/**
ca. Zeile 1324
* @author Shopgate GmbH, 35510 Butzbach, DE
*/
interface ShopgateMerchantApiInterface {
######################################################################
## Shop ##
######################################################################
/**
* Represents the "get_shop_info" action.
*
* @param mixed[] $parameters
*
* @return ShopgateMerchantApiResponse
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_get_orders
*/
public function getShopInfo($parameters = array());
######################################################################
## Orders ##
######################################################################
/**
* Represents the "get_orders" action.
ca. Zeile 1336
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_get_orders/
* @see http://wiki.shopgate.com/Merchant_API_get_orders
*/
public function getOrders($parameters);
/**
ca. Zeile 1347
* @param string $orderNumber
* @param string $shippingServiceId
* @param int $trackingNumber
* @param bool $markAsCompleted
* @param bool $sendCustomerMail
*
* @return ShopgateMerchantApiResponse
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_add_order_delivery_note/
* @see http://wiki.shopgate.com/Merchant_API_add_order_delivery_note
*/
public function addOrderDeliveryNote($orderNumber, $shippingServiceId, $trackingNumber, $markAsCompleted = false);
public function addOrderDeliveryNote($orderNumber, $shippingServiceId, $trackingNumber = '', $markAsCompleted = false, $sendCustomerMail = true);
/**
* Represents the "set_order_shipping_completed" action.
*
ca. Zeile 1367
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_set_order_shipping_completed/
* @see http://wiki.shopgate.com/Merchant_API_set_order_shipping_completed
*/
public function setOrderShippingCompleted($orderNumber);
/**
ca. Zeile 1385
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_cancel_order/
* @see http://wiki.shopgate.com/Merchant_API_cancel_order
*/
public function cancelOrder($orderNumber, $cancelCompleteOrder = false, $cancellationItems = array(), $cancelShipping = false, $cancellationNote = '');
######################################################################
ca. Zeile 1431
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_get_items/
* @see http://wiki.shopgate.com/Merchant_API_get_items
*/
public function getItems($parameters);
/**
ca. Zeile 1445
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_add_item/
* @see http://wiki.shopgate.com/Merchant_API_add_item
*/
public function addItem($item);
/**
ca. Zeile 1459
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_update_item/
* @see http://wiki.shopgate.com/Merchant_API_update_item
*/
public function updateItem($item);
/**
ca. Zeile 1473
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_delete_item/
* @see http://wiki.shopgate.com/Merchant_API_delete_item
*/
public function deleteItem($itemNumber);
/**
ca. Zeile 1487
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_batch_add_items/
* @see http://wiki.shopgate.com/Merchant_API_batch_add_items
*/
public function batchAddItems($items);
/**
ca. Zeile 1501
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_batch_update_items/
* @see http://wiki.shopgate.com/Merchant_API_batch_update_items
*/
public function batchUpdateItems($items);
######################################################################
ca. Zeile 1518
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_get_categories/
* @see http://wiki.shopgate.com/Merchant_API_get_categories
*/
public function getCategories($parameters);
/**
ca. Zeile 1532
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_add_category/
* @see http://wiki.shopgate.com/Merchant_API_add_category
*/
public function addCategory($category);
/**
ca. Zeile 1546
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_update_category/
* @see http://wiki.shopgate.com/Merchant_API_update_category
*/
public function updateCategory($category);
/**
ca. Zeile 1562
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_delete_category/
* @see http://wiki.shopgate.com/Merchant_API_delete_category
*/
public function deleteCategory($categoryNumber, $deleteSubCategories = false, $deleteItems = false);
/**
ca. Zeile 1578
*
* @throws ShopgateLibraryException in case the connection can't be established
* @throws ShopgateMerchantApiException in case the response is invalid or an error occured
*
* @see http://wiki.shopgate.com/Merchant_API_add_item_to_category/
* @see http://wiki.shopgate.com/Merchant_API_add_item_to_category
*/
public function addItemToCategory($itemNumber, $categoryNumber, $orderIndex = null);
/**
ca. Zeile 1599
public function deleteItemFromCategory($itemNumber, $categoryNumber);
}
/**
* This class provides methods to check and generate authentification strings.
* This class provides methods to check and generate authentication strings.
*
* It is used internally by the Shopgate Library to send requests or check incoming requests.
*
* To check authentication on incoming request it accesses the $_SERVER variable which should contain the required X header fields for
* authentication.
*
* @author Shopgate GmbH, 35510 Butzbach, DE
*/
interface ShopgateAuthentificationServiceInterface {
interface ShopgateAuthenticationServiceInterface {
const HEADER_X_SHOPGATE_AUTH_USER = 'X-Shopgate-Auth-User';
const HEADER_X_SHOPGATE_AUTH_TOKEN = 'X-Shopgate-Auth-Token';
const PHP_X_SHOPGATE_AUTH_USER = 'HTTP_X_SHOPGATE_AUTH_USER';
const PHP_X_SHOPGATE_AUTH_TOKEN = 'HTTP_X_SHOPGATE_AUTH_TOKEN';
/**
* @return string The auth user string.
*/
public function buildAuthUser();
/**
* @return string The X-Shopgate-Auth-User HTTP header for an outgoing request.
*/
public function buildAuthUserHeader();
/**
* @param $prefix string SMA|SPA
* @return string The auth token string.
*/
public function buildAuthToken($prefix = 'SMA');
/**
* @param $prefix string SMA|SPA
* @return string The X-Shopgate-Auth-Token HTTP header.
* @param ShopgateConfigInterface $config
*/
public function buildAuthTokenHeader($prefix = 'SMA');
public function setup(ShopgateConfigInterface $config);
/**
* @return string The X-Shopgate-Auth-Token HTTP header for an outgoing request.
* @return array A list of all necessary post parameters for the authentication process
*/
public function buildMerchantApiAuthTokenHeader();
public function getAuthPostParams();
/**
* @return string The X-Shopgate-Auth-Token HTTP header for an incoming request.
* @return array A list of all necessary http headers for the authentication process
*/
public function buildPluginApiAuthTokenHeader();
public function getAuthHttpHeaders();
/**
* @throws ShopgateLibraryException if authentication fails
*/
public function checkAuthentification();
public function checkAuthentication();
/**
* Start a new Authentication session
*/
includes/external/shopgate/shopgate_library/classes/configuration.phpTop ca. Zeile 1
<?php
/**
* Manages configuration for library _and_ plugin options.
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
/**
* File-based configuration management for library _and_ plugin options.
*
* This class is used to save general library settings and specific settings for your plugin.
*
* To add your own specific settings
*
* @author Shopgate GmbH, 35510 Butzbach, DE
*/
class ShopgateConfig extends ShopgateContainer implements ShopgateConfigInterface {
/**
* default xsd location url
*/
const DEFAULT_XSD_URL_LOCATION = 'http://files.shopgate.com/xml/xsd';
/**
* @var string The path to the folder where the config file(s) are saved.
*/
protected $config_folder_path;
ca. Zeile 17
/**
* @var array<string, string> List of field names (index) that must have a value according to their validation regex (value)
*/
protected $coreValidations = array(
'customer_number' => '/^[0-9]{5,}$/', // at least 5 digits
'shop_number' => '/^[0-9]{5,}$/', // at least 5 digits
'apikey' => '/^[0-9a-f]{20}$/', // exactly 20 hexadecimal digits
'alias' => '/^[0-9a-zA-Z]+(([\.]?|[\-]+)[0-9a-zA-Z]+)*$/', // start and end with alpha-numerical characters, multiple dashes and single dots in between are ok
'cname' => '/^(http:\/\/\S+)?$/i', // empty or a string beginning with "http://" followed by any number of non-whitespace characters
'server' => '/^(live|pg|custom)$/', // "live" or "pg" or "custom"
'api_url' => '/^(https?:\/\/\S+)?$/i', // empty or a string beginning with "http://" or "https://" followed by any number of non-whitespace characters (this is used for testing only, thus the lose validation)
'customer_number' => '/^[0-9]{5,}$/',
// at least 5 digits
'shop_number' => '/^[0-9]{5,}$/',
// at least 5 digits
'apikey' => '/^[0-9a-f]{20}$/',
// exactly 20 hexadecimal digits
'alias' => '/^[0-9a-zA-Z]+(([\.]?|[\-]+)[0-9a-zA-Z]+)*$/',
// start and end with alpha-numerical characters, multiple dashes and single dots in between are ok
'cname' => '/^((http|https):\/\/)?((([\w-]+)[\.]?)*([\w-]+)\.(\w){2,})?(\/)?$/i',
// empty or a string beginning with "http://" followed by any number of non-whitespace characters
'server' => '/^(live|pg|sl|custom)$/',
// "live" or "pg" or "sl" or "custom"
'api_url' => '/^(https?:\/\/\S+)?$/i',
// empty or a string beginning with "http://" or "https://" followed by any number of non-whitespace characters (this is used for testing only, thus the lose validation)
);
/**
* @var array<string, string> List of field names (index) that must have a value according to their validation regex (value)
ca. Zeile 46
##################################################################################
### basic shop information necessary for use of the APIs, mobile redirect etc. ###
##################################################################################
/**
* @var string Shopgate oauth access token
*/
protected $oauth_access_token;
// /**
// * @var int Class name for the authentication service, that is used for the Shopgate PluginAPI
// */
// protected $spa_auth_service_class_name;
/**
* @var string Class name for the authentication service, that is used for the Shopgate MerchantAPI
*/
protected $sma_auth_service_class_name;
/**
* @var int Shopgate customer number (at least 5 digits)
*/
protected $customer_number;
ca. Zeile 76
*/
protected $server;
/**
* @var array<string, array<string, string>> api url map for server and authentication service type
*/
protected $api_urls = array(
'live' => array(
ShopgateConfigInterface::SHOPGATE_AUTH_SERVICE_CLASS_NAME_SHOPGATE => ShopgateConfigInterface::SHOPGATE_API_URL_LIVE,
ShopgateConfigInterface::SHOPGATE_AUTH_SERVICE_CLASS_NAME_OAUTH => ShopgateConfigInterface::SHOPGATE_API_URL_LIVE_OAUTH,
),
'pg' => array(
ShopgateConfigInterface::SHOPGATE_AUTH_SERVICE_CLASS_NAME_SHOPGATE => ShopgateConfigInterface::SHOPGATE_API_URL_PG,
ShopgateConfigInterface::SHOPGATE_AUTH_SERVICE_CLASS_NAME_OAUTH => ShopgateConfigInterface::SHOPGATE_API_URL_PG_OAUTH,
),
'sl' => array(
ShopgateConfigInterface::SHOPGATE_AUTH_SERVICE_CLASS_NAME_SHOPGATE => ShopgateConfigInterface::SHOPGATE_API_URL_SL,
ShopgateConfigInterface::SHOPGATE_AUTH_SERVICE_CLASS_NAME_OAUTH => ShopgateConfigInterface::SHOPGATE_API_URL_SL_OAUTH,
),
);
/**
* @var string If $server is set to custom, Shopgate Merchant API calls will be made to this URL (empty or a string beginning with "http://" or "https://" followed by any number of non-whitespace characters)
*/
protected $api_url;
ca. Zeile 96
*/
protected $enable_redirect_keyword_update;
/**
* @var bool true to enable default redirect for mobile devices from content sites to mobile website (welcome page)
*/
protected $enable_default_redirect;
/**
* @var string the encoding the shop system is using internally
*/
protected $encoding;
ca. Zeile 105
* @var bool true to enable automatic encoding conversion to utf-8 during export
*/
protected $export_convert_encoding;
/**
* @var bool if true forces the $encoding to be the only one source encoding for all encoding operations
*/
protected $force_source_encoding;
/**
* @var string[] the list of fields supported by the plugin method check_cart
*/
protected $supported_fields_check_cart;
/**
* @var string[] the list of fields supported by the plugin method get_settings
*/
protected $supported_fields_get_settings;
/**
* @var string[] the list of methods supported by the cron action
*/
protected $supported_methods_cron;
/**
* @var array<string, string[]> the list of response types supported by the plugin, indexed by actions
*/
protected $supported_response_types;
##############################################################
### Indicators to (de)activate Shopgate Plugin API actions ###
##############################################################
ca. Zeile 127
/**
* @var bool
*/
protected $enable_check_cart;
/**
* @var bool
*/
protected $enable_check_stock;
/**
* @var bool
*/
protected $enable_redeem_coupons;
/**
* @var bool
*/
protected $enable_get_orders;
/**
* @var bool
ca. Zeile 137
/**
* @var bool
*/
protected $enable_register_customer;
/**
* @var bool
*/
protected $enable_get_debug_info;
/**
* @var bool
*/
protected $enable_get_items;
/**
* @var bool
*/
protected $enable_get_items_csv;
/**
* @var bool
ca. Zeile 147
/**
* @var bool
*/
protected $enable_get_categories;
/**
* @var bool
*/
protected $enable_get_reviews_csv;
/**
* @var bool
*/
protected $enable_get_pages_csv;
protected $enable_get_reviews;
/**
* @var bool
*/
protected $enable_get_media_csv;
/**
* @var bool
*/
ca. Zeile 179
* @var bool
*/
protected $enable_clear_cache;
/**
* @var bool
*/
protected $enable_get_settings;
/**
* @var bool
*/
protected $enable_set_settings;
/**
* @var bool
*/
protected $enable_sync_favourite_list;
/**
* @var bool
*/
protected $enable_receive_authorization;
#######################################################
### Options regarding shop system specific settings ###
#######################################################
/**
ca. Zeile 238
*/
protected $items_csv_filename;
/**
* @var string The name of the items XML file.
*/
protected $items_xml_filename;
/**
* @var string The name of the items JSON file.
*/
protected $items_json_filename;
/**
* @var string The name of the items CSV file.
*/
protected $media_csv_filename;
/**
* @var string The name of the categories CSV file.
*/
protected $categories_csv_filename;
/**
* @var string The name of the categories XML file.
*/
protected $categories_xml_filename;
/**
* @var string The name of the categories JSON file.
*/
protected $categories_json_filename;
/**
* @var string The name of the reviews CSV file.
*/
protected $reviews_csv_filename;
/**
* @var string The name of the pages CSV file.
* @var string The name of the reviews XML file.
*/
protected $reviews_xml_filename;
/**
* @var string The name of the reviews JSON file.
*/
protected $pages_csv_filename;
protected $reviews_json_filename;
/**
* @var string The name of the access log file.
*/
ca. Zeile 283
*/
protected $redirect_skip_keyword_cache_filename;
/**
* @var bool True if the plugin is an adapter between Shopgate's and a third-party-API and servers multiple shops on both ends.
*/
protected $is_shopgate_adapter;
/**
* @var array<string, mixed> Additional shop system specific settings that cannot (or should not) be generalized and thus be defined by a plugin itself.
*/
protected $additionalSettings = array();
/**
* @var array<int, string> an array with a list of get params which are allowed to passthrough to the mobile device on redirect
*/
protected $redirectable_get_params = array();
/**
* @var int execution time limit for file export in seconds
*/
protected $default_execution_time;
/**
* @var int memory limit in MB
*/
protected $default_memory_limit;
###################################################
### Initialization, loading, saving, validating ###
###################################################
/** @noinspection PhpMissingParentConstructorInspection */
public final function __construct(array $data = array()) {
// parent constructor not called on purpose, because we need special
// initialization behaviour here (e.g. loading via array or file)
ca. Zeile 309
$this->api_url = '';
$this->shop_is_active = 0;
$this->always_use_ssl = 0;
$this->enable_redirect_keyword_update = 0;
$this->enable_default_redirect = 0;
$this->encoding = 'UTF-8';
$this->export_convert_encoding = 1;
$this->force_source_encoding = false;
$this->supported_fields_check_cart = array();
$this->supported_fields_get_settings = array();
$this->supported_methods_cron = array();
$this->supported_response_types = array(
'get_items' => array('xml'),
'get_categories' => array('xml'),
'get_reviews' => array('xml')
);
$this->enable_ping = 1;
$this->enable_add_order = 0;
$this->enable_update_order = 0;
$this->enable_check_cart = 0;
$this->enable_check_stock = 0;
$this->enable_redeem_coupons = 0;
$this->enable_get_orders = 0;
$this->enable_get_customer = 0;
$this->enable_get_debug_info = 0;
$this->enable_get_items_csv = 0;
$this->enable_get_items = 0;
$this->enable_get_categories = 0;
$this->enable_get_media_csv = 0;
$this->enable_get_categories_csv = 0;
$this->enable_get_reviews = 0;
$this->enable_get_reviews_csv = 0;
$this->enable_get_pages_csv = 0;
$this->enable_get_log_file = 1;
$this->enable_mobile_website = 0;
$this->enable_cron = 0;
$this->enable_clear_log_file = 1;
$this->enable_clear_cache = 1;
$this->enable_get_settings = 0;
$this->enable_set_settings = 1;
$this->enable_register_customer = 0;
$this->enable_sync_favourite_list = 0;
$this->enable_receive_authorization = 0;
$this->sma_auth_service_class_name = ShopgateConfigInterface::SHOPGATE_AUTH_SERVICE_CLASS_NAME_SHOPGATE;
$this->country = 'DE';
$this->language = 'de';
$this->currency = 'EUR';
ca. Zeile 344
$this->log_folder_path = SHOPGATE_BASE_DIR.DS.'temp'.DS.'logs';
$this->cache_folder_path = SHOPGATE_BASE_DIR.DS.'temp'.DS.'cache';
$this->items_csv_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'items.csv';
$this->items_xml_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'items.xml';
$this->items_json_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'items.json';
$this->media_csv_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'media.csv';
$this->categories_csv_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'categories.csv';
$this->categories_xml_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'categories.xml';
$this->categories_json_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'categories.json';
$this->reviews_csv_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'reviews.csv';
$this->pages_csv_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'pages.csv';
$this->reviews_xml_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'reviews.xml';
$this->reviews_json_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'reviews.json';
$this->access_log_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'access.log';
$this->request_log_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'request.log';
$this->error_log_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'error.log';
ca. Zeile 356
$this->redirect_keyword_cache_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'redirect_keywords.txt';
$this->redirect_skip_keyword_cache_filename = ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'skip_redirect_keywords.txt';
$this->is_shopgate_adapter = false;
$this->redirectable_get_params = array('gclid', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content');
$this->default_memory_limit = ShopgateConfigInterface::DEFAULT_MEMORY_LIMIT;
$this->default_execution_time = ShopgateConfigInterface::DEFAULT_EXECUTION_TIME;
// call possible sub class' startup()
if (!$this->startup()) {
$this->loadArray($data);
}
ca. Zeile 375
// nothing to do here
return false;
}
public function load(array $settings = null) {
$this->loadArray($settings);
}
/**
* returns the current xsd location
*
* @return string
*/
public static function getCurrentXsdLocation() {
return ShopgateConfig::DEFAULT_XSD_URL_LOCATION;
}
/**
* Tries to assign the values of an array to the configuration fields or load it from a file.
*
* This overrides ShopgateContainer::loadArray() which is called on object instantiation. It tries to assign
ca. Zeile 400
// put the rest into $this->additionalSettings
$this->mapAdditionalSettings($unmappedData);
}
/**
* Tries to load the configuration from a file.
*
* If a $path is passed, this method tries to include the file. If that fails an exception is thrown.<br />
* <br />
* If $path is empty it tries to load .../shopgate_library/config/myconfig.php or if that fails,
* .../shopgate_library/config/config.php is tried to be loaded. If that fails too, an exception is
* thrown.<br />
* <br />
* The configuration file must be a PHP script defining an indexed array called $shopgate_config
* containing the desired configuration values to set. If that is not the case, an exception is thrown
*
* @param string $path The path to the configuration file or nothing to load the default Shopgate Library configuration files.
*
* @throws ShopgateLibraryException in case a configuration file could not be loaded or the $shopgate_config is not set.
*/
public function loadFile($path = null) {
$config = null;
// try loading files
ca. Zeile 427
$this->mapAdditionalSettings($unmappedData);
}
/**
* Loads the configuration file by for a given Shopgate shop number.
* Loads the configuration file for a given Shopgate shop number.
*
* @param string $shopNumber The shop number.
*
* @throws ShopgateLibraryException in case the $shopNumber is empty or no configuration file can be found.
*/
public function loadByShopNumber($shopNumber) {
if (empty($shopNumber) || !preg_match($this->coreValidations['shop_number'], $shopNumber)) {
ca. Zeile 440
// find all config files
$configFile = null;
$files = scandir($this->config_folder_path);
ob_start();
foreach ($files as $file) {
if (!is_file($this->config_folder_path.DS.$file)) {
continue;
}
ca. Zeile 452
$configFile = $this->config_folder_path.DS.$file;
break;
}
}
ob_end_clean();
if (empty($configFile)) {
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_READ_WRITE_ERROR, 'no configuration file found for shop number "'.$shopNumber.'"', true, false);
}
ca. Zeile 462
$this->initFileNames();
}
/**
* Loads the configuration file by a given language.
* Loads the configuration file by a given language or the global configuration file.
*
* @param string $language the ISO-639 code of the language
* @throws ShopgateLibraryException in case the $language is empty
* @param string|null $language the ISO-639 code of the language or null to load global configuration
*/
public function loadByLanguage($language) {
if (empty($language) || !preg_match('/[a-z]{2}/', $language)) {
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_READ_WRITE_ERROR, 'configuration file cannot be found without language code', true, false);
if (!is_null($language) && !preg_match('/[a-z]{2}/', $language)) {
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_READ_WRITE_ERROR, 'invalid language code "'.$language.'"', true, false);
}
$this->loadFile($this->config_folder_path.DS.'myconfig-'.$language.'.php');
$this->initFileNames();
ca. Zeile 481
* Sets the file names according to the language of the configuration.
*/
protected function initFileNames() {
$this->items_csv_filename = 'items-'.$this->language.'.csv';
$this->items_xml_filename = 'items-'.$this->language.'.xml';
$this->items_json_filename = 'items-'.$this->language.'.json';
$this->media_csv_filename = 'media-'.$this->language.'.csv';
$this->categories_csv_filename = 'categories-'.$this->language.'.csv';
$this->categories_xml_filename = 'categories-'.$this->language.'.xml';
$this->categories_json_filename = 'categories-'.$this->language.'.json';
$this->reviews_csv_filename = 'reviews-'.$this->language.'.csv';
$this->pages_csv_filename = 'pages-'.$this->language.'.csv';
$this->access_log_filename = 'access-'.$this->language.'.log';
$this->request_log_filename = 'request-'.$this->language.'.log';
$this->error_log_filename = 'error-'.$this->language.'.log';
ca. Zeile 494
$this->redirect_keyword_cache_filename = 'redirect_keywords-'.$this->language.'.txt';
$this->redirect_skip_keyword_cache_filename = 'skip_redirect_keywords-'.$this->language.'.txt';
}
public function save(array $fieldList, $validate = true) {
if ($this->checkUseGlobalFor($this->language)) {
$this->saveFile($fieldList, null, $validate);
} else {
$this->saveFileForLanguage($fieldList, $this->language, $validate);
}
}
/**
* Saves the desired configuration fields to the specified file or myconfig.php.
*
* This calls $this->loadFile() with the given $path to load the current configuration. In case that fails, the $shopgate_config
* array is initialized empty. The values defined in $fieldList are then validated (if desired), assigned to $shopgate_config and
* saved to the specified file or myconfig.php.
*
* In case the file cannot be (over)written or created, an exception with code ShopgateLibrary::CONFIG_READ_WRITE_ERROR is thrown.
*
* In case the validation fails for one or more fields, an exception with code ShopgateLibrary::CONFIG_INVALID_VALUE is thrown. The
* failed fields are appended as additional information in form of a comma-separated list.
*
* @param string[] $fieldList The list of fieldnames that should be saved to the configuration file.
* @param string $path The path to the configuration file or empty to use .../shopgate_library/config/myconfig.php.
* @param bool $validate True to validate the fields that should be set.
*
* @throws ShopgateLibraryException in case the configuration can't be loaded or saved.
*/
public function saveFile(array $fieldList, $path = null, $validate = true) {
// if desired, validate before doing anything else
if ($validate) {
$this->validate($fieldList);
ca. Zeile 529
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_READ_WRITE_ERROR, 'The configuration file "'.$path.'" could not be saved.');
}
}
public function saveFileForLanguage(array $fieldList, $language, $validate = true) {
if (empty($language)) {
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_READ_WRITE_ERROR, 'configuration file cannot be saved without language', true, false);
/**
* Saves the desired fields to the configuration file for a given language or global configuration
*
* @param string[] $fieldList the list of fieldnames that should be saved to the configuration file.
* @param string $language the ISO-639 code of the language or null to save to global configuration
* @param bool $validate true to validate the fields that should be set.
*
* @throws ShopgateLibraryException in case the configuration can't be loaded or saved.
*/
public function saveFileForLanguage(array $fieldList, $language = null, $validate = true) {
$fileName = null;
if (!is_null($language)) {
$this->setLanguage($language);
$fieldList[] = 'language';
$fileName = $this->config_folder_path.DS.'myconfig-'.$language.'.php';
}
$this->saveFile($fieldList, $fileName, $validate);
}
/**
* Checks for duplicate shop numbers in multiple configurations.
*
* This checks all files in the configuration folder and shop numbers in all
* configuration files.
*
* @param string $shopNumber The shop number to test or null to test all shop numbers found.
*
* @return bool true if there are duplicates, false otherwise.
*/
public function checkDuplicates() {
$shopNumbers = array();
$files = scandir($this->config_folder_path);
foreach ($files as $file) {
if (!is_file($this->config_folder_path.DS.$file)) {
continue;
}
$shopgate_config = null;
include($this->config_folder_path.DS.$file);
if (isset($shopgate_config) && isset($shopgate_config['shop_number'])) {
if (in_array($shopgate_config['shop_number'], $shopNumbers)) {
return true;
} else {
$shopNumbers[] = $shopgate_config['shop_number'];
}
}
}
return false;
}
/**
* Checks if there is more than one configuration file available.
*
* @return bool true if multiple configuration files are available, false otherwise.
*/
public function checkMultipleConfigs() {
$files = scandir($this->config_folder_path);
$counter = 0;
foreach ($files as $file) {
if (!is_file($this->config_folder_path.DS.$file)) {
continue;
}
if (substr($file, -4) !== '.php') {
continue;
}
ob_start();
include($this->config_folder_path.DS.$file);
ob_end_clean();
if (!isset($shopgate_config)) {
continue;
}
$counter++;
unset($shopgate_config);
}
return ($counter > 1);
}
/**
* Checks if the global a configuration file should be used for the language requested.
*
* @param string $language the ISO-639 code of the language
*
* @return bool true if global configuration should be used, false if the language has separate configuration
*/
public function checkUseGlobalFor($language) {
return !file_exists($this->config_folder_path.DS.'myconfig-'.$language.'.php');
}
$this->saveFile($fieldList, $this->config_folder_path.DS.'myconfig-'.$language.'.php', $validate);
/**
* Removes the configuration file for the language requested.
*
* @param string $language the ISO-639 code of the language or null to load global configuration
*
* @throws ShopgateLibraryException in case the file exists but cannot be deleted.
*/
public function useGlobalFor($language) {
$fileName = $this->config_folder_path.DS.'myconfig-'.$language.'.php';
if (file_exists($fileName)) {
if (!@unlink($fileName)) {
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_READ_WRITE_ERROR, 'Error deleting configuration file "'.$fileName."'.");
}
}
}
public final function validate(array $fieldList = array()) {
$properties = $this->buildProperties();
ca. Zeile 571
/**
* Validates the configuration values.
*
* @param string[] $fieldList The list of fields to be validated.
*
* @return string[] The list of fields that failed validation or an empty array if validation was successful.
*/
protected function validateCustom(array $fieldList = array()) {
return array();
ca. Zeile 589
public function getUseCustomErrorHandler() {
return $this->use_custom_error_handler;
}
// public function getSpaAuthServiceClassName() {
// return $this->spa_auth_service_class_name;
// }
public function getSmaAuthServiceClassName() {
return $this->sma_auth_service_class_name;
}
public function getOauthAccessToken() {
return $this->oauth_access_token;
}
public function getCustomerNumber() {
return $this->customer_number;
}
ca. Zeile 613
public function getServer() {
return $this->server;
}
public function getApiUrls() {
return $this->api_urls;
}
public function getApiUrl() {
switch ($this->getServer()) {
switch($this->server) {
default: // fall through to 'live'
case 'live': return ShopgateConfigInterface::SHOPGATE_API_URL_LIVE;
case 'pg': return ShopgateConfigInterface::SHOPGATE_API_URL_PG;
case 'custom': return $this->api_url;
case 'live':
case 'sl':
case 'pg':
return $this->api_urls[$this->server][$this->sma_auth_service_class_name];
case 'custom':
return $this->api_url;
}
}
public function getShopIsActive() {
ca. Zeile 634
public function getEnableRedirectKeywordUpdate() {
return $this->enable_redirect_keyword_update;
}
public function getEnableDefaultRedirect() {
return $this->enable_default_redirect;
}
public function getEncoding() {
return $this->encoding;
}
public function getExportConvertEncoding() {
return $this->export_convert_encoding;
}
public function getEnablePing() {
return $this->enable_ping;
public function getForceSourceEncoding() {
return $this->force_source_encoding;
}
public function getEnableAddOrder() {
return $this->enable_add_order;
public function getSupportedFieldsCheckCart() {
return $this->supported_fields_check_cart;
}
public function getSupportedFieldsGetSettings() {
return $this->supported_fields_get_settings;
}
public function getSupportedMethodsCron() {
return $this->supported_methods_cron;
}
public function getSupportedResponseTypes() {
return $this->supported_response_types;
}
public function getEnablePing() {
return $this->enable_ping;
}
public function getEnableAddOrder() {
return $this->enable_add_order;
}
public function getEnableUpdateOrder() {
return $this->enable_update_order;
}
public function getEnableCheckCart() {
return $this->enable_check_cart;
}
public function getEnableCheckStock() {
return $this->enable_check_stock;
}
public function getEnableRedeemCoupons() {
return $this->enable_redeem_coupons;
}
public function getEnableGetOrders() {
return $this->enable_get_orders;
}
public function getEnableGetCustomer() {
return $this->enable_get_customer;
}
public function getEnableRegisterCustomer() {
return $this->enable_register_customer;
}
public function getEnableGetDebugInfo() {
return $this->enable_get_debug_info;
}
public function getEnableGetItemsCsv() {
return $this->enable_get_items_csv;
}
public function getEnableGetItems() {
return $this->enable_get_items;
}
public function getEnableGetCategoriesCsv() {
return $this->enable_get_categories_csv;
}
public function getEnableGetCategories() {
return $this->enable_get_categories;
}
public function getEnableGetReviewsCsv() {
return $this->enable_get_reviews_csv;
}
public function getEnableGetPagesCsv() {
return $this->enable_get_pages_csv;
public function getEnableGetReviews() {
return $this->enable_get_reviews;
}
public function getEnableGetMediaCsv(){
return $this->enable_get_media_csv;
}
public function getEnableGetLogFile() {
return $this->enable_get_log_file;
ca. Zeile 698
public function getEnableClearCache() {
return $this->enable_clear_cache;
}
public function getEnableGetSettings() {
return $this->enable_get_settings;
}
public function getEnableSetSettings() {
return $this->enable_set_settings;
}
public function getEnableSyncFavouriteList() {
return $this->enable_sync_favourite_list;
}
public function getEnableReceiveAuthorization() {
return $this->enable_receive_authorization;
}
public function getCountry() {
return strtoupper($this->country);
}
ca. Zeile 742
public function getItemsCsvFilename() {
return $this->items_csv_filename;
}
public function getItemsXmlFilename() {
return $this->items_xml_filename;
}
public function getItemsJsonFilename() {
return $this->items_json_filename;
}
public function getMediaCsvFilename() {
return $this->media_csv_filename;
}
public function getCategoriesCsvFilename() {
return $this->categories_csv_filename;
}
public function getReviewsCsvFilename() {
return $this->reviews_csv_filename;
public function getCategoriesXmlFilename() {
return $this->categories_xml_filename;
}
public function getPagesCsvFilename() {
return $this->pages_csv_filename;
public function getCategoriesJsonFilename() {
return $this->categories_json_filename;
}
public function getReviewsCsvFilename() {
return $this->reviews_csv_filename;
}
public function getAccessLogFilename() {
return $this->access_log_filename;
ca. Zeile 782
public function getItemsCsvPath() {
return rtrim($this->export_folder_path.DS.$this->items_csv_filename, DS);
}
public function getItemsXmlPath() {
return rtrim($this->export_folder_path.DS.$this->items_xml_filename, DS);
}
public function getItemsJsonPath() {
return rtrim($this->export_folder_path.DS.$this->items_json_filename, DS);
}
public function getCategoriesXmlPath() {
return rtrim($this->export_folder_path.DS.$this->categories_xml_filename, DS);
}
public function getCategoriesJsonPath() {
return rtrim($this->export_folder_path.DS.$this->categories_json_filename, DS);
}
public function getMediaCsvPath() {
return rtrim($this->export_folder_path.DS.$this->media_csv_filename, DS);
}
public function getCategoriesCsvPath() {
return rtrim($this->export_folder_path.DS.$this->categories_csv_filename, DS);
}
public function getReviewsCsvPath() {
return rtrim($this->export_folder_path.DS.$this->reviews_csv_filename, DS);
}
public function getPagesCsvPath() {
return rtrim($this->export_folder_path.DS.$this->pages_csv_filename, DS);
public function getReviewsXmlPath() {
return rtrim($this->export_folder_path.DS.$this->reviews_xml_filename, DS);
}
public function getReviewsJsonPath() {
return rtrim($this->export_folder_path.DS.$this->reviews_json_filename, DS);
}
public function getAccessLogPath() {
return rtrim($this->log_folder_path.DS.$this->access_log_filename, DS);
ca. Zeile 818
public function getRedirectSkipKeywordCachePath() {
return rtrim($this->cache_folder_path.DS.$this->redirect_skip_keyword_cache_filename, DS);
}
public function getIsShopgateAdapter() {
return $this->is_shopgate_adapter;
}
public function getRedirectableGetParams() {
return $this->redirectable_get_params;
}
/**
* @return int
*/
public function getDefaultExecutionTime() {
return $this->default_execution_time;
}
/**
* @return int
*/
public function getDefaultMemoryLimit() {
return $this->default_memory_limit;
}
###############
### Setters ###
###############
ca. Zeile 830
public function setUseCustomErrorHandler($value) {
$this->use_custom_error_handler = $value;
}
// public function setSpaAuthServiceClassName($value) {
// $this->spa_auth_service_class_name = $value;
// }
public function setSmaAuthServiceClassName($value) {
$this->sma_auth_service_class_name = $value;
}
public function setOauthAccessToken($value) {
$this->oauth_access_token = $value;
}
public function setCustomerNumber($value) {
$this->customer_number = $value;
}
ca. Zeile 870
public function setEnableRedirectKeywordUpdate($value) {
$this->enable_redirect_keyword_update = $value;
}
public function setEnableDefaultRedirect($value) {
$this->enable_default_redirect = $value;
}
public function setEncoding($value) {
$this->encoding = $value;
}
public function setExportConvertEncoding($value) {
$this->export_convert_encoding = $value;
}
public function setForceSourceEncoding($value) {
$this->force_source_encoding = $value;
}
public function setSupportedFieldsCheckCart($value) {
$this->supported_fields_check_cart = $value;
}
public function setSupportedFieldsGetSettings($value) {
$this->supported_fields_get_settings = $value;
}
public function setSupportedMethodsCron($value) {
$this->supported_methods_cron = $value;
}
public function setSupportedResponseTypes($value) {
$this->supported_response_types = $value;
}
public function setEnablePing($value) {
$this->enable_ping = $value;
}
ca. Zeile 890
public function setEnableUpdateOrder($value) {
$this->enable_update_order = $value;
}
public function setEnableCheckCart($value) {
$this->enable_check_cart = $value;
}
public function setEnableCheckStock($value) {
$this->enable_check_stock = $value;
}
public function setEnableRedeemCoupons($value) {
$this->enable_redeem_coupons = $value;
}
public function setEnableGetOrders($value) {
$this->enable_get_orders = $value;
}
public function setEnableGetCustomer($value) {
$this->enable_get_customer = $value;
}
public function setEnableRegisterCustomer($value) {
$this->enable_register_customer = $value;
}
public function setEnableGetDebugInfo($value) {
$this->enable_get_debug_info = $value;
}
public function setEnableGetItemsCsv($value) {
$this->enable_get_items_csv = $value;
}
public function setEnableGetItems($value) {
$this->enable_get_items = $value;
}
public function setEnableGetCategoriesCsv($value) {
$this->enable_get_categories_csv = $value;
}
public function setEnableGetCategories($value) {
$this->enable_get_categories = $value;
}
public function setEnableGetReviewsCsv($value) {
$this->enable_get_reviews_csv = $value;
}
public function setEnableGetPagesCsv($value) {
$this->enable_get_pages_csv = $value;
public function setEnableGetReviews($value) {
$this->enable_get_reviews = $value;
}
public function setEnableGetMediaCsv($value){
$this->enable_get_media_csv = $value;
}
public function setEnableGetLogFile($value) {
$this->enable_get_log_file = $value;
ca. Zeile 934
public function setEnableClearCache($value) {
$this->enable_clear_cache = $value;
}
public function setEnableGetSettings($value) {
$this->enable_get_settings = $value;
}
public function setEnableSetSettings($value) {
$this->enable_set_settings = $value;
}
public function setEnableSyncFavouriteList($value) {
$this->enable_sync_favourite_list = $value;
}
public function setEnableReceiveAuthorization($value) {
$this->enable_receive_authorization = $value;
}
public function setCountry($value) {
$this->country = strtoupper($value);
}
ca. Zeile 978
public function setItemsCsvFilename($value) {
$this->items_csv_filename = $value;
}
public function setItemsXmlFilename($value) {
$this->items_xml_filename = $value;
}
public function setItemsJsonFilename($value) {
$this->items_json_filename = $value;
}
public function setMediaCsvFilename($value) {
$this->media_csv_filename = $value;
}
public function setCategoriesCsvFilename($value) {
$this->categories_csv_filename = $value;
}
public function setCategoriesXmlFilename($value) {
$this->categories_xml_filename = $value;
}
public function setCategoriesJsonFilename($value) {
$this->categories_json_filename = $value;
}
public function setReviewsCsvFilename($value) {
$this->reviews_csv_filename = $value;
}
public function setPagesCsvFilename($value) {
$this->pages_csv_filename = $value;
public function setReviewsXmlFilename($value) {
$this->reviews_xml_filename = $value;
}
public function setReviewsJsonFilename($value) {
$this->reviews_json_filename = $value;
}
public function setAccessLogFilename($value) {
$this->access_log_filename = $value;
ca. Zeile 1024
$this->items_csv_filename = $file;
}
}
public function setItemsXmlPath($value) {
$dir = dirname($value);
$file = basename($value);
if (!empty($dir) && !empty($file)) {
$this->export_folder_path = $dir;
$this->items_xml_filename = $file;
}
}
public function setItemsJsonPath($value) {
$dir = dirname($value);
$file = basename($value);
if (!empty($dir) && !empty($file)) {
$this->export_folder_path = $dir;
$this->items_json_filename = $file;
}
}
public function setMediaCsvPath($value) {
$dir = dirname($value);
$file = basename($value);
if (!empty($dir) && !empty($file)) {
$this->export_folder_path = $dir;
$this->media_csv_filename = $file;
}
}
public function setCategoriesCsvPath($value) {
$dir = dirname($value);
$file = basename($value);
ca. Zeile 1034
$this->categories_csv_filename = $file;
}
}
public function setCategoriesXmlPath($value) {
$dir = dirname($value);
$file = basename($value);
if (!empty($dir) && !empty($file)) {
$this->export_folder_path = $dir;
$this->categories_xml_filename = $file;
}
}
public function setCategoriesJsonPath($value) {
$dir = dirname($value);
$file = basename($value);
if (!empty($dir) && !empty($file)) {
$this->export_folder_path = $dir;
$this->categories_json_filename = $file;
}
}
public function setReviewsCsvPath($value) {
$dir = dirname($value);
$file = basename($value);
ca. Zeile 1044
$this->reviews_csv_filename = $file;
}
}
public function setPagesCsvPath($value) {
public function setReviewsXmlPath($value) {
$dir = dirname($value);
$file = basename($value);
if (!empty($dir) && !empty($file)) {
$this->export_folder_path = $dir;
$this->pages_csv_filename = $file;
$this->reviews_xml_filename = $file;
}
}
public function setReviewsJsonPath($value) {
$dir = dirname($value);
$file = basename($value);
if (!empty($dir) && !empty($file)) {
$this->export_folder_path = $dir;
$this->reviews_json_filename = $file;
}
}
public function setAccessLogPath($value) {
ca. Zeile 1114
$this->redirect_skip_keyword_cache_filename = $file;
}
}
public function setIsShopgateAdapter($value) {
$this->is_shopgate_adapter = $value;
}
public function setRedirectableGetParams($value) {
return $this->redirectable_get_params = $value;
}
/**
* @param int $default_execution_time
*/
public function setDefaultExecutionTime($default_execution_time) {
$this->default_execution_time = $default_execution_time;
}
/**
* @param int $default_memory_limit
*/
public function setDefaultMemoryLimit($default_memory_limit) {
$this->default_memory_limit = $default_memory_limit;
}
###############
### Helpers ###
###############
ca. Zeile 1135
$properties = parent::buildProperties();
// append the file paths
$properties['items_csv_path'] = $this->getItemsCsvPath();
$properties['items_xml_path'] = $this->getItemsXmlPath();
$properties['items_json_path'] = $this->getItemsJsonPath();
$properties['media_csv_path'] = $this->getMediaCsvPath();
$properties['categories_csv_path'] = $this->getCategoriesCsvPath();
$properties['categories_xml_path'] = $this->getCategoriesXmlPath();
$properties['categories_json_path'] = $this->getCategoriesJsonPath();
$properties['reviews_csv_path'] = $this->getReviewsCsvPath();
$properties['pages_csv_path'] = $this->getPagesCsvPath();
$properties['reviews_xml_path'] = $this->getReviewsXmlPath();
$properties['reviews_json_path'] = $this->getReviewsJsonPath();
$properties['access_log_path'] = $this->getAccessLogPath();
$properties['request_log_path'] = $this->getRequestLogPath();
$properties['error_log_path'] = $this->getErrorLogPath();
ca. Zeile 1154
/**
* Tries to include the specified file and check for $shopgate_config.
*
* @param string $path The path to the configuration file.
*
* @return mixed[]|bool The $shopgate_config array if the file was included and defined $shopgate_config, false otherwise.
*/
private function includeFile($path) {
$shopgate_config = null;
ca. Zeile 1163
// try including the file
if (file_exists($path)) {
ob_start();
include($path);
ob_clean();
ob_end_clean();
} else {
return false;
}
ca. Zeile 1197
*
* This is for compatibility reasons only. The use of ShopgateConfigOld is deprecated!
*
* @deprecated
*
* @param string $name Method name.
* @param mixed[] $arguments Arguments to call the method with.
*
* @return mixed The return value of the called method.
* @throws ShopgateLibraryException whenever a ShopgateLibraryException is thrown by ShopgateConfigOld.
*/
public static function __callStatic($name, $arguments) {
return call_user_func_array(array('ShopgateConfigOld', $name), $arguments);
return call_user_func_array(array(
'ShopgateConfigOld',
$name), $arguments);
}
/**
* This is for compatibility reasons only. The use of ShopgateConfigOld is deprecated!
ca. Zeile 1213
* @deprecated
* @throws ShopgateLibraryException whenever a ShopgateLibraryException is thrown by ShopgateConfigOld's method.
*/
public static function setConfig(array $newConfig, $validate = true) {
return ShopgateConfigOld::setConfig($newConfig, $validate);
ShopgateConfigOld::setConfig($newConfig, $validate);
}
/**
* This is for compatibility reasons only. The use of ShopgateConfigOld is deprecated!
ca. Zeile 1253
* @deprecated
* @throws ShopgateLibraryException whenever a ShopgateLibraryException is thrown by ShopgateConfigOld's method.
*/
public static function getLogFilePath($type = ShopgateLogger::LOGTYPE_ERROR) {
return ShopgateConfigOld::getLogFilePath($type = ShopgateLogger::LOGTYPE_ERROR);
return ShopgateConfigOld::getLogFilePath($type);
}
/**
* This is for compatibility reasons only. The use of ShopgateConfigOld is deprecated!
ca. Zeile 1323
* @deprecated
* @throws ShopgateLibraryException whenever a ShopgateLibraryException is thrown by ShopgateConfigOld's method.
*/
public static function saveConfig() {
return ShopgateConfigOld::saveConfig();
ShopgateConfigOld::saveConfig();
}
}
/**
ca. Zeile 1393
'enable_mobile_website' => true,
'generate_items_csv_on_the_fly' => true,
'max_attributes' => 50,
'use_custom_error_handler' => false,
'encoding' => 'UTF-8',
);
'encoding' => 'UTF-8',);
/**
* Übergeben und überprüfen der Einstellungen.
*
* @deprecated
*
* @param array $newConfig
* @param bool $validate
* @throws ShopgateLibraryException
*/
public static final function setConfig(array $newConfig, $validate = true) {
self::deprecated(__METHOD__);
ca. Zeile 1421
self::deprecated(__METHOD__);
try {
self::validateConfig(self::$config);
} catch (ShopgateLibraryException $e) { throw $e; }
} catch (ShopgateLibraryException $e) {
throw $e;
}
return self::getConfig();
}
ca. Zeile 1442
public static function getConfigField($field) {
self::deprecated(__METHOD__);
if(isset(self::$config[$field])) return self::$config[$field];
else return null;
if (isset(self::$config[$field])) {
return self::$config[$field];
} else {
return null;
}
}
public static final function getPluginName() {
self::deprecated(__METHOD__);
ca. Zeile 1462
public static final function getLogFilePath($type = ShopgateLogger::LOGTYPE_ERROR) {
self::deprecated(__METHOD__);
switch (strtolower($type)) {
default: $type = 'error';
case "access": case "request": case "request": case "debug":
default:
$type = 'error';
case "access":
case "request":
case "debug":
}
if(isset(self::$config['path_to_'.strtolower($type).'_log_file'])) {
return self::$config['path_to_'.strtolower($type).'_log_file'];
ca. Zeile 1535
}
}
/**
* @return the absolute Path for the Redirect-Keywords-Caching-File
* @return string the absolute Path for the Redirect-Keywords-Caching-File
* @deprecated
*/
public static final function getRedirectKeywordsFilePath() {
self::deprecated(__METHOD__);
ca. Zeile 1549
}
}
/**
* @return the absolute Path for the Skip-Redirect-Keywords-Caching-File
* @return string the absolute Path for the Skip-Redirect-Keywords-Caching-File
* @deprecated
*/
public static final function getSkipRedirectKeywordsFilePath() {
self::deprecated(__METHOD__);
ca. Zeile 1566
/**
* Prüft, ob alle Pflichtfelder gesetzt sind und setzt die api_url.
*
* @deprecated
*
* @param array $newConfig
*
* @throws ShopgateLibraryException
*/
private static function validateConfig(array $newConfig) {
self::deprecated(__METHOD__);
//Pflichtfelder überprüfen
if (!preg_match("/^\S+/", $newConfig['apikey'])) {
throw new ShopgateLibraryException(
ShopgateLibraryException::CONFIG_INVALID_VALUE,
"Field 'apikey' contains invalid value '{$newConfig['apikey']}'."
);
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_INVALID_VALUE, "Field 'apikey' contains invalid value '{$newConfig['apikey']}'.");
}
if(!preg_match("/^\d{5,}$/", $newConfig['customer_number'])){
throw new ShopgateLibraryException(
ShopgateLibraryException::CONFIG_INVALID_VALUE,
"Field 'customer_number' contains invalid value '{$newConfig['customer_number']}'."
);
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_INVALID_VALUE, "Field 'customer_number' contains invalid value '{$newConfig['customer_number']}'.");
}
if (!preg_match("/^\d{5,}$/", $newConfig['shop_number'])) {
throw new ShopgateLibraryException(
ShopgateLibraryException::CONFIG_INVALID_VALUE,
"Field 'shop_number' contains invalid value '{$newConfig['shop_number']}'."
);
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_INVALID_VALUE, "Field 'shop_number' contains invalid value '{$newConfig['shop_number']}'.");
}
////////////////////////////////////////////////////////////////////////
// Server URL setzen
////////////////////////////////////////////////////////////////////////
if(!empty($newConfig["server"]) && $newConfig["server"] === "pg") {
// Playground?
self::$config["api_url"] = "https://api.shopgatepg.com/merchant/";
} else if(!empty($newConfig["server"]) && $newConfig["server"] === "custom"
&& !empty($newConfig["server_custom_url"])) {
} else {
if (!empty($newConfig["server"]) && $newConfig["server"] === "custom" && !empty($newConfig["server_custom_url"])
) {
// Eigener Test-Server?
self::$config["api_url"] = $newConfig["server_custom_url"];
} else {
// Live-Server?
self::$config["api_url"] = "https://api.shopgate.com/merchant/";
}
}
}
/**
* @deprecated
* @throws ShopgateLibraryException
ca. Zeile 1621
$returnString = "<?php"."\r\n";
$returnString .= "\$shopgate_config = array();\r\n";
foreach($config as $key => $field)
{
if($key != 'save')
{
foreach ($config as $key => $field) {
if ($key != 'save') {
if(is_bool($field) || $field === "true" || $field === "false") {
if($field === "true") $field = true;
if($field === "false") $field = false;
if ($field === "true") {
$field = true;
}
if ($field === "false") {
$field = false;
}
$returnString .= '$shopgate_config["'.$key.'"] = '.($field?'true':'false').';'."\r\n";
}
else if(is_numeric($field)) {
} else {
if (is_numeric($field)) {
$returnString .= '$shopgate_config["'.$key.'"] = '.$field.';'."\r\n";
}
else {
} else {
$returnString .= '$shopgate_config["'.$key.'"] = "'.$field.'";'."\r\n";
}
}
}
}
$message = "";
$handle = @fopen(dirname(__FILE__).'/../config/myconfig.php', 'w+');
if($handle == false){
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_READ_WRITE_ERROR);
fclose($handle);
}else{
if(!fwrite($handle, $returnString))
if (!fwrite($handle, $returnString)) {
throw new ShopgateLibraryException(ShopgateLibraryException::CONFIG_READ_WRITE_ERROR);
}
}
fclose($handle);
}
ca. Zeile 1668
/**
* Manages configuration for library _and_ plugin options.
*
* This class is used to save general library settings and specific settings for your plugin.
*
* To add your own specific settings
* Classes implementing this class are used to save general library settings and specific settings for your plugin.
*
* @author Shopgate GmbH, 35510 Butzbach, DE
*/
interface ShopgateConfigInterface {
const SHOPGATE_API_URL_LIVE = 'https://api.shopgate.com/merchant/';
const SHOPGATE_API_URL_LIVE_OAUTH = 'https://api.shopgate.com/merchant2/';
const SHOPGATE_API_URL_SL = 'https://api.shopgatesl.com/merchant/';
const SHOPGATE_API_URL_SL_OAUTH = 'https://api.shopgatesl.com/merchant2/';
const SHOPGATE_API_URL_PG = 'https://api.shopgatepg.com/merchant/';
const SHOPGATE_API_URL_PG_OAUTH = 'https://api.shopgatepg.com/merchant2/';
const SHOPGATE_AUTH_SERVICE_CLASS_NAME_SHOPGATE = 'ShopgateAuthenticationServiceShopgate';
const SHOPGATE_AUTH_SERVICE_CLASS_NAME_OAUTH = 'ShopgateAuthenticationServiceOAuth';
const SHOPGATE_FILE_PREFIX = 'shopgate_';
const DEFAULT_MEMORY_LIMIT = -1;
const DEFAULT_EXECUTION_TIME = 0;
/**
* Tries to load the configuration from a file.
* Loads an array of key-value pairs or a permanent storage.
*
* If a $path is passed, this method tries to include the file. If that fails an exception is thrown.<br />
* <br />
* If $path is empty it tries to load .../shopgate_library/config/myconfig.php or if that fails,
* .../shopgate_library/config/config.php is tried to be loaded. If that fails too, an exception is
* thrown.<br />
* <br />
* The configuration file must be a PHP script defining an indexed array called $shopgate_config
* containing the desired configuration values to set. If that is not the case, an exception is thrown
* @param array $settings key-value pairs of settings or null to load from a permanent storage
*
* @param string $path The path to the configuration file or nothing to load the default Shopgate Library configuration files.
* @throws ShopgateLibraryException in case a configuration file could not be loaded or the $shopgate_config is not set.
* @throws ShopgateLibraryException with code ShopgateLibraryException::CONFIG_READ_WRITE_ERROR
* @throws ShopgateLibraryException with code ShopgateLibraryException::
* @post if $settings was passed: all applicable keys and values from $settings are loaded into the configuration and can be retrieved via getter methods
* if $settings was null: all applicable keys and values from a permanent storage are loaded into the configuration and can be retrieved via getter methods
*/
public function loadFile($path = null);
public function load(array $settings = null);
/**
* Saves the desired configuration fields to the specified file or myconfig.php.
*
* This calls $this->loadFile() with the given $path to load the current configuration. In case that fails, the $shopgate_config
* array is initialized empty. The values defined in $fieldList are then validated (if desired), assigned to $shopgate_config and
* saved to the specified file or myconfig.php.
*
* In case the file cannot be (over)written or created, an exception with code ShopgateLibrary::CONFIG_READ_WRITE_ERROR is thrown.
* Saves the desired fields to a permanent storage.
*
* In case the validation fails for one or more fields, an exception with code ShopgateLibrary::CONFIG_ is thrown. The failed
* fields are appended as additional information in form of a comma-separated list.
* @param array $fieldList the list of fields to save
* @param bool $validate true to validate the values to be saved
*
* @param string[] $fieldList The list of fieldnames that should be saved to the configuration file.
* @param string $path The path to the configuration file or empty to use .../shopgate_library/config/myconfig.php.
* @param bool $validate True to validate the fields that should be set.
* @throws ShopgateLibraryException in case the configuration can't be loaded or saved.
* @throws ShopgateLibraryException with code ShopgateLibraryException::CONFIG_READ_WRITE_ERROR
* @throws ShopgateLibraryException with code ShopgateLibraryException::CONFIG_INVALID_VALUE
* @post the configuration is saved into a permanent storage
*/
public function saveFile(array $fieldList, $path = null, $validate = true);
public function save(array $fieldList, $validate = true);
/**
* Validates the configuration values.
*
ca. Zeile 1739
* @return bool true to activate the Shopgate error handler.
*/
public function getUseCustomErrorHandler();
// /**
// * @return string $value Class name for the PluginAPI auth service
// */
// public function getSpaAuthServiceClassName();
/**
* @return string $value Class name for the MerchantAPI auth service
*/
public function getSmaAuthServiceClassName();
/**
* @return string OAuth access token
*/
public function getOauthAccessToken();
/**
* @return int Shopgate customer number (at least 5 digits)
*/
public function getCustomerNumber();
ca. Zeile 1770
*/
public function getServer();
/**
* @return array => returns all possible fixed api urls
*/
public function getApiUrls();
/**
* @return string If getServer() returns "live", ShopgateConfigInterface::SHOPGATE_API_URL_LIVE is returned.<br />
* If getServer() returns "pg", ShopgateConfigInterface::SHOPGATE_API_URL_PG is returned.<br />
* If getServer() returns "custom": A custom API url (empty or a string beginning with "http://" or "https://" followed by any number of non-whitespace characters) is returned.<br />
* If getServer() returns a different value than the above, ShopgateConfigInterface::SHOPGATE_API_URL_LIVE is returned.
ca. Zeile 1788
*/
public function getAlwaysUseSsl();
/**
* @return int (hours) The update period for keywords that identify mobile devices. Leave empty to download once and then always use the cached keywords
* @return bool true to enable updates of keywords that identify mobile devices
*/
public function getEnableRedirectKeywordUpdate();
/**
* @return bool true to enable default redirect for mobile devices from content sites to mobile website (welcome page)
*/
public function getEnableDefaultRedirect();
/**
* @return string The encoding the shop system is using internally.
*/
public function getEncoding();
ca. Zeile 1803
*/
public function getExportConvertEncoding();
/**
* @return bool if true forces the $encoding to be the only one source encoding for all encoding operations
*/
public function getForceSourceEncoding();
/**
* @return array<string, string[]> the list of response types supported by the plugin, indexed by exports
*/
public function getSupportedResponseTypes();
/**
* @return array the list of fields supported by the plugin method check_cart
*/
public function getSupportedFieldsCheckCart();
/**
* @return array the list of fields supported by the plugin method get_settings
*/
public function getSupportedFieldsGetSettings();
/**
* @return string[] the list of methods supported by the cron action
*/
public function getSupportedMethodsCron();
/**
* @return bool
*/
public function getEnablePing();
ca. Zeile 1820
/**
* @return bool
*/
public function getEnableCheckCart();
/**
* @return bool
*/
public function getEnableCheckStock();
/**
* @return bool
*/
public function getEnableRedeemCoupons();
/**
* @return bool
*/
public function getEnableGetOrders();
/**
* @return bool
ca. Zeile 1830
/**
* @return bool
*/
public function getEnableRegisterCustomer();
/**
* @return bool
*/
public function getEnableGetDebugInfo();
/**
* @return bool
*/
public function getEnableGetItemsCsv();
/**
* @return bool
*/
public function getEnableGetItems();
/**
* @return bool
*/
public function getEnableGetCategoriesCsv();
/**
* @return bool
*/
public function getEnableGetCategories();
/**
* @return bool
*/
public function getEnableGetReviewsCsv();
/**
* @return bool
*/
public function getEnableGetPagesCsv();
public function getEnableGetReviews();
/**
* @return bool
*/
public function getEnableGetMediaCsv();
/**
* @return bool
*/
ca. Zeile 1865
/**
* @return bool
*/
public function getEnableClearLogfile();
public function getEnableClearLogFile();
/**
* @return bool
*/
public function getEnableClearCache();
/**
* @return bool
*/
public function getEnableGetSettings();
/**
* @return bool
*/
public function getEnableSetSettings();
/**
* @return bool
*/
public function getEnableSyncFavouriteList();
/**
* @return bool
*/
public function getEnableReceiveAuthorization();
/**
* @return string The ISO 3166 ALPHA-2 code of the country the plugin uses for export.
*/
public function getCountry();
/**
* @return string The ISO 3166 ALPHA-2 code of the language the plugin uses for export.
*/
ca. Zeile 1918
*/
public function getItemsCsvFilename();
/**
* @return string The name of the items XML file.
*/
public function getItemsXmlFilename();
/**
* @return string The name of the items JSON file.
*/
public function getItemsJsonFilename();
/**
* @return string The name of the items CSV file.
*/
public function getMediaCsvFilename();
/**
* @return string The name of the categories CSV file.
*/
public function getCategoriesCsvFilename();
/**
* @return string The name of the reviews CSV file.
* @return string The name of the categories XML file.
*/
public function getReviewsCsvFilename();
public function getCategoriesXmlFilename();
/**
* @return string The name of the pages CSV file.
* @return string The name of the categories JSON file.
*/
public function getPagesCsvFilename();
public function getCategoriesJsonFilename();
/**
* @return string The name of the reviews CSV file.
*/
public function getReviewsCsvFilename();
/**
* @return string The name of the access log file.
*/
ca. Zeile 1968
*/
public function getItemsCsvPath();
/**
* @return string The path to where the items XML file is stored and retrieved from.
*/
public function getItemsXmlPath();
/**
* @return string The path to where the items JSON file is stored and retrieved from.
*/
public function getItemsJsonPath();
/**
* @return string The path to where the categories CSV file is stored and retrieved from.
*/
public function getCategoriesCsvPath();
/**
* @return string The path to where the categories XML file is stored and retrieved from.
*/
public function getCategoriesXmlPath();
/**
* @return string The path to where the categories JSON file is stored and retrieved from.
*/
public function getCategoriesJsonPath();
/**
* @return string The path to where the reviews CSV file is stored and retrieved from.
*/
public function getReviewsCsvPath();
/**
* @return string The path to where the pages CSV file is stored and retrieved from.
* @return string The path to where the reviews XML file is stored and retrieved from.
*/
public function getReviewsXmlPath();
/**
* @return string The path to where the reviews JSON file is stored and retrieved from.
*/
public function getPagesCsvPath();
public function getReviewsJsonPath();
/**
* @return string The path to where the media CSV file is stored and retrieved from.
*/
public function getMediaCsvPath();
/**
* @return string The path to the access log file.
*/
ca. Zeile 2013
*/
public function getRedirectSkipKeywordCachePath();
/**
* @return bool True if the plugin is an adapter between Shopgate's and a third-party-API and servers multiple shops on both ends.
*/
public function getIsShopgateAdapter();
/**
* @return int maximum execution time in seconds
*/
public function getDefaultExecutionTime();
/**
* @return int default memory limit in MB
*/
public function getDefaultMemoryLimit();
/**
* @param string $value The name of the plugin / shop system the plugin is for.
*/
public function setPluginName($value);
ca. Zeile 2022
* @param bool $value true to activate the Shopgate error handler.
*/
public function setUseCustomErrorHandler($value);
// /**
// * @param string $value Class name for the PluginAPI authentication service
// */
// public function setSpaAuthServiceClassName($value);
/**
* @param string $value Class name for the MerchantAPI authentication service
*/
public function setSmaAuthServiceClassName($value);
/**
* @param string $value OAuth access token
*/
public function setOauthAccessToken($value);
/**
* @param int $value Shopgate customer number (at least 5 digits)
*/
public function setCustomerNumber($value);
ca. Zeile 2068
*/
public function setAlwaysUseSsl($value);
/**
* @param bool $value (hours) The update period for keywords that identify mobile devices. Leave empty to download once and then always use the cached keywords
* @param bool $value true to enable updates of keywords that identify mobile devices
*/
public function setEnableRedirectKeywordUpdate($value);
/**
* @param bool true to enable default redirect for mobile devices from content sites to mobile website (welcome page)
*/
public function setEnableDefaultRedirect($value);
/**
* @param string $value The encoding the shop system is using internally.
*/
public function setEncoding($value);
ca. Zeile 2083
*/
public function setExportConvertEncoding($value);
/**
* @param bool $value if true forces the $encoding to be the only one source encoding for all encoding operations
*/
public function setForceSourceEncoding($value);
/**
* @param array $value the list of fields supported by the plugin method check_cart
*/
public function setSupportedFieldsCheckCart($value);
/**
* @param array $value the list of fields supported by the plugin method get_settings
*/
public function setSupportedFieldsGetSettings($value);
/**
* @param string[] $value the list of methods supported by the cron action
*/
public function setSupportedMethodsCron($value);
/**
* @param array<string, string[]> $value the list of response types supported by the plugin, indexed by exports
*/
public function setSupportedResponseTypes($value);
/**
* @param bool $value
*/
public function setEnablePing($value);
ca. Zeile 2100
/**
* @param bool $value
*/
public function setEnableCheckCart($value);
/**
* @param bool $value
*/
public function setEnableCheckStock($value);
/**
* @param bool $value
*/
public function setEnableRedeemCoupons($value);
/**
* @param bool $value
*/
public function setEnableGetOrders($value);
/**
* @param bool $value
ca. Zeile 2110
/**
* @param bool $value
*/
public function setEnableRegisterCustomer($value);
/**
* @param bool $value
*/
public function setEnableGetDebugInfo($value);
/**
* @param bool $value
*/
public function setEnableGetItemsCsv($value);
/**
* @param bool $value
*/
public function setEnableGetItems($value);
/**
* @param bool $value
*/
public function setEnableGetCategoriesCsv($value);
/**
* @param bool $value
*/
public function setEnableGetCategories($value);
/**
* @param bool $value
*/
public function setEnableGetReviewsCsv($value);
/**
* @param bool $value
*/
public function setEnableGetPagesCsv($value);
public function setEnableGetReviews($value);
/**
* @param bool $value
*/
public function setEnableGetMediaCsv($value);
/**
* @param bool $value
*/
ca. Zeile 2145
/**
* @param bool $value
*/
public function setEnableClearLogfile($value);
public function setEnableClearLogFile($value);
/**
* @param bool $value
*/
public function setEnableClearCache($value);
/**
* @param bool $value
*/
public function setEnableGetSettings($value);
/**
* @param bool $value
*/
public function setEnableSetSettings($value);
/**
* @param bool $value
*/
public function setEnableSyncFavouriteList($value);
/**
* @param bool $value
*/
public function setEnableReceiveAuthorization($value);
/**
* @param string $value The ISO 3166 ALPHA-2 code of the country the plugin uses for export.
*/
public function setCountry($value);
/**
* @param string $value The ISO 3166 ALPHA-2 code of the language the plugin uses for export.
*/
ca. Zeile 2163
*/
public function setMobileHeaderParent($value);
/**
* @return bool $value True to insert the Mobile Header as first child element, false to append it.
* @param bool $value True to insert the Mobile Header as first child element, false to append it.
*/
public function setMobileHeaderPrepend($value);
/**
ca. Zeile 2198
*/
public function setItemsCsvFilename($value);
/**
* @param string $value The name of the items XML file.
*/
public function setItemsXmlFilename($value);
/**
* @param string $value The name of the items JSON file.
*/
public function setItemsJsonFilename($value);
/**
* @param string $value The name of the items CSV file.
*/
public function setMediaCsvFilename($value);
/**
* @param string $value The name of the categories CSV file.
*/
public function setCategoriesCsvFilename($value);
/**
* @param string $value The name of the categories XML file.
*/
public function setCategoriesXmlFilename($value);
/**
* @param string $value The name of the categories JSON file.
*/
public function setCategoriesJsonFilename($value);
/**
* @param string $value The name of the reviews CSV file.
*/
public function setReviewsCsvFilename($value);
/**
* @param string $value The name of the pages CSV file.
* @param string $value The name of the reviews XML file.
*/
public function setPagesCsvFilename($value);
public function setReviewsXmlFilename($value);
/**
* @param string $value The name of the reviews JSON file.
*/
public function setReviewsJsonFilename($value);
/**
* @param string $value The name of the access log file.
*/
ca. Zeile 2248
*/
public function setItemsCsvPath($value);
/**
* @param string $value The path to where the items XML file is stored and retrieved from.
*/
public function setItemsXmlPath($value);
/**
* @param string $value The path to where the items JSON file is stored and retrieved from.
*/
public function setItemsJsonPath($value);
/**
* @param string $value The path to where the media CSV file is stored and retrieved from.
*/
public function setMediaCsvPath($value);
/**
* @param string $value The path to where the categories CSV file is stored and retrieved from.
*/
public function setCategoriesCsvPath($value);
/**
* @param string $value The path to where the categories XML file is stored and retrieved from.
*/
public function setCategoriesXmlPath($value);
/**
* @param string $value The path to where the categories JSON file is stored and retrieved from.
*/
public function setCategoriesJsonPath($value);
/**
* @param string $value The path to where the reviews CSV file is stored and retrieved from.
*/
public function setReviewsCsvPath($value);
/**
* @param string $value The path to where the pages CSV file is stored and retrieved from.
* @param string $value The path to where the reviews XML file is stored and retrieved from.
*/
public function setReviewsXmlPath($value);
/**
* @param string $value The path to where the reviews JSON file is stored and retrieved from.
*/
public function setPagesCsvPath($value);
public function setReviewsJsonPath($value);
/**
* @param string $value The path to the access log file.
*/
ca. Zeile 2293
*/
public function setRedirectSkipKeywordCachePath($value);
/**
* @param bool $value True if the plugin is an adapter between Shopgate's and a third-party-API and servers multiple shops on both ends.
*/
public function setIsShopgateAdapter($value);
/**
* @param $default_execution_time int set value for maximum execution time in seconds
*/
public function setDefaultExecutionTime($default_execution_time);
/**
* @param $default_memory_limit int set value for default memory limit in MB
*/
public function setDefaultMemoryLimit($default_memory_limit);
/**
* Returns an additional setting.
*
* @param string $setting The name of the setting.
*/
includes/external/shopgate/shopgate_library/classes/core.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
###################################################################################
# define constants
###################################################################################
define('SHOPGATE_LIBRARY_VERSION', '2.1.23');
define('SHOPGATE_LIBRARY_VERSION', '2.9.36');
define('SHOPGATE_LIBRARY_ENCODING' , 'UTF-8');
define('SHOPGATE_BASE_DIR', realpath(dirname(__FILE__).'/../'));
define('SHOPGATE_ITUNES_URL', 'http://itunes.apple.com/de/app/shopgate-eine-app-alle-shops/id365287459?mt=8');
## QR-Code Config - Start
if (!defined('QR_CACHEABLE')) define('QR_CACHEABLE', false);
if (!defined('QR_CACHE_DIR')) define('QR_CACHE_DIR', false);
if (!defined('QR_LOG_DIR')) define('QR_LOG_DIR', dirname(__FILE__).'/../temp/');
if (!defined('QR_FIND_BEST_MASK')) define('QR_FIND_BEST_MASK', true);
if (!defined('QR_FIND_FROM_RANDOM')) define('QR_FIND_FROM_RANDOM', 2);
if (!defined('QR_DEFAULT_MASK')) define('QR_DEFAULT_MASK', 2);
if (!defined('QR_PNG_MAXIMUM_SIZE')) define('QR_PNG_MAXIMUM_SIZE', 1024);
## QR-Code Config - End
function shopgateGetErrorType($type) {
switch($type) {
case E_ERROR: // 1 //
return 'E_ERROR';
case E_WARNING: // 2 //
return 'E_WARNING';
case E_PARSE: // 4 //
return 'E_PARSE';
case E_NOTICE: // 8 //
return 'E_NOTICE';
case E_CORE_ERROR: // 16 //
return 'E_CORE_ERROR';
case E_CORE_WARNING: // 32 //
return 'E_CORE_WARNING';
case E_COMPILE_ERROR: // 64 //
return 'E_COMPILE_ERROR';
case E_COMPILE_WARNING: // 128 //
return 'E_COMPILE_WARNING';
case E_USER_ERROR: // 256 //
return 'E_USER_ERROR';
case E_USER_WARNING: // 512 //
return 'E_USER_WARNING';
case E_USER_NOTICE: // 1024 //
return 'E_USER_NOTICE';
case E_STRICT: // 2048 //
return 'E_STRICT';
case E_RECOVERABLE_ERROR: // 4096 //
return 'E_RECOVERABLE_ERROR';
case E_DEPRECATED: // 8192 //
return 'E_DEPRECATED';
case E_USER_DEPRECATED: // 16384 //
return 'E_USER_DEPRECATED';
}
return "UNKWOWN_ERROR_CODE";
}
/**
* register shutdown handler
* @see http://de1.php.net/manual/en/function.register-shutdown-function.php
*/
function ShopgateShutdownHandler() {
if (function_exists("error_get_last")) {
if (!is_null($e = error_get_last())) {
$type = shopgateGetErrorType($e['type']);
ShopgateLogger::getInstance()->log("{$e['message']} \n {$e['file']} : [{$e['line']}] , Type: {$type}", ShopgateLogger::LOGTYPE_ERROR);
}
}
}
/**
* Error handler for PHP errors.
*
ca. Zeile 26
* @param int $errno
* @param string $errstr
* @param string $errfile
* @param int $errline
* @param array $errContext
* @return boolean
* @see http://php.net/manual/en/function.set-error-handler.php
*/
function ShopgateErrorHandler($errno, $errstr, $errfile, $errline) {
// make no difference between exceptions and E_WARNING
$msg = "Fatal PHP Error [Nr. $errno : $errfile / $errline] ";
function ShopgateErrorHandler($errno, $errstr, $errfile, $errline, $errContext) {
switch ($errno) {
case E_NOTICE:
case E_USER_NOTICE:
$severity = "Notice";
break;
case E_WARNING:
case E_USER_WARNING:
$severity = "Warning";
break;
case E_ERROR:
case E_USER_ERROR:
$severity = "Fatal Error";
break;
default:
$severity = "Unknown Error";
break;
}
$msg = "$severity [Nr. $errno : $errfile / $errline] ";
$msg .= "$errstr";
$msg .= "\n". print_r(debug_backtrace(false), true);
$msg .= (isset($errContext["printStackTrace"]) && $errContext["printStackTrace"]) ? "\n". print_r(debug_backtrace(false), true) : "";
ShopgateLogger::getInstance()->log($msg);
return true;
ca. Zeile 62
// Configuration failure
const CONFIG_INVALID_VALUE = 10;
const CONFIG_READ_WRITE_ERROR = 11;
const CONFIG_PLUGIN_NOT_ACTIVE = 12;
// Plugin API errors
const PLUGIN_API_NO_ACTION = 20;
const PLUGIN_API_UNKNOWN_ACTION = 21;
ca. Zeile 71
const PLUGIN_API_WRONG_RESPONSE_FORMAT = 23;
const PLUGIN_API_UNKNOWN_SHOP_NUMBER = 24;
const PLUGIN_API_INVALID_ACTION = 25;
const PLUGIN_API_ADMIN_LOGIN_REQUIRED = 26;
const PLUGIN_API_NO_ORDER_NUMBER = 30;
const PLUGIN_API_NO_CART = 31;
const PLUGIN_API_NO_AUTHORIZATION_CODE = 33;
const PLUGIN_API_NO_USER = 35;
const PLUGIN_API_NO_PASS = 36;
const PLUGIN_API_NO_USER_DATA = 37;
const PLUGIN_API_UNKNOWN_LOGTYPE = 38;
const PLUGIN_API_CRON_NO_JOBS = 40;
const PLUGIN_API_CRON_NO_JOB_NAME = 41;
const PLUGIN_API_NO_ITEMS = 42;
const PLUGIN_API_WRONG_ITEM_FORMAT = 43;
const PLUGIN_API_NO_SHOPGATE_SETTINGS = 50;
const PLUGIN_API_UNSUPPORTED_RESPONSE_TYPE = 51;
// Plugin errors
const PLUGIN_DUPLICATE_ORDER = 60;
const PLUGIN_ORDER_NOT_FOUND = 61;
const PLUGIN_NO_CUSTOMER_GROUP_FOUND = 62;
const PLUGIN_ORDER_ITEM_NOT_FOUND = 63;
const PLUGIN_ORDER_STATUS_IS_SENT = 64;
const PLUGIN_ORDER_ALREADY_UP_TO_DATE = 65;
const PLUGIN_REGISTER_CUSTOMER_ERROR = 66;
const PLUGIN_NO_ADDRESSES_FOUND = 70;
const PLUGIN_WRONG_USERNAME_OR_PASSWORD = 71;
const PLUGIN_NO_CUSTOMER_TOKEN = 72;
const PLUGIN_CUSTOMER_TOKEN_INVALID = 73;
const PLUGIN_NO_CUSTOMER_LANGUAGE = 74;
const PLUGIN_CUSTOMER_ACCOUNT_NOT_CONFIRMED = 75;
const PLUGIN_CUSTOMER_UNKNOWN_ERROR = 76;
const PLUGIN_MISSING_ACCOUNT_PERMISSIONS = 77;
const PLUGIN_FILE_DELETE_ERROR = 79;
const PLUGIN_FILE_NOT_FOUND = 80;
const PLUGIN_FILE_OPEN_ERROR = 81;
const PLUGIN_FILE_EMPTY_BUFFER = 82;
const PLUGIN_DATABASE_ERROR = 83;
const PLUGIN_UNKNOWN_COUNTRY_CODE = 84;
const PLUGIN_UNKNOWN_STATE_CODE = 85;
const PLUGIN_EMAIL_SEND_ERROR = 90;
const PLUGIN_CRON_UNSUPPORTED_JOB = 91;
// Merchant API errors
const MERCHANT_API_NO_CONNECTION = 100;
const MERCHANT_API_INVALID_RESPONSE = 101;
const MERCHANT_API_ERROR_RECEIVED = 102;
// Authentification errors
// OAuth errors
const SHOPGATE_OAUTH_NO_CONNECTION = 115;
const SHOPGATE_OAUTH_MISSING_ACCESS_TOKEN = 116;
// Authentication errors
const AUTHENTICATION_FAILED = 120;
// File errors
const FILE_READ_WRITE_ERROR = 130;
// Coupon Errors
const COUPON_NOT_VALID = 200;
const COUPON_CODE_NOT_VALID = 201;
const COUPON_INVALID_PRODUCT = 202;
const COUPON_INVALID_ADDRESS = 203;
const COUPON_INVALID_USER = 204;
const COUPON_TOO_MANY_COUPONS = 205;
const REGISTER_FAILED_TO_ADD_USER = 220;
const REGISTER_USER_ALREADY_EXISTS = 221;
// Cart Item Errors
const CART_ITEM_OUT_OF_STOCK = 300;
const CART_ITEM_PRODUCT_NOT_FOUND = 301;
const CART_ITEM_REQUESTED_QUANTITY_NOT_AVAILABLE = 302;
const CART_ITEM_INPUT_VALIDATION_FAILED = 303;
const CART_ITEM_REQUESTED_QUANTITY_UNDER_MINIMUM_QUANTITY = 304;
const CART_ITEM_REQUESTED_QUANTITY_OVER_MAXIMUM_QUANTITY = 305;
const CART_ITEM_INVALID_PRODUCT_COMBINATION = 306;
//Helper class exception
const SHOPGATE_HELPER_FUNCTION_NOT_FOUND_EXCEPTION = 310;
// extended error code format that contains information on multiple errors
const MULTIPLE_ERRORS = 998;
// Unknown error code (the value passed as code gets to be the message)
const UNKNOWN_ERROR_CODE = 999;
protected static $errorMessages = array(
ca. Zeile 121
// Configuration failure
self::CONFIG_INVALID_VALUE => 'invalid value in configuration',
self::CONFIG_READ_WRITE_ERROR => 'error reading or writing configuration',
self::CONFIG_PLUGIN_NOT_ACTIVE => 'plugin not activated',
// Plugin API errors
self::PLUGIN_API_NO_ACTION => 'no action specified',
self::PLUGIN_API_UNKNOWN_ACTION => 'unknown action requested',
ca. Zeile 130
self::PLUGIN_API_WRONG_RESPONSE_FORMAT => 'wrong response format',
self::PLUGIN_API_UNKNOWN_SHOP_NUMBER => 'unknown shop number received',
self::PLUGIN_API_INVALID_ACTION => 'invalid action call',
self::PLUGIN_API_ADMIN_LOGIN_REQUIRED => 'login/access rights required',
self::PLUGIN_API_NO_ORDER_NUMBER => 'parameter "order_number" missing',
self::PLUGIN_API_NO_CART => 'parameter "cart" missing',
self::PLUGIN_API_NO_USER => 'parameter "user" missing',
self::PLUGIN_API_NO_PASS => 'parameter "pass" missing',
self::PLUGIN_API_NO_USER_DATA => 'parameter "user_data" missing',
self::PLUGIN_API_UNKNOWN_LOGTYPE => 'unknown logtype',
self::PLUGIN_API_CRON_NO_JOBS => 'parameter "jobs" missing',
self::PLUGIN_API_CRON_NO_JOB_NAME => 'field "job_name" in parameter "jobs" missing',
self::PLUGIN_API_NO_ITEMS => 'parameter "items" missing',
self::PLUGIN_API_WRONG_ITEM_FORMAT => 'wrong item format',
self::PLUGIN_API_NO_SHOPGATE_SETTINGS => 'parameter "shopgate_settings" missing',
self::PLUGIN_API_UNSUPPORTED_RESPONSE_TYPE => 'parameter "response_type" contains an unsupported type',
// Plugin errors
self::PLUGIN_DUPLICATE_ORDER => 'duplicate order',
self::PLUGIN_ORDER_NOT_FOUND => 'order not found',
self::PLUGIN_NO_CUSTOMER_GROUP_FOUND => 'no customer group found for customer',
self::PLUGIN_ORDER_ITEM_NOT_FOUND => 'order item not found',
self::PLUGIN_ORDER_STATUS_IS_SENT => 'order status is "sent"',
self::PLUGIN_ORDER_ALREADY_UP_TO_DATE => 'order is already up to date',
self::PLUGIN_REGISTER_CUSTOMER_ERROR => 'error while registering new customer',
self::PLUGIN_NO_ADDRESSES_FOUND => 'no addresses found for customer',
self::PLUGIN_WRONG_USERNAME_OR_PASSWORD => 'wrong username or password',
self::PLUGIN_NO_CUSTOMER_TOKEN => 'customer token missing',
self::PLUGIN_CUSTOMER_TOKEN_INVALID => 'invalid customer token',
self::PLUGIN_NO_CUSTOMER_LANGUAGE => 'customer language missing',
self::PLUGIN_CUSTOMER_ACCOUNT_NOT_CONFIRMED => 'customer account not confirmed',
self::PLUGIN_CUSTOMER_UNKNOWN_ERROR => 'unknown error while customer login',
self::PLUGIN_MISSING_ACCOUNT_PERMISSIONS => 'missing account permissions',
self::PLUGIN_FILE_DELETE_ERROR => 'cannot delete file(s)',
self::PLUGIN_FILE_NOT_FOUND => 'file not found',
self::PLUGIN_FILE_OPEN_ERROR => 'cannot open file',
ca. Zeile 157
self::PLUGIN_DATABASE_ERROR => 'database error',
self::PLUGIN_UNKNOWN_COUNTRY_CODE => 'unknown country code',
self::PLUGIN_UNKNOWN_STATE_CODE => 'unknown state code',
self::PLUGIN_EMAIL_SEND_ERROR => 'error sending email',
self::PLUGIN_CRON_UNSUPPORTED_JOB => 'unsupported job',
// Merchant API errors
self::MERCHANT_API_NO_CONNECTION => 'no connection to server',
self::MERCHANT_API_INVALID_RESPONSE => 'error parsing response',
self::MERCHANT_API_ERROR_RECEIVED => 'error code received',
// OAuth errors
self::SHOPGATE_OAUTH_NO_CONNECTION => 'no connection to shopgate server',
self::SHOPGATE_OAUTH_MISSING_ACCESS_TOKEN => 'no oauth access token received',
// File errors
self::FILE_READ_WRITE_ERROR => 'error reading or writing file',
// Authentification errors
// Coupon Errors
self::COUPON_NOT_VALID => 'invalid coupon',
self::COUPON_CODE_NOT_VALID => 'invalid coupon code',
self::COUPON_INVALID_PRODUCT => 'invalid product for coupon',
self::COUPON_INVALID_ADDRESS => 'invalid address for coupon',
self::COUPON_INVALID_USER => 'invalid user for coupon',
self::COUPON_TOO_MANY_COUPONS => 'too many coupons in cart',
self::REGISTER_FAILED_TO_ADD_USER => 'failed to add user',
self::REGISTER_USER_ALREADY_EXISTS => 'the given username already exists',
// Cart Item Errors
self::CART_ITEM_OUT_OF_STOCK => 'product is not in stock',
self::CART_ITEM_PRODUCT_NOT_FOUND => 'product not found',
self::CART_ITEM_REQUESTED_QUANTITY_NOT_AVAILABLE => 'less stock available than requested',
self::CART_ITEM_INPUT_VALIDATION_FAILED => 'product input validation failed',
self::CART_ITEM_REQUESTED_QUANTITY_UNDER_MINIMUM_QUANTITY => 'requested quantity is lower than required minimum quantity',
self::CART_ITEM_REQUESTED_QUANTITY_OVER_MAXIMUM_QUANTITY => 'requested quantity is higher than allowed maximum quantity',
self::CART_ITEM_INVALID_PRODUCT_COMBINATION => 'products can not be ordered together',
// Authentication errors
self::AUTHENTICATION_FAILED => 'authentication failed',
self::MULTIPLE_ERRORS => '',
);
/**
ca. Zeile 183
* and the code 999 (Unknown error code) is assigned. This should not be used anymore, though.
*
* @param int $code One of the constants defined in ShopgateLibraryException.
* @param string $additionalInformation More detailed information on what exactly went wrong.
* @param boolean $appendAdditionalInformationOnMessage Set true to output the additional information to the response. Set false to log it silently.
* @param boolean $writeLog true to create a log entry in the error log, false otherwise.
* @param bool $appendAdditionalInformationToMessage Set true to output the additional information to the response. Set false to log it silently.
* @param bool $writeLog true to create a log entry in the error log, false otherwise.
* @param Exception $previous
*/
public function __construct($code, $additionalInformation = null, $appendAdditionalInformationToMessage = false, $writeLog = true) {
public function __construct($code, $additionalInformation = null, $appendAdditionalInformationToMessage = false, $writeLog = true, Exception $previous = null) {
// Set code and message
$logMessage = self::buildLogMessageFor($code, $additionalInformation);
if (isset(self::$errorMessages[$code])) {
$message = self::$errorMessages[$code];
} else {
$message = 'Unknown error code: "'.$code.'"';
$code = self::UNKNOWN_ERROR_CODE;
}
// Save additional information
$this->additionalInformation = $additionalInformation;
if($appendAdditionalInformationToMessage){
$message .= ': '.$additionalInformation;
$message .= ': ' . $this->additionalInformation;
}
// Save additional information
$this->additionalInformation = $additionalInformation;
// We ALWAYS want to append the additional information for logging. So if it has already been appended here,
// it doesn't have to be appended again later.
$appendAdditionalInformationToLog = !$appendAdditionalInformationToMessage;
// in case of multiple errors the message should not have any other text attached to it
if ($code == self::MULTIPLE_ERRORS) {
$message = $this->additionalInformation;
$appendAdditionalInformationToLog = false;
}
// Call default Exception class constructor
if (method_exists(get_parent_class(), 'getPrevious')) {
// The "previous" argument was introduced in PHP 5.3
parent::__construct($message, $code, $previous);
} else {
parent::__construct($message, $code);
}
// Log the error
$logMessage = $this->buildLogMessage($appendAdditionalInformationToLog);
if (empty($writeLog)) {
$message .= ' (logging disabled for this message)';
$this->message .= ' (logging disabled for this message)';
} else {
if (ShopgateLogger::getInstance()->log($code.' - '.$logMessage) === false) {
$message .= ' (unable to log)';
$this->message .= ' (unable to log)';
}
}
// Call default Exception class constructor
parent::__construct($message, $code);
}
/**
* Returns the saved additional information.
ca. Zeile 229
/**
* Gets the error message for an error code.
*
* @param int $code One of the constants in this class.
* @return string
*/
public static function getMessageFor($code) {
if (isset(self::$errorMessages[$code])) {
$message = self::$errorMessages[$code];
ca. Zeile 248
* try-catch-statement can be avoided. Just pass the returned string to ShopgateLogger::log().
*
* @param int $code One of the constants defined in ShopgateLibraryException.
* @param string $additionalInformation More detailed information on what exactly went wrong.
* @return string
* @deprecated
*/
public static function buildLogMessageFor($code, $additionalInformation) {
$logMessage = self::getMessageFor($code);
$e = new ShopgateLibraryException($code, $additionalInformation, false, false);
return $e->buildLogMessage();
}
/**
* Builds the message that will be logged to the error log.
*
* @return string
*/
protected function buildLogMessage($appendAdditionalInformation = true) {
$logMessage = $this->getMessage();
// Set additional information
if (!empty($additionalInformation)) {
$logMessage .= ' - Additional information: "'.$additionalInformation.'"';
if ($appendAdditionalInformation && !empty($this->additionalInformation)) {
$logMessage .= ': ' . $this->additionalInformation;
}
$logMessage .= "\n\t";
$logMessage .= "\n";
// Add tracing information to the message
$btrace = debug_backtrace();
for ($i = 1; $i < 6; $i++) {
if (empty($btrace[$i+1])) break;
$class = (isset($btrace[$i+1]['class'])) ? $btrace[$i+1]['class'].'::' : 'Unknown class - ';
$function = (isset($btrace[$i+1]['function'])) ? $btrace[$i+1]['function'] : 'Unknown function';
$file = ' in '.((isset($btrace[$i]['file'])) ? basename($btrace[$i]['file']) : 'Unknown file');
$line = (isset($btrace[$i]['line'])) ? $btrace[$i]['line'] : 'Unkown line';
$logMessage .= $class.$function.'()'.$file.':'.$line."\n\t";
}
$previous = $this->getPreviousException();
$trace = $previous ? $previous->getTraceAsString() : $this->getTraceAsString();
$line = $previous ? $previous->getLine() : $this->getLine();
$file = $previous ? $previous->getFile() : $this->getFile();
$class = $previous ? get_class($previous) : get_class($this);
$traceLines = explode("\n", $trace);
array_unshift($traceLines, "## $file($line): throw $class");
$i = 0;
foreach ($traceLines as $traceLine) {
$i++;
if ($i > 20) {
$logMessage .= "\t(...)";
break;
}
$logMessage .= "\t$traceLine\n";
}
return $logMessage;
}
/**
* Exception::getPrevious() was introduced in PHP 5.3
* @return Exception|null
*/
protected function getPreviousException() {
if (method_exists(get_parent_class(), 'getPrevious')) {
return parent::getPrevious();
}
return null;
}
}
/**
* Exception type for errors reported by the Shopgate Merchant API.
*
* @author Shopgate GmbH, 35510 Butzbach, DE
*/
class ShopgateMerchantApiException extends Exception {
const UNKNOWN_ACTION = 101;
const SHOP_NUMBER_NOT_SET = 103;
const MERCHANT_NOT_FOUND = 110;
const SHOP_NOT_FOUND = 113;
const MISSING_PARAMETERS = 118;
const FIELDS_OF_WRONG_TYPE = 123;
const AUTHORIZATION_NOT_SET = 400;
const AUTHORIZATION_USERNAME_INVALID = 401;
const AUTHORIZATION_PASSWORD_INVALID = 402;
const ORDER_NOT_FOUND = 201;
const ORDER_ON_HOLD = 202;
const ORDER_ALREADY_COMPLETED = 203;
const ORDER_SHIPPING_STATUS_ALREADY_COMPLETED = 204;
const ORDER_INVALID_SHIPPING_SERVICE_ID = 119;
const CATEGORY_NAME_ALREADY_EXISTS = 142;
const CATEGORY_NOT_FOUND = 205;
const CATEGORY_PARENT_NOT_FOUND = 212;
const CATEGORY_NUMBER_ALREADY_EXISTS = 216;
const CATEGORY_CHILD_ITEMS_COULD_NOT_BE_MAPPED = 217;
const CATEGORY_CANNOT_MAP_CHILD_ITEMS = 217;
const CATEGORY_ERROR_DELETING_ITEM_MAPPING = 147;
const ITEM_ERROR_DOWNLOADING_IMAGE = 149;
const ITEM_NOT_FOUND = 206;
const ITEM_CURRENCY_NOT_FOUND = 207;
const ITEM_PARENT_NOT_FOUND = 220;
const ITEM_ALREADY_EXISTS = 221;
const ITEM_ERROR_DELETING = 129;
const BATCH_ITEM_MULTIPLE_ERRORS = 166;
const BATCH_ITEM_TOO_MANY_ELEMENTS = 167;
const ORDER_ALREADY_CANCELLED = 222;
const ORDER_CANCEL_INVALID_ITEM = 223;
const ORDER_CANCEL_INVALID_ITEM_QUANTITY = 224;
const ORDER_SHIPPING_COSTS_ALREADY_CANCELLED = 225;
const ORDER_CANCEL_INVALID_ARGUMENTS = 226;
const INTERNAL_ERROR_OCCURED_WHILE_SAVING = 803;
const INTERNAL_ERROR_OCCURED_WHILE_DELETING = 804;
const UNKNOWN_ERROR = 999;
/**
* @var ShopgateMerchantApiResponse
*/
ca. Zeile 337
const LOGTYPE_ERROR = 'error';
const LOGTYPE_DEBUG = 'debug';
const OBFUSCATION_STRING = 'XXXXXXXX';
const REMOVED_STRING = '<removed>';
/**
* @var bool
*/
private $debug;
/**
* @var string
*/
private $memoryAnalyserLoggingSizeUnit;
/**
* @var string[] Names of the fields that should be obfuscated on logging.
*/
private $obfuscationFields;
/**
* @var string Names of the fields that should be removed from logging.
*/
private $removeFields;
/**
* @var mixed[]
*/
private $files = array(
self::LOGTYPE_ACCESS => array('path' => '', 'handle' => null, 'mode' => 'a+'),
ca. Zeile 358
* @var ShopgateLogger
*/
private static $singleton;
private function __construct($accessLogPath, $requestLogPath, $errorLogPath, $debugLogErrorPath) {
$this->files[self::LOGTYPE_ACCESS]['path'] = $accessLogPath;
$this->files[self::LOGTYPE_REQUEST]['path'] = $requestLogPath;
$this->files[self::LOGTYPE_ERROR]['path'] = $errorLogPath;
$this->files[self::LOGTYPE_DEBUG]['path'] = $debugLogErrorPath;
private function __construct() {
$this->debug = false;
$this->memoryAnalyserLoggingSizeUnit = 'MB';
$this->obfuscationFields = array('pass');
$this->removeFields = array('cart');
}
/**
* @param string $accessLogPath
* @param string $requestLogPath
* @param string $errorLogPath
ca. Zeile 375
* @return ShopgateLogger
*/
public static function getInstance($accessLogPath = null, $requestLogPath = null, $errorLogPath = null, $debugLogPath = null) {
if (empty(self::$singleton)) {
// fallback for the default log files if none are specified
self::$singleton = new self();
// fall back to default log paths if none are specified
if (empty($accessLogPath)) $accessLogPath = SHOPGATE_BASE_DIR.DS.'temp'.DS.'logs'.DS.ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'access.log';
if (empty($requestLogPath)) $requestLogPath = SHOPGATE_BASE_DIR.DS.'temp'.DS.'logs'.DS.ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'request.log';
if (empty($errorLogPath)) $errorLogPath = SHOPGATE_BASE_DIR.DS.'temp'.DS.'logs'.DS.ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'error.log';
if (empty($debugLogPath)) $debugLogPath = SHOPGATE_BASE_DIR.DS.'temp'.DS.'logs'.DS.ShopgateConfigInterface::SHOPGATE_FILE_PREFIX.'debug.log';
self::$singleton = new self($accessLogPath, $requestLogPath, $errorLogPath, $debugLogPath);
}
// set log file paths if requested
self::$singleton->setLogFilePaths($accessLogPath, $requestLogPath, $errorLogPath, $debugLogPath);
return self::$singleton;
}
/**
* Sets the paths to the log files.
*
* @param string $accessLogPath
* @param string $requestLogPath
* @param string $errorLogPath
* @param string $debugLogPath
*/
public function setLogFilePaths($accessLogPath, $requestLogPath, $errorLogPath, $debugLogPath) {
if (!empty($accessLogPath)) {
$this->files[self::LOGTYPE_ACCESS]['path'] = $accessLogPath;
}
if (!empty($requestLogPath)) {
$this->files[self::LOGTYPE_REQUEST]['path'] = $requestLogPath;
}
if (!empty($errorLogPath)) {
$this->files[self::LOGTYPE_ERROR]['path'] = $errorLogPath;
}
if (!empty($debugLogPath)) {
$this->files[self::LOGTYPE_DEBUG]['path'] = $debugLogPath;
}
}
/**
* Enables logging messages to debug log file.
*/
public function enableDebug() {
$this->debug = true;
ca. Zeile 409
return $this->debug;
}
/**
* Sets the unit in which the memory usage logger outputs its values in
* @param string $sizeUnit ('MB', 'BYTES', 'GB', 'KB', ...)
*/
public function setMemoryAnalyserLoggingSizeUnit($sizeUnit) {
switch(strtoupper(trim($sizeUnit))) {
case 'GB':
case 'GIGABYTE':
case 'GIGABYTES':
$this->memoryAnalyserLoggingSizeUnit = 'GB';
break;
case 'MB':
case 'MEGABYTE':
case 'MEGABYTES':
$this->memoryAnalyserLoggingSizeUnit = 'MB';
break;
case 'KB':
case 'KILOBYTE':
case 'KILOBYTES':
$this->memoryAnalyserLoggingSizeUnit = 'KB';
break;
// case 'BYTES':
// case 'BYTE':
default:
$this->memoryAnalyserLoggingSizeUnit = 'BYTES';
break;
}
}
/**
* returns the unit in which the memory usage logger outputs its values in
* @return string
*/
public function getMemoryAnalyserLoggingSizeUnit() {
return $this->memoryAnalyserLoggingSizeUnit;
}
/**
* Logs a message to the according log file.
*
* This produces a log entry of the form<br />
* <br />
* [date] [time]: [message]\n<br />
* <br />
* to the selected log file. If an unknown log type is passed the message will be logged to the error log file.<br />
* <br />
* Logging to LOGTYPE_DEBUG only occurs after $this->enableDebug() has been called. The debug log file will be truncated
* on opening.
* Logging to LOGTYPE_DEBUG only is done after $this->enableDebug() has been called and $this->disableDebug() has not
* been called after that. The debug log file will be truncated on opening by default. To prevent this call
* $this->keepDebugLog(true).
*
* @param string $msg The error message.
* @param string $type The log type, that would be one of the ShopgateLogger::LOGTYPE_* constants.
* @return bool True on success, false on error.
ca. Zeile 478
*
* @param string $type The log file to be read
* @param int $lines Number of lines to return
* @return string The requested log file content
*
* @throws ShopgateLibraryException
* @see http://tekkie.flashbit.net/php/tail-functionality-in-php
*/
public function tail($type = self::LOGTYPE_ERROR, $lines = 20) {
if (!isset($this->files[$type])) {
ca. Zeile 521
return $text;
}
/**
* Adds field names to the list of fields that should be obfuscated in the logs.
*
* @param string[] $fieldNames
*/
public function addObfuscationFields(array $fieldNames) {
$this->obfuscationFields = array_merge($fieldNames, $this->obfuscationFields);
}
/**
* Adds field names to the list of fields that should be removed from the logs.
*
* @param string[] $fieldNames
*/
public function addRemoveFields(array $fieldNames) {
$this->removeFields = array_merge($fieldNames, $this->removeFields);
}
/**
* Function to prepare the parameters of an API request for logging.
*
* Strips out critical request data like the password of a get_customer request.
*
ca. Zeile 530
* @return string The cleaned parameters as string ready to log.
*/
public function cleanParamsForLog($data) {
foreach ($data as $key => &$value) {
switch ($key) {
case 'pass': $value = self::OBFUSCATION_STRING;
if (in_array($key, $this->obfuscationFields)) {
$value = self::OBFUSCATION_STRING;
}
if (in_array($key, $this->removeFields)) {
$value = self::REMOVED_STRING;
}
}
return print_r($data, true);
ca. Zeile 607
set_error_handler('ShopgateErrorHandler');
}
// instantiate API stuff
$authService = new ShopgateAuthentificationService($this->config->getCustomerNumber(), $this->config->getApikey());
$merchantApi = new ShopgateMerchantApi($authService, $this->config->getShopNumber(), $this->config->getApiUrl());
$pluginApi = new ShopgatePluginApi($this->config, $authService, $merchantApi, $plugin);
// -> MerchantAPI auth service (needs to be initialized first, since the config still can change along with the authentication information
switch($this->config->getSmaAuthServiceClassName()) {
case ShopgateConfigInterface::SHOPGATE_AUTH_SERVICE_CLASS_NAME_SHOPGATE:
$smaAuthService = new ShopgateAuthenticationServiceShopgate($this->config->getCustomerNumber(), $this->config->getApikey());
$smaAuthService->setup($this->config);
$merchantApi = new ShopgateMerchantApi($smaAuthService, $this->config->getShopNumber(), $this->config->getApiUrl());
break;
case ShopgateConfigInterface::SHOPGATE_AUTH_SERVICE_CLASS_NAME_OAUTH:
$smaAuthService = new ShopgateAuthenticationServiceOAuth($this->config->getOauthAccessToken());
$smaAuthService->setup($this->config);
$merchantApi = new ShopgateMerchantApi($smaAuthService, null, $this->config->getApiUrl());
break;
default:
// undefined auth service
return trigger_error('Invalid SMA-Auth-Service defined - this should not happen with valid plugin code', E_USER_ERROR);
}
// -> PluginAPI auth service (currently the plugin API supports only one auth service)
$spaAuthService = new ShopgateAuthenticationServiceShopgate($this->config->getCustomerNumber(), $this->config->getApikey());
$pluginApi = new ShopgatePluginApi($this->config, $spaAuthService, $merchantApi, $plugin);
if ($this->config->getExportConvertEncoding()) {
array_splice(ShopgateObject::$sourceEncodings, 1, 0, $this->config->getEncoding());
ShopgateObject::$sourceEncodings = array_unique(ShopgateObject::$sourceEncodings);
}
if ($this->config->getForceSourceEncoding()) {
ShopgateObject::$sourceEncodings = array($this->config->getEncoding());
}
// instantiate export file buffer
$fileBuffer = new ShopgateFileBuffer($this->config->getExportBufferCapacity(), $this->config->getExportConvertEncoding());
if (!empty($_REQUEST['action']) && (($_REQUEST['action'] == 'get_items')
|| ($_REQUEST['action'] == 'get_categories') || ($_REQUEST['action'] == 'get_reviews'))) {
$xmlModelNames = array(
'get_items' => 'Shopgate_Model_Catalog_Product',
'get_categories' => 'Shopgate_Model_Catalog_Category',
'get_reviews' => 'Shopgate_Model_Review'
);
$format = (!empty($_REQUEST['response_type'])) ? $_REQUEST['response_type'] : '';
switch ($format) {
default: case 'xml':
/* @var $xmlModel Shopgate_Model_AbstractExport */
$xmlModel = new $xmlModelNames[$_REQUEST['action']]();
$xmlNode = new Shopgate_Model_XmlResultObject($xmlModel->getItemNodeIdentifier());
$fileBuffer = new ShopgateFileBufferXml($xmlModel, $xmlNode, $this->config->getExportBufferCapacity(), $this->config->getExportConvertEncoding(), ShopgateObject::$sourceEncodings);
break;
case 'json':
$fileBuffer = new ShopgateFileBufferJson($this->config->getExportBufferCapacity(), $this->config->getExportConvertEncoding(), ShopgateObject::$sourceEncodings);
break;
}
} else if (!empty($_REQUEST['action']) && (($_REQUEST['action'] == 'get_items_csv') || ($_REQUEST['action'] == 'get_categories_csv') || ($_REQUEST['action'] == 'get_reviews_csv'))) {
$fileBuffer = new ShopgateFileBufferCsv($this->config->getExportBufferCapacity(), $this->config->getExportConvertEncoding(), ShopgateObject::$sourceEncodings);
} else {
$fileBuffer = new ShopgateFileBufferCsv($this->config->getExportBufferCapacity(), $this->config->getExportConvertEncoding(), ShopgateObject::$sourceEncodings);
}
// inject apis into plugin
$plugin->setConfig($this->config);
$plugin->setMerchantApi($merchantApi);
ca. Zeile 627
*
* @return ShopgateMerchantApi
*/
public function buildMerchantApi() {
$authService = new ShopgateAuthentificationService($this->config->getCustomerNumber(), $this->config->getApikey());
$merchantApi = new ShopgateMerchantApi($authService, $this->config->getShopNumber(), $this->config->getApiUrl());
$merchantApi = null;
switch($smaAuthServiceClassName = $this->config->getSmaAuthServiceClassName()) {
case ShopgateConfigInterface::SHOPGATE_AUTH_SERVICE_CLASS_NAME_SHOPGATE:
$smaAuthService = new ShopgateAuthenticationServiceShopgate($this->config->getCustomerNumber(), $this->config->getApikey());
$smaAuthService->setup($this->config);
$merchantApi = new ShopgateMerchantApi($smaAuthService, $this->config->getShopNumber(), $this->config->getApiUrl());
break;
case ShopgateConfigInterface::SHOPGATE_AUTH_SERVICE_CLASS_NAME_OAUTH:
$smaAuthService = new ShopgateAuthenticationServiceOAuth($this->config->getOauthAccessToken());
$smaAuthService->setup($this->config);
$merchantApi = new ShopgateMerchantApi($smaAuthService, null, $this->config->getApiUrl());
break;
default:
// undefined auth service
trigger_error('Invalid SMA-Auth-Service defined - this should not happen with valid plugin code', E_USER_ERROR);
break;
}
return $merchantApi;
}
ca. Zeile 659
*
* @author Shopgate GmbH, 35510 Butzbach, DE
*/
abstract class ShopgateObject {
public static $sourceEncodings = array(SHOPGATE_LIBRARY_ENCODING, 'ASCII', 'CP1252', 'ISO-8859-15', 'UTF-16LE', 'ISO-8859-1');
/**
* @var array cache already camelized strings
*/
protected $camelizeCache = array();
/**
* defines the name for the Shopgate datastructure helper
* @const HELPER_DATA_STRUCTURE
*/
const HELPER_DATASTRUCTURE = "DataStructure";
/**
* defines the name for the Shopgate pricing helper
* @const HELPER_PRICING
*/
const HELPER_PRICING = "Pricing";
/**
* defines the name for the Shopgate string helper
* @const HELPER_STRING
*/
const HELPER_STRING = "String";
/**
* Save the already instantiated Helper Object to guarantee the only one instance is allocated
*
* @var array of Shopgate_Helper_DataStructure|Shopgate_Helper_Pricing|Shopgate_Helper_String
*/
private $helperClassInstances = array(
self::HELPER_DATASTRUCTURE => null,
self::HELPER_PRICING => null,
self::HELPER_STRING => null,
);
/**
* get a instance of an Shopgate helper class depending on the committed name
*
* @param $helperName string defined by constants in this class(ShopgateObject)
*
* @return null|Shopgate_Helper_DataStructure|Shopgate_Helper_Pricing|Shopgate_Helper_String returns the requested helper instance or null
* @throws ShopgateLibraryException
*/
protected function getHelper($helperName) {
if (array_key_exists($helperName,$this->helperClassInstances)) {
$helperClassName = "Shopgate_Helper_" . $helperName;
if (!isset($this->helperClassInstances[$helperClassName])) {
$this->helperClassInstances[$helperClassName] = new $helperClassName();
}
return $this->helperClassInstances[$helperClassName];
}
throw new ShopgateLibraryException("Helper function {$helperName} not found",ShopgateLibraryException::SHOPGATE_HELPER_FUNCTION_NOT_FOUND_EXCEPTION);
}
/**
* Convenience method for logging to the ShopgateLogger.
*
* @param string $msg The error message.
ca. Zeile 682
* @param bool $capitalizeFirst Set true to capitalize the first letter (e.g. for class names). Default: false.
* @return string The camelized string.
*/
public function camelize($str, $capitalizeFirst = false) {
$hash = md5($str . $capitalizeFirst);
if (empty($this->camelizeCache[$hash])) {
$str = strtolower($str);
if ($capitalizeFirst) {
$str[0] = strtoupper($str[0]);
}
$func = create_function('$c', 'return strtoupper($c[1]);');
return preg_replace_callback('/_([a-z0-9])/', $func, $str);
$this->camelizeCache[$hash] = preg_replace_callback('/_([a-z0-9])/', array($this, 'camelizeHelper'), $str);
}
return $this->camelizeCache[$hash];
}
private function camelizeHelper($matches) {
return strtoupper($matches[1]);
}
/**
* Creates a JSON string from any passed value.
ca. Zeile 701
*/
public function jsonEncode($value) {
// if json_encode exists use that
if (extension_loaded('json') && function_exists('json_encode')) {
return $string = json_encode($value);
$encodedValue = json_encode($value);
if (!empty($encodedValue)) {
return $encodedValue;
}
}
// if not check if external class is loaded
if (!class_exists('sgServicesJSON')) {
ca. Zeile 719
* Creates a variable, array or object from any passed JSON string.
*
* If json_encode() exists it's done by that, otherwise an external class provided with the Shopgate Library is used.
*
* @param string $value
* @param $json
* @param bool $assoc
* @return mixed
*/
public function jsonDecode($json, $assoc = false) {
// if json_decode exists use that
if (extension_loaded('json') && function_exists('json_decode')) {
return json_decode($json, $assoc);
$decodedValue = json_decode($json, $assoc);
if (!empty($decodedValue)) {
return $decodedValue;
}
}
// if not check if external class is loaded
if (!class_exists('sgServicesJSON')) {
ca. Zeile 741
/**
* Encodes a string from a given encoding to UTF-8.
*
* This wraps the mb_convert_encoding() function of PHP.
*
* @param string $string The string to encode.
* @param string|string[] $sourceEncoding The encoding(s) of $string.
* @param string|string[] $sourceEncoding The (possible) encoding(s) of $string.
* @param bool $force Set this true to enforce encoding even if the source encoding is already UTF-8.
* @param bool $useIconv True to use iconv instead of mb_convert_encoding even if the mb library is present.
* @return string The UTF-8 encoded string.
*
* @see http://php.net/manual/de/function.mb-convert-encoding.php
*/
public function stringToUtf8($string, $sourceEncoding = 'ISO-8859-15', $force = false) {
public function stringToUtf8($string, $sourceEncoding = 'ISO-8859-15', $force = false, $useIconv = false) {
$conditions =
is_string($sourceEncoding) &&
($sourceEncoding == SHOPGATE_LIBRARY_ENCODING) &&
!$force;
return ($conditions)
? $string
: mb_convert_encoding($string, SHOPGATE_LIBRARY_ENCODING, $sourceEncoding);
: $this->convertEncoding($string, SHOPGATE_LIBRARY_ENCODING, $sourceEncoding, $useIconv);
}
/**
* Decodes a string from UTF-8 to a given encoding.
*
* This wraps the mb_convert_encoding() function of PHP.
*
* @param string $string The string to decode.
* @param string $destinationEncoding The desired encoding of the return value.
* @param bool $force Set this true to enforce encoding even if the destination encoding is set to UTF-8.
* @param bool $useIconv True to use iconv instead of mb_convert_encoding even if the mb library is present.
* @return string The UTF-8 decoded string.
*
* @see http://php.net/manual/de/function.mb-convert-encoding.php
*/
public function stringFromUtf8($string, $destinationEncoding = 'ISO-8859-15', $force = false) {
public function stringFromUtf8($string, $destinationEncoding = 'ISO-8859-15', $force = false, $useIconv = false) {
return ($destinationEncoding == SHOPGATE_LIBRARY_ENCODING) && !$force
? $string
: mb_convert_encoding($string, $destinationEncoding, SHOPGATE_LIBRARY_ENCODING);
: $this->convertEncoding($string, $destinationEncoding, SHOPGATE_LIBRARY_ENCODING, $useIconv);
}
/**
* Converts a string's encoding to another.
*
* This wraps the mb_convert_encoding() and iconv() functions of PHP. If the mb_string extension is not installed,
* iconv() will be used instead.
*
* If iconv() must be used and an array is passed as $sourceEncoding all encodings will be tested and the (probably)
* best encoding will be used for conversion.
*
* @see http://php.net/manual/en/function.mb-convert-encoding.php
* @see http://php.net/manual/en/function.iconv.php
*
* @param string $string The string to decode.
* @param string $destinationEncoding The desired encoding of the return value.
* @param string|string[] $sourceEncoding The (possible) encoding(s) of $string.
* @param bool $useIconv True to use iconv instead of mb_convert_encoding even if the mb library is present.
* @return string The UTF-8 decoded string.
*/
protected function convertEncoding($string, $destinationEncoding, $sourceEncoding, $useIconv = false) {
if (function_exists('mb_convert_encoding') && !$useIconv) {
$convertedString = mb_convert_encoding($string, $destinationEncoding, $sourceEncoding);
} else {
// I have no excuse for the following. Please forgive me.
if (is_array($sourceEncoding)) {
$bestEncoding = '';
$bestScore = null;
foreach ($sourceEncoding as $encoding) {
$score = abs(strlen($string) - strlen(@iconv($encoding, $destinationEncoding, $string)));
if (is_null($bestScore) || ($score < $bestScore)) {
$bestScore = $score;
$bestEncoding = $encoding;
}
}
$sourceEncoding = $bestEncoding;
}
$convertedString = @iconv($sourceEncoding, $destinationEncoding.'//IGNORE', $string);
}
return $convertedString;
}
/**
* Takes any big object that can contain recursion and dumps it to the output buffer
*
* @param mixed $subject
* @param array $ignore
* @param int $depth
* @param array $refChain
*/
protected function user_print_r($subject, $ignore = array(), $depth = 1, $refChain = array()) {
static $maxDepth = 5;
if ($depth > 20) return;
if (is_object($subject)) {
foreach ($refChain as $refVal)
if ($refVal === $subject) {
echo "*RECURSION*\n";
return;
}
array_push($refChain, $subject);
echo get_class($subject) . " Object ( \n";
$subject = (array) $subject;
foreach ($subject as $key => $val)
if (is_array($ignore) && !in_array($key, $ignore, 1)) {
echo str_repeat(" ", $depth * 4) . '[';
if ($key{0} == "\0") {
$keyParts = explode("\0", $key);
echo $keyParts[2] . (($keyParts[1] == '*') ? ':protected' : ':private');
} else
echo $key;
echo '] => ';
if ($depth == $maxDepth) {
return;
}
$this->user_print_r($val, $ignore, $depth + 1, $refChain);
}
echo str_repeat(" ", ($depth - 1) * 4) . ")\n";
array_pop($refChain);
} elseif (is_array($subject)) {
echo "Array ( \n";
foreach ($subject as $key => $val) {
if (is_array($ignore) && !in_array($key, $ignore, 1)) {
echo str_repeat(" ", $depth * 4) . '[' . $key . '] => ';
if ($depth==$maxDepth) {
return;
}
$this->user_print_r($val, $ignore, $depth + 1, $refChain);
}
}
echo str_repeat(" ", ($depth - 1) * 4) . ")\n";
} else {
echo $subject . "\n";
}
}
/**
* @param int $memoryLimit in MB
*/
public function setExportMemoryLimit($memoryLimit) {
$limit = ($memoryLimit >= 0)
? $memoryLimit.'M'
: (string) $memoryLimit
;
@ini_set('memory_limit', $limit);
}
/**
* @param int $timeLimit in seconds
*/
public function setExportTimeLimit($timeLimit) {
@set_time_limit($timeLimit);
@ini_set('max_execution_time', $timeLimit);
}
/**
* Gets the used memory and real used memory and returns it as a string
*
* @return string
*/
protected function getMemoryUsageString() {
switch(strtoupper(trim(ShopgateLogger::getInstance()->getMemoryAnalyserLoggingSizeUnit()))) {
case 'GB':
return (memory_get_usage()/(1024*1024*1024)) . " GB (real usage ".(memory_get_usage(true)/(1024*1024*1024))." GB)";
case 'MB':
return (memory_get_usage()/(1024*1024)) . " MB (real usage ".(memory_get_usage(true)/(1024*1024))." MB)";
case 'KB':
return (memory_get_usage()/1024) . " KB (real usage ".(memory_get_usage(true)/1024)." KB)";
default:
return memory_get_usage() . " Bytes (real usage ".memory_get_usage(true)." Bytes)";
}
}
}
/**
* This class acts as super class for plugin implementations and provides some basic functionality.
ca. Zeile 794
const PRODUCT_STATUS_ACTIVE = 'active';
const PRODUCT_STATUS_INACTIVE = 'inactive';
/**
* @var Shopgate_Model_Abstract
*/
protected $result_item_model = false;
/** convert weight units **/
const CONVERT_POUNDS_TO_GRAM_FACTOR = 453.59237;
const CONVERT_OUNCES_TO_GRAM_FACTOR = 28.3495231;
/**
* @var ShopgateBuilder
*/
protected $builder;
ca. Zeile 839
*/
protected $exchangeRate = 1;
/**
* @param ShopgateBuilder $builder If empty, the default ShopgateBuilder will be instantiated.
* @var int the number of attributes in the item csv file header
*/
public final function __construct(ShopgateBuilder $builder = null) {
// some default values
$this->splittedExport = false;
$this->exportOffset = 0;
$this->exportLimit = 1000;
protected $defaultItemRowAttributeCount = 10;
// fire the plugin's startup callback
try {
$this->startup();
} catch (ShopgateLibraryException $e) {
// logging is done in exception constructor
}
/**
* @var int the number of options in the item csv file header
*/
protected $defaultItemRowOptionCount = 10;
/**
* @var int the number of inputs in the item csv file header
*/
protected $defaultItemRowInputCount = 10;
/**
*
* @var boolean true use tax classes for export
*/
protected $useTaxClasses = false;
/**
* @param ShopgateBuilder $builder If empty, the default ShopgateBuilder will be instantiated.
*/
public final function __construct(ShopgateBuilder $builder = null) {
// some default values
$this->splittedExport = false;
$this->exportOffset = 0;
$this->exportLimit = 1000;
// fire the plugin's startup callback
try {
$this->startup();
} catch (ShopgateLibraryException $e) {
// logging is done in exception constructor
}
// build the object graph and get needed objects injected via set* methods
if (empty($builder)) $builder = new ShopgateBuilder($this->config);
$builder->buildLibraryFor($this);
ca. Zeile 902
$this->pluginApi = $pluginApi;
}
/**
* @param ShopgateFileBuffer $buffer
* @param ShopgateFileBufferInterface $buffer
*/
public final function setBuffer(ShopgateFileBufferInterface $buffer) {
$this->buffer = $buffer;
}
ca. Zeile 923
return $this->pluginApi->handleRequest($data);
}
/**
* Wrapper method to fetch OAuth url from ShopgatePluginApi
*
* @param string $shopgateOAuthActionName
* @return string
*/
public function buildShopgateOAuthUrl($shopgateOAuthActionName) {
return $this->pluginApi->buildShopgateOAuthUrl($shopgateOAuthActionName);
}
/**
* Checks the config for every 'enabled_<action-name>' setting and returns all active as an indexed list
* @return array
*/
public function getEnabledPluginActions() {
$enabledActionsList = array();
$configValues = $this->config->toArray();
// find all settings that start with "enable_" in the config-value-name and collect all active ones
$searchKeyPart = 'enable_';
foreach ($configValues as $key => $val) {
if (substr($key, 0, strlen($searchKeyPart)) == $searchKeyPart) {
if ($val) {
$enabledActionsList[$key] = $val;
}
}
}
return $enabledActionsList;
}
/**
* Takes care of buffer and file handlers and calls ShopgatePlugin::createItemsCsv().
*
* @throws ShopgateLibraryException
*/
ca. Zeile 934
$this->buffer->finish();
}
/**
* Takes care of buffer and file handlers and calls ShopgatePlugin::createItemsCsv().
*
* @throws ShopgateLibraryException
*/
public final function startGetMediaCsv() {
$this->buffer->setFile($this->config->getMediaCsvPath());
$this->createMediaCsv();
$this->buffer->finish();
}
/**
* Takes care of buffer and file handlers and calls ShopgatePlugin::createCategoriesCsv().
*
* @throws ShopgateLibraryException
*/
ca. Zeile 958
/**
* Takes care of buffer and file handlers and calls ShopgatePlugin::createPagesCsv().
*
* @throws ShopgateLibraryException
*/
public final function startGetPagesCsv() {
$this->buffer->setFile($this->config->getReviewsCsvPath());
$this->createPagesCsv();
* @param int $limit
* @param int $offset
* @param array $uids
* @param string $responseType
*/
public final function startGetItems($limit = null, $offset = null, array $uids = array(), $responseType = 'xml') {
switch ($responseType) {
default: case 'xml':
$this->buffer->setFile($this->config->getItemsXmlPath());
break;
case 'json':
$this->buffer->setFile($this->config->getItemsJsonPath());
break;
}
$this->createItems($limit, $offset, $uids);
$this->buffer->finish();
}
/**
* Takes care of buffer and file handlers and calls ShopgatePlugin::createCategories().
*
* @param int $limit
* @param int $offset
* @param array $uids
* @param string $responseType
*/
public final function startGetCategories($limit = null, $offset = null, array $uids = array(), $responseType = 'xml') {
switch ($responseType) {
default: case 'xml':
$this->buffer->setFile($this->config->getCategoriesXmlPath());
break;
case 'json':
$this->buffer->setFile($this->config->getCategoriesJsonPath());
break;
}
$this->createCategories($limit, $offset, $uids);
$this->buffer->finish();
}
/**
* Takes care of buffer and file handlers and calls ShopgatePlugin::createReviews().
*
* @param int $limit
* @param int $offset
* @param array $uids
* @param string $responseType
*/
public final function startGetReviews($limit = null, $offset = null, array $uids = array(), $responseType = 'xml') {
switch ($responseType) {
default:
case 'xml':
$this->buffer->setFile($this->config->getReviewsXmlPath());
break;
case 'json':
$this->buffer->setFile($this->config->getReviewsJsonPath());
break;
}
$this->createReviews($limit, $offset, $uids);
$this->buffer->finish();
}
#############
## Helpers ##
#############
ca. Zeile 982
$this->buffer->addRow($row);
}
/**
* Calls the addRow() method on the currently associated ShopgateFileBuffer
*
* @param Shopgate_Model_AbstractExport $object
* @throws ShopgateLibraryException if flushing the buffer fails.
*/
private final function addModel(Shopgate_Model_AbstractExport $object) {
$this->buffer->addRow($object);
}
/**
* @deprecated Use ShopgatePlugin::addItemRow(), ::addCategoryRow() or ::addReviewRow().
*/
protected final function addItem($item) {
$this->addRow($item);
}
/**
* @param mixed[] $itemArr
* @param Shopgate_Model_Catalog_Product $item
*/
protected final function addItemModel(Shopgate_Model_Catalog_Product $item) {
$this->addModel($item);
}
/**
* @param mixed[] $item
*/
protected final function addItemRow($item) {
$item = array_merge( $this->buildDefaultItemRow(), $item );
$this->addRow( $item );
}
/**
* @param mixed[] $item
*/
protected final function addMediaRow($item) {
$item = array_merge( $this->buildDefaultMediaRow(), $item );
$this->addRow( $item );
}
/**
* @param Shopgate_Model_Catalog_Category $category
*/
protected final function addCategoryModel(Shopgate_Model_Catalog_Category $category) {
$this->addModel($category);
}
/**
* @param mixed[] $itemArr
* @param mixed[] $category
*/
protected final function addCategoryRow($category) {
$category = array_merge($this->buildDefaultCategoryRow(), $category);
$this->addRow($category);
}
/**
* @param Shopgate_Model_Catalog_Review $review
*/
protected final function addReviewModel(Shopgate_Model_Catalog_Review $review) {
$this->addModel($review);
}
/**
* @param mixed[] $itemArr
* @param mixed[] $review
*/
protected final function addReviewRow($review) {
$review = array_merge($this->buildDefaultReviewRow(), $review);
ca. Zeile 1032
return $row;
}
/**
* @return Shopgate_Model_Catalog_Category
* @see http://wiki.shopgate.com/get_categories
*/
protected function buildDefaultCategoryModel() {
return new Shopgate_Model_Catalog_Category();
}
/**
* set the number of attributes to put in the csv head row
* @param int $attributeCount
*/
protected function setDefaultItemRowAttributeCount($attributeCount=10) {
$this->defaultItemRowAttributeCount = max(1, $attributeCount);
}
/**
* get the number of attributes to put in the csv head row
* @return int
*/
protected function getDefaultItemRowAttributeCount() {
return $this->defaultItemRowAttributeCount;
}
/**
* set the number of options to put in the csv head row
* @param int $optionCount
*/
protected function setDefaultItemRowOptionCount($optionCount=10) {
$this->defaultItemRowOptionCount = max(1, $optionCount);
}
/**
* get the number of options to put in the csv head row
* @return int
*/
protected function getDefaultItemRowOptionCount() {
return $this->defaultItemRowOptionCount;
}
/**
* set the number of inputs to put in the csv head row
* @param int $inputCount
*/
protected function setDefaultItemRowInputCount($inputCount=10) {
$this->defaultItemRowInputCount = max(1, $inputCount);
}
/**
* get the number of inputs to put in the csv head row
* @return int
*/
protected function getDefaultItemRowInputCount() {
return $this->defaultItemRowInputCount;
}
/**
* @deprecated Use ShopgatePlugin::buildDefaultItemRow().
*/
protected function buildDefaultProductRow() {
return $this->buildDefaultItemRow();
}
/**
*
* @see http://wiki.shopgate.com/CSV_File_Items/
*/
protected function useTaxClasses() {
$this->useTaxClasses = true;
}
/**
* @return string[] An array with the csv file field names as indices and empty strings as values.
* @see http://wiki.shopgate.com/CSV_File_Items/
*/
protected function buildDefaultItemRow() {
$row = array(
// prepare attributes
$attributes = array(
'has_children' => '0',
'parent_item_number' => ''
);
for ($attr = 1; $attr <= $this->defaultItemRowAttributeCount; $attr++) {
$attributes['attribute_' . $attr] = '';
}
// prepare options
$options = array('has_options' => '0');
for ($opt = 1; $opt <= $this->defaultItemRowOptionCount; $opt++) {
$options['option_' . $opt] = '';
$options['option_' . $opt . '_values'] = '';
}
// prepare inputs
$inputs = array('has_input_fields' => '0');
for ($inp = 1; $inp <= $this->defaultItemRowInputCount; $inp++) {
$inputs['input_field_' . $inp . '_number'] = '';
$inputs['input_field_' . $inp . '_type'] = '';
$inputs['input_field_' . $inp . '_label'] = '';
$inputs['input_field_' . $inp . '_infotext'] = '';
$inputs['input_field_' . $inp . '_required'] = '';
$inputs['input_field_' . $inp . '_add_amount'] = '';
}
$rowHead = array(
/* responsible fields */
'item_number' => "",
'item_name' => "",
);
if ($this->useTaxClasses) {
$tax = array(
'unit_amount_net' => "",
'tax_class' => "",
'old_unit_amount_net' => "",
);
} else {
$tax = array(
'unit_amount' => "",
'currency' => "EUR",
'tax_percent' => "",
'old_unit_amount' => "",
);
}
$rowBody = array('currency' => "EUR",
'description' => "",
'urls_images' => "",
'categories' => "",
'category_numbers' => "",
ca. Zeile 1061
'manufacturer_item_number' => "",
'url_deeplink' => "",
/* additional fields */
'item_number_public' => "",
'old_unit_amount' => "",
'properties' => "",
'msrp' => "",
'shipping_costs_per_order' => "0",
'additional_shipping_costs_per_unit' => "0",
ca. Zeile 1086
'highlight_order_index' => "0",
'marketplace' => "1",
'internal_order_info' => "",
'related_shop_item_numbers' => "",
'related_shop_items' => "",
'age_rating' => "",
'weight' => "",
'block_pricing' => "",
'weight_unit' => "",
'is_hidden' => "",
/* parent/child relationship */
'has_children' => "0",
'parent_item_number' => "",
'attribute_1' => "",
'attribute_2' => "",
'attribute_3' => "",
'attribute_4' => "",
'attribute_5' => "",
'attribute_6' => "",
'attribute_7' => "",
'attribute_8' => "",
'attribute_9' => "",
'attribute_10' => "",
/* options */
'has_options' => "0",
'option_1' => "",
'option_1_values' => "",
'option_2' => "",
'option_2_values' => "",
'option_3' => "",
'option_3_values' => "",
'option_4' => "",
'option_4_values' => "",
'option_5' => "",
'option_5_values' => "",
'option_6' => "",
'option_6_values' => "",
'option_7' => "",
'option_7_values' => "",
'option_8' => "",
'option_8_values' => "",
'option_9' => "",
'option_9_values' => "",
'option_10' => "",
'option_10_values' => "",
/* inputfields */
'has_input_fields' => "0",
'input_field_1_number' => "",
'input_field_1_type' => "",
'input_field_1_label' => "",
'input_field_1_infotext' => "",
'input_field_1_required' => "",
'input_field_1_add_amount' => "",
'input_field_2_number' => "",
'input_field_2_type' => "",
'input_field_2_label' => "",
'input_field_2_infotext' => "",
'input_field_2_required' => "",
'input_field_2_add_amount' => "",
'input_field_3_number' => "",
'input_field_3_type' => "",
'input_field_3_label' => "",
'input_field_3_infotext' => "",
'input_field_3_required' => "",
'input_field_3_add_amount' => "",
'input_field_4_number' => "",
'input_field_4_type' => "",
'input_field_4_label' => "",
'input_field_4_infotext' => "",
'input_field_4_required' => "",
'input_field_4_add_amount' => "",
'input_field_5_number' => "",
'input_field_5_type' => "",
'input_field_5_label' => "",
'input_field_5_infotext' => "",
'input_field_5_required' => "",
'input_field_5_add_amount' => "",
'input_field_6_number' => "",
'input_field_6_type' => "",
'input_field_6_label' => "",
'input_field_6_infotext' => "",
'input_field_6_required' => "",
'input_field_6_add_amount' => "",
'input_field_7_number' => "",
'input_field_7_type' => "",
'input_field_7_label' => "",
'input_field_7_infotext' => "",
'input_field_7_required' => "",
'input_field_7_add_amount' => "",
'input_field_8_number' => "",
'input_field_8_type' => "",
'input_field_8_label' => "",
'input_field_8_infotext' => "",
'input_field_8_required' => "",
'input_field_8_add_amount' => "",
'input_field_9_number' => "",
'input_field_9_type' => "",
'input_field_9_label' => "",
'input_field_9_infotext' => "",
'input_field_9_required' => "",
'input_field_9_add_amount' => "",
'input_field_10_number' => "",
'input_field_10_type' => "",
'input_field_10_label' => "",
'input_field_10_infotext' => "",
'input_field_10_required' => "",
'input_field_10_add_amount' => "",
);
$row =
$rowHead +
$tax +
$rowBody+
$attributes +
$options +
$inputs;
return $row;
}
/**
* @return Shopgate_Model_Catalog_Product
* @see http://wiki.shopgate.com/get_items
*/
protected function buildDefaultItemModel() {
return new Shopgate_Model_Catalog_Product();
}
/**
* @return string[] An array with the csv file field names as indices and empty strings as values.
* @see http://wiki.shopgate.com/CSV_File_Media
*/
protected function buildDefaultMediaRow() {
return array(
'item_number' => '',
'type' =>'',
'parameter' => array(),
);
}
/**
* @return string[] An array with the csv file field names as indices and empty strings as values.
* @see http://wiki.shopgate.com/CSV_File_Reviews/
*/
protected function buildDefaultReviewRow() {
ca. Zeile 1218
return $this->buildDefaultReviewRow();
}
/**
* Rounds and formats a price.
*
* @param float $price The price of an item.
* @param int $digits The number of digits after the decimal separator.
* @param string $decimalPoint The decimal separator.
* @param string $thousandPoints The thousands separator.
*/
protected function formatPriceNumber($price, $digits = 2, $decimalPoint = ".", $thousandPoints = "") {
$price = round($price, $digits);
$price = number_format($price, $digits, $decimalPoint, $thousandPoints);
return $price;
}
/**
* Removes all disallowed HTML tags from a given string.
*
* By default the following are allowed:
*
ca. Zeile 1250
* @param string[] $additionalAllowedTags Additional tags to be allowed.
*
* @return string The sanititzed string.
*/
protected function removeTagsFromString($string, $removeTags = array(), $additionalAllowedTags = array()) {
// all tags available
$allowedTags = array("ADDRESS", "AREA", "A", "BASE", "BASEFONT", "BIG", "BLOCKQUOTE",
"BODY", "BR", "B", "CAPTION", "CENTER", "CITE", "CODE", "DD", "DFN", "DIR", "DIV", "DL", "DT",
"EM", "FONT", "FORM", "H1", "H2", "H3", "H4", "H5", "H6", "HEAD", "HR", "HTML", "IMG", "INPUT",
"ISINDEX", "I", "KBD", "LINK", "LI", "MAP", "MENU", "META", "OL", "OPTION", "PARAM", "PRE",
"P", "SAMP", "SELECT", "SMALL", "STRIKE", "STRONG", "STYLE", "SUB", "SUP",
"TABLE", "TD", "TEXTAREA", "TH", "TITLE", "TR", "TT", "UL", "U", "VAR"
);
foreach ($allowedTags as &$t) $t = strtolower($t);
foreach ($removeTags as &$t) $t = strtolower($t);
foreach ($additionalAllowedTags as &$t) $t = strtolower($t);
// some tags must be removed completely (including content)
$string = preg_replace('#<script([^>]*?)>(.*?)</script>#is', '', $string);
$string = preg_replace('#<style([^>]*?)>(.*?)</style>#is', '', $string);
$string = preg_replace('#<link([^>]*?)>(.*?)</link>#is', '', $string);
$string = preg_replace('#<script([^>]*?)/>#is', '', $string);
$string = preg_replace('#<style([^>]*?)/>#is', '', $string);
$string = preg_replace('#<link([^>]*?)/>#is', '', $string);
// add the additional allowed tags to the list
$allowedTags = array_merge($allowedTags, $additionalAllowedTags);
// strip the disallowed tags from the list
$allowedTags = array_diff($allowedTags, $removeTags);
protected function removeTagsFromString($string, $removeTags = array(), $additionalAllowedTags = array())
{
$helper = $this->getHelper(self::HELPER_STRING);
return $helper->removeTagsFromString($string, $removeTags, $additionalAllowedTags);
}
// add HTML brackets
foreach ($allowedTags as &$t) $t = "<$t>";
/**
* Rounds and formats a price.
*
* @param float $price The price of an item.
* @param int $digits The number of digits after the decimal separator.
* @param string $decimalPoint The decimal separator.
* @param string $thousandPoints The thousands separator.
* @return float|string
*/
protected function formatPriceNumber($price, $digits = 2, $decimalPoint = ".", $thousandPoints = "")
{
$helper = $this->getHelper(self::HELPER_PRICING);
return $helper->formatPriceNumber($price, $digits, $decimalPoint, $thousandPoints);
}
// let PHP sanitize the string and return it
return strip_tags($string, implode(",", $allowedTags));
/**
* Takes an array of arrays that contain all elements which are taken to create a cross-product of all elements. The resulting array is an array-list with
* each possible combination as array. An Element itself can be anything (including a whole array that is not torn apart, but instead treated as a whole)
* By setting the second parameter to true, the keys of the source array is added as an array at the front of the resulting array
*
* Sample input: array(
* 'group-1-key' => array('a', 'b'),
* 'group-2-key' => array('x'),
* 7 => array('l', 'm', 'n'),
* );
* Output of sample: Array (
* [0] => Array (
* [group-1-key] => a
* [group-2-key] => x
* [7] => l
* )
* [1] => Array (
* [group-1-key] => b
* [group-2-key] => x
* [7] => l
* )
* [2] => Array (
* [group-1-key] => a
* [group-2-key] => x
* [7] => m
* )
* [...] and so on ... (total of count(src[0])*count(src[1])*...*count(src[N]) elements) [=> 2*1*3 elements in this case]
* )
*
* @param array $src: The (at least) double dimensioned array input
* @param bool $enableFirstRow: Disabled by default
* @return array[][]:
*/
protected function arrayCross(array $src, $enableFirstRow = false)
{
$helper = $this->getHelper(self::HELPER_DATASTRUCTURE);
return $helper->arrayCross($src, $enableFirstRow);
}
/**
*
* @param array $loaders
* @param array $shopgateItemArray
* @param mixed $dataObject or $dataArray to access
* @return mixed
* @throws ShopgateLibraryException
*/
protected final function executeLoaders(array $loaders)
{
$arguments = func_get_args();
array_shift($arguments);
foreach ($loaders as $method) {
if (method_exists($this, $method)) {
$this->log("Call Function {$method}", ShopgateLogger::LOGTYPE_DEBUG);
$this->log("Calling function \"{$method}\": Actual memory usage before method: " . $this->getMemoryUsageString(), ShopgateLogger::LOGTYPE_DEBUG);
try {
$result = call_user_func_array( array( $this, $method ), $arguments );
} catch (ShopgateLibraryException $e) {
// pass through known Shopgate Library Exceptions
throw $e;
} catch (Exception $e) {
$msg = "An unknown exception has been thrown in loader method \"{$method}\". Memory usage "
. $this->getMemoryUsageString()." Exception '".get_class($e)."': [Code: {$e->getCode()}] {$e->getMessage()}";
throw new ShopgateLibraryException(ShopgateLibraryException::UNKNOWN_ERROR_CODE, $msg, true, true, $e);
}
// if( ShopgateLogger::getInstance()->isDebugEnabled()
// && is_array($result) && is_array( $arguments[0]) ) {
// $diff = array_diff_assoc($result, $arguments[0]);
// $this->log("Changed Data:\n". print_r($diff, true), ShopgateLogger::LOGTYPE_DEBUG);
// }
if ($result) {
$arguments[0] = $result;
}
}
}
return $arguments[0];
}
/**
* Creates an array of corresponding helper method names, based on the export type given
* @param string $exportType
* @param string $subjectName
* @return array
*/
private final function getCreateCsvLoaders($subjectName) {
$actions = array();
$subjectName = trim($subjectName);
if(!empty($subjectName)) {
$subjectName = ($subjectName);
$methodName = 'buildDefault'.$this->camelize($subjectName, true).'Row';
if(method_exists($this, $methodName)) {
foreach(array_keys($this->{$methodName}() ) as $sKey) {
$actions[] = $subjectName."Export" . $this->camelize($sKey, true);
ca. Zeile 1351
/**
* Returns an array with the method names of all item-loaders
*
* Example: exportItemNumber, exportType
*
* @return array
*/
protected function getCreateMediaCsvLoaders() {
return $this->getCreateCsvLoaders("media");
}
/**
* Returns an array with the method names of all item-loaders
*
* Example: exportCategoryCategoryNumber, exportCategoryCategoryName
*
* @return array
*/
ca. Zeile 1368
protected function getCreateReviewsCsvLoaders() {
return $this->getCreateCsvLoaders("review");
}
/**
* disables an API method in the local config
*
* @param string $actionName
*/
public function disableAction($actionName) {
$shopgateSettingsNew = array('enable_' . $actionName => 0);
$this->config->load($shopgateSettingsNew);
$this->config->save(array_keys($shopgateSettingsNew), true);
}
#################################################################################
## Following methods are the callbacks that need to be implemented by plugins. ##
#################################################################################
ca. Zeile 1378
*
* This method gets called on instantiation of a ShopgatePlugin child class and serves as __construct() replacement.
*
* Important: Initialize $this->config here if you have your own config class.
*
* @see http://wiki.shopgate.com/Shopgate_Library#startup.28.29
*/
public abstract function startup();
/**
* Callback method for the PluginAPI to be able to retrieve the correct URI directing to a specific PluginAPI-action
* Override this method if the plugin does not have its own entry point (e.g. MVC-implementations that only provide a controller and controller-action as entry point)
*
* @param $pluginApiActionName
* @return string URL
*/
public function getActionUrl($pluginApiActionName) {
return 'http'.(!empty($_SERVER['HTTPS']) ? 's' : '').'://'. trim($_SERVER['HTTP_HOST'], '/') . '/' . trim($_SERVER['SCRIPT_NAME'], '/');
}
/**
* Executes a cron job with parameters.
*
* @param string $jobname The name of the job to execute.
* @param <string => mixed> $params Associative list of parameter names and values.
ca. Zeile 1395
public abstract function cron($jobname, $params, &$message, &$errorcount);
/**
* Callback function for the Shopgate Plugin API ping action.
*
* Override this to append additional information about shop system to the response of the ping action.
*
* @return mixed[] An array with additional information.
*/
public function createPluginInfo() { return array(); }
/**
* This performs the necessary queries to build a ShopgateCustomer object for the given log in credentials.
* Callback function for the Shopgate Plugin API ping action.
* Override this to append additional information about shop system to the response of the ping action.
*
* @return mixed[] An array with additional information.
*/
public function createShopInfo() {
$shopInfo = array(
'category_count' => 0,
'item_count' => 0,
);
if ($this->config->getEnableGetReviewsCsv()) {
$shopInfo['review_count'] = 0;
}
if ($this->config->getEnableGetMediaCsv()) {
$shopInfo['media_count'] = array();
}
return $shopInfo;
}
/**
* Callback function for the Shopgate Plugin API Debug action.
* Override this to append additional information about shop system to the response of the Debug action.
*
* @return mixed[] An string with additional information.
*/
public function getDebugInfo() { return ''; }
/**
* This performs the necessary queries to build a ShopgateCustomer object for the given log in credentials.
* The method should not abort on soft errors like when the street or phone number of a customer can't be found.
*
* @see http://developer.shopgate.com/plugin_api/customers/get_customer
*
* @param string $user The user name the customer entered at Shopgate Connect.
* @param string $pass The password the customer entered at Shopgate Connect.
* @return ShopgateCustomer A ShopgateCustomer object.
* @throws ShopgateLibraryException on invalid log in data or hard errors like database failure.
*/
public abstract function getCustomer($user, $pass);
/**
* This method creates a new user account / user addresses for a customer in the shop system's database
* The method should not abort on soft errors like when the street or phone number of a customer is not set.
*
* @see http://developer.shopgate.com/plugin_api/customers/register_customer
*
* @param string $user The user name the customer entered at Shopgate.
* @param string $pass The password the customer entered at Shopgate.
* @param ShopgateCustomer $customer A ShopgateCustomer object to be added to the shop system's database.
* @throws ShopgateLibraryException if an error occurs
*/
public abstract function registerCustomer($user, $pass, ShopgateCustomer $customer);
/**
* Performs the necessary queries to add an order to the shop system's database.
*
* @see http://developer.shopgate.com/merchant_api/orders/get_orders
* @see http://developer.shopgate.com/plugin_api/orders/add_order
*
* @param ShopgateOrder $order The ShopgateOrder object to be added to the shop system's database.
* @return array(
* <ul>
* <li>'external_order_id' => <i>string</i>, # the ID of the order in your shop system's database</li>
ca. Zeile 1430
/**
* Performs the necessary queries to update an order in the shop system's database.
*
* @param ShopgateOrder $order The ShopgateOrder object to be update in the shop system's database.
* @param bool $payment True if the payment status of an order should be updated, false otherwise.
* @see http://developer.shopgate.com/merchant_api/orders/get_orders
* @see http://developer.shopgate.com/plugin_api/orders/update_order
*
* @param ShopgateOrder $order The ShopgateOrder object to be updated in the shop system's database.
* @return array(
* <ul>
* <li>'external_order_id' => <i>string</i>, # the ID of the order in your shop system's database</li>
* <li>'external_order_number' => <i>string</i> # the number of the order in your shop system</li>
ca. Zeile 1442
*/
public abstract function updateOrder(ShopgateOrder $order);
/**
* Loads the products of the shop system's database and passes them to the buffer.
* Redeems coupons that are passed along with a ShopgateCart object.
*
* If $this->splittedExport is set to "true", you MUST regard $this->offset and $this->limit when fetching items from the database.
* @see http://developer.shopgate.com/plugin_api/coupons
*
* @param ShopgateCart $cart The ShopgateCart object containing the coupons that should be redeemed.
* @return array('external_coupons' => ShopgateExternalCoupon[])
* @throws ShopgateLibraryException if an error occurs.
*
* @deprecated no longer supported.
*/
public function redeemCoupons(ShopgateCart $cart){
$this->disableAction('redeem_coupons');
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_DISABLED_ACTION,
'The requested action is disabled and no longer supported.',
true,
false
);
}
/**
* Checks the content of a cart to be valid and returns necessary changes if applicable.
*
*
* @see http://developer.shopgate.com/plugin_api/cart
*
* @param ShopgateCart $cart The ShopgateCart object to be checked and validated.
* @return array(
* <ul>
* <li>'external_coupons' => ShopgateExternalCoupon[], # list of all coupons</li>
* <li>'items' => ShopgateCartItem[], # list of item changes</li>
* <li>'shippings' => ShopgateShippingMethod[], # list of available shipping services for this cart</li>
* </ul>)
* @throws ShopgateLibraryException if an error occurs.
*/
public abstract function checkCart(ShopgateCart $cart);
/**
* Checks the items array and returns stock quantity for each item.
*
*
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_check_cart#API_Response
*
* @param ShopgateCart $cart The ShopgateCart object to be checked and validated.
*
* @return ShopgateCartItem[] list of item changes
* @throws ShopgateLibraryException if an error occurs.
*/
public abstract function checkStock(ShopgateCart $cart);
/**
* Returns an array of certain settings of the shop. (Currently mainly tax settings.)
*
*
* @see http://developer.shopgate.com/plugin_api/system_information/get_settings
*
* @return array(
* <ul>
* <li>'tax' => Contains the tax settings as follows:
* <ul>
* <li>'tax_classes_products' => A list of product tax class identifiers.</li>
* <li>'tax_classes_customers' => A list of customer tax classes.</li>
* <li>'tax_rates' => A list of tax rates.</li>
* <li>'tax_rules' => A list of tax rule containers.</li>
* </ul>
* </li>
* </ul>)
* @throws ShopgateLibraryException on invalid log in data or hard errors like database failure.
*/
public abstract function getSettings();
/**
* Loads the products of the shop system's database and passes them to the buffer.
*
* If $this->splittedExport is set to "true", you MUST regard $this->offset and $this->limit when fetching items from the database.
*
* Use ShopgatePlugin::buildDefaultItemRow() to get the correct indices for the field names in a Shopgate items csv and
* use ShopgatePlugin::addItemRow() to add it to the output buffer.
*
* @see http://developer.shopgate.com/file_formats/csv/products
* @see http://developer.shopgate.com/plugin_api/export/get_items_csv
*
* @throws ShopgateLibraryException
*
* @deprecated Use createItems().
*/
protected function createItemsCsv(){
$this->disableAction('get_items_csv');
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_DISABLED_ACTION,
'The requested action is not disabled but has not been implemented in this plugin.',
true,
false
);
}
/**
* Loads the Media file information to the products of the shop system's database and passes them to the buffer.
*
* Use ShopgatePlugin::buildDefaultMediaRow() to get the correct indices for the field names in a Shopgate media csv and
* use ShopgatePlugin::addMediaRow() to add it to the output buffer.
*
* @see http://wiki.shopgate.com/CSV_File_Media#Sample_Media_CSV_file
* @see http://developer.shopgate.com/plugin_api/export/get_media_csv
*
* @throws ShopgateLibraryException
*/
protected abstract function createItemsCsv();
protected abstract function createMediaCsv();
/**
* Loads the product categories of the shop system's database and passes them to the buffer.
*
* Use ShopgatePlugin::buildDefaultCategoryRow() to get the correct indices for the field names in a Shopgate categories csv and
* use ShopgatePlugin::addCategoryRow() to add it to the output buffer.
*
* @see http://developer.shopgate.com/file_formats/csv/categories
* @see http://developer.shopgate.com/plugin_api/export/get_categories_csv
*
* @throws ShopgateLibraryException
*
* @deprecated Use createCategories().
*/
protected abstract function createCategoriesCsv();
protected function createCategoriesCsv() {
$this->disableAction('get_categories_csv');
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_DISABLED_ACTION,
'The requested action is not disabled but has not been implemented in this plugin.',
true,
false
);
}
/**
* Loads the product reviews of the shop system's database and passes them to the buffer.
*
* Use ShopgatePlugin::buildDefaultReviewRow() to get the correct indices for the field names in a Shopgate reviews csv and
* use ShopgatePlugin::addReviewRow() to add it to the output buffer.
*
* @see http://developer.shopgate.com/file_formats/csv/reviews
* @see http://developer.shopgate.com/plugin_api/export/get_reviews_csv
*
* @throws ShopgateLibraryException
*
* @deprecated Use createReviews().
*/
protected function createReviewsCsv() {
$this->disableAction('get_reviews_csv');
throw new ShopgateLibraryException(
ShopgateLibraryException::PLUGIN_API_DISABLED_ACTION,
'The requested action is not disabled but has not been implemented in this plugin.',
true,
false
);
}
/**
* Exports orders from the shop system's database to Shopgate.
*
* @see http://developer.shopgate.com/plugin_api/orders/get_orders
*
* @param string $customerToken
* @param string $customerLanguage
* @param int $limit
* @param int $offset
* @param string $orderDateFrom
* @param string $sortOrder
*
* @return ShopgateExternalOrder[] A list of ShopgateExternalOrder objects
*
* @throws ShopgateLibraryException
*/
public abstract function getOrders($customerToken, $customerLanguage, $limit = 10, $offset = 0, $orderDateFrom = '', $sortOrder = 'created_desc');
/**
* Updates and returns synchronization information for the favourite list of a customer.
*
* @see http://developer.shopgate.com/plugin_api/customers/sync_favourite_list
*
* @param string $customerToken
* @param ShopgateSyncItem[] $items A list of ShopgateSyncItem objects that need to be synchronized
*
* @return ShopgateSyncItem[] The updated list of ShopgateSyncItem objects
*/
public abstract function syncFavouriteList($customerToken, $items);
/**
* Loads the products of the shop system's database and passes them to the buffer.
*
* @param int $limit pagination limit; if not null, the number of exported items must be <= $limit
* @param int $offset pagination; if not null, start the export with the item at position $offset
* @param string[] $uids a list of item UIDs that should be exported
*
* @see http://developer.shopgate.com/plugin_api/export/get_items
*
* @throws ShopgateLibraryException
*/
protected abstract function createItems($limit = null, $offset = null, array $uids = array());
/**
* Loads the product categories of the shop system's database and passes them to the buffer.
*
* @param int $limit pagination limit; if not null, the number of exported categories must be <= $limit
* @param int $offset pagination; if not null, start the export with the categories at position $offset
* @param string[] $uids a list of categories UIDs that should be exported
*
* @see http://developer.shopgate.com/plugin_api/export/get_categories
*
* @throws ShopgateLibraryException
*/
protected abstract function createReviewsCsv();
protected abstract function createCategories($limit = null, $offset = null, array $uids = array());
/**
* Loads the product pages of the shop system's database and passes them to the buffer.
* Loads the product reviews of the shop system's database and passes them to the buffer.
*
* @param int $limit pagination limit; if not null, the number of exported reviews must be <= $limit
* @param int $offset pagination; if not null, start the export with the reviews at position $offset
* @param string[] $uids A list of products that should be fetched for the reviews.
*
* @see http://developer.shopgate.com/plugin_api/export/get_reviews
*
* @throws ShopgateLibraryException
*/
//protected abstract function getPagesCsv();
protected abstract function createReviews($limit = null, $offset = null, array $uids = array());
}
interface ShopgateFileBufferInterface {
/**
ca. Zeile 1505
*/
public function finish();
}
class ShopgateFileBuffer extends ShopgateObject implements ShopgateFileBufferInterface {
abstract class ShopgateFileBuffer extends ShopgateObject implements ShopgateFileBufferInterface {
/**
* @var string[]
*/
private $allowedEncodings = array(
SHOPGATE_LIBRARY_ENCODING, 'ASCII', 'CP1252', 'ISO-8859-15', 'UTF-16LE','ISO-8859-1'
);
protected $allowedEncodings;
/**
* @var bool true to enable automatic encoding conversion to utf-8
*/
ca. Zeile 1549
*
* The object is NOT ready to use. Call setFile() first to associate it with a file first.
*
* @param int $capacity
* @param bool $encoding true to enable automatic encoding conversion to utf-8
* @param bool $convertEncoding true to enable automatic encoding conversion to utf-8
* @param array $sourceEncodings
*/
public function __construct($capacity, $convertEncoding = true) {
public function __construct($capacity, $convertEncoding = true, array $sourceEncodings = array()) {
$this->timeStart = time();
$this->buffer = array();
$this->capacity = $capacity;
$this->convertEncoding = $convertEncoding;
$this->allowedEncodings = $sourceEncodings;
}
public function setFile($filePath) {
$this->filePath = $filePath;
$this->buffer = array();
if (empty($this->fileHandle)) {
if (!preg_match("/^php/", $filePath)) {
$filePath = $this->filePath.".tmp";
}
$this->log('Trying to create "'.basename($filePath).'". ', 'access');
$this->fileHandle = @fopen($filePath, 'w');
if (!$this->fileHandle) {
ca. Zeile 1590
* @throws ShopgateLibraryException if the buffer and file are empty.
*/
protected function flush() {
if (empty($this->buffer) && ftell($this->fileHandle) == 0) {
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_FILE_EMPTY_BUFFER);
throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_FILE_EMPTY_BUFFER, null, false, false);
}
// write headline if it's the beginning of the file
// perform prerequisites on first call
if (ftell($this->fileHandle) == 0) {
$this->onStart();
}
// perform response type specific flushing
$this->onFlush();
// clear buffer
$this->buffer = array();
}
/**
* Callback for deriving classes.
*
* This gets called when $this->flush() gets called for the first time and can be used to output headlines
* or any other necessary prerequisite.
*/
abstract protected function onStart();
/**
* Callback for deriving classes.
*
* This gets called after checking for an empty buffer and before emptying $this->buffer and should
* flush all data to the given output file.
*/
abstract protected function onFlush();
/**
* Callback for deriving classes.
*
* This gets called after all contents of the buffer have been flushed and before the temporary output file
* is renamed to its original name.
*/
abstract protected function onFinish();
public function finish() {
$this->flush();
$this->onFinish();
fclose($this->fileHandle);
$this->fileHandle = null;
if (!preg_match("/^php/", $this->filePath)) {
// FIX for Windows Servers
if (file_exists($this->filePath)) {
unlink($this->filePath);
}
rename($this->filePath.".tmp", $this->filePath);
}
$this->log('Fertig, '.basename($this->filePath).' wurde erfolgreich erstellt', "access");
$duration = time() - $this->timeStart;
$this->log("Dauer: $duration Sekunden", "access");
}
}
class ShopgateFileBufferCsv extends ShopgateFileBuffer {
protected function onStart() {
fputcsv($this->fileHandle, array_keys($this->buffer[0]), ';', '"');
}
protected function onFlush() {
foreach ($this->buffer as $item) {
if (!empty($this->convertEncoding)) {
foreach ($item as &$field) {
$field = $this->stringToUtf8($field, $this->allowedEncodings);
ca. Zeile 1607
}
fputcsv($this->fileHandle, $item, ";", "\"");
}
}
$this->buffer = array();
protected function onFinish() { /* no finishing necessary for CSV files */ }
}
public function finish() {
$this->flush();
fclose($this->fileHandle);
$this->fileHandle = null;
class ShopgateFileBufferJson extends ShopgateFileBuffer {
protected function onStart() {
fputs($this->fileHandle, '[');
}
rename($this->filePath.".tmp", $this->filePath);
protected function onFlush() {
$result = array();
$this->log('Fertig, '.basename($this->filePath).' wurde erfolgreich erstellt', "access");
$duration = time() - $this->timeStart;
$this->log("Dauer: $duration Sekunden", "access");
foreach ($this->buffer as $item) {
/* @var $item Shopgate_Model_AbstractExport */
$result[] = $this->jsonEncode($item->asArray());
}
if (!empty($result)) {
fputs($this->fileHandle, implode(',', $result).',');
}
}
protected function onFinish() {
fseek($this->fileHandle, -1, SEEK_END);
fputs($this->fileHandle, ']');
}
}
class ShopgateFileBufferXml extends ShopgateFileBuffer {
/**
* @var Shopgate_Model_XmlResultObject
*/
protected $xmlNode;
/**
* @var Shopgate_Model_AbstractExport
*/
protected $xmlModel;
/**
* @param Shopgate_Model_Abstract $xmlModel
* @param Shopgate_Model_XmlResultObject $xmlNode
* @param null|string $capacity
* @param bool $convertEncoding
* @param array $sourceEncodings
*/
public function __construct(Shopgate_Model_Abstract $xmlModel, Shopgate_Model_XmlResultObject $xmlNode, $capacity, $convertEncoding = true, array $sourceEncodings = array()) {
parent::__construct($capacity, $convertEncoding, $sourceEncodings);
$this->xmlNode = $xmlNode;
$this->xmlModel = $xmlModel;
}
protected function onStart() {
fputs($this->fileHandle, sprintf(
'<%s xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="%s">',
$this->xmlModel->getIdentifier(),
$this->xmlModel->getXsdFileLocation()
));
}
protected function onFlush() {
$itemsNode = clone $this->xmlNode;
foreach ($this->buffer as $item) {
/* @var $item Shopgate_Model_AbstractExport */
$item->asXml($itemsNode);
}
foreach ($itemsNode as $xmlItem) {
/* @var $xmlItem Shopgate_Model_XmlResultObject */
fputs($this->fileHandle, $xmlItem->asXML());
}
}
protected function onFinish() {
fputs($this->fileHandle, '</'.$this->xmlModel->getIdentifier().'>');
}
}
/**
ca. Zeile 1674
return $unmappedData;
}
/**
* Compares values of two containers.
*
* @param ShopgateContainer $obj
* @param ShopgateContainer $obj2
* @param $whitelist
* @return bool
*/
public function compare($obj,$obj2,$whitelist) {
foreach ($whitelist as $acceptedField) {
if ($obj->{$this->camelize('get_'.$acceptedField)}() != $obj2->{$this->camelize('get_'.$acceptedField)}()) {
return false;
}
}
return true;
}
/**
* Converts the Container object recursively to an associative array.
*
* @return mixed[]
*/
ca. Zeile 1689
* Creates a new object of the same type with every value recursively utf-8 encoded.
*
* @param String $sourceEncoding The source Encoding of the strings
* @param bool $force Set this true to enforce encoding even if the source encoding is already UTF-8.
* @param bool $useIconv True to use iconv instead of mb_convert_encoding even if the mb library is present.
* @return ShopgateContainer The new object with utf-8 encoded values.
*/
public function utf8Encode($sourceEncoding = 'ISO-8859-15', $force = false) {
$visitor = new ShopgateContainerUtf8Visitor(ShopgateContainerUtf8Visitor::MODE_ENCODE, $sourceEncoding, $force);
public function utf8Encode($sourceEncoding = 'ISO-8859-15', $force = false, $useIconv = false) {
$visitor = new ShopgateContainerUtf8Visitor(ShopgateContainerUtf8Visitor::MODE_ENCODE, $sourceEncoding, $force, $useIconv);
$visitor->visitContainer($this);
return $visitor->getObject();
}
ca. Zeile 1702
* Creates a new object of the same type with every value recursively utf-8 decoded.
*
* @param String $destinationEncoding The destination Encoding for the strings
* @param bool $force Set this true to enforce encoding even if the destination encoding is set to UTF-8.
* @param bool $useIconv True to use iconv instead of mb_convert_encoding even if the mb library is present.
* @return ShopgateContainer The new object with utf-8 decoded values.
*/
public function utf8Decode($destinationEncoding = 'ISO-8859-15', $force = false) {
$visitor = new ShopgateContainerUtf8Visitor(ShopgateContainerUtf8Visitor::MODE_DECODE, $destinationEncoding, $force);
public function utf8Decode($destinationEncoding = 'ISO-8859-15', $force = false, $useIconv = false) {
$visitor = new ShopgateContainerUtf8Visitor(ShopgateContainerUtf8Visitor::MODE_DECODE, $destinationEncoding, $force, $useIconv);
$visitor->visitContainer($this);
return $visitor->getObject();
}
ca. Zeile 1744
* @author Shopgate GmbH, 35510 Butzbach, DE
*/
interface ShopgateContainerVisitor {
public function visitContainer(ShopgateContainer $c);
public function visitPlainObject(ShopgateContainer $c);
public function visitCustomer(ShopgateCustomer $c);
public function visitAddress(ShopgateAddress $a);
public function visitCart(ShopgateCart $c);
public function visitOrder(ShopgateOrder $o);
public function visitExternalOrder(ShopgateExternalOrder $o);
public function visitExternalOrderTax(ShopgateExternalOrderTax $t);
public function visitExternalOrderExtraCost(ShopgateExternalOrderExtraCost $c);
public function visitOrderItem(ShopgateOrderItem $i);
public function visitExternalOrderItem(ShopgateExternalOrderItem $i);
public function visitSyncItem(ShopgateSyncItem $i);
public function visitOrderItemOption(ShopgateOrderItemOption $o);
public function visitOrderItemInput(ShopgateOrderItemInput $i);
public function visitOrderItemAttribute(ShopgateOrderItemAttribute $o);
public function visitOrderCustomField(ShopgateOrderCustomField $c);
public function visitShippingInfo(ShopgateShippingInfo $o);
public function visitOrderDeliveryNote(ShopgateDeliveryNote $d);
public function visitExternalCoupon(ShopgateExternalCoupon $c);
public function visitShopgateCoupon(ShopgateShopgateCoupon $c);
public function visitCategory(ShopgateCategory $d);
public function visitItem(ShopgateItem $i);
public function visitItemOption(ShopgateItemOption $i);
public function visitItemOptionValue(ShopgateItemOptionValue $i);
public function visitItemInput(ShopgateItemInput $i);
public function visitConfig(ShopgateConfig $c);
public function visitShippingMethod(ShopgateShippingMethod $c);
public function visitPaymentMethod(ShopgatePaymentMethod $c);
public function visitCartItem(ShopgateCartItem $c);
public function visitCartCustomer(ShopgateCartCustomer $c);
}
/**
* Creates a new object with every value inside utf-8 de- / encoded.
ca. Zeile 1773
protected $object;
protected $mode;
protected $encoding;
protected $force;
protected $useIconv;
/**
* @param int $mode Set mode to one of the two class constants. Default is MODE_DECODE.
* @param string $encoding The source or destination encoding according to PHP's mb_convert_encoding().
* @param bool $force Set this true to enforce encoding even if the source or destination encoding is UTF-8.
* @param bool $useIconv True to use iconv instead of mb_convert_encoding even if the mb library is present.
* @see http://www.php.net/manual/en/function.mb-convert-encoding.php
*/
public function __construct($mode = self::MODE_DECODE, $encoding = 'ISO-8859-15', $force = false) {
public function __construct($mode = self::MODE_DECODE, $encoding = 'ISO-8859-15', $force = false, $useIconv = false) {
switch ($mode) {
// default mode
default: $mode = self::MODE_DECODE;
ca. Zeile 1792
break;
}
$this->encoding = $encoding;
$this->force = $force;
$this->useIconv = $useIconv;
}
/**
* @return ShopgateContainer the utf-8 de- / encoded newly built object.
ca. Zeile 1807
$this->firstObject = &$c;
$c->accept($this);
}
public function visitPlainObject(ShopgateContainer $c) {
// get properties
$properties = $c->buildProperties();
// iterate the simple variables
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$className = get_class($c);
$this->object = new $className($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitCustomer(ShopgateCustomer $c) {
// get properties
$properties = $c->buildProperties();
// iterate the simple variables
$this->iterateSimpleProperties($properties);
// iterate ShopgateAddress objects
$properties['custom_fields'] = $this->iterateObjectList($properties['custom_fields']);
$properties['addresses'] = $this->iterateObjectList($properties['addresses']);
$properties['customer_groups'] = $this->iterateObjectList($properties['customer_groups']);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateCustomer($properties);
ca. Zeile 1829
public function visitAddress(ShopgateAddress $a) {
$properties = $a->buildProperties();
$this->iterateSimpleProperties($properties);
$properties['custom_fields'] = $this->iterateObjectList($properties['custom_fields']);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateAddress($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitOrder(ShopgateOrder $o) {
public function visitCart(ShopgateCart $c) {
// get properties
$properties = $o->buildProperties();
$properties = $c->buildProperties();
// iterate the simple variables and arrays with simple variables recursively
$this->iterateSimpleProperties($properties);
ca. Zeile 1856
$properties['invoice_address']->accept($this);
$properties['invoice_address'] = $this->object;
}
// visit shipping_infos
if (!empty($properties['shipping_infos']) && ($properties['shipping_infos'] instanceof ShopgateShippingInfo)) {
$properties['shipping_infos']->accept($this);
$properties['shipping_infos'] = $this->object;
}
// iterate lists of referred objects
$properties['external_coupons'] = $this->iterateObjectList($properties['external_coupons']);
$properties['shopgate_coupons'] = $this->iterateObjectList($properties['shopgate_coupons']);
$properties['items'] = $this->iterateObjectList($properties['items']);
$properties['delivery_notes'] = $this->iterateObjectList($properties['delivery_notes']);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateOrder($properties);
$this->object = new ShopgateCart($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitOrderItem(ShopgateOrderItem $i) {
public function visitOrder(ShopgateOrder $o) {
// get properties
$properties = $i->buildProperties();
$properties = $o->buildProperties();
// iterate the simple variables
// iterate the simple variables and arrays with simple variables recursively
$this->iterateSimpleProperties($properties);
// visit delivery_address
if (!empty($properties['delivery_address']) && ($properties['delivery_address'] instanceof ShopgateAddress)) {
$properties['delivery_address']->accept($this);
$properties['delivery_address'] = $this->object;
}
// visit invoice_address
if (!empty($properties['invoice_address']) && ($properties['invoice_address'] instanceof ShopgateAddress)) {
$properties['invoice_address']->accept($this);
$properties['invoice_address'] = $this->object;
}
// visit shipping_infos
if (!empty($properties['shipping_infos']) && ($properties['shipping_infos'] instanceof ShopgateShippingInfo)) {
$properties['shipping_infos']->accept($this);
$properties['shipping_infos'] = $this->object;
}
// iterate lists of referred objects
$properties['options'] = $this->iterateObjectList($properties['options']);
$properties['inputs'] = $this->iterateObjectList($properties['inputs']);
$properties['custom_fields'] = $this->iterateObjectList($properties['custom_fields']);
$properties['external_coupons'] = $this->iterateObjectList($properties['external_coupons']);
$properties['shopgate_coupons'] = $this->iterateObjectList($properties['shopgate_coupons']);
$properties['items'] = $this->iterateObjectList($properties['items']);
$properties['delivery_notes'] = $this->iterateObjectList($properties['delivery_notes']);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateOrderItem($properties);
$this->object = new ShopgateOrder($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitOrderItemOption(ShopgateOrderItemOption $o) {
public function visitExternalOrder(ShopgateExternalOrder $o) {
// get properties
$properties = $o->buildProperties();
// iterate the simple variables and arrays with simple variables recursively
$this->iterateSimpleProperties($properties);
// visit delivery_address
if (!empty($properties['delivery_address']) && ($properties['delivery_address'] instanceof ShopgateAddress)) {
$properties['delivery_address']->accept($this);
$properties['delivery_address'] = $this->object;
}
// visit invoice_address
if (!empty($properties['invoice_address']) && ($properties['invoice_address'] instanceof ShopgateAddress)) {
$properties['invoice_address']->accept($this);
$properties['invoice_address'] = $this->object;
}
// iterate lists of referred objects
$properties['custom_fields'] = $this->iterateObjectList($properties['custom_fields']);
$properties['external_coupons'] = $this->iterateObjectList($properties['external_coupons']);
$properties['items'] = $this->iterateObjectList($properties['items']);
$properties['delivery_notes'] = $this->iterateObjectList($properties['delivery_notes']);
$properties['order_taxes'] = $this->iterateObjectList($properties['order_taxes']);
$properties['extra_costs'] = $this->iterateObjectList($properties['extra_costs']);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateOrderItemOption($properties);
$this->object = new ShopgateExternalOrder($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitOrderItemInput(ShopgateOrderItemInput $i) {
$properties = $i->buildProperties();
public function visitExternalOrderTax(ShopgateExternalOrderTax $t) {
$properties = $t->buildProperties();
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateOrderItemInput($properties);
$this->object = new ShopgateExternalOrderTax($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitOrderDeliveryNote(ShopgateDeliveryNote $d) {
$properties = $d->buildProperties();
public function visitExternalOrderExtraCost(ShopgateExternalOrderExtraCost $c) {
$properties = $c->buildProperties();
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateDeliveryNote($properties);
$this->object = new ShopgateExternalOrderExtraCost($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitCategory(ShopgateCategory $c) {
public function visitOrderItem(ShopgateOrderItem $i) {
// get properties
$properties = $i->buildProperties();
// iterate the simple variables
$this->iterateSimpleProperties($properties);
// iterate lists of referred objects
$properties['options'] = $this->iterateObjectList($properties['options']);
$properties['inputs'] = $this->iterateObjectList($properties['inputs']);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateOrderItem($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitSyncItem(ShopgateSyncItem $i) {
// get properties
$properties = $i->buildProperties();
// iterate the simple variables
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateSyncItem($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitExternalOrderItem(ShopgateExternalOrderItem $i) {
// get properties
$properties = $i->buildProperties();
// iterate the simple variables
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateExternalOrderItem($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitOrderItemOption(ShopgateOrderItemOption $o) {
$properties = $o->buildProperties();
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateOrderItemOption($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitOrderItemInput(ShopgateOrderItemInput $i) {
$properties = $i->buildProperties();
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateOrderItemInput($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitOrderItemAttribute(ShopgateOrderItemAttribute $i) {
$properties = $i->buildProperties();
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateOrderItemAttribute($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitOrderCustomField(ShopgateOrderCustomField $c) {
$properties = $c->buildProperties();
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateOrderCustomField($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitShippingInfo(ShopgateShippingInfo $o) {
$properties = $o->buildProperties();
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateShippingInfo($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitOrderDeliveryNote(ShopgateDeliveryNote $d) {
$properties = $d->buildProperties();
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateDeliveryNote($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitExternalCoupon(ShopgateExternalCoupon $c) {
$properties = $c->buildProperties();
// iterate the simple variables
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateExternalCoupon($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitShopgateCoupon(ShopgateShopgateCoupon $c) {
$properties = $c->buildProperties();
// iterate the simple variables
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateShopgateCoupon($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
public function visitCategory(ShopgateCategory $c) {
$properties = $c->buildProperties();
// iterate the simple variables
$this->iterateSimpleProperties($properties);
ca. Zeile 1946
// iterate the item options and inputs
$properties['options'] = $this->iterateObjectList($properties['options']);
$properties['inputs'] = $this->iterateObjectList($properties['inputs']);
$properties['attributes'] = $this->iterateObjectList($properties['attributes']);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateItem($properties);
ca. Zeile 1980
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateOptionValue($properties);
$this->object = new ShopgateItemOptionValue($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
ca. Zeile 2014
$this->object = null;
}
}
/**
* @param ShopgateShippingMethod $c
*/
public function visitShippingMethod(ShopgateShippingMethod $c) {
$properties = $c->buildProperties();
// iterate the simple variables
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateShippingMethod($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
/**
* @param ShopgateCartItem $c
*/
public function visitCartItem(ShopgateCartItem $c) {
$properties = $c->buildProperties();
// iterate the simple variables
$this->iterateSimpleProperties($properties);
// iterate the item options and inputs
$properties['options'] = $this->iterateObjectList($properties['options']);
$properties['inputs'] = $this->iterateObjectList($properties['inputs']);
$properties['attributes'] = $this->iterateObjectList($properties['attributes']);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateCartItem($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
/**
* @param ShopgatePaymentMethod $c
*/
public function visitPaymentMethod(ShopgatePaymentMethod $c) {
$properties = $c->buildProperties();
// iterate the simple variables
$this->iterateSimpleProperties($properties);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgatePaymentMethod($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
/**
* @param ShopgateCartCustomer $c
*/
public function visitCartCustomer(ShopgateCartCustomer $c) {
$properties = $c->buildProperties();
// iterate the simple variables
$this->iterateSimpleProperties($properties);
// iterate the customer_groups
$properties['customer_groups'] = $this->iterateObjectList($properties['customer_groups']);
// create new object with utf-8 en- / decoded data
try {
$this->object = new ShopgateCartCustomer($properties);
} catch (ShopgateLibraryException $e) {
$this->object = null;
}
}
protected function iterateSimpleProperties(array &$properties) {
foreach ($properties as $key => &$value) {
if (empty($value)) continue;
ca. Zeile 2029
}
// perform encoding / decoding on simple types
switch ($this->mode) {
case self::MODE_ENCODE: $value = $this->firstObject->stringToUtf8($value, $this->encoding, $this->force); break;
case self::MODE_DECODE: $value = $this->firstObject->stringFromUtf8($value, $this->encoding, $this->force); break;
case self::MODE_ENCODE: $value = $this->firstObject->stringToUtf8($value, $this->encoding, $this->force, $this->useIconv); break;
case self::MODE_DECODE: $value = $this->firstObject->stringFromUtf8($value, $this->encoding, $this->force, $this->useIconv); break;
}
}
}
ca. Zeile 2081
// iterate the simple variables
$properties = $this->iterateSimpleProperties($properties);
// iterate ShopgateAddress objects
$properties['custom_fields'] = $this->iterateObjectList($properties['custom_fields']);
$properties['addresses'] = $this->iterateObjectList($properties['addresses']);
$properties['customer_groups'] = $this->iterateObjectList($properties['customer_groups']);
// set last value to converted array
$this->array = $properties;
}
public function visitPlainObject(ShopgateContainer $c) {
// get properties
$properties = $c->buildProperties();
// iterate the simple variables
$properties = $this->iterateSimpleProperties($properties);
// set last value to converted array
$this->array = $properties;
}
public function visitAddress(ShopgateAddress $a) {
// get properties and iterate (no complex types in ShopgateAddress objects)
$this->array = $this->iterateSimpleProperties($a->buildProperties());
// get and iterate simple properties
$properties = $this->iterateSimpleProperties($a->buildProperties());
// iterate ShopgateOrderCustomField objects
$properties['custom_fields'] = $this->iterateObjectList($properties['custom_fields']);
// update array
$this->array = $properties;
}
public function visitCart(ShopgateCart $c) {
// get properties
$properties = $c->buildProperties();
// iterate the simple variables and arrays with simple variables recursively
$this->iterateSimpleProperties($properties);
// visit delivery_address
if (!empty($properties['delivery_address']) && ($properties['delivery_address'] instanceof ShopgateAddress)) {
$properties['delivery_address']->accept($this);
$properties['delivery_address'] = $this->array;
}
// visit invoice_address
if (!empty($properties['invoice_address']) && ($properties['invoice_address'] instanceof ShopgateAddress)) {
$properties['invoice_address']->accept($this);
$properties['invoice_address'] = $this->array;
}
// visit shipping info
if (!empty($properties['shipping_infos']) && ($properties['shipping_infos'] instanceof ShopgateShippingInfo)) {
$properties['shipping_infos']->accept($this);
$properties['shipping_infos'] = $this->array;
}
// iterate lists of referred objects
$properties['external_coupons'] = $this->iterateObjectList($properties['external_coupons']);
$properties['shopgate_coupons'] = $this->iterateObjectList($properties['shopgate_coupons']);
$properties['items'] = $this->iterateObjectList($properties['items']);
$this->array = $properties;
}
public function visitOrder(ShopgateOrder $o) {
// get properties
ca. Zeile 2111
$properties['delivery_address']->accept($this);
$properties['delivery_address'] = $this->array;
}
// visit shipping info
if (!empty($properties['shipping_infos']) && ($properties['shipping_infos'] instanceof ShopgateShippingInfo)) {
$properties['shipping_infos']->accept($this);
$properties['shipping_infos'] = $this->array;
}
// visit the items and delivery notes arrays
$properties['custom_fields'] = $this->iterateObjectList($properties['custom_fields']);
$properties['external_coupons'] = $this->iterateObjectList($properties['external_coupons']);
$properties['shopgate_coupons'] = $this->iterateObjectList($properties['shopgate_coupons']);
$properties['items'] = $this->iterateObjectList($properties['items']);
$properties['delivery_notes'] = $this->iterateObjectList($properties['delivery_notes']);
// set last value to converted array
$this->array = $properties;
}
public function visitExternalOrder(ShopgateExternalOrder $o) {
// get properties
$properties = $o->buildProperties();
// iterate the simple variables
$properties = $this->iterateSimpleProperties($properties);
// visit invoice address
if (!empty($properties['invoice_address']) && ($properties['invoice_address'] instanceof ShopgateAddress)) {
$properties['invoice_address']->accept($this);
$properties['invoice_address'] = $this->array;
}
// visit delivery address
if (!empty($properties['delivery_address']) && ($properties['delivery_address'] instanceof ShopgateAddress)) {
$properties['delivery_address']->accept($this);
$properties['delivery_address'] = $this->array;
}
// visit the items and delivery notes arrays
$properties['custom_fields'] = $this->iterateObjectList($properties['custom_fields']);
$properties['external_coupons'] = $this->iterateObjectList($properties['external_coupons']);
$properties['items'] = $this->iterateObjectList($properties['items']);
$properties['delivery_notes'] = $this->iterateObjectList($properties['delivery_notes']);
$properties['order_taxes'] = $this->iterateObjectList($properties['order_taxes']);
$properties['extra_costs'] = $this->iterateObjectList($properties['extra_costs']);
// set last value to converted array
$this->array = $properties;
}
public function visitExternalOrderTax(ShopgateExternalOrderTax $t) {
// get properties and iterate (no complex types in ShopgateExternalOrderTax objects)
$this->array = $this->iterateSimpleProperties($t->buildProperties());
}
public function visitExternalOrderExtraCost(ShopgateExternalOrderExtraCost $c) {
// get properties and iterate (no complex types in ShopgateExternalOrderExtraCost objects)
$this->array = $this->iterateSimpleProperties($c->buildProperties());
}
public function visitOrderItem(ShopgateOrderItem $i) {
// get properties
$properties = $i->buildProperties();
// iterate the simple variables
$properties = $this->iterateSimpleProperties($properties);
// iterate options/attributes/input fields objects
$properties['options'] = $this->iterateObjectList($properties['options']);
$properties['inputs'] = $this->iterateObjectList($properties['inputs']);
$properties['attributes'] = $this->iterateObjectList($properties['attributes']);
// set last value to converted array
$this->array = $properties;
}
public function visitSyncItem(ShopgateSyncItem $i) {
// get properties and iterate (no options and inputs available in ShopgateSyncOrderItem objects)
$this->array = $this->iterateSimpleProperties($i->buildProperties());
}
public function visitExternalOrderItem(ShopgateExternalOrderItem $i) {
// get properties
$properties = $i->buildProperties();
// iterate the simple variables
$properties = $this->iterateSimpleProperties($properties);
// set last value to converted array
$this->array = $properties;
}
/**
* @param ShopgateShippingMethod $c
*/
public function visitShippingMethod(ShopgateShippingMethod $c) {
$properties = $c->buildProperties();
// iterate the simple variables
$properties = $this->iterateSimpleProperties($properties);
// set last value to converted array
$this->array = $properties;
}
/**
* @param ShopgateCartItem $c
*/
public function visitCartItem(ShopgateCartItem $c) {
$properties = $c->buildProperties();
// iterate the simple variables
$properties = $this->iterateSimpleProperties($properties);
// iterate ShopgateAddress objects
$properties['options'] = $this->iterateObjectList($properties['options']);
$properties['inputs'] = $this->iterateObjectList($properties['inputs']);
$properties['attributes'] = $this->iterateObjectList($properties['attributes']);
// set last value to converted array
$this->array = $properties;
}
/**
* @param ShopgateCartCustomer $c
*/
public function visitCartCustomer(ShopgateCartCustomer $c) {
$properties = $c->buildProperties();
// iterate the simple variables
$properties = $this->iterateSimpleProperties($properties);
// iterate the customer_groups
$properties['customer_groups'] = $this->iterateObjectList($properties['customer_groups']);
// set last value to converted array
$this->array = $properties;
}
/**
* @param ShopgatePaymentMethod $c
*/
public function visitPaymentMethod(ShopgatePaymentMethod $c) {
$properties = $c->buildProperties();
// iterate the simple variables
$properties = $this->iterateSimpleProperties($properties);
// set last value to converted array
$this->array = $properties;
}
ca. Zeile 2144
// get properties and iterate (no complex types in ShopgateOrderItemInput objects)
$this->array = $this->iterateSimpleProperties($i->buildProperties());
}
public function visitOrderItemAttribute(ShopgateOrderItemAttribute $i) {
// get properties and iterate (no complex types in ShopgateOrderItemAttribute objects)
$this->array = $this->iterateSimpleProperties($i->buildProperties());
}
public function visitOrderCustomField(ShopgateOrderCustomField $c) {
// get properties and iterate (no complex types in ShopgateOrderCustomField objects)
$this->array = $this->iterateSimpleProperties($c->buildProperties());
}
public function visitShippingInfo(ShopgateShippingInfo $i) {
// get properties and iterate (no complex types in ShopgateOrderItemAttribute objects)
$this->array = $this->iterateSimpleProperties($i->buildProperties());
}
public function visitOrderDeliveryNote(ShopgateDeliveryNote $d) {
// get properties and iterate (no complex types in ShopgateDeliveryNote objects)
$this->array = $this->iterateSimpleProperties($d->buildProperties());
}
public function visitExternalCoupon(ShopgateExternalCoupon $c) {
// get properties and iterate (no complex types in ShopgateExternalCoupon objects)
$this->array = $this->iterateSimpleProperties($c->buildProperties());
}
public function visitShopgateCoupon(ShopgateShopgateCoupon $c) {
// get properties and iterate (no complex types in ShopgateShopgateCoupon objects)
$this->array = $this->iterateSimpleProperties($c->buildProperties());
}
public function visitCategory(ShopgateCategory $d) {
$this->array = $this->iterateSimpleProperties($d->buildProperties());
}
ca. Zeile 2235
return $newList;
}
protected function sanitizeSimpleVar($v) {
if (is_int($v)) {
if (is_bool($v)) {
return (int) $v;
} elseif (is_bool($v)) {
return (int) $v;
} elseif (is_string($v)) {
} else {
return $v;
}
}
}
includes/external/shopgate/shopgate_library/classes/customers.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
class ShopgateCustomer extends ShopgateContainer {
const MALE = "m";
const FEMALE = "f";
protected $registration_date;
protected $customer_id;
protected $customer_number;
protected $customer_group;
protected $customer_group_id;
protected $customer_token;
protected $customer_groups;
protected $tax_class_key;
protected $tax_class_id;
protected $first_name;
protected $last_name;
ca. Zeile 17
protected $phone;
protected $mobile;
protected $mail;
protected $custom_fields;
protected $newsletter_subscription;
/** @var ShopgateAddress[] */
protected $addresses;
/**
* @deprecated
*/
protected $customer_group;
/**
* @deprecated
*/
protected $customer_group_id;
public function accept(ShopgateContainerVisitor $v) {
$v->visitCustomer($this);
}
/**********
* Setter *
**********/
##########
# Setter #
##########
/**
* @param string $value
*/
public function setCustomerId($value) { $this->customer_id = $value; }
public function setRegistrationDate($value) {
$this->registration_date = $value;
}
/**
* @param string $value
*/
public function setCustomerNumber($value) { $this->customer_number = $value; }
public function setCustomerId($value) {
$this->customer_id = $value;
}
/**
* @param string $value
*/
public function setCustomerNumber($value) {
$this->customer_number = $value;
}
/**
* @param string $value
* @deprecated
*/
public function setCustomerGroup($value) {
$this->customer_group = $value;
}
/**
* @param string $value
*/
public function setCustomerGroup($value) { $this->customer_group = $value; }
public function setCustomerToken($value) {
$this->customer_token = $value;
}
/**
* @param string $value
* @deprecated
*/
public function setCustomerGroupId($value) {
if (is_numeric($value)) {
$this->customer_group_id = (int) $value;
} else {
$this->customer_group_id = null;
$this->customer_group_id = $value;
}
/**
* @param ShopgateCustomerGroup[] $value
*/
public function setCustomerGroups($value) {
$this->customer_groups = $value;
}
/**
* @param string $value
*/
public function setTaxClassKey($value) {
$this->tax_class_key = $value;
}
/**
* @param string $value
*/
public function setFirstName($value) { $this->first_name = $value; }
public function setTaxClassId($value) {
$this->tax_class_id = $value;
}
/**
* @param string $value
*/
public function setFirstName($value) {
$this->first_name = $value;
}
/**
* @param string $value
*/
public function setLastName($value) { $this->last_name = $value; }
public function setLastName($value) {
$this->last_name = $value;
}
/**
* @param string $value <ul><li>"m" = Male</li><li>"f" = Female</li></ul>
*/
ca. Zeile 95
/**
* @param string $value
*/
public function setPhone($value) { $this->phone = $value; }
public function setPhone($value) {
$this->phone = $value;
}
/**
* @param string $value
*/
public function setMobile($value) { $this->mobile = $value; }
public function setMobile($value) {
$this->mobile = $value;
}
/**
* @param string $value
*/
public function setMail($value) { $this->mail = $value; }
public function setMail($value) {
$this->mail = $value;
}
/**
* @param ShopgateOrderCustomField[] $value
*/
public function setCustomFields($value) {
if (!is_array($value)) {
$this->custom_fields = array();
}
foreach ($value as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateOrderCustomField)) && !is_array($element)) {
unset($value[$index]);
continue;
}
if (is_array($element)) {
$element = new ShopgateOrderCustomField($element);
}
}
$this->custom_fields = $value;
}
/**
* @param bool $value
*/
public function setNewsletterSubscription($value) { $this->newsletter_subscription = $value; }
public function setNewsletterSubscription($value) {
$this->newsletter_subscription = $value;
}
/**
* @param ShopgateAddress[] $value List of customer's addresses.
*/
public function setAddresses($value) {
if (!is_array($value)) {
$this->addresses = null;
}
foreach ($value as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateAddress)) && !is_array($element)) {
unset($value[$index]);
continue;
}
if (is_array($element)) {
$element = new ShopgateAddress($element);
}
}
$this->addresses = $value;
}
/**********
* Getter *
**********/
##########
# Getter #
##########
/**
* @return string
*/
public function getRegistrationDate() {
return $this->registration_date;
}
/**
* @return string
*/
public function getCustomerId() { return $this->customer_id; }
public function getCustomerId() {
return $this->customer_id;
}
/**
* @return string
*/
public function getCustomerNumber() { return $this->customer_number; }
public function getCustomerNumber() {
return $this->customer_number;
}
/**
* @return string
* @deprecated
*/
public function getCustomerGroup() {
return $this->customer_group;
}
/**
* @return string
*/
public function getCustomerToken() {
return $this->customer_token;
}
/**
* @return string
* @deprecated
*/
public function getCustomerGroupId() {
return $this->customer_group_id;
}
/**
* @return ShopgateCustomerGroup[]
*/
public function getCustomerGroups() {
return $this->customer_groups;
}
/**
* @return string
*/
public function getCustomerGroup() { return $this->customer_group; }
public function getTaxClassKey() { return $this->tax_class_key; }
/**
* @return string
*/
public function getCustomerGroupId() { return $this->customer_group_id; }
public function getTaxClassId() { return $this->tax_class_id; }
/**
* @return string
*/
public function getFirstName() { return $this->first_name; }
public function getFirstName() {
return $this->first_name;
}
/**
* @return string
*/
public function getLastName() { return $this->last_name; }
public function getLastName() {
return $this->last_name;
}
/**
* @return string <ul><li>"m" = Male</li><li>"f" = Female</li></ul>
*/
public function getGender() { return $this->gender; }
public function getGender() {
return $this->gender;
}
/**
* @return string Format: yyyy-mm-dd (1983-02-17)
*/
public function getBirthday() { return $this->birthday; }
public function getBirthday() {
return $this->birthday;
}
/**
* @return string
*/
public function getPhone() { return $this->phone; }
public function getPhone() {
return $this->phone;
}
/**
* @return string
*/
public function getMobile() { return $this->mobile; }
public function getMobile() {
return $this->mobile;
}
/**
* @return string
*/
public function getMail() { return $this->mail; }
public function getMail() {
return $this->mail;
}
/**
* @return ShopgateOrderCustomField[]
*/
public function getCustomFields() {
if(!is_array($this->custom_fields)) {
$this->custom_fields = array();
}
return $this->custom_fields;
}
/**
* @return bool
*/
public function getNewsletterSubscription() { return (bool) $this->newsletter_subscription; }
public function getNewsletterSubscription() {
return (bool) $this->newsletter_subscription;
}
/**
* @param int $type <ul><li>ShopgateAddress::BOTH</li><li>ShopgateAddress::INVOICE</li><li>ShopgateAddress::DELIVERY</li></ul>
* @return ShopgateAddress[] List of customer's addresses, filtered by $type.
ca. Zeile 201
}
return $addresses;
}
}
/**
* Class ShopgateCustomerGroup
*/
class ShopgateCustomerGroup extends ShopgateContainer {
protected $id;
protected $name;
##########
# Setter #
##########
/**
* @param string $value
*/
public function setId($value) {
$this->id = $value;
}
/**
* @param string $value
*/
public function setName($value) {
$this->name = $value;
}
##########
# Getter #
##########
/**
* @return string
*/
public function getId() {
return $this->id;
}
/**
* @return string
*/
public function getName() {
return $this->name;
}
/**
* @param ShopgateContainerVisitor $v
*/
public function accept(ShopgateContainerVisitor $v) {
$v->visitCustomer($this);
$v->visitPlainObject($this);
}
}
class ShopgateAddress extends ShopgateContainer {
ca. Zeile 237
protected $phone;
protected $mobile;
protected $mail;
protected $custom_fields;
/**
* Checks if two ShopgateAddress objects are equal.
*
* Two addresses are equal when following fields contain the same value:
* 'gender','first_name','last_name','street_1','street_2','zipcode','city','country'
*
* @param ShopgateAddress $address
* @return bool
*/
public function equals(ShopgateAddress $address){
$whiteList = array('gender','first_name','last_name','street_1','street_2','zipcode','city','country');
return $this->compare($this, $address,$whiteList);
}
/**********
* Setter *
**********/
##########
# Setter #
##########
/**
* @param string $value
*/
ca. Zeile 351
$this->zipcode = $value;
}
/**
* Sets the Country
*
* Format: ISO-3166-1
*
* Example: <ul><li>DE</li><li>US</li></ul>
*
* @see http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
* @param string $value Country as ISO-3166-1
*/
public function setCountry($value) {
$this->country = $value;
}
/**
* Sets the state / province
*
* Format: ISO 3166-2
*
* Example: <ul><li>DE-HE</li><li>US-NY</li><ul>
*
* @see http://en.wikipedia.org/wiki/ISO_3166-2#Current_codes
* @param string $value State as ISO-3166-2
*/
public function setState($value) {
ca. Zeile 399
public function setMail($value) {
$this->mail = $value;
}
/**
* @param ShopgateOrderCustomField[] $value
*/
public function setCustomFields($value) {
if (!is_array($value)) {
$this->custom_fields = array();
}
foreach ($value as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateOrderCustomField)) && !is_array($element)) {
unset($value[$index]);
continue;
}
if (is_array($element)) {
$element = new ShopgateOrderCustomField($element);
}
}
$this->custom_fields = $value;
}
/**********
* Getter *
**********/
##########
# Getter #
##########
/**
* @return string
*/
public function getId() { return $this->id; }
public function getId() {
return $this->id;
}
/**
* @return bool
*/
ca. Zeile 432
/**
* @return string
*/
public function getFirstName() { return $this->first_name; }
public function getFirstName() {
return $this->first_name;
}
/**
* @return string
*/
public function getLastName() { return $this->last_name; }
public function getLastName() {
return $this->last_name;
}
/**
* @return string <ul><li>"m" = Male</li><li>"f" = Female</li></ul>
*/
public function getGender() { return $this->gender; }
public function getGender() {
return $this->gender;
}
/**
* @return string Format: yyyy-mm-dd (1983-02-17)
*/
public function getBirthday() { return $this->birthday; }
public function getBirthday() {
return $this->birthday;
}
/**
* @return string
*/
public function getCompany() { return $this->company; }
public function getCompany() {
return $this->company;
}
/**
* @return string
*/
public function getStreet1() { return $this->street_1; }
public function getStreet1() {
return $this->street_1;
}
/**
* @return string
*/
public function getStreet2() { return $this->street_2; }
public function getStreet2() {
return $this->street_2;
}
/**
* Return the name of street1
*
* @return string
*/
public function getStreetName1() {
return $this->splitStreetData($this->getStreet1(), "street");
}
/**
* Return the house number of street1
*
* @return string
*/
public function getStreetNumber1() {
return $this->splitStreetData($this->getStreet1(), "number");
ca. Zeile 485
/**
* @return string
*/
public function getCity() { return $this->city; }
public function getCity() {
return $this->city;
}
/**
* @return string
*/
public function getZipcode() { return $this->zipcode; }
public function getZipcode() {
return $this->zipcode;
}
/**
* Returns the country
*
* Format: ISO-3166-1
*
* Example: <ul><li>DE</li><li>US</li></ul>
*
* @see http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
* @return string Country as ISO-3166-1
*/
public function getCountry() { return $this->country; }
public function getCountry() {
return $this->country;
}
/**
* Returns the state / province
*
* Format: ISO 3166-2
*
* Example: <ul><li>DE-HE</li><li>US-NY</li><ul>
*
* @see http://en.wikipedia.org/wiki/ISO_3166-2#Current_codes
* @return string State as ISO-3166-2
*/
public function getState() { return $this->state; }
public function getState() {
return $this->state;
}
/**
* @return string
*/
public function getPhone() { return $this->phone; }
public function getPhone() {
return $this->phone;
}
/**
* @return string
*/
public function getMobile() { return $this->mobile; }
public function getMobile() {
return $this->mobile;
}
/**
* @return string
*/
public function getMail() { return $this->mail; }
public function getMail() {
return $this->mail;
}
/**
* @return ShopgateOrderCustomField[]
*/
public function getCustomFields() {
if(!is_array($this->custom_fields)) {
$this->custom_fields = array();
}
return $this->custom_fields;
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitAddress($this);
}
/**
*
* @param string $street
* @param string $type [street|name]
*
* @return string
*/
protected function splitStreetData( $street, $type = "street" ) {
protected function splitStreetData($street, $type = 'street') {
$splittedArray = array();
$street = trim($street);
$street = str_replace("\n", '', $street);
//contains only digits OR no digits at all --> don't split
if (preg_match("/^[0-9]+$/i", $street) || preg_match("/^[^0-9]+$/i", $street)) {
return ($type == 'street') ? $street : "";
}
//number at the end ("Schlossstr. 10", "Schlossstr. 10a", "Schlossstr. 10a+b"...)
if (preg_match("/^([^0-9]+)([0-9]+ ?[a-z]?([ \-\&\+]+[a-z])?)$/i", $street, $matches)) {
return trim(($type == 'street') ? $matches[1] : $matches[2]);
}
//number at the end ("Schlossstr. 10-12", "Schlossstr. 10 & 12"...)
if (preg_match("/^([^0-9]+)([0-9]+([ \-\&\+]+[0-9]+)?)$/i", $street, $matches)) {
return trim(($type == 'street') ? $matches[1] : $matches[2]);
}
//number at the beginning (e.g. "2225 E. Bayshore Road", "2225-2227 E. Bayshore Road")
if (preg_match("/^([0-9]+([ \-\&\+]+[0-9]+)?)([^0-9]+.*)$/i", $street, $matches)) {
return trim(($type == 'street') ? $matches[3] : $matches[1]);
}
if(!preg_match("/^(.+)\s(.*[0-9]+.*)$/is", $street, $splittedArray)) {
// For "My-Little-Street123"
// for "My-Little-Street123"
preg_match("/^(.+)([0-9]+.*)$/isU", $street, $splittedArray);
}
$value = $street;
includes/external/shopgate/shopgate_library/classes/items.phpTop ca. Zeile 1
<?php
/**
* Shogate Category Object
* Shopgate GmbH
*
* @author Shopgate GmbH, 35510 Butzbach, DE
* @see http://wiki.shopgate.com/Merchant_API_get_categories/
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
class ShopgateCategory extends ShopgateContainer {
protected $category_number = null;
protected $name = null;
protected $parent_category_number = null;
protected $url_image = null;
protected $order_index = null;
protected $is_active = null;
protected $category_number;
protected $name;
protected $parent_category_number;
protected $url_image;
protected $order_index;
protected $is_active;
public function accept(ShopgateContainerVisitor $v) {
$v->visitCategory($this);
}
##########
# Setter #
##########
/**
* The Category-Number of the Category on Shopgate
*
* Ideally, it is the same as the category-number or id in the Shopsystem
*
* @param string $value
*/
public function setCategoryNumber( $value ) {
$this->category_number = $value;
}
/**
* The Name of the Category
*
* @param string $value
*/
public function setName( $value ) {
$this->name = $value;
public function setParentCategoryNumber($value) {
$this->parent_category_number = $value;
}
/**
* The Parent Category Number
*
* @param string $value
*/
public function setParentCategoryNumber( $value ) {
$this->parent_category_number = $value;
public function setName($value) {
$this->name = $value;
}
/**
* The Image Url
*
* @param string $value
*/
public function setUrlImage( $value ) {
$this->url_image = $value;
}
/**
* The Order Index
*
* Shopgate Use a descending order. The Category with the highest order is on top
*
* @param int $value
* @param int $value Use this like "priority". Highest value gets displayed closest to the top.
*/
public function setOrderIndex( $value ) {
$this->order_index = $value;
}
/**
* Set the Category to Active or Inactive
*
* @param boolean $value
* @param bool $value
*/
public function setIsActive( $value ) {
$this->is_active = $value;
}
##########
# Getter #
##########
/**
* The Category-Number of the Category on Shopgate
*
* Ideally, it is the same as the category-number or id in the Shopsystem
*
* @return string
*/
public function getCategoryNumber() {
return $this->category_number;
}
/**
* The category name
*
* @return string
*/
public function getName() {
return $this->name;
}
/**
*
* The Parent Category Number
*
* @return string
*/
public function getParentCategoryNumber() {
return $this->parent_category_number;
}
/**
* @return string
*/
public function getUrlImage() {
return $this->url_image;
}
/**
* @return int
*/
public function getOrderIndex() {
return $this->order_index;
}
/**
* @return bool
*/
public function getIsActive() {
return $this->is_active;
}
}
class ShopgateItem extends ShopgateContainer {
protected $item_number;
protected $name;
protected $currency;
protected $tax_percent;
protected $unit_amount_with_tax;
protected $old_unit_amount_with_tax;
protected $category_numbers;
protected $item_number_public;
protected $parent_item_number;
protected $manufacturer;
protected $manufacturer_number;
protected $description;
protected $shipping_costs_per_order;
protected $shipping_costs_per_unit;
protected $is_free_shipping;
protected $msrp;
protected $tags;
protected $age_rating;
protected $weight;
protected $ean;
protected $isbn;
protected $pzn;
protected $amount_info_text;
protected $internal_order_info;
protected $use_stock;
protected $stock_quantity;
protected $is_highlight;
protected $highlight_order_index;
protected $is_available;
protected $available_text;
protected $has_image;
protected $image_count;
protected $is_not_orderable;
protected $is_marketplace;
protected $is_active;
protected $is_auto_update;
protected $attribute_1;
protected $attribute_2;
protected $attribute_3;
protected $attribute_4;
protected $attribute_5;
protected $attribute_6;
protected $attribute_7;
protected $attribute_8;
protected $attribute_9;
protected $attribute_10;
protected $properties;
protected $deeplink_onlineshop;
protected $related_item_numbers;
protected $options;
protected $inputs;
##########
# Setter #
##########
/**
*
*
* @author Shopgate GmbH, 35510 Butzbach, DE
*
* @param string $value
*/
class ShopgateItem extends ShopgateContainer {
protected $item_number = null;
protected $name = null;
protected $currency = null;
protected $tax_percent = null;
protected $unit_amount_with_tax = null;
protected $old_unit_amount_with_tax = null;
protected $category_numbers = array();
protected $item_number_public = null;
protected $parent_item_number = null;
protected $manufacturer = null;
protected $manufacturer_number = null;
protected $description = null;
protected $shipping_costs_per_order = null;
protected $shipping_costs_per_unit = null;
protected $is_free_shipping = null;
protected $msrp = null;
protected $tags = null;
protected $age_rating = null;
protected $weight = null;
protected $ean = null;
protected $isbn = null;
protected $pzn = null;
protected $amount_info_text = null;
protected $internal_order_info = null;
protected $use_stock = null;
protected $stock_quantity = null;
protected $is_highlight = null;
protected $highlight_order_index = null;
protected $is_available = null;
protected $available_text = null;
protected $has_image = null;
protected $image_count = null;
protected $is_marketplace = null;
protected $is_active = null;
protected $is_auto_update = null;
protected $attribute_1 = null;
protected $attribute_2 = null;
protected $attribute_3 = null;
protected $attribute_4 = null;
protected $attribute_5 = null;
protected $attribute_6 = null;
protected $attribute_7 = null;
protected $attribute_8 = null;
protected $attribute_9 = null;
protected $attribute_10 = null;
protected $properties = array();
protected $deeplink_onlineshop = null;
protected $related_item_numbers = array();
protected $options = array();
protected $inputs = array();
public function setItemNumber($value) {
$this->item_number = $value;
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitItem($this);
/**
* @param string $value
*/
public function setName($value) {
$this->name = $value;
}
/**
*
* @param $item_number
* @param string $value
*/
public function setItemNumber($item_number)
{
$this->item_number = $item_number;
public function setCurrency($value) {
$this->currency = $value;
}
/**
*
* @param $name
* @param float $value
*/
public function setName($name)
{
$this->name = $name;
public function setTaxPercent($value) {
$this->tax_percent = $value;
}
/**
* @deprecated
*
* @param $currency
* @param float $value
*/
public function setCurrency($currency)
{
$this->currency = $currency;
public function setUnitAmountWithTax($value) {
$this->unit_amount_with_tax = $value;
}
/**
*
* @param $tax_percent
* @param string $value
*/
public function setTaxPercent($tax_percent)
{
$this->tax_percent = $tax_percent;
public function setTaxClassKey($value) {
$this->tax_class_key = $value;
}
/**
*
* @param $unit_amount_with_tax
* @param string $value
*/
public function setUnitAmountWithTax($unit_amount_with_tax)
{
$this->unit_amount_with_tax = $unit_amount_with_tax;
public function setTaxClassId($value) {
$this->tax_class_id = $value;
}
/**
*
* @param $old_unit_amount_with_tax
* @param float $value
*/
public function setOldUnitAmountWithTax($old_unit_amount_with_tax)
{
$this->old_unit_amount_with_tax = $old_unit_amount_with_tax;
public function setOldUnitAmountWithTax($value) {
$this->old_unit_amount_with_tax = $value;
}
/**
*
* @param $category_numbers
* @param string[] $value
*/
public function setCategoryNumbers($category_numbers)
{
$this->category_numbers = $category_numbers;
public function setCategoryNumbers($value) {
$this->category_numbers = $value;
}
/**
*
* @param $item_number_public
* @param string $value
*/
public function setItemNumberPublic($item_number_public)
{
$this->item_number_public = $item_number_public;
public function setItemNumberPublic($value) {
$this->item_number_public = $value;
}
/**
*
* @param $parent_item_number
* @param string $value
*/
public function setParentItemNumber($parent_item_number)
{
$this->parent_item_number = $parent_item_number;
public function setParentItemNumber($value) {
$this->parent_item_number = $value;
}
/**
*
* @param $manufacturer
* @param string $value
*/
public function setManufacturer($manufacturer)
{
$this->manufacturer = $manufacturer;
public function setManufacturer($value) {
$this->manufacturer = $value;
}
/**
*
* @param $manufacturer_number
* @param string $value
*/
public function setManufacturerNumber($manufacturer_number)
{
$this->manufacturer_number = $manufacturer_number;
public function setManufacturerNumber($value) {
$this->manufacturer_number = $value;
}
/**
*
* @param $description
* @param string $value
*/
public function setDescription($description)
{
$this->description = $description;
public function setDescription($value) {
$this->description = $value;
}
/**
*
* @param $shipping_costs_per_order
* @param float $value
*/
public function setShippingCostsPerOrder($shipping_costs_per_order)
{
$this->shipping_costs_per_order = $shipping_costs_per_order;
public function setShippingCostsPerOrder($value) {
$this->shipping_costs_per_order = $value;
}
/**
*
* @param $shipping_costs_per_unit
* @param float $value
*/
public function setShippingCostsPerUnit($shipping_costs_per_unit)
{
$this->shipping_costs_per_unit = $shipping_costs_per_unit;
public function setShippingCostsPerUnit($value) {
$this->shipping_costs_per_unit = $value;
}
/**
*
* @param $is_free_shipping
* @param bool $value
*/
public function setIsFreeShipping($is_free_shipping)
{
$this->is_free_shipping = $is_free_shipping;
public function setIsFreeShipping($value) {
$this->is_free_shipping = $value;
}
/**
*
* @param $msrp
* @param float $value
*/
public function setMsrp($msrp)
{
$this->msrp = $msrp;
public function setMsrp($value) {
$this->msrp = $value;
}
/**
*
* @param $tags
* @param string $value
*/
public function setTags($tags)
{
$this->tags = $tags;
public function setTags($value) {
$this->tags = $value;
}
/**
*
* @param $age_rating
* @param int $value
*/
public function setAgeRating($age_rating)
{
$this->age_rating = $age_rating;
public function setAgeRating($value) {
$this->age_rating = $value;
}
/**
*
* @param $weight
* @param int $value
*/
public function setWeight($weight)
{
$this->weight = $weight;
public function setWeight($value) {
$this->weight = $value;
}
/**
*
* @param $ean
* @param string $value
*/
public function setEan($ean)
{
$this->ean = $ean;
public function setEan($value) {
$this->ean = $value;
}
/**
*
* @param $isbn
* @param string $value
*/
public function setIsbn($isbn)
{
$this->isbn = $isbn;
public function setIsbn($value) {
$this->isbn = $value;
}
/**
*
* @param $pzn
* @param string $value
*/
public function setPzn($pzn)
{
$this->pzn = $pzn;
public function setPzn($value) {
$this->pzn = $value;
}
/**
*
* @param $amount_info_text
* @param string $value
*/
public function setAmount_info_text($amount_info_text)
{
$this->amount_info_text = $amount_info_text;
public function setAmountInfoText($value) {
$this->amount_info_text = $value;
}
/**
*
* @param $internal_order_info
* @param string $value
*/
public function setInternalOrderInfo($internal_order_info)
{
$this->internal_order_info = $internal_order_info;
public function setInternalOrderInfo($value) {
$this->internal_order_info = $value;
}
/**
*
* @param $use_stock
* @param bool $value
*/
public function setUseStock($use_stock)
{
$this->use_stock = $use_stock;
public function setUseStock($value) {
$this->use_stock = $value;
}
/**
*
* @param $stock_quantity
* @param int $value
*/
public function setStockQuantity($stock_quantity)
{
$this->stock_quantity = $stock_quantity;
public function setStockQuantity($value) {
$this->stock_quantity = $value;
}
/**
*
* @param $is_highlight
* @param bool $value
*/
public function setIsHighlight($is_highlight)
{
$this->is_highlight = $is_highlight;
public function setIsHighlight($value) {
$this->is_highlight = $value;
}
/**
*
* @param $highlight_order_index
* @param int $value
*/
public function setHighlightOrderIndex($highlight_order_index)
{
$this->highlight_order_index = $highlight_order_index;
public function setHighlightOrderIndex($value) {
$this->highlight_order_index = $value;
}
/**
*
* @param $is_available
* @param bool $value
*/
public function setIsAvailable($is_available)
{
$this->is_available = $is_available;
public function setIsAvailable($value) {
$this->is_available = $value;
}
/**
*
* @param $available_text
* @param string $value
*/
public function setAvailableText($available_text)
{
$this->available_text = $available_text;
public function setAvailableText($value) {
$this->available_text = $value;
}
/**
*
* @param $has_image
* @param bool $value
*/
public function setHasImage($has_image)
{
$this->has_image = $has_image;
public function setHasImage($value) {
$this->has_image = $value;
}
/**
*
* @param $image_count
* @param int $value
*/
public function setImageCount($image_count)
{
$this->image_count = $image_count;
public function setImageCount($value) {
$this->image_count = $value;
}
/**
*
* @param $is_marketplace
* @param bool $value
*/
public function setIsMarketplace($is_marketplace)
{
$this->is_marketplace = $is_marketplace;
public function setIsNotOrderable($value) {
$this->is_not_orderable = $value;
}
/**
*
* @param $is_active
* @param bool $value
*/
public function setIsActive($is_active)
{
$this->is_active = $is_active;
public function setIsMarketplace($value) {
$this->is_marketplace = $value;
}
/**
*
* @param $is_auto_update
* @param bool $value
*/
public function setIsAutoUpdate($is_auto_update)
{
$this->is_auto_update = $is_auto_update;
public function setIsActive($value) {
$this->is_active = $value;
}
/**
*
* @param $attribute_1
* @param bool $value
*/
public function setAttribute1($attribute_1)
{
$this->attribute_1 = $attribute_1;
public function setIsAutoUpdate($value) {
$this->is_auto_update = $value;
}
/**
*
* @param $attribute_2
* @param string $value
*/
public function setAttribute2($attribute_2)
{
$this->attribute_2 = $attribute_2;
public function setAttribute1($value) {
$this->attribute_1 = $value;
}
/**
*
* @param $attribute_3
* @param string $value
*/
public function setAttribute3($attribute_3)
{
$this->attribute_3 = $attribute_3;
public function setAttribute2($value) {
$this->attribute_2 = $value;
}
/**
*
* @param $attribute_4
* @param string $value
*/
public function setAttribute4($attribute_4)
{
$this->attribute_4 = $attribute_4;
public function setAttribute3($value) {
$this->attribute_3 = $value;
}
/**
*
* @param $attribute_5
* @param string $value
*/
public function setAttribute5($attribute_5)
{
$this->attribute_5 = $attribute_5;
public function setAttribute4($value) {
$this->attribute_4 = $value;
}
/**
*
* @param $attribute_6
* @param string $value
*/
public function setAttribute6($attribute_6)
{
$this->attribute_6 = $attribute_6;
public function setAttribute5($value) {
$this->attribute_5 = $value;
}
/**
*
* @param $attribute_7
* @param string $value
*/
public function setAttribute7($attribute_7)
{
$this->attribute_7 = $attribute_7;
public function setAttribute6($value) {
$this->attribute_6 = $value;
}
/**
*
* @param $attribute_8
* @param string $value
*/
public function setAttribute8($attribute_8)
{
$this->attribute_8 = $attribute_8;
public function setAttribute7($value) {
$this->attribute_7 = $value;
}
/**
*
* @param $attribute_9
* @param string $value
*/
public function setAttribute9($attribute_9)
{
$this->attribute_9 = $attribute_9;
public function setAttribute8($value) {
$this->attribute_8 = $value;
}
/**
*
* @param $attribute_10
* @param string $value
*/
public function setAttribute10($attribute_10)
{
$this->attribute_10 = $attribute_10;
public function setAttribute9($value) {
$this->attribute_9 = $value;
}
/**
*
* @param $properties
* @param string $value
*/
public function setProperties($properties)
{
$this->properties = $properties;
public function setAttribute10($value) {
$this->attribute_10 = $value;
}
/**
*
* @param $deeplink_onlineshop
* @param array <string, string> $value Array with key-value-pairs.
*/
public function setDeeplinkOnlineshop($deeplink_onlineshop)
{
$this->deeplink_onlineshop = $deeplink_onlineshop;
public function setProperties($value) {
$this->properties = $value;
}
/**
*
* @param mixed[] $related_item_numbers
* @param string $value
*/
public function setRelatedItemNumbers($related_item_numbers) {
$this->related_item_numbers = $related_item_numbers;
public function setDeeplinkOnlineshop($value) {
$this->deeplink_onlineshop = $value;
}
public function setOptions($options) {
if (empty($options)) {
$this->options = null;
return;
/**
* @param string[] $value
*/
public function setRelatedItemNumbers($value) {
$this->related_item_numbers = $value;
}
if (!is_array($options)) {
$this->options = null;
/**
* @param ShopgateItemOption[] $value
*/
public function setOptions($value) {
if (empty($value) || !is_array($value)) {
$this->options = array();
return;
}
foreach ($options as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateItemOption)) && !is_array($element)) {
unset($options[$index]);
$options = array();
foreach ($value as $index => $element) {
if (!($element instanceof ShopgateItemOption) && !is_array($element)) {
continue;
}
if (is_array($element)) {
$element = new ShopgateItemOption($element);
$options[] = new ShopgateItemOption($element);
} else {
$options[] = $element;
}
}
$this->options = $options;
}
public function setInputs($inputs) {
if (empty($inputs)) {
$this->inputs = null;
return;
}
if (!is_array($inputs)) {
$this->inputs = null;
/**
* @param ShopgateItemInput[] $value
*/
public function setInputs($value) {
if (empty($value) || !is_array($value)) {
$this->inputs = array();
return;
}
foreach ($inputs as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateItemInput)) && !is_array($element)) {
unset($options[$index]);
$inputs = array();
foreach ($value as $index => $element) {
if (!($element instanceof ShopgateItemInput) && !is_array($element)) {
continue;
}
if (is_array($element)) {
$element = new ShopgateItemInput($element);
$inputs[] = new ShopgateItemInput($element);
} else {
$inputs[] = $element;
}
}
$this->inputs = $inputs;
}
##########
# Getter #
##########
/**
*
* @return
* @return string
*/
public function getItemNumber()
{
public function getItemNumber() {
return $this->item_number;
}
/**
*
* @return
* @return string
*/
public function getName()
{
public function getName() {
return $this->name;
}
/**
*
* @return
* @return string
*/
public function getCurrency()
{
public function getCurrency() {
return $this->currency;
}
/**
*
* @return
* @deprecated
* @return float
*/
public function getTaxPercent()
{
public function getTaxPercent() {
return $this->tax_percent;
}
/**
*
* @return
* @return string
*/
public function getTaxClassKey() {
return $this->tax_class_key;
}
/**
* @return string
*/
public function getTaxClassId() {
return $this->tax_class_id;
}
/**
* @return float
*/
public function getUnitAmountWithTax()
{
public function getUnitAmountWithTax() {
return $this->unit_amount_with_tax;
}
/**
*
* @return
* @return float
*/
public function getOldUnitAmountWithTax()
{
public function getOldUnitAmountWithTax() {
return $this->old_unit_amount_with_tax;
}
/**
*
* @return
* @return string[]
*/
public function getCategoryNumbers()
{
return $this->category_numbers;
public function getCategoryNumbers() {
return (!empty($this->category_numbers)) ? $this->category_numbers : array();
}
/**
*
* @return
* @return string
*/
public function getItemNumberPublic()
{
public function getItemNumberPublic() {
return $this->item_number_public;
}
/**
*
* @return
* @return string
*/
public function getParentItemNumber()
{
public function getParentItemNumber() {
return $this->parent_item_number;
}
/**
*
* @return
* @return string
*/
public function getManufacturer()
{
public function getManufacturer() {
return $this->manufacturer;
}
/**
*
* @return
* @return string
*/
public function getManufacturerNumber()
{
public function getManufacturerNumber() {
return $this->manufacturer_number;
}
/**
*
* @return
* @return string
*/
public function getDescription()
{
public function getDescription() {
return $this->description;
}
/**
*
* @return
* @return float
*/
public function getShippingCostsPerOrder()
{
public function getShippingCostsPerOrder() {
return $this->shipping_costs_per_order;
}
/**
*
* @return
* @return float
*/
public function getShippingCostsPerUnit()
{
public function getShippingCostsPerUnit() {
return $this->shipping_costs_per_unit;
}
/**
*
* @return
* @return bool
*/
public function getIsFreeShipping()
{
public function getIsFreeShipping() {
return $this->is_free_shipping;
}
/**
*
* @return
* @return float
*/
public function getMsrp()
{
public function getMsrp() {
return $this->msrp;
}
/**
*
* @return
* @return string
*/
public function getTags()
{
public function getTags() {
return $this->tags;
}
/**
*
* @return
* @return int
*/
public function getAgeRating()
{
public function getAgeRating() {
return $this->age_rating;
}
/**
*
* @return
* @return int
*/
public function getWeight()
{
public function getWeight() {
return $this->weight;
}
/**
*
* @return
* @return string
*/
public function getEan()
{
public function getEan() {
return $this->ean;
}
/**
*
* @return
* @return string
*/
public function getIsbn()
{
public function getIsbn() {
return $this->isbn;
}
/**
*
* @return
* @return string
*/
public function getPzn()
{
public function getPzn() {
return $this->pzn;
}
/**
*
* @return
* @return string
*/
public function getAmountInfoText()
{
public function getAmountInfoText() {
return $this->amount_info_text;
}
/**
*
* @return
* @return string
*/
public function getInternalOrderInfo()
{
public function getInternalOrderInfo() {
return $this->internal_order_info;
}
/**
*
* @return
* @return bool
*/
public function getUseStock()
{
public function getUseStock() {
return $this->use_stock;
}
/**
*
* @return
* @return int
*/
public function getStockQuantity()
{
public function getStockQuantity() {
return $this->stock_quantity;
}
/**
*
* @return
* @return bool
*/
public function getIsHighlight()
{
public function getIsHighlight() {
return $this->is_highlight;
}
/**
*
* @return
* @return int
*/
public function getHighlightOrderIndex()
{
public function getHighlightOrderIndex() {
return $this->highlight_order_index;
}
/**
*
* @return
* @return bool
*/
public function getIsAvailable()
{
public function getIsAvailable() {
return $this->is_available;
}
/**
*
* @return
* @return string
*/
public function getAvailableText()
{
public function getAvailableText() {
return $this->available_text;
}
/**
*
* @return
* @return bool
*/
public function getHasImage()
{
public function getHasImage() {
return $this->has_image;
}
/**
*
* @return
* @return int
*/
public function getImageCount()
{
public function getImageCount() {
return $this->image_count;
}
/**
*
* @return
* @return bool
*/
public function getIsMarketplace()
{
public function getIsNotOrderable() {
return (bool) $this->is_not_orderable;
}
/**
* @return bool
*/
public function getIsMarketplace() {
return $this->is_marketplace;
}
/**
*
* @return
* @return bool
*/
public function getIsActive()
{
public function getIsActive() {
return $this->is_active;
}
/**
*
* @return
* @return bool
*/
public function getIsAutoUpdate()
{
public function getIsAutoUpdate() {
return $this->is_auto_update;
}
/**
*
* @return
* @return string
*/
public function getAttribute1()
{
public function getAttribute1() {
return $this->attribute_1;
}
/**
*
* @return
* @return string
*/
public function getAttribute2()
{
public function getAttribute2() {
return $this->attribute_2;
}
/**
*
* @return
* @return string
*/
public function getAttribute3()
{
public function getAttribute3() {
return $this->attribute_3;
}
/**
*
* @return
* @return string
*/
public function getAttribute4()
{
public function getAttribute4() {
return $this->attribute_4;
}
/**
*
* @return
* @return string
*/
public function getAttribute5()
{
public function getAttribute5() {
return $this->attribute_5;
}
/**
*
* @return
* @return string
*/
public function getAttribute6()
{
public function getAttribute6() {
return $this->attribute_6;
}
/**
*
* @return
* @return string
*/
public function getAttribute7()
{
public function getAttribute7() {
return $this->attribute_7;
}
/**
*
* @return
* @return string
*/
public function getAttribute8()
{
public function getAttribute8() {
return $this->attribute_8;
}
/**
*
* @return
* @return string
*/
public function getAttribute9()
{
public function getAttribute9() {
return $this->attribute_9;
}
/**
*
* @return
* @return string
*/
public function getAttribute10()
{
public function getAttribute10() {
return $this->attribute_10;
}
/**
*
* @return
* @return string[]
*/
public function getProperties()
{
return $this->properties;
public function getProperties() {
return (!empty($this->properties)) ? $this->properties : array();
}
/**
*
* @return
* @return string
*/
public function getDeeplinkOnlineshop()
{
public function getDeeplinkOnlineshop() {
return $this->deeplink_onlineshop;
}
/**
*
* @return string[]
*/
public function getRelatedItemNumbers() {
return $this->related_item_numbers;
return (!empty($this->related_item_numbers)) ? $this->related_item_numbers : array();
}
/**
* @return ShopgateItemOption[]
*/
public function getOptions() {
return $this->options;
return (!empty($this->options)) ? $this->options : array();
}
/**
* @return ShopgateItemInput[]
*/
public function getInputs() {
return $this->inputs;
return (!empty($this->inputs)) ? $this->inputs : array();
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitItem($this);
}
}
/**
*
* @author Shopgate GmbH, 35510 Butzbach, DE
*
*/
class ShopgateItemOption extends ShopgateContainer {
protected $option_number = null;
protected $name = null;
protected $order_index = null;
protected $option_number;
protected $name;
protected $order_index;
protected $option_values = array();
public function accept(ShopgateContainerVisitor $v) {
$v->visitItemOption($this);
}
##########
# Setter #
##########
/**
*
* @param $optionNumber
* @param string $value
*/
public function setOptionNumber($option_number)
{
$this->option_number = $option_number;
public function setOptionNumber($value) {
$this->option_number = $value;
}
/**
*
* @param $name
* @param string $value
*/
public function setName($name)
{
$this->name = $name;
public function setName($value) {
$this->name = $value;
}
/**
*
* @param $orderIndex
* @param int $value
*/
public function setOrderIndex($order_index)
{
$this->order_index = $order_index;
public function setOrderIndex($value) {
$this->order_index = $value;
}
public function setOptionValues($option_values) {
if (empty($option_values)) {
/**
* @param ShopgateItemOptionValue[] $value
*/
public function setOptionValues($value) {
if (empty($value)) {
$this->option_values = null;
return;
}
if (!is_array($option_values)) {
if (!is_array($value)) {
$this->option_values = null;
return;
}
foreach ($option_values as $index => &$element) {
foreach ($value as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateItemOptionValue)) && !is_array($element)) {
unset($option_values[$index]);
unset($value[$index]);
continue;
}
if (is_array($element)) {
$element = new ShopgateItemOptionValue($element);
}
}
$this->option_values = $option_values;
$this->option_values = $value;
}
##########
# Getter #
##########
/**
*
* @return
* @return string
*/
public function getOptionNumber()
{
public function getOptionNumber() {
return $this->option_number;
}
/**
*
* @return
* @return string
*/
public function getName()
{
public function getName() {
return $this->name;
}
/**
*
* @return
* @return int
*/
public function getOrderIndex()
{
public function getOrderIndex() {
return $this->order_index;
}
/**
* @return ShopgateItemOptionValue[]
*/
public function getOptionValues() {
return $this->option_values;
}
return (!empty($this->option_values)) ? $this->option_values : array();
}
/**
*
* @author Shopgate GmbH, 35510 Butzbach, DE
*
*/
class ShopgateItemOptionValue extends ShopgateContainer {
protected $value_number = null;
protected $value = null;
protected $order_index = null;
protected $additional_amount_with_tax = null;
public function accept(ShopgateContainerVisitor $v) {
$v->visitItemOptionValue($this);
$v->visitItemOption($this);
}
}
class ShopgateItemOptionValue extends ShopgateContainer {
protected $value_number;
protected $value;
protected $order_index;
protected $additional_amount_with_tax;
##########
# Setter #
##########
/**
*
* @param $value_number
* @param $value string
*/
public function setValueNumber($value_number)
{
$this->value_number = $value_number;
public function setValueNumber($value) {
$this->value_number = $value;
}
/**
*
* @param $value
* @param $value string
*/
public function setValue($value)
{
public function setValue($value) {
$this->value = $value;
}
/**
*
* @param $order_index
* @param $value int
*/
public function setOrderIndex($order_index)
{
$this->order_index = $order_index;
public function setOrderIndex($value) {
$this->order_index = $value;
}
/**
*
* @param $additional_amount_with_tax
* @param $value float
*/
public function setAdditionalAmountWithTax($additional_amount_with_tax)
{
$this->additional_amount_with_tax = $additional_amount_with_tax;
public function setAdditionalAmountWithTax($value) {
$this->additional_amount_with_tax = $value;
}
##########
# Getter #
##########
/**
*
* @return
* @return string
*/
public function getValueNumber()
{
public function getValueNumber() {
return $this->value_number;
}
/**
*
* @return
* @return string
*/
public function getValue()
{
public function getValue() {
return $this->value;
}
/**
*
* @return
* @return int
*/
public function getOrderIndex()
{
public function getOrderIndex() {
return $this->order_index;
}
/**
*
* @return
* @return float
*/
public function getAdditionalAmountWithTax()
{
public function getAdditionalAmountWithTax() {
return $this->additional_amount_with_tax;
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitItemOptionValue($this);
}
}
/**
*
* @author Shopgate GmbH, 35510 Butzbach, DE
*
*/
class ShopgateItemInput extends ShopgateContainer {
const INPUT_TYPE_TEXT = "text";
const INPUT_TYPE_IMAGE = "image";
protected $input_number = null;
protected $type = null;
protected $additional_amount_with_tax = null;
protected $label = null;
protected $info_text = null;
protected $is_required = null;
protected $input_number;
protected $type;
protected $additional_amount_with_tax;
protected $label;
protected $info_text;
protected $is_required;
public function accept(ShopgateContainerVisitor $v) {
$v->visitItemInput($this);
}
##########
# Setter #
##########
/**
*
* @param $value
* @param string $value
*/
public function setInputNumber($value)
{
public function setInputNumber($value) {
$this->input_number = $value;
}
/**
*
* @param $type
* @param string $value Must be "text" or "image".
*/
public function setType($type)
{
$this->type = $type;
public function setType($value) {
$this->type = $value;
}
/**
*
* @param $additional_amount_with_tax
* @param float $value
*/
public function setAdditionalAmountWithTax($additional_amount_with_tax)
{
$this->additional_amount_with_tax = $additional_amount_with_tax;
public function setAdditionalAmountWithTax($value) {
$this->additional_amount_with_tax = $value;
}
/**
*
* @param $label
* @param string $value
*/
public function setLabel($label)
{
$this->label = $label;
public function setLabel($value) {
$this->label = $value;
}
/**
*
* @param $info_text
* @param string $value
*/
public function setInfoText($info_text)
{
$this->info_text = $info_text;
public function setInfoText($value) {
$this->info_text = $value;
}
/**
*
* @param $is_required
* @param bool $value
*/
public function setIsRequired($is_required)
{
$this->is_required = $is_required;
public function setIsRequired($value) {
$this->is_required = $value;
}
##########
# Getter #
##########
/**
*
* @return
* @return string
*/
public function getInputNumber()
{
public function getInputNumber() {
return $this->input_number;
}
/**
*
* @return
* @return string
*/
public function getType()
{
public function getType() {
return $this->type;
}
/**
*
* @return
* @return float
*/
public function getAdditionalAmountWithTax()
{
public function getAdditionalAmountWithTax() {
return $this->additional_amount_with_tax;
}
/**
*
* @return
* @return string
*/
public function getLabel()
{
public function getLabel() {
return $this->label;
}
/**
*
* @return
* @return string
*/
public function getInfoText()
{
public function getInfoText() {
return $this->info_text;
}
/**
*
* @return
* @return bool
*/
public function getIsRequired()
{
public function getIsRequired() {
return $this->is_required;
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitItemInput($this);
}
}
class ShopgateSyncItem extends ShopgateContainer {
const STATUS_NEW = 'new';
const STATUS_DELETED = 'deleted';
const STATUS_EXISTING = 'existing';
/**
* @var string
*/
protected $item_number;
/**
* @var string either one of new, deleted, existing
*/
protected $status = null;
/**
* @param string $value
*/
public function setItemNumber($value) {
$this->item_number = $value;
}
/**
* @return string
*/
public function getItemNumber() {
return $this->item_number;
}
/**
* @param string $value
*/
public function setStatus($value) {
if (
self::STATUS_NEW != $value &&
self::STATUS_DELETED != $value &&
self::STATUS_EXISTING != $value
) {
$value = null;
}
$this->status = $value;
}
/**
* @return string
*/
public function getStatus() {
return $this->status;
}
/**
* @see ShopgateContainer::accept()
*/
public function accept(ShopgateContainerVisitor $v) {
$v->visitSyncItem($this);
}
}
includes/external/shopgate/shopgate_library/classes/orders.phpTop ca. Zeile 1
<?php
class ShopgateOrder extends ShopgateContainer {
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
abstract class ShopgateCartBase extends ShopgateContainer {
const SHOPGATE = "SHOPGATE";
// Prepayment
const PREPAY = "PREPAY";
const CC = "CC";
const DT_CC = "DT_CC";
const INVOICE = "INVOICE";
const PAYONE_PRP = "PAYONE_PRP";
const SG_PREPAY = "SG_PREPAY";
// Debit
const DEBIT = "DEBIT";
const PAYMRW_DBT = "PAYMRW_DBT";
const PAYONE_DBT = "PAYONE_DBT";
// Cash On Delivery
const COD = "COD";
const PAYPAL = "PAYPAL";
const COLL_STORE = "COLL_STORE";
// Installment
const ACCRD_INS = "ACCRD_INS";
const PAYOL_INS = "PAYOL_INS";
// Invoice
const INVOICE = "INVOICE";
const ACCRD_INV = "ACCRD_INV";
const KLARNA_INV = "KLARNA_INV";
const BILLSAFE = "BILLSAFE";
const MSTPAY_INV = "MSTPAY_INV";
const PAYMRW_INV = "PAYMRW_INV";
const PAYONE_INV = "PAYONE_INV";
const SG_INVOICE = "SG_INVOICE";
const WCARD_INV = "WCARD_INV";
const PAYONE_KLV = "PAYONE_KLV";
const PAYOL_INV = "PAYOL_INV";
// Paypal
const PAYPAL = "PAYPAL";
const PPAL_PLUS = "PPAL_PLUS";
const CMPTOP_PP = "CMPTOP_PP";
const MASTPAY_PP = "MASTPAY_PP";
const PAYONE_PP = "PAYONE_PP";
const SAGEPAY_PP = "SAGEPAY_PP";
const SG_PAYPAL = "SG_PAYPAL";
const SIX_PP = "SIX_PP";
const WCARD_PP = "WCARD_PP";
// Credit Card
const CC = "CC";
const AUTHN_CC = "AUTHN_CC";
const BCLEPDQ_CC = "BCLEPDQ_CC";
const BNSTRM_CC = "BNSTRM_CC";
const BRAINTR_CC = "BRAINTR_CC";
const CHASE_CC = "CHASE_CC";
const CMPTOP_CC = "CMPTOP_CC";
const CONCAR_CC = "CONCAR_CC";
const CRDSTRM_CC = "CRDSTRM_CC";
const CREDITCARD = "CREDITCARD";
const CYBRSRC_CC = "CYBRSRC_CC";
const DRCPAY_CC = "DRCPAY_CC";
const DTCASH_CC = "DTCASH_CC";
const DT_CC = "DT_CC";
const EFSNET_CC = "EFSNET_CC";
const ELAVON_CC = "ELAVON_CC";
const EPAY_CC = "EPAY_CC";
const EWAY_CC = "EWAY_CC";
const EXACT_CC = "EXACT_CC";
const FRSTDAT_CC = "FRSTDAT_CC";
const GAMEDAY_CC = "GAMEDAY_CC";
const GARANTI_CC = "GARANTI_CC";
const GESTPAY_CC = "GESTPAY_CC";
const HDLPAY_CC = "HDLPAY_CC";
const HIPAY = "HIPAY";
const HITRUST_CC = "HITRUST_CC";
const INSPIRE_CC = "INSPIRE_CC";
const INSTAP_CC = "INSTAP_CC";
const INTUIT_CC = "INTUIT_CC";
const IRIDIUM_CC = "IRIDIUM_CC";
const LITLE_CC = "LITLE_CC";
const MASTPAY_CC = "MASTPAY_CC";
const MERESOL_CC = "MERESOL_CC";
const MERWARE_CC = "MERWARE_CC";
const MODRPAY_CC = "MODRPAY_CC";
const MONERIS_CC = "MONERIS_CC";
const MSTPAY_CC = "MSTPAY_CC";
const NELTRAX_CC = "NELTRAX_CC";
const NETBILL_CC = "NETBILL_CC";
const NETREGS_CC = "NETREGS_CC";
const NOCHEX_CC = "NOCHEX_CC";
const OGONE_CC = "OGONE_CC";
const OPTIMAL_CC = "OPTIMAL_CC";
const PAY4ONE_CC = "PAY4ONE_CC";
const PAYBOX_CC = "PAYBOX_CC";
const PAYEXPR_CC = "PAYEXPR_CC";
const PAYFAST_CC = "PAYFAST_CC";
const PAYFLOW_CC = "PAYFLOW_CC";
const PAYJUNC_CC = "PAYJUNC_CC";
const PAYONE_CC = "PAYONE_CC";
const PAYZEN_CC = "PAYZEN_CC";
const PLUGNPL_CC = "PLUGNPL_CC";
const PP_WSPP_CC = "PP_WSPP_CC";
const PSIGATE_CC = "PSIGATE_CC";
const PSL_CC = "PSL_CC";
const PXPAY_CC = "PXPAY_CC";
const QUIKPAY_CC = "QUIKPAY_CC";
const REALEX_CC = "REALEX_CC";
const SAGEPAY_CC = "SAGEPAY_CC";
const SAGE_CC = "SAGE_CC";
const SAMURAI_CC = "SAMURAI_CC";
const SCPTECH_CC = "SCPTECH_CC";
const SCP_AU_CC = "SCP_AU_CC";
const SECPAY_CC = "SECPAY_CC";
const SG_CC = "SG_CC";
const SIX_CC = "SIX_CC";
const SKIPJCK_CC = "SKIPJCK_CC";
const SKRILL_CC = "SKRILL_CC";
const STRIPE_CC = "STRIPE_CC";
const TELECSH_CC = "TELECSH_CC";
const TRNSFST_CC = "TRNSFST_CC";
const TRUSTCM_CC = "TRUSTCM_CC";
const USAEPAY_CC = "USAEPAY_CC";
const VALITOR_CC = "VALITOR_CC";
const VERIFI_CC = "VERIFI_CC";
const VIAKLIX_CC = "VIAKLIX_CC";
const WCARDS_CC = "WCARDS_CC";
const WIRECRD_CC = "WIRECRD_CC";
const WLDPDIR_CC = "WLDPDIR_CC";
const WLDPOFF_CC = "WLDPOFF_CC";
// ClickandBuy
const CNB = "CNB";
const SG_CNB = "SG_CNB";
const MCM = "MCM";
const UPAID_MCM = "UPAID_MCM";
const PAYU = "PAYU";
const REDIRECTCC = "REDIRECTCC";
const WORLDLINE = "WORLDLINE";
// SOFORT Überweisung
const SUE = "SUE";
const HDLPAY_SUE = "HDLPAY_SUE";
const MSTPAY_SUE = "MSTPAY_SUE";
const PAYONE_SUE = "PAYONE_SUE";
const SG_SUE = "SG_SUE";
const SKRILL_SUE = "SKRILL_SUE";
const WCARD_SUE = "WCARD_SUE";
// Giropay
const PAYONE_GP = "PAYONE_GP";
// iDEAL
const PAYONE_IDL = "PAYONE_IDL";
const SIX_IDEAL = "SIX_IDEAL";
const SKRILL_IDL = "SKRILL_IDL";
const AMAZON_PAYMENT = "MWS";
protected $order_number;
protected $customer_number;
protected $external_order_number;
protected $external_order_id;
protected $external_customer_number;
protected $external_customer_id;
protected $external_customer_group_id;
protected $mail;
protected $phone;
protected $mobile;
protected $confirm_shipping_url;
protected $custom_fields;
protected $created_time;
protected $shipping_group;
protected $shipping_type;
protected $shipping_infos;
protected $payment_method;
protected $payment_group;
protected $is_paid;
protected $payment_time;
protected $payment_transaction_number;
protected $payment_infos;
protected $is_shipping_blocked;
protected $is_shipping_completed;
protected $shipping_completed_time;
protected $amount_items;
protected $amount_shipping;
protected $amount_shop_payment;
protected $payment_tax_percent;
protected $amount_shopgate_payment;
protected $amount_complete;
protected $currency;
protected $is_test;
protected $is_storno;
protected $is_customer_invoice_blocked;
protected $invoice_address;
protected $delivery_address;
protected $items;
protected $delivery_notes;
/**
* Set to true if shipping information should be updated.
*
* @var bool
*/
protected $update_shipping = false;
/**
* Set to true if payment information should be updated.
*
* @var bool
*/
protected $update_payment = false;
protected $external_coupons = array();
protected $shopgate_coupons = array();
protected $items = array();
/**********
* Setter *
**********/
##########
# Setter #
##########
/**
* The Shopgate order number
*
* Format: Exact 10 Digits
* Sample: 1012001234
*
* @param string $value
*/
public function setOrderNumber($value) { $this->order_number = $value; }
public function setCustomerNumber($value) {
$this->customer_number = $value;
}
/**
* The customer number by shopgate
*
* Format: Exact 5 Digits
* Sample: 101234
*
* @param string $value
*/
public function setCustomerNumber($value) { $this->customer_number = $value; }
public function setExternalOrderNumber($value) {
$this->external_order_number = $value;
}
/**
* The order number in your system
*
* @param string $value
*/
public function setExternalOrderNumber($value) { $this->external_order_number = $value; }
public function setExternalOrderId($value) {
$this->external_order_id = $value;
}
/**
* The order id in your system
*
* @param string $value
*/
public function setExternalOrderId($value) { $this->external_order_id = $value; }
public function setExternalCustomerNumber($value) {
$this->external_customer_number = $value;
}
/**
* The customer number in your system
*
* @param string $value
*/
public function setExternalCustomerNumber($value) { $this->external_customer_number = $value; }
public function setExternalCustomerId($value) {
$this->external_customer_id = $value;
}
/**
* The customer id in your system
*
* @param string $value
*/
public function setExternalCustomerId($value) { $this->external_customer_id = $value; }
public function setMail($value) {
$this->mail = $value;
}
/**
* The eMail-Adress of the customer
*
* @param string $value
*/
public function setMail($value) { $this->mail = $value; }
public function setPhone($value) {
$this->phone = $value;
}
/**
* The phone-number of the cutsomer
*
* Sample: +49123456789
*
* @param string $value
*/
public function setPhone($value) { $this->phone = $value; }
public function setMobile($value) {
$this->mobile = $value;
}
/**
* The mobile-number of the cutsomer
*
* Sample: +49123456789
*
* @param string $value
*/
public function setMobile($value) { $this->mobile = $value; }
public function setExternalCustomerGroupId($value) {
$this->external_customer_group_id = $value;
}
/**
* The confirm shipping url to confirm the shipping manual
*
* @param string $value
* @param ShopgateOrderCustomField[] $value
*/
public function setConfirmShippingUrl($value) { $this->confirm_shipping_url = $value; }
public function setCustomFields($value) {
if (!is_array($value)) {
$this->custom_fields = array();
}
/**
* The DateTime when the order was created
*
* If $format is empty, the default DateTime returne in ISO-8601 (date('c');)
*
* Format: ISO-8601 - 2012-02-08T009:20:25+01:00
*
* @see http://www.php.net/manual/de/function.date.php
* @see http://en.wikipedia.org/wiki/ISO_8601
* @param string $value
*/
public function setCreatedTime($value) { $this->created_time = $value; }
foreach ($value as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateOrderCustomField)) && !is_array($element)) {
unset($value[$index]);
continue;
}
if (is_array($element)) {
$element = new ShopgateOrderCustomField($element);
}
}
$this->custom_fields = $value;
}
/**
* The payment group for the order
*
* Sample: <ul><li>SHOPGATE</li><li>PREPAY</li><li>CC</li><li>INVOICE</li><li>DEBIT</li><li>COD</li><li>PAYPAL</li></ul>
*
* @see http://wiki.shopgate.com/Merchant_API_payment_infos/
* @param string $value
*/
public function setPaymentGroup($value) {
$this->payment_group = $value;
public function setShippingGroup($value) {
$this->shipping_group = $value;
}
/**
* The payment method for the order
*
* Sample: <ul><li>SHOPGATE</li><li>PREPAY</li><li>DT_CC</li><li>KLARNA_INV</li><li>BILLSAFE</li><li>DEBIT</li><li>COD</li><li>PAYPAL</li></ul>
*
* @see http://wiki.shopgate.com/Merchant_API_payment_infos/
* @param string $value
*/
public function setPaymentMethod($value) { $this->payment_method = $value; }
public function setShippingType($value) {
$this->shipping_type = $value;
}
/**
* Is the order is payed
*
* @param bool $value
* @param ShopgateShippingInfo $value
*/
public function setIsPaid($value) { $this->is_paid = $value; }
public function setShippingInfos($value) {
if (!is_object($value) && !($value instanceof ShopgateShippingInfo) && !is_array($value)) {
$this->shipping_infos = null;
/**
* The Time when the order was payed
*
* If $format is empty, the default DateTime returne in ISO-8601 (date('c');)
*
* Format: ISO-8601 - 2012-02-08T009:20:25+01:00
*
* @see http://www.php.net/manual/de/function.date.php
* @see http://en.wikipedia.org/wiki/ISO_8601
* @param string $value
*/
public function setPaymentTime($value) {
$this->payment_time = $value;
return;
}
/**
* The Transactioncode for some paymentproviders
*
* @param string $value
*/
public function setPaymentTransactionNumber($value) { $this->payment_transaction_number = $value; }
if (is_array($value)) {
$value = new ShopgateShippingInfo($value);
}
/**
* @param mixed[] $value An array of additional information about the payment depending on the payment type
*/
public function setPaymentInfos($value) { $this->payment_infos = $value; }
$this->shipping_infos = $value;
}
/**
* Is the shipping is blocked
* @see http://wiki.shopgate.com/Merchant_API_payment_infos/
*
* @param string $value
*/
public function setIsShippingBlocked($value) { $this->is_shipping_blocked = $value; }
/**
* Is the Shipping is completed
*/
public function setIsShippingCompleted($value) { $this->is_shipping_completed = $value; }
public function setPaymentGroup($value) {
$this->payment_group = $value;
}
/**
* The Time when the Shipping was set completed
*
* Format: ISO-8601 - 2012-02-08T009:20:25+01:00
* @see http://wiki.shopgate.com/Merchant_API_payment_infos/
*
* @see http://www.php.net/manual/de/function.date.php
* @see http://en.wikipedia.org/wiki/ISO_8601
* @param string $value
*/
public function setShippingCompletedTime($value) {
$this->shipping_completed_time = $value;
public function setPaymentMethod($value) {
$this->payment_method = $value;
}
/**
* The full amount of Items
*
* @param float $value
*/
public function setAmountItems($value) { $this->amount_items = $value; }
public function setAmountItems($value) {
$this->amount_items = $value;
}
/**
* The shipping price
*
* @param float $value
*/
public function setAmountShipping($value) { $this->amount_shipping = $value; }
public function setAmountShipping($value) {
$this->amount_shipping = $value;
}
/**
* Amount for Shop Payment
*
* @param float $value
*/
public function setAmountShopPayment($value) { $this->amount_shop_payment = $value; }
public function setAmountShopPayment($value) {
$this->amount_shop_payment = $value;
}
/**
* Tax Percent for AmountShopPayment or AmountShopgatePayment
*
* @param float $value
*/
public function setPaymentTaxPercent($value) { $this->payment_tax_percent = $value; }
public function setPaymentTaxPercent($value) {
$this->payment_tax_percent = $value;
}
/**
* Amount for Shopgate Payment
*
* @param float $value
*/
public function setAmountShopgatePayment($value) { $this->amount_shopgate_payment = $value; }
public function setAmountShopgatePayment($value) {
$this->amount_shopgate_payment = $value;
}
/**
* Complete amount for the order
*
* @param float $value
*/
public function setAmountComplete($value) { $this->amount_complete = $value; }
/**
* The currency for this order
*
* The currency ISO-Code from ISO-4217
*
* Sample: <ul><li>EUR</li><li>CHF</li></ul>
*
* @see http://de.wikipedia.org/wiki/ISO_4217
* @param string $value
*/
public function setCurrency($value) { $this->currency = $value; }
/**
* If this flag is set to 1, the Order is a Test
*
* @param bool $value
*/
public function setIsTest($value) { $this->is_test = $value; }
/**
* If this flag is set to 1 the order is cancelled
*
* @param bool $value
*/
public function setIsStorno($value) { $this->is_storno = $value; }
/**
* If this flag is set to 1 the invoice is already sent to the customer. The merchant must not send the invoice
*
* @param bool $value
*/
public function setIsCustomerInvoiceBlocked($value) { $this->is_customer_invoice_blocked = $value; }
/**
* If this flag is set to 1 the payment of the order must be updated
*
* @param bool $value
*/
public function setUpdatePayment($value) {
$this->update_payment = $value;
public function setAmountComplete($value) {
$this->amount_complete = $value;
}
/**
* If this flag is set to 1 the shipping of the order must be updated
* @see http://de.wikipedia.org/wiki/ISO_4217
*
* @param bool $value
* @param string $value
*/
public function setUpdateShipping($value) {
$this->update_shipping = $value;
public function setCurrency($value) {
$this->currency = $value;
}
/**
* The invoice address of the customer
*
* @param ShopgateAddress|mixed[] $value
*/
public function setInvoiceAddress($value) {
if (!is_object($value) && !($value instanceof ShopgateAddress) && !is_array($value)) {
ca. Zeile 359
}
if (is_array($value)) {
$value = new ShopgateAddress($value);
$value->setIsDeliveryAddress(false);
$value->setIsInvoiceAddress(true);
}
$this->invoice_address = $value;
}
/**
* The delivery address of the customer
*
* @param ShopgateAddress|mixed[] $value
*/
public function setDeliveryAddress($value) {
if (!is_object($value) && !($value instanceof ShopgateAddress) && !is_array($value)) {
ca. Zeile 377
}
if (is_array($value)) {
$value = new ShopgateAddress($value);
$value->setIsDeliveryAddress(true);
$value->setIsInvoiceAddress(false);
}
$this->delivery_address = $value;
}
/**
* The list of itmes in the order
*
* @param ShopgateOrderItem[]|mixed[][] $value
* @param ShopgateExternalCoupon[] $value
*/
public function setItems($value) {
public function setExternalCoupons($value) {
if (!is_array($value)) {
$this->items = null;
$this->external_coupons = null;
return;
}
foreach ($value as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateOrderItem)) && !is_array($element)) {
if ((!is_object($element) || !($element instanceof ShopgateExternalCoupon)) && !is_array($element)) {
unset($value[$index]);
continue;
}
if (is_array($element)) {
$element = new ShopgateOrderItem($element);
$element = new ShopgateExternalCoupon($element);
}
}
$this->items = $value;
$this->external_coupons = $value;
}
/**
* The list of delivery Notes of the order
*
* @param ShopgateDeliveryNote[]|mixed[][] $value
* @param ShopgateShopgateCoupon[] $value
*/
public function setDeliveryNotes($value) {
if (empty($value)) {
$this->delivery_notes = null;
public function setShopgateCoupons($value) {
if (!is_array($value)) {
$this->shopgate_coupons = null;
return;
}
foreach ($value as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateShopgateCoupon)) && !is_array($element)) {
unset($value[$index]);
continue;
}
if (is_array($element)) {
$element = new ShopgateShopgateCoupon($element);
}
}
$this->shopgate_coupons = $value;
}
/**
* @param ShopgateOrderItem []|mixed[][] $value
*/
public function setItems($value) {
if (!is_array($value)) {
$this->delivery_notes = null;
$this->items = null;
return;
}
foreach ($value as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateDeliveryNote)) && !is_array($element)) {
if ((!is_object($element) || !($element instanceof ShopgateOrderItem)) && !is_array($element)) {
unset($value[$index]);
continue;
}
if (is_array($element)) {
$element = new ShopgateDeliveryNote($element);
$element = new ShopgateOrderItem($element);
}
}
$this->delivery_notes = $value;
$this->items = $value;
}
/**********
* Getter *
**********/
##########
# Getter #
##########
/**
* The Shopgate order number
*
* Format: Exact 10 Digits
* Sample: 1012001234
*
* @return string
*/
public function getOrderNumber() { return $this->order_number; }
public function getCustomerNumber() {
return $this->customer_number;
}
/**
* The customer number by shopgate
*
* Format: Exact 5 Digits
* Sample: 101234
*
* @return string
*/
public function getCustomerNumber() { return $this->customer_number; }
public function getExternalCustomerNumber() {
return $this->external_customer_number;
}
/**
* The order number in your system
*
* @return string
*/
public function getExternalOrderNumber() { return $this->external_order_number; }
public function getExternalCustomerId() {
return $this->external_customer_id;
}
/**
* The order id in your system
*
* @return string
*/
public function getExternalOrderId() { return $this->external_order_id; }
public function getMail() {
return $this->mail;
}
/**
* The customer number in your system
*
* @return string
*/
public function getExternalCustomerNumber() { return $this->external_customer_number; }
public function getPhone() {
return $this->phone;
}
/**
* The customer id in your system
*
* @return string
*/
public function getExternalCustomerId() { return $this->external_customer_id ; }
public function getMobile() {
return $this->mobile;
}
/**
* The eMail-Adress of the customer
*
* @return string
*/
public function getMail() { return $this->mail; }
public function getExternalCustomerGroupId() {
return $this->external_customer_group_id;
}
/**
* The phone-number of the cutsomer
*
* Sample: +49123456789
*
* @return string
* @return ShopgateOrderCustomField[]
*/
public function getPhone() { return $this->phone; }
public function getCustomFields() {
if(!is_array($this->custom_fields)) {
$this->custom_fields = array();
}
return $this->custom_fields;
}
/**
* The mobile-number of the cutsomer
*
* Sample: +49123456789
*
* @return string
*/
public function getMobile() { return $this->mobile; }
public function getShippingGroup() {
return $this->shipping_group;
}
/**
* The confirm shipping url to confirm the shipping manual
*
* @return string
*/
public function getConfirmShippingUrl() { return $this->confirm_shipping_url ; }
public function getShippingType() {
return $this->shipping_type;
}
/**
* The DateTime when the order was created
*
* If $format is empty, the default DateTime returne in ISO-8601 (date('c');)
*
* Format: ISO-8601 - 2012-02-08T009:20:25+01:00
*
* @see http://www.php.net/manual/de/function.date.php
* @see http://en.wikipedia.org/wiki/ISO_8601
* @param string format
* @return string
* @return ShopgateShippingInfo
*/
public function getCreatedTime($format = "") {
$time = $this->created_time;
if(!empty($format)) {
$timestamp = strtotime($time);
$time = date($format, $timestamp);
}
return $time;
public function getShippingInfos() {
return $this->shipping_infos;
}
/**
* The payment method for the order
*
* Sample: <ul><li>SHOPGATE</li><li>PREPAY</li><li>DT_CC</li><li>BILLSAFE</li><li>KLARNA_INV</li><li>DEBIT</li><li>COD</li><li>PAYPAL</li></ul>
*
* @see http://wiki.shopgate.com/Merchant_API_payment_infos/
* @return string
*/
public function getPaymentMethod() {
return $this->payment_method;
}
/**
* The payment group for the order
*
* Sample: <ul><li>SHOPGATE</li><li>PREPAY</li><li>CC</li><li>INVOICE</li><li>DEBIT</li><li>COD</li><li>PAYPAL</li></ul>
*
* @see http://wiki.shopgate.com/Merchant_API_payment_infos/
* @return string
*/
public function getPaymentGroup() { return $this->payment_group; }
/**
* Is the order is payed
*
* @return bool
*/
public function getIsPaid() { return (bool) $this->is_paid; }
/**
* The Time when the order was payed
*
* If $format is empty, the default DateTime returne in ISO-8601 (date('c');)
*
* Format: ISO-8601 - 2012-02-08T009:20:25+01:00
*
* @see http://www.php.net/manual/de/function.date.php
* @see http://en.wikipedia.org/wiki/ISO_8601
* @param string format
* @return string
*/
public function getPaymentTime($format="") {
$time = $this->payment_time;
if(!empty($format)) {
$timestamp = strtotime($time);
$time = date($format, $timestamp);
}
return $time;
}
/**
* The Transactioncode for some paymentproviders
*
* @return string
*/
public function getPaymentTransactionNumber() { return $this->payment_transaction_number; }
/**
* Information about the selected payment type (like e.g. bank account number)
*
* @return mixed[]
*/
public function getPaymentInfos() { return $this->payment_infos; }
/**
* Is the shipping is blocked
*
* @return bool
*/
public function getIsShippingBlocked() { return (bool) $this->is_shipping_blocked; }
/**
* Is the Shipping is completed
*/
public function getIsShippingCompleted() { return (bool) $this->is_shipping_completed; }
/**
* The Time when the Shipping was set completed
*
* If $format is empty, the default DateTime returne in ISO-8601 (date('c');)
*
* Format: ISO-8601 - 2012-02-08T009:20:25+01:00
*
* @see http://www.php.net/manual/de/function.date.php
* @see http://en.wikipedia.org/wiki/ISO_8601
* @param string format
* @return string
*/
public function getShippingCompletedTime($format='') {
$time = $this->shipping_completed_time;
if(!empty($format)) {
$timestamp = strtotime($time);
$time = date($format, $timestamp);
}
return $time;
public function getPaymentGroup() {
return $this->payment_group;
}
/**
* The full amount of Items
*
* @return float
*/
public function getAmountItems() { return $this->amount_items; }
public function getAmountItems() {
return $this->amount_items;
}
/**
* The shipping price
*
* @return float
*/
public function getAmountShipping() { return $this->amount_shipping; }
public function getAmountShipping() {
return $this->amount_shipping;
}
/**
* Amount for Shop Payment
*
* @return float
*/
public function getAmountShopPayment() { return $this->amount_shop_payment; }
public function getAmountShopPayment() {
return $this->amount_shop_payment;
}
/**
* Tax Percent for AmountShopPayment or AmountShopgatePayment
*
* @return float
*/
public function getPaymentTaxPercent() { return $this->payment_tax_percent; }
public function getPaymentTaxPercent() {
return $this->payment_tax_percent;
}
/**
* Amount for Payment
*
* @return float
*/
public function getAmountShopgatePayment() { return $this->amount_shopgate_payment; }
public function getAmountShopgatePayment() {
return $this->amount_shopgate_payment;
}
/**
* Complete amount for the order
*
* @return float
*/
public function getAmountComplete() { return $this->amount_complete; }
public function getAmountComplete() {
return $this->amount_complete;
}
/**
* The currency for this order
*
* The currency ISO-Code from ISO-4217
*
* Sample: <ul><li>EUR</li><li>CHF</li></ul>
*
* @see http://de.wikipedia.org/wiki/ISO_4217
* @return string
*/
public function getCurrency() { return $this->currency; }
/**
* If this flag is set to 1, the Order is a Test
*
* @return bool
*/
public function getIsTest() { return (bool) $this->is_test; }
public function getCurrency() {
return $this->currency;
}
/**
* If this flag is set to 1 the order is cancelled
*
* @return bool
* @return ShopgateAddress
*/
public function getIsStorno() { return (bool) $this->is_storno; }
public function getInvoiceAddress() {
return $this->invoice_address;
}
/**
* If this flag is set to 1 the invoice is already sent to the customer. The merchant must not send the invoice
*
* @return bool
* @return ShopgateAddress
*/
public function getIsCustomerInvoiceBlocked() { return (bool) $this->is_customer_invoice_blocked; }
public function getDeliveryAddress() {
return $this->delivery_address;
}
/**
* If this flag is set to 1 the payment of the order must be updated
*
* @return bool
* @return ShopgateExternalCoupon[]
*/
public function getUpdatePayment() {
return (bool) $this->update_payment;
public function getExternalCoupons() {
return $this->external_coupons;
}
/**
* If this flag is set to 1 the shipping of the order must be updated
*
* @return bool
* @return ShopgateShopgateCoupon[]
*/
public function getUpdateShipping() {
return (bool) $this->update_shipping;
public function getShopgateCoupons() {
return $this->shopgate_coupons;
}
/**
* The invoice address of the customer
*
* @return ShopgateAddress
* @return ShopgateOrderItem[]
*/
public function getInvoiceAddress() { return $this->invoice_address; }
public function getItems() {
return $this->items;
}
}
/**
* The delivery address of the customer
*
* @return ShopgateAddress
*/
public function getDeliveryAddress() { return $this->delivery_address; }
class ShopgateCart extends ShopgateCartBase {
protected $internal_cart_info;
/**
* The list of itmes in the order
*
* @return ShopgateOrderItem[]
* @return string
*/
public function getItems() { return $this->items; }
public function getInternalCartInfo() {
return $this->internal_cart_info;
}
/**
* The list of delivery Notes of the order
*
* @return ShopgateDeliveryNote[]
* @param string $value
*/
public function getDeliveryNotes() { return $this->delivery_notes; }
public function setInternalCartInfo($value) {
$this->internal_cart_info = $value;
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitOrder($this);
$v->visitCart($this);
}
}
class ShopgateOrderItem extends ShopgateContainer {
protected $item_number;
class ShopgateOrder extends ShopgateCartBase {
protected $order_number;
protected $quantity;
protected $confirm_shipping_url;
protected $name;
protected $created_time;
protected $unit_amount;
protected $unit_amount_with_tax;
protected $is_paid;
protected $tax_percent;
protected $payment_time;
protected $payment_transaction_number;
protected $payment_infos;
protected $currency;
protected $is_shipping_blocked;
protected $is_shipping_completed;
protected $shipping_completed_time;
protected $shipping_tax_percent;
protected $internal_order_info;
protected $is_test;
protected $is_storno;
protected $is_customer_invoice_blocked;
protected $options = array();
protected $update_shipping = false;
protected $update_payment = false;
protected $inputs = array();
protected $delivery_notes = array();
protected $tracking_get_parameters = array();
public function accept(ShopgateContainerVisitor $v) {
$v->visitOrder($this);
}
/**********
* Setter *
**********/
##########
# Setter #
##########
/**
* Sets the name value
*
* @param string $value
*/
public function setName($value) {
$this->name = $value;
public function setOrderNumber($value) {
$this->order_number = $value;
}
/**
* Sets the item_number value
*
* @param string $value
*/
public function setItemNumber($value) {
$this->item_number = $value;
public function setConfirmShippingUrl($value) {
$this->confirm_shipping_url = $value;
}
/**
* Sets the unit_amount value
* @see http://www.php.net/manual/de/function.date.php
* @see http://en.wikipedia.org/wiki/ISO_8601
*
* @param string $value
*/
public function setUnitAmount($value) {
$this->unit_amount = $value;
public function setCreatedTime($value) {
$this->created_time = $value;
}
/**
* Sets the unit_amount_with_tax value
*
* @param float $value
* @param bool $value
*/
public function setUnitAmountWithTax($value) {
$this->unit_amount_with_tax = $value;
public function setIsPaid($value) {
$this->is_paid = $value;
}
/**
* Sets the quantity value
* @see http://www.php.net/manual/de/function.date.php
* @see http://en.wikipedia.org/wiki/ISO_8601
*
* @param int $value
* @param string $value
*/
public function setQuantity($value) {
$this->quantity = $value;
public function setPaymentTime($value) {
$this->payment_time = $value;
}
/**
* Sets the tax_percent value
*
* @param float $value
* @param string $value
*/
public function setTaxPercent($value) {
$this->tax_percent = $value;
public function setPaymentTransactionNumber($value) {
$this->payment_transaction_number = $value;
}
/**
* Sets the currency value
* @see http://wiki.shopgate.com/Merchant_API_payment_infos/
*
* @param string $value
* @param mixed[] $value An array of additional information about the payment depending on the payment type
*/
public function setCurrency($value) {
$this->currency = $value;
public function setPaymentInfos($value) {
$this->payment_infos = $value;
}
/**
* Sets the internal_order_info value
*
* @param string $value
* @param bool $value
*/
public function setInternalOrderInfo($value) { $this->internal_order_info = $value; }
public function setIsShippingBlocked($value) {
$this->is_shipping_blocked = $value;
}
/**
* Sets the options value
*
* @param ShopgateOrderItemOption[]|mixed[][] $value
* @param bool $value
*/
public function setOptions($value) {
if (empty($value) || !is_array($value)) {
$this->options = array();
return;
}
// convert sub-arrays into ShopgateOrderItemOption objects if necessary
foreach ($value as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateOrderItemOption)) && !is_array($element)) {
unset($value[$index]);
continue;
}
if (is_array($element)) {
$element = new ShopgateOrderItemOption($element);
}
}
$this->options = $value;
public function setIsShippingCompleted($value) {
$this->is_shipping_completed = $value;
}
/**
* Sets the inputs value
* @see http://www.php.net/manual/de/function.date.php
* @see http://en.wikipedia.org/wiki/ISO_8601
*
* @param ShopgateOrderItemInput[]|mixed[][] $value
* @param string $value
*/
public function setInputs($value) {
if (empty($value) || !is_array($value)) {
$this->inputs = array();
return;
}
// convert sub-arrays into ShopgateOrderItemInputs objects if necessary
foreach ($value as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateOrderItemInput)) && !is_array($element)) {
unset($value[$index]);
continue;
}
if (is_array(($element))) {
$element = new ShopgateOrderItemInput($element);
}
public function setShippingCompletedTime($value) {
$this->shipping_completed_time = $value;
}
$this->inputs = $value;
/**
* @param float $value
*/
public function setShippingTaxPercent($value) {
$this->shipping_tax_percent = $value;
}
/**********
* Getter *
**********/
/**
* Returns the name value
*
* @return string
* @param bool $value
*/
public function getName() {
return $this->name;
public function setIsTest($value) {
$this->is_test = $value;
}
/**
* Returns the item_number value
*
* @return string
* @param bool $value
*/
public function getItemNumber() {
return $this->item_number;
public function setIsStorno($value) {
$this->is_storno = $value;
}
/**
* Returns the unit_amount value
*
* @return float
* @param bool $value
*/
public function getUnitAmount() {
return $this->unit_amount;
public function setIsCustomerInvoiceBlocked($value) {
$this->is_customer_invoice_blocked = $value;
}
/**
* @param bool $value
*/
public function setUpdatePayment($value) {
$this->update_payment = $value;
}
/**
* @param bool $value
*/
public function setUpdateShipping($value) {
$this->update_shipping = $value;
}
/**
* @param ShopgateDeliveryNote []|mixed[][] $value
*/
public function setDeliveryNotes($value) {
if (empty($value)) {
$this->delivery_notes = null;
return;
}
if (!is_array($value)) {
$this->delivery_notes = null;
return;
}
foreach ($value as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateDeliveryNote)) && !is_array($element)) {
unset($value[$index]);
continue;
}
if (is_array($element)) {
$element = new ShopgateDeliveryNote($element);
}
}
$this->delivery_notes = $value;
}
/**
* @param array $value
*/
public function setTrackingGetParameters($value) {
$this->tracking_get_parameters = (array) $value;
}
##########
# Getter #
##########
/**
* @return string
*/
public function getOrderNumber() {
return $this->order_number;
}
/**
* @return string
*/
public function getExternalOrderNumber() {
return $this->external_order_number;
}
/**
* @return string
*/
public function getExternalOrderId() {
return $this->external_order_id;
}
/**
* @return string
*/
public function getConfirmShippingUrl() {
return $this->confirm_shipping_url;
}
/**
* @see http://www.php.net/manual/de/function.date.php
* @see http://en.wikipedia.org/wiki/ISO_8601
*
* @param string $format
*
* @return string
*/
public function getCreatedTime($format = "") {
$time = $this->created_time;
if (!empty($format)) {
$timestamp = strtotime($time);
$time = date($format, $timestamp);
}
return $time;
}
/**
* @return bool
*/
public function getIsPaid() {
return (bool)$this->is_paid;
}
/**
* @see http://www.php.net/manual/de/function.date.php
* @see http://en.wikipedia.org/wiki/ISO_8601
*
* @param string $format
*
* @return string
*/
public function getPaymentTime($format = "") {
$time = $this->payment_time;
if (!empty($format)) {
$timestamp = strtotime($time);
$time = date($format, $timestamp);
}
return $time;
}
/**
* @return string
*/
public function getPaymentTransactionNumber() {
return $this->payment_transaction_number;
}
/**
* @return mixed[]
*/
public function getPaymentInfos() {
return $this->payment_infos;
}
/**
* @return bool
*/
public function getIsShippingBlocked() {
return (bool)$this->is_shipping_blocked;
}
/**
* @return bool
*/
public function getIsShippingCompleted() {
return (bool)$this->is_shipping_completed;
}
/**
* @see http://www.php.net/manual/de/function.date.php
* @see http://en.wikipedia.org/wiki/ISO_8601
*
* @param string $format
*
* @return string
*/
public function getShippingCompletedTime($format = '') {
$time = $this->shipping_completed_time;
if (!empty($format)) {
$timestamp = strtotime($time);
$time = date($format, $timestamp);
}
return $time;
}
/**
* @return float
*/
public function getShippingTaxPercent() {
return $this->shipping_tax_percent;
}
/**
* @return bool
*/
public function getIsTest() {
return (bool)$this->is_test;
}
/**
* @return bool
*/
public function getIsStorno() {
return (bool)$this->is_storno;
}
/**
* @return bool
*/
public function getIsCustomerInvoiceBlocked() {
return (bool)$this->is_customer_invoice_blocked;
}
/**
* @return bool
*/
public function getUpdatePayment() {
return (bool)$this->update_payment;
}
/**
* @return bool
*/
public function getUpdateShipping() {
return (bool)$this->update_shipping;
}
/**
* @return ShopgateDeliveryNote[]
*/
public function getDeliveryNotes() {
return $this->delivery_notes;
}
/**
* @return array
*/
public function getTrackingGetParameters() {
return $this->tracking_get_parameters;
}
}
class ShopgateOrderItem extends ShopgateContainer {
const TYPE_ITEM = 'item';
const TYPE_PRODUCT = 'item';
const TYPE_PAYMENT = 'payment';
const TYPE_SHOPGATE_COUPON = 'sg_coupon';
/** @var string */
protected $item_number;
/** @var string */
protected $item_number_public;
/** @var string */
protected $parent_item_number;
/** @var int */
protected $order_item_id;
/** @var string */
protected $type;
/** @var int */
protected $quantity;
/** @var string */
protected $name;
/** @var float */
protected $unit_amount;
/** @var float */
protected $unit_amount_with_tax;
/** @var float */
protected $tax_percent;
/** @var string */
protected $tax_class_key;
/** @var string */
protected $tax_class_id;
/** @var string */
protected $currency;
/** @var string */
protected $internal_order_info;
protected $options = array();
protected $inputs = array();
protected $attributes = array();
##########
# Setter #
##########
/**
* @param string $value
*/
public function setName($value) {
$this->name = $value;
}
/**
* @param string $value
*/
public function setItemNumber($value) {
$this->item_number = $value;
}
/**
* @param string $value
*/
public function setItemNumberPublic($value) {
$this->item_number_public = $value;
}
public function setParentItemNumber($value) {
$this->parent_item_number = $value;
}
/**
* @param int $value
*/
public function setOrderItemId($value) {
$this->order_item_id = $value;
}
/**
* @param string $value
*/
public function setType($value) {
$this->type = $value;
}
/**
* @param float $value
*/
public function setUnitAmount($value) {
$this->unit_amount = $value;
}
/**
* @param float $value
*/
public function setUnitAmountWithTax($value) {
$this->unit_amount_with_tax = $value;
}
/**
* @param int $value
*/
public function setQuantity($value) {
$this->quantity = $value;
}
/**
* @param float $value
*/
public function setTaxPercent($value) {
$this->tax_percent = $value;
}
/**
* Sets the tax_class_key value
*
* @param string $value
*/
public function setTaxClassKey($value) {
$this->tax_class_key = $value;
}
/**
* Sets the tax_class_id
*
* @param string $value
*/
public function setTaxClassId($value) {
$this->tax_class_id = $value;
}
/**
* @param string $value
*/
public function setCurrency($value) {
$this->currency = $value;
}
/**
* @param string $value
*/
public function setInternalOrderInfo($value) {
$this->internal_order_info = $value;
}
/**
* @param ShopgateOrderItemOption []|mixed[][] $value
*/
public function setOptions($value) {
if (empty($value) || !is_array($value)) {
$this->options = array();
return;
}
$options = array();
foreach ($value as $index => $element) {
if (!($element instanceof ShopgateOrderItemOption) && !is_array($element)) {
continue;
}
if (is_array($element)) {
$options[] = new ShopgateOrderItemOption($element);
} else {
$options[] = $element;
}
}
$this->options = $options;
}
/**
* @param ShopgateOrderItemInput []|mixed[][] $value
*/
public function setInputs($value) {
if (empty($value) || !is_array($value)) {
$this->inputs = array();
return;
}
$inputs = array();
foreach ($value as $index => $element) {
if (!($element instanceof ShopgateOrderItemInput) && !is_array($element)) {
continue;
}
if (is_array(($element))) {
$inputs[] = new ShopgateOrderItemInput($element);
} else {
$inputs[] = $element;
}
}
$this->inputs = $inputs;
}
/**
* @param ShopgateOrderItemAttribute []|mixed[][] $value
*/
public function setAttributes($value) {
if (empty($value) || !is_array($value)) {
$this->attributes = array();
return;
}
// convert sub-arrays into ShopgateOrderItemInputs objects if necessary
foreach ($value as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateOrderItemAttribute)) && !is_array($element)) {
unset($value[$index]);
continue;
}
if (is_array(($element))) {
$element = new ShopgateOrderItemAttribute($element);
}
}
$this->attributes = $value;
}
##########
# Getter #
##########
/**
* @return string
*/
public function getName() {
return $this->name;
}
/**
* @return string
*/
public function getItemNumber() {
return $this->item_number;
}
/**
* @return string
*/
public function getItemNumberPublic() {
return $this->item_number_public;
}
public function getParentItemNumber() {
return $this->parent_item_number;
}
/**
* @return int
*/
public function getOrderItemId() {
return $this->order_item_id;
}
/**
* @return string
*/
public function getType() {
return $this->type;
}
/**
* @return float
*/
public function getUnitAmount() {
return $this->unit_amount;
}
/**
* @return float
*/
public function getUnitAmountWithTax() {
return $this->unit_amount_with_tax;
}
/**
* @return int
*/
public function getQuantity() {
return $this->quantity;
}
/**
* @return float
*/
public function getTaxPercent() {
return $this->tax_percent;
}
/**
* @return string
*/
public function getTaxClassKey() {
return $this->tax_class_key;
}
/**
* Returns the tax_class_id
*
* @return string
*/
public function getTaxClassId() {
return $this->tax_class_id;
}
/**
* @return string
*/
public function getCurrency() {
return $this->currency;
}
/**
* @return string
*/
public function getInternalOrderInfo() {
return $this->internal_order_info;
}
/**
* @return ShopgateOrderItemOption[]
*/
public function getOptions() {
return $this->options;
}
/**
* @return ShopgateOrderItemInput[]
*/
public function getInputs() {
return $this->inputs;
}
/**
* @return ShopgateOrderItemAttribute[]
*/
public function getAttributes() {
return $this->attributes;
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitOrderItem($this);
}
/**
* @return bool
*/
public function isItem() {
return ($this->type == self::TYPE_ITEM);
}
/**
* @return bool
*/
public function isSgCoupon() {
return ($this->type == self::TYPE_SHOPGATE_COUPON);
}
/**
* @return bool
*/
public function isPayment() {
return ($this->type == self::TYPE_PAYMENT);
}
}
class ShopgateOrderItemOption extends ShopgateContainer {
protected $name;
protected $value;
protected $additional_amount_with_tax;
protected $value_number;
protected $option_number;
##########
# Setter #
##########
/**
* @param string $value
*/
public function setName($value) {
$this->name = $value;
}
/**
* @param string $value
*/
public function setValue($value) {
$this->value = $value;
}
/**
* @param string $value
*/
public function setAdditionalAmountWithTax($value) {
$this->additional_amount_with_tax = $value;
}
/**
* @param string $value
*/
public function setValueNumber($value) {
$this->value_number = $value;
}
/**
* @param string $value
*/
public function setOptionNumber($value) {
$this->option_number = $value;
}
##########
# Getter #
##########
/**
* @return string
*/
public function getName() {
return $this->name;
}
/**
* @return string
*/
public function getValue() {
return $this->value;
}
/**
* @return int
*/
public function getAdditionalAmountWithTax() {
return $this->additional_amount_with_tax;
}
/**
* @return string
*/
public function getValueNumber() {
return $this->value_number;
}
/**
* @return string
*/
public function getOptionNumber() {
return $this->option_number;
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitOrderItemOption($this);
}
}
class ShopgateOrderItemInput extends ShopgateContainer {
protected $input_number;
protected $type;
protected $additional_amount_with_tax;
protected $label;
protected $user_input;
protected $info_text;
##########
# Setter #
##########
/**
* @param string $value
*/
public function setInputNumber($value) {
$this->input_number = $value;
}
/**
* @param string $value "text"|"image"
*/
public function setType($value) {
$this->type = $value;
}
/**
* @param float $value
*/
public function setAdditionalAmountWithTax($value) {
$this->additional_amount_with_tax = $value;
}
/**
* @param string $value
*/
public function setLabel($value) {
$this->label = $value;
}
/**
* @param string $value
*/
public function setUserInput($value) {
$this->user_input = $value;
}
/**
* @param string $value
*/
public function setInfoText($value) {
$this->info_text = $value;
}
##########
# Getter #
##########
/**
* @return string
*/
public function getInputNumber() {
return $this->input_number;
}
/**
* @return string "text"|"image"
*/
public function getType() {
return $this->type;
}
/**
* @return float
*/
public function getAdditionalAmountWithTax() {
return $this->additional_amount_with_tax;
}
/**
* @return string
*/
public function getLabel() {
return $this->label;
}
/**
* @return string
*/
public function getUserInput() {
return $this->user_input;
}
/**
* @return string
*/
public function getInfoText() {
return $this->info_text;
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitOrderItemInput($this);
}
}
class ShopgateOrderItemAttribute extends ShopgateContainer {
protected $name;
protected $value;
##########
# Setter #
##########
/**
* @param string $value
*/
public function setName($value) {
$this->name = $value;
}
/**
* @param string $value
*/
public function setValue($value) {
$this->value = $value;
}
##########
# Getter #
##########
/**
* @return string
*/
public function getName() {
return $this->name;
}
/**
* @return string
*/
public function getValue() {
return $this->value;
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitOrderItemAttribute($this);
}
}
class ShopgateShippingInfo extends ShopgateContainer {
protected $name;
protected $display_name;
protected $description;
protected $amount;
protected $amount_net;
protected $amount_gross;
protected $weight;
protected $api_response;
protected $internal_shipping_info;
public function accept(ShopgateContainerVisitor $v) {
$v->visitShippingInfo($this);
}
/**
*
* @return string
*/
public function getName() {
return $this->name;
}
/**
*
* @param string $value
*/
public function setName($value) {
$this->name = $value;
}
/**
*
* @return string
*/
public function getDisplayName() {
return $this->display_name;
}
/**
*
* @param string $value
*/
public function setDisplayName($value) {
$this->display_name = $value;
}
/**
*
* @return string
*/
public function getDescription() {
return $this->description;
}
/**
*
* @param string $value
*/
public function setDescription($value) {
$this->description = $value;
}
/**
*
* @return float
*
* @deprecated use getAmountNet or getAmountGross
*/
public function getAmount() {
return $this->amount;
}
/**
*
* @param float $value
*
* @deprecated use setAmountNet or setAmountGross
*/
public function setAmount($value) {
$this->amount = $value;
}
/**
*
* @return float
*/
public function getAmountNet() {
return $this->amount_net;
}
/**
*
* @param float $value
*/
public function setAmountNet($value) {
$this->amount_net = $value;
}
/**
*
* @return float
*/
public function getAmountGross() {
return $this->amount_gross;
}
/**
*
* @param float $value
*/
public function setAmountGross($value) {
$this->amount_gross = $value;
}
/**
*
* @return int
*/
public function getWeight() {
return $this->weight;
}
/**
*
* @param int $value
*/
public function setWeight($value) {
$this->weight = $value;
}
/**
*
* @return mixed[]
*/
public function getApiResponse() {
return $this->api_response;
}
/**
*
* @param string|mixed[] $value
*/
public function setApiResponse($value) {
$this->api_response = $value;
}
/**
* @return string
*/
public function getInternalShippingInfo() {
return $this->internal_shipping_info;
}
/**
* @param string $value
*/
public function setInternalShippingInfo($value) {
$this->internal_shipping_info = $value;
}
}
class ShopgateDeliveryNote extends ShopgateContainer {
// shipping groups
const DHL = "DHL"; // DHL
const DHLEXPRESS = "DHLEXPRESS"; // DHLEXPRESS
const DP = "DP"; // Deutsche Post
const DPD = "DPD"; // Deutscher Paket Dienst
const FEDEX = "FEDEX"; // FedEx
const GLS = "GLS"; // GLS
const HLG = "HLG"; // Hermes
const OTHER = "OTHER"; // Anderer Lieferant
const TNT = "TNT"; // TNT
const TOF = "TOF"; // Trnas-o-Flex
const UPS = "UPS"; // UPS
const USPS = "USPS"; // USPS
// shipping types
const MANUAL = "MANUAL";
const USPS_API_V1 = "USPS_API_V1";
const UPS_API_V1 = "UPS_API_V1";
protected $shipping_service_id = null;
protected $shipping_service_name = "";
protected $tracking_number = "";
protected $shipping_time = null;
##########
# Setter #
##########
/**
* @param string $value
*/
public function setShippingServiceId($value) {
$this->shipping_service_id = $value;
}
/**
* @param string $value
*/
public function setShippingServiceName($value) {
$this->shipping_service_name = $value;
}
/**
* @param string $value
*/
public function setTrackingNumber($value) {
$this->tracking_number = $value;
}
/**
* @param string $value
*/
public function setShippingTime($value) {
$this->shipping_time = $value;
}
##########
# Getter #
##########
/**
* @return string
*/
public function getShippingServiceId() {
return $this->shipping_service_id;
}
/**
* @return string
*/
public function getShippingServiceName() {
return $this->shipping_service_name;
}
/**
* @return string
*/
public function getTrackingNumber() {
return $this->tracking_number;
}
/**
* @return string
*/
public function getShippingTime() {
return $this->shipping_time;
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitOrderDeliveryNote($this);
}
}
abstract class ShopgateCoupon extends ShopgateContainer {
protected $order_index;
protected $code;
protected $name;
protected $description;
protected $amount;
protected $amount_net;
protected $amount_gross;
protected $tax_type = 'auto';
protected $currency;
protected $is_free_shipping;
protected $internal_info;
##########
# Setter #
##########
/**
* @param int $value
*/
public function setOrderIndex($value) {
$this->order_index = $value;
}
/**
* @param string $value
*/
public function setCode($value) {
$this->code = $value;
}
/**
* @param string $value
*/
public function setName($value) {
$this->name = $value;
}
/**
*
* @param string $value
*/
public function setDescription($value) {
$this->description = $value;
}
/**
* @param float $value
*
* @deprecated
*/
public function setAmount($value) {
$this->amount = $value;
}
/**
* @param float $value
*/
public function setAmountNet($value) {
$this->amount_net = $value;
}
/**
* @param float $value
*/
public function setAmountGross($value) {
$this->amount_gross = $value;
}
/**
* @param string $value
*/
public function setTaxType($value) {
$this->tax_type = $value;
}
/**
* @param string $value
*/
public function setCurrency($value) {
$this->currency = $value;
}
/**
* @param bool $value
*/
public function setIsFreeShipping($value) {
$this->is_free_shipping = $value;
}
/**
* @param string $value
*/
public function setInternalInfo($value) {
$this->internal_info = $value;
}
##########
# Getter #
##########
/**
* @return int
*/
public function getOrderIndex() {
return $this->order_index;
}
/**
* @return string
*/
public function getCode() {
return $this->code;
}
/**
* @return string
*/
public function getName() {
return $this->name;
}
/**
*
* @return string
*/
public function getDescription() {
return $this->description;
}
/**
* @return float
* @deprecated
*/
public function getAmount() {
return $this->amount;
}
/**
* @return float
*/
public function getAmountNet() {
return $this->amount_net;
}
/**
* @return float
*/
public function getAmountGross() {
return $this->amount_gross;
}
/**
* @return string
*/
public function getTaxType() {
return $this->tax_type;
}
/**
* @return string
*/
public function getCurrency() {
return $this->currency;
}
/**
* @return bool
*/
public function getIsFreeShipping() {
return $this->is_free_shipping;
}
/**
* @return string
*/
public function getInternalInfo() {
return $this->internal_info;
}
}
class ShopgateExternalCoupon extends ShopgateCoupon {
protected $is_valid;
protected $not_valid_message;
public function accept(ShopgateContainerVisitor $v) {
$v->visitExternalCoupon($this);
}
##########
# Setter #
##########
/**
* @param bool $value
*/
public function setIsValid($value) {
$this->is_valid = $value;
}
/**
* @param string $value
*/
public function setNotValidMessage($value) {
$this->not_valid_message = $value;
}
##########
# Getter #
##########
/**
* @return bool
*/
public function getIsValid() {
return $this->is_valid;
}
/**
* @return string
*/
public function getNotValidMessage() {
return $this->not_valid_message;
}
}
class ShopgateShopgateCoupon extends ShopgateCoupon {
protected $error;
protected $error_text;
public function accept(ShopgateContainerVisitor $v) {
$v->visitShopgateCoupon($this);
}
##########
# Setter #
##########
/**
* @param int $value
*/
public function setError($value) {
$this->error = $value;
}
/**
* @param string $value
*/
public function setErrorText($value) {
$this->error_text = $value;
}
##########
# Getter #
##########
/**
* @return int
*/
public function getError() {
return $this->error;
}
/**
* @return string
*/
public function getErrorText() {
return $this->error_text;
}
}
class ShopgateOrderCustomField extends ShopgateContainer {
protected $label;
protected $internal_field_name;
protected $value;
##########
# Setter #
##########
/**
* @param string $value
*/
public function setLabel($value) {
$this->label = $value;
}
/**
* @param string $value
*/
public function setInternalFieldName($value) {
$this->internal_field_name = $value;
}
/**
* @param mixed $value
*/
public function setValue($value) {
$this->value = $value;
}
##########
# Getter #
##########
/**
* @return string
*/
public function getLabel() {
return $this->label;
}
/**
* @return string
*/
public function getInternalFieldName() {
return $this->internal_field_name;
}
/**
* @return mixed
*/
public function getValue() {
return $this->value;
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitOrderCustomField($this);
}
}
class ShopgateShippingMethod extends ShopgateContainer {
protected $id;
protected $title;
protected $shipping_group;
protected $description;
protected $sort_order;
protected $amount;
protected $amount_with_tax;
protected $tax_class;
protected $tax_percent;
protected $internal_shipping_info;
##########
# Setter #
##########
/**
* @param string $value
*/
public function setId($value) {
$this->id = $value;
}
/**
* @param string $value
*/
public function setTitle($value) {
$this->title = $value;
}
/**
* @param string $value
*/
public function setShippingGroup($value) {
$this->shipping_group = $value;
}
/**
* @param string $value
*/
public function setDescription($value) {
$this->description = $value;
}
/**
* @param int $value
*/
public function setSortOrder($value) {
$this->sort_order = $value;
}
/**
* @param float $value
*/
public function setAmount($value) {
$this->amount = $value;
}
/**
* @param float $value
*/
public function setAmountWithTax($value) {
$this->amount_with_tax = $value;
}
/**
* @param string $value
*/
public function setTaxClass($value) {
$this->tax_class = $value;
}
/**
* @param string $value
*/
public function setTaxPercent($value) {
$this->tax_percent = $value;
}
/**
* @param string $value
*/
public function setInternalShippingInfo($value)
{
$this->internal_shipping_info = $value;
}
##########
# Getter #
##########
/**
* @return string
*/
public function getId() {
return $this->id;
}
/**
* @return string
*/
public function getTitle() {
return $this->title;
}
/**
* @return string
*/
public function getShippingGroup() {
return $this->shipping_group;
}
/**
* @return string
*/
public function getDescription() {
return $this->description;
}
/**
* @return int
*/
public function getSortOrder() {
return $this->sort_order;
}
/**
* Returns the unit_amount_with_tax value
*
* @return float
*/
public function getUnitAmountWithTax() {
return $this->unit_amount_with_tax;
public function getAmount() {
return $this->amount;
}
/**
* @return float
*/
public function getAmountWithTax() {
return $this->amount_with_tax;
}
/**
* @return string
*/
public function getTaxClass() {
return $this->tax_class;
}
/**
* @return string
*/
public function getTaxPercent() {
return $this->tax_percent;
}
/**
* @return string
*/
public function getInternalShippingInfo() {
return $this->internal_shipping_info;
}
/**
* @param ShopgateContainerVisitor $v
*/
public function accept(ShopgateContainerVisitor $v) {
$v->visitShippingMethod($this);
}
}
/**
* Class ShopgatePaymentMethod
*/
class ShopgatePaymentMethod extends ShopgateContainer {
protected $id;
protected $amount;
protected $amount_with_tax;
protected $tax_class;
protected $tax_percent;
##########
# Setter #
##########
/**
* @param string $value
*/
public function setId($value) {
$this->id = $value;
}
/**
* @param float $value
*/
public function setAmount($value) {
$this->amount = $value;
}
/**
* @param float $value
*/
public function setAmountWithTax($value) {
$this->amount_with_tax = $value;
}
/**
* @param string $value
*/
public function setTaxClass($value) {
$this->tax_class = $value;
}
/**
* @param string $value
*/
public function setTaxPercent($value) {
$this->tax_percent = $value;
}
##########
# Getter #
##########
/**
* @return string
*/
public function getId() {
return $this->id;
}
/**
* Returns the quantity value
*
* @return int
* @return float
*/
public function getQuantity() {
return $this->quantity;
public function getAmount() {
return $this->amount;
}
/**
* Returns the tax_percent value
*
* @return float
*/
public function getTaxPercent() {
return $this->tax_percent;
public function getAmountWithTax() {
return $this->amount_with_tax;
}
/**
* Returns the currency value
*
* @return string
*/
public function getCurrency() {
return $this->currency;
public function getTaxClass() {
return $this->tax_class;
}
/**
* Returns the internal_order_info value
*
* @return string
*/
public function getInternalOrderInfo() { return $this->internal_order_info; }
/**
* Returns the options value
*
* @return ShopgateOrderItemOption[]
*/
public function getOptions() { return $this->options; }
public function getTaxPercent() {
return $this->tax_percent;
}
/**
* Returns the inputs value
*
* @param ShopgateOrderItemInputs[]
* @param ShopgateContainerVisitor $v
*/
public function getInputs() {
return $this->inputs;
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitOrderItem($this);
$v->visitPaymentMethod($this);
}
}
class ShopgateOrderItemOption extends ShopgateContainer {
protected $name;
protected $value;
protected $additional_amount_with_tax;
protected $value_number;
protected $option_number;
class ShopgateCartItem extends ShopgateContainer {
protected $item_number;
protected $is_buyable;
protected $qty_buyable;
protected $stock_quantity;
protected $unit_amount;
protected $unit_amount_with_tax;
protected $error;
protected $error_text;
protected $options = array();
protected $inputs = array();
protected $attributes = array();
/**********
* Setter *
**********/
##########
# Setter #
##########
/**
* Sets the name value
*
* @param string $value
*/
public function setName($value) {
$this->name = $value;
public function setItemNumber($value) {
$this->item_number = $value;
}
/**
* Sets the value value
*
* @param string $value
* @param bool $value
*/
public function setValue($value) {
$this->value = $value;
public function setIsBuyable($value) {
$this->is_buyable = $value;
}
/**
* Sets the additional_amount_with_tax value
*
* @param string $value
* @param int $value
*/
public function setAdditionalAmountWithTax($value) {
$this->additional_amount_with_tax = $value;
public function setQtyBuyable($value) {
$this->qty_buyable = $value;
}
/**
* Sets the value_number value
*
* @param string $value
* @param int $value
*/
public function setValueNumber($value) {
$this->value_number = $value;
public function setStockQuantity($value)
{
$this->stock_quantity = $value;
}
/**
* Sets the option_number value
*
* @param string $value
* @param float $value
*/
public function setOptionNumber($value) {
$this->option_number = $value;
public function setUnitAmount($value) {
$this->unit_amount = $value;
}
/**********
* Getter *
**********/
/**
* Returns the name value
*
* @return String
* @param float $value
*/
public function getName() {
return $this->name;
public function setUnitAmountWithTax($value) {
$this->unit_amount_with_tax = $value;
}
/**
* Returns the value value
*
* @return String
* @param int $value
*/
public function getValue() {
return $this->value;
public function setError($value) {
$this->error = $value;
}
/**
* Returns the additional_amount_with_tax value
*
* @return int
* @param string $value
*/
public function getAdditionalAmountWithTax() {
return $this->additional_amount_with_tax;
public function setErrorText($value) {
$this->error_text = $value;
}
/**
* Returns the value_number value
*
* @return String
* @param ShopgateOrderItemOption []|mixed[][] $value
*/
public function getValueNumber() {
return $this->value_number;
public function setOptions($value) {
if (empty($value) || !is_array($value)) {
$this->options = array();
return;
}
$options = array();
foreach ($value as $index => $element) {
if (!($element instanceof ShopgateOrderItemOption) && !is_array($element)) {
continue;
}
if (is_array($element)) {
$options[] = new ShopgateOrderItemOption($element);
} else {
$options[] = $element;
}
}
$this->options = $options;
}
/**
* Returns the option_number value
*
* @return String
* @param ShopgateOrderItemInput []|mixed[][] $value
*/
public function getOptionNumber() {
return $this->option_number;
public function setInputs($value) {
if (empty($value) || !is_array($value)) {
$this->inputs = array();
return;
}
$inputs = array();
foreach ($value as $index => $element) {
if (!($element instanceof ShopgateOrderItemInput) && !is_array($element)) {
continue;
}
public function accept(ShopgateContainerVisitor $v) {
$v->visitOrderItemOption($this);
if (is_array($element)) {
$inputs[] = new ShopgateOrderItemInput($element);
} else {
$inputs[] = $element;
}
}
class ShopgateOrderItemInput extends ShopgateContainer {
protected $input_number;
protected $type;
protected $additional_amount_with_tax;
protected $label;
protected $user_input;
protected $info_text;
$this->inputs = $inputs;
}
/**********
* Setter *
**********/
/**
* @param ShopgateOrderItemAttribute []|mixed[][] $value
*/
public function setAttributes($value) {
if (empty($value) || !is_array($value)) {
$this->attributes = array();
public function setInputNumber($value) {
$this->input_number = $value;
return;
}
public function setType($value) {
$this->type = $value;
// convert sub-arrays into ShopgateOrderItemInputs objects if necessary
foreach ($value as $index => &$element) {
if ((!is_object($element) || !($element instanceof ShopgateOrderItemAttribute)) && !is_array($element)) {
unset($value[$index]);
continue;
}
public function setAdditionalAmountWithTax($value) {
$this->additional_amount_with_tax = $value;
if (is_array(($element))) {
$element = new ShopgateOrderItemAttribute($element);
}
}
public function setLabel($value) {
$this->label = $value;
$this->attributes = $value;
}
public function setUserInput($value) {
$this->user_input = $value;
##########
# Getter #
##########
/**
* @return string
*/
public function getItemNumber() {
return $this->item_number;
}
public function setInfoText($value) {
$this->info_text = $value;
/**
* @return bool
*/
public function getIsBuyable() {
return $this->is_buyable;
}
/**********
* Getter *
**********/
/**
* @return int
*/
public function getQtyBuyable() {
return $this->qty_buyable;
}
public function getInputNumber() {
return $this->input_number;
/**
* @return int
*/
public function getStockQuantity()
{
return $this->stock_quantity;
}
public function getType() {
return $this->type;
/**
* @return float
*/
public function getUnitAmount() {
return $this->unit_amount;
}
public function getAdditionalAmountWithTax() {
return $this->additional_amount_with_tax;
/**
* @return float
*/
public function getUnitAmountWithTax() {
return $this->unit_amount_with_tax;
}
public function getLabel() {
return $this->label;
/**
* @return int
*/
public function getError() {
return $this->error;
}
public function getUserInput() {
return $this->user_input;
/**
* @return int
*/
public function getErrorText() {
return $this->error_text;
}
public function getInfoText() {
return $this->info_text;
/**
* @return ShopgateOrderItemOption[]
*/
public function getOptions() {
return $this->options;
}
/**
* @return ShopgateOrderItemInput[]
*/
public function getInputs() {
return $this->inputs;
}
/**
* @return ShopgateOrderItemAttribute[]
*/
public function getAttributes() {
return $this->attributes;
}
/**
* @param ShopgateContainerVisitor $v
*/
public function accept(ShopgateContainerVisitor $v) {
$v->visitOrderItemInput($this);
$v->visitCartItem($this);
}
}
class ShopgateDeliveryNote extends ShopgateContainer {
const DHL = "DHL"; // DHL
const DHLEXPRESS = "DHLEXPRESS"; // DHLEXPRESS
const DP = "DP"; // Deutsche Post
const DPD = "DPD"; // Deutscher Paket Dienst
const FEDEX = "FEDEX"; // FedEx
const GLS = "GLS"; // GLS
const HLG = "HLG"; // Hermes
const OTHER = "OTHER"; // Anderer Lieferant
const TNT = "TNT"; // TNT
const TOF = "TOF"; // Trnas-o-Flex
const UPS = "UPS"; // UPS
protected $shipping_service_id = ShopgateDeliveryNote::DHL;
protected $tracking_number = "";
protected $shipping_time = null;
class ShopgateCartCustomer extends ShopgateContainer {
protected $customer_tax_class_key;
protected $customer_groups;
/**********
* Setter *
**********/
##########
# Setter #
##########
/**
* Sets the shipping_service_id value
*
* @param string $value
*/
public function setShippingServiceId($value) {
$this->shipping_service_id = $value;
public function setCustomerTaxClassKey($value) {
$this->customer_tax_class_key = $value;
}
/**
* Sets the tracking_number value
*
* @param string $value
* @param ShopgateCartCustomerGroup[] $value
*/
public function setTrackingNumber($value) {
$this->tracking_number = $value;
public function setCustomerGroups($value) {
$this->customer_groups = $value;
}
##########
# Getter #
##########
/**
* Sets the tracking_number value
*
* @param string $value
* @return string $value
*/
public function setShippingTime($value) {
$this->shipping_time = $value;
public function getCustomerTaxClassKey() {
return $this->customer_tax_class_key;
}
/**********
* Getter *
**********/
/**
* @return ShopgateCartCustomerGroup[]
*/
public function getCustomerGroups() {
return $this->customer_groups;
}
/**
* Returns the shipping_service_id value
*
* @return string
* @param ShopgateContainerVisitor $v
*/
public function getShippingServiceId() {
return $this->shipping_service_id;
public function accept(ShopgateContainerVisitor $v) {
$v->visitCartCustomer($this);
}
}
class ShopgateCartCustomerGroup extends ShopgateContainer {
protected $id;
##########
# Setter #
##########
/**
* Returns the tracking_number value
*
* @return string
* @param string $value
*/
public function getTrackingNumber() {
return $this->tracking_number;
public function setId($value) {
$this->id = $value;
}
##########
# Getter #
##########
/**
* Returns the tracking_number value
*
* @return string
*/
public function getShippingTime() {
return $this->shipping_time;
public function getId() {
return $this->id;
}
/**
* @param ShopgateContainerVisitor $v
*/
public function accept(ShopgateContainerVisitor $v) {
$v->visitOrderDeliveryNote($this);
$v->visitPlainObject($this);
}
}
includes/external/shopgate/shopgate_library/classes/redirect.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
class ShopgateMobileRedirect extends ShopgateObject implements ShopgateMobileRedirectInterface {
/**
* @var string alias name of shop at Shopgate, e.g. 'yourshop' to redirect to 'https://yourshop.shopgate.com'
* @var string alias name of shop at Shopgate, e.g. 'yourshop' to redirect to 'http://yourshop.shopgate.com'
*/
protected $alias = '';
/**
ca. Zeile 56
*/
protected $jsHeaderTemplatePath;
/**
* @var string path to the shopgate link tag template
*/
protected $linkTagTemplatePath;
/**
* @var string expiration date of the cookie as defined in http://www.ietf.org/rfc/rfc2109.txt
*/
protected $cookieLife;
ca. Zeile 92
*/
protected $redirectType;
/**
* @var bool true if redirecting unknown pages should be enabled
*/
protected $enableDefaultRedirect;
/**
* @var string itemNumber used for creating a mobile product url
*/
protected $itemNumber;
ca. Zeile 121
* @var string searchQuery used for creating a mobile search url / mobile head js
*/
protected $searchQuery;
/**
* @var boolean determines if for a specific case the mobile redirect should be suppressed
*/
protected $suppressRedirect;
/**
* Instantiates the Shopgate mobile redirector.
*
* @param string $shopgateConfig An instance of the ShopgateConfig
* @param ShopgateConfig $shopgateConfig An instance of the ShopgateConfig
* @param ShopgateMerchantApiInterface $merchantApi An instance of the ShopgateMerchantApi required for keyword updates or null.
*/
public function __construct(ShopgateConfig $shopgateConfig, ShopgateMerchantApiInterface $merchantApi = null) {
$this->merchantApi = $merchantApi;
ca. Zeile 136
$this->setAlias($shopgateConfig->getAlias());
$this->setCustomMobileUrl($shopgateConfig->getCname());
if($this->config->getEnableRedirectKeywordUpdate()){
$this->enableKeywordUpdate($this->config->getEnableRedirectKeywordUpdate());
$this->enableKeywordUpdate();
} else {
$this->disableKeywordUpdate();
}
$this->enableDefaultRedirect = $this->config->getEnableDefaultRedirect();
$this->suppressRedirect = false;
$this->redirectKeywordCacheTime = ShopgateMobileRedirectInterface::DEFAULT_CACHE_TIME;
$this->buttonParent = 'body';
$this->buttonPrepend = true;
ca. Zeile 150
// mobile header options
$this->mobileHeaderTemplatePath = dirname(__FILE__).'/../assets/mobile_header.html';
$this->jsHeaderTemplatePath = dirname(__FILE__).'/../assets/js_header.html';
$this->linkTagTemplatePath = dirname(__FILE__).'/../assets/link_tag.html';
$this->cookieLife = gmdate('D, d-M-Y H:i:s T', time());
$this->buttonDescription = 'Mobile Webseite aktivieren';
}
ca. Zeile 179
$this->buttonParent = $identifier;
$this->buttonPrepend = $prepend;
}
public function suppressRedirect() {
$this->suppressRedirect = true;
}
public function enableKeywordUpdate($cacheTime = ShopgateMobileRedirectInterface::DEFAULT_CACHE_TIME) {
$this->updateRedirectKeywords = true;
$this->redirectKeywordCacheTime = ($cacheTime >= ShopgateMobileRedirectInterface::MIN_CACHE_TIME) ? $cacheTime : ShopgateMobileRedirectInterface::MIN_CACHE_TIME;
// try loading keywords
ca. Zeile 202
public function removeRedirectKeyword($keyword){
if(is_array($keyword)){
foreach($keyword as $word){
foreach($this->redirectKeywords as $key => $mobileKeyword){
if(mb_strtolower($word) == mb_strtolower($mobileKeyword)){
if(strtolower($word) == strtolower($mobileKeyword)){
unset($this->redirectKeywords[$key]);
}
}
}
} else {
foreach($this->redirectKeywords as $key => $mobileKeyword){
if(mb_strtolower($keyword) == mb_strtolower($mobileKeyword)){
if(strtolower($keyword) == strtolower($mobileKeyword)){
unset($this->redirectKeywords[$key]);
}
}
}
ca. Zeile 250
setcookie(ShopgateMobileRedirectInterface::COOKIE_NAME, 1, time() + 604800, '/'); // expires after 7 days
return false;
}
// if the plugin wants to suppress the redirect
if($this->suppressRedirect) {
return false;
}
return empty($_COOKIE[ShopgateMobileRedirectInterface::COOKIE_NAME]) ? true : false;
}
/**
* @param string $url
* @param bool $autoRedirect
* @return string|void
* @post ends script execution in case of http redirect
*/
public function redirect($url, $autoRedirect = true) {
if (!$this->config->getShopNumber()) {
return '';
}
if(!$this->isRedirectAllowed() || !$this->isMobileRequest() || !$autoRedirect){
return $this->getJsHeader();
$url .= $this->processQueryString($url);
if(!$this->isRedirectAllowed() || !$this->isMobileRequest() || !$autoRedirect || (($this->redirectType == 'default') && !$this->enableDefaultRedirect)) {
return $this->getJsHeader($url);
}
// validate url
if (!preg_match('#^(http|https)\://#', $url)) {
ca. Zeile 277
if(!$this->isMobileRequest() || !$this->isRedirectAllowed()){
return '';
}
if (!file_exists($this->mobileHeaderTemplatePath)) {
return '';
}
$html = @file_get_contents($this->mobileHeaderTemplatePath);
if (empty($html)) {
return '';
}
$html = $this->loadTemplate($this->mobileHeaderTemplatePath);
// set parameters
$this->buttonOnImageSource = (($this->useSecureConnection) ? ShopgateMobileRedirectInterface::SHOPGATE_STATIC_SSL : ShopgateMobileRedirectInterface::SHOPGATE_STATIC).'/api/mobile_header/button_on.png';
$this->buttonOffImageSource = (($this->useSecureConnection) ? ShopgateMobileRedirectInterface::SHOPGATE_STATIC_SSL : ShopgateMobileRedirectInterface::SHOPGATE_STATIC).'/api/mobile_header/button_off.png';
ca. Zeile 299
return $html;
}
protected function getJsHeader() {
if (!file_exists($this->jsHeaderTemplatePath)) {
protected function getJsHeader($mobileRedirectUrl = null) {
$html = $this->loadTemplate($this->jsHeaderTemplatePath);
if (empty($html)) {
return '';
}
$html = @file_get_contents($this->jsHeaderTemplatePath);
if (empty($html)) {
$linkTag = '';
if ($this->config->getShopIsActive() && !$this->suppressRedirect) {
$linkTag = $this->loadTemplate($this->linkTagTemplatePath);
}
if (!$this->config->getShopNumber()) {
return '';
}
$mobileRedirectUrl = '';
if (empty($mobileRedirectUrl)) {
$mobileRedirectUrl = $this->getShopUrl();
}
$additionalParameters = '';
$redirectCode = '';
switch($this->redirectType){
case 'item':
if(!isset($this->itemNumber) || $this->itemNumber == ''){
$this->redirectType = 'start';
$redirectCode = 'default';
break;
}
$redirectCode = 'item';
$additionalParameters .= '_shopgate.item_number = "'.$this->itemNumber.'";';
$mobileRedirectUrl = $this->getItemUrl($this->itemNumber);
break;
case 'itempublic':
if(!isset($this->itemNumberPublic) || $this->itemNumberPublic == ''){
$this->redirectType = 'start';
$redirectCode = 'default';
break;
}
$redirectCode = 'item';
$additionalParameters .= '_shopgate.item_number_public = "'.$this->itemNumberPublic.'";';
$mobileRedirectUrl = $this->getItemPublicUrl($this->itemNumberPublic);
break;
case 'category':
if(!isset($this->categoryNumber) || $this->categoryNumber == ''){
$this->redirectType = 'start';
$redirectCode = 'default';
break;
}
$redirectCode = 'category';
$additionalParameters .= '_shopgate.category_number = "'.$this->categoryNumber.'";';
$mobileRedirectUrl = $this->getCategoryUrl($this->categoryNumber);
break;
case 'cms':
if(!isset($this->cmsPage) || $this->cmsPage == ''){
$this->redirectType = 'start';
$redirectCode = 'default';
break;
}
$redirectCode = 'cms';
$additionalParameters .= '_shopgate.cms_page = "'.$this->cmsPage .'";';
$mobileRedirectUrl = $this->getCmsUrl($this->cmsPage);
break;
case 'brand':
if(!isset($this->manufacturerName) || $this->manufacturerName == ''){
$this->redirectType = 'start';
$redirectCode = 'default';
break;
}
$redirectCode = 'brand';
$additionalParameters .= '_shopgate.brand_name = "'.$this->manufacturerName.'";';
$mobileRedirectUrl = $this->getBrandUrl($this->manufacturerName);
break;
case 'search':
if(!isset($this->searchQuery) || $this->searchQuery == ''){
$this->redirectType = 'start';
$redirectCode = 'default';
break;
}
$redirectCode = 'search';
$additionalParameters .= '_shopgate.search_query = "'.$this->searchQuery.'";';
$mobileRedirectUrl = $this->getSearchUrl($this->searchQuery);
break;
default: case 'start':
$this->redirectType = 'start';
case 'start':
$redirectCode = 'start';
break;
default:
$redirectCode = 'default';
}
if($this->redirectType == 'start'){
$mobileRedirectUrl = $this->getShopUrl();
$redirectCode = 'start';
if($redirectCode == 'default') {
$additionalParameters .= '_shopgate.is_default_redirect_disabled = '.((!$this->enableDefaultRedirect) ? 'true' : 'false').';';
$linkTag = '';
}
if($this->suppressRedirect) {
$additionalParameters .= "\n " . '_shopgate.redirect_to_webapp = false;';
}
switch($this->config->getServer()){
default: // fall through to 'live'
case 'live':
$sslUrl = ShopgateMobileRedirectInterface::SHOPGATE_STATIC_SSL;
$nonSslUrl = ShopgateMobileRedirectInterface::SHOPGATE_STATIC;
break;
case 'sl':
$sslUrl = ShopgateMobileRedirectInterface::SHOPGATE_SL_STATIC_SSL;
$nonSslUrl = ShopgateMobileRedirectInterface::SHOPGATE_SL_STATIC;
break;
case 'pg':
$sslUrl = 'https://static-ssl.shopgatepg.com';
$nonSslUrl = 'http://static.shopgatepg.com';
$sslUrl = ShopgateMobileRedirectInterface::SHOPGATE_PG_STATIC_SSL;
$nonSslUrl = ShopgateMobileRedirectInterface::SHOPGATE_PG_STATIC;
break;
case 'custom':
$sslUrl = 'https://shopgatedev-public.s3.amazonaws.com';
$nonSslUrl = 'http://shopgatedev-public.s3.amazonaws.com';
break;
case 'live': default:
$sslUrl = 'https://static-ssl.shopgate.com';
$nonSslUrl = 'http://static.shopgate.com';
break;
}
// set parameters
$html = str_replace('{$link_tag}', $linkTag, $html);
$html = str_replace('{$mobile_url}', $mobileRedirectUrl, $html);
$html = str_replace('{$shop_number}', $this->config->getShopNumber(), $html);
$html = str_replace('{$redirect_code}', $redirectCode, $html);
$html = str_replace('{$additional_parameters}', $additionalParameters, $html);
ca. Zeile 407
###############
### helpers ###
###############
protected function loadTemplate($filePath) {
if (!file_exists($filePath)) {
return '';
}
$html = @file_get_contents($filePath);
if (empty($html)) {
return '';
}
return $html;
}
/**
* Generates the root mobile Url for the redirect
*/
protected function getMobileUrl(){
ca. Zeile 430
protected function getShopgateUrl() {
switch ($this->config->getServer()) {
default: // fall through to "live"
case 'live': return ShopgateMobileRedirectInterface::SHOPGATE_LIVE_ALIAS;
case 'sl': return ShopgateMobileRedirectInterface::SHOPGATE_SL_ALIAS;
case 'pg': return ShopgateMobileRedirectInterface::SHOPGATE_PG_ALIAS;
case 'custom': return '.localdev.cc/php/shopgate/index.php'; // for Shopgate development & testing
}
}
ca. Zeile 491
* Saves redirect keywords to file.
*
* @param string[] $keywords The list of keywords to write to the file.
* @param string $file The path to the file.
* @param null $timestamp
*/
protected function saveKeywordsToFile($keywords, $file, $timestamp = null) {
if(is_null($timestamp)){
$timestamp = time();
}
ca. Zeile 534
'keywords' => $keywordsFromFile,
);
}
/**
* Sets additional http headers like Vary
*
* @return void
*/
protected function setAdditionalHttpHeaders() {
header('Vary: User-Agent');
}
/**
* Passes allowed get params to the url as querystring
*
* @param string $url
* @return string $url
*/
protected function processQueryString($url) {
$queryDataKeys = array_intersect($this->config->getRedirectableGetParams(), array_keys($_GET));
$queryData = array_intersect_key($_GET, array_flip($queryDataKeys));
$connector = preg_match('/\?/', $url) ? "&" : "?";
return count($queryData) ? $connector .http_build_query($queryData) : "";
}
#############################
### mobile url generation ###
#############################
public function buildScriptDefault($autoRedirect = true) {
$this->redirectType = 'default';
return $this->redirect($this->getShopUrl(), $autoRedirect);
}
public function buildScriptShop($autoRedirect = true){
$this->redirectType = 'start';
$this->setAdditionalHttpHeaders();
return $this->redirect($this->getShopUrl(), $autoRedirect);
}
public function buildScriptItem($itemNumber, $autoRedirect = true){
$this->itemNumber = $itemNumber;
$this->redirectType = 'item';
$this->setAdditionalHttpHeaders();
return $this->redirect($this->getItemUrl($itemNumber), $autoRedirect);
}
public function buildScriptItemPublic($itemNumberPublic, $autoRedirect = true){
$this->itemNumberPublic = $itemNumberPublic;
$this->redirectType = 'itempublic';
$this->setAdditionalHttpHeaders();
return $this->redirect($this->getItemPublicUrl($itemNumberPublic), $autoRedirect);
}
public function buildScriptCategory($categoryNumber, $autoRedirect = true){
$this->categoryNumber = $categoryNumber;
$this->redirectType = 'category';
return $this->redirect($this->getCategoryUrl($categoryNumber), $autoRedirect);
}
public function buildScriptShop($autoRedirect = true){
$this->redirectType = 'start';
return $this->redirect($this->getShopUrl(), $autoRedirect);
$this->setAdditionalHttpHeaders();
return $this->redirect($this->getCategoryUrl($categoryNumber), $autoRedirect);
}
public function buildScriptCms($cmsPage, $autoRedirect = true){
$this->cmsPage = $cmsPage;
$this->redirectType = 'cms';
$this->setAdditionalHttpHeaders();
return $this->redirect($this->getCmsUrl($cmsPage), $autoRedirect);
}
public function buildScriptBrand($manufacturerName, $autoRedirect = true){
$this->manufacturerName = $manufacturerName;
$this->redirectType = 'brand';
$this->setAdditionalHttpHeaders();
return $this->redirect($this->getBrandUrl($manufacturerName), $autoRedirect);
}
public function buildScriptSearch($searchQuery, $autoRedirect = true){
$this->searchQuery = $searchQuery;
$this->searchQuery = addslashes($searchQuery);
$this->redirectType = 'search';
$this->setAdditionalHttpHeaders();
return $this->redirect($this->getSearchUrl($searchQuery), $autoRedirect);
}
public function getShopUrl(){
ca. Zeile 625
interface ShopgateMobileRedirectInterface {
const SHOPGATE_STATIC = 'http://static.shopgate.com';
const SHOPGATE_STATIC_SSL = 'https://static-ssl.shopgate.com';
const SHOPGATE_PG_STATIC = 'http://static.shopgatepg.com';
const SHOPGATE_PG_STATIC_SSL = 'https://static-ssl.shopgatepg.com';
const SHOPGATE_SL_STATIC = 'http://static.shopgatesl.com';
const SHOPGATE_SL_STATIC_SSL = 'https://static-ssl.shopgatesl.com';
/**
* @var string the URL that is appended to the end of a shop alias (aka subdomain) if the shop is live
*/
const SHOPGATE_LIVE_ALIAS = '.shopgate.com';
/**
* @var string the URL that is appended to the end of a shop alias (aka subdomain) if the shop is on spotlight
*/
const SHOPGATE_SL_ALIAS = '.shopgatesl.com';
/**
* @var string the URL that is appended to the end of a shop alias (aka subdomain) if the shop is on playground
*/
const SHOPGATE_PG_ALIAS = '.shopgatepg.com';
ca. Zeile 653
/**
* Sets the description to be displayed to the left of the button.
*
* @deprecated
* @param string $description
*/
public function setButtonDescription($description);
/**
* Sets the alias of the Shopgate shop
*
* @deprecated
* @param string $alias
*/
public function setAlias($alias);
/**
* Sets the cname of the shop
*
* @deprecated
* @param string $cname
*/
public function setCustomMobileUrl($cname);
/**
* Sets the parent element the Mobile Header should be attached to.
*
* @deprecated
* @param string $identifier CSS style identifier for the parent element.
* @param bool $prepend True to add the Mobile Header as first child of the parent element, false to append it.
*/
public function setParentElement($identifier, $prepend = false);
/**
* Enables updating of the keywords that identify mobile devices from Shopgate Merchant API.
*
* @deprecated
* @param int $cacheTime Time the keywords are cached in hours. Will be set to at least ShopgateMobileRedirectInterface::MIN_CACHE_TIME.
*/
public function enableKeywordUpdate($cacheTime = ShopgateMobileRedirectInterface::DEFAULT_CACHE_TIME);
/**
* Disables updating of the keywords that identify mobile devices from Shopgate Merchant API.
*
* @deprecated
*/
public function disableKeywordUpdate();
/**
* Appends a new keyword to the redirect keywords list.
*
* @deprecated
* @param string $keyword The redirect keyword to append.
*/
public function addRedirectKeyword($keyword);
/**
* Removes a keyword or an array of redirect keywords from the keywords list.
*
* @deprecated
* @param string|string[] $keyword The redirect keyword or keywords to remove.
*/
public function removeRedirectKeyword($keyword);
/**
* Replaces the current list of redirect keywords with a given list.
*
* @deprecated
* @param string[] $redirectKeywords The new list of redirect keywords.
*/
public function setRedirectKeywords(array $redirectKeywords);
/**
* Replaces the current list of skiüp redirect keywords with a given list.
*
* @deprecated
* @param string[] $skipRedirectKeywords The new list of skip redirect keywords.
*/
public function setSkipRedirectKeywords(array $skipRedirectKeywords);
ca. Zeile 722
* Switches to secure connection instead of checking server-side.
*
* This will cause slower download of nonsensitive material (the mobile header button images) from Shopgate.
* Activate only if the secure connection is determined incorrectly (e.g. because of third-party components).
*
* @deprecated
*/
public function setAlwaysUseSSL();
/**
* Detects by redirect keywords (and skip redirect keywords) if a request was sent by a mobile device.
*
* @deprecated
* @return bool true if a mobile device could be detected, false otherwise.
*/
public function isMobileRequest();
/**
* Detects whether the customer wants to be redirected.
*
* @deprecated
* @return bool true if the customer wants to be redirected, false otherwise.
*/
public function isRedirectAllowed();
ca. Zeile 745
*
* If the $url parameter is no valid URL the method will simply return false and do nothing else.
* Otherwise it will output the necessary redirection headers and stop script execution.
*
* @deprecated
* @param string $url the URL to redirect to
* @param bool $setCookie true to set the redirection cookie and activate redirection
* @return false if the passed $url parameter is no valid URL
*/
public function redirect($url);
/**
* @deprecated
* Returns the javascript and HTML for the mobile redirect button
*
* @deprecated
* @return string
*/
public function getMobileHeader();
ca. Zeile 831
public function buildScriptSearch($searchString, $autoRedirect = true);
/**
* Create a mobile-shop-url to the startmenu
*
* @deprecated
*/
public function getShopUrl();
/**
* Create a mobile-product-url to a item
*
* @deprecated
* @param string $itemNumber
*/
public function getItemUrl($itemNumber);
/**
* Create a mobile-product-url to a item with item_number_public
*
* @deprecated
* @param string $itemNumberPublic
*/
public function getItemPublicUrl($itemNumberPublic);
/**
* Create a mobile-category-url to a category
*
* @deprecated
* @param string $categoryNumber
*/
public function getCategoryUrl($categoryNumber);
/**
* Create a mobile-cms-url to a cms-page
*
* @deprecated
* @param string $cmsPage
*/
public function getCmsUrl($cmsPage);
/**
* Create a mobile-brand-url to a page with results for a specific manufacturer
*
* @deprecated
* @param string $manufacturerName
*/
public function getBrandUrl($manufacturerName);
/**
* Create a mobile-search-url to a page with search results
*
* @deprecated
* @param string $searchQuery
*/
public function getSearchUrl($searchQuery);
}
includes/external/shopgate/shopgate_library/shopgate.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
if (!defined('DS')) define('DS', '/');
if( file_exists(dirname(__FILE__).DS.'dev.php') )
require_once(dirname(__FILE__).DS.'dev.php');
ca. Zeile 9
require_once(dirname(__FILE__).DS.'classes'.DS.'apis.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'configuration.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'customers.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'orders.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'external_orders.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'items.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'redirect.php');
/**
* global
*/
require_once(dirname(__FILE__).DS.'classes'.DS.'models/Abstract.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/AbstractExport.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/XmlEmptyObject.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/XmlResultObject.php');
/**
* catalog
*/
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Review.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Product.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Price.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/TierPrice.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Category.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/CategoryPath.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Shipping.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Manufacturer.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Visibility.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Property.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Stock.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Identifier.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Tag.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Relation.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Attribute.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Input.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Validation.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Option.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/AttributeGroup.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'models/catalog/Attribute.php');
/**
* helper
*/
require_once(dirname(__FILE__).DS.'classes'.DS.'helper/DataStructure.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'helper/Pricing.php');
require_once(dirname(__FILE__).DS.'classes'.DS.'helper/String.php');
/**
* media
*/
require_once(dirname(__FILE__).DS.'classes'.DS.'models/media/Image.php');
// Shopgate-Vendors
require_once(dirname(__FILE__).DS.'vendors'.DS.'2d_is.php');
require_once(dirname(__FILE__).DS.'vendors'.DS.'mobile_redirect.class.php');
// External-Vendors
include_once(dirname(__FILE__).DS.'vendors'.DS.'JSON.php');
includes/external/shopgate/shopgate_library/vendors/mobile_redirect.class.phpTop ca. Zeile 1
<?php
/*
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
include_once dirname(__FILE__).'/../shopgate.php';
/**
includes/header.phpTop ca. Zeile 84
Please visit our website: www.modified-shop.org
=========================================================
-->
<meta name="generator" content="(c) by <?php echo PROJECT_VERSION; ?> ------|| http://www.modified-shop.org" />
<meta name="generator" content="(c) by <?php echo PROJECT_VERSION; ?> ------||| http://www.modified-shop.org" />
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />
<?php
if (file_exists('templates/'.CURRENT_TEMPLATE.'/css/general.css.php')) {
require('templates/'.CURRENT_TEMPLATE.'/css/general.css.php');
ca. Zeile 365
$smarty->display(CURRENT_TEMPLATE.'/offline.html');
EXIT;
}
//BOF - Dokuman - 2012-06-19 - BILLSAFE payment module (BillSAFE-Layer Start)
if (defined('MODULE_PAYMENT_BILLSAFE_2_LAYER')) {
if (preg_match('/checkout_payment/',$_SERVER['PHP_SELF']) && MODULE_PAYMENT_BILLSAFE_2_LAYER == 'True') {
// BillSAFE-Layer Start
if (defined('MODULE_PAYMENT_BILLSAFE_2_LAYER') && MODULE_PAYMENT_BILLSAFE_2_LAYER == 'True') {
$bs_error = '';
if (basename($PHP_SELF) == 'checkout_payment.php') {
if (isset($_GET['payment_error'])) {
$bs_error = stripslashes(html_entity_decode('payment_error='.$_GET['payment_error'].'&error_message='.$_GET['error_message']));
} else {
$bs_error = '';
}
echo '<script type="text/javascript"><!--
if (top.lpg) top.lpg.close("'.str_replace('&', '&', xtc_href_link(FILENAME_CHECKOUT_PAYMENT, $bs_error, 'SSL')).'");
--></script>';
echo '<script type="text/javascript"><!--' .
' if (top.lpg) top.lpg.close("'.str_replace('&', '&', xtc_href_link(FILENAME_CHECKOUT_PAYMENT, $bs_error, 'SSL')).'");' .
'--></script>' . PHP_EOL;
}
if (preg_match('/checkout_success/',$_SERVER['PHP_SELF']) && MODULE_PAYMENT_BILLSAFE_2_LAYER == 'True') {
echo '<script type="text/javascript"><!--
if (top.lpg) top.lpg.close("'.xtc_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL').'");
--></script>';
if (basename($PHP_SELF) == 'checkout_success.php') {
echo '<script type="text/javascript"><!--' .
' if (top.lpg) top.lpg.close("'.xtc_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL').'");' .
'--></script>' . PHP_EOL;
}
}
//EOF - Dokuman - 2012-06-19 - BILLSAFE payment module - BillSAFE-Layer End
// BillSAFE-Layer End
?>
includes/modules/checkout_address_store.phpTop ca. Zeile 132
}
if (ACCOUNT_STATE == 'true') {
if ($zone_id > 0) {
$sql_data_array['entry_zone_id'] = $zone_id;
$sql_data_array['entry_state'] = '';
$sql_data_array['entry_state'] = $state;
} else {
$sql_data_array['entry_zone_id'] = '0';
$sql_data_array['entry_state'] = $state;
}
includes/modules/metatags.phpTop ca. Zeile 60
$metaGoWords = ('tracht,dirndl,kleid,mode,modern,bluse,trachten,hose,leder,schmuck,t-shirt,t-shirts,schuh,schuhe'); // Hier rein, was nicht gefiltert werden soll
$metaMaxKeywords = 15; // Maximall Anzahl der Keywords
// ---------------------------------------------------------------------------------------
$addPagination = true; // Seiten-Nummern anzeigen, ja/nein?
// ---------------------------------------------------------------------------------------
ca. Zeile 200
// ---------------------------------------------------------------------------------------
function prepareWordArray($Text) {
//$Text = str_replace(array(' ','\t','\r','\n','\b'),' ',strip_tags($Text));
$Text = htmlentities(metaNoEntities(strtolower($Text)), ENT_QUOTES, strtoupper($_SESSION['language_charset']));
$Text = htmlentities(metaNoEntities($Text), ENT_QUOTES, $_SESSION['language_charset']);
$Text = preg_replace("/\s\-|\-\s/",' ',$Text); // <-- Gegen Trenn- und Gedankenstriche
$Text = preg_replace("/(&[^aoucizens][^;]*;)/",' ',$Text);
//$Text = preg_replace("/(&[^aoucizens][^;]*;)/",' ',$Text);
$Text = strtolower($Text);
$Text = preg_replace("/[^0-9a-z|\-|&|;]/",' ',$Text); // <-- Bindestriche drin lassen
$Text = str_replace('& ', '&', $Text);
$Text = trim(preg_replace("/\s\s+/",' ',$Text));
return $Text;
}
function makeWordArray($Text) {
ca. Zeile 336
}
//-- Canonical-URL
//-- http://www.linkvendor.com/blog/der-canonical-tag-%E2%80%93-was-kann-man-damit-machen.html
$canonical_url = xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id='.$product->data['products_id'],$request_type,false);
$canonical_url = xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id='.$product->data['products_id'],'NONSSL',false);
}
break;
// ---------------------------------------------------------------------------------------
// Daten holen: Kategorie
ca. Zeile 417
//-- Canonical-URL
//-- http://www.linkvendor.com/blog/der-canonical-tag-%E2%80%93-was-kann-man-damit-machen.html
if (xtc_not_null($cPath)) {
$canonical_url = xtc_href_link(FILENAME_DEFAULT, 'cPath='.$cPath.$page_param,$request_type,false);
$canonical_url = xtc_href_link(FILENAME_DEFAULT, 'cPath='.$cPath,'NONSSL',false);
} elseif (xtc_not_null($manu_id)) {
$canonical_url = xtc_href_link(FILENAME_DEFAULT, 'manufacturers_id='.$manu_id.$page_param,$request_type,false);
$canonical_url = xtc_href_link(FILENAME_DEFAULT, 'manufacturers_id='.$manu_id,'NONSSL',false);
} elseif ($startpage) {
$canonical_url = xtc_href_link(FILENAME_DEFAULT, '', $request_type,false);
$canonical_url = xtc_href_link(FILENAME_DEFAULT, '', 'NONSSL',false);
}
break;
// ---------------------------------------------------------------------------------------
// Daten holen: Inhalts-Seite (ContentManager)
ca. Zeile 484
//-- Canonical-URL
//-- http://www.linkvendor.com/blog/der-canonical-tag-%E2%80%93-was-kann-man-damit-machen.html
if(isset($_GET['coID'])){
$canonical_url = xtc_href_link(FILENAME_CONTENT, 'coID='.$_GET['coID'],$request_type,false);
$canonical_url = xtc_href_link(FILENAME_CONTENT, 'coID='.$_GET['coID'],'NONSSL',false);
}
break;
// ---------------------------------------------------------------------------------------
ca. Zeile 528
// ---------------------------------------------------------------------------------------
case FILENAME_SPECIALS :
$meta_title = metaTitle($breadcrumbTitle,$Page,($addSpecialsShopTitle)?ML_TITLE:'');
$canonical_url = xtc_href_link(FILENAME_SPECIALS, ltrim($page_param,'&'),$request_type,false);
$canonical_url = xtc_href_link(FILENAME_SPECIALS, '','NONSSL',false);
break;
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
case FILENAME_PRODUCTS_NEW :
$meta_title = metaTitle($breadcrumbTitle,$Page,($addNewsShopTitle)?ML_TITLE:'');
$canonical_url = xtc_href_link(FILENAME_PRODUCTS_NEW, ltrim($page_param,'&'),$request_type,false);
$canonical_url = xtc_href_link(FILENAME_PRODUCTS_NEW, '','NONSSL',false);
break;
// ---------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------
includes/modules/order_total/ot_coupon.phpTop ca. Zeile 273
} else {
if ($get_result['coupon_type'] != 'P') {
$od_amount = $c_deduct;
} else {
$od_amount = $amount * $xtPrice->xtcCalculateCurr($get_result['coupon_amount']) / 100; //FIX - web28 - 2012-04-24 - calculate currencies
$od_amount = $amount * $get_result['coupon_amount'] / 100; //Calculation of percentage
}
}
//echo 'OD'.$od_amount;
includes/modules/order_total/ot_payment.phpTop ca. Zeile 10
based on:
- Andreas Zimmermann / IT eSolutions http://www.it-esolutions.de
Copyright (c) 2004 IT eSolutions
- v. 1.9 (c) by rpa-com.de
FIX: falsche Steuerberechnung
- v. 1.8 (c) by rpa-com.de
FIX: falsche Anzeige von Rabatt/Zuschlag in checkout_payment.php
- v. 1.7 (c) by rpa-com.de
Add: Anzeige bei der Zahlungsauswahl JA/NEIN
Anzeigeart bei Zahlungsauswahl STANDARD/PREIS
- v. 1.6 (c) by rpa-com.de
ca. Zeile 23
-----------------------------------------------------------
Released under the GNU General Public License
-----------------------------------------------------------*/
class ot_payment
{
class ot_payment {
var $title, $output;
function ot_payment()
{
function __construct() {
$this->code = 'ot_payment';
$this->num = 3;
$this->title = MODULE_ORDER_TOTAL_PAYMENT_TITLE;
$this->description = MODULE_ORDER_TOTAL_PAYMENT_DESCRIPTION;
$this->enabled = MODULE_ORDER_TOTAL_PAYMENT_STATUS=='true' ? true : false;
$this->sort_order = MODULE_ORDER_TOTAL_PAYMENT_SORT_ORDER;
$this->include_shipping = MODULE_ORDER_TOTAL_PAYMENT_INC_SHIPPING;
$this->include_tax = MODULE_ORDER_TOTAL_PAYMENT_INC_TAX;
$this->calculate_tax = MODULE_ORDER_TOTAL_PAYMENT_CALC_TAX;
// is not used
// $this->howto_calc = MODULE_ORDER_TOTAL_PAYMENT_HOWTO_CALC;
$this->tax_class = MODULE_ORDER_TOTAL_PAYMENT_TAX_CLASS;
$this->num_payment = defined('MODULE_ORDER_TOTAL_PAYMENT_NUMBER')?MODULE_ORDER_TOTAL_PAYMENT_NUMBER:'';
$this->title = defined('MODULE_ORDER_TOTAL_PAYMENT_TITLE')?MODULE_ORDER_TOTAL_PAYMENT_TITLE:'';
$this->description = defined('MODULE_ORDER_TOTAL_PAYMENT_DESCRIPTION')?MODULE_ORDER_TOTAL_PAYMENT_DESCRIPTION:'';
$this->enabled = (MODULE_ORDER_TOTAL_PAYMENT_STATUS == 'true') ? true : false;
$this->sort_order = defined('MODULE_ORDER_TOTAL_PAYMENT_SORT_ORDER')?MODULE_ORDER_TOTAL_PAYMENT_SORT_ORDER:'';
$this->include_shipping = defined('MODULE_ORDER_TOTAL_PAYMENT_INC_SHIPPING')?MODULE_ORDER_TOTAL_PAYMENT_INC_SHIPPING:'';
$this->include_tax = defined('MODULE_ORDER_TOTAL_PAYMENT_INC_TAX')?MODULE_ORDER_TOTAL_PAYMENT_INC_TAX:'';
$this->calculate_tax = defined('MODULE_ORDER_TOTAL_PAYMENT_CALC_TAX')?MODULE_ORDER_TOTAL_PAYMENT_CALC_TAX:'';
$this->tax_class = defined('MODULE_ORDER_TOTAL_PAYMENT_TAX_CLASS')?MODULE_ORDER_TOTAL_PAYMENT_TAX_CLASS:'';
$this->output = array();
$this->amount = 0;
$this->original_total = 0;
$this->discount = array();
$this->amounts = array();
$this->show_in_checkout_payment = MODULE_ORDER_TOTAL_PAYMENT_SHOW_IN_CHECKOUT_PAYMENT=='true' ? true : false;
$this->show_type = MODULE_ORDER_TOTAL_PAYMENT_SHOW_TYPE;
$this->show_type = defined('MODULE_ORDER_TOTAL_PAYMENT_SHOW_TYPE')?MODULE_ORDER_TOTAL_PAYMENT_SHOW_TYPE:'';
if ($this->check() > 0) {
$check_zones_query = xtc_db_query("SELECT * FROM " . TABLE_CONFIGURATION . " WHERE configuration_key LIKE 'MODULE_ORDER_TOTAL_PAYMENT_PERCENTAGE%'");
$check_zones_rows_query = xtc_db_num_rows($check_zones_query);
if ($check_zones_rows_query != $this->num_payment) {
$this->install_numbers($check_zones_rows_query);
}
}
// Rabattfelder
if ($this->enabled) {
for ($k=1; $k<=$this->num; $k++) {
for ($k=1; $k<=$this->num_payment; $k++) {
if (defined('MODULE_ORDER_TOTAL_PAYMENT_PERCENTAGE' . $k)
&& defined('MODULE_ORDER_TOTAL_PAYMENT_TYPE' . $k)
)
{
$this->percentage[$k] = constant('MODULE_ORDER_TOTAL_PAYMENT_PERCENTAGE' . $k);
$this->payment[$k] = constant('MODULE_ORDER_TOTAL_PAYMENT_TYPE' . $k);
}
}
}
}
function process()
{
function process() {
global $order, $xtPrice;
$allowed_zones = explode(',', MODULE_ORDER_TOTAL_PAYMENT_ALLOWED);
if ($this->enabled && (in_array($_SESSION['delivery_zone'], $allowed_zones) == true || MODULE_ORDER_TOTAL_PAYMENT_ALLOWED == '')) {
$this->xtc_order_total();
$this->calculate_credit();
if (isset($this->discount['sum']) && $this->discount['sum']!=0) {
for ($i=1; $i<=$this->num; $i++) {
for ($i=1; $i<=$this->num_payment; $i++) {
if (isset($this->discount['amount' . $i]) && $this->discount['amount' . $i]!=0) {
$this->output[] = array('title' =>
($this->discount['pro' . $i] != 0.0 ? number_format(abs($this->discount['pro' . $i]), 2, $xtPrice->currencies[$_SESSION['currency']]['decimal_point'], '') . '% ' .
($this->discount['fee' . $i] != 0 ? ($this->discount['pro' . $i] != 0.0 ? ' +' : '') . $xtPrice->xtcFormat(abs($this->discount['fee' . $i]), true) . ' ':'') : '') .
($this->discount['amount' . $i] < 0 ? MODULE_ORDER_TOTAL_PAYMENT_DISCOUNT:MODULE_ORDER_TOTAL_PAYMENT_FEE) . ':',
'text' => $this->discount['amount' . $i] < 0 ? '<span style="color: red;">' . $xtPrice->xtcFormat($this->discount['amount' . $i], true).'</span>':$xtPrice->xtcFormat($this->discount['amount' . $i], true),
'value' => $this->discount['amount' . $i]);
$this->output[] = array('title' => (($this->discount['pro' . $i] != 0.0) ? number_format(abs($this->discount['pro' . $i]), 2, $xtPrice->currencies[$_SESSION['currency']]['decimal_point'], '') . '% ' .
(($this->discount['fee' . $i] != 0) ? (($this->discount['pro' . $i] != 0.0) ? ' +' : '') . $xtPrice->xtcFormat(abs($this->discount['fee' . $i]), true) . ' ' : '') : '') .
(($this->discount['amount' . $i] < 0) ? MODULE_ORDER_TOTAL_PAYMENT_DISCOUNT : MODULE_ORDER_TOTAL_PAYMENT_FEE) . ':',
'text' => ($this->discount['amount' . $i] < 0) ? '<span class="color_ot_total">' . $xtPrice->xtcFormat($this->discount['amount' . $i], true).'</span>' : $xtPrice->xtcFormat($this->discount['amount' . $i], true),
'value' => $this->discount['amount' . $i]
);
$order->info['subtotal'] += $this->discount['amount' . $i];
$order->info['total'] += $this->discount['amount' . $i];
}
}
}
}
}
function calculate_credit($payment = '')
{
function calculate_credit($payment = '') {
global $order;
$discount = array();
$values = array();
if ($payment == '' && isset($_SESSION['payment'])) {
ca. Zeile 93
if ($payment == '' && isset($_SESSION['payment'])) {
$payment = $_SESSION['payment'];
}
if ($this->include_shipping == 'false') {
$module = substr($_SESSION['shipping']['id'], 0, strpos($_SESSION['shipping']['id'], '_'));
$shipping_tax = 0;
if (is_object($module) && array_key_exists($module, $GLOBALS)) {
$shipping_tax = xtc_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
}
if ($this->include_shipping == 'false' && $order->info['shipping_class']) {
$shipping_modul = explode('_',$order->info['shipping_class']);
$shipping_tax_class = constant('MODULE_SHIPPING_'.strtoupper($shipping_modul[0]).'_TAX_CLASS');
$shipping_tax = xtc_get_tax_rate($shipping_tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
if ($_SESSION['customers_status']['customers_status_show_price_tax'] && !$_SESSION['customers_status']['customers_status_add_tax_ot']) {
//$tod_shipping = $order->info['shipping_cost'] / (100 + $shipping_tax) * $shipping_tax;
$tod_shipping = $order->info['shipping_cost'] * ($shipping_tax / 100 + 1) - $order->info['shipping_cost']; //web28 - Fix shipping tax
$tod_shipping = $order->info['shipping_cost'] / (100 + $shipping_tax) * $shipping_tax;
} else {
$tod_shipping = $order->info['shipping_cost'] / 100 * $shipping_tax;
}
} else {
ca. Zeile 114
if ($this->sort_order < MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER) {
$tod_shipping = 0;
}
for ($j=1; $j<=$this->num; $j++) {
for ($j=1; $j<=$this->num_payment; $j++) {
$do = false;
if (strpos($this->percentage[$j], "|") !== false) {
$strings = explode('|', $this->percentage[$j]);
$allowed_zones = explode(',', $strings[0]);
ca. Zeile 127
} else {
$string = $this->percentage[$j];
}
$discount_table = (preg_split("/[:,]/" , $string));
//print_r($discount_table);
for ($i=0; $i<sizeof($discount_table); $i+=2) {
if ($this->amount >= $discount_table[$i]) {
$values[$j]['minimum'] = $discount_table[$i];
$fees = preg_split('/&/', $discount_table[$i+1]);
$values[$j]['percent'] = (isset($fees[0])?$fees[0]:'');
$values[$j]['percent'] = ((isset($fees[0])) ? $fees[0] : '');
$values[$j]['fee'] = ((isset($fees[1]) && $fees[1]!='')?$fees[1]:0);
} else {
break;
}
ca. Zeile 147
for ($i = 0; $i < count($table); $i++) {
if ($payment == $table[$i]) $do = true;
}
if ($do) {
$values[$j]['discount'] = $this->get_discount($this->amount, $values[$j]['percent']) + $values[$j]['fee'];
// Calculate tax reduction if necessary
if($this->calculate_tax == 'true') {
//Reduzierung/Aufschlag Faktor berechnen
$discount = ($this->amount - $values[$j]['discount']) / $this->amount;
// Calculate tax group deductions
reset($order->info['tax_groups']);
while (list($key, $value) = each($order->info['tax_groups'])) {
if (strpos($key, $shipping_tax . '%')) {
$god_amount = $this->get_discount(($value - $tod_shipping), $values[$j]['percent']);
} else {
$god_amount = $this->get_discount($value, $values[$j]['percent']);
}
if ($values[$j]['fee'] != 0 && count($this->amounts) > 0) {
foreach($this->amounts as $key2=>$value2) {
if (strpos($key, $key2 . '%')) {
$god_amount += $values[$j]['fee'] * $value2 / $this->amounts['total'] * $key2 / 100 / (100 + $key2) * 100;
}
}
}
$order->info['tax_groups'][$key] -= $god_amount;
//Steuerantei der Versandkosten wenn notwendig entfernen
$value -= (strpos($key, $shipping_tax . '%') ? $tod_shipping : 0 );
$god_amount = $value * $discount - $value;
$order->info['tax_groups'][$key] += $god_amount; //Steuergruppe korrigieren
$tod_amount += $god_amount; //hier wird die Steuer aufaddiert
}
// Calculate main tax reduction
//$tod_amount = $this->get_discount(($order->info['tax'] - $tod_shipping), $values[$j]['percent']); // FIX web28 - falsche Steuerkorrektur
$order->info['tax'] -= $tod_amount;
$order->info['tax'] += $tod_amount;
}
$values[$j]['discount'] = $this->get_discount($this->amount, $values[$j]['percent']) + $values[$j]['fee'];
}
}
(!isset($this->discount['sum'])?$this->discount['sum']='':'');
(!isset($this->discount['amount' . $j])?$this->discount['amount' . $j]='':'');
(!isset($this->discount['pro' . $j])?$this->discount['pro' . $j]='':'');
(!isset($this->discount['fee' . $j])?$this->discount['fee' . $j]='':'');
$this->discount['sum'] -= (isset($values[$j]['discount'])?$values[$j]['discount']:'');
$this->discount['amount' . $j] = (isset($values[$j]['discount'])?-$values[$j]['discount']:'');
$this->discount['pro' . $j] = (isset($values[$j]['percent'])?$values[$j]['percent']:'');
$this->discount['fee' . $j] = (isset($values[$j]['fee'])?$values[$j]['fee']:'');
if ($do && MODULE_ORDER_TOTAL_PAYMENT_BREAK != 'true') break;
((!isset($this->discount['sum'])) ? $this->discount['sum'] = '' : '');
((!isset($this->discount['amount' . $j])) ? $this->discount['amount' . $j] = '' : '');
((!isset($this->discount['pro' . $j])) ? $this->discount['pro' . $j] = '' : '');
((!isset($this->discount['fee' . $j])) ? $this->discount['fee' . $j] = '' : '');
$this->discount['sum'] -= ((isset($values[$j]['discount'])) ? $values[$j]['discount'] : '');
$this->discount['amount' . $j] = ((isset($values[$j]['discount'])) ? -$values[$j]['discount'] : '');
$this->discount['pro' . $j] = ((isset($values[$j]['percent'])) ? $values[$j]['percent'] : '');
$this->discount['fee' . $j] = ((isset($values[$j]['fee'])) ? $values[$j]['fee'] : '');
if ($do && MODULE_ORDER_TOTAL_PAYMENT_BREAK != 'true') {
break;
}
}
}
function xtc_order_total()
{
function xtc_order_total() {
global $order;
$this->amounts['total'] = 0;
$order_total = $order->info['total'];
$shipping_cost = $this->get_shipping_cost();
$shipping_tax = $shipping_cost - $order->info['shipping_cost'];
$order_total += $shipping_tax;
if ($this->include_shipping == 'false') $order_total -= $shipping_cost;
// Check if gift voucher is in cart and adjust total
$products = $_SESSION['cart']->get_products();
for ($i=0; $i<sizeof($products); $i++) {
$t_prid = xtc_get_prid($products[$i]['id']);
ca. Zeile 218
$this->amounts[(string)$products_tax] += $gv_result['products_price'] * (int)$qty;
$this->amounts['total'] += $gv_result['products_price'] * $qty;
}
}
if ($this->include_shipping == 'false') $order_total -= $order->info['shipping_cost'];
if ($this->include_tax == 'false') $order_total -= $order->info['tax'];
if ($this->include_tax == 'false') {
$order_total -= $order->info['tax']; //Steuer nur von Artikeln
$order_total -= $shipping_tax; //Steuer von Versandmodul
}
$this->amount = $order_total;
}
function get_percent($payment, $type = 'percent')
{
function get_percent($payment, $type = 'percent') {
global $order, $xtPrice;
$string = '';
$allowed_zones = explode(',', MODULE_ORDER_TOTAL_PAYMENT_ALLOWED);
if ($this->enabled && (in_array($_SESSION['delivery_zone'], $allowed_zones) == true || MODULE_ORDER_TOTAL_PAYMENT_ALLOWED == '')) {
$this->calculate_credit($payment);
if ($this->discount['sum']!=0) {
for ($i=1; $i<=$this->num; $i++) {
for ($i=1; $i<=$this->num_payment; $i++) {
if ($this->discount['amount' . $i]!=0) {
if ($type == 'price') {
$string .= $xtPrice->xtcFormat(abs($this->discount['amount' . $i]), true) . ' ' . ($this->discount['amount' . $i]<0?MODULE_ORDER_TOTAL_PAYMENT_DISCOUNT:MODULE_ORDER_TOTAL_PAYMENT_FEE);
if ($type == 'price' || $this->show_type == 'price' || $payment == 'paypal') {
$string .= $xtPrice->xtcFormat(abs($this->discount['amount' . $i]), true) . ' ' . (($this->discount['amount' . $i] < 0) ? MODULE_ORDER_TOTAL_PAYMENT_DISCOUNT : MODULE_ORDER_TOTAL_PAYMENT_FEE);
} else {
$string .= ($this->discount['pro' . $i] != 0.0 ?
number_format(abs($this->discount['pro' . $i]), 2, $xtPrice->currencies[$_SESSION['currency']]['decimal_point'], '') . '% ' : '') .
($this->discount['fee' . $i]!=0? ($this->discount['pro' . $i] != 0.0 ? ' +' : '') . $xtPrice->xtcFormat(abs($this->discount['fee' . $i]), true) . ' ' : '') .
($this->discount['amount' . $i]<0?MODULE_ORDER_TOTAL_PAYMENT_DISCOUNT:MODULE_ORDER_TOTAL_PAYMENT_FEE);
$string .= (($this->discount['pro' . $i] != 0.0) ? number_format(abs($this->discount['pro' . $i]), 2, $xtPrice->currencies[$_SESSION['currency']]['decimal_point'], '') . '% ' : '') .
(($this->discount['fee' . $i] != 0) ? (($this->discount['pro' . $i] != 0.0) ? ' +' : '') . $xtPrice->xtcFormat(abs($this->discount['fee' . $i]), true) . ' ' : '') .
(($this->discount['amount' . $i] < 0) ? MODULE_ORDER_TOTAL_PAYMENT_DISCOUNT : MODULE_ORDER_TOTAL_PAYMENT_FEE);
}
if (MODULE_ORDER_TOTAL_PAYMENT_BREAK != 'true') {
break;
}
if (MODULE_ORDER_TOTAL_PAYMENT_BREAK != 'true') break;
}
}
}
}
return $string;
}
function get_discount($value, $percent)
{
function get_discount($value, $percent) {
global $xtPrice;
// return round($value * 100) / 100 * $percent / 100;
//return $god_amount = $value * $percent / 100;
return $xtPrice->xtcFormat($value * $percent / 100, false);
}
function get_module_cost($payment_modul)
{
function get_module_cost($payment_modul) {
if ($this->show_in_checkout_payment) {
return $this->get_percent($payment_modul['id'], $this->show_type);
}
}
function check()
{
function get_shipping_cost() {
global $order, $PHP_SELF;
$shipping_cost = $order->info['shipping_cost'];
if ($shipping_cost > 0) {
//Steuer auf der Seite checkout_payment hinzurechnen
if (basename($PHP_SELF) == 'checkout_payment.php') {
$shipping_modul = explode('_',$order->info['shipping_class']);
$shipping_tax_class = constant('MODULE_SHIPPING_'.strtoupper($shipping_modul[0]).'_TAX_CLASS');
$shipping_tax_rate = xtc_get_tax_rate($shipping_tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
$shipping_cost = $order->info['shipping_cost'] * (1.0 + ($shipping_tax_rate / 100));
}
}
return $shipping_cost;
}
function check() {
if (!isset($this->check)) {
$check_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_PAYMENT_STATUS'");
$check_query = xtc_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'MODULE_ORDER_TOTAL_PAYMENT_STATUS'");
$this->check = xtc_db_num_rows($check_query);
}
return $this->check;
}
function install()
{
function install() {
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_STATUS', 'true', '6', '1','xtc_cfg_select_option(array(\'true\', \'false\'), ', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_ALLOWED', '', '6', '2', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_SORT_ORDER', '49', '6', '2', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_ORDER_TOTAL_PAYMENT_NUMBER', '3', '6', '3', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_SHOW_IN_CHECKOUT_PAYMENT', 'false', '6', '100','xtc_cfg_select_option(array(\'true\', \'false\'), ', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_SHOW_TYPE', 'default', '6', '101','xtc_cfg_select_option(array(\'default\', \'price\'), ', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_SORT_ORDER', '49', '6', '2', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function ,date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_INC_SHIPPING', 'false', '6', '100005', 'xtc_cfg_select_option(array(\'true\', \'false\'), ', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function ,date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_INC_TAX', 'true', '6', '100006','xtc_cfg_select_option(array(\'true\', \'false\'), ', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function ,date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_CALC_TAX', 'true', '6', '100005','xtc_cfg_select_option(array(\'true\', \'false\'), ', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_ALLOWED', '', '6', '2', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_TAX_CLASS', '0','6', '100007', 'xtc_get_tax_class_title', 'xtc_cfg_pull_down_tax_classes(', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_BREAK', 'false', '6', '3','xtc_cfg_select_option(array(\'true\', \'false\'), ', now())");
for ($i=1; $i<=$this->num; $i++) {
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_PERCENTAGE" . $i . "', '100:4', '6', '" . $i . "1', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_TYPE" . $i . "', 'moneyorder', '6', '" . $i . "2', now())");
}
function install_numbers($number_of_payment) {
// backup old values
//xtc_backup_configuration($this->keys_number($number_of_payment)); // Comes with shop version 2.00
// add new zone
if ($number_of_payment <= $this->num_payment) {
for ($i = (($number_of_payment==0) ? 1 : $number_of_payment); $i <= $this->num_payment; $i ++) {
$check_zones_query = xtc_db_query("SELECT * FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'MODULE_ORDER_TOTAL_PAYMENT_PERCENTAGE".$i."'");
if (xtc_db_num_rows($check_zones_query) < 1) {
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_PERCENTAGE" . $i . "', '', '6', '" . $i . "1', now())");
xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_ORDER_TOTAL_PAYMENT_TYPE" . $i . "', '', '6', '" . $i . "2', now())");
}
}
} else {
// remove zone
for ($i = $number_of_payment; $i >= $this->num_payment; $i --) {
xtc_db_query("DELETE FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'MODULE_ORDER_TOTAL_PAYMENT_PERCENTAGE".$i."'");
xtc_db_query("DELETE FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = 'MODULE_ORDER_TOTAL_PAYMENT_TYPE".$i."'");
}
}
function keys()
{
$keys = array();
$check_query = xtc_db_query("SELECT configuration_key FROM " . TABLE_CONFIGURATION . " WHERE configuration_key LIKE 'MODULE_ORDER_TOTAL_PAYMENT_%' ORDER BY sort_order");
while($key = xtc_db_fetch_array($check_query)) {
$keys[] = $key['configuration_key'];
// set standard values
for ($i = 1; $i <= $this->num_payment; $i ++) {
if ($i == 1) {
xtc_db_query("UPDATE " . TABLE_CONFIGURATION . " SET configuration_value = '100:4' WHERE configuration_key = 'MODULE_ORDER_TOTAL_PAYMENT_PERCENTAGE1'");
xtc_db_query("UPDATE " . TABLE_CONFIGURATION . " SET configuration_value = 'moneyorder' WHERE configuration_key = 'MODULE_ORDER_TOTAL_PAYMENT_TYPE1'");
}
return $keys;
}
function remove()
{
xtc_db_query("DELETE FROM " . TABLE_CONFIGURATION . " WHERE configuration_key LIKE 'MODULE_ORDER_TOTAL_PAYMENT_%'");
// restore old values
//xtc_restore_configuration($this->keys_number($this->num_payment)); // Comes with shop version 2.00
}
function remove() {
xtc_db_query("DELETE FROM " . TABLE_CONFIGURATION . " WHERE configuration_key in ('" . implode("', '", $this->keys()) . "')");
}
function keys_number($number) {
$keys_number = array();
for ($i = 1; $i <= $number; $i ++) {
$keys_number[$i.'1'] = 'MODULE_ORDER_TOTAL_PAYMENT_PERCENTAGE' . $i;
$keys_number[$i.'2'] = 'MODULE_ORDER_TOTAL_PAYMENT_TYPE' . $i;
}
return $keys_number;
}
function keys() {
$keys = $this->keys_number($this->num_payment);
$keys[0] = 'MODULE_ORDER_TOTAL_PAYMENT_STATUS';
$keys[1] = 'MODULE_ORDER_TOTAL_PAYMENT_ALLOWED';
$keys[2] = 'MODULE_ORDER_TOTAL_PAYMENT_SORT_ORDER';
$keys[3] = 'MODULE_ORDER_TOTAL_PAYMENT_NUMBER';
$keys[1000] = 'MODULE_ORDER_TOTAL_PAYMENT_SHOW_IN_CHECKOUT_PAYMENT';
$keys[1001] = 'MODULE_ORDER_TOTAL_PAYMENT_SHOW_TYPE';
$keys[1002] = 'MODULE_ORDER_TOTAL_PAYMENT_INC_SHIPPING';
$keys[1003] = 'MODULE_ORDER_TOTAL_PAYMENT_INC_TAX';
$keys[1004] = 'MODULE_ORDER_TOTAL_PAYMENT_CALC_TAX';
$keys[1005] = 'MODULE_ORDER_TOTAL_PAYMENT_TAX_CLASS';
$keys[1006] = 'MODULE_ORDER_TOTAL_PAYMENT_BREAK';
ksort($keys);
$keys = array_values($keys);
return $keys;
}
}
?>
includes/modules/payment/billsafe_2.phpTop ca. Zeile 14
---------------------------------------------------------------------------------------*/
/*
* id = billsafe_2.php
* location = /includes/modules/payment
* location = /includes/external/billsafe/modules/payment // DokuMan - 2012-06-19 - move billsafe to external directory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
ca. Zeile 28
*
* @package BillSAFE_2
* @copyright (C) 2013 Bernd Blazynski
* @license GPLv2
*
* Modified 2014-03 by Christoph Peters SIP / Marktantrieb:
* Module extension to prevent php process termination if a connection error to the billsafe server occur.
* If connection errors occur, the process will not stop but continue without billsafe payment option.
* Changes in Lines 166 ff
*
*/
class billsafe_2 {
var $code;
ca. Zeile 43
global $order;
require (DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/ini.php'); //DokuMan - 2012-06-19 - move billsafe to external directory
$this->code = 'billsafe_2';
$this->title = MODULE_PAYMENT_BILLSAFE_2_TEXT_TITLE;
// BOF - Changed to white label solution
/*
if (preg_match('/checkout_payment/',$_SERVER['PHP_SELF'])) {
$url_image = $this->checkBillSAFELogoURL(MODULE_PAYMENT_BILLSAFE_2_BILLSAFE_LOGO_URL);
$this->info ='<img src="'.$url_image.'" title="BillSAFE" alt="BillSAFE" style="margin-right:10px; float:left;" />'.MODULE_PAYMENT_BILLSAFE_2_CHECKOUT_TEXT_INFO;
}
*/
$this->info = MODULE_PAYMENT_BILLSAFE_2_CHECKOUT_TEXT_INFO;
// EOF - Changed to white label solution
$this->description = MODULE_PAYMENT_BILLSAFE_2_TEXT_DESCRIPTION;
$this->sort_order = MODULE_PAYMENT_BILLSAFE_2_SORT_ORDER;
$this->enabled = ((MODULE_PAYMENT_BILLSAFE_2_STATUS == 'True') ? true : false);
$this->application_version = $ini['applicationVersion'];
ca. Zeile 56
$this->api_version = '2.0';
$this->signature = 'billsafe|billsafe|1.0|2.0';
$currency = $_SESSION ['currency'];
if ((int)MODULE_PAYMENT_BILLSAFE_2_ORDER_STATUS_ID > 0) $this->order_status = MODULE_PAYMENT_BILLSAFE_2_ORDER_STATUS_ID;
if(isset($_SESSION['billsafe_status']) && $_SESSION['billsafe_status'] == 'declined') $this->enabled = false; //Dokuman - 2012-06-19 - added isset check
if(isset($_SESSION['billsafe_status']) && $_SESSION['billsafe_status'] === 'declined') $this->enabled = false; // Dokuman - 2012-06-19 - added isset check
$this->check();
if (is_object($order)) $this->update_status();
}
function update_status() {
global $order;
if (($this->enabled == true) && ((int)MODULE_PAYMENT_BILLSAFE_2_ZONE > 0) ) {
if (($this->enabled === true) && ((int)MODULE_PAYMENT_BILLSAFE_2_ZONE > 0) ) {
$check_flag = false;
$check_query = xtc_db_query('SELECT zone_id FROM '.TABLE_ZONES_TO_GEO_ZONES.' WHERE geo_zone_id = "'.xtc_db_input(MODULE_PAYMENT_BILLSAFE_2_ZONE).'" AND zone_country_id = "'.xtc_db_input($order->billing['country']['id']).'" ORDER BY zone_id');
while ($check = xtc_db_fetch_array($check_query)) {
if ($check['zone_id'] < 1) {
ca. Zeile 119
$bs->setUtf8Mode(false);
} else {
$bs->setUtf8Mode(true);
}
if (MODULE_PAYMENT_BILLSAFE_2_SERVER == 'Live') {
if (MODULE_PAYMENT_BILLSAFE_2_SERVER === 'Live') {
$bs->setMode('LIVE');
} else {
$bs->setMode('SANDBOX');
}
ca. Zeile 140
$total = $order->info['subtotal'] + $order->info['tax'];
} else {
$total = $order->info['subtotal'];
}
if (MODULE_PAYMENT_BILLSAFE_2_SCHG != '') {
if (MODULE_PAYMENT_BILLSAFE_2_SCHG !== '') {
$schg_tax_rate = xtc_get_tax_rate(MODULE_PAYMENT_BILLSAFE_2_SCHGTAX);
if (stristr(MODULE_PAYMENT_BILLSAFE_2_SCHG, '%')) {
$schg_amount = $total * MODULE_PAYMENT_BILLSAFE_2_SCHG / 100;
$schg = '<br />'.MODULE_PAYMENT_BILLSAFE_2_SCHG_TEXT_INFO.MODULE_PAYMENT_BILLSAFE_2_SCHG;
ca. Zeile 153
} else {
$schg = '';
$schg_amount = 0;
}
$_SESSION['dob'] = $customer['customers_dob'];
$total = $total + $schg_amount;
$total = round($xtPrice->xtcCalculateCurrEx($total, $_SESSION['currency']), $xtPrice->get_decimal_places($_SESSION['currency']));
$total = number_format(round(($total + $shipping_cost), $xtPrice->get_decimal_places($currency)), 2, '.', '');
// BOF - Fix for Austria
/*
$company_b = md5($order->billing['company']);
$company_d = md5($order->delivery['company']);
*/
if ($order->billing['company'] !== '') $company_b = md5($order->billing['company']);
if ($order->delivery['company'] !== '') $company_d = md5($order->delivery['company']);
// EOF - Fix for Austria
$firstname_b = md5($order->billing['firstname']);
$firstname_d = md5($order->delivery['firstname']);
$lastname_b = md5($order->billing['lastname']);
$lastname_d = md5($order->delivery['lastname']);
ca. Zeile 169
$params = array('order_amount' => round($total, $xtPrice->get_decimal_places($currency)), 'order_currencyCode' => $currency, 'customer_id' => $customer_id, 'customer_gender' => $customer['customers_gender'], 'customer_company' => $company_b, 'deliveryAddress_company' => $company_d, 'customer_firstname' => $firstname_b, 'deliveryAddress_firstname' => $firstname_d, 'customer_lastname' => $lastname_b, 'deliveryAddress_lastname' => $lastname_d, 'customer_street' => $order->billing['street_address'], 'deliveryAddress_street' => $order->delivery['street_address'], 'customer_postcode' => $order->billing['postcode'], 'deliveryAddress_postcode' => $order->delivery['postcode'], 'customer_city' => $order->billing['city'], 'deliveryAddress_city' => $order->delivery['city'], 'customer_country' => $order->billing['country']['iso_code_2'], 'deliveryAddress_country' => $order->delivery['country']['iso_code_2'], 'customer_dateOfBirth' => $customer['customers_dob'],'customer_email' => $email, 'customer_phone' => $phone, );
} else {
$params = array('order_amount' => round($total, $xtPrice->get_decimal_places($currency)), 'order_currencyCode' => $currency, 'customer_id' => $customer_id, 'customer_company' => $company_b, 'deliveryAddress_company' => $company_d, 'customer_firstname' => $firstname_b, 'deliveryAddress_firstname' => $firstname_d, 'customer_lastname' => $lastname_b, 'deliveryAddress_lastname' => $lastname_d, 'customer_street' => $order->billing['street_address'], 'deliveryAddress_street' => $order->delivery['street_address'], 'customer_postcode' => $order->billing['postcode'], 'deliveryAddress_postcode' => $order->delivery['postcode'], 'customer_city' => $order->billing['city'], 'deliveryAddress_city' => $order->delivery['city'], 'customer_country' => $order->billing['country']['iso_code_2'], 'deliveryAddress_country' => $order->delivery['country']['iso_code_2'], 'customer_dateOfBirth' => $customer['customers_dob'],'customer_email' => $email, 'customer_phone' => $phone, );
}
/* Modified 2014-03 by Christoph Peters SIP / Marktantrieb: Check for connection errors */
try {
$response = $bs->callMethod('prevalidateOrder', $params);
if ($response->ack == 'OK') {
if ($response->invoice->isAvailable == 'TRUE') {
$display = array('id' => $this->code, 'module' => $this->title, 'description' => $this->info.$schg.'<div style="clear:both;">
</div>');
$display = array('id' => $this->code, 'module' => $this->title, 'description' => $this->info.$schg.'<div style="clear:both;"></div>');
} else {
$display = array('id' => $this->code, 'module' => $this->title, 'description' => $this->info.$schg.'<br /><b><font color="#ff0000">'.$response->invoice->message.'</font></b><div style="clear:both;">
</div>');
// $display = null;
$display = array('id' => $this->code, 'module' => $this->title, 'description' => $this->info.$schg.'<br /><b><font color="#ff0000">'.$response->invoice->message.'</font></b><div style="clear:both;"></div>');
}
} else {
$display = null;
}
}
catch(Exception $e) {
// Return null to continue payment process
$display = null;
}
/* / Modified 2014-03 by Christoph Peters SIP / Marktantrieb: Check for connection errors */
return $display;
}
function pre_confirmation_check() {
ca. Zeile 192
function confirmation() {
$_SESSION['discount_value'] = $GLOBALS['ot_discount']->output[0]['value'];
$_SESSION['discount_name'] = $GLOBALS['ot_discount']->output[0]['title'];
$_SESSION['voucher_value'] = $GLOBALS['ot_gv']->output[0]['value'];
$_SESSION['voucher_value'] = $GLOBALS['ot_gv']->output[0]['value'] * (-1);
$_SESSION['voucher_name'] = $GLOBALS['ot_gv']->output[0]['title'];
$_SESSION['coupon_value'] = $GLOBALS['ot_coupon']->output[0]['value'];
$_SESSION['coupon_value'] = $GLOBALS['ot_coupon']->output[0]['value'] * (-1);
$_SESSION['coupon_name'] = $GLOBALS['ot_coupon']->output[0]['title'];
$_SESSION['schg_value'] = $GLOBALS['ot_billsafe']->output[0]['value'];
$_SESSION['schg_name'] = $GLOBALS['ot_billsafe']->output[0]['title'];
$_SESSION['lofee_value'] = $GLOBALS['ot_loworderfee']->output[0]['value'];
ca. Zeile 207
function process_button() {
global $order;
$payment_type = $this->title;
$process_button_string = xtc_draw_hidden_field('paymentType', $payment_type);
if (MODULE_PAYMENT_BILLSAFE_2_LAYER == 'True') {
if (MODULE_PAYMENT_BILLSAFE_2_SERVER == 'Live') {
if (MODULE_PAYMENT_BILLSAFE_2_LAYER === 'True' && MODULE_PAYMENT_BILLSAFE_2_INLINE === 'False') {
if (MODULE_PAYMENT_BILLSAFE_2_SERVER === 'Live') {
$lisb = 'false';
} else {
$lisb = 'true';
}
ca. Zeile 220
<script type="text/javascript"><!--
var formElement = document.getElementById(\'checkout_confirmation\');
var lpg = new BillSAFE.LPG.client({form: formElement, conditions: {invoice: [{element: \'paymentType\', value: \''.$payment_type.'\'}]}, sandbox: '.$lisb.'});
//--></script>';
} elseif (MODULE_PAYMENT_BILLSAFE_2_LAYER === 'False' && MODULE_PAYMENT_BILLSAFE_2_INLINE === 'True') {
$process_button_string .= '<div>';
if (($_SESSION['dob'] == '0000-00-00' || $_SESSION['dob'] == '') && ($order->billing['company'] === '' && $order->delivery['company'] === ''))$process_button_string .= '<p>'.MODULE_PAYMENT_BILLSAFE_2_DOB.' '.xtc_draw_input_fieldNote(array ('name' => 'dob', 'text' => ''), $_GET['dob']).'<span class="inputRequirement"> *</span></p>';
$process_button_string .= '<p>'.MODULE_PAYMENT_BILLSAFE_2_TC.' '.xtc_draw_checkbox_field('checkbox_billsafe_tc', '1', '', 'id=checkbox_billsafe_tc').'<span class="inputRequirement"> *</span><script src="https://fn.billsafe.de/fb/js/lazyload-min.js"></script><script type="text/javascript"><!--
LazyLoad.js("https://fn.billsafe.de/fb/js/fb-min.js", function() {
runFb({
f: \''.session_id().'\',
s: \''.MODULE_PAYMENT_BILLSAFE_2_PKEY.'\',
e: \'checkbox_billsafe_tc\'});
});
//--></script>
<noscript><img src="https://fn.billsafe.de/fb/f.png?f='.session_id().'&&s='.MODULE_PAYMENT_BILLSAFE_2_PKEY.'" /></noscript></p></div>';
}
return $process_button_string;
}
ca. Zeile 237
if ($order->billing[$key] != $order->delivery[$key]) xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error_message='.stripslashes(urlencode(html_entity_decode(MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_ADDRESS))), 'SSL'));
}
}
}
// if ($order->billing['company'] != '') xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error_message='.stripslashes(html_entity_decode(MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_COMPANY)), 'SSL'));
if (empty($_GET['token'])) {
require_once (DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/billsafe_2.php');//DokuMan - 2012-06-19 - move billsafe to external directory
$bs = new Billsafe_Sdk(DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/ini.php');//DokuMan - 2012-06-19 - move billsafe to external directory
if (MODULE_PAYMENT_BILLSAFE_2_LOG == 'True') {
if (MODULE_PAYMENT_BILLSAFE_2_LOG_TYPE == 'Echo') {
require_once DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/LoggerEcho.php';//DokuMan - 2012-06-19 - move billsafe to external directory
$bs->setLogger(new Billsafe_LoggerEcho());
} elseif (MODULE_PAYMENT_BILLSAFE_2_LOG_TYPE == 'Mail') {
require_once DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/LoggerMail.php';//DokuMan - 2012-06-19 - move billsafe to external directory
$bs->setLogger(new Billsafe_LoggerMail(MODULE_PAYMENT_BILLSAFE_2_LOG_ADDR));
} elseif (MODULE_PAYMENT_BILLSAFE_2_LOG_TYPE == 'File') {
require_once DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/LoggerFile.php';//DokuMan - 2012-06-19 - move billsafe to external directory
$bs->setLogger(new Billsafe_LoggerFile(DIR_FS_CATALOG.'export/BillSAFE_'.date('YmdHis').'.log'));
}
}
if ($_SESSION['language_charset'] == 'iso-8859-1' || $_SESSION['language_charset'] == 'iso-8859-15') {
$bs->setUtf8Mode(false);
} else {
$bs->setUtf8Mode(true);
}
if (MODULE_PAYMENT_BILLSAFE_2_SERVER == 'Live') {
$bs->setMode('LIVE');
} else {
$bs->setMode('SANDBOX');
}
$bs->setCredentials(array('merchantId' => MODULE_PAYMENT_BILLSAFE_2_MERCHANT_ID, 'merchantLicenseSandbox' => MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE, 'merchantLicenseLive' => MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE, 'applicationSignature' => $this->applicationSignature, 'applicationVersion' => $this->application_version));
$schg_tax = 0;
$article = array();
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
if (is_array($order->products[$i]['attributes'])) {
ca. Zeile 433
} else {
$info_tax = number_format(round(($info_tax + $shipping_tax + $schg_tax + $coupon_tax + $lofee_tax), $xtPrice->get_decimal_places($currency)), 2, '.', '');
}
$url_image = $this->checkLogoURL(MODULE_PAYMENT_BILLSAFE_2_SHOP_LOGO_URL);
if (MODULE_PAYMENT_BILLSAFE_2_LAYER === 'False' && MODULE_PAYMENT_BILLSAFE_2_INLINE === 'True') {
if (($_SESSION['dob'] != '0000-00-00' || $_POST['dob'] != '') && $_POST['checkbox_billsafe_tc'] && ($order->billing['company'] === '' && $order->delivery['company'] === '')) {
if ($_SESSION['dob'] != '0000-00-00') {
$dob = $_SESSION['dob'];
} else {
$dob = $_POST['dob'];
if (is_numeric(xtc_date_raw($dob)) == false || (@checkdate(substr(xtc_date_raw($dob), 4, 2), substr(xtc_date_raw($dob), 6, 2), substr(xtc_date_raw($dob), 0, 4)) == false)) {
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'conditions=1&error_message='.stripslashes(urlencode(html_entity_decode(MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_INLINE))), 'SSL'));
} else {
$dob = substr(xtc_date_raw($dob), 0, 4).'-'.substr(xtc_date_raw($dob), 4, 2).'-'.substr(xtc_date_raw($dob), 6, 2);
}
}
} elseif (!$_POST['checkbox_billsafe_tc'] && ($order->billing['company'] === '' && $order->delivery['company'] === '') && ($_SESSION['dob'] == '0000-00-00' || $_POST['dob'] == '')) {
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'conditions=1&dob='.$_POST['dob'].'&error_message='.stripslashes(urlencode(html_entity_decode(MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_INLINE))), 'SSL'));
} elseif ($_POST['checkbox_billsafe_tc'] && ($order->billing['company'] === '' && $order->delivery['company'] === '') && ($_SESSION['dob'] == '0000-00-00' || $_POST['dob'] == '')) {
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'conditions=1&dob='.$_POST['dob'].'&error_message='.stripslashes(urlencode(html_entity_decode(MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_INLINE))), 'SSL'));
} elseif (!$_POST['checkbox_billsafe_tc'] && ($order->billing['company'] !== '' && $order->delivery['company'] !== '')) {
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'conditions=1&dob='.$_POST['dob'].'&error_message='.stripslashes(urlencode(html_entity_decode(MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_INLINE))), 'SSL'));
}
require_once (DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/billsafe_2.php'); // DokuMan - 2012-06-19 - move billsafe to external directory
$bs = new Billsafe_Sdk(DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/ini.php'); // DokuMan - 2012-06-19 - move billsafe to external directory
if (MODULE_PAYMENT_BILLSAFE_2_LOG == 'True') {
if (MODULE_PAYMENT_BILLSAFE_2_LOG_TYPE == 'Echo') {
require_once DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/LoggerEcho.php'; // DokuMan - 2012-06-19 - move billsafe to external directory
$bs->setLogger(new Billsafe_LoggerEcho());
} elseif (MODULE_PAYMENT_BILLSAFE_2_LOG_TYPE == 'Mail') {
require_once DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/LoggerMail.php'; // DokuMan - 2012-06-19 - move billsafe to external directory
$bs->setLogger(new Billsafe_LoggerMail(MODULE_PAYMENT_BILLSAFE_2_LOG_ADDR));
} elseif (MODULE_PAYMENT_BILLSAFE_2_LOG_TYPE == 'File') {
require_once DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/LoggerFile.php'; // DokuMan - 2012-06-19 - move billsafe to external directory
$bs->setLogger(new Billsafe_LoggerFile(DIR_FS_CATALOG.'export/BillSAFE_'.date('YmdHis').'.log'));
}
}
if ($_SESSION['language_charset'] == 'iso-8859-1' || $_SESSION['language_charset'] == 'iso-8859-15') {
$bs->setUtf8Mode(false);
} else {
$bs->setUtf8Mode(true);
}
if (MODULE_PAYMENT_BILLSAFE_2_SERVER === 'Live') {
$bs->setMode('LIVE');
} else {
$bs->setMode('SANDBOX');
}
$bs->setCredentials(array('merchantId' => MODULE_PAYMENT_BILLSAFE_2_MERCHANT_ID, 'merchantLicenseSandbox' => MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE, 'merchantLicenseLive' => MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE, 'applicationSignature' => $this->applicationSignature, 'applicationVersion' => $this->application_version));
if ($customer['customers_gender'] != '') {
$params = array('order_amount' => round($total, $xtPrice->get_decimal_places($currency)), 'order_taxAmount' => number_format($info_tax, 2, '.', ''), 'order_currencyCode' => $currency, 'customer' => array('id' => $customer_id, 'gender' => $customer['customers_gender'], 'company' => $order->delivery['company'], 'firstname' => $order->delivery['firstname'], 'lastname' => $order->delivery['lastname'], 'street' => $order->delivery['street_address'], 'postcode' => $order->delivery['postcode'], 'city' => $order->delivery['city'], 'country' => $order->delivery['country']['iso_code_2'], 'email' => $customer['customers_email_address'], 'phone' => $customer['customers_telephone'], 'dateOfBirth' => $dob), 'product' => 'invoice', 'sessionId' => session_id(), 'url_return' => xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'), 'url_cancel' => xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'), 'url_image' => $url_image, 'articleList' => $article);
} else {
$params = array('order_amount' => round($total, $xtPrice->get_decimal_places($currency)), 'order_taxAmount' => number_format($info_tax, 2, '.', ''), 'order_currencyCode' => $currency, 'customer' => array('id' => $customer_id, 'company' => $order->delivery['company'], 'firstname' => $order->delivery['firstname'], 'lastname' => $order->delivery['lastname'], 'street' => $order->delivery['street_address'], 'postcode' => $order->delivery['postcode'], 'city' => $order->delivery['city'], 'country' => $order->delivery['country']['iso_code_2'], 'email' => $customer['customers_email_address'], 'phone' => $customer['customers_telephone'], 'dateOfBirth' => $dob), 'product' => 'invoice', 'sessionId' => session_id(), 'url_return' => xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'), 'url_cancel' => xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'), 'url_image' => $url_image, 'articleList' => $article);
}
$this->response = $bs->callMethod('processOrder', $params);
if ($this->response->ack === 'OK' && $this->response->status === 'ACCEPTED') {
} elseif ($this->response->ack === 'OK' && $this->response->status === 'DECLINED') {
$_SESSION['billsafe_status'] = 'declined';
$message = $this->get_error_message($this->response);
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error_message='.stripslashes(urlencode(html_entity_decode($message))), 'SSL'));
} else {
$message = $this->get_error_message($this->response);
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error_message='.stripslashes(urlencode(html_entity_decode($message))), 'SSL'));
}
} elseif (MODULE_PAYMENT_BILLSAFE_2_INLINE === 'False') {
if (empty($_GET['token'])) {
require_once (DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/billsafe_2.php'); // DokuMan - 2012-06-19 - move billsafe to external directory
$bs = new Billsafe_Sdk(DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/ini.php'); // DokuMan - 2012-06-19 - move billsafe to external directory
if (MODULE_PAYMENT_BILLSAFE_2_LOG == 'True') {
if (MODULE_PAYMENT_BILLSAFE_2_LOG_TYPE == 'Echo') {
require_once DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/LoggerEcho.php'; // DokuMan - 2012-06-19 - move billsafe to external directory
$bs->setLogger(new Billsafe_LoggerEcho());
} elseif (MODULE_PAYMENT_BILLSAFE_2_LOG_TYPE == 'Mail') {
require_once DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/LoggerMail.php'; // DokuMan - 2012-06-19 - move billsafe to external directory
$bs->setLogger(new Billsafe_LoggerMail(MODULE_PAYMENT_BILLSAFE_2_LOG_ADDR));
} elseif (MODULE_PAYMENT_BILLSAFE_2_LOG_TYPE == 'File') {
require_once DIR_FS_CATALOG.'includes/external/billsafe/classes/billsafe_2/LoggerFile.php'; // DokuMan - 2012-06-19 - move billsafe to external directory
$bs->setLogger(new Billsafe_LoggerFile(DIR_FS_CATALOG.'export/BillSAFE_'.date('YmdHis').'.log'));
}
}
if ($_SESSION['language_charset'] == 'iso-8859-1' || $_SESSION['language_charset'] == 'iso-8859-15') {
$bs->setUtf8Mode(false);
} else {
$bs->setUtf8Mode(true);
}
if (MODULE_PAYMENT_BILLSAFE_2_SERVER === 'Live') {
$bs->setMode('LIVE');
} else {
$bs->setMode('SANDBOX');
}
$bs->setCredentials(array('merchantId' => MODULE_PAYMENT_BILLSAFE_2_MERCHANT_ID, 'merchantLicenseSandbox' => MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE, 'merchantLicenseLive' => MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE, 'applicationSignature' => $this->applicationSignature, 'applicationVersion' => $this->application_version));
if ($customer['customers_gender'] != '') {
$params = array('order_amount' => round($total, $xtPrice->get_decimal_places($currency)), 'order_taxAmount' => number_format($info_tax, 2, '.', ''), 'order_currencyCode' => $currency, 'customer' => array('id' => $customer_id, 'gender' => $customer['customers_gender'], 'company' => $order->delivery['company'], 'firstname' => $order->delivery['firstname'], 'lastname' => $order->delivery['lastname'], 'street' => $order->delivery['street_address'], 'postcode' => $order->delivery['postcode'], 'city' => $order->delivery['city'], 'country' => $order->delivery['country']['iso_code_2'], 'email' => $customer['customers_email_address'], 'phone' => $customer['customers_telephone']), 'product' => 'invoice', 'url_return' => xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'), 'url_cancel' => xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'), 'url_image' => $url_image, 'articleList' => $article);
} else {
$params = array('order_amount' => round($total, $xtPrice->get_decimal_places($currency)), 'order_taxAmount' => number_format($info_tax, 2, '.', ''), 'order_currencyCode' => $currency, 'customer' => array('id' => $customer_id, 'company' => $order->delivery['company'], 'firstname' => $order->delivery['firstname'], 'lastname' => $order->delivery['lastname'], 'street' => $order->delivery['street_address'], 'postcode' => $order->delivery['postcode'], 'city' => $order->delivery['city'], 'country' => $order->delivery['country']['iso_code_2'], 'email' => $customer['customers_email_address'], 'phone' => $customer['customers_telephone']), 'product' => 'invoice', 'url_return' => xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'), 'url_cancel' => xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'), 'url_image' => $url_image, 'articleList' => $article);
}
if (!empty($customer['customers_dob']) && $customer['customers_dob'] != '0000-00-00') $params['customer']['dateOfBirth'] = $customer['customers_dob'];
$response = $bs->callMethod('prepareOrder', $params);
if ($response->ack == 'OK') {
if (MODULE_PAYMENT_BILLSAFE_2_LAYER == 'True') {
$bs->callPaymentLayer($response->token);
$this->response = $bs->callMethod('prepareOrder', $params);
if ($this->response->ack === 'OK') {
if (MODULE_PAYMENT_BILLSAFE_2_LAYER === 'True') {
$bs->callPaymentLayer($this->response->token);
} else {
$bs->redirectToPaymentGateway($response->token);
$bs->redirectToPaymentGateway($this->response->token);
}
} else {
$message = $this->get_error_message($response);
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error_message='.stripslashes(urlencode(html_entity_decode($message))), 'SSL'));
ca. Zeile 462
$bs->setUtf8Mode(false);
} else {
$bs->setUtf8Mode(true);
}
if (MODULE_PAYMENT_BILLSAFE_2_SERVER == 'Live') {
if (MODULE_PAYMENT_BILLSAFE_2_SERVER === 'Live') {
$bs->setMode("LIVE");
} else {
$bs->setMode("SANDBOX");
}
ca. Zeile 476
$_SESSION['billsafe_status'] = 'declined';
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error_message='.stripslashes(urlencode(html_entity_decode(MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_COMMON))), 'SSL'));
}
}
}
return true;
}
function after_process() {
ca. Zeile 491
unset ($_SESSION['schg_value']);
unset ($_SESSION['schg_name']);
unset ($_SESSION['lofee_value']);
unset ($_SESSION['lofee_name']);
unset ($_SESSION['dob']);
$token = $_GET['token'];
if ($this->response->ack == 'OK' && $this->response->status == 'ACCEPTED') {
if ($this->response->ack === 'OK' && $this->response->status === 'ACCEPTED') {
if ($this->order_status) xtc_db_query('UPDATE '.TABLE_ORDERS.' SET orders_status = "'.xtc_db_input($this->order_status).'" WHERE orders_id = "'.xtc_db_input($insert_id).'"');
$customer = $this->response->customer;
xtc_db_query('INSERT INTO billsafe_orders_2 (id, orderid, transactionid, token, billsafeStatus, type, paymentStatus,date) VALUES (NULL,"'.xtc_db_input($insert_id).'", "'.xtc_db_input($this->response->transactionId).'", "'.$token.'", "'.xtc_db_input($this->response->status).'", "invoice", NULL, "'.date('Y-m-d H:i:s').'")');
$resultQuery = xtc_db_query('SELECT id FROM billsafe_orders_2 WHERE transactionId = "'.xtc_db_input($this->response->transactionId).'"');
ca. Zeile 505
$bs->setUtf8Mode(false);
} else {
$bs->setUtf8Mode(true);
}
if (MODULE_PAYMENT_BILLSAFE_2_SERVER == 'Live') {
if (MODULE_PAYMENT_BILLSAFE_2_SERVER === 'Live') {
$bs->setMode("LIVE");
} else {
$bs->setMode("SANDBOX");
}
ca. Zeile 522
xtc_db_query ('INSERT INTO billsafe_orders_details_2 (ordernumber, product_id, articletype, articlenumber, articlename, articleprice, articletax, bsorders_id) values("'.xtc_db_input($insert_id).'", "'.xtc_db_input($order->products[$i]['id']).'", "'.xtc_db_input($article[$i]->type).'", "'.xtc_db_input($article[$i]->number).'", "'.xtc_db_input($article[$i]->name).'", "'.xtc_db_input($article[$i]->grossPrice).'", "'.xtc_db_input($article[$i]->tax).'", "'.xtc_db_input($result['id']).'")');
}
}
$comments = MODULE_PAYMENT_BILLSAFE_2_STATUS_TEXT.': '.$this->response->status.'; '.MODULE_PAYMENT_BILLSAFE_2_TRANSACTIONID.': '.$this->response->transactionId;
xtc_db_query ('INSERT INTO orders_status_history (orders_status_history_id, orders_id, orders_status_id, date_added, customer_notified, comments) VALUES (NULL, "'.xtc_db_input($insert_id).'", "1", "'.date('Y-m-d H:i:s').'", "0", "'.xtc_db_input($comments).'")');
xtc_db_query ('INSERT INTO orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) VALUES ("'.xtc_db_input($insert_id).'", "1", "'.date('Y-m-d H:i:s').'", "0", "'.xtc_db_input($comments).'")');
$params = array('transactionId' => xtc_db_input($this->response->transactionId), 'orderNumber' => xtc_db_input($insert_id));
$response = $bs->callMethod('setOrderNumber', $params);
if ($response->ack == 'OK') {
if ($response->ack === 'OK') {
} else {
}
$response = $bs->callMethod('getPaymentInstruction', $params);
if ($response->ack === 'OK') {
$pins = $response->instruction;
xtc_db_query('INSERT INTO billsafe_payinstructs_2 (bsorders_id, order_id, bankCode, accountNumber, recipient, bankName, bic, iban, reference, amount, currencyCode, shopUrl, paymentPeriod, note, legalNote) values("'.xtc_db_input($result['id']).'", "'.xtc_db_input($insert_id).'", "'.$pins->bankCode.'", "'.$pins->accountNumber.'", "'.$pins->recipient.'", "'.$pins->bankName.'", "'.$pins->bic.'", "'.$pins->iban.'", "'.$pins->reference.'", "'.$pins->amount.'", "'.$pins->currencyCode.'", "'.$pins->shopUrl.'", "'.$pins->paymentPeriod.'", "'.$pins->note.'", "'.$pins->legalNote.'")');
} else {
}
} else {
$_SESSION['billsafe_status'] = 'declined';
ca. Zeile 554
if (xtc_db_num_rows($check_query) == 0) {
xtc_db_query('CREATE TABLE billsafe_orders_2 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, orderid VARCHAR(255) NOT NULL, transactionid VARCHAR(255) NOT NULL, billsafeStatus VARCHAR(255) NOT NULL, type VARCHAR(64) NOT NULL, token VARCHAR(255) NOT NULL, date TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, paymentStatus VARCHAR(255) NULL DEFAULT NULL) ENGINE = MYISAM;');
} elseif (xtc_db_num_rows($check_query) != 0) {
$check_query = xtc_db_query('SHOW COLUMNS FROM billsafe_orders_2 like "type"');
if (xtc_db_num_rows($check_query) == 0) {
xtc_db_query('ALTER TABLE billsafe_orders_2 ADD type VARCHAR(64) NOT NULL AFTER billsafeStatus');
}
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('ALTER TABLE billsafe_orders_2 ADD type VARCHAR(64) NOT NULL AFTER billsafeStatus');
}
$check_query = xtc_db_query('SHOW TABLES LIKE "billsafe_orders_details_2"');
if (xtc_db_num_rows($check_query) == 0) {
xtc_db_query('CREATE TABLE billsafe_orders_details_2 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, ordernumber VARCHAR(255) NOT NULL, product_id VARCHAR(255) NOT NULL, articletype VARCHAR(64) NOT NULL, articlenumber VARCHAR(255) NOT NULL, articlename VARCHAR(255) NOT NULL, articleprice VARCHAR(64) NOT NULL, articletax VARCHAR(64) NOT NULL, bsorders_id INT NOT NULL, shipped INT NOT NULL DEFAULT "0", storno INT NOT NULL DEFAULT "0", retoure INT NOT NULL DEFAULT "0", pause INT NOT NULL DEFAULT "0") ENGINE = MYISAM;');
ca. Zeile 584
if (xtc_db_num_rows($check_query) == 0) {
xtc_db_query('CREATE TABLE billsafe_orders_user_2 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, bsorders_id INT NOT NULL, gender VARCHAR(255) NOT NULL, company VARCHAR(255) NOT NULL, firstname VARCHAR(255) NOT NULL, lastname VARCHAR(255) NOT NULL, street VARCHAR(255) NOT NULL, housenumber VARCHAR(255) NOT NULL, postcode VARCHAR(255) NOT NULL, city VARCHAR(255) NOT NULL, country VARCHAR(255) NOT NULL, dateofbirth VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, phone VARCHAR(255) NOT NULL) ENGINE = MYISAM;');
} elseif (xtc_db_num_rows($check_query) != 0) {
$check_query = xtc_db_query('SHOW COLUMNS FROM billsafe_orders_user_2 like "company"');
if (xtc_db_num_rows($check_query) == 0) {
xtc_db_query('ALTER TABLE billsafe_orders_user_2 ADD company VARCHAR(255) NOT NULL AFTER gender');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('ALTER TABLE billsafe_orders_user_2 ADD company VARCHAR(255) NOT NULL AFTER gender');
}
$check_query = xtc_db_query('SHOW TABLES LIKE "billsafe_payinstructs_2"');
if (xtc_db_num_rows($check_query) == 0) {
xtc_db_query('CREATE TABLE billsafe_payinstructs_2 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, bsorders_id INT NOT NULL, order_id INT NOT NULL, bankCode INT(64), accountNumber INT(64), recipient VARCHAR(255) NOT NULL, bankName VARCHAR(255) NOT NULL, bic VARCHAR(64) NOT NULL, iban VARCHAR(64) NOT NULL, reference VARCHAR(64) NOT NULL, amount DECIMAL(15,4) NOT NULL, currencyCode VARCHAR(3) NOT NULL, shopUrl VARCHAR(255) NOT NULL, paymentPeriod INT(2) NOT NULL, note VARCHAR(255) NOT NULL, legalNote VARCHAR(512) NOT NULL, date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP) ENGINE = MYISAM;');
}
$check_query = xtc_db_query('SHOW COLUMNS FROM admin_access like "billsafe_orders_2"');
if (xtc_db_num_rows($check_query) == 0) {
xtc_db_query('ALTER TABLE admin_access ADD billsafe_orders_2 INT(1) NOT NULL DEFAULT "0"');
ca. Zeile 599
xtc_db_query('ALTER TABLE admin_access ADD billsafe_print_order_2 INT(1) NOT NULL DEFAULT "0"');
xtc_db_query('UPDATE admin_access SET billsafe_print_order_2 = "1" WHERE customers_id = "1" OR customers_id = "groups"');
}
$logo_url = HTTPS_CATALOG_SERVER.DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/img/top_logo.jpg';
// BOF - Changed to white label solution
/*
$billsafe_logo = 'https://images.billsafe.de/image/image/id/2120806d6053';
*/
// EOF - Changed to white label solution
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_STATUS"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_STATUS", "False", "6", "1", "xtc_cfg_select_option(array(\'True\', \'False\'), ", now())');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_STATUS", "True", "6", "1", "xtc_cfg_select_option(array(\'True\', \'False\'), ", now())');
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_INLINE"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_INLINE", "False", "6", "1", "xtc_cfg_select_option(array(\'True\', \'False\'), ", now())');
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_LAYER"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_LAYER", "True", "6", "1", "xtc_cfg_select_option(array(\'True\', \'False\'), ", now())');
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_LOG"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_LOG", "False", "6", "1", "xtc_cfg_select_option(array(\'True\', \'False\'), ", now())');
ca. Zeile 614
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_MERCHANT_ID"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_MERCHANT_ID", "", "6", "0", now())');
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE", "", "6", "0", now())');
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_PKEY"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_PKEY", "", "6", "0", now())');
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_MIN_ORDER"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_MIN_ORDER", "0", "6", "0", now())');
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_MAX_ORDER"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_MAX_ORDER", "500", "6", "0", now())');
ca. Zeile 624
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_SCHGTAX"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_SCHGTAX", "1", "6", "0", "xtc_get_tax_class_title", "xtc_cfg_pull_down_tax_classes(", now())');
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_SHOP_LOGO_URL"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_SHOP_LOGO_URL", "'.$logo_url.'", "6", "0", now())');
// BOF - Changed to white label solution
/*
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_BILLSAFE_LOGO_URL"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_BILLSAFE_LOGO_URL", "'.$billsafe_logo.'", "6", "0", now())');
*/
// EOF - Changed to white label solution
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_SERVER"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_SERVER", "Sandbox", "6", "1", "xtc_cfg_select_option(array(\'Live\', \'Sandbox\'), ", now())');
$check_query = xtc_db_query('SHOW COLUMNS FROM '.TABLE_CONFIGURATION.' like "MODULE_PAYMENT_BILLSAFE_2_ZONE"');
if (xtc_db_num_rows($check_query) == 0) xtc_db_query('INSERT INTO '.TABLE_CONFIGURATION.' (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ("MODULE_PAYMENT_BILLSAFE_2_ZONE", "0", "6", "2", "xtc_get_zone_class_title", "xtc_cfg_pull_down_zone_classes(", now())');
ca. Zeile 643
xtc_db_query('DELETE FROM '.TABLE_CONFIGURATION.' WHERE configuration_key in ("'.implode('", "', $this->keys()).'")');
}
function keys() {
return array('MODULE_PAYMENT_BILLSAFE_2_STATUS', 'MODULE_PAYMENT_BILLSAFE_2_LAYER', 'MODULE_PAYMENT_BILLSAFE_2_LOG', 'MODULE_PAYMENT_BILLSAFE_2_LOG_TYPE', 'MODULE_PAYMENT_BILLSAFE_2_LOG_ADDR', 'MODULE_PAYMENT_BILLSAFE_2_MERCHANT_ID', 'MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE', 'MODULE_PAYMENT_BILLSAFE_2_MIN_ORDER', 'MODULE_PAYMENT_BILLSAFE_2_MAX_ORDER', 'MODULE_PAYMENT_BILLSAFE_2_SCHG', 'MODULE_PAYMENT_BILLSAFE_2_SCHGTAX', 'MODULE_PAYMENT_BILLSAFE_2_SHOP_LOGO_URL', 'MODULE_PAYMENT_BILLSAFE_2_BILLSAFE_LOGO_URL', 'MODULE_PAYMENT_BILLSAFE_2_SERVER', 'MODULE_PAYMENT_BILLSAFE_2_ZONE', 'MODULE_PAYMENT_BILLSAFE_2_ORDER_STATUS_ID', 'MODULE_PAYMENT_BILLSAFE_2_SORT_ORDER', 'MODULE_PAYMENT_BILLSAFE_2_ALLOWED');
// BOF - Changed to white label solution
/*
return array('MODULE_PAYMENT_BILLSAFE_2_STATUS', 'MODULE_PAYMENT_BILLSAFE_2_INLINE', 'MODULE_PAYMENT_BILLSAFE_2_LAYER', 'MODULE_PAYMENT_BILLSAFE_2_LOG', 'MODULE_PAYMENT_BILLSAFE_2_LOG_TYPE', 'MODULE_PAYMENT_BILLSAFE_2_LOG_ADDR', 'MODULE_PAYMENT_BILLSAFE_2_MERCHANT_ID', 'MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE', 'MODULE_PAYMENT_BILLSAFE_2_PKEY', 'MODULE_PAYMENT_BILLSAFE_2_MIN_ORDER', 'MODULE_PAYMENT_BILLSAFE_2_MAX_ORDER', 'MODULE_PAYMENT_BILLSAFE_2_SCHG', 'MODULE_PAYMENT_BILLSAFE_2_SCHGTAX', 'MODULE_PAYMENT_BILLSAFE_2_SHOP_LOGO_URL', 'MODULE_PAYMENT_BILLSAFE_2_BILLSAFE_LOGO_URL', 'MODULE_PAYMENT_BILLSAFE_2_SERVER', 'MODULE_PAYMENT_BILLSAFE_2_ZONE', 'MODULE_PAYMENT_BILLSAFE_2_ORDER_STATUS_ID', 'MODULE_PAYMENT_BILLSAFE_2_SORT_ORDER', 'MODULE_PAYMENT_BILLSAFE_2_ALLOWED');
*/
return array('MODULE_PAYMENT_BILLSAFE_2_STATUS', 'MODULE_PAYMENT_BILLSAFE_2_INLINE', 'MODULE_PAYMENT_BILLSAFE_2_LAYER', 'MODULE_PAYMENT_BILLSAFE_2_LOG', 'MODULE_PAYMENT_BILLSAFE_2_LOG_TYPE', 'MODULE_PAYMENT_BILLSAFE_2_LOG_ADDR', 'MODULE_PAYMENT_BILLSAFE_2_MERCHANT_ID', 'MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE', 'MODULE_PAYMENT_BILLSAFE_2_PKEY', 'MODULE_PAYMENT_BILLSAFE_2_MIN_ORDER', 'MODULE_PAYMENT_BILLSAFE_2_MAX_ORDER', 'MODULE_PAYMENT_BILLSAFE_2_SCHG', 'MODULE_PAYMENT_BILLSAFE_2_SCHGTAX', 'MODULE_PAYMENT_BILLSAFE_2_SHOP_LOGO_URL', 'MODULE_PAYMENT_BILLSAFE_2_SERVER', 'MODULE_PAYMENT_BILLSAFE_2_ZONE', 'MODULE_PAYMENT_BILLSAFE_2_ORDER_STATUS_ID', 'MODULE_PAYMENT_BILLSAFE_2_SORT_ORDER', 'MODULE_PAYMENT_BILLSAFE_2_ALLOWED');
// EOF - Changed to white label solution
}
public function checkLogoURL($logoURL) {
if ($logoURL != '' && strpos($logoURL, 'https://') === 0) {
ca. Zeile 654
return '';
}
}
// BOF - Changed to white label solution
/*
public function checkBillSAFELogoURL($logoURL) {
if ($logoURL != '' ) {
if (ENABLE_SSL == true) {
if (strpos($logoURL, 'https://') === 0) {
ca. Zeile 669
} else {
return 'https://images.billsafe.de/image/image/id/04105000caae';
}
}
*/
// EOF - Changed to white label solution
function get_shipping_tax_rate($shipping_id) {
$check_query = xtc_db_query('SELECT configuration_value FROM '.TABLE_CONFIGURATION.' WHERE configuration_key = "MODULE_SHIPPING_'.$shipping_id.'_TAX_CLASS"');
$configuration = xtc_db_fetch_array($check_query);
ca. Zeile 679
return $shipping_tax_rate;
}
function get_error_message($response) {
if ($response->errorList) {
foreach ($response->errorList as $error) {
switch($error->code) {
case '101':
$message .= MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_101;
ca. Zeile 698
$message .= MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_COMMON;
break;
}
}
} elseif ($response->declineReason) {
switch($response->declineReason->code) {
case '101':
$message .= MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_101;
break;
case '102':
$message .= MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_102;
break;
case '215':
$message .= MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_215;
break;
case '216':
$message .= MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_216;
break;
default:
$message .= MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_COMMON;
break;
}
}
return $message;
}
}
includes/modules/payment/klarna/api/gui/activate_part.phpTop ca. Zeile 1
<?php
include("klarna.php");
include("klarna_settings.php");;
include("klarna_settings.php");
$artnoList =
array(mk_artno(intval($_GET["qty0"]), $_GET["artno0"]),
mk_artno(intval($_GET["qty1"]), $_GET["artno1"]),
includes/modules/payment/klarna/api/gui/email_invoice.phpTop ca. Zeile 1
<?php
include("klarna.php");
include("klarna_settings.php");;
include("klarna_settings.php");
$invno = $_POST["invno"];
$status = email_invoice($eid, $invno, $secret, $result);
includes/modules/payment/klarna/api/gui/split_reservation.phpTop ca. Zeile 1
<?php
include("klarna.php");
include("klarna_settings.php");;
include("klarna_settings.php");
$rno = $_POST["rno"];
$amount = $_POST["amount"];
$orderid1 = $_POST["orderid1"];
includes/modules/payment/payone_cc.phpTop ca. Zeile 16
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require_once (DIR_FS_EXTERNAL.'/payone/classes/PayonePayment.php');
require_once (DIR_FS_EXTERNAL.'payone/classes/PayonePayment.php');
class payone_cc extends PayonePayment {
var $payone_genre = 'creditcard';
ca. Zeile 26
$this->code = 'payone_cc';
parent::PayonePayment();
$this->tmpOrders = '';
$this->form_action_url = $this->payone->getFormActionURL();
$this->form_action_url = xtc_href_link(FILENAME_CHECKOUT_PROCESS, 'payone_cc=true', 'SSL');
}
function selection() {
$selection = parent::selection();
return $selection;
}
function before_process() {
if (isset($_GET['pseudocardpan'])) {
$_SESSION[$this->code]['pseudocardpan'] = $_GET['pseudocardpan'];
}
if (isset($_GET['truncatedcardpan'])) {
$_SESSION[$this->code]['truncatedcardpan'] = $_GET['truncatedcardpan'];
}
}
function _paymentDataFormProcess($active_genre_identifier) {
$payment_smarty = new Smarty();
$payment_smarty->template_dir = DIR_FS_EXTERNAL.'payone/templates/';
$error = parent::get_error();
if ($error != '') {
$payment_smarty->assign('error', $error['error']);
}
$genre_config = $this->config[$active_genre_identifier];
$payment_smarty->assign('genre_specific', $genre_config['genre_specific']);
$standard_parameters = parent::_standard_parameters('creditcardcheck');
$standard_parameters['responsetype'] = 'REDIRECT';
$standard_parameters['responsetype'] = 'JSON';
$standard_parameters['storecarddata'] = 'yes';
$standard_parameters['encoding'] = 'UTF-8';
$standard_parameters['successurl'] = ((ENABLE_SSL == true) ? HTTPS_SERVER : HTTP_SERVER).DIR_WS_CATALOG.FILENAME_CHECKOUT_PROCESS.'?'.xtc_session_name().'='.xtc_session_id();
$standard_parameters['errorurl'] = ((ENABLE_SSL == true) ? HTTPS_SERVER : HTTP_SERVER).DIR_WS_CATALOG.FILENAME_CHECKOUT_CONFIRMATION.'?'.xtc_session_name().'='.xtc_session_id().'&conditions=true&payment_error='.$this->code;
$standard_parameters['hash'] = $this->payone->computeHash($standard_parameters, $this->global_config['key']);
// not in hash but needed as hidden field
$cctypes_short = array();
$cctypes = $this->payone->getTypesForGenre($active_genre_identifier);
for ($i=0, $n=count($cctypes); $i<$n; $i++) {
if ($cctypes[$i]['typekey'] == $_SESSION[$this->code]['cardtype']) {
$standard_parameters['cardtype'] = $cctypes[$i]['shorttype'];
break;
}
foreach ($cctypes as $data) {
$cctypes_short[] = $data['shorttype'];
}
$ccexpires_years = array();
for($y = 0, $base = date('y'); $y < 10; $y++) {
$ccexpires_years[] = $base + $y;
$cc_javascript = '
<script type="text/javascript">
var request, config;
config = {
fields: {
cardtype: {
selector: "cardtype",
cardtypes: ["'.implode('","', $cctypes_short).'"]
},
cardpan: {
selector: "cardpan",
type: "text"
},
cardcvc2: {
selector: "cardcvc2",
type: "password",
size: "4",
maxlength: "4"
},
cardexpiremonth: {
selector: "cardexpiremonth",
type: "select",
size: "2",
maxlength: "2",
iframe: {
width: "50px"
}
},
cardexpireyear: {
selector: "cardexpireyear",
type: "select",
iframe: {
width: "80px"
}
}
},
defaultStyle: {
input: "font-size: 13px;background-color: #FAFAFA;border-color: #C6C6C6 #DADADA #EAEAEA;color: #999;border-style: solid;border-width: 1px;vertical-align: middle;padding: 6px 5px;border-radius: 2px;box-sizing: border-box;width: 100%;height: 32px;",
select: "font-size: 13px;background-color: #FAFAFA;border-color: #C6C6C6 #DADADA #EAEAEA;color: #999;border-style: solid;border-width: 1px;vertical-align: middle;padding: 6px 4px 6px 2px;border-radius: 2px;box-sizing: border-box;width: 100%;",
iframe: {
height: "32px",
width: "100%"
}
},
error: "errorOutput",
language: Payone.ClientApi.Language.'.$standard_parameters['language'].'
};
request = {
request: \''.$standard_parameters['request'].'\',
responsetype: \''.$standard_parameters['responsetype'].'\',
mode: \''.$standard_parameters['mode'].'\',
mid: \''.$standard_parameters['mid'].'\',
aid: \''.$standard_parameters['aid'].'\',
portalid: \''.$standard_parameters['portalid'].'\',
encoding: \''.$standard_parameters['encoding'].'\',
storecarddata: \''.$standard_parameters['storecarddata'].'\',
hash: \''.$standard_parameters['hash'].'\'
};
var iframes = new Payone.ClientApi.HostedIFrames(config, request);
document.getElementById(\'cardtype\').onchange = function () {
iframes.setCardType(this.value);
};
function payoneCheck() {
if (iframes.isComplete()) {
iframes.creditCardCheck(\'checkCallback\');
} else {
document.getElementById(\'errorOutput\').innerHTML = \''.TEXT_CHECK_DATA.'\';
}
$payment_smarty->assign('ccexpires_years', $ccexpires_years);
$ccexpires_months = array();
for($m = 1; $m <= 12; $m++) {
$ccexpires_months[] = sprintf('%02d', $m);
return false;
}
$payment_smarty->assign('ccexpires_months', $ccexpires_months);
$hidden = array();
foreach($standard_parameters as $key => $value) {
$hidden[] = xtc_draw_hidden_field($key, $value);
function checkCallback(response) {
if (response.status === "VALID") {
document.getElementById("pseudocardpan").value = response.pseudocardpan;
document.getElementById("truncatedcardpan").value = response.truncatedcardpan;
document.checkout_confirmation.submit();
}
$payment_smarty->assign('hidden', implode("\n", $hidden)."\n");
$payment_smarty->assign('payonecss', DIR_WS_EXTERNAL.'payone/css/payone.css');
$payment_smarty->caching = 0;
$module_form = $payment_smarty->fetch('checkout_payone_cc_form.html');
return $module_form;
return false;
}
</script>';
function _paymentDataForm($active_genre_identifier) {
$payment_smarty = new Smarty();
$payment_smarty->template_dir = DIR_FS_EXTERNAL.'payone/templates/';
$genre_config = $this->config[$active_genre_identifier];
$payment_smarty->assign('genre_config', $genre_config['types']);
$payment_smarty->assign('code', $this->code);
$payment_smarty->assign('cc_javascript', $cc_javascript);
$payment_smarty->assign('payonecss', DIR_WS_EXTERNAL.'payone/css/payone.css');
$payment_smarty->caching = 0;
$module_form = $payment_smarty->fetch('checkout_payone_type_selection.html');
$module_form = $payment_smarty->fetch('checkout_payone_cc_form.html');
$return = array(
array('title' => '',
'field' => $module_form),
);
return $return;
return $module_form;
}
function pre_confirmation_check() {
parent::pre_confirmation_check();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$_SESSION[$this->code]['cardtype'] = $_POST[$this->code.'_type'];
}
}
function confirmation() {
$genre_identifier = $this->_getActiveGenreIdentifier();
$cctypes = $this->payone->getTypesForGenre($genre_identifier);
for ($i=0, $n=count($cctypes); $i<$n; $i++) {
if ($cctypes[$i]['typekey'] == $_SESSION[$this->code]['cardtype']) {
$type = $cctypes[$i]['typename'];
}
}
$confirmation = array('title' => constant('MODULE_PAYMENT_'.strtoupper($this->code).'_TEXT_TITLE'),
'fields' => array(array('title' => '',
'field' => constant($type),
)));
return $confirmation;
parent::confirmation();
}
function process_button() {
$active_genre = $this->_getActiveGenreIdentifier();
ca. Zeile 149
return $this->_paymentDataFormProcess($active_genre);
}
function after_process() {
global $order, $insert_id;
function before_process() {
if (isset($_POST['pseudocardpan'])) {
$_SESSION[$this->code]['pseudocardpan'] = $_POST['pseudocardpan'];
}
if (isset($_POST['truncatedcardpan'])) {
$_SESSION[$this->code]['truncatedcardpan'] = $_POST['truncatedcardpan'];
}
if (isset($_GET['payone_cc']) && $_GET['payone_cc'] == 'true') {
$this->tmpOrders = $this->config['orders_status']['tmp'];
}
}
function payment_action() {
global $order, $insert_id, $tmp;
if (!isset($insert_id) || $insert_id == '') {
$insert_id = $_SESSION['tmp_oID'];
}
ca. Zeile 182
$this->builder = new Payone_Builder($this->payone->getPayoneConfig());
parent::_build_service_authentification('cc');
parent::_parse_response_payone_api();
$tmp = false;
}
}
function after_process() {
global $order, $insert_id;
parent::after_process();
unset($_SESSION[$this->code]);
}
includes/modules/payment/payone_cod.phpTop ca. Zeile 16
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require_once (DIR_FS_EXTERNAL.'/payone/classes/PayonePayment.php');
require_once (DIR_FS_EXTERNAL.'payone/classes/PayonePayment.php');
class payone_cod extends PayonePayment {
var $payone_genre = 'accountbased';
includes/modules/payment/payone_elv.phpTop ca. Zeile 16
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require_once (DIR_FS_EXTERNAL.'/payone/classes/PayonePayment.php');
require_once (DIR_FS_EXTERNAL.'payone/classes/PayonePayment.php');
class payone_elv extends PayonePayment {
var $payone_genre = 'accountbased';
includes/modules/payment/payone_installment.phpTop ca. Zeile 16
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require_once (DIR_FS_EXTERNAL.'/payone/classes/PayonePayment.php');
require_once (DIR_FS_EXTERNAL.'payone/classes/PayonePayment.php');
class payone_installment extends PayonePayment {
var $payone_genre = 'installment';
includes/modules/payment/payone_invoice.phpTop ca. Zeile 16
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require_once (DIR_FS_EXTERNAL.'/payone/classes/PayonePayment.php');
require_once (DIR_FS_EXTERNAL.'payone/classes/PayonePayment.php');
class payone_invoice extends PayonePayment {
var $payone_genre = 'accountbased';
includes/modules/payment/payone_otrans.phpTop ca. Zeile 16
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require_once (DIR_FS_EXTERNAL.'/payone/classes/PayonePayment.php');
require_once (DIR_FS_EXTERNAL.'payone/classes/PayonePayment.php');
class payone_otrans extends PayonePayment {
var $payone_genre = 'onlinetransfer';
includes/modules/payment/payone_prepay.phpTop ca. Zeile 16
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require_once (DIR_FS_EXTERNAL.'/payone/classes/PayonePayment.php');
require_once (DIR_FS_EXTERNAL.'payone/classes/PayonePayment.php');
class payone_prepay extends PayonePayment {
var $payone_genre = 'accountbased';
includes/modules/payment/payone_wlt.phpTop ca. Zeile 16
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require_once (DIR_FS_EXTERNAL.'/payone/classes/PayonePayment.php');
require_once (DIR_FS_EXTERNAL.'payone/classes/PayonePayment.php');
class payone_wlt extends PayonePayment {
var $payone_genre = 'ewallet';
includes/modules/payment/shopgate.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
include_once DIR_FS_CATALOG.'includes/external/shopgate/base/includes/modules/payment/shopgate.php';
includes/modules/set_language_sessions.phpTop ca. Zeile 25
$_SESSION['languages_id'] = $lng->language['id'];
$_SESSION['language_charset'] = $lng->language['language_charset'];
$_SESSION['language_code'] = $lng->language['code'];
}
// set default charset
@ini_set('default_charset', $_SESSION['language_charset']);
includes/shipping_estimate.phpTop ca. Zeile 26
if (!defined('SHOW_ALWAYS_LANG_DROPDOWN')) {
}
if (!defined('DOWNLOAD_SHOW_LANG_DROPDOWN')) {
}
require_once (DIR_WS_CLASSES.'order.php');
require_once (DIR_FS_INC.'xtc_get_country_list.inc.php');
$order = new order();
ca. Zeile 66
$_SESSION['delivery_zone'] = $order->delivery['country']['iso_code_2'];
//suppot downloads and gifts
if ($order->content_type == 'virtual' || ($order->content_type == 'virtual_weight') || ($_SESSION['cart']->count_contents_virtual() == 0)) {
$shipping_content = array();
$shipping_content[] = array('NAME' => _SHIPPING_FREE);
$shipping_content = array(array('NAME' => _SHIPPING_FREE));
if (DOWNLOAD_SHOW_LANG_DROPDOWN == 'false') {
$module_smarty->clear_assign('SELECT_COUNTRY');
}
} else {
require (DIR_WS_CLASSES.'shipping.php');
$shipping = new shipping;
ca. Zeile 100
);
} else if ($free_shipping_freeamount) {
$shipping_content[] = array(
'NAME' => $quote['module'] . ' - ' . $quote['methods'][0]['title'],
'VALUE' => $xtPrice->xtcFormat(0, true, 0, true)
'VALUE' => $xtPrice->xtcFormat(0, true, 0, true),
'QUOTE' => $quote
);
} else {
if ($has_freeamount) {
$module_smarty->assign('FREE_SHIPPING_INFO', sprintf(FREE_SHIPPING_DESCRIPTION, $xtPrice->xtcFormat(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER, true, 0, true)));
}
$i = 0;
foreach ($quotes AS $quote) {
foreach ($quotes as $quote) {
if ($quote['id'] != 'freeamount') {
//BOC web28 Error Fix
if (!isset($quote['error']) || (isset($quote['error']) && trim($quote['error']) == '')) {
$quote['methods'][0]['cost'] = $xtPrice->xtcCalculateCurr($quote['methods'][0]['cost']);
$total += ((isset($quote['tax']) && $quote['tax'] > 0) ? $xtPrice->xtcAddTax($quote['methods'][0]['cost'],$quote['tax']) : (!empty($quote['methods'][0]['cost']) ? $quote['methods'][0]['cost'] : '0'));
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 || !isset($quote['tax'])) {
$quote['tax'] = 0;
}
$value = ((isset($quote['tax']) && $quote['tax'] > 0) ? $xtPrice->xtcAddTax($quote['methods'][0]['cost'],$quote['tax']) : (!empty($quote['methods'][0]['cost']) ? $quote['methods'][0]['cost'] : '0'));
$total += $value;
$shipping_content[$i] = array(
'NAME' => $quote['module'] . ' - ' . $quote['methods'][0]['title'],
'VALUE' => $xtPrice->xtcFormat(((isset($quote['tax']) && $quote['tax'] > 0) ? $xtPrice->xtcAddTax($quote['methods'][0]['cost'],$quote['tax']) : (!empty($quote['methods'][0]['cost']) ? $quote['methods'][0]['cost'] : '0')), true)
'VALUE' => $xtPrice->xtcFormat($value, true),
'QUOTE' => $quote
);
} else {
$shipping_content[$i] = array(
'NAME' => $quote['error'] . ' - ' . $quote['methods'][0]['title'],
'VALUE' => ''
'NAME' => $quote['module'] . ' - ' . $quote['error'],
'VALUE' => '',
'QUOTE' => $quote
);
}
//EOC web28 Error Fix
$i++;
includes/write_customers_status.phpTop ca. Zeile 1
<?php
/* -----------------------------------------------------------------------------------------
$Id: write_customers_status.php 1117 2005-07-25 21:02:11Z mz $
$Id: write_customers_status.php 9050 2015-11-17 07:55:54Z GTB $
XT-Commerce - community made shopping
http://www.xt-commerce.com
modified eCommerce Shopsoftware
http://www.modified-shop.org
Copyright (c) 2003 XT-Commerce
Copyright (c) 2009 - 2013 [www.modified-shop.org]
-----------------------------------------------------------------------------------------
based on:
(c) 2003 nextcommerce (write_customers_status.php,v 1.8 2003/08/1); www.nextcommerce.org
(c) 2006 xtCommerce (write_customers_status.php)
Released under the GNU General Public License
---------------------------------------------------------------------------------------
ca. Zeile 18
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
// include needed function
require_once(DIR_FS_INC.'set_customers_status_by_id.inc.php');
// write customers status in session
if (isset($_SESSION['customer_id'])) {
$customers_status_query_1 = xtc_db_query("SELECT customers_status FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '" . $_SESSION['customer_id'] . "'");
$customers_status_value_1 = xtc_db_fetch_array($customers_status_query_1);
$customer_status_query = xtc_db_query("SELECT customers_status
FROM " . TABLE_CUSTOMERS . "
WHERE customers_id = '" . (int)$_SESSION['customer_id'] . "'");
if (xtc_db_num_rows($customer_status_query) == 1) {
$customer_status = xtc_db_fetch_array($customer_status_query);
if ($customer_status['customers_status'] == '0' && !defined('RUN_MODE_ADMIN')) {
set_customers_status_by_id(DEFAULT_CUSTOMERS_STATUS_ID_ADMIN);
// additional
$_SESSION['customers_status']['customers_status_id'] = DEFAULT_CUSTOMERS_STATUS_ID_ADMIN;
$_SESSION['customers_status']['customers_status'] = $customer_status['customers_status'];
} else {
set_customers_status_by_id($customer_status['customers_status']);
$customers_status_query = xtc_db_query("SELECT
*
FROM
" . TABLE_CUSTOMERS_STATUS . "
WHERE
customers_status_id = '" . $customers_status_value_1['customers_status'] . "' AND language_id = '" . $_SESSION['languages_id'] . "'");
$customers_status_value = xtc_db_fetch_array($customers_status_query);
$_SESSION['customers_status'] = array();
$_SESSION['customers_status']= array(
'customers_status_id' => $customers_status_value_1['customers_status'],
'customers_status_name' => $customers_status_value['customers_status_name'],
'customers_status_image' => $customers_status_value['customers_status_image'],
'customers_status_public' => $customers_status_value['customers_status_public'],
'customers_status_min_order' => $customers_status_value['customers_status_min_order'],
'customers_status_max_order' => $customers_status_value['customers_status_max_order'],
'customers_status_discount' => $customers_status_value['customers_status_discount'],
'customers_status_ot_discount_flag' => $customers_status_value['customers_status_ot_discount_flag'],
'customers_status_ot_discount' => $customers_status_value['customers_status_ot_discount'],
'customers_status_graduated_prices' => $customers_status_value['customers_status_graduated_prices'],
'customers_status_show_price' => $customers_status_value['customers_status_show_price'],
'customers_status_show_price_tax' => $customers_status_value['customers_status_show_price_tax'],
'customers_status_add_tax_ot' => $customers_status_value['customers_status_add_tax_ot'],
'customers_status_payment_unallowed' => $customers_status_value['customers_status_payment_unallowed'],
'customers_status_shipping_unallowed' => $customers_status_value['customers_status_shipping_unallowed'],
'customers_status_discount_attributes' => $customers_status_value['customers_status_discount_attributes'],
'customers_fsk18' => $customers_status_value['customers_fsk18'],
'customers_fsk18_display' => $customers_status_value['customers_fsk18_display'],
'customers_status_write_reviews' => $customers_status_value['customers_status_write_reviews'],
'customers_status_read_reviews' => $customers_status_value['customers_status_read_reviews']
);
// additional
$_SESSION['customers_status']['customers_status_id'] = $customer_status['customers_status'];
$_SESSION['customers_status']['customers_status'] = $customer_status['customers_status'];
}
} else {
$customers_status_query = xtc_db_query("SELECT
*
FROM
" . TABLE_CUSTOMERS_STATUS . "
WHERE
customers_status_id = '" . DEFAULT_CUSTOMERS_STATUS_ID_GUEST . "' AND language_id = '" . $_SESSION['languages_id'] . "'");
$customers_status_value = xtc_db_fetch_array($customers_status_query);
$_SESSION['customers_status'] = array();
$_SESSION['customers_status']= array(
'customers_status_id' => DEFAULT_CUSTOMERS_STATUS_ID_GUEST,
'customers_status_name' => $customers_status_value['customers_status_name'],
'customers_status_image' => $customers_status_value['customers_status_image'],
'customers_status_discount' => $customers_status_value['customers_status_discount'],
'customers_status_public' => $customers_status_value['customers_status_public'],
'customers_status_min_order' => $customers_status_value['customers_status_min_order'],
'customers_status_max_order' => $customers_status_value['customers_status_max_order'],
'customers_status_ot_discount_flag' => $customers_status_value['customers_status_ot_discount_flag'],
'customers_status_ot_discount' => $customers_status_value['customers_status_ot_discount'],
'customers_status_graduated_prices' => $customers_status_value['customers_status_graduated_prices'],
'customers_status_show_price' => $customers_status_value['customers_status_show_price'],
'customers_status_show_price_tax' => $customers_status_value['customers_status_show_price_tax'],
'customers_status_add_tax_ot' => $customers_status_value['customers_status_add_tax_ot'],
'customers_status_payment_unallowed' => $customers_status_value['customers_status_payment_unallowed'],
'customers_status_shipping_unallowed' => $customers_status_value['customers_status_shipping_unallowed'],
'customers_status_discount_attributes' => $customers_status_value['customers_status_discount_attributes'],
'customers_fsk18' => $customers_status_value['customers_fsk18'],
'customers_fsk18_display' => $customers_status_value['customers_fsk18_display'],
'customers_status_write_reviews' => $customers_status_value['customers_status_write_reviews'],
'customers_status_read_reviews' => $customers_status_value['customers_status_read_reviews']
);
unset($_SESSION['customer_id']);
xtc_redirect(xtc_href_link(FILENAME_LOGOFF, '', 'SSL'));
}
} else {
set_customers_status_by_id(DEFAULT_CUSTOMERS_STATUS_ID_GUEST);
// additional
$_SESSION['customers_status']['customers_status_id'] = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
$_SESSION['customers_status']['customers_status'] = DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
}
?>
lang/english/admin/configuration.phpTop ca. Zeile 36
define('EMAIL_FROM_TITLE' , 'E-Mail From');
define('EMAIL_FROM_DESC' , 'The e-mail address used to send e-mails.');
define('STORE_COUNTRY_TITLE' , 'Country');
define('STORE_COUNTRY_DESC' , 'The country my store is located in <br /><br /><b>Note: Please remember to update the store district.</b>');
define('STORE_ZONE_TITLE' , 'District');
define('STORE_ZONE_DESC' , 'The district my store is located in.');
define('STORE_COUNTRY_DESC' , 'The country my store is located in <br /><br /><b>Note: Please remember to update the store state.</b>');
define('STORE_ZONE_TITLE' , 'State');
define('STORE_ZONE_DESC' , 'The state my store is located in.');
define('EXPECTED_PRODUCTS_SORT_TITLE' , 'Expected Products Sort Order');
define('EXPECTED_PRODUCTS_SORT_DESC' , 'This is the sort order used in the expected products box.');
define('EXPECTED_PRODUCTS_FIELD_TITLE' , 'Expexted Products Sort Field');
ca. Zeile 294
define('ACCOUNT_COMPANY_TITLE' , 'Company');
define('ACCOUNT_COMPANY_DESC' , 'Display company in customer account');
define('ACCOUNT_SUBURB_TITLE' , 'Suburb');
define('ACCOUNT_SUBURB_DESC' , 'Display suburb in customer account');
define('ACCOUNT_STATE_TITLE' , 'District');
define('ACCOUNT_STATE_DESC' , 'Display district in customer account');
define('ACCOUNT_STATE_TITLE' , 'State');
define('ACCOUNT_STATE_DESC' , 'Display state in customer account');
define('DEFAULT_CURRENCY_TITLE' , 'Default Currency');
define('DEFAULT_CURRENCY_DESC' , 'Currency to be used as default');
define('DEFAULT_LANGUAGE_TITLE' , 'Default Language');
ca. Zeile 773
define('TRACKING_GOOGLEANALYTICS_ACTIVE_DESC' , 'By activating this option, all page views will be submitted to Google Analytics for later evaluation. Before using this option, you need to register at <a href="http://www.google.com/analytics/" target="_blank"><b>Google Analytics</b></a> and create a new account.');
define('TRACKING_GOOGLEANALYTICS_ID_TITLE' , 'Google Analytics account number');
define('TRACKING_GOOGLEANALYTICS_ID_DESC' , 'Enter your Google Analytics account number in the format "UA-XXXXXXXX-X" which you received after successfully creating an account.');
define('TRACKING_PIWIK_ACTIVE_TITLE' , 'Activate PIWIK Web-Analytics tracking');
define('TRACKING_PIWIK_ACTIVE_DESC' , 'In order to use PIWIK at all, you have to download and install it to your webspace at first. See also <a href="http://http://de.piwik.org/" target="_blank"><b>PIWIK Web-Analytics</b></a>. In comparison to Google Analytics all data will be stored locally, i.e. you as show owner have complete control over all data.');
define('TRACKING_PIWIK_ACTIVE_DESC' , 'In order to use PIWIK at all, you have to download and install it to your webspace at first. See also <a href="http://de.piwik.org/" target="_blank"><b>PIWIK Web-Analytics</b></a>. In comparison to Google Analytics all data will be stored locally, i.e. you as show owner have complete control over all data.');
define('TRACKING_PIWIK_LOCAL_PATH_TITLE' , 'PIWIK install path (without "http://")');
define('TRACKING_PIWIK_LOCAL_PATH_DESC' , 'Enter the path when PIWIK was installed successfully. The complete path of the domain has to be given, but without "http://", e.g. "www.domain.de/piwik".');
define('TRACKING_PIWIK_ID_TITLE' , 'PIWIK page ID');
define('TRACKING_PIWIK_ID_DESC' , 'In the PIWIK administration a page ID will be created per domain (usually "1")');
lang/english/admin/english.phpTop ca. Zeile 167
define('BOX_HAENDLERBUND','Händlerbund AGB Service'); // Tomcraft - 2012-12-08 - Added haendlerbund AGB interface
define('BOX_SAFETERMS','Safeterms - AGB Service'); // Tomcraft - 2013-06-21 - Safeterms AGB interface
define('BOX_EASYMARKETING','EASYMARKETING AG'); // Tomcraft - 2013-08-29 - Added easymarketing
define('BOX_IT_RECHT_KANZLEI', 'IT Recht Kanzlei');
define('BOX_PROTECTEDSHOPS', 'Protected Shops - AGB Service');
define('BOX_SHIPCLOUD', 'shipcloud');
define('BOX_SHIPCLOUD_PICKUP', 'shipcloud - pickup');
define('TXT_GROUPS','<b>Groups</b>:');
define('TXT_SYSTEM','System');
define('TXT_CUSTOMERS','Customers/Orders');
ca. Zeile 204
define('JS_EMAIL_ADDRESS', '* The \'E-Mail Address\' entry must have at least ' . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . ' characters.\n');
define('JS_ADDRESS', '* The \'Street Address\' entry must have at least ' . ENTRY_STREET_ADDRESS_MIN_LENGTH . ' characters.\n');
define('JS_POST_CODE', '* The \'Postcode\' entry must have at least ' . ENTRY_POSTCODE_MIN_LENGTH . ' characters.\n');
define('JS_CITY', '* The \'City\' entry must have at least ' . ENTRY_CITY_MIN_LENGTH . ' characters.\n');
define('JS_STATE', '* The \'District\' entry must be selected.\n');
define('JS_STATE', '* The \'State\' entry must be selected.\n');
define('JS_STATE_SELECT', '-- Select above --');
define('JS_ZONE', '* The \'District\' entry must be selected from the list for this country.');
define('JS_ZONE', '* The \'State\' entry must be selected from the list for this country.');
define('JS_COUNTRY', '* The \'Country\' value must be chosen.\n');
define('JS_TELEPHONE', '* The \'Telephone Number\' entry must have at least ' . ENTRY_TELEPHONE_MIN_LENGTH . ' characters.\n');
define('JS_PASSWORD', '* The \'Password\' and \'Confirmation\' entries must match and have at least ' . ENTRY_PASSWORD_MIN_LENGTH . ' characters.\n');
ca. Zeile 498
define ('CONFIG_MAX_VALUE_WARNING', '"% s" WARNING:% s input was ignored [maximum:% s]');
define ('CONFIG_MIN_VALUE_WARNING', '"% s" WARNING:% s input was ignored [Minimum:% s]');
define ('WHOS_ONLINE_TIME_LAST_CLICK_INFO', 'Display period in seconds:% s After this time, the entries will be deleted.');
define('BOX_PARCEL_CARRIERS', 'Parcel carriers');
define('TEXT_DISPLAY_NUMBER_OF_CARRIERS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> carriers)');
define('CFG_TXT_PRICE', 'Price');
define('CHECK_LABEL_PRICE', 'Check price');
lang/english/admin/orders.phpTop ca. Zeile 145
define('TEXT_SHIPPING_TO', 'Shipping to');
define('TEXT_SHIPPING_LANG', 'Language');
define('TABLE_HEADING_COMMENTS_SENT', 'Comment is sent');
define('TABLE_HEADING_TRACK_TRACE', 'Track & Trace:');
define('TABLE_HEADING_CARRIER', 'Shipping');
define('TABLE_HEADING_PARCEL_LINK', 'Trackinglink');
define('DOWNLOAD_LABEL', 'Download Label');
define('CREATE_LABEL', 'Create Label');
define('TEXT_DELETE_LABEL', 'shipcloud Labels can not be deleted.');
define('TEXT_LABEL_CREATED', 'Label created.');
define('TEXT_CARRIER_ERROR', 'Carrier not activated in your shipcloud account or invalid API key.');
define('TEXT_CARRIER_PLACEHOLDER', 'description (optional)');
?>
lang/english/admin/orders_edit.phpTop ca. Zeile 20
define('TABLE_HEADING', 'Edit Order');
define('TABLE_HEADING_ORDER', 'Order #: ');
define('TEXT_SAVE_ORDER', 'Finish Editing and Recalculate Order');
define('TEXT_EDIT_ADDRESS', 'Edit Address');
define('TEXT_EDIT_PRODUCTS', 'Edit Products');
define('TEXT_EDIT_SHIPPING', 'Edit Shipping Information');
define('TEXT_EDIT_GIFT', 'Add or Edit Gift Vouchers or Discount');
define('TEXT_EDIT_ADDRESS', 'Address and customer details');
define('TEXT_EDIT_PRODUCTS', 'Products, products options and prices');
define('TEXT_EDIT_OTHER', 'Shipping costs, payment methods, currencies, languages, totals, VAT, discounts, etc.');
define('TEXT_EDIT_GIFT', 'Gift Vouchers and discount');
define('TEXT_EDIT_ADDRESS_SUCCESS', 'Address Saved');
define('IMAGE_EDIT_ADDRESS', 'Edit Address');
define('IMAGE_EDIT_PRODUCTS', 'Edit Products');
ca. Zeile 46
define('TEXT_CUSTOMER_EMAIL', 'E-mail:');
define('TEXT_CUSTOMER_TELEPHONE', 'Phone:');
define('TEXT_CUSTOMER_UST', 'VAT Reg No:');
define('TEXT_CUSTOMER_CID', 'Customer ID:');
define('TEXT_ORDERS_ADDRESS_EDIT_INFO', 'Please note that the data you provide here will be changed only in the orders data and not in the customer account!');
define('TEXT_ORDERS_ADDRESS_EDIT_INFO', 'Please note that the data you provide here will only be changed in the orders data and not in the customer account!');
// Artikelbearbeitung
define('TEXT_SMALL_NETTO', '(net)');
ca. Zeile 86
// web28 2010-12-07 add new defines
define('TEXT_ADD_TAX','incl. ');
define('TEXT_NO_TAX','plus ');
define('TEXT_ORDERS_EDIT_INFO', '<b> Important Notes: </ b> <br>
Please check with the address/customer data, the right customer group choose <br>
When you change the customer group, all invoice items are newly save! <br>
Shippincosts must be changed manually! <br>
In this case, depending on the customer group the shippingcost entered gross or net! <br>
define('TEXT_ORDERS_EDIT_INFO', '<b>Important Notes:</b><br />
Please chose the right customer group with the address/customer data!<br />
When changing the customer group, every invoice item has to be newly saved!<br />
Shipping costs must be changed manually!<br />
In this case, shipping costs have to be entered gross or net depending on the customer group!<br />
');
define('TEXT_CUSTOMER_GROUP_INFO', ' <span style="background:#FFD6D6;padding:3px;border:solid 1px red;">When you change the customer group, all invoice items are newly save!</span>');
lang/english/english.phpTop ca. Zeile 123
define('ENTRY_POST_CODE_ERROR', 'Your postcode must consist of at least ' . ENTRY_POSTCODE_MIN_LENGTH . ' characters.');
define('ENTRY_POST_CODE_TEXT', '*');
define('ENTRY_CITY_ERROR', 'City must consist of at least ' . ENTRY_CITY_MIN_LENGTH . ' characters.');
define('ENTRY_CITY_TEXT', '*');
define('ENTRY_STATE_ERROR', 'Your district must consist of at least ' . ENTRY_STATE_MIN_LENGTH . ' characters.');
define('ENTRY_STATE_ERROR_SELECT', 'Please choose your district from the list.');
define('ENTRY_STATE_ERROR', 'Your state must consist of at least ' . ENTRY_STATE_MIN_LENGTH . ' characters.');
define('ENTRY_STATE_ERROR_SELECT', 'Please choose your state from the list.');
define('ENTRY_STATE_TEXT', '*');
define('ENTRY_COUNTRY_ERROR', 'Please choose your country.');
define('ENTRY_COUNTRY_TEXT', '*');
define('ENTRY_TELEPHONE_NUMBER_ERROR', 'Your phone number must consist of at least ' . ENTRY_TELEPHONE_MIN_LENGTH . ' characters.');
ca. Zeile 260
define('SUCCESS_ADDRESS_BOOK_ENTRY_DELETED', 'The selected entry has been deleted successfully.');
define('SUCCESS_ADDRESS_BOOK_ENTRY_UPDATED', 'Your address book has been updated sucessfully!');
define('WARNING_PRIMARY_ADDRESS_DELETION', 'The standard postal address can not be deleted. Please create another address and define it as standard postal address first. Then this entry can be deleted.');
define('ERROR_NONEXISTING_ADDRESS_BOOK_ENTRY', 'This address book entry is not available.');
define('ERROR_ADDRESS_BOOK_FULL', 'Your adressbook is full. In order to add new addresses, please erase previous ones first.');
define('ERROR_ADDRESS_BOOK_FULL', 'Your addressbook is full. In order to add new addresses, please erase previous ones first.');
define('ERROR_CHECKOUT_SHIPPING_NO_METHOD', 'No shipping method selected.');
define('ERROR_CHECKOUT_SHIPPING_NO_MODULE', 'No shipping method available.');
// conditions check
ca. Zeile 387
*
*/
define('TEXT_NEWSLETTER','You want to stay up to date?<br />No problem, receive our newsletter for the latest updates.');
define('TEXT_EMAIL_INPUT','Your e-mail adress has been registered in our system.<br />An e-mail with a confirmation link has been send out. Click the link in order to complete registration!');
define('TEXT_EMAIL_INPUT','Your e-mail address has been registered in our system.<br />An e-mail with a confirmation link has been sent out. Click the link to complete registration!');
define('TEXT_WRONG_CODE','<font color="#ff0000">The security code you entered was not correct. Please try again. <br />The form is not case sensitive.</font>');
define('TEXT_EMAIL_EXIST_NO_NEWSLETTER','<font color="#ff0000">This e-mail address is registered but not yet activated!</font>');
define('TEXT_EMAIL_EXIST_NEWSLETTER','<font color="#ff0000">This e-mail address is already registered for the newsletter!</font>');
ca. Zeile 521
define('GRADUATED_PRICE_MAX_VALUE', 'from');
//web28 - 2010-08-20 - VERSANDKOSTEN WARENKORB
define('_SHIPPING_TO', 'shipping to ');
define('_SHIPPING_FREE','Free Shipping');
// BOF - DokuMan - 2011-09-20 - E-Mail SQL errors
define('ERROR_SQL_DB_QUERY','We are sorry, but an database error has occurred somewhere on this page!');
define('ERROR_SQL_DB_QUERY_REDIRECT','You will be redirected back to our home page in %s seconds!');
lang/english/lang_english.confTop ca. Zeile 89
text_street = 'Street/No.:'
text_suburb = 'Suburb:'
text_code = 'Postcode:'
text_city = 'Town:'
text_state = 'District:'
text_state = 'State:'
text_country = 'Country:'
text_must = '* necessary information '
[cross_selling]
ca. Zeile 151
text_street = 'Street/No.':
text_suburb = 'Suburb:'
text_code = 'Postcode:'
text_city = 'City:'
text_state = 'District:'
text_state = 'State:'
text_country = 'Country:'
text_must = '* necessary information '
text_standard = 'Standard address:'
title_delete = 'Delete entry'
ca. Zeile 216
text_hint = 'Fields with * are mandatory.'
#EOF - Tomcraft - 2009-11-05 - Advanced contact form
text_name = 'Your name:'
text_email = 'Your e-mail address:'
text_confirm_email = 'confirm email'
text_confirm_email = 'Confirm e-mail:'
text_message = 'Your message:'
text_success = 'Your enquiry has been submitted sucessfully!'
#logout
ca. Zeile 237
text_firstname = 'First name:'
text_lastname = 'Last name:'
text_birthdate = 'Date of birth:'
text_email = 'E-mail address:'
text_confirm_email = 'Confirm email?'
text_confirm_email = 'Confirm e-mail:'
title_company = 'Company data'
text_company = 'Company name:'
text_ustid = 'VAT Reg No:'
title_address = 'Your address'
text_street = 'Street/No.:'
text_suburb = 'Suburb:'
text_code = 'Postcode:'
text_city = 'City:'
text_state = 'District:'
text_state = 'State:'
text_country = 'Country:'
title_contact = 'Your contact information'
text_tel = 'Telephone number:'
text_fax = 'Telefax number:'
ca. Zeile 279
text_shipped = 'Sent to:'
text_articles = 'Items:'
text_total = 'Sum: '
text_status = 'Order status:'
label_tracking = 'Track shipment:'
#Order details
[account_history_info]
heading_history_info = 'Order information'
ca. Zeile 296
text_comments = 'Your comments:'
title_history = 'Order history'
title_print = 'Printable version of the order'
text_print = 'Print a copy of your order for your records.'
label_tracking = 'Track shipment:'
[checkout_success]
heading_success = 'Your order has been completed sucessfully.'
text_success = 'We have received your order and a confirmation e-mail including a summary of your order has been sent!'
ca. Zeile 393
text_shipped = 'Sent to: '
text_articles = 'Items: '
text_total = 'Sum: '
text_status = 'Order status: '
label_tracking = 'Track shipment:'
#categorie listing
[categorie_listing]
heading_more_categories = 'More sub catagories:'
ca. Zeile 420
text_email = 'E-mail address:'
text_password = 'Password:'
text_lost_password = 'Forgot Password?'
title_guest = 'I would like to order without registration'
text_guest = 'You can also order without registration.<br />Please note that you have to enter your data again on every new order.'
text_guest = 'You can also order without registration.<br />Please note that as a guest account holder you will have to re-enter your details for any subsequent orders.'
text_after_login = '<p>After having logged in you will be automatically redirected, either</p><ul><li>to Home or</li><li>if you have s.th. in your shopping cart, to it.</li></ul>'
text_after_login1 = '<p>After having logged in you will be automatically redirected to the page with information about your order.</p>'
text_after_login2 = '<p>After having logged in you will be automatically redirected to the reviews page.</p>'
ca. Zeile 558
invoice_number = 'Invoice number:'
invoice_date = 'Invoice date:'
#EOF - hendrik - 2011-05-14 - independent billingnumber and date
text_shippingtime = 'Shipping time:'
vatID = 'Your VAT ID No.:'
[product_navigator]
first = '[<<First]'
back = '[<Back]'
lang/english/modules/order_total/ot_payment.phpTop ca. Zeile 13
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
$num = 3; //Number scale of discounts
define('MODULE_ORDER_TOTAL_PAYMENT_HELP_LINK', ' <a onclick="window.open(\'popup_help.php?type=order_total&modul=ot_payment&lng=english\', \'HELP\', \'scrollbars=yes,resizable=yes,menubar=yes,width=800,height=600\'); return false" target="_blank" href="popup_help.php?type=order_total&modul=ot_payment&lng=english"><b>[HELP]</b></a>');
define('MODULE_ORDER_TOTAL_PAYMENT_HELP_TEXT', '<h2>Payment type discount & surcharge</h2>
If there are more scale of discounts required (default is <b>3</b>), the value of the variable $num (language files) and $this->num (module file) has to be changed to the desired value.
A later increase requires a deinstallation/re-installation of the module or a manual database correction!
ca. Zeile 67
define('MODULE_ORDER_TOTAL_PAYMENT_SORT_ORDER_TITLE', '<hr>Sort order');
define('MODULE_ORDER_TOTAL_PAYMENT_SORT_ORDER_DESC', 'Sort order of display');
for ($j=1; $j<=$num; $j++) {
for ($j=1; $j<=MODULE_ORDER_TOTAL_PAYMENT_NUMBER; $j++) {
define('MODULE_ORDER_TOTAL_PAYMENT_PERCENTAGE' . $j . '_TITLE', $j . '. Discount percentage');
define('MODULE_ORDER_TOTAL_PAYMENT_PERCENTAGE' . $j . '_DESC', 'Amount of discount(countries|value:percentage&fee)');
define('MODULE_ORDER_TOTAL_PAYMENT_TYPE' . $j . '_TITLE', $j . '. Payment type');
define('MODULE_ORDER_TOTAL_PAYMENT_TYPE' . $j . '_DESC', 'Payment type to get discount');
ca. Zeile 99
define('MODULE_ORDER_TOTAL_PAYMENT_SHOW_IN_CHECKOUT_PAYMENT_DESC', 'Display during the checkout process at the checkout');
define('MODULE_ORDER_TOTAL_PAYMENT_SHOW_TYPE_TITLE', '<hr>Display mode of payment types');
define('MODULE_ORDER_TOTAL_PAYMENT_SHOW_TYPE_DESC', 'Display in the ordering process at the checkout <br /> - default: percent or amount, depending on the inputs at discount <br /> - price: it will always show the actual amount');
define('MODULE_ORDER_TOTAL_PAYMENT_NUMBER_TITLE', 'Number Paymenttype');
define('MODULE_ORDER_TOTAL_PAYMENT_NUMBER_DESC', 'Number of Payment type discount & surcharge');
?>
lang/english/modules/payment/banktransfer.phpTop ca. Zeile 26
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_DESCRIPTION', 'Banktransfer Payments');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_INFO','');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK', 'Banktransfer');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_EMAIL_FOOTER', 'Note: You can download our Fax Confirmation form from here: ' . HTTP_SERVER . DIR_WS_CATALOG . MODULE_PAYMENT_BANKTRANSFER_URL_NOTE . '');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_INFO', 'Please note that direct debit without IBAN/BIC is <b>only available</b> from a <b>german bank account</b>. By specifying IBAN/BIC, you can use the direct debit system <b>across the EU</b>.<br/>Fields marked with (*) are mandatory. For a german IBAN specifying a BIC is optional.<br/><br/>');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_INFO', ((MODULE_PAYMENT_BANKTRANSFER_IBAN_ONLY != 'True') ? 'Please note that direct debit without IBAN/BIC is <b>only available</b> from a <b>german bank account</b>. By specifying IBAN/BIC, you can use the direct debit system <b>across the EU</b>.<br/>' : '') . 'Fields marked with (*) are mandatory. For a german IBAN specifying a BIC is optional.<br/><br/>');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_OWNER', 'Account Owner:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_OWNER_EMAIL', 'E-Mail Account Owner:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_NUMBER', 'Account Number:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_NUMBER', 'Account Number / IBAN:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_IBAN', 'IBAN:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_BLZ', 'Bank Code:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_BLZ', 'Bank Code / BIC:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_BIC', 'BIC:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_NAME', 'Bank Name:');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_FAX', 'Banktransfer Payment will be confirmed by fax');
lang/english/modules/payment/billsafe_2.phpTop ca. Zeile 30
* @copyright (C) 2013 Bernd Blazynski
* @license GPLv2
*/
define('MODULE_PAYMENT_BILLSAFE_2_TEXT_TITLE', 'Pay on invoice via BillSAFE');
define('MODULE_PAYMENT_BILLSAFE_2_TEXT_TITLE', 'Purchase on account');
define('MODULE_PAYMENT_BILLSAFE_2_CHECKOUT_TEXT_INFO', 'Pay your order the convinient way via invoice. Easily and efficiently with BillSAFE, a service of PayPal.');
define('MODULE_PAYMENT_BILLSAFE_2_SCHG_TEXT_INFO', 'For this payment method we raise a surcharge of: ');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_COMMON', 'Sorry, the payment via BillSAFE is not possible. Please select another payment method.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_101', 'Payment via BillSAFE is not possible right now, please select another payment method.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_101', 'Payment via BillSAFE is not possible for this transaction, please select another payment method.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_102', 'An error occured during data processing. Please contact us.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_215', 'There were missing parameters during data processing. Please contact us.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_216', 'There were invalid parameters during data processing. Please contact us.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_INLINE', 'You have not entered all necessary information. Please check your information for the payment method!');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_COMPANY', 'Payment via BillSAFE is unfortunately only possible for private individuals.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_ADDRESS', 'Payment via BillSAFE is unfortunately not possible with an alternate delivery address.');
define('MODULE_PAYMENT_BILLSAFE_2_STATUS_TEXT', 'Status');
define('MODULE_PAYMENT_BILLSAFE_2_TRANSACTIONID', 'BillSAFE transaction ID');
ca. Zeile 51
define('MODULE_PAYMENT_BILLSAFE_2_MERCHANT_ID_TITLE', 'Merchant ID');
define('MODULE_PAYMENT_BILLSAFE_2_MERCHANT_ID_DESC', 'The Merchant ID to use for the BillSAFE API service');
define('MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE_TITLE', 'Merchant License');
define('MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE_DESC', 'The Merchant License to use for the BillSAFE API service');
define('MODULE_PAYMENT_BILLSAFE_2_PKEY_TITLE', 'Public Key');
define('MODULE_PAYMENT_BILLSAFE_2_PKEY_DESC', 'Security code provided by BillSAFE. You will find your code at your personal BillSAFE website.');
define('MODULE_PAYMENT_BILLSAFE_2_MIN_ORDER_TITLE', 'Minimum order value');
define('MODULE_PAYMENT_BILLSAFE_2_MIN_ORDER_DESC', 'BillSAFE minimum order value');
define('MODULE_PAYMENT_BILLSAFE_2_MAX_ORDER_TITLE', 'Maximim order value');
define('MODULE_PAYMENT_BILLSAFE_2_MAX_ORDER_DESC', 'BillSAFE maximum order value');
ca. Zeile 134
define('MODULE_PAYMENT_BILLSAFE_2_DAY', 'Day');
define('MODULE_PAYMENT_BILLSAFE_2_MONTH', 'Month');
define('MODULE_PAYMENT_BILLSAFE_2_YEAR', 'Year');
define('MODULE_PAYMENT_BILLSAFE_2_LAYER_TITLE', 'Payment Layer');
define('MODULE_PAYMENT_BILLSAFE_2_LAYER_DESC', 'Would you like to enable the layer mode for payments via BillSAFE? <b>Note: It is absolutely necessary to disable <i>Force Cookie Use</i> in the <i>Sessions</i> settings!</b>');
define('MODULE_PAYMENT_BILLSAFE_2_LAYER_DESC', 'Would you like to enable the layer mode for payments via BillSAFE? <b>Note: Does not function with Onsite Checkout activated! It is absolutely necessary to disable <i>Force Cookie Use</i> in the <i>Sessions</i> settings!</b>');
define('MODULE_PAYMENT_BILLSAFE_2_INLINE_TITLE', 'Onsite Checkout');
define('MODULE_PAYMENT_BILLSAFE_2_INLINE_DESC', 'Would you like to enable Onsite Checkout for payments via BillSAFE? <b>Note: Does not function with Payment Layer activated! This function must be agreed with BillSAFE.</b>');
define('MODULE_PAYMENT_BILLSAFE_2_DOB', 'Please enter your birthdate (e.g. 21.05.1970):');
define('MODULE_PAYMENT_BILLSAFE_2_TC', '<b>I agree to the <a class="info" href="https://www.billsafe.de/privacy-policy/buyer" target="_blank">privacy policy</a> and the <a class="info" href="https://www.billsafe.de/privacy-policy/credit-check" target="_blank">credit investigation</a> of <a class="info" href="https://www.billsafe.de/imprint" target="_blank">PayPal</a>. The <a class="info" href="https://www.billsafe.de/resources/docs/pdf/Kaeufer_AGB.pdf" target="_blank">general terms and conditions</a> for invoice purchase apply.</b>');
?>
lang/english/modules/payment/payone.phpTop ca. Zeile 17
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
define('MODULE_PAYMENT_PAYONE_TEXT_TITLE', 'PayOne');
define('MODULE_PAYMENT_PAYONE_TEXT_DESCRIPTION', 'PayOne lorem ipsum');
define('MODULE_PAYMENT_PAYONE_TEXT_INFO', 'PayOne ...');
define('MODULE_PAYMENT_PAYONE_STATUS_TITLE', 'Modul aktivieren');
define('MODULE_PAYMENT_PAYONE_STATUS_DESC', 'Möchten Sie Zahlungen über dieses Modul akzeptieren?');
define('MODULE_PAYMENT_PAYONE_ALLOWED_TITLE', 'Erlaubte Zonen');
define('MODULE_PAYMENT_PAYONE_ALLOWED_DESC', 'Geben Sie <b>einzeln</b> die Zonen an, welche für dieses Modul erlaubt sein sollen. (z.B. AT,DE (wenn leer, werden alle Zonen erlaubt))');
define('MODULE_PAYMENT_PAYONE_ZONE_TITLE', 'Zahlungszone');
define('MODULE_PAYMENT_PAYONE_ZONE_DESC', 'Wenn eine Zone ausgewählt ist, gilt die Zahlungsmethode nur für diese Zone.');
define('MODULE_PAYMENT_PAYONE_TMPORDER_STATUS_ID_TITLE', 'Temporären Bestellstatus festlegen');
define('MODULE_PAYMENT_PAYONE_TMPORDER_STATUS_ID_DESC', 'Bestellungen, welche mit diesem Modul gemacht werden, auf diesen Status setzen (während des laufenden Zahlungsvorgangs)');
define('MODULE_PAYMENT_PAYONE_ORDER_STATUS_ID_TITLE', 'Bestellstatus festlegen');
define('MODULE_PAYMENT_PAYONE_ORDER_STATUS_ID_DESC', 'Bestellungen, welche mit diesem Modul gemacht werden, auf diesen Status setzen');
define('MODULE_PAYMENT_PAYONE_SORT_ORDER_TITLE', 'Anzeigereihenfolge');
define('MODULE_PAYMENT_PAYONE_SORT_ORDER_DESC', 'Reihenfolge der Anzeige. Kleinste Ziffer wird zuerst angezeigt.');
define('MODULE_PAYMENT_PAYONE_LP', '<br /><br /><a target="_blank" href="http://www.payone.de/plattform-integration/extensions/modified-shop/"><strong>Jetzt PAYONE Konto hier erstellen.</strong></a>');
//define('MODULE_PAYMENT_PAYONE_TEXT_TITLE', 'PayOne');
//define('MODULE_PAYMENT_PAYONE_TEXT_DESCRIPTION', 'PayOne lorem ipsum');
//define('MODULE_PAYMENT_PAYONE_TEXT_INFO', 'PayOne ...');
define('MODULE_PAYMENT_PAYONE_STATUS_TITLE', 'Enable Module');
define('MODULE_PAYMENT_PAYONE_STATUS_DESC', 'Do you want to accept payments through this module?');
define('MODULE_PAYMENT_PAYONE_ALLOWED_TITLE', 'Allowed zones');
define('MODULE_PAYMENT_PAYONE_ALLOWED_DESC', 'Please enter the zones <b>separately</b> which should be allowed to use this module (e.g. AT,DE (leave empty if you want to allow all zones))');
define('MODULE_PAYMENT_PAYONE_ZONE_TITLE', 'Payment zone');
define('MODULE_PAYMENT_PAYONE_ZONE_DESC', 'If a zone is choosen, the payment method will be valid for this zone only.');
define('MODULE_PAYMENT_PAYONE_TMPORDER_STATUS_ID_TITLE', 'Temporary Order Status');
define('MODULE_PAYMENT_PAYONE_TMPORDER_STATUS_ID_DESC', 'Order for not yet completed transactions');
define('MODULE_PAYMENT_PAYONE_ORDER_STATUS_ID_TITLE', 'Set Order Status');
define('MODULE_PAYMENT_PAYONE_ORDER_STATUS_ID_DESC', 'Set the status of orders made with this payment module to this value');
define('MODULE_PAYMENT_PAYONE_SORT_ORDER_TITLE', 'Sort order');
define('MODULE_PAYMENT_PAYONE_SORT_ORDER_DESC', 'Sort order of display. Lowest is displayed first.');
define('MODULE_PAYMENT_PAYONE_LP', '<br/><br/><a target="_blank" href="http://www.payone.de/plattform-integration/extensions/modified-shop/"><strong>Create PAYONE account here now.</strong></a>');
lang/english/modules/payment/payone_cc.phpTop ca. Zeile 19
---------------------------------------------------------------------------------------*/
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_CC_TEXT_TITLE', 'Kreditkarten');
define('MODULE_PAYMENT_PAYONE_CC_TEXT_INFO', 'Zahlen Sie mit Ihrer Kreditkarte');
define('MODULE_PAYMENT_PAYONE_CC_TEXT_TITLE', 'Credit cards');
define('MODULE_PAYMENT_PAYONE_CC_TEXT_DESCRIPTION', 'Payment via credit cards through PayOne');
define('MODULE_PAYMENT_PAYONE_CC_TEXT_INFO', 'Pay with your credit card');
define('MODULE_PAYMENT_PAYONE_CC_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_CC_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_CC_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
define('MODULE_PAYMENT_PAYONE_CC_ALLOWED_DESC', MODULE_PAYMENT_PAYONE_ALLOWED_DESC);
lang/english/modules/payment/payone_cod.phpTop ca. Zeile 19
---------------------------------------------------------------------------------------*/
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_COD_TEXT_TITLE', 'Nachnahme');
define('MODULE_PAYMENT_PAYONE_COD_TEXT_INFO', 'Nachnahme-Zahlung');
define('MODULE_PAYMENT_PAYONE_COD_TEXT_TITLE', 'Cash on delivery');
define('MODULE_PAYMENT_PAYONE_COD_TEXT_DESCRIPTION', 'Payment via cash on delivery through PayOne');
define('MODULE_PAYMENT_PAYONE_COD_TEXT_INFO', 'Cash on delivery payment');
define('MODULE_PAYMENT_PAYONE_COD_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_COD_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_COD_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
define('MODULE_PAYMENT_PAYONE_COD_ALLOWED_DESC', MODULE_PAYMENT_PAYONE_ALLOWED_DESC);
lang/english/modules/payment/payone_elv.phpTop ca. Zeile 19
---------------------------------------------------------------------------------------*/
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_ELV_TEXT_TITLE', 'Lastschrift');
define('MODULE_PAYMENT_PAYONE_ELV_TEXT_INFO', 'Zahlung per Lastschrift');
define('MODULE_PAYMENT_PAYONE_ELV_TEXT_TITLE', 'Direct debit');
define('MODULE_PAYMENT_PAYONE_ELV_TEXT_DESCRIPTION', 'Direct debit payment through PayOne');
define('MODULE_PAYMENT_PAYONE_ELV_TEXT_INFO', 'Payment via direct debit');
define('MODULE_PAYMENT_PAYONE_ELV_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_ELV_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_ELV_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
define('MODULE_PAYMENT_PAYONE_ELV_ALLOWED_DESC', MODULE_PAYMENT_PAYONE_ALLOWED_DESC);
lang/english/modules/payment/payone_installment.phpTop ca. Zeile 19
---------------------------------------------------------------------------------------*/
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_TEXT_TITLE', 'Ratenkauf/Finanzierung');
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_TEXT_INFO', 'Zahlung per Ratenkauf/Finanzierung');
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_TEXT_TITLE', 'Hire purchase/Factoring');
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_TEXT_DESCRIPTION', 'Hire purchase/Factoring through PayOne');
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_TEXT_INFO', 'Payment via Hire purchase/Factoring');
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_ALLOWED_DESC', MODULE_PAYMENT_PAYONE_ALLOWED_DESC);
lang/english/modules/payment/payone_invoice.phpTop ca. Zeile 19
---------------------------------------------------------------------------------------*/
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_INVOICE_TEXT_TITLE', 'Rechnung');
define('MODULE_PAYMENT_PAYONE_INVOICE_TEXT_INFO', 'Zahlung auf Rechnung');
define('MODULE_PAYMENT_PAYONE_INVOICE_TEXT_TITLE', 'Sale on account');
define('MODULE_PAYMENT_PAYONE_INVOICE_TEXT_DESCRIPTION', 'Sale on account through PayOne');
define('MODULE_PAYMENT_PAYONE_INVOICE_TEXT_INFO', 'Payment on account');
define('MODULE_PAYMENT_PAYONE_INVOICE_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_INVOICE_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_INVOICE_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
define('MODULE_PAYMENT_PAYONE_INVOICE_ALLOWED_DESC', MODULE_PAYMENT_PAYONE_ALLOWED_DESC);
lang/english/modules/payment/payone_otrans.phpTop ca. Zeile 19
---------------------------------------------------------------------------------------*/
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_OTRANS_TEXT_TITLE', 'Online transaction');
define('MODULE_PAYMENT_PAYONE_OTRANS_TEXT_DESCRIPTION', 'Payment via online transaction through PayOne');
define('MODULE_PAYMENT_PAYONE_OTRANS_TEXT_INFO', 'Payment via online transaction');
define('MODULE_PAYMENT_PAYONE_OTRANS_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_OTRANS_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_OTRANS_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
define('MODULE_PAYMENT_PAYONE_OTRANS_ALLOWED_DESC', MODULE_PAYMENT_PAYONE_ALLOWED_DESC);
lang/english/modules/payment/payone_prepay.phpTop ca. Zeile 19
---------------------------------------------------------------------------------------*/
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_PREPAY_TEXT_TITLE', 'Vorkasse');
define('MODULE_PAYMENT_PAYONE_PREPAY_TEXT_INFO', 'Vorkasse-Zahlung');
define('MODULE_PAYMENT_PAYONE_PREPAY_TEXT_TITLE', 'Cash in advance');
define('MODULE_PAYMENT_PAYONE_PREPAY_TEXT_DESCRIPTION', 'Payment via cash in advance through PayOne');
define('MODULE_PAYMENT_PAYONE_PREPAY_TEXT_INFO', 'Advance payment');
define('MODULE_PAYMENT_PAYONE_PREPAY_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_PREPAY_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_PREPAY_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
define('MODULE_PAYMENT_PAYONE_PREPAY_ALLOWED_DESC', MODULE_PAYMENT_PAYONE_ALLOWED_DESC);
lang/english/modules/payment/payone_wlt.phpTop ca. Zeile 20
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_WLT_TEXT_TITLE', 'PayPal');
define('MODULE_PAYMENT_PAYONE_WLT_TEXT_INFO', 'Zahlung per e-Wallet (PayPal)');
define('MODULE_PAYMENT_PAYONE_WLT_TEXT_DESCRIPTION', 'Payment via e-Wallet through PayOne');
define('MODULE_PAYMENT_PAYONE_WLT_TEXT_INFO', 'Payment via e-Wallet (PayPal)');
define('MODULE_PAYMENT_PAYONE_WLT_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_WLT_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_WLT_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
define('MODULE_PAYMENT_PAYONE_WLT_ALLOWED_DESC', MODULE_PAYMENT_PAYONE_ALLOWED_DESC);
lang/english/modules/payment/shopgate.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
include_once DIR_FS_CATALOG.'includes/external/shopgate/base/lang/english/modules/payment/shopgate.php';
lang/english/modules/payment/sofort_ideal.phpTop ca. Zeile 1
<?php
/**
* @version SOFORT Gateway 5.2.0 - $Date: 2012-09-06 14:27:56 +0200 (Thu, 06 Sep 2012) $
* @author SOFORT AG (integration@sofort.com)
* @link http://www.sofort.com/
*
* Copyright (c) 2012 SOFORT AG
*
* $Id: sofort_ideal.php 3751 2012-10-10 08:36:20Z gtb-modified $
*/
//include language-constants for used in all Multipay Projects - NOTICE: iDEAL is not Multipay
require_once 'sofort_general.php';
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TEXT_TITLE', 'iDEAL <br /><img src="https://images.sofort.com/en/ideal/logo_90x30.png" alt="iDEAL logo"/>');
define('MODULE_PAYMENT_SOFORT_IDEAL_TEXT_TITLE', 'iDEAL');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_RECOMMENDED_PAYMENT_TEXT', '(recommend payment method)');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TEXT_DESCRIPTION', '<b>iDEAL</b><br />');
//alle im Shopsystem einstellbaren Params
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_STATUS_TITLE', 'iDEAL-Modul aktivieren');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_RECOMMENDED_PAYMENT_TITLE', 'recommend payment method');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_AUTH_TITLE', 'test configuration key');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_AUTH_DESC', "<script>function t(){k = document.getElementsByName(\"configuration[MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_CONFIGURATION_KEY]\")[0].value;window.open(\"../callback/sofort/testAuth.php?k=\"+k);}</script><input type=\"button\" onclick=\"t()\" value=\"Test\" />"); //max 255 signs
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_ZONE_TITLE' , MODULE_PAYMENT_SOFORT_MULTIPAY_ZONE_TITLE);
define('MODULE_PAYMENT_SOFORT_IDEAL_ALLOWED_TITLE' , 'Payment zone');
define('MODULE_PAYMENT_SOFORT_IDEAL_ALLOWED_DESC' , 'Please enter <b>einzeln</b> the zones, which should be allowed for this module. (eg allow AT, DE (if empty, all zones))');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TMP_STATUS_ID_TITLE' , 'Temporary order status');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_ORDER_STATUS_ID_TITLE', 'Confirmed order status');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_CANCELED_ORDER_STATUS_ID_TITLE', 'Order state at aborted payment');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_SORT_ORDER_TITLE', 'sort sequence');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_CONFIGURATION_KEY_TITLE', 'Assigned configuration key by SOFORT AG');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_PROJECT_PASSWORD_TITLE', 'project password');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_NOTIFICATION_PASSWORD_TITLE', 'notification password');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_REASON_1_TITLE', 'Reason 1');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_REASON_2_TITLE', 'Reason 2');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_IMAGE_TITLE', 'logo+text');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_STATUS_DESC', 'Activates/deactivates the complete module');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_RECOMMENDED_PAYMENT_DESC', 'Make iDEAL the recommended payment method');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_ZONE_DESC', 'When a zone is selected, the payment method applies only to this zone.');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TMP_STATUS_ID_DESC', 'Order state for non-completed transactions. The order has been created but the transaction has not yet been confirmed by SOFORT AG.');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_ORDER_STATUS_ID_DESC', 'Confirmed order status<br />Order status after successfully completing a transaction.');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_CANCELED_ORDER_STATUS_ID_DESC', 'Order status for orders that were canceled during the checkout process.');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_SORT_ORDER_DESC', 'Order of display. Smallest number will show first.');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_CONFIGURATION_KEY_DESC', 'Assigned configuration key by SOFORT AG');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_PROJECT_PASSWORD_DESC', 'Project password assigned by SOFORT AG');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_NOTIFICATION_PASSWORD_DESC', 'Notification password assigned by SOFORT AG');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_REASON_1_DESC', 'Reason 1');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_REASON_2_DESC', 'Reason 2');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_IMAGE_DESC', 'Banner or text in the selection of payment methods');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_CHECKOUT_TEXT', 'iDEAL.nl - online payments for e-commerce in the Netherlands. For payment by iDEAL you need an account with one of the banks listed. Receive the transfer directly to your bank. When available services / goods can be delivered or shipped IMMEDIATELY!');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_IMAGEALT', 'iDEAL.nl - online payments for e-commerce in the Netherlands. For payment by iDEAL you need an account with one of the banks listed. Receive the transfer directly to your bank. When available services / goods can be delivered or shipped IMMEDIATELY!');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TMP_COMMENT', 'Payment method iDEAL chosen. Transaction not finished.');
//////////////////////////////////////////////////////////////////////////////////////////////
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TEXT_PUBLIC_TITLE', 'SOFORT AG - iDEAL');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_TEXT', 'iDEAL.nl - online payments for e-commerce in the Netherlands. For payment by iDEAL you need an account with one of the banks listed. They will do the transfer directly to your bank. Services / goods are delivered or shipped when available IMMEDIATELY!');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TEXT_ERROR_HEADING', 'Following error occurred during the process:');
define('MODULE_PAYMENT_SOFORT_MULTIPAY_XML_FAULT_10000', 'Please select a bank.');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_ERROR_ALL_CODES', 'Transmission error, please select a different pament method or contact the shop owner.');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_ERROR_DEFAULT', 'Transmission error, please select a different pament method or contact the shop owner.');
/* -----------------------------------------------------------------------------------------
$Id$
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_IDEALSELECTED_PENDING' , 'Payment method iDEAL chosen. Transaction not finished.');
modified eCommerce Shopsoftware
http://www.modified-shop.org
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_SELECTBOX_TITLE', 'Please select your bank');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_IMAGE', '
Copyright (c) 2009 - 2013 [www.modified-shop.org]
-----------------------------------------------------------------------------------------
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
$sofort_code = 'SOFORT_IDEAL';
define('MODULE_PAYMENT_'.$sofort_code.'_TEXT_TITLE', 'iDEAL <br /><img src="https://images.sofort.com/en/ideal/logo_90x30.png" alt="Logo iDEAL"/>');
define('MODULE_PAYMENT_'.$sofort_code.'_TEXT_DESCRIPTION', '<b>iDEAL</b><br />Once the customer has chosen this method of payment and his bank , he will be forwarded by the SOFORT AG on his bench. He spends his payment and then returned back to the shop system . Upon successful payment confirmation takes place through the SOFORT AG a callback to the shop system instead of that changes the payment status of the order accordingly changed.<br/>Powered by SOFORT AG');
define('MODULE_PAYMENT_'.$sofort_code.'_TEXT_INFO', 'iDEAL.nl - online payments for e-commerce in the Netherlands. For payment by iDEAL you need an account with one of the banks listed. They will do the transfer directly to your bank. Services / goods are delivered or shipped when available IMMEDIATELY!');
// checkout
define('MODULE_PAYMENT_'.$sofort_code.'_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_IMAGE', '
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><a href="http://www.ideal.nl" target="_blank">{{image}}</a></td>
<td style="padding-left:30px;">' . MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_SELECTBOX_TITLE . '{{selectbox}}</td>
<td valign="bottom">
<a onclick="javascript:window.open(\'http://www.ideal.nl\',\'Information\',\'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=1020, height=900\');" style="float:left; width:auto;">{{image}}</a>
</td>
</tr>
<tr>
<td colspan="2" class="main"><br />{{text}}</td>
<td class="main">{{text}}</td>
</tr>
</table>');
define('MODULE_PAYMENT_'.$sofort_code.'_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_IMAGEALT', 'iDeal');
define('MODULE_PAYMENT_'.$sofort_code.'_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_TEXT', '
<ul>
<li>online payments for e-commerce in the Netherlands</li>
<li>For payment by iDEAL you need an account with one of the banks listed</li>
<li>They will do the transfer directly to your bank</li>
<li>Services / goods are delivered or shipped when available IMMEDIATELY</li>
</ul>');
define('MODULE_PAYMENT_'.$sofort_code.'_SELECTBOX', 'Please choose your Bank');
// admin
define('MODULE_PAYMENT_'.$sofort_code.'_STATUS_TITLE', 'activate iDeal Modul');
define('MODULE_PAYMENT_'.$sofort_code.'_STATUS_DESC', 'Activates/deactivates iDeal');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_CHECKOUT_CONFIRMATION', '
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main">
<p>After confirming the order you will be redirected to the payment system of your chosen bank, where they can carry out the online transfer.</p><p>You will need your eBanking access data, ie Bank details, account number, PIN and TAN. More information can be found here: <a href="http://www.ideal.nl" target="_blank">iDEAL.nl</a></p>
</td>
</tr>
</table>');
include(DIR_FS_CATALOG.'lang/'.$_SESSION['language'].'/modules/payment/sofort_payment.php');
?>
lang/german/admin/configuration.phpTop ca. Zeile 361
define('DIR_FS_CACHE_TITLE' , 'Cache Ordner');
define('DIR_FS_CACHE_DESC' , 'Der Ordner, wo die gecachten Files gespeichert werden sollen');
define('ACCOUNT_OPTIONS_TITLE','Art der Kontoerstellung');
define('ACCOUNT_OPTIONS_DESC','Wie möchten Sie die Anmeldeprozedur in Ihrem Shop gestallten?<br />Sie haben die Wahl zwischen regulären Kundenkonten und "Einmalbestellungen" ohne Erstellung eines Kundenkontos (es wird ein Konto erstellt, aber dies ist für den Kunden nicht ersichtlich)');
define('ACCOUNT_OPTIONS_DESC','Wie möchten Sie die Anmeldeprozedur in Ihrem Shop gestalten?<br />Sie haben die Wahl zwischen regulären Kundenkonten und "Einmalbestellungen" ohne Erstellung eines Kundenkontos (es wird ein Konto erstellt, aber dies ist für den Kunden nicht ersichtlich)');
define('EMAIL_TRANSPORT_TITLE' , 'E-Mail Transport Methode');
define('EMAIL_TRANSPORT_DESC' , '<b>Empfehlung: smtp</b> - Definiert ob der Server eine lokale Verbindung zum "Sendmail-Programm" benutzt oder ob er eine SMTP Verbindung über TCP/IP benötigt. Server die auf Windows oder MacOS laufen sollten SMTP verwenden.');
ca. Zeile 773
define('TRACKING_GOOGLEANALYTICS_ACTIVE_DESC' , 'Wird diese Option aktiviert, so werden alle Seitenaufrufe an Google Analytics übermittelt und können später ausgewertet werden. Dazu ist vorher die Anlage eines Kontos bei <a href="http://www.google.com/analytics/" target="_blank"><b>Google Analytics</b></a> erforderlich.');
define('TRACKING_GOOGLEANALYTICS_ID_TITLE' , 'Google Analytics Kontonummer');
define('TRACKING_GOOGLEANALYTICS_ID_DESC' , 'Tragen Sie hier die Google Analytics Kontonummer im Format "UA-XXXXXXXX-X" ein, die Sie nach einer erfolgreichen Kontoerstellen bekommen haben.');
define('TRACKING_PIWIK_ACTIVE_TITLE' , 'PIWIK Web-Analytics Tracking aktivieren');
define('TRACKING_PIWIK_ACTIVE_DESC' , 'Um PIWIK nutzen zu können, müssen Sie es zunächst herunterladen und auf Ihrem Webspace installieren, siehe auch <a href="http://http://de.piwik.org/" target="_blank"><b>PIWIK Web-Analytics</b></a>. Im Gegensatz zu Google Analytics werden die Daten lokal gespeichert, d.h. Sie als Shopbetreiber haben die Datenhoheit.');
define('TRACKING_PIWIK_ACTIVE_DESC' , 'Um PIWIK nutzen zu können, müssen Sie es zunächst herunterladen und auf Ihrem Webspace installieren, siehe auch <a href="http://de.piwik.org/" target="_blank"><b>PIWIK Web-Analytics</b></a>. Im Gegensatz zu Google Analytics werden die Daten lokal gespeichert, d.h. Sie als Shopbetreiber haben die Datenhoheit.');
define('TRACKING_PIWIK_LOCAL_PATH_TITLE' , 'PIWIK Installationsverzeichnis (ohne "http://")');
define('TRACKING_PIWIK_LOCAL_PATH_DESC' , 'Tragen Sie hier das Verzeichnis ein, nachdem PIWIK erfolgreich installiert worden ist. Als Pfad ist hier der komplette Domainname ohne "http://" einzutragen, z.B. "www.domain.de/piwik".');
define('TRACKING_PIWIK_ID_TITLE' , 'PIWIK Seiten-ID');
define('TRACKING_PIWIK_ID_DESC' , 'In der PIWIK Administrationsoberfläche wird pro angelegter Domain wird eine ID vergeben (meist "1")');
lang/german/admin/german.phpTop ca. Zeile 168
define('BOX_HAENDLERBUND','Händlerbund AGB Service'); // Tomcraft - 2012-12-08 - Added haendlerbund AGB interface
define('BOX_SAFETERMS','Safeterms - AGB Service'); // Tomcraft - 2013-06-21 - Safeterms AGB interface
define('BOX_EASYMARKETING','EASYMARKETING AG'); // Tomcraft - 2013-08-29 - Added easymarketing
define('BOX_IT_RECHT_KANZLEI', 'IT Recht Kanzlei');
define('BOX_PROTECTEDSHOPS', 'Protected Shops - AGB Service');
define('BOX_SHIPCLOUD', 'shipcloud');
define('BOX_SHIPCLOUD_PICKUP', 'shipcloud - Abholung');
define('TXT_GROUPS','<b>Gruppen</b>:');
define('TXT_SYSTEM','System');
define('TXT_CUSTOMERS','Kunden/Bestellungen');
ca. Zeile 500
define('CONFIG_MAX_VALUE_WARNING', '"%s" WARNUNG: Eingabe %s wurde ignoriert! [Maximum: %s]');
define('CONFIG_MIN_VALUE_WARNING', '"%s" WARNUNG: Eingabe %s wurde ignoriert! [Minimum: %s]');
define('WHOS_ONLINE_TIME_LAST_CLICK_INFO', 'Anzeigezeitraum in Sek.: %s. Nach dieser Zeit werden die Einträge gelöscht.');
define('BOX_PARCEL_CARRIERS', 'Paketdienstleister');
define('TEXT_DISPLAY_NUMBER_OF_CARRIERS', 'Angezeigt werden <b>%d</b> bis <b>%d</b> (von insgesamt <b>%d</b> Paketdienstleister)');
define('CFG_TXT_PRICE', 'Preis');
define('CHECK_LABEL_PRICE', 'Preis abfragen');
lang/german/admin/orders.phpTop ca. Zeile 120
define('ENTRY_CUSTOMERS_VAT_ID','USt-IdNr.:');
define('TEXT_VALIDATING','Nicht bestätigt');
// BOF - Tomcraft - 2009-10-03 - Paypal Express Modul
define('TEXT_INFO_PAYPAL_DELETE', 'PayPal Transaktions Daten auch l?schen.');
// EOF - Tomcraft - 2009-10-03 - Paypal Express Modul
// BOF - Tomcraft - 2010-04-22 - Added a missing language definition
define('TEXT_PRODUCTS', 'Artikel');
// EOF - Tomcraft - 2010-04-22 - Added a missing language definition
//BOF - web28 - 2010-03-20 - Send Order by Admin
define('COMMENT_SEND_ORDER_BY_ADMIN' , 'Auftragsbest?tigung gesendet'); //ACHTUNG hier keine HTML-Entities verwenden
define('BUTTON_ORDER_CONFIRMATION', 'Auftragsbestätigung senden');
define('SUCCESS_ORDER_SEND', 'Auftragsbestätigung erfolgreich gesendet');
//EOF - web28 - 2010-03-20 - Send Order by Admin
ca. Zeile 143
define('TABLE_HEADING_ORDERS_ID', 'Best.Nr.');
define('TEXT_SHIPPING_TO', 'Versand nach');
define('TABLE_HEADING_COMMENTS_SENT', 'Kommentar versandt');
define('TABLE_HEADING_TRACK_TRACE', 'Track & Trace:');
define('TABLE_HEADING_CARRIER', 'Versandart');
define('TABLE_HEADING_PARCEL_LINK', 'Trackinglink');
define('DOWNLOAD_LABEL', 'Paketschein herunterladen');
define('CREATE_LABEL', 'Paketschein erstellen');
define('TEXT_DELETE_LABEL', 'shipcloud Paketscheine können nicht gelöscht werden.');
define('TEXT_LABEL_CREATED', 'Paketschein erfolgreich erstellt.');
define('TEXT_CARRIER_ERROR', 'Paketdienstleister nicht in Ihrem shipcloud Account freigeschaltet oder ungültiger API-Key.');
define('TEXT_CARRIER_PLACEHOLDER', 'Beschreibung (optional)');
?>
lang/german/admin/orders_edit.phpTop ca. Zeile 20
define('TABLE_HEADING', 'Bestelldaten bearbeiten');
define('TABLE_HEADING_ORDER', 'Bestellung Nr: ');
define('TEXT_SAVE_ORDER', 'Bestellungsbearbeitung beenden und Bestellung neu berechnen.');
define('TEXT_EDIT_ADDRESS', 'Adressdaten und Kundendaten bearbeiten und einfügen.');
define('TEXT_EDIT_PRODUCTS', 'Artikel und Artikeloptionen bearbeiten und einfügen.');
define('TEXT_EDIT_OTHER', 'Versandkosten, Zahlungsweisen, Währungen, Sprachen usw bearbeiten und einfügen.');
define('TEXT_EDIT_GIFT', 'Gutscheine und Rabatt bearbeiten oder einfügen');
define('TEXT_EDIT_ADDRESS', 'Adress- und Kundendaten');
define('TEXT_EDIT_PRODUCTS', 'Artikel, Artikeloptionen und Preise');
define('TEXT_EDIT_OTHER', 'Versandkosten, Zahlungsweisen, Währungen, Sprachen, Summen, MwSt., Rabatte, usw.');
define('TEXT_EDIT_GIFT', 'Gutscheine und Rabatt');
define('TEXT_EDIT_ADDRESS_SUCCESS', 'Adressänderung wurde gespeichert.');
define('IMAGE_EDIT_ADDRESS', 'Adressen bearbeiten oder einfügen');
define('IMAGE_EDIT_PRODUCTS', 'Artikel und Optionen bearbeiten oder einfügen');
ca. Zeile 86
// web28 2010-12-07 add new defines
define('TEXT_ADD_TAX','inkl. ');
define('TEXT_NO_TAX','zzgl. ');
define('TEXT_ORDERS_EDIT_INFO', '<b>Wichtige Hinweise:</b><br>
Bitte bei den Adress/Kundendaten die richtige Kundengruppe wählen <br>
Bei einem Wechsel der Kundengruppe sind alle Einzelposten der Rechnung neu abzuspeichern!<br>
Versandkosten müssen manuell geändert werden!<br>
Hierbei sind je nach Kundengruppe die Versandkosten brutto oder netto einzutragen!<br>
define('TEXT_ORDERS_EDIT_INFO', '<b>Wichtige Hinweise:</b><br />
Bitte bei den Adress-/Kundendaten die richtige Kundengruppe wählen.<br />
Bei einem Wechsel der Kundengruppe sind alle Einzelposten der Rechnung neu abzuspeichern!<br />
Versandkosten müssen manuell geändert werden!<br />
Hierbei sind je nach Kundengruppe die Versandkosten brutto oder netto einzutragen!<br />
');
define('TEXT_CUSTOMER_GROUP_INFO', ' <span style="background:#FFD6D6;padding:3px;border:solid 1px red;">Bei einem Wechsel der Kundengruppe sind alle Einzelposten der Rechnung neu abzuspeichern!</span>');
lang/german/german.phpTop ca. Zeile 520
define('GRADUATED_PRICE_MAX_VALUE', 'ab');
//web28 - 2010-08-20 - VERSANDKOSTEN WARENKORB
define('_SHIPPING_TO', 'Versand nach ');
define('_SHIPPING_FREE','Versandkostenfrei');
// BOF - DokuMan - 2011-09-20 - E-Mail SQL errors
define('ERROR_SQL_DB_QUERY','Es tut uns leid, aber es ist ein Datenbankfehler aufgetreten.');
define('ERROR_SQL_DB_QUERY_REDIRECT','Sie werden in %s Sekunden auf unsere Homepage weitergeleitet!');
lang/german/lang_german.confTop ca. Zeile 271
text_shipped = 'Versenden an: '
text_articles = 'Artikel: '
text_total = 'Summe: '
text_status = 'Bestellstatus: '
label_tracking = 'Sendungsverfolgung:'
#bestelldetails
[account_history_info]
heading_history_info = 'Bestellinformationen'
ca. Zeile 288
text_comments = 'Ihre Anmerkungen:'
title_history = 'Bestellhistorie'
title_print = 'Druckversion der Bestellung'
text_print = 'Zu Ihrer Bestätigung können Sie die Bestellung ausdrucken.'
label_tracking = 'Sendungsverfolgung:'
[checkout_success]
heading_success = 'Ihre Bestellung wurde erfolgreich ausgeführt!'
text_success = 'Ihre Bestellung ist eingegangen und wird umgehend bearbeitet. Sie haben zur Kontrolle eine Bestätigungs-E-Mail mit den Bestelldaten bekommen!'
ca. Zeile 385
text_shipped = 'Versenden an: '
text_articles = 'Artikel: '
text_total = 'Bestellsumme: '
text_status = 'Bestellstatus: '
label_tracking = 'Sendungsverfolgung:'
#categorie listing
[categorie_listing]
heading_more_categories = 'Weitere Unterkategorien:'
ca. Zeile 551
invoice_number = 'Rechnungsnummer:'
invoice_date = 'Rechnungsdatum:'
#EOF - hendrik - 2011-05-14 - independent billingnumber and date
text_shippingtime = 'Lieferzeit:'
vatID = 'Ihre USt-IdNr.:'
[product_navigator]
first = '[<<Erstes]'
back = '[<zurück]'
lang/german/modules/order_total/ot_payment.phpTop ca. Zeile 13
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
$num = 3; //Anzahl der Rabattstaffeln
define('MODULE_ORDER_TOTAL_PAYMENT_HELP_LINK', ' <a onclick="window.open(\'popup_help.php?type=order_total&modul=ot_payment&lng=german\', \'Hilfe\', \'scrollbars=yes,resizable=yes,menubar=yes,width=800,height=600\'); return false" target="_blank" href="popup_help.php?type=order_total&modul=ot_payment&lng=german"><b>[HILFE]</b></a>');
define('MODULE_ORDER_TOTAL_PAYMENT_HELP_TEXT', '<h2>Rabatt und Zuschlag auf Zahlungsarten</h2>
Sollen mehr Rabattstaffeln möglich sein (Standard sind <b>3</b>), muss vor der Installation in allen Dateien der Wert der Variable $num (Sprachdateien) bzw. $this->num (Moduldatei) auf den gewünschten Wert geändert werden.
<hr>
ca. Zeile 65
define('MODULE_ORDER_TOTAL_PAYMENT_SORT_ORDER_TITLE', '<hr>Sortierreihenfolge');
define('MODULE_ORDER_TOTAL_PAYMENT_SORT_ORDER_DESC', 'Anzeigereihenfolge');
for ($j=1; $j<=$num; $j++) {
for ($j=1; $j<=MODULE_ORDER_TOTAL_PAYMENT_NUMBER; $j++) {
define('MODULE_ORDER_TOTAL_PAYMENT_PERCENTAGE' . $j . '_TITLE', '<hr>'.$j . '. Rabattstaffel');
define('MODULE_ORDER_TOTAL_PAYMENT_PERCENTAGE' . $j . '_DESC', 'Rabattierung (Mindestwert:Prozent)');
define('MODULE_ORDER_TOTAL_PAYMENT_TYPE' . $j . '_TITLE', $j . '. Zahlungsart');
define('MODULE_ORDER_TOTAL_PAYMENT_TYPE' . $j . '_DESC', 'Zahlungsarten, auf die Rabatt gegeben werden soll');
ca. Zeile 98
define('MODULE_ORDER_TOTAL_PAYMENT_SHOW_IN_CHECKOUT_PAYMENT_DESC', 'Anzeige im Bestellprozess bei der Zahlungsauswahl');
define('MODULE_ORDER_TOTAL_PAYMENT_SHOW_TYPE_TITLE', '<hr>Anzeigeart bei den Zahlungsarten');
define('MODULE_ORDER_TOTAL_PAYMENT_SHOW_TYPE_DESC', 'Anzeigeart im Bestellprozess bei der Zahlungsauswahl <br />-- default: Prozent oder Betrag, abhängig von den Eingaben bei Rabattstaffel<br />-- price: es wird immer der tatsächliche Betrag angezeigt');
define('MODULE_ORDER_TOTAL_PAYMENT_NUMBER_TITLE', 'Anzahl Zahlarten');
define('MODULE_ORDER_TOTAL_PAYMENT_NUMBER_DESC', 'Anzahl an Rabatt & Zuschlag auf Zahlungsarten');
?>
lang/german/modules/payment/banktransfer.phpTop ca. Zeile 26
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_DESCRIPTION', 'Lastschriftverfahren');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_INFO', '');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK', 'Bankeinzug');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_EMAIL_FOOTER', 'Hinweis: Sie können sich unser Faxformular unter ' . HTTP_SERVER . DIR_WS_CATALOG . MODULE_PAYMENT_BANKTRANSFER_URL_NOTE . ' herunterladen und es ausgefüllt an uns zurücksenden.');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_INFO', 'Bitte beachten Sie, dass das Lastschriftverfahren ohne Angabe von IBAN/BIC <b>nur</b> von einem <b>deutschen Girokonto</b> aus möglich ist. Durch Angabe von IBAN/BIC können Sie das Lastschriftverfahren <b>EU-weit</b> nutzen.<br/>Felder mit (*) sind Pflichtangaben. Bei einer deutschen IBAN ist der BIC optional.<br/><br/>');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_INFO', ((MODULE_PAYMENT_BANKTRANSFER_IBAN_ONLY != 'True') ? 'Bitte beachten Sie, dass das Lastschriftverfahren ohne Angabe von IBAN/BIC <b>nur</b> von einem <b>deutschen Girokonto</b> aus möglich ist. Durch Angabe von IBAN/BIC können Sie das Lastschriftverfahren <b>EU-weit</b> nutzen.<br/>' : '') . 'Felder mit (*) sind Pflichtangaben. Bei einer deutschen IBAN ist der BIC optional.<br/><br/>');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_OWNER', 'Kontoinhaber:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_OWNER_EMAIL', 'E-Mail Kontoinhaber:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_NUMBER', 'KtoNr:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_NUMBER', 'KtoNr / IBAN:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_IBAN', 'IBAN:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_BLZ', 'BLZ:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_BLZ', 'BLZ / BIC:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_BIC', 'BIC:*');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_NAME', 'Bank:');
define('MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_FAX', 'Einzugsermächtigung wird per Fax bestätigt');
lang/german/modules/payment/billsafe_2.phpTop ca. Zeile 30
* @copyright (C) 2013 Bernd Blazynski
* @license GPLv2
*/
// BOF - Changed to white label solution
/*
define('MODULE_PAYMENT_BILLSAFE_2_TEXT_TITLE', 'Kauf auf Rechnung mit BillSAFE');
define('MODULE_PAYMENT_BILLSAFE_2_CHECKOUT_TEXT_INFO', 'Bezahlen Sie bequem per Rechnung. Ganz einfach und unbürokratisch mit BillSAFE, einem Service von PayPal.');
*/
define('MODULE_PAYMENT_BILLSAFE_2_TEXT_TITLE', 'Rechnung');
define('MODULE_PAYMENT_BILLSAFE_2_CHECKOUT_TEXT_INFO', 'Kaufen Sie jetzt auf Rechnung und begutachten Sie Ihre Einkäufe in Ruhe bevor Sie bezahlen.');
// EOF - Changed to white label solution
define('MODULE_PAYMENT_BILLSAFE_2_SCHG_TEXT_INFO', 'Für diese Zahlweise erheben wir einen Zuschlag von: ');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_COMMON', 'Leider ist der Rechnungskauf über BillSAFE nicht möglich. Bitte wählen Sie eine andere Zahlungsweise.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_101', 'BillSAFE steht derzeit leider nicht zur Verfügung, bitte wählen Sie eine andere Zahlungsweise.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_101', 'Für diese Transaktion steht die Zahlart BillSAFE nicht zur Verfügung. Bitte wählen Sie eine andere Zahlungsweise.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_102', 'Bei der Datenübertragung ist ein Fehler aufgetreten. Bitte kontaktieren Sie uns.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_215', 'Bei der Datenübertragung sind nicht alle erforderlichen Parameter übergeben worden. Bitte kontaktieren Sie uns.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_216', 'Bei der Datenübertragung sind ungültige Parameter übergeben worden. Bitte kontaktieren Sie uns.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_COMPANY', 'Die Zahlung über BillSAFE ist leider nur für Privatpersonen möglich.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_ADDRESS', 'Die Zahlung über BillSAFE ist leider nicht bei abweichender Lieferadresse möglich.');
define('MODULE_PAYMENT_BILLSAFE_2_ERROR_MESSAGE_INLINE', 'Sie haben nicht alle Pflichtangaben gemacht. Bitte überprüfen Sie Ihre Angaben zur gewählten Zahlweise!');
define('MODULE_PAYMENT_BILLSAFE_2_STATUS_TEXT', 'Status');
define('MODULE_PAYMENT_BILLSAFE_2_TRANSACTIONID', 'BillSAFE Transaktions-ID');
define('MODULE_PAYMENT_BILLSAFE_2_CODE_TEXT', 'Code');
define('MODULE_PAYMENT_BILLSAFE_2_MESSAGE_TEXT', 'Message');
ca. Zeile 51
define('MODULE_PAYMENT_BILLSAFE_2_MERCHANT_ID_TITLE', 'Merchant-ID');
define('MODULE_PAYMENT_BILLSAFE_2_MERCHANT_ID_DESC', 'Die Merchant-ID, die mit der BillSAFE-API genutzt wird.');
define('MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE_TITLE', 'Merchant-License');
define('MODULE_PAYMENT_BILLSAFE_2_MERCHANT_LICENSE_DESC', 'Die Merchant-License, die mit der BillSAFE-API genutzt wird.');
define('MODULE_PAYMENT_BILLSAFE_2_PKEY_TITLE', 'Public Key');
define('MODULE_PAYMENT_BILLSAFE_2_PKEY_DESC', 'Von BillSAFE bereitgestellter Sicherheitscode. Sie können Ihren Code im Händlerportal einsehen.');
define('MODULE_PAYMENT_BILLSAFE_2_MIN_ORDER_TITLE', 'Mindest-Bestellwert');
define('MODULE_PAYMENT_BILLSAFE_2_MIN_ORDER_DESC', 'Betrag, ab dem Kauf auf Rechnung mit BillSAFE angeboten wird.');
define('MODULE_PAYMENT_BILLSAFE_2_MAX_ORDER_TITLE', 'Höchst-Bestellwert');
define('MODULE_PAYMENT_BILLSAFE_2_MAX_ORDER_DESC', 'Betrag, bis zu dem Kauf auf Rechnung mit BillSAFE angeboten wird.');
ca. Zeile 134
define('MODULE_PAYMENT_BILLSAFE_2_DAY', 'Tag');
define('MODULE_PAYMENT_BILLSAFE_2_MONTH', 'Monat');
define('MODULE_PAYMENT_BILLSAFE_2_YEAR', 'Jahr');
define('MODULE_PAYMENT_BILLSAFE_2_LAYER_TITLE', 'Payment Layer');
define('MODULE_PAYMENT_BILLSAFE_2_LAYER_DESC', 'Möchten Sie den Layer-Modus für Zahlungen per BillSAFE aktivieren? <b>Achtung: Unbedingt in den <i>Sessions</i>-Einstellungen den Parameter <i>Cookie Benutzung bevorzugen</i> auf <i>False</i> setzen!</b>');
define('MODULE_PAYMENT_BILLSAFE_2_LAYER_DESC', 'Möchten Sie den Layer-Modus für Zahlungen per BillSAFE aktivieren? <b>Hinweis: Funktioniert nicht zusammen mit Inline-Checkout! Achtung: Unbedingt in den <i>Sessions</i>-Einstellungen den Parameter <i>Cookie Benutzung bevorzugen</i> auf <i>False</i> setzen!</b>');
define('MODULE_PAYMENT_BILLSAFE_2_INLINE_TITLE', 'Onsite Checkout');
define('MODULE_PAYMENT_BILLSAFE_2_INLINE_DESC', 'Möchten Sie den Onsite Checkout für Zahlungen per BillSAFE aktivieren? <b>Hinweis: Funktioniert nicht zusammen mit dem Payment Layer! Für diese Funktionalität ist eine Zusatzvereinbarung mit BillSAFE erforderlich.</b>');
define('MODULE_PAYMENT_BILLSAFE_2_DOB', 'Bitte geben Sie hier noch Ihr Geburtsdatum ein (z. B. 21.05.1970):');
define('MODULE_PAYMENT_BILLSAFE_2_TC', '<b>Ich stimme den <a class="info" href="https://www.billsafe.de/privacy-policy/buyer" target="_blank">Datenschutzgrundsätzen</a> und der <a class="info" href="https://www.billsafe.de/privacy-policy/credit-check" target="_blank">Bonitätsprüfung</a> von <a class="info" href="https://www.billsafe.de/imprint" target="_blank">PayPal</a> zu. Es gelten die <a class="info" href="https://www.billsafe.de/resources/docs/pdf/Kaeufer_AGB.pdf" target="_blank">Allgemeinen Nutzungsbedingungen</a> für den Rechnungskauf.</b>');
?>
lang/german/modules/payment/payone.phpTop ca. Zeile 17
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
define('MODULE_PAYMENT_PAYONE_TEXT_TITLE', 'PayOne');
define('MODULE_PAYMENT_PAYONE_TEXT_DESCRIPTION', 'PayOne lorem ipsum');
define('MODULE_PAYMENT_PAYONE_TEXT_INFO', 'PayOne ...');
//define('MODULE_PAYMENT_PAYONE_TEXT_TITLE', 'PayOne');
//define('MODULE_PAYMENT_PAYONE_TEXT_DESCRIPTION', 'PayOne lorem ipsum');
//define('MODULE_PAYMENT_PAYONE_TEXT_INFO', 'PayOne ...');
define('MODULE_PAYMENT_PAYONE_STATUS_TITLE', 'Modul aktivieren');
define('MODULE_PAYMENT_PAYONE_STATUS_DESC', 'Möchten Sie Zahlungen über dieses Modul akzeptieren?');
define('MODULE_PAYMENT_PAYONE_ALLOWED_TITLE', 'Erlaubte Zonen');
define('MODULE_PAYMENT_PAYONE_ALLOWED_DESC', 'Geben Sie <b>einzeln</b> die Zonen an, welche für dieses Modul erlaubt sein sollen. (z.B. AT,DE (wenn leer, werden alle Zonen erlaubt))');
lang/german/modules/payment/payone_cc.phpTop ca. Zeile 20
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_CC_TEXT_TITLE', 'Kreditkarten');
define('MODULE_PAYMENT_PAYONE_CC_TEXT_DESCRIPTION', 'Zahlung mit Kreditkarten über PayOne');
define('MODULE_PAYMENT_PAYONE_CC_TEXT_INFO', 'Zahlen Sie mit Ihrer Kreditkarte');
define('MODULE_PAYMENT_PAYONE_CC_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_CC_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_CC_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
lang/german/modules/payment/payone_cod.phpTop ca. Zeile 20
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_COD_TEXT_TITLE', 'Nachnahme');
define('MODULE_PAYMENT_PAYONE_COD_TEXT_DESCRIPTION', 'Zahlung per Nachnahme über PayOne');
define('MODULE_PAYMENT_PAYONE_COD_TEXT_INFO', 'Nachnahme-Zahlung');
define('MODULE_PAYMENT_PAYONE_COD_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_COD_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_COD_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
lang/german/modules/payment/payone_elv.phpTop ca. Zeile 20
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_ELV_TEXT_TITLE', 'Lastschrift');
define('MODULE_PAYMENT_PAYONE_ELV_TEXT_DESCRIPTION', 'ELV-Zahlung über PayOne');
define('MODULE_PAYMENT_PAYONE_ELV_TEXT_INFO', 'Zahlung per Lastschrift');
define('MODULE_PAYMENT_PAYONE_ELV_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_ELV_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_ELV_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
lang/german/modules/payment/payone_installment.phpTop ca. Zeile 20
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_TEXT_TITLE', 'Ratenkauf/Finanzierung');
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_TEXT_DESCRIPTION', 'Ratenkauf/Finanzierung über PayOne');
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_TEXT_INFO', 'Zahlung per Ratenkauf/Finanzierung');
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_INSTALLMENT_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
lang/german/modules/payment/payone_invoice.phpTop ca. Zeile 20
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_INVOICE_TEXT_TITLE', 'Rechnung');
define('MODULE_PAYMENT_PAYONE_INVOICE_TEXT_DESCRIPTION', 'Zahlung auf Rechnung über PayOne');
define('MODULE_PAYMENT_PAYONE_INVOICE_TEXT_INFO', 'Zahlung auf Rechnung');
define('MODULE_PAYMENT_PAYONE_INVOICE_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_INVOICE_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_INVOICE_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
lang/german/modules/payment/payone_otrans.phpTop ca. Zeile 19
---------------------------------------------------------------------------------------*/
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_OTRANS_TEXT_TITLE', 'Onlineüberweisung');
define('MODULE_PAYMENT_PAYONE_OTRANS_TEXT_DESCRIPTION', 'Zahlung per Onlineüberweisung über PayOne');
define('MODULE_PAYMENT_PAYONE_OTRANS_TEXT_INFO', 'Zahlung per Onlineüberweisung');
define('MODULE_PAYMENT_PAYONE_OTRANS_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_OTRANS_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_OTRANS_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
define('MODULE_PAYMENT_PAYONE_OTRANS_ALLOWED_DESC', MODULE_PAYMENT_PAYONE_ALLOWED_DESC);
lang/german/modules/payment/payone_prepay.phpTop ca. Zeile 20
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_PREPAY_TEXT_TITLE', 'Vorkasse');
define('MODULE_PAYMENT_PAYONE_PREPAY_TEXT_DESCRIPTION', 'Zahlung per Vorkasse über PayOne');
define('MODULE_PAYMENT_PAYONE_PREPAY_TEXT_INFO', 'Vorkasse-Zahlung');
define('MODULE_PAYMENT_PAYONE_PREPAY_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_PREPAY_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_PREPAY_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
lang/german/modules/payment/payone_wlt.phpTop ca. Zeile 20
require_once (dirname(__FILE__).'/payone.php');
define('MODULE_PAYMENT_PAYONE_WLT_TEXT_TITLE', 'PayPal');
define('MODULE_PAYMENT_PAYONE_WLT_TEXT_DESCRIPTION', 'Zahlung per e-Wallet über PayOne');
define('MODULE_PAYMENT_PAYONE_WLT_TEXT_INFO', 'Zahlung per e-Wallet (PayPal)');
define('MODULE_PAYMENT_PAYONE_WLT_STATUS_TITLE', MODULE_PAYMENT_PAYONE_STATUS_TITLE);
define('MODULE_PAYMENT_PAYONE_WLT_STATUS_DESC', MODULE_PAYMENT_PAYONE_STATUS_DESC);
define('MODULE_PAYMENT_PAYONE_WLT_ALLOWED_TITLE', MODULE_PAYMENT_PAYONE_ALLOWED_TITLE);
lang/german/modules/payment/shopgate.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
include_once DIR_FS_CATALOG.'includes/external/shopgate/base/lang/german/modules/payment/shopgate.php';
lang/german/modules/payment/sofort_ideal.phpTop ca. Zeile 1
<?php
/**
* @version SOFORT Gateway 5.2.0 - $Date: 2012-09-06 14:27:56 +0200 (Thu, 06 Sep 2012) $
* @author SOFORT AG (integration@sofort.com)
* @link http://www.sofort.com/
*
* Copyright (c) 2012 SOFORT AG
*
* $Id: sofort_ideal.php 3751 2012-10-10 08:36:20Z gtb-modified $
*/
//include language-constants for used in all Multipay Projects - NOTICE: iDEAL is not Multipay
require_once 'sofort_general.php';
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TEXT_TITLE', 'iDEAL <br /><img src="https://images.sofort.com/de/ideal/logo_90x30.png" alt="Logo iDEAL"/>');
define('MODULE_PAYMENT_SOFORT_IDEAL_TEXT_TITLE', 'iDEAL');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_RECOMMENDED_PAYMENT_TEXT', '(Empfohlene Zahlungsweise)');
//alle im Shopsystem einstellbaren Params
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_STATUS_TITLE', 'iDEAL-Modul aktivieren');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_RECOMMENDED_PAYMENT_TITLE', 'Empfohlene Zahlungsweise');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_AUTH_DESC', "<script>function t(){k = document.getElementsByName(\"configuration[MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_CONFIGURATION_KEY]\")[0].value;window.open(\"../callback/sofort/testAuth.php?k=\"+k);}</script><input type=\"button\" onclick=\"t()\" value=\"Test\" />"); //max 255 signs
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_ZONE_TITLE' , MODULE_PAYMENT_SOFORT_MULTIPAY_ZONE_TITLE);
define('MODULE_PAYMENT_SOFORT_IDEAL_ALLOWED_TITLE' , 'Zahlungszone');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_CANCELED_ORDER_STATUS_ID_TITLE', 'Bestellstatus bei abgebrochener Zahlung');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_SORT_ORDER_TITLE', 'Anzeigereihenfolge');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_PROJECT_PASSWORD_TITLE', 'Projekt-Passwort');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_NOTIFICATION_PASSWORD_TITLE', 'Benachrichtigungs-Passwort');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_REASON_1_TITLE', 'Verwendungszweck 1');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_REASON_2_TITLE', 'Verwendungszweck 2');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_IMAGE_TITLE', 'Logo+Text');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_STATUS_DESC', 'Aktiviert/deaktiviert das komplette Modul');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_RECOMMENDED_PAYMENT_DESC', 'iDEAL zur empfohlenen Zahlungsmethode machen');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_SORT_ORDER_DESC', 'Reihenfolge der Anzeige. Kleinste Ziffer wird zuerst angezeigt.');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_PROJECT_PASSWORD_DESC', 'Von SOFORT AG zugewiesenes Projekt-Passwort');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_NOTIFICATION_PASSWORD_DESC', 'Von SOFORT AG zugewiesenes Benachrichtigungs-Passwort');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_REASON_1_DESC', 'Verwendungszweck 1');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_REASON_2_DESC', 'Verwendungszweck 2');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_IMAGE_DESC', 'Banner oder Text bei der Auswahl der Zahlungsoptionen');
//////////////////////////////////////////////////////////////////////////////////////////////
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TEXT_PUBLIC_TITLE', 'SOFORT AG - iDEAL');
/* -----------------------------------------------------------------------------------------
$Id$
modified eCommerce Shopsoftware
http://www.modified-shop.org
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_IMAGE', '
Copyright (c) 2009 - 2013 [www.modified-shop.org]
-----------------------------------------------------------------------------------------
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
$sofort_code = 'SOFORT_IDEAL';
define('MODULE_PAYMENT_'.$sofort_code.'_TEXT_TITLE', 'iDEAL <br /><img src="https://images.sofort.com/de/ideal/logo_90x30.png" alt="Logo iDEAL"/>');
define('MODULE_PAYMENT_'.$sofort_code.'_TEXT_DESCRIPTION', '<b>iDEAL</b><br />Sobald der Kunde diese Zahlungsart und seine Bank ausgewählt hat, wird er durch die SOFORT AG auf seine Bank weitergeleitet. Dort tätigt er seine Zahlung und wird danach wieder auf das Shopsystem zurückgeleitet. Bei erfolgreicher Zahlungsbestätigung findet durch die SOFORT AG ein sog. Callback auf das Shopsystem statt, der den Zahlungsstatus der Bestellung entsprechend ändert.<br />Bereitgestellt durch die SOFORT AG');
define('MODULE_PAYMENT_'.$sofort_code.'_TEXT_INFO', 'iDEAL.nl - Online-Überweisungen für den elektronischen Handel in den Niederlanden. Für die Bezahlung mit iDEAL benötigen Sie ein Konto bei einer der genannten Banken. Sie nehmen die Überweisung direkt bei Ihrer Bank vor. Dienstleistungen/Waren werden bei Verfügbarkeit SOFORT geliefert bzw. versendet!');
// checkout
define('MODULE_PAYMENT_'.$sofort_code.'_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_IMAGE', '
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><a href="http://www.ideal.nl" target="_blank">{{image}}</a></td>
<td style="padding-left:30px;">' . MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_SELECTBOX_TITLE . '{{selectbox}}</td>
<td valign="bottom">
<a onclick="javascript:window.open(\'http://www.ideal.nl\',\'Information\',\'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=1020, height=900\');" style="float:left; width:auto;">{{image}}</a>
</td>
</tr>
<tr>
<td colspan="2" class="main"><br />{{text}}</td>
<td class="main">{{text}}</td>
</tr>
</table>');
define('MODULE_PAYMENT_'.$sofort_code.'_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_IMAGEALT', 'iDeal');
define('MODULE_PAYMENT_'.$sofort_code.'_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_TEXT', '
<ul>
<li>Online-Überweisungen für den elektronischen Handel in den Niederlanden</li>
<li>Für die Bezahlung mit iDEAL benötigen Sie ein Konto bei einer der genannten Banken</li>
<li>Sie nehmen die Überweisung direkt bei Ihrer Bank vor</li>
<li>Dienstleistungen/Waren werden bei Verfügbarkeit SOFORT geliefert bzw. versendet</li>
</ul>');
// admin
define('MODULE_PAYMENT_'.$sofort_code.'_STATUS_TITLE', 'iDeal Modul aktivieren');
define('MODULE_PAYMENT_'.$sofort_code.'_STATUS_DESC', 'Möchten Sie Zahlungen per iDeal akzeptieren?');
define('MODULE_PAYMENT_SOFORT_IDEAL_CLASSIC_CHECKOUT_CONFIRMATION', '
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main">
</td>
</tr>
</table>');
include(DIR_FS_CATALOG.'lang/'.$_SESSION['language'].'/modules/payment/sofort_payment.php');
?>
password_double_opt.phpTop ca. Zeile 204
$smarty->assign('INPUT_EMAIL', xtc_draw_input_field('email', xtc_db_input(isset($_POST['email']) ? $_POST['email'] : ''), '', 'text', false));
// EOF - DokuMan - 2010-10-28 - added missing arguments for xtc_draw_input_field
$smarty->assign('INPUT_CODE', xtc_draw_input_field('vvcode', '', 'size="8" maxlength="6"', 'text', '', false));
$smarty->assign('BUTTON_SEND', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_LOGIN));
$smarty->assign('BUTTON_SEND', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
$smarty->assign('FORM_END', '</form>');
$main_content = $smarty->fetch(CURRENT_TEMPLATE.'/module/password_double_opt_in.html');
break;
}
paypal_checkout.phpTop ca. Zeile 34
require_once(DIR_FS_INC . 'xtc_check_stock.inc.php');
require_once(DIR_FS_INC . 'xtc_display_tax_value.inc.php');
require_once(DIR_FS_INC . 'xtc_get_attributes_model.inc.php');
// BOF - Tomcraft - 2009-10-02 - Include "Single Price" in checkout_confirmation
require (DIR_WS_LANGUAGES.$_SESSION['language'].'/checkout_confirmation.php');
// EOF - Tomcraft - 2009-10-02 - Include "Single Price" in checkout_confirmation
require(DIR_WS_CLASSES.'http_client.php');
unset($_SESSION['tmp_oID']);
if (isset($_GET['error_message'])) { //Dokuman - 2012-05-31 - fix paypal_checkout notices
ca. Zeile 226
xtc_redirect(xtc_href_link(FILENAME_PAYPAL_CHECKOUT, '', 'SSL'));
}
}
if($kein_versand==1)$_SESSION['shipping'] = false;
if($kein_versand==1) {
$_SESSION['shipping'] = false;
}
// get all available shipping quotes
$quotes = $shipping_modules->quote();
// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
ca. Zeile 272
$smarty->assign('ADDRESS_SHIPPING_LABEL', xtc_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, ' ', '<br />'));
$smarty->assign('BUTTON_CONTINUE', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
$smarty->assign('FORM_END', '</form>');
$smarty->assign('ADDRESS_PAYMENT_LABEL', xtc_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, ' ', '<br />'));
$smarty->assign('PRODUCTS_EDIT', xtc_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL')); // web28 - 2011-04-14 - change SSL -> NONSSL
if(PAYPAL_EXPRESS_ADDRESS_CHANGE == 'true') {
$smarty->assign('BUTTON_SHIPPING_ADDRESS', '<a href="'.xtc_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL').'">'.xtc_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS).'</a>');
$smarty->assign('SHIPPING_ADDRESS_EDIT', xtc_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL'));
$smarty->assign('BUTTON_PAYMENT_ADDRESS', '<a href="' . xtc_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . xtc_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>');
$smarty->assign('PAYMENT_ADDRESS_EDIT', xtc_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'));
}
$module_smarty = new Smarty;
if(xtc_count_shipping_modules() > 0) {
$showtax = $_SESSION['customers_status']['customers_status_show_price_tax'];
ca. Zeile 404
}
$smarty->assign('products_data', $temp_prods);
if(MODULE_ORDER_TOTAL_INSTALLED) {
$smarty->assign('total_block', $order_total_modules->pp_output());
$order_total_modules->process();
$total_block = $order_total_modules->output();
$smarty->assign('TOTAL_BLOCK', $total_block);
}
if(isset($checkout_payment_modules->modules) && is_array($checkout_payment_modules->modules)) { //Dokuman - 2012-05-31 - fix paypal_checkout notices
if($confirmation = $checkout_payment_modules->confirmation()) {
ca. Zeile 477
}
//check if display conditions on checkout page is true
if(DISPLAY_REVOCATION_ON_CHECKOUT == 'true') {
if(GROUP_CHECK == 'true') {
$group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'";
}
$shop_content_query = "SELECT
content_title,
content_heading,
content_text,
content_file
FROM " . TABLE_CONTENT_MANAGER . "
WHERE content_group='" . REVOCATION_ID . "' " . $group_check . "
AND languages_id='" . $_SESSION['languages_id'] . "'";
$shop_content_query = xtc_db_query($shop_content_query);
if($shop_content_query) {
$shop_content_data = xtc_db_fetch_array($shop_content_query);
if($shop_content_data['content_file'] != '') {
ob_start();
if(strpos($shop_content_data['content_file'], '.txt'))
echo '<pre>';
include(DIR_FS_CATALOG . 'media/content/' . $shop_content_data['content_file']);
if(strpos($shop_content_data['content_file'], '.txt'))
echo '</pre>';
$revocation = ob_get_contents();
ob_end_clean();
} else {
$revocation = $shop_content_data['content_text'];
}
$smarty->assign('REVOCATION', $revocation);
//revocation
$shop_content_data = $main->getContentData(REVOCATION_ID);
$smarty->assign('REVOCATION', $shop_content_data['content_text']);
$smarty->assign('REVOCATION_TITLE', $shop_content_data['content_heading']);
$smarty->assign('REVOCATION_LINK', $main->getContentLink(REVOCATION_ID, MORE_INFO));
}
$smarty->assign('REVOCATION_LINK', $main->getContentLink(REVOCATION_ID, MORE_INFO,'SSL'));
//agb
$shop_content_data = $main->getContentData(3);
$smarty->assign('AGB_TITLE', $shop_content_data['content_heading']);
$smarty->assign('AGB_LINK', $main->getContentLink(3, MORE_INFO,'SSL'));
$smarty->assign('TEXT_AGB_CHECKOUT', sprintf(TEXT_AGB_CHECKOUT,$main->getContentLink(3, MORE_INFO,'SSL') , $main->getContentLink(REVOCATION_ID, MORE_INFO,'SSL')));
}
// August 2012 Zollkosten als Muster mit Group ID 15
/*
robots.txtTop ca. Zeile 12
Disallow: /pub/
Disallow: /shopstat/
Disallow: /templates/
Disallow: /templates_c/
Allow: /templates/*/*.css
Allow: /templates/*/*.js
Allow: /templates/*/*.ico
Allow: /templates/*/*.gif
Allow: /templates/*/*.jpg
Allow: /templates/*/*.jpeg
Allow: /templates/*/*.png
send_order.phpTop ca. Zeile 107
$smarty->assign('COMMENTS', $order->info['comments']);
$smarty->assign('EMAIL', $order->customer['email_address']);
$smarty->assign('PHONE',$order->customer['telephone']);
$smarty->assign('vatID', $order->customer['vat_id']);
//BOF - web28 - 2010-03-27 PayPal Bezahl-Link
unset ($_SESSION['paypal_link']);
if ($order->info['payment_method'] == 'paypal_ipn') {
ca. Zeile 205
$smarty->assign('img_path', HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_IMAGES.'product_images/'. (defined('SHOW_IMAGES_IN_EMAIL_DIR')? SHOW_IMAGES_IN_EMAIL_DIR : 'thumbnail').'_images/');
// dont allow cache
$smarty->caching = 0;
// BOF - Tomcraft - 2011-06-17 - Added revocation to email
$shop_content_data = $main->getContentData(REVOCATION_ID);
$revocation = $shop_content_data['content_text'];
$smarty->assign('REVOCATION_HTML', $revocation);
$smarty->assign('REVOCATION_TXT', $revocation); //replace br, strip_tags, html_entity_decode are allready execute in xtc_php_mail function
// EOF - Tomcraft - 2011-06-17 - Added revocation to email
// revocation to email
require_once (DIR_FS_INC . 'get_lang_id_by_directory.inc.php');
$lang_id = ((isset($order->info['languages_id']) && $order->info['languages_id'] != '0') ? $order->info['languages_id'] : get_lang_id_by_directory($order->info['language']));
$shop_content_data = $main->getContentData(REVOCATION_ID, $lang_id, $order->info['status']);
$smarty->assign('REVOCATION_HTML', $shop_content_data['content_text']);
$smarty->assign('REVOCATION_TXT', $shop_content_data['content_text']);
// agb to email
$shop_content_data = $main->getContentData(3, $lang_id, $order->info['status']);
$smarty->assign('AGB_HTML', $shop_content_data['content_text']);
$smarty->assign('AGB_TXT', $shop_content_data['content_text']);
$html_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$order->info['language'].'/order_mail.html');
$txt_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$order->info['language'].'/order_mail.txt');
shop_content.phpTop ca. Zeile 16
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
require ('includes/application_top.php');
// redirect contact form to SSL if available
if (ENABLE_SSL == true && $request_type == 'NONSSL' && !isset($_GET['action']) && $_GET['coID'] == '7') {
xtc_redirect(xtc_href_link(FILENAME_CONTENT, 'coID='.(int) $_GET['coID'], 'SSL'));
}
// create smarty elements
$smarty = new Smarty;
// include boxes
require (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/boxes.php');
shopgate.phpTop ca. Zeile 1
<?php
/**
* Shopgate GmbH
*
* URHEBERRECHTSHINWEIS
*
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
*
* COPYRIGHT NOTICE
*
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
* for the purpose of facilitating communication between the IT system of the customer and the IT system
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
*
* @author Shopgate GmbH <interfaces@shopgate.com>
*/
if (!defined('_VALID_XTC')) {
define('_VALID_XTC', true);
}
$shopgatePath = dirname(__FILE__).'/includes/external/shopgate';
date_default_timezone_set("Europe/Berlin");
include_once $shopgatePath.'/shopgate_library/shopgate.php';
ob_start();
include_once('includes/application_top.php');
ob_end_clean();
include_once $shopgatePath.'/plugin.php';
$ShopgateFramework = new ShopgateModifiedPlugin();
$ShopgateFramework->handleRequest( $_REQUEST );
templates/xtc5/admin/billsafe_print_order.htmlTop ca. Zeile 3
<html>
<head>
<title>{#title#} {$oID}</title>
<meta http-equiv="Content-Type" content="text/html; charset={$charset}">
<style type="text/css">
{literal}
body {font-family: Verdana, Arial, Helvetica, sans-serif;}
.small {font-size: 0.6em;}
.normal {font-size: 0.8em;}
.large {font-size: 1em; font-weight:bold;}
td .border {border-right: 2px solid; border-bottom: 2px solid; border-color: #fff;}
{/literal}
</style>
</head>
<body onload="window.print()">
<table width="100%" border="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$address_label_customer}<br>
<br>
{if $csID}<strong>{#csID#}</strong>{$csID}<br>{/if}
<strong>{#payment#}</strong> {$PAYMENT_METHOD}<br>
<strong>{#order#}</strong> {$oID}<br>
<strong>{#date#}</strong> {$DATE}<br>
</font></td>
<td width="1"><img src="{$logo_path}logo.gif"></td>
<td>
<p> </p>
<p> </p>
<p class="small" style="text-decoration:underline;">{$store_name}</p>
<p class="normal">{$address_label_customer}</p>
<p> </p>
<p class="small">
{if $csID}<strong>{#csID#}</strong> {$csID}<br />{/if}
<strong>{#payment#}</strong> {$PAYMENT_METHOD}<br />
<strong>{#order#}</strong> {$oID}<br />
<strong>{#date#}</strong> {$DATE}
{if $vatID}<br /><strong>{#vatID#}</strong> {$vatID}{/if}
</p>
<p class="large">{#invoice#}</p>
</td>
<td width="1"><img src="{$logo_path}logo.gif" alt="{$store_name}" /></td>
</tr>
</table>
<br>
<table style="border-top:1px solid; border-bottom:1px solid;" width="100%" border="0">
<br />
<table class="small" style="border-top:1px solid; border-bottom:1px solid;" width="100%" border="0">
<tr bgcolor="#f1f1f1">
<td width="50%">
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>
{#shipping_address#}
</strong><br>
</font></p></td>
<p><strong>{#shipping_address#}</strong></p>
</td>
<td>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>
{if $address_label_payment}{#payment_address#}{/if}
</strong><br>
</font> </p></td>
<p><strong>{if $address_label_payment}{#payment_address#}{/if}</strong></p>
</td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$address_label_shipping}
</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$address_label_payment}
</font></td>
<td>{$address_label_shipping}</td>
<td>{$address_label_payment}</td>
</tr>
</table>
<p> </p></td>
<p> </p>
</td>
</tr>
</table>
<table style="border-bottom:1px solid;" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>{#heading_products#}</strong></font></td>
<td class="small"><strong>{#heading_products#}</strong></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="f1f1f1">
<table class="small" width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="f1f1f1">
<tr>
<td colspan="2" style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{#head_units#}</font></strong></div></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{#head_products#}</font></strong></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{#head_artnr#}</font></strong></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;" width="150"><div align="right"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{#head_price#}</font></strong></div></td>
<td colspan="2" class="border"><div align="center"><strong>{#head_units#}</strong></div></td>
<td class="border"><strong>{#head_products#}</strong></td>
<td class="border"><strong>{#head_artnr#}</strong></td>
<td class="border" width="150"><div align="right"><strong>{#head_single_price#}</strong></div></td>
<td class="border" width="150"><div align="right"><strong>{#head_price#}</strong></div></td>
</tr>
{foreach name=aussen item=order_values from=$order_data}
<tr>
<td width="20" style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$order_values.PRODUCTS_QTY}</font></div></td>
<td width="20" style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">x</font></div></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>{$order_values.PRODUCTS_NAME}</strong><em>{$order_values.PRODUCTS_ATTRIBUTES}</em></font></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$order_values.PRODUCTS_MODEL}<em>{$order_values.PRODUCTS_ATTRIBUTES_MODEL}</em></font></td>
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;" width="150"><div align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$order_values.PRODUCTS_PRICE}</font></div></td>
<td width="20" class="border"><div align="center">{$order_values.PRODUCTS_QTY}</div></td>
<td width="20" class="border"><div align="center">x</div></td>
<td class="border"><strong>{$order_values.PRODUCTS_NAME}</strong>
{if ACTIVATE_SHIPPING_STATUS == 'true'}
{if $order_values.PRODUCTS_SHIPPING_TIME neq ''}<br />{#text_shippingtime#} {$order_values.PRODUCTS_SHIPPING_TIME}
{/if}
{/if}<br /><em>{$order_values.PRODUCTS_ATTRIBUTES}</em>
</td>
<td class="border">{$order_values.PRODUCTS_MODEL}<em>{$order_values.PRODUCTS_ATTRIBUTES_MODEL}</em></td>
<td width="150" class="border"><div align="right">{$order_values.PRODUCTS_SINGLE_PRICE}</div></td>
<td width="150" class="border"><div align="right">{$order_values.PRODUCTS_PRICE}</div></td>
</tr>
{/foreach} </table>
{/foreach}
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td nowrap> <table width="100%" border="0" cellpadding="3" cellspacing="0">
<td nowrap>
<table width="100%" border="0" cellpadding="3" cellspacing="0">
{foreach name=aussen item=order_total_values from=$order_total}
<tr>
<td nowrap width="100%" style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><div align="right"><font size="1" face="Arial, Helvetica, sans-serif">{$order_total_values.TITLE}
{$order_total_values.TEXT}</font></div></td>
<td nowrap width="100%" class="small">
<div align="right">
{$order_total_values.TITLE}{$order_total_values.TEXT}
</div>
</td>
</tr>
{/foreach} </table></td>
{/foreach}
</table>
</td>
</tr>
{if $COMMENTS}
<tr>
<td>
<table style="border-bottom:1px solid;" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="small">
<br /><br /><strong>{#comments#}</strong> {$COMMENTS}
</td>
</tr>
</table>
</td>
</tr>
{/if}
</table>
<br />
<font size="1" face="Verdana, Arial, Helvetica, sans-serif">
{if $BillsafeType == 'invoice'}
{$BillsafeText}<br />
{$BillsafeText2}<br />
<br />
</font>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$recipient}</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$recipientValue}</font></td>
<td>{$recipient}</td>
<td>{$recipientValue}</td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$account}</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$accountValue}</font></td>
<td>{$account}</td>
<td>{$accountValue}</td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$bankcode}</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$bankcodeValue}</font></td>
<td>{$bankcode}</td>
<td>{$bankcodeValue}</td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$bank}</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$bankValue}</font></td>
<td>{$bank}</td>
<td>{$bankValue}</td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$bic}</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$bicValue}</font></td>
<td>{$bic}</td>
<td>{$bicValue}</td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$iban}</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$ibanValue}</font></td>
<td>{$iban}</td>
<td>{$ibanValue}</td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$amount}</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$amountValue}</font></td>
<td>{$amount}</td>
<td>{$amountValue}</td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$reference}</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$referenceValue}</font></td>
<td>{$reference}</td>
<td>{$referenceValue}</td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$referenceUrl}</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">{$referenceUrlValue}</font></td>
<td>{$referenceUrl}</td>
<td>{$referenceUrlValue}</td>
</tr>
</table>
{elseif $BillsafeType == 'installment'}
{$BillsafeText2}<br />
<br />
{/if}
</font>
</body>
</html>
templates/xtc5/admin/mail/english/change_order_mail.htmlTop ca. Zeile 17
<br />
New status:
<b>{$ORDER_STATUS}</b><br />
<br />
{if $PARCEL_COUNT > 0}
<br /><br />
Your shipment consists of {$PARCEL_COUNT} parcel(s).<br />
You can inform yourself about the delivery status with a click on the following package number(s):<br />
{foreach name=aussen item=tracking_data from=$PARCEL_ARRAY}
<a target="_blank" href="{$tracking_data.tracking_link}">{$tracking_data.parcel_id}</a><br />
{/foreach}
{/if}
If you have any questions, please reply to this e-mail. <br /></font></td>
</tr>
</table>
templates/xtc5/admin/mail/english/change_order_mail.txtTop ca. Zeile 9
{if $NOTIFY_COMMENTS}Note:{$NOTIFY_COMMENTS}{/if}
New status: {$ORDER_STATUS}
{if $PARCEL_COUNT > 0}
Your shipment consists of {$PARCEL_COUNT} parcel(s).
You can inform yourself about the delivery status with a click on the following package number(s):
{foreach name=aussen item=tracking_data from=$PARCEL_ARRAY}
{$tracking_data.tracking_link}
{/foreach}{/if}
If you have any questions, please reply to this e-mail.
templates/xtc5/admin/mail/german/change_order_mail.htmlTop ca. Zeile 18
<br />
Neuer Status:
<b>{$ORDER_STATUS}</b><br />
<br />
{if $PARCEL_COUNT > 0}
<br /><br />
Die Sendung besteht aus {$PARCEL_COUNT} Paket(en).<br />
Sie können sich über den Zustellstatus durch einen Klick auf die nachstende(n) Paketnummer(n) informieren:<br />
{foreach name=aussen item=tracking_data from=$PARCEL_ARRAY}
<a target="_blank" href="{$tracking_data.tracking_link}">{$tracking_data.parcel_id}</a><br />
{/foreach}
{/if}
Bei Fragen zu Ihrer Bestellung antworten Sie bitte auf diese E-Mail. <br />
</font></td>
</tr>
</table>
templates/xtc5/admin/mail/german/change_order_mail.txtTop ca. Zeile 9
{if $NOTIFY_COMMENTS}Anmerkungen und Kommentare zu Ihrer Bestellung:{$NOTIFY_COMMENTS}{/if}
Neuer Status: {$ORDER_STATUS}
{if $PARCEL_COUNT > 0}
Die Sendung besteht aus {$PARCEL_COUNT} Paket(en).
{foreach name=aussen item=tracking_data from=$PARCEL_ARRAY}
{$tracking_data.tracking_link}
{/foreach}{/if}
Bei Fragen zu Ihrer Bestellung antworten Sie bitte auf diese E-Mail.
templates/xtc5/admin/print_order.htmlTop ca. Zeile 29
<p class="small">
{if $csID}<strong>{#csID#}</strong> {$csID}<br />{/if}
<strong>{#payment#}</strong> {$PAYMENT_METHOD}<br />
<strong>{#order#}</strong> {$oID}<br />
<strong>{#date#}</strong> {$DATE}<br />
<strong>{#date#}</strong> {$DATE}
{if $vatID}<br /><strong>{#vatID#}</strong> {$vatID}{/if}
</p>
<p class="large">{#invoice#}</p>
</td>
<td width="1"><img src="{$logo_path}logo.gif" alt=""></td>
<td width="1"><img src="{$logo_path}logo.gif" alt="{$store_name}" /></td>
</tr>
</table>
<br />
<table class="small" style="border-top:1px solid; border-bottom:1px solid;" width="100%" border="0">
ca. Zeile 77
<td class="border"><strong>{$order_values.PRODUCTS_NAME}</strong>
{if ACTIVATE_SHIPPING_STATUS=='true'}
{if $order_values.PRODUCTS_SHIPPING_TIME neq ''}<br />{#text_shippingtime#} {$order_values.PRODUCTS_SHIPPING_TIME}
{/if}
{/if}<br /><em>{$order_values.PRODUCTS_ATTRIBUTES}</em></td>
{/if}<br /><em>{$order_values.PRODUCTS_ATTRIBUTES}</em>
</td>
<td class="border">{$order_values.PRODUCTS_MODEL}<em>{$order_values.PRODUCTS_ATTRIBUTES_MODEL}</em></td>
<td width="150" class="border"><div align="right">{$order_values.PRODUCTS_SINGLE_PRICE}</div></td>
<td width="150" class="border"><div align="right">{$order_values.PRODUCTS_PRICE}</div></td>
</tr>
ca. Zeile 103
{/foreach}
</table>
</td>
</tr>
{if $COMMENTS}
<tr>
<td>
<table style="border-bottom:1px solid;" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
ca. Zeile 114
</tr>
</table>
</td>
</tr>
{/if}
</table>
</body>
</html>
templates/xtc5/admin/print_packingslip.htmlTop ca. Zeile 30
{if $csID}<strong>{#csID#}</strong> {$csID}<br />{/if}
<strong>{#payment#}</strong> {$PAYMENT_METHOD}<br />
<strong>{#order#}</strong> {$oID}<br />
<strong>{#date#}</strong> {$DATE}
{if $vatID}<br /><strong>{#vatID#}</strong> {$vatID}{/if}
</p>
<p class="large">{#packingslip#}</p>
</td>
<td width="1"><img src="{$logo_path}logo.gif" alt=""></td>
<td width="1"><img src="{$logo_path}logo.gif" alt="{$store_name}" /></td>
</tr>
</table>
<br />
<table class="small" style="border-top:1px solid; border-bottom:1px solid;" width="100%" border="0">
ca. Zeile 61
<td class="small"><strong>{#heading_products#}</strong></td>
</tr>
<tr>
<td>
<table style="border-bottom:1px solid;" class="small" width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="f1f1f1">
<table class="small" width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="f1f1f1">
<tr>
<td colspan="2" class="border"><div align="center"><strong>{#head_units#}</strong></div></td>
<td class="border"><strong>{#head_products#}</strong></td>
<td class="border"><strong>{#head_artnr#}</strong></td>
</tr>
{foreach name=aussen item=order_values from=$order_data}
<tr>
<td width="20" class="border">
<div align="center">{$order_values.PRODUCTS_QTY}</div>
</td>
<td width="20" class="border">
<div align="center">x</div>
</td>
<td class="border">
<strong>{$order_values.PRODUCTS_NAME}</strong>
<td width="20" class="border"><div align="center">{$order_values.PRODUCTS_QTY}</div></td>
<td width="20" class="border"><div align="center">x</div></td>
<td class="border"><strong>{$order_values.PRODUCTS_NAME}</strong>
{if ACTIVATE_SHIPPING_STATUS=='true'}
{if $order_values.PRODUCTS_SHIPPING_TIME neq ''}<br />{#text_shippingtime#} {$order_values.PRODUCTS_SHIPPING_TIME}
{/if}
{/if}<br /><em>{$order_values.PRODUCTS_ATTRIBUTES}</em>
ca. Zeile 88
{/foreach}
</table>
</td>
</tr>
{if $COMMENTS}
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<table style="border-bottom:1px solid;" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="small">
<br /><br /><strong>{#comments#}</strong> {$COMMENTS}
</td>
</tr>
</table>
</td>
</tr>
{/if}
</table>
</body>
</html>
templates/xtc5/mail/english/order_mail.htmlTop ca. Zeile 9
{if $PAYMENT_METHOD}<strong>Paymentmethod:</strong> {$PAYMENT_METHOD}<br />{/if}
<strong>Order No.:</strong> {$oID}<br />
<strong>Orderdate:</strong> {$DATE}<br />
{if $csID}<strong>Customer ID:</strong> {$csID}<br />{/if}
<strong>Your e-mail-address:</strong> {$EMAIL}<br />
<strong>Your e-mail-address:</strong> {$EMAIL}
{if $vatID}<br /><strong>Your VAT ID No.:</strong> {$vatID}{/if}
</font>
</td>
<td width="1"><img src="{$logo_path}logo.gif"></td>
</tr>
ca. Zeile 111
<br />
<font size="1" face="Arial, Helvetica, sans-serif">{$REVOCATION_HTML}</font>
<br />
{/if}
{if $AGB_HTML neq ''}
<br />
<font size="1" face="Arial, Helvetica, sans-serif">{$AGB_HTML}</font>
<br />
{/if}
templates/xtc5/mail/english/order_mail.txtTop ca. Zeile 5
Order No.: {$oID}
Date: {$DATE}
{if $csID}Customer ID: {$csID}{/if}
Your e-mail-address: {$EMAIL}
{if $vatID}Your VAT ID No.: {$vatID}{/if}
----------------------------------------------------------------------
Dear {$NAME},
ca. Zeile 51
[SIGNATUR]
{$REVOCATION_TXT}
{$AGB_TXT}
templates/xtc5/mail/german/order_mail.htmlTop ca. Zeile 9
{if $PAYMENT_METHOD}<strong>Zahlungsmethode:</strong> {$PAYMENT_METHOD}<br />{/if}
<strong>Bestellung Nr:</strong> {$oID}<br />
<strong>Bestelldatum:</strong> {$DATE}<br />
{if $csID}<strong>Kundennummer:</strong> {$csID}<br />{/if}
<strong>Ihre E-Mail-Adresse:</strong> {$EMAIL}<br />
<strong>Ihre E-Mail-Adresse:</strong> {$EMAIL}
{if $vatID}<br /><strong>Ihre USt-IdNr.:</strong> {$vatID}{/if}
</font>
</td>
<td width="1"><img src="{$logo_path}logo.gif"></td>
</tr>
ca. Zeile 119
<font size="1" face="Arial, Helvetica, sans-serif">{$REVOCATION_HTML}</font>
<br />
{/if}
{if $AGB_HTML neq ''}
<br />
<font size="1" face="Arial, Helvetica, sans-serif">{$AGB_HTML}</font>
<br />
{/if}
templates/xtc5/mail/german/order_mail.txtTop ca. Zeile 5
Bestellnummer: {$oID}
Datum: {$DATE}
{if $csID}Kundennummer: {$csID}{/if}
Ihre E-Mail-Adresse: {$EMAIL}
{if $vatID}Ihre USt-IdNr.: {$vatID}{/if}
----------------------------------------------------------------------
Hallo {$NAME},
ca. Zeile 51
[SIGNATUR]
{$REVOCATION_TXT}
{$AGB_TXT}
templates/xtc5/module/account.htmlTop ca. Zeile 25
<h2>{#title_orders#}</h2>
<div class="highlightbox">
{foreach name=aussen item=order_data from=$order_content}
<p><strong><a href="{$order_data.ORDER_LINK}">{$order_data.ORDER_DATE}</a> / {#order_nr#}{$order_data.ORDER_ID}</strong><br />
{#order_total#}{$order_data.ORDER_TOTAL} / {#order_status#}{$order_data.ORDER_STATUS}<br /></p>
{#order_total#}{$order_data.ORDER_TOTAL} / {#order_status#}{$order_data.ORDER_STATUS}<br />
{if count($order_data.TRACKING) > 0}
{foreach name=aussen item=tracking_data from=$order_data.TRACKING}
{#label_tracking#} <a target="_blank" href="{$tracking_data.tracking_link}">{$tracking_data.parcel_id}</a><br />
{/foreach}
{/if}
</p>
<div class="hr"></div>
{/foreach}
<a href="{$LINK_ALL}">{#text_all#}</a>
</div>
templates/xtc5/module/account_history.htmlTop ca. Zeile 5
<h2>{#text_oid#}{$order_data.ORDER_ID}</h2>
<p>{#text_date#}{$order_data.ORDER_DATE},
{#text_articles#}{$order_data.ORDER_PRODUCTS} <br />
<strong>{#text_total#}</strong>{$order_data.ORDER_TOTAL} <strong>{#text_status#}</strong>{$order_data.ORDER_STATUS}
{if count($order_data.ORDER_TRACKING) > 0}
{foreach name=aussen item=tracking_data from=$order_data.ORDER_TRACKING}
<br />{#label_tracking#} <a target="_blank" href="{$tracking_data.tracking_link}">{$tracking_data.parcel_id}</a>
{/foreach}
{/if}
</p><p>{$order_data.ORDER_BUTTON}</p>
</div>
<div class="hr"></div>
{/foreach}
templates/xtc5/module/account_history_info.htmlTop ca. Zeile 29
<p>{$PAYMENT_INFORMATION}</p>
{/if}
<h2>{#title_history#}:</h2>
<p>{$HISTORY_BLOCK}</p>
{if count($ORDER_TRACKING) > 0}
<h2>{#label_tracking#}</h2>
<p>
{foreach name=aussen item=tracking_data from=$ORDER_TRACKING}
<a target="_blank" href="{$tracking_data.tracking_link}">{$tracking_data.parcel_id}</a><br />
{/foreach}
</p>
{/if}
<h2>{#text_products#}</h2>
<table class="accounthistoryinfoorderdetails" width="100%" border="0" cellspacing="0" cellpadding="4">
<tr class="header">
<td>{#head_units#}</td>
templates/xtc5/module/checkout_confirmation.htmlTop ca. Zeile 13
</ul>
<div style="clear:both"></div>
<br />
{if $error != ''}<div class="errormessage">{$error}</div>{/if}
<h1>{#heading_confirmation#}</h1>
<div class="checkout_infos">
templates/xtc5/module/checkout_paypal.htmlTop ca. Zeile 1
{config_load file="$language/lang_$language.conf" section="product_info"}
{config_load file="$language/lang_$language.conf" section="checkout_confirmation"}
{config_load file="$language/lang_$language.conf" section="checkout_navigation"}
{config_load file="$language/lang_$language.conf" section="checkout_paypal"}
{config_load file="$language/lang_$language.conf" section="duty_info"}
<h3>{#heading_checkout#}</h3>
{if $error != ''}<p>{$error}</p>{/if}
<ul id="checkoutnavigation">
<li class="inactive"><span class="number">1.</span> <span class="title">{#title_shipping#}</span><br />
<span class="description">{#desc_shipping#}</span></li>
<li class="inactive"><span class="number">2.</span> <span class="title">{#title_payment#}</span><br />
<span class="description">{#desc_payment#}</span></li>
<li class="active"><span class="number">3.</span> <span class="title">{#title_confirmation#}</span><br />
<span class="description">{#desc_confirmation#}</span></li>
<li class="inactive"><span class="number">4.</span> <span class="title">{#title_success#}</span><br />
<span class="description">{#desc_success#}</span></li>
</ul>
<div style="clear:both"></div>
{if $error != ''}<div class="errormessage">{$error}</div>{/if}
<h1>{#heading_checkout#}</h1>
<div class="checkout_infos">
<div class="{if $REVOCATION}checkoutInfoBoxes{else}checkoutInfoBoxesLarge{/if}" style="text-align: justify;">
{#text_information#}
{if $IP_LOG == 'true'}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main"> </td>
</tr>
<tr>
<td><strong>{#text_ip#}</strong></td>
<td class="inputRequirement"><strong>{$CUSTOMERS_IP}</strong></td>
</tr>
</table>
<p>{#text_ip#}: <strong>{$CUSTOMERS_IP}</strong></p>
{/if}
</div>
<p><strong>{#title_payment_address#}:</strong><br/>{$ADDRESS_PAYMENT_LABEL}</p>
<p>{$BUTTON_PAYMENT_ADDRESS}</p>
<p><strong>{#title_shipping_address#}:</strong><br/>{$ADDRESS_SHIPPING_LABEL}</p>
<p>{$BUTTON_SHIPPING_ADDRESS}</p>
{if $REVOCATION}
<div class="checkoutInfoBoxes red">
{$TEXT_AGB_CHECKOUT}
</div>
{/if}
<div style="clear:both"><br /></div>
<h3>{#title_shipping#}</h3>
<div class="checkoutNavBoxes">
<h2>{#text_shipping_address#}</h2>
<div class="text"> <a href="{$SHIPPING_ADDRESS_EDIT}">{#text_edit#}</a></div>
<div style="clear:both">{$ADDRESS_SHIPPING_LABEL}<br /></div>
</div>
<div class="checkoutNavBoxes">
<h2>{#text_payment_address#}</h2>
<div class="text"> <a href="{$PAYMENT_ADDRESS_EDIT}">{#text_edit#}</a></div>
<div style="clear:both">{$ADDRESS_PAYMENT_LABEL}<br /></div>
</div>
<div style="clear:both"><br /></div>
{if $SHIPPING_BLOCK}
<h1>{#title_shipping#}</h1>
<br>
{$FORM_SHIPPING_ACTION}
<p>{#text_shipping#}</p>
<p>{$SHIPPING_BLOCK}</p>
{$PAYMENT_HIDDEN}
{$FORM_END}
{/if}
{if $PAYMENT_INFORMATION != ''}
<h3>{#text_payment_info#}</h3>
{foreach name=aussen item=payment from=$payment_info}
<p><b>{$payment.TITLE}</b> {$payment.FIELD}</p><br />
{/foreach}
{/if}
<h3>{#title_comments#}</h3>
{$CHECKOUT_FORM}
<h2>{#title_comments#}</h2>
<br />
<p class="checkoutcomment">{$COMMENTS}</p>
<h3>{#title_agb#}</h3>
{if $smarty.const.DISPLAY_CONDITIONS_ON_CHECKOUT == 'true'}
<br />
<h2>{#title_agb#}</h2>
<br />
<p class="checkoutagb">{$AGB}</p>
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td>{$AGB_checkbox}</td>
<td width="100%"><strong>{#text_accept_agb#}</strong></td>
</tr>
</table>
{if $REVOCATION}
<p>
<b>{$REVOCATION_TITLE}</b><br />
{$REVOCATION}<br />
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="main"><img src="{$tpl_path}img/arrow_green.gif" alt="arrow" />{$REVOCATION_TITLE} {$REVOCATION_LINK}</td>
</tr>
</table>
</p>
{/if}
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td>{$ADR_checkbox}</td>
<td width="100%"><strong>{#text_accept_adr#}</strong></td>
</tr>
</table>
<h2>{#text_products#}</h2>
<p class="text"> <a href="{$PRODUCTS_EDIT}">{#text_edit#}</a></p>
<div style="clear:both"></div>
<h3>{#text_products#}</h3>
</div>
<table class="orderdetails" width="100%" border="0" cellspacing="0" cellpadding="6">
<div class="highlightbox checkoutbox">
{* BOC PRODUCTS TABLE *}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="headerrow">
<td class="left"><b>{#text_products#}</b></td>
<td class="left"><b>{#text_model#}</b></td>
<td class="right"><b>{#text_qty#}</b></td>
<td class="right"><b>{#text_sprice#}</b></td>
<td class="center"><b>{#text_fprice#}</b></td>
<td class="main_header" style="width:50px" align="left" valign="top"><b>{$smarty.const.HEADER_QTY}</b></td>
<td class="main_header" style="padding-left:90px;" align="left" valign="top"><b>{$smarty.const.HEADER_ARTICLE}</b></td>
<td class="main_header" style="width:100px;" align="right" valign="top"><b>{$smarty.const.HEADER_SINGLE}</b></td>
<td class="main_header" style="width:100px;" align="right" valign="top"><b>{$smarty.const.HEADER_TOTAL}</b></td>
</tr>
{foreach name=aussen item=data from=$products_data}
<tr class="{cycle values="contentrow1,contentrow2"}">
<td class="productname">
{if $data.image != ''}
{$data.image}<br />
<tr>
<td class="main_row" align="left" valign="top">{$data.qty}</td>
<td class="main_row" align="left" valign="top">
{if $smarty.const.CHECKOUT_SHOW_PRODUCTS_IMAGES == 'true'}
<div style="width:90px; float:left;">{$data.image}</div>
{/if}
<b>{$data.name}</b> {$data.details}
<div style="width:420px; float:left;">
{$data.link}
{if $data.order_description}<div class="small">{$data.order_description}</div>{/if}
{if $data.shipping_time}<br /><span class="nobr small">{$smarty.const.SHIPPING_TIME}{$data.shipping_time}</span>{/if}
{foreach key=a_data item=attrib_data from=$data.attributes}
{$attrib_data.option} : {$attrib_data.value}
{if $attrib_data.value != ''}<br /><span class="nobr small"> <i> - {$attrib_data.option} : {$attrib_data.value}</i></span>{/if}
{/foreach}
</div>
</td>
<td class="productname">{$data.model}</td>
<td class="quantity">{$data.qty}</td>
<td class="singleprice">{$data.price_formated}</td>
<td class="totalprice">{$data.final_price_formated}</td>
</tr>
{/foreach}
<tr>
<td colspan="5" class="subtotal">
<div align="right">
<table border="0" cellspacing="0" cellpadding="1">
{foreach name=total_data item=total from=$total_block}
<tr>
<td>{$total.title}</td>
<td align="right">{$total.text}</td>
<td class="main_row" align="right" valign="top">{$data.price_formated}</td>
<td class="main_row" align="right" valign="top">{$data.final_price_formated}{if $ORDER_TAX_GROUPS > 1}<br />{$data.tax} %{/if}</td>
</tr>
{/foreach}
</table>
{* EOC PRODUCTS TABLE *}
<div class="hr"></div>
{if $TOTAL_BLOCK}
<div class="total">
<table align="right">
{$TOTAL_BLOCK}
</table>
<div style="clear:both"></div>
</div>
{/if}
{if $DELIVERY_DUTY_INFO == true}
<div class="hr"></div>
<div style="font-size:11px; border:0px solid red;padding:5px;margin-top:8px;">{#text_duty_info#}</div>
{/if}
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td>{$ADR_checkbox}</td>
<td width="100%"><strong><label for="address">{#text_accept_adr#}</label></strong></td>
</tr>
<tr>
<td>{$AGB_checkbox}</td>
<td width="100%"><strong><label for="conditions">{#text_accept_agb#}</label></strong> {$AGB_LINK}</td>
</tr>
</table>
<br />
<p> {if $MODULE_BUTTONS != ''} {$MODULE_BUTTONS}<br />{/if}{$CHECKOUT_ZOLL} {$CHECKOUT_BUTTON}</p>
{$FORM_END}
<div style="text-align:right">{if $MODULE_BUTTONS!=''} {$MODULE_BUTTONS}{/if} {$CHECKOUT_ZOLL} {$CHECKOUT_BUTTON}</div>
</div>
templates/xtc5/module/checkout_success.htmlTop ca. Zeile 17
<strong>{#text_thankyou#}</strong></p>
{if $GV_SEND_LINK}
<p>{#gv_has_vouchera#} {$GV_SEND_LINK} {#gv_has_voucherb#}</p>
{/if}
{if $MODULE_sofort_vorkasse}
<p>{$MODULE_sofort_vorkasse}</p>
{/if}
{* BOF - web28 - 2010-03-27 PayPal Bezahl-Link *}
{if $PAYPAL_LINK}
<p><div style="background: #f2f2f2; color: #ffffff; padding:5px; border: 2px solid #496686">{$PAYPAL_LINK}</div></p>
{/if}
templates/xtc5/source/boxes.phpTop ca. Zeile 50
}
// -----------------------------------------------------------------------------------------
// Nur fuer Admins
// -----------------------------------------------------------------------------------------
if ($_SESSION['customers_status']['customers_status_id'] == 0) {
if ($_SESSION['customers_status']['customers_status'] == 0) {
require_once(DIR_WS_BOXES . 'admin.php');
$smarty->assign('is_admin', true);
}
// -----------------------------------------------------------------------------------------
templates/xtc5/stylesheet.cssTop ca. Zeile 56
font-weight:bold;
font-size:12px;
}
/* LINKS GLOBAL */
a, a:link, a:link, a:link, a:hover {
a, a:link, a:visited, a:active, a:hover {
background:transparent;
text-decoration:none;
outline:none;
cursor:pointer;
ca. Zeile 1071
list-style-type:none;
}
/* COMMENTS ON CHECKOUT CONFIRMATION SITE */
p.checkoutcomment textarea {
width:100%;
width:898px;
}
/* ORDER DETAILS ON CHECKOUT SITE */
table.checkoutconfirmationorderdetails {
padding:0;
ca. Zeile 1278
border-top:1px solid #ccc;
}
/* Hetfield - 2010-01-20 - Remove agb-textarea from checkout_payment */
div.agbframe {
width:100%;
width:898px;
height:200px;
overflow:auto;
padding:10px;
background:url(img/input_bg.gif) no-repeat;
weitere InfosTop
Bei der Selbstinstallation, insbesondere dann wenn ein XT:Commerce Shop oder Fork bereits modifiziert wurde,
ist das Risiko relativ hoch, dass beim Einbau unvorhergesehene Probleme auftreten, die zur Folge haben,
dass entweder Teilfunktionen des Shops oder gar der vollständig Shop nicht mehr ordungsgemäß funktioniert.
Um diesem Problem weitgehend entgegen zu wirken werden unsere Module in aller Regel in 2 Versionen ausgeliefert,
so dass eine unbelassene XTC Installation durch einfaches ersetzen von Dateien mit dem Modul erweitert werden kann und
alternativ durch manuelles verändern von existierenden Dateien. Diesen besonderen Service finden man im übrigen nicht generell
auch bei anderen Dienstleistern. Als weiteren Service wir zum Kauf eines jeder unsere Module gegen eine geringe
Gebühr einen Installationsservice inkl. 14-tägigen email Support an. Wer also auf Nummer sicher gehen möchte,
insbesondere wenn nur wenige Kenntnisse oder Erfahrungen hat, ist deshalb gut beraten diesen Service zu nutzen.
Jedem Kunden, der diesen Support mit erworben hat, stehen wir für Support Fragen über unser Kontaktformular zur Verfügung.
Aufgrund einer hohen Nachfrage nach unseren Entwicklungen ist es zeitlich bedingt nicht möglich telefonische Auskünfte zu
geben.Anfragen darüber werden i.d.R. binnen 24 Std. fachkundig beantwortet.
Sollte ein Modul ohne Support und Installationsservice erworben worden sein, steht Ihnen bei Fragen ebenso
unser Helpdesk, jedoch mit eingeschränkten Support Leistungen zur Verfügung. Mangels der dafür erbrachten
Vergütung ist ein weiterführender Support nicht möglich und kann nur gegen individuelle Aufwandsvergütung
erfolgen.
Wir danken für Ihr Verständnis und wünschen Ihnen Gute Geschäfte!
Ihr Alkim Media Team