Subversion Repositories wpShopGermany4

Rev

Rev 7746 | Rev 7842 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5488 daniel 1
<?php
2
 
3
	/**
4
	 * Template um eine Variante zu bearbeiten
5
	 */
6
 
7
?>
7841 daniel 8
 
5488 daniel 9
<input type="hidden" id="wpsg_mod_productvariants_product_id" value="<?php echo $this->view['product_id']; ?>" />
10
<input type="hidden" id="wpsg_mod_productvariants_var_id" value="<?php echo $this->view['variant']['id']; ?>" />
11
 
7841 daniel 12
<script>
13
 
14
    var wpframe; var wpsg_mod_productvariants_vari_id = 0;
15
    var metaBox = jQuery('#meta-box-id.postbox');
16
 
17
    var addImgLink = metaBox.find('.upload-custom-img');
18
    var delImgLink = metaBox.find('.delete-custom-img');
19
    var imgContainer = metaBox.find('.custom-img-container');
20
    var imgIdInput = metaBox.find('.custom-img-id');
21
 
22
</script>
23
 
5488 daniel 24
<?php if (wpsg_isSizedArray($this->view['arVariation'])) { ?>
25
 
26
	<table class="table wpsg_mod_productvariants_table_variation">
27
    	<thead>
28
      		<tr>
29
 
6891 hartmut 30
      			<?php $colspan = 0; if (wpsg_isSizedInt($this->view['product_id'])) { ?>
6357 thomas 31
      			<th class="col_active"><?php echo __('Aktiv', 'wpsg'); ?></th>
7746 daniel 32
      		    <?php } ?>
33
 
5488 daniel 34
      			<th class="col_id"><?php echo __('Id', 'wpsg'); ?></th>
35
        		<th class="col1"><?php echo __('Name', 'wpsg'); ?></th>
5521 daniel 36
        		<th class="col_shortname"><?php echo __('Kurzname'); ?></th>
7746 daniel 37
      			<?php $colspan += 3; ?>
5488 daniel 38
 
6891 hartmut 39
        		<?php if (wpsg_isSizedInt($this->view['product_id'])) { $colspan += 2; ?>
5488 daniel 40
        		<th class="col_artnr"><?php echo __('Artikelnummer', 'wpsg'); ?></th>
41
        		<th class="col_price"><?php echo __('Preis', 'wpsg'); ?></th>
6193 hartmut 42
 
43
				<?php if ($this->hasMod('wpsg_mod_stock')) { ?>
6891 hartmut 44
        		<th class="col_stock"><?php echo __('Lagerbestand', 'wpsg'); $colspan ++; ?></th>
7096 florian 45
		        <th class="col_stock col_min_stock"><?php echo __('Minimallagerbestand', 'wpsg'); $colspan ++; ?></th>
46
		        <?php } ?>
6165 hartmut 47
 
48
				<?php if ($this->hasMod('wpsg_mod_weight')) { ?>
6891 hartmut 49
        		<th class="col_stock"><?php echo __('Gewicht', 'wpsg'); $colspan ++; ?></th>
5488 daniel 50
        		<?php } ?>
6193 hartmut 51
 
6165 hartmut 52
				<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
6891 hartmut 53
        		<th class="col_stock"><?php echo __('Füllmenge', 'wpsg'); $colspan ++; ?></th>
6165 hartmut 54
        		<?php } ?>
5583 daniel 55
 
6165 hartmut 56
        		<?php } ?>
57
 
5583 daniel 58
		        <?php if (!wpsg_isSizedInt($this->view['product_id']) || wpsg_isSizedInt($this->view['variant']['product_id'])) { $colspan ++; ?>
59
			    <th class="col_action"></th>
60
		        <?php } ?>
5488 daniel 61
 
62
      		</tr>
7096 florian 63
    	</thead>
