Subversion Repositories wpShopGermany4

Rev

Rev 7173 | Rev 7210 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7173 Rev 7179
Line 6... Line 6...
6
     * Time: 13:45
6
     * Time: 13:45
7
     */
7
     */
8
         
8
         
9
?>
9
?>
10
<div id="wpsg_produkte_table">
10
<div id="wpsg_produkte_table">
-
 
11
 
11
<?php echo wpsg_drawForm_AdminboxStart(__('Bestelldaten', 'wpsg')); ?>
12
	<?php echo wpsg_drawForm_AdminboxStart(__('Bestelldaten', 'wpsg')); ?>
-
 
13
    
12
    <div id="wpsg_product_table_wrap">
14
	<div id="wpsg_product_table_wrap">
13
        <?php $this->render(WPSG_PATH_VIEW.'order/product_table.phtml'); ?>
15
        <?php $this->render(WPSG_PATH_VIEW.'order/product_table.phtml'); ?>
14
    </div>
16
    </div>
15
 
17
 
120
			}
153
			}
-
 
154
		
121
		} );
155
		}
122
 
156
	
-
 
157
		var WPSG_BE_Voucher = {
-
 
158
			
123
		return false;
159
			editVoucher: function() {
124
	}
160
	
-
 
161
				jQuery('#wpsg_voucher_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
162
				jQuery('#wpsg_voucher_dialog').modal( { } ).modal('show');
125
 
163
	
-
 
164
				jQuery.ajax( {
-
 
165
					url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editVoucher&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
126
	function wpsg_be_act_orderdata() {
166
					success: function(data) {
-
 
167
	
-
 
168
						jQuery('#wpsg_voucher_dialog .modal-body').html(data);
-
 
169
	
-
 
170
					}
-
 
171
				} );
127
 
172
	
128
		var o_id = 0;
173
				return false;
-
 
174
				
-
 
175
			},
-
 
176
			
129
		//alert('wpsg_be_act_orderdata');
177
			removeVoucher: function() {
-
 
178
	
-
 
179
				jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
180
	
130
		jQuery.ajax( {
181
				jQuery.ajax( {
131
			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&subaction=orderData&do=actual&edit_id=' + o_id +'&noheader=1',
182
					url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editVoucher&do=remove&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
132
			success: function(data) {
183
					success: function(data) {
-
 
184
	
-
 
185
						jQuery('#wpsg_product_table_wrap').html(data.product_table);
-
 
186
	
-
 
187
					}
-
 
188
				} );
-
 
189
	
133
				data = JSON.parse(data);
190
				return false;
-
 
191
				
-
 
192
			},
-
 
193
			
-
 
194
			saveVoucher: function() {
-
 
195
	
134
				jQuery('#wpsg_be_orderamount').html(data.preis);
196
				jQuery('#wpsg_voucher_dialog').modal('hide');
-
 
197
				jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
198
	
-
 
199
				jQuery.ajax( {
-
 
200
					url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editVoucher&do=submit&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
135
				odata = data.vname + ' ' + data.name + ' / ' + data.preis;
201
					data: jQuery('#wpsg_be_voucher_form').serialize(),
-
 
202
					success: function(data) {
-
 
203
	
136
				jQuery('#wpsg_be_orderdata').html(odata);
204
						jQuery('#wpsg_product_table_wrap').html(data.product_table);
-
 
205
	
-
 
206
					}
-
 
207
				} );
-
 
208
	
-
 
209
				return false;
137
				
210
				
138
			}
211
			}
139
		} );
-
 
140
 
212
			
-
 
213
		}
141
 
214
		
142
		return false;
215
		var WPSG_BE_Discount = {
143
		
216
		
-
 
217
			editDiscount: function() {
-
 
218
	
-
 
219
				jQuery('#wpsg_discount_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
220
				jQuery('#wpsg_discount_dialog').modal( { } ).modal('show'); 
144
	}
221
	
-
 
222
				jQuery.ajax( {
-
 
223
					url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editDiscount&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',                 
-
 
224
					success: function(data) {
145
	
225
	
146
    jQuery(document).ready(function() {
226
						jQuery('#wpsg_discount_dialog .modal-body').html(data);
-
 
227
	
-
 
228
					}
-
 
229
				} );
-
 
230
	
-
 
231
				return false;
-
 
232
			
-
 
233
			},
147
		 
234
		 
-
 
235
			removeDiscount: function() {
-
 
236
	
-
 
237
				jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
238
	
-
 
239
				jQuery.ajax( {
-
 
240
					url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editDiscount&do=remove&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
-
 
241
					success: function(data) {
-
 
242
	
-
 
243
						jQuery('#wpsg_product_table_wrap').html(data.product_table);
-
 
244
	
-
 
245
					}
-
 
246
				} );
-
 
247
				
-
 
248
				return false;
-
 
249
				
-
 
250
			},
-
 
251
		
-
 
252
			saveDiscount: function() {
-
 
253
	
-
 
254
				jQuery('#wpsg_discount_dialog').modal('hide');
-
 
255
				jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
256
	
-
 
257
				jQuery.ajax( {
-
 
258
					url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editDiscount&do=submit&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
-
 
259
					data: jQuery('#wpsg_be_discount_form').serialize(),
-
 
260
					success: function(data) {
-
 
261
	
-
 
262
						jQuery('#wpsg_product_table_wrap').html(data.product_table);
-
 
263
	
-
 
264
					}
-
 
265
				} );
-
 
266
	
-
 
267
				return false;
-
 
268
			
-
 
269
			}
-
 
270
		
-
 
271
		}
148
 
272
 
149
		//wpsg_view_orderdata_show();
-
 
150
 
-
 
151
    } );
-
 
152
 
-
 
153
    function wpsg_view_orderdata_show() {
-
 
154
                
-
 
155
        jQuery('#LinkGutscheinNeu').show();
-
 
156
        jQuery('#LinkRabattNeu').show();
-
 
157
        jQuery('#LinkProduktNeu').show();
-
 
158
        jQuery('#LinkSendMail').show();
-
 
159
 
-
 
160
		//if (gs_id > 0) { jQuery('#LinkGutscheinNeu').hide(); }
-
 
161
		//if (prval != 0) { jQuery('#LinkRabattNeu').hide(); }
-
 
162
    }
-
 
163
 
-
 
164
    function wpsg_view_orderdata_hide() {
-
 
165
    	jQuery('#LinkGutscheinNeu').hide();
-
 
166
        jQuery('#LinkRabattNeu').hide();
-
 
167
        jQuery('#LinkProduktNeu').hide();
-
 
168
        jQuery('#LinkSendMail').hide();
-
 
169
    }
-
 
170
 
-
 
171
    var Modul2 = {
-
 
172
    	    eigenschaft : "wert",
-
 
173
    	    methode : function () {
-
 
174
    	        alert("Modul-Eigenschaft (über window.Modul): " + Modul2.eigenschaft);
-
 
175
    	        // Alternativ:
-
 
176
    	        alert("Modul-Eigenschaft (über this): " + this.eigenschaft);
-
 
177
    	    }
-
 
178
    };
-
 
179
    //Modul2.methode();
-
 
180
 
-
 
181
 
-
 
182
    var WPSG_BE_Pay_Ship = {
273
		var WPSG_BE_Mail = {
183
    		 
-
 
184
        changeShippingPayment: function (id, oid) {
-
 
185
 
-
 
186
            jQuery('#wpsg_shipping_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
187
            jQuery('#wpsg_shipping_dialog').modal( { } ).modal('show');
-
 
188
                            
-
 
189
            jQuery.ajax( {
-
 
190
                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editPayShipping&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
-
 
191
                success: function(data) {
-
 
192
 
-
 
193
                    jQuery('#wpsg_shipping_dialog .modal-body').html(data);
-
 
194
 
-
 
195
                }
-
 
196
            } );
-
 
197
 
-
 
198
            return false;
-
 
199
             
-
 
200
        }, // function changeShipping(id, oid)
-
 
201
 
-
 
202
        /**
-
 
203
         * Ändern der Versanddaten im Backend
-
 
204
         */
-
 
205
        updateShippingPayment: function() {
-
 
206
            
-
 
207
            var data = {
-
 
208
                submit: '1',
-
 
209
                shipping_key: jQuery('#edit_shipping_type').val(),
-
 
210
                shipping_price: jQuery('#edit_shipping_price').val(),
-
 
211
                payment_key: jQuery('#edit_payment_type').val(),
-
 
212
                payment_price: jQuery('#edit_payment_price').val()
-
 
213
            };
-
 
214
            
-
 
215
            jQuery('#wpsg_shipping_dialog').modal('hide');
-
 
216
            
-
 
217
            jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
218
            
-
 
219
            jQuery.ajax( {
-
 
220
                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=updateOrder&subaction=editPayShipping&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
-
 
221
                data: data,
-
 
222
                success: function(data) {
-
 
223
                    
-
 
224
                    jQuery('#wpsg_product_table_wrap').html(data.product_table);
-
 
225
                    
-
 
226
                }
-
 
227
            } );
-
 
228
            
-
 
229
            return false; 
-
 
230
 
-
 
231
        } // function dialogShippingOK()
-
 
232
  
-
 
233
    };	// WPSG_BE_Pay_Ship
-
 
234
 
-
 
235
    var WPSG_BE_Product = {
-
 
236
 
-
 
237
        addProduct: function() {
-
 
238
    
-
 
239
            jQuery('#wpsg_product_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
240
            jQuery('#wpsg_product_dialog').modal( { } ).modal('show');
-
 
241
            jQuery('#wpsg_product_dialog .btn-primary').prop('disabled', true);
-
 
242
            
-
 
243
            jQuery.ajax( {
-
 
244
                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=addProduct&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
-
 
245
                success: function(data) {
-
 
246
    
-
 
247
                    jQuery('#wpsg_product_dialog .modal-body').html(data);
-
 
248
    
-
 
249
                }
-
 
250
            } );
-
 
251
    
-
 
252
            return false;
-
 
253
            
-
 
254
        },
-
 
255
        
274
			
256
        remvoeProduct: function(order_product_id) {
275
			sendCustomerMail: function(order_id) {
257
 
-
 
258
            jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
259
            
276
 
260
            jQuery.ajax( {
277
				jQuery.ajax( {
261
                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=removeProduct&noheader=1&edit_id=<?php echo $_REQUEST['edit_id']; ?>',
-
 
262
                data: { 
-
 
263
                    order_product_id: order_product_id
-
 
264
                },
-
 
265
                success: function(data) {
-
 
266
 
-
 
267
                    jQuery('#wpsg_product_table_wrap').html(data.product_table);
-
 
268
 
-
 
269
                }
-
 
270
            } );
-
 
271
            
-
 
272
            return false;
-
 
273
            
-
 
274
        },
-
 
275
        
-
 
276
        editProduct: function(order_product_id) {
-
 
277
 
-
 
278
            jQuery('#wpsg_product_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
279
            jQuery('#wpsg_product_dialog').modal( { } ).modal('show');
-
 
280
            jQuery('#wpsg_product_dialog .btn-primary').prop('disabled', true);
-
 
281
 
-
 
282
            jQuery.ajax( {
-
 
283
                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=addProduct&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
-
 
284
                data: {
-
 
285
                    order_product_id: order_product_id  
-
 
286
                },
-
 
287
                success: function(data) {
-
 
288
 
-
 
289
                    jQuery('#wpsg_product_dialog .modal-body').html(data);
-
 
290
 
-
 
291
                }
-
 
292
            } );
-
 
293
 
-
 
294
            return false;
-
 
295
            
-
 
296
        },
-
 
297
 
-
 
298
        saveProduct: function() {
-
 
299
 
-
 
300
            jQuery('#wpsg_product_dialog').modal('hide');
-
 
301
            jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
302
 
-
 
303
            jQuery.ajax( {
-
 
304
                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=addProduct&do=submit&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
278
					url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=sendMail&do=customer&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
305
                data: jQuery('#wpsg_product_add_form').serialize(),
279
					data: jQuery('#wpsg_be_discount_form').serialize(),
306
                success: function(data) {
280
					success: function(data) { alert(data); }
307
 
-
 
308
                    jQuery('#wpsg_product_table_wrap').html(data.product_table);
-
 
309
 
-
 
310
                }
-
 
311
            } );
-
 
312
 
-
 
313
            return false;
-
 
314
 
-
 
315
        }
281
				} );
316
        
-
 
317
    }
-
 
318
    
-
 
319
    var WPSG_BE_Discount = {
-
 
320
        
-
 
321
        editDiscount: function() {
-
 
322
 
-
 
323
            jQuery('#wpsg_discount_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
324
            jQuery('#wpsg_discount_dialog').modal( { } ).modal('show'); 
-
 
325
 
-
 
326
            jQuery.ajax( {
-
 
327
                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editDiscount&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',                 
-
 
328
                success: function(data) {
-
 
329
 
-
 
330
                    jQuery('#wpsg_discount_dialog .modal-body').html(data);
-
 
331
 
-
 
332
                }
-
 
333
            } );
-
 
334
 
-
 
335
            return false;
-
 
336
            
-
 
337
        },
-
 
338
        
-
 
339
        saveDiscount: function() {
-
 
340
 
-
 
341
            jQuery('#wpsg_discount_dialog').modal('hide');
-
 
342
            jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
343
 
-
 
344
            jQuery.ajax( {
-
 
345
                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editDiscount&do=submit&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
-
 
346
                data: jQuery('#wpsg_be_discount_form').serialize(),
-
 
347
                success: function(data) {
-
 
348
 
-
 
349
                    jQuery('#wpsg_product_table_wrap').html(data.product_table);
-
 
350
 
282
 
351
                }
283
				return false;
-
 
284
				
-
 
285
			}
-
 
286
			
-
 
287
		}
-
 
288
		
352
            } );
289
	</script>
-
 
290
	
-
 
291
	<?php wpsg_drawForm_AdminboxEnd(); ?>
353
 
292
 
354
            return false;
-
 
355
            
-
 
356
        }
-
 
357
        
-
 
358
    }
293
</div>
359
    
-
 
360
	/* ]]> */</script>
-
 
361
 
294
 
-
 
295
<!-- Modaldialog für Gutscheine -->
-
 
296
<div class="modal fade" id="wpsg_voucher_dialog" tabindex="-1" role="dialog">
-
 
297
	<div class="modal-dialog" role="document">
-
 
298
		<div class="modal-content">
-
 
299
			<div class="modal-header">
-
 
300
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-
 
301
				<h4 class="modal-title" id="myModalLabel"><?php echo __('Gutschein hinzufügen/bearbeiten', 'wpsg'); ?></h4>
-
 
302
			</div>
-
 
303
			<div class="modal-body"></div>
-
 
304
			<div class="modal-footer">
-
 
305
				<button type="button" class="btn btn-default" data-dismiss="modal">Abbrechen</button>
-
 
306
				<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="return WPSG_BE_Voucher.saveVoucher();">OK</button>
-
 
307
			</div>
-
 
308
		</div>
-
 
309
	</div>
362
</div>
310
</div>
363
 
311
 
364
<!-- Modaldialog für Rabatt -->
312
<!-- Modaldialog für Rabatt -->
365
<div class="modal fade" id="wpsg_discount_dialog" tabindex="-1" role="dialog">
313
<div class="modal fade" id="wpsg_discount_dialog" tabindex="-1" role="dialog">
366
    <div class="modal-dialog" role="document">
314
    <div class="modal-dialog" role="document">