1067 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Einstellungsseite des Produktartikel Moduls
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
6679 |
daniel |
8 |
|
6948 |
thomas |
9 |
<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel_pathkey', __('Path Key (Produkte)', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_pathkey'), array('maxlength' => 20, 'help' => 'wpsg_mod_produktartikel_pathkey')); ?>
|
|
|
10 |
<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel_pathkey_cat', __('Path Key (Kategorien)', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_pathkey_cat'), array('maxlength' => 20, 'help' => 'wpsg_mod_produktartikel_pathkey_cat')); ?>
|
6679 |
daniel |
11 |
|
3417 |
daniel |
12 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showui', __('Custom Post Type in Wordpress Menü sichtbar', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showui'), array('help' => 'wpsg_mod_produktartikel_showui'))?>
|
4270 |
daniel |
13 |
|
4933 |
thomas |
14 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_postthumbnail', __('Produktbild als Beitragsbild übergeben', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_postthumbnail'), array('help' => 'wpsg_mod_produktartikel_postthumbnail')); ?>
|
4270 |
daniel |
15 |
|
4933 |
thomas |
16 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showHome', __('Direkt auf Startseitenansicht anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showHome'), array('help' => 'wpsg_mod_produktartikel_showHome')); ?>
|
|
|
17 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showCategory', __('Direkt in den Kategorieansichten anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showCategory'), array('help' => 'wpsg_mod_produktartikel_showCategory')); ?>
|
|
|
18 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showSearch', __('Direkt in den Suchergebnissen anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showSearch'), array('help' => 'wpsg_mod_produktartikel_showSearch')); ?>
|
|
|
19 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_showFeed', __('Direkt in den Feeds anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_showFeed'), array('help' => 'wpsg_mod_produktartikel_showFeed')); ?>
|
|
|
20 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_onlyMainQuery', __('Nur Main Query berücksichtigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_onlyMainQuery'), array('help' => 'wpsg_mod_produktartikel_onlyMainQuery')); ?>
|
2821 |
daniel |
21 |
|
7384 |
thomas |
22 |
<br />
|
|
|
23 |
|
|
|
24 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_ean', __('Darstellung der EAN aktivieren', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_ean'), array('help' => 'wpsg_mod_produktartikel_ean')); ?>
|
|
|
25 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_gtin', __('Darstellung der GTIN aktivieren', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_gtin'), array('help' => 'wpsg_mod_produktartikel_gtin')); ?>
|
8059 |
daniel |
26 |
|
7384 |
thomas |
27 |
<br />
|
|
|
28 |
|
8059 |
daniel |
29 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_cat', __('Kategorie in Produktübersicht (Backend) anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_cat'), array('help' => 'wpsg_mod_produktartikel_cat')); ?>
|
|
|
30 |
<div id="wpsg_mod_produktartikel_cat_1">
|
|
|
31 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_cat_first_level', __('Nur erste Ebene', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_cat_first_level'), array('help' => 'wpsg_mod_produktartikel_cat_first_level')); ?>
|
|
|
32 |
<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel_cat_ignore', __('Titelformen (Kommagetrennt) von Kategorien die ignoriert werden sollen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_cat_ignore'), ['help' => 'wpsg_mod_produktartikel_cat_ignore']); ?>
|
|
|
33 |
</div>
|
|
|
34 |
|
|
|
35 |
<script>
|
|
|
36 |
|
|
|
37 |
let el_wpsg_mod_produktartikel_cat = document.getElementById('wpsg_mod_produktartikel_cat');
|
|
|
38 |
let el_wpsg_mod_produktartikel_cat_1 = document.getElementById('wpsg_mod_produktartikel_cat_1');
|
|
|
39 |
|
|
|
40 |
el_wpsg_mod_produktartikel_cat.addEventListener('change', () => {
|
|
|
41 |
|
|
|
42 |
if (el_wpsg_mod_produktartikel_cat.checked) {
|
|
|
43 |
|
|
|
44 |
el_wpsg_mod_produktartikel_cat_1.style.display = 'block';
|
|
|
45 |
|
|
|
46 |
} else {
|
|
|
47 |
|
|
|
48 |
el_wpsg_mod_produktartikel_cat_1.style.display = 'none';
|
|
|
49 |
|
|
|
50 |
}
|
|
|
51 |
|
|
|
52 |
});
|
|
|
53 |
|
|
|
54 |
el_wpsg_mod_produktartikel_cat.dispatchEvent(new Event('change'));
|
|
|
55 |
|
|
|
56 |
</script>
|
|
|
57 |
|
|
|
58 |
<br />
|
|
|
59 |
|
7384 |
thomas |
60 |
<?php /* echo wpsg_drawForm_Checkbox('wpsg_mod_produktartikel_positionnumber', __('Positionsnummer in Produktverwaltung anzeigen', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_positionnumber'), array('help' => 'wpsg_mod_produktartikel_positionnumber')); */ ?>
|
|
|
61 |
|
|
|
62 |
<br />
|
|
|
63 |
|
6633 |
daniel |
64 |
<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_comment', __('Kommentarfunktion', 'wpsg'), array(
|
|
|
65 |
'0' => __('Produktspezifisch', 'wpsg'),
|
|
|
66 |
'1' => __('Global aktiviert', 'wpsg'),
|
|
|
67 |
'2' => __('Global deaktiviert', 'wpsg')
|
|
|
68 |
), $this->get_option('wpsg_mod_produktartikel_comment')); ?>
|
|
|
69 |
|
5451 |
daniel |
70 |
<?php if (!is_array($this->view['arTemplates']) || sizeof($this->view['arTemplates']) <= 0) { ?>
|
|
|
71 |
<?php echo wpsg_drawForm_Text(__('Produkttemplate für Ansicht auf Startseite', 'wpsg'), __('Keine Templatedateien gefunden!', 'wpsg'), array('class_content_wrap' => 'wpsg_error')); ?>
|
|
|
72 |
<?php } else { ?>
|
6073 |
hartmut |
73 |
<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_hometemplate', __('Produkttemplate für Ansicht auf Startseite', 'wpsg'), wpsg_array_merge(array('-1' => __('Wie Produkttemplate', 'wpsg')), $this->view['arTemplates']), wpsg_getStr($this->get_option('wpsg_mod_produktartikel_hometemplate')), array('help' => 'mod_produktartikel_hometemplate', 'noKeys1' => true)); ?>
|
5451 |
daniel |
74 |
<?php } ?>
|
1067 |
daniel |
75 |
|
5451 |
daniel |
76 |
<?php if (!is_array($this->view['arTemplates']) || sizeof($this->view['arTemplates']) <= 0) { ?>
|
|
|
77 |
<?php echo wpsg_drawForm_Text(__('Produkttemplate für List Ansicht', 'wpsg'), __('Keine Templatedateien gefunden!', 'wpsg'), array('class_content_wrap' => 'wpsg_error')); ?>
|
|
|
78 |
<?php } else { ?>
|
6073 |
hartmut |
79 |
<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_listtemplate', __('Produkttemplate für List Ansicht', 'wpsg'), wpsg_array_merge(array('-1' => __('Wie Produkttemplate', 'wpsg')), $this->view['arTemplates']), wpsg_getStr($this->get_option('wpsg_mod_produktartikel_listtemplate')), array('help' => 'mod_produktartikel_listtemplate', 'noKeys1' => true)); ?>
|
5451 |
daniel |
80 |
<?php } ?>
|
|
|
81 |
|
|
|
82 |
<?php if (!is_array($this->view['arTemplates']) || sizeof($this->view['arTemplates']) <= 0) { ?>
|
|
|
83 |
<?php echo wpsg_drawForm_Text(__('Produkttemplate für Such Ansicht', 'wpsg'), __('Keine Templatedateien gefunden!', 'wpsg'), array('class_content_wrap' => 'wpsg_error')); ?>
|
|
|
84 |
<?php } else { ?>
|
6073 |
hartmut |
85 |
<?php echo wpsg_drawForm_Select('wpsg_mod_produktartikel_searchtemplate', __('Produkttemplate für Such Ansicht', 'wpsg'), wpsg_array_merge(array('-1' => __('Wie Produkttemplate', 'wpsg')), $this->view['arTemplates']), wpsg_getStr($this->get_option('wpsg_mod_produktartikel_searchtemplate')), array('help' => 'mod_produktartikel_searchtemplate', 'noKeys1' => true)); ?>
|
5451 |
daniel |
86 |
<?php } ?>
|
6684 |
hartmut |
87 |
<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel_rating', __('Anzahl Bewertungen im Frontend', 'wpsg'), $this->get_option('wpsg_mod_produktartikel_rating'), array('help' => 'wpsg_mod_produktartikel_rating')); ?>
|
|
|
88 |
|
6316 |
daniel |
89 |
<br />
|
|
|
90 |
|
|
|
91 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
92 |
|
6904 |
hartmut |
93 |
<?php $temp = @$this->view['ToRebuild']['product_ids']; ?>
|
6739 |
hartmut |
94 |
<?php $proz_done = 1; if (wpsg_isSizedArray($temp)) {
|
6316 |
daniel |
95 |
|
|
|
96 |
$proz_done = 1 - (sizeof($this->view['ToRebuild']['product_ids']) / $this->view['ToRebuild']['max']);
|
|
|
97 |
|
|
|
98 |
?>
|
|
|
99 |
|
|
|
100 |
<span id="wpsg_mod_produktartikel_rebuild">
|
|
|
101 |
<p><?php echo __('Wird derzeit aufgebaut, bitte warten ...', 'wpsg'); ?></p>
|
|
|
102 |
|
|
|
103 |
<div class="progress">
|
|
|
104 |
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="<?php echo $proz_done * 100; ?>" aria-valuemax="100" style="width:<?php echo $proz_done * 100; ?>%">
|
|
|
105 |
<span><span class="value"><?php echo round($proz_done * 100); ?></span>% <?php echo __('Komplett', 'wpsg'); ?></span>
|
|
|
106 |
</div>
|
|
|
107 |
</div>
|
|
|
108 |
</span>
|
|
|
109 |
|
|
|
110 |
<?php } ?>
|
|
|
111 |
<p>
|
|
|
112 |
<a href="<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_produktartikel&noheader=1&do=index_rebuild'; ?>"><?php echo __('Neu aufbauen', 'wpsg'); ?></a>
|
|
|
113 |
</p>
|
|
|
114 |
|
|
|
115 |
<?php echo wpsg_drawForm_TextEnd(__('Zuordnung Produkt zu Artikel', 'wpsg'), array('noP' => true)); ?>
|
|
|
116 |
|
|
|
117 |
<?php if ($proz_done < 1) { ?>
|
|
|
118 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
119 |
|
|
|
120 |
var proz_done = <?php echo $proz_done; ?>;
|
|
|
121 |
|
|
|
122 |
function wpsg_mod_produktartikel_rebuild()
|
|
|
123 |
{
|
|
|
124 |
|
|
|
125 |
if (proz_done >= 1) return;
|
|
|
126 |
|
|
|
127 |
jQuery.ajax( {
|
|
|
128 |
url: '<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_produktartikel&noheader=1&do=rebuild'; ?>',
|
|
|
129 |
error: function(data) {
|
|
|
130 |
|
|
|
131 |
jQuery('#wpsg_mod_produktartikel_rebuild').html('<p><?php echo __('Neuaufbau abgeschlossen.', 'wpsg'); ?></p>');
|
|
|
132 |
|
|
|
133 |
},
|
|
|
134 |
success: function(data) {
|
|
|
135 |
|
|
|
136 |
if (typeof data.done == "undefined") return;
|
|
|
137 |
|
|
|
138 |
proz_done = parseFloat(data.done);
|
|
|
139 |
console.log(proz_done);
|
|
|
140 |
if (proz_done >= 1)
|
|
|
141 |
{
|
|
|
142 |
|
|
|
143 |
jQuery('#wpsg_mod_produktartikel_rebuild').html('<p><?php echo __('Neuaufbau abgeschlossen.', 'wpsg'); ?></p>');
|
|
|
144 |
|
|
|
145 |
}
|
|
|
146 |
else
|
|
|
147 |
{
|
|
|
148 |
|
|
|
149 |
jQuery('#wpsg_mod_produktartikel_rebuild').find('.progress-bar').attr("aria-valuemin", proz_done * 100).css('width', (proz_done * 100) + '%').find('span.value').html(Math.round(proz_done * 100));
|
|
|
150 |
|
|
|
151 |
wpsg_mod_produktartikel_rebuild();
|
|
|
152 |
|
|
|
153 |
}
|
|
|
154 |
|
|
|
155 |
}
|
|
|
156 |
} );
|
|
|
157 |
|
|
|
158 |
}
|
|
|
159 |
|
|
|
160 |
wpsg_mod_produktartikel_rebuild();
|
|
|
161 |
|
|
|
162 |
/* ]]> */</script>
|
|
|
163 |
<?php } ?>
|