Ejemplo n.º 1
0
 public static function instance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
 public function init_tour_data($section = 'general')
 {
     if (empty($section)) {
         $section = 'general';
     }
     if (!WC_GZD_Admin::instance()->is_tour_enabled($section)) {
         return;
     }
     $tour = WC_germanized()->plugin_path() . '/includes/admin/views/html-tour-' . $section . '.php';
     if (file_exists($tour)) {
         include $tour;
     }
 }
<?php

// Insert complaints shortcode
$imprint = wc_get_page_id('imprint');
if ($imprint != -1) {
    WC_GZD_Admin::instance()->insert_complaints_shortcode($imprint);
}
?>
	</li>

	<li class="wc-gzd-tour-pro" data-el="#woocommerce_gzdp_enable_vat_check" data-orientation="top" data-width="500">
		<h2><span class="wc-gzd-pro">pro</span> Umsatzsteuer ID prüfen</h2>
		<p>
			Verkäufer, die an gewerbliche Käufer im europäischen Ausland verkaufen kennen das: Die Umsatzsteuer soll bei Eingabe
			einer validen Umsatzsteuer-Identifikationsnummer entfallen. Mit der Pro-Version kein Problem mehr. Das Plugin prüft nach Eingabe einer USt.-ID automatisch
			anhand der europäischen Schnittstelle, ob die ID valide ist und entfernt die USt. in der Kasse.
		</p>
		<a class="button button-primary tourbus-next" href="javascript:void(0);">weiter</a>
		<?php 
if (!WC_germanized()->is_pro()) {
    ?>
			<a class="button button-secondary" style="float:right" href="https://vendidero.de/woocommerce-germanized#vat" target="_blank">mehr erfahren</a>
		<?php 
}
?>
	</li>

	<li data-el=".submit" data-orientation="top">
		<h2>Einstellungen speichern</h2>
		<p>Wenn du deine Einstellungen angepasst hast, dann speichere sie über diesen Button.
		</p>
		<a class="button button-primary" href="<?php 
echo add_query_arg(array('section' => 'display'), WC_GZD_Admin::instance()->disable_tour_link('general'));
?>
">Weiter zur Anzeige</a>
	</li>