7841 daniel 64
    	<?php $i = 0; foreach ($this->view['arVariation'] as $vari) { $i ++;
65
 
66
		    $vari_id = intval($vari['id']);
67
 
68
	    ?>
5488 daniel 69
    	<tbody id="vari_<?php echo $vari['id']; ?>">
70
    		<tr>
71
 
72
    			<?php if (wpsg_isSizedInt($this->view['product_id'])) { ?>
73
    			<td class="col_active">
74
    				<input type="checkbox" id="productvariation_active_<?php echo $vari['id']; ?>" name="active" value="1" <?php echo ((wpsg_isSizedString($vari['active'], '1'))?'checked="checked"':''); ?> />
75
    			</td>
76
    			<?php } ?>
77
 
78
    			<td class="col_id">
79
    				<?php echo $vari['id']; ?>
80
    				<script type="text/javascript">/* <![CDATA[ */
81
 
5583 daniel 82
    					<?php if (!wpsg_isSizedInt($this->view['product_id']) || wpsg_isSizedInt($this->view['variant']['product_id'])) { ?>
5934 hartmut 83
						jQuery('#productvariation_name_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
5488 daniel 84
							submitdata: {
85
					    		field: 'vari_name',
86
					    		field_id: '<?php echo $vari['id']; ?>'
87
							}
5521 daniel 88
						});
89
 
5934 hartmut 90
						jQuery('#productvariation_shortname_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
5521 daniel 91
							submitdata: {
92
					    		field: 'vari_shortname',
93
					    		field_id: '<?php echo $vari['id']; ?>'
94
							}
5583 daniel 95
						});
96
					    <?php } ?>
5488 daniel 97
 
98
						jQuery('#productvariation_active_<?php echo $vari['id']; ?>').bind('change', function() {
99
 
100
							var value = '0';
101
							if (jQuery(this).prop('checked') === true) value = '1';
102
 
103
							jQuery.ajax( {
104
								url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1',
105
								data: {
106
									field: 'vari_active',
107
									field_id: '<?php echo $vari['id']; ?>',
108
									product_id: jQuery('#wpsg_mod_productvariants_product_id').val(),
109
									value: value
110
								}
111
							} );
112
 
113
						} );
114
 
5934 hartmut 115
						jQuery('#productvariation_anr_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
5488 daniel 116
							submitdata: {
117
					    		field: 'vari_anr',
118
					    		product_id: jQuery('#wpsg_mod_productvariants_product_id').val(),
119
					    		field_id: '<?php echo $vari['id']; ?>'
120
							}
121
						});
122
 
5934 hartmut 123
						jQuery('#productvariation_price_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
5488 daniel 124
							submitdata: {
125
					    		field: 'vari_price',
126
					    		product_id: jQuery('#wpsg_mod_productvariants_product_id').val(),
127
					    		field_id: '<?php echo $vari['id']; ?>'
128
							}
129
						});
130
 
5934 hartmut 131
						jQuery('#productvariation_stock_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
5488 daniel 132
							submitdata: {
133
					    		field: 'vari_stock',
134
					    		product_id: jQuery('#wpsg_mod_productvariants_product_id').val(),
135
					    		field_id: '<?php echo $vari['id']; ?>'
136
							}
137
						});
5583 daniel 138
 
7096 florian 139
					    jQuery('#productvariation_min_stock_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
140
						    submitdata: {
141
							    field: 'vari_min_stock',
142
							    product_id: jQuery('#wpsg_mod_productvariants_product_id').val(),
143
							    field_id: '<?php echo $vari['id']; ?>'
144
						    }
145
					    });
146
 
147
					    jQuery('#productvariation_weight_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
6165 hartmut 148
							submitdata: {
149
					    		field: 'vari_weight',
150
					    		product_id: jQuery('#wpsg_mod_productvariants_product_id').val(),
151
					    		field_id: '<?php echo $vari['id']; ?>'
152
							}
153
						});
154
 
155
						jQuery('#productvariation_fmenge_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
156
							submitdata: {
157
					    		field: 'vari_fmenge',
158
					    		product_id: jQuery('#wpsg_mod_productvariants_product_id').val(),
159
					    		field_id: '<?php echo $vari['id']; ?>'
160
							}
161
						});
162
 
5488 daniel 163
 
164
					/* ]]> */</script>
165
    			</td>
6149 hartmut 166
    			<td class="col1"><span class="wpsg_editable" id="productvariation_name_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['name']); ?></span>
167
    			<?php if (!isset($vari['iid'])) $vari['iid'] = $vari['id'];  ?>
168
    			<input type="hidden" id="productvariation_iid_<?php echo $vari['id']; ?>" value="<?php echo wpsg_getStr($vari['iid']); ?>" />
169
    			</td>
5521 daniel 170
    			<td class="col_shortname"><span class="wpsg_editable" id="productvariation_shortname_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['shortname']); ?></span></td>
5488 daniel 171
 
172
    			<?php if (wpsg_isSizedInt($this->view['product_id'])) { ?>
173
    			<td class="col_artnr"><span class="wpsg_editable" id="productvariation_anr_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['anr']); ?></span></td>
174
    			<td class="col_price"><span class="wpsg_editable" id="productvariation_price_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc(wpsg_ff($vari['price'], $this->get_option('wpsg_currency'))); ?></span></td>
7096 florian 175
 
6193 hartmut 176
				<?php if ($this->hasMod('wpsg_mod_stock')) { ?>
5488 daniel 177
    			<td class="col_stock"><span class="wpsg_editable" id="productvariation_stock_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['stock']); ?></span></td>
7096 florian 178
    			<td class="col_stock"><span class="wpsg_editable" id="productvariation_min_stock_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['min_stock']); ?></span></td>
6193 hartmut 179
        		<?php } ?>
6165 hartmut 180
 
181
				<?php if ($this->hasMod('wpsg_mod_weight')) { ?>
182
    			<td class="col_stock"><span class="wpsg_editable" id="productvariation_weight_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['weight']); ?></span></td>
183
        		<?php } ?>
184
				<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
185
    			<td class="col_stock"><span class="wpsg_editable" id="productvariation_fmenge_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['fmenge']); ?></span></td>
186
        		<?php } ?>
187
 
5583 daniel 188
    			<?php } ?>
189
 
190
			    <?php if (!wpsg_isSizedInt($this->view['product_id']) || wpsg_isSizedInt($this->view['variant']['product_id'])) { ?>
191
				<td class="col_action">
5488 daniel 192
 
6454 hartmut 193
    				<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Variation löschen', 'wpsg'); ?>" onclick="return wpsg_mod_productvariation_del(<?php echo $this->view['product_id'].','.$vari['id']; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
5488 daniel 194
 
195
    			</td>
5583 daniel 196
    			<?php } ?>
5488 daniel 197
 
198
    		</tr>
7841 daniel 199
 
6136 hartmut 200
    		<tr class="wpsg_mod_productvariants_productimage_row">
6891 hartmut 201
    			<td class="col_active">&nbsp;</td>
6136 hartmut 202
   				<?php
7841 daniel 203
 
204
                    if (wpsg_isSizedInt($this->view['product_id'])) {
205
 
206
                        $arAttachmentIDs = $this->imagehandler->getAttachmentIDs($this->view['product_id'], $vari['id'], true);
207
 
208
                    } else {
209
 
210
                        $vari_images = $this->get_option('wpsg_mod_productvariants_global_images');
211
                        if (!is_array($vari_images)) $vari_images = [];
212
 
213
                        $arAttachmentIDs = ((isset($vari_images[$vari_id]))?$vari_images[$vari_id]:[]);
214
 
215
                    }
6438 daniel 216
 
6136 hartmut 217
				?>
6438 daniel 218
				<td class="ui-sortable" colspan="<?php echo $colspan; ?>"  id="wpsg_images_productimage_<?php echo $this->view['variant']['id']; ?>_<?php echo $vari['id']; ?>" >
7841 daniel 219
 
220
                    <div class="d-flex justify-content-between w-100">
221
 
222
                        <div>
223
                            <?php foreach ($arAttachmentIDs as $attachment_id) { $attachment_id = intval($attachment_id); ?>
224
 
225
                                <?php if (wpsg_isSizedInt($this->view['product_id'])) { ?>
226
 
227
                                    <a href="#" class="<?php echo ((in_array($attachment_id, explode(",", $vari['images_set'])))?'mark':''); ?> pic" id="<?php echo $attachment_id; ?>" onclick="return wpsg_vp_vari_setPic(this, <?php echo $this->view['variant']['id']; ?>, <?php echo $vari['id'] ?>, '<?php echo $attachment_id; ?>', <?php echo $this->view['product_id']; ?>);">
228
                                        <?php echo wp_get_attachment_image($attachment_id, array(25, 25), true); ?>
229
                                    </a>
230
 
231
                                <?php } else { ?>
232
 
233
                                    <a href="#" class="pic wpsg_mod_productvariants_remove_global_vari_image"
234
                                        data-variant_id="<?php echo intval($_REQUEST['variant_id']); ?>"
235
                                        data-variation_id="<?php echo $vari['id']; ?>"
236
                                        data-attachment_id="<?php echo $attachment_id; ?>"
237
                                    >
238
                                        <?php echo wp_get_attachment_image($attachment_id, array(25, 25), true); ?>
239
                                        <span><span class="glyphicon glyphicon-trash"></span></span>
240
                                    </a>
241
 
242
                                <?php } ?>
243
 
244
                            <?php } ?>
245
                        </div>
246
 
247
                        <?php if (!wpsg_isSizedInt($this->view['product_id'])) { ?>
248
                        <div>
249
 
250
                            <input id="media_upload_<?php echo $vari['id']; ?>" value="<?php echo __('Mediathek', 'wpsg'); ?>" class="button" type="button" />
251
 
252
                        </div>
253
                        <?php } ?>
254
 
255
                    </div>
6094 hartmut 256
 
7841 daniel 257
					<script>
6136 hartmut 258
 
6438 daniel 259
						jQuery(document).ready(function() {
7841 daniel 260
 
261
							<?php if (intval($this->view['product_id']) <= 0) { ?>
262
							document.getElementById('media_upload_<?php echo $vari['id']; ?>').addEventListener('click', (event) => {
263
 
264
								event.preventDefault();
265
 
266
								wpsg_mod_productvariants_vari_id = <?php echo $vari['id']; ?>;
267
 
268
								if (wpframe !== undefined) { wpframe.open(); return; }
269
 
270
								wpframe = wp.media.frames.file_frame = wp.media({
271
                                    title: "<?php echo __('Auswählen oder Hochladen von Medien', 'wpsg'); ?>",
272
                                    button: { text: "<?php echo __('Medien benutzen', 'wpsg'); ?>" },
273
                                    multiple: true
274
					            });
275
 
276
								wpframe.on('select', () => {
277
 
278
									let arAtt = [];
279
				                    let attachments = wpframe.state().get('selection').map((attachment) => {
280
 
281
                                        attachment.toJSON();
282
 
283
                                        arAtt.push(attachment.id);
284
 
285
                                        return attachment;
286
 
287
				                    });
288
 
289
				                    jQuery('#wpsg_mod_productvariants_dialog_modal .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
290
 
291
				                    jQuery.ajax({
292
                                        url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_upload&noheader=1',
293
                                        async: true,
294
                                        data: {
295
                                            product_id: '<?php echo intval($_REQUEST['product_id']); ?>',
296
                                            variant_id: '<?php echo intval($_REQUEST['variant_id']); ?>',
297
                                            vari_id: wpsg_mod_productvariants_vari_id,
298
                                            arAtt: arAtt
299
                                        },
300
                                        success: function(data) {
301
 
302
                                            jQuery('#wpsg_mod_productvariants_dialog_modal .modal-body').html(data);
303
 
304
                                        }
305
                                    });
306
 
307
                                });
308
 
309
								wpframe.open();
310
 
311
                            });
312
							<?php } ?>
313
 
314
							<?php if (intval($this->view['product_id']) > 0) { ?>
6438 daniel 315
					   		jQuery('#wpsg_images_productimage_<?php echo $this->view['variant']['id']; ?>_<?php  echo $vari['id']; ?>').sortable( {
6136 hartmut 316
								items: 'a',
317
								helper : 'clone',
318
								update: function(event, ui) {
319
 
320
									wpsg_vp_ajaxloading_show();
321
 
322
									var wpsg_reorder = jQuery(this).sortable('toArray');
6438 daniel 323
 
6136 hartmut 324
									jQuery.ajax( {
325
										url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_productvariants&cmd=wpsg_var_setImageOrder&noheader=1&edit_id=<?php echo $this->view['product_id']; ?>',
326
										async: false,
327
										data: {
6438 daniel 328
											'var_id': <?php echo $this->view['variant']['id']; ?>,
329
											'vari_id': <?php echo $vari['id']; ?>,
6136 hartmut 330
											'wpsg_reorder': wpsg_reorder
331
										},
332
										success: function(data) {
333
 
334
											if (data != '1') alert(data);
6438 daniel 335
 
6136 hartmut 336
											wpsg_vp_ajaxloading_hide();
337
 
338
										}
339
									} );
340
 
341
								}
7841 daniel 342
							} ).disableSelection();
343
					   		<?php } ?>
6136 hartmut 344
 
345
			   			} );
346
 
6438 daniel 347
					</script>
348
 
349
				</td>
350
 
5488 daniel 351
    		</tr>
5490 daniel 352
 
5488 daniel 353
    	</tbody>
354
    	<?php } ?>
355
 
356
    </table>
357
 
7841 daniel 358
	<script>
5488 daniel 359
 
6438 daniel 360
	function wpsg_vp_vari_setPic(htmlElement, var_id, vari_id, attachment_id, product_id)
6094 hartmut 361
	{
362
 
363
		<?php if (!isset($_REQUEST['wpsg_lang'])) { ?>
364
 
365
		wpsg_vp_ajaxloading_show();
6438 daniel 366
 
6094 hartmut 367
		jQuery.ajax( {
368
			url: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_productvariants&cmd=wpsg_vp_vari_setPic&noheader=1&edit_id=<?php echo $this->view['product_id']; ?>",
369
			async: false,
370
			data: {
371
				var_id: var_id,
372
				vari_id: vari_id,
6438 daniel 373
				product_id: product_id,
374
				attachment_id: attachment_id
6094 hartmut 375
			},
376
			success: function(data) {
6438 daniel 377
 
378
				jQuery(htmlElement).toggleClass('mark');
379
 
6094 hartmut 380
				wpsg_vp_ajaxloading_hide();
381
 
382
			}
383
		} );
384
 
385
		<?php } ?>
386
 
387
		return false;
388
 
389
	}
390
 
391
	function wpsg_vp_ajaxloading_show()
392
	{
393
 
6136 hartmut 394
		jQuery('.wpsg_mod_productvariants_ajaxloading').show();
6094 hartmut 395
 
396
	}
397
 
398
	function wpsg_vp_ajaxloading_hide()
399
	{
400
 
6136 hartmut 401
		jQuery('.wpsg_mod_productvariants_ajaxloading').hide();
6094 hartmut 402
 
403
	}
404
 
405
 
6149 hartmut 406
		<?php
407
			$b1 = wpsg_isSizedInt($this->view['product_id']);
408
			$b2 = wpsg_isSizedInt($this->view['variant']['product_id']);
409
			if (!wpsg_isSizedInt($this->view['product_id']) || wpsg_isSizedInt($this->view['variant']['product_id'])) {
6094 hartmut 410
		?>
6149 hartmut 411
			<?php
412
				$p1 = wpsg_getInt($this->view['product_id']);
413
				$p2 = ($this->view['variant']['product_id']);
414
			?>
5488 daniel 415
 
416
		jQuery('.wpsg_mod_productvariants_table_variation').sortable( {
417
			items: 'tbody',
418
			helper: wpsg_Tablefix,
419
			update: function(event, ui) {
420
 
421
				var wpsg_reorder = jQuery(this).sortable('toArray');
422
				var product_id = jQuery('#wpsg_mod_productvariants_product_id').val();
6149 hartmut 423
 
5488 daniel 424
				jQuery.ajax( {
425
					url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1',
426
					data: {
427
						'field': 'vari_pos',
428
						'value': jQuery(this).sortable('toArray'),
429
						'product_id': product_id
430
					},
431
					success: function(data) { }
432
				} );
433
 
434
			}
435
		} ).disableSelection();
436
 
437
		<?php } ?>
438
 
439
		<?php if (wpsg_isSizedInt($this->view['variant']['product_id']) || !wpsg_isSizedInt($this->view['product_id'])) { ?>
440
		jQuery('#wpsg_mod_productvariants_variation_add_button').show();
441
		<?php } else { ?>
442
		jQuery('#wpsg_mod_productvariants_variation_add_button').hide();
443
		<?php } ?>
7841 daniel 444
 
445
        jQuery('.wpsg_mod_productvariants_remove_global_vari_image').on('click', function() {
446
 
447
            let el = jQuery(this);
448
 
449
            event.preventDefault();
450
 
451
            if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return;
452
 
453
            el.remove();
454
 
455
            jQuery.ajax({
456
                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_removeImage&noheader=1',
457
                async: true,
458
                data: {
459
                    product_id: 0,
460
                    variant_id: el.data('variant_id'),
461
                    vari_id: el.data('variation_id'),
462
                    attachment_id: el.data('attachment_id')
463
                },
464
                success: function(data) { }
465
            });
466
 
467
        });
468
 
469
	</script>
5488 daniel 470
 
471
    <?php if (!wpsg_isSizedInt($this->view['product_id'])) { ?>
472
    <p class="wpsg_hinweis"><?php echo __('Reihenfolge kann mittels Drag&Drop verändert werden.', 'wpsg'); ?></p>
473
    <?php } ?>
474
 
475
<?php } else { ?>
5583 daniel 476
 
477
	<?php echo __('Bisher keine Variationen der Variante angelegt.', 'wpsg'); ?>
478
 
7841 daniel 479
	<script>
5583 daniel 480
 
481
		<?php if (wpsg_isSizedInt($this->view['variant']['product_id']) || !wpsg_isSizedInt($this->view['product_id'])) { ?>
482
			jQuery('.wpsg_mod_productvariants_variation_add_button').show();
483
		<?php } else { ?>
484
			jQuery('.wpsg_mod_productvariants_variation_add_button').hide();
485
		<?php } ?>
486
 
7841 daniel 487
    </script>
5583 daniel 488
 
7841 daniel 489
<?php } ?>
490