From 1c88b6f69cd87a436073be9cdf05eee6c3757f42 Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Mon, 28 Aug 2017 12:31:04 +0000 Subject: - Exportprofile auf Produkte ausgeweitet - git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6425 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/mods/mod_export/product_index_tab.phtml | 57 +++++++++++++++++++++++++++ views/mods/mod_export/profil.phtml | 45 +++++++++++++++++---- views/mods/mod_export/profillist.phtml | 11 +++++- views/mods/mod_export/settings_edit.phtml | 15 +++++-- 4 files changed, 116 insertions(+), 12 deletions(-) create mode 100644 views/mods/mod_export/product_index_tab.phtml (limited to 'views/mods/mod_export') diff --git a/views/mods/mod_export/product_index_tab.phtml b/views/mods/mod_export/product_index_tab.phtml new file mode 100644 index 0000000..493198d --- /dev/null +++ b/views/mods/mod_export/product_index_tab.phtml @@ -0,0 +1,57 @@ +callMod('wpsg_mod_export', 'getProfile', array(wpsg_mod_export::TYPE_PRODUCT)); + +?> + + + + + + \ No newline at end of file diff --git a/views/mods/mod_export/profil.phtml b/views/mods/mod_export/profil.phtml index b0375ec..b703055 100644 --- a/views/mods/mod_export/profil.phtml +++ b/views/mods/mod_export/profil.phtml @@ -38,8 +38,12 @@
view['profil']['xml_roottag'], 'xml_roottag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?> - view['profil']['xml_ordertag'], 'xml_ordertag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?> - view['profil']['xml_productroottag'], 'xml_productroottag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?> + + view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?> + view['profil']['xml_ordertag'], 'xml_ordertag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?> + view['profil']['xml_productroottag'], 'xml_productroottag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?> + + view['profil']['xml_producttag'], 'xml_producttag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
@@ -49,12 +53,16 @@
- - view['profil']['order_onetime'], array('label' => __('Optionen', 'wpsg'), 'inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?> -
- view['profil']['order_online'], array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?> -
+ view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?> + + view['profil']['order_onetime'], array('label' => __('Optionen', 'wpsg'), 'inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?> + +
+ view['profil']['order_online'], array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?> +
+ +
@@ -81,6 +89,7 @@ false)); ?> '.WPSG_PLUGIN_URL.'wpshopgermany/cron.php', false, array('noP' => false)); ?> + view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?>
@@ -173,6 +182,28 @@
+ view['profil']['export_type'] === wpsg_mod_export::TYPE_PRODUCT) { ?> +
+ +
+ +
+ + view['profil']['orderfilter']['s']), 'orderfilter_s', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?> + + hasMod('wpsg_mod_productgroups')) { $arProductGroupSelect = array('-1' => __('Alle Produktgruppen', 'wpsg')) + wpsg_productgroup::getProductgroupSelect(); ?> + view['profil']['orderfilter']['productgroup_ids'], '-1')], 'orderfilter_productgroup_ids', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_url' => $inlineEdit_url, 'inlineEdit_source' => $arProductGroupSelect)); ?> + + + hasMod('wpsg_mod_produktartikel')) { $temp = $this->callMod('wpsg_mod_produktartikel', 'getProductcategorySelect', array()); ?> + $v) $arProductCategorySelect[$v['term_id']] = $v['label']; ?> + view['profil']['orderfilter']['productcategory_ids'], '-1')], 'orderfilter_productcategory_ids', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_url' => $inlineEdit_url, 'inlineEdit_source' => $arProductCategorySelect)); ?> + + +
+ +
+
diff --git a/views/mods/mod_export/profillist.phtml b/views/mods/mod_export/profillist.phtml index f73903f..4f5e039 100644 --- a/views/mods/mod_export/profillist.phtml +++ b/views/mods/mod_export/profillist.phtml @@ -5,7 +5,16 @@ */ $arProfilSelect = array(); - foreach ($this->view['arProfile'] as $p) $arProfilSelect[$p['id']] = $p['name']; + + foreach ($this->view['arProfile'] as $p) + { + + $arProfilSelect[$p['id']] = $p['name']; + + if ($p['export_type'] === wpsg_mod_export::TYPE_ORDER) $arProfilSelect[$p['id']] .= ' ('.__('Bestellexport', 'wpsg').')'; + else if ($p['export_type'] === wpsg_mod_export::TYPE_PRODUCT) $arProfilSelect[$p['id']] .= ' ('.__('Produktexport', 'wpsg').')'; + + } ?> diff --git a/views/mods/mod_export/settings_edit.phtml b/views/mods/mod_export/settings_edit.phtml index 1c8fa18..39c0c16 100644 --- a/views/mods/mod_export/settings_edit.phtml +++ b/views/mods/mod_export/settings_edit.phtml @@ -96,15 +96,20 @@ } // function wpsg_mod_export_removeProfil(profil_id) - function wpsg_mod_export_addProfil() + function wpsg_mod_export_addProfil(type) { jQuery('#wpsg_profil_list').html('<?php echo __('Bitte warten ...', 'wpsg'); ?>'); jQuery.ajax( { - url: 'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_addProfil&noheader=1', + url: 'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_addProfil&noheader=1', + data: { + type: type + }, success: function(data) { + jQuery("#wpsg_profil_list").html(data); + } } ); @@ -126,7 +131,7 @@ }, success: function(data) { - if (data != '1') + if (data != '1' && data != '0') { alert(data); @@ -140,7 +145,9 @@ - +
+ +

callMod('wpsg_mod_export', 'profilList'); ?>
\ No newline at end of file -- cgit v1.2.3