</ol>
 /**
  * Get settings array
  *
  * @return array
  */
 public function get_settings()
 {
     $delivery_terms = array('' => __('None', 'woocommerce-germanized'));
     $terms = get_terms('product_delivery_time', array('fields' => 'id=>name', 'hide_empty' => false));
     if (!is_wp_error($terms)) {
         $delivery_terms = $delivery_terms + $terms;
     }
     $is_complaints_shortcode_inserted = WC_GZD_Admin::instance()->is_complaints_shortcode_inserted();
     $settings = array(array('title' => __('General', 'woocommerce-germanized'), 'type' => 'title', 'id' => 'general_options'), array('title' => __('Small-Enterprise-Regulation', 'woocommerce-germanized'), 'desc' => __('VAT based on &#167;19 UStG', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_small_enterprise', 'default' => 'no', 'type' => 'checkbox', 'desc_tip' => sprintf(__('set this Option if you have chosen <a href="%s" target="_blank">&#167;19 UStG</a>', 'woocommerce-germanized'), esc_url('http://www.gesetze-im-internet.de/ustg_1980/__19.html'))), array('title' => __('Show no VAT notice', 'woocommerce-germanized'), 'desc' => __('Show no VAT &#167;19 UStG notice on single product', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_display_product_detail_small_enterprise', 'type' => 'checkbox', 'default' => 'no'), array('title' => __('Submit Order Button Text', 'woocommerce-germanized'), 'desc' => __('This text serves as Button text for the Order Submit Button.', 'woocommerce-germanized'), 'desc_tip' => true, 'id' => 'woocommerce_gzd_order_submit_btn_text', 'type' => 'text', 'css' => 'min-width:300px;', 'default' => __('Buy Now', 'woocommerce-germanized')), array('title' => __('Phone as required field', 'woocommerce-germanized'), 'desc' => __('Should phone number be a required field within checkout?', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_checkout_phone_required', 'type' => 'checkbox', 'default' => 'no'), array('title' => __('Add title field', 'woocommerce-germanized'), 'desc' => __('Add a title field to the address within checkout?', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_checkout_address_field', 'type' => 'checkbox', 'default' => 'yes'), array('title' => __('Disallow cancellations', 'woocommerce-germanized'), 'desc' => __('Don’t allow customers to manually cancel orders.', 'woocommerce-germanized'), 'desc_tip' => __('By default payment methods like PayPal allow order cancellation by clicking the abort link. This option will stop customers from manually cancel orders.', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_checkout_stop_order_cancellation', 'type' => 'checkbox', 'default' => 'yes'), array('type' => 'sectionend', 'id' => 'general_options'), array('title' => __('Contract', 'woocommerce-germanized'), 'type' => 'title', 'id' => 'contract_options', 'desc' => '<div class="notice inline notice-warning"><p>' . sprintf(__('%sUpgrade to %spro%s%s to unlock this feature and get premium support.', 'woocommerce-germanized'), '<a href="https://vendidero.de/woocommerce-germanized" class="button">', '<span class="wc-gzd-pro">', '</span>', '</a>') . '</p></div>'), array('title' => '', 'id' => 'woocommerce_gzdp_contract_after_confirmation', 'img' => WC_Germanized()->plugin_url() . '/assets/images/pro/settings-inline-contract.png', 'href' => 'https://vendidero.de/woocommerce-germanized#contract', 'type' => 'image'), array('type' => 'sectionend', 'id' => 'contract_options'), array('title' => __('Legal Pages', 'woocommerce-germanized'), 'type' => 'title', 'id' => 'legal_pages_options'), array('title' => __('Terms & Conditions', 'woocommerce-germanized'), 'desc_tip' => __('This page should contain your terms & conditions.', 'woocommerce-germanized'), 'id' => 'woocommerce_terms_page_id', 'type' => 'single_select_page', 'default' => '', 'class' => 'chosen_select_nostd', 'css' => 'min-width:300px;', 'desc' => !get_option('woocommerce_terms_page_id') ? sprintf(__('Don\'t have terms & conditions yet? <a href="%s">Generate now</a>!', 'woocommerce-germanized'), admin_url('admin.php?page=wc-settings&tab=germanized&section=agbs')) : ''), array('title' => __('Power of Revocation', 'woocommerce-germanized'), 'desc_tip' => __('This page should contain information regarding your customer\'s Right of Revocation.', 'woocommerce-germanized'), 'id' => 'woocommerce_revocation_page_id', 'type' => 'single_select_page', 'default' => '', 'class' => 'chosen_select_nostd', 'css' => 'min-width:300px;', 'desc' => !get_option('woocommerce_revocation_page_id') ? sprintf(__('Don\'t have a revocation page yet? <a href="%s">Generate now</a>!', 'woocommerce-germanized'), admin_url('admin.php?page=wc-settings&tab=germanized&section=widerruf')) : ''), array('title' => __('Imprint', 'woocommerce-germanized'), 'desc' => __('This page should contain an imprint with your company\'s information.', 'woocommerce-germanized'), 'id' => 'woocommerce_imprint_page_id', 'type' => 'single_select_page', 'default' => '', 'class' => 'chosen_select_nostd', 'css' => 'min-width:300px;', 'desc_tip' => true), array('title' => __('Data Security Statement', 'woocommerce-germanized'), 'desc' => __('This page should contain information regarding your data security policy.', 'woocommerce-germanized'), 'id' => 'woocommerce_data_security_page_id', 'type' => 'single_select_page', 'default' => '', 'class' => 'chosen_select_nostd', 'css' => 'min-width:300px;', 'desc_tip' => true), array('title' => __('Payment Methods', 'woocommerce-germanized'), 'desc' => __('This page should contain information regarding the Payment Methods that are chooseable during checkout.', 'woocommerce-germanized'), 'id' => 'woocommerce_payment_methods_page_id', 'type' => 'single_select_page', 'default' => '', 'class' => 'chosen_select_nostd', 'css' => 'min-width:300px;', 'desc_tip' => true), array('title' => __('Shipping Methods', 'woocommerce-germanized'), 'desc' => __('This page should contain information regarding shipping methods that are chooseable during checkout.', 'woocommerce-germanized'), 'id' => 'woocommerce_shipping_costs_page_id', 'type' => 'single_select_page', 'default' => '', 'class' => 'chosen_select_nostd', 'css' => 'min-width:300px;', 'desc_tip' => true), array('type' => 'sectionend', 'id' => 'legal_pages_options'), array('title' => __('Complaints', 'woocommerce-germanized'), 'type' => 'title', 'desc' => sprintf(__('Options regarding new EU online dispute resolution platform (OS). Read more about this topic <a href="%s" target="_blank">here</a>.', 'woocommerce-germanized'), 'http://shop.trustedshops.com/de/rechtstipps/jetzt-handeln-link-auf-eu-online-schlichtungs-plattform-ab-9.1.2016'), 'id' => 'complaints_options'), array('title' => __('Complaints Procedure Text', 'woocommerce-germanized'), 'desc' => __('Customize the text produced by the shortcode [gzd_complaints] to your needs. This text is to be meant to inform your customer about the existance of a platform for dispute settlement provided by the EU. You may place this shortcode within your imprint.', 'woocommerce-germanized'), 'desc_tip' => true, 'default' => __('Online dispute resolution in accordance with Art. 14 (1) ODR-VO: The european commission provides a platform for online dispute resolution (OS) which is accessible at http://ec.europa.eu/consumers/odr/.', 'woocommerce-germanized'), 'css' => 'width:100%; height: 65px;', 'id' => 'woocommerce_gzd_complaints_procedure_text', 'type' => 'textarea'), array('title' => __('Shortcode Status', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_complaints_procedure_status', 'type' => 'html', 'html' => '<p>' . (wc_get_page_id('imprint') == -1 ? '<span class="wc-gzd-status-text wc-gzd-text-red">' . __('Please choose a page as your imprint first.', 'woocommerce-germanized') . '</span>' : '<span class="wc-gzd-status-text wc-gzd-text-' . ($is_complaints_shortcode_inserted ? 'green' : 'red') . '"> ' . ($is_complaints_shortcode_inserted ? __('Found', 'woocommerce-germanized') : __('Not found within your imprint', 'woocommerce-germanized')) . '</span> ' . (!$is_complaints_shortcode_inserted ? '<a class="button button-secondary" style="margin-left: 1em" href="' . wp_nonce_url(add_query_arg(array('complaints' => 'add')), 'append-complaints-shortcode') . '" target="_blank">' . __('Append it now', 'woocommerce-germanized') . '</a></p>' : ''))), array('type' => 'sectionend', 'id' => 'complaints_options'), array('title' => __('Delivery Times', 'woocommerce-germanized'), 'type' => 'title', 'desc' => '', 'id' => 'delivery_times_options'), array('title' => __('Default Delivery Time', 'woocommerce-germanized'), 'desc' => __('This delivery time will be added to every product if no delivery time has been chosen individually', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_default_delivery_time', 'css' => 'min-width:250px;', 'default' => '', 'type' => 'select', 'class' => 'chosen_select', 'options' => $delivery_terms, 'desc_tip' => true), array('title' => __('Delivery Time Text', 'woocommerce-germanized'), 'desc' => __('This text will be used to indicate delivery time for products. Use {delivery_time} as placeholder.', 'woocommerce-germanized'), 'desc_tip' => true, 'id' => 'woocommerce_gzd_delivery_time_text', 'type' => 'text', 'css' => 'min-width:300px;', 'default' => __('Delivery time: {delivery_time}', 'woocommerce-germanized')), array('type' => 'sectionend', 'id' => 'delivery_times_options'), array('title' => __('Shipping Costs', 'woocommerce-germanized'), 'type' => 'title', 'id' => 'shipping_costs_options'), array('title' => __('Shipping Costs Text', 'woocommerce-germanized'), 'desc' => __('This text will be used to inform the customer about shipping costs. Use {link}{/link} to insert link to shipping costs page.', 'woocommerce-germanized'), 'desc_tip' => true, 'id' => 'woocommerce_gzd_shipping_costs_text', 'type' => 'text', 'css' => 'min-width:300px;', 'default' => __('plus {link}Shipping Costs{/link}', 'woocommerce-germanized')), array('title' => __('Free Shipping Text', 'woocommerce-germanized'), 'desc' => __('This text will be used to inform the customer about free shipping. Leave empty to disable notice. Use {link}{/link} to insert link to shipping costs page.', 'woocommerce-germanized'), 'desc_tip' => true, 'id' => 'woocommerce_gzd_free_shipping_text', 'type' => 'text', 'css' => 'min-width:300px;', 'default' => __('', 'woocommerce-germanized')), array('title' => __('Shipping Costs Tax', 'woocommerce-germanized'), 'desc' => __('Enable better taxation for shpping costs?', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_shipping_tax', 'default' => 'yes', 'type' => 'checkbox', 'desc_tip' => sprintf(__('By choosing this option shipping cost taxation will be calculated based on tax rates within cart. Imagine the following example. Further information can be found <a href="%s" target="_blank">here</a>. %s', 'woocommerce-germanized'), 'http://www.it-recht-kanzlei.de/umsatzsteuer-versandkosten-mehrwertsteuer.html', '<table class="wc-gzd-tax-example"><thead><tr><th>Produkt</th><th>Preis</th><th>MwSt.-Satz</th><th>Anteil</th><th>MwSt.</th></tr></thead><tbody><tr><td>Buch</td><td>' . wc_price(40) . '</td><td>7%</td><td>40%</td><td>' . wc_price(2.62) . '</td></tr><tr><td>DVD</td><td>' . wc_price(60) . '</td><td>19%</td><td>60%</td><td>' . wc_price(9.58) . '</td></tr><tr><td>Versand</td><td>' . wc_price(5) . '</td><td>7% | 19%</td><td>40% | 60%</td><td>' . wc_price(0.13) . ' | ' . wc_price(0.48) . '</td></tr></tbody></table>')), array('title' => __('Force Tax Calculation', 'woocommerce-germanized'), 'desc' => __('Force shipping costs tax calculation for every method?', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_shipping_tax_force', 'default' => 'yes', 'type' => 'checkbox', 'desc_tip' => __('This option will overwrite settings for each individual shipping method to force tax calculation (instead of only calculating tax for those methods which are taxeable).', 'woocommerce-germanized')), array('type' => 'sectionend', 'id' => 'shipping_costs_options'), array('title' => __('Fees', 'woocommerce-germanized'), 'type' => 'title', 'id' => 'fees_options'), array('title' => __('Fee Tax', 'woocommerce-germanized'), 'desc' => __('Enable better taxation for fees?', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_fee_tax', 'default' => 'yes', 'type' => 'checkbox', 'desc_tip' => __('By choosing this option fee taxation will be calculated based on tax rates within cart. See shipping costs taxation for more information.', 'woocommerce-germanized')), array('title' => __('Force Tax Calculation', 'woocommerce-germanized'), 'desc' => __('Force fee tax calculation for every fee?', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_fee_tax_force', 'default' => 'yes', 'type' => 'checkbox', 'desc_tip' => __('This option will overwrite settings for each individual fee to force tax calculation (instead of only calculating tax for those fees which are taxeable).', 'woocommerce-germanized')), array('type' => 'sectionend', 'id' => 'fees_options'), array('title' => __('Customers', 'woocommerce-germanized'), 'type' => 'title', 'desc' => '', 'id' => 'customer_options'), array('title' => __('Checkbox', 'woocommerce-germanized'), 'desc' => __('Add a checkbox to customer registration form.', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_customer_account_checkbox', 'type' => 'checkbox', 'default' => 'yes'), array('title' => __('Checkbox text', 'woocommerce-germanized'), 'desc' => __('Choose a Plain Text which will be shown as checkbox text for customer account creation. Use {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link} as Placeholders for the links to legal pages.', 'woocommerce-germanized'), 'desc_tip' => true, 'default' => __('Yes, I’d like create a new account and have read and understood the {data_security_link}data privacy statement{/data_security_link}.', 'woocommerce-germanized'), 'css' => 'width:100%; height: 65px;', 'id' => 'woocommerce_gzd_customer_account_text', 'type' => 'textarea'), array('title' => __('Checkout', 'woocommerce-germanized'), 'desc' => __('Replace default WooCommerce text regarding account creation during checkout.', 'woocommerce-germanized'), 'desc_tip' => __('Use the text from above instead of the default WooCommerce text regarding account creation during checkout. This checkbox is only show if you have activated guest accounts.', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_customer_account_checkout_checkbox', 'type' => 'checkbox', 'default' => 'yes'), array('title' => __('Customer Double Opt In', 'woocommerce-germanized'), 'desc' => __('Enable customer double opt in on registration?', 'woocommerce-germanized'), 'desc_tip' => sprintf(__('If customer chooses to create a customer account an email with an activation link will be sent by mail. Customer account will be marked as activated if user clicks on the link within the email. More information on this topic can be found <a href="%s" target="_blank">here</a>.', 'woocommerce-germanized'), 'http://t3n.de/news/urteil-anmeldebestatigungen-double-opt-in-pflicht-592304/'), 'id' => 'woocommerce_gzd_customer_activation', 'default' => 'yes', 'type' => 'checkbox'), array('title' => __('Delete Unactivated After', 'woocommerce-germanized'), 'desc_tip' => __('This will make sure unactivated customer accounts will be deleted after X days. Set to 0 if you don\'t want to automatically delete unactivated customers.', 'woocommerce-germanized'), 'desc' => __('days', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_customer_cleanup_interval', 'type' => 'number', 'custom_attributes' => array('min' => 0, 'step' => 1), 'default' => 7), array('type' => 'sectionend', 'id' => 'customer_options'), array('title' => __('Right of Recission', 'woocommerce-germanized'), 'type' => 'title', 'id' => 'recission_options'), array('title' => __('Revocation Address', 'woocommerce-germanized'), 'desc' => __('Type in an address, telephone/telefax number, email address which is to be used as revocation address', 'woocommerce-germanized'), 'desc_tip' => true, 'css' => 'width:100%; height: 65px;', 'id' => 'woocommerce_gzd_revocation_address', 'type' => 'textarea'), array('type' => 'sectionend', 'id' => 'recission_options'), array('title' => __('Virtual VAT', 'woocommerce-germanized'), 'type' => 'title', 'id' => 'virtual_vat_options'), array('title' => __('Enable Virtual VAT', 'woocommerce-germanized'), 'desc' => __('Enable if you want to charge your customer\'s countries\' VAT for virtual products.', 'woocommerce-germanized'), 'id' => 'woocommerce_gzd_enable_virtual_vat', 'default' => 'no', 'type' => 'checkbox', 'desc_tip' => sprintf(__('New EU VAT rule applies on 01.01.2015. Make sure that every digital or virtual product has chosen the right tax class (Virtual Rate or Virtual Reduced Rate). Gross prices will not differ from the prices you have chosen for affected products. In fact the net price will differ depending on the VAT rate of your customers\' country. Shop settings will be adjusted to show prices including tax. More information can be found <a href="%s" target="_blank">here</a>.', 'woocommerce-germanized'), 'http://ec.europa.eu/taxation_customs/taxation/vat/how_vat_works/telecom/index_de.htm#new_rules')), array('type' => 'sectionend', 'id' => 'virtual_vat_options'), array('title' => _x('Invoices', 'invoices', 'woocommerce-germanized'), 'type' => 'title', 'id' => 'invoice_options', 'desc' => '<div class="notice inline notice-warning"><p>' . sprintf(__('%sUpgrade to %spro%s%s to unlock this feature and get premium support.', 'woocommerce-germanized'), '<a href="https://vendidero.de/woocommerce-germanized" class="button">', '<span class="wc-gzd-pro">', '</span>', '</a>') . '</p></div>'), array('title' => '', 'id' => 'woocommerce_gzdp_invoice_enable', 'img' => WC_Germanized()->plugin_url() . '/assets/images/pro/settings-inline-invoices.png', 'href' => 'https://vendidero.de/woocommerce-germanized#accounting', 'type' => 'image'), array('type' => 'sectionend', 'id' => 'invoice_options'), array('title' => __('VAT', 'woocommerce-germanized'), 'type' => 'title', 'id' => 'vat_options', 'desc' => '<div class="notice inline notice-warning"><p>' . sprintf(__('%sUpgrade to %spro%s%s to unlock this feature and get premium support.', 'woocommerce-germanized'), '<a href="https://vendidero.de/woocommerce-germanized" class="button">', '<span class="wc-gzd-pro">', '</span>', '</a>') . '</p></div>'), array('title' => '', 'id' => 'woocommerce_gzdp_enable_vat_check', 'img' => WC_Germanized()->plugin_url() . '/assets/images/pro/settings-inline-vat.png', 'href' => 'https://vendidero.de/woocommerce-germanized#vat', 'type' => 'image'), array('type' => 'sectionend', 'id' => 'vat_options'));
     // End general settings
     return apply_filters('woocommerce_germanized_settings', $settings);
 }
		<h2>Rechtstexte an E-Mails anhängen</h2>
		<p>An dieser Stelle kannst du für jeden Rechtstext (z.B. AGB, Widerufsbelehrung) auswählen, an welche WooCommerce E-Mails der Text angehängt werden soll.
		Per Drag & Drop kannst du die Reihenfolge der Rechtstexte in den E-Mails beeinflussen (z.B. zuerst AGB dann Widerrufsbelehrung).</p>
		<h3>Hinweis</h3>
		<p>Die hier auswählbaren WooCommerce E-Mails entsprechen den Bezeichnungen des jeweiligen Templates unter <a target="_blank" href="<?php 
echo admin_url('admin.php?page=wc-settings&tab=email');
?>
">E-Mails</a>. So ist "Neue Bestellung" nicht die E-Mail die an den Kunden geht, sondern der Hinweis an den Admin. Der Kunde erhält die E-Mail "Bestellung in Bearbeitung"</p>
		<a class="button button-primary tourbus-next" href="javascript:void(0);">weiter</a>
	</li>

	<li class="wc-gzd-tour-pro" data-el="#woocommerce_gzdp_legal_page_terms_enabled" data-orientation="top" data-width="500">
		<h2><span class="wc-gzd-pro">pro</span> PDF Anhänge in E-Mails</h2>
		<p>
			Nutzer der Pro-Version von WooCommerce Germanized können optional PDF-Dateien anstatt reinem Text an die WooCommerce E-Mails anhängen.
			Die PDF-Dateien können automatisch, basierend auf dem Inhalt der jeweiligen Seite erzeugt oder manuell hinterlegt werden.
		</p>
		<a class="button button-primary tourbus-disable" href="<?php 
echo WC_GZD_Admin::instance()->disable_tour_link('');
?>
">Tour beenden</a>
		<?php 
if (!WC_germanized()->is_pro()) {
    ?>
			<a class="button button-secondary" style="float:right" href="https://vendidero.de/woocommerce-germanized#pro" target="_blank">mehr zur <span class="wc-gzd-pro">pro</span> Version</a>
		<?php 
}
?>
	</li>

</ol>