my-maxi-skirt /wp-content/plugins/wp-lister-for-ebay/views/listings_edit_page.php

Language PHP Lines 281
MD5 Hash 48515db7c58097078f7cdcfb0878ad04 Estimated Cost $1,482 (why?)
Repository https://bitbucket.org/sanders_nick/my-maxi-skirt.git View Raw File
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<?php include_once( dirname(__FILE__).'/common_header.php' ); ?>

<style type="text/css">

	/* sideboxes */
	#side-sortables .postbox input.text_input,
	#side-sortables .postbox select.select {
	    width: 50%;
	}
	#side-sortables .postbox label.text_label {
	    width: 45%;
	}

	.postbox h3 {
	    cursor: default;
	}
		
	/* backwards compatibility to WP 3.3 */
	#poststuff #post-body.columns-2 {
	    margin-right: 300px;
	}
	#poststuff #post-body {
	    padding: 0;
	}
	#post-body.columns-2 #postbox-container-1 {
	    float: right;
	    margin-right: -300px;
	    width: 280px;
	}
	#poststuff .postbox-container {
	    width: 100%;
	}
	#major-publishing-actions {
	    border-top: 1px solid #F5F5F5;
	    clear: both;
	    margin-top: -2px;
	    padding: 10px 10px 8px;
	}
	#post-body .misc-pub-section {
	    max-width: 100%;
	    border-right: none;
	}
</style>

<?php
	$item_details = $wpl_item['profile_data']['details'];
?>

<div class="wrap wplister-page">
	<div class="icon32" style="background: url(<?php echo $wpl_plugin_url; ?>img/hammer-32x32.png) no-repeat;" id="wpl-icon"><br /></div>
	<h2><?php echo __('Edit Listing','wplister') ?></h2>
	
	<?php echo $wpl_message ?>

	<form method="post" action="<?php echo $wpl_form_action; ?>">

	<div id="poststuff">
		<div id="post-body" class="metabox-holder columns-2">

			<div id="postbox-container-1" class="postbox-container">
				<div id="side-sortables" class="meta-box">


					<!-- first sidebox -->
					<div class="postbox" id="submitdiv">
						<!--<div title="Click to toggle" class="handlediv"><br></div>-->
						<h3><span><?php echo __('Update','wplister'); ?></span></h3>
						<div class="inside">

							<div id="submitpost" class="submitbox">

								<div id="misc-publishing-actions">
									<div class="misc-pub-section">
									<!-- optional revise item on save -->
									<?php if ( ( $wpl_item['status'] == 'published' ) || ( $wpl_item['status'] == 'changed' ) ): ?>
										<p><?php _e('Your changes to this item will only be updated on eBay when you revise this item.','wplister') ?></p>
										<input type="checkbox" name="wpl_e2e_revise_item_on_save" value="yes" id="revise_item_on_save" />
										<label for="revise_item_on_save"><?php _e('revise this item when saving','wplister') ?></label>
									<?php else: ?>
										<p>This item has not been published yet.</p>
									<?php endif; ?>
									</div>
								</div>

								<div id="major-publishing-actions">
									<div id="publishing-action">
										<input type="hidden" name="action" value="save_listing" />
										<input type="hidden" name="wpl_e2e_listing_id" value="<?php echo $wpl_item['id']; ?>" />
										<input type="hidden" name="wpl_e2e_status" value="<?php echo $wpl_item['status']; ?>" > 
										<input type="submit" value="<?php echo __('Update','wplister'); ?>" id="publish" class="button-primary" name="save">
									</div>
									<div class="clear"></div>
								</div>

							</div>

						</div>
					</div>


					<div class="postbox" id="TemplatesBox">
						<h3><span><?php echo __('Template','wplister'); ?></span></h3>
						<div class="inside">
							<?php foreach ($wpl_template_files as $tpl) : ?>
								<?php
									$tpl_name = $tpl['template_name'];
									$tpl_path = $tpl['template_path'];
									$checked  = ( $wpl_item['template'] == $tpl_path ) ? 'checked="checked"' : '';
								?>

								<input type="radio" value="<?php echo $tpl_path ?>" id="template-<?php echo basename($tpl_path) ?>" name="wpl_e2e_template" class="post-format" <?php echo $checked ?> > 
								<label for="template-<?php echo basename($tpl_path) ?>"><?php echo $tpl_name ?></label><br>

							<?php endforeach; ?>							
						</div>
					</div>


					<div class="postbox" id="HelpBox">
						<h3><span><?php echo __('Information','wplister'); ?></span></h3>
						<div class="inside">
							<p>
								Editing a single listing might come in handy when you need to fix a single title or price. 
								But it is not recommended as part of your workflow. 
							</p>
							<p>
								If you find yourself editing single listings on a regular basis, 
								you should contact us and describe your requirements. We will then work out a solution which benefts all users.
							</p>
						</div>
					</div>


				</div>
			</div> <!-- #postbox-container-2 -->

			<div id="postbox-container-2" class="postbox-container">
				<div class="meta-box-sortables ui-sortable">
					

					<div class="postbox" id="GeneralSettingsBox">
						<h3><span><?php echo __('Item settings','wplister'); ?></span></h3>
						<div class="inside">

							<div id="titlediv" style="margin-bottom:5px;">
								<div id="titlewrap">
									<label for="wpl-text-auction_title" class="text_label"><?php echo __('Title','wplister'); ?>:</label>
									<input type="text" name="wpl_e2e_auction_title" size="30" value="<?php echo $wpl_item['auction_title']; ?>" id="title" autocomplete="off" style="width:65%;">
								</div>
							</div>

							<label for="wpl-text-price" class="text_label"><?php echo __('Price / Start price','wplister'); ?>:</label>
							<input type="text" name="wpl_e2e_price" id="wpl-text-price" value="<?php echo $wpl_item['price']; ?>" class="text_input" />
							<p class="desc" style="display: block;"><?php echo __('This will have no effect on product variations.','wplister'); ?></p>
							<!br class="clear" />

							<label for="wpl-text-quantity" class="text_label"><?php echo __('Quantity','wplister'); ?>:</label>
							<input type="text" name="wpl_e2e_quantity" id="wpl-text-quantity" value="<?php echo $wpl_item['quantity']; ?>" class="text_input" />
							<p class="desc" style="display: block;"><?php echo __('This will have no effect on product variations.','wplister'); ?></p>
							<!br class="clear" />


							<label for="wpl-text-listing_duration" class="text_label"><?php echo __('Duration','wplister'); ?>: *</label>
							<select id="wpl-text-listing_duration" name="wpl_e2e_listing_duration" title="Laufzeit" class=" required-entry select">
								<option value="">-- <?php echo __('Please select','wplister'); ?> --</option>
								<option value="Days_3" <?php if ( $wpl_item['listing_duration'] == 'Days_3' ): ?>selected="selected"<?php endif; ?>>3 <?php echo __('Days','wplister'); ?></option>
								<option value="Days_5" <?php if ( $wpl_item['listing_duration'] == 'Days_5' ): ?>selected="selected"<?php endif; ?>>5 <?php echo __('Days','wplister'); ?></option>
								<option value="Days_7" <?php if ( $wpl_item['listing_duration'] == 'Days_7' ): ?>selected="selected"<?php endif; ?>>7 <?php echo __('Days','wplister'); ?></option>
								<option value="Days_10" <?php if ( $wpl_item['listing_duration'] == 'Days_10' ): ?>selected="selected"<?php endif; ?>>10 <?php echo __('Days','wplister'); ?></option>
								<option value="Days_30" <?php if ( $wpl_item['listing_duration'] == 'Days_30' ): ?>selected="selected"<?php endif; ?>>30 <?php echo __('Days','wplister'); ?></option>
								<option value="Days_60" <?php if ( $wpl_item['listing_duration'] == 'Days_60' ): ?>selected="selected"<?php endif; ?>>60 <?php echo __('Days','wplister'); ?></option>
								<option value="Days_90" <?php if ( $wpl_item['listing_duration'] == 'Days_90' ): ?>selected="selected"<?php endif; ?>>90 <?php echo __('Days','wplister'); ?></option>
								<option value="GTC" <?php if ( $wpl_item['listing_duration'] == 'GTC' ): ?>selected="selected"<?php endif; ?>><?php echo __('Good Till Canceled','wplister'); ?> (GTC)</option>
							</select>
							<br class="clear" />


						</div>
					</div>



					<div class="postbox" id="DeveloperToolBox" style="display:none;">
						<h3><span><?php echo __('Developer options','wplister'); ?></span></h3>
						<div class="inside">
							<p>
								You should not normally need to modify the following settings. Use at your own risk!
							</p>

							<label for="wpl-text-quantity_sold" class="text_label"><?php echo __('Items sold','wplister'); ?>:</label>
							<input type="text" name="wpl_e2e_quantity_sold" size="30" value="<?php echo $wpl_item['quantity_sold']; ?>" class="text_input" />
							<br class="clear" />

							<label for="wpl-text-ebay_id" class="text_label"><?php echo __('eBay Item ID','wplister'); ?>:</label>
							<input type="text" name="wpl_e2e_ebay_id" size="30" value="<?php echo $wpl_item['ebay_id']; ?>" class="text_input" />
							<br class="clear" />

							<label for="wpl-text-listing_status" class="text_label"><?php echo __('Listing status','wplister'); ?>:</label>
							<select id="wpl-text-listing_status" name="wpl_e2e_listing_status" title="Laufzeit" class=" required-entry select">
								<option value="prepared" <?php if ( $wpl_item['status'] == 'prepared' ): ?>selected="selected"<?php endif; ?>><?php echo __('prepared','wplister'); ?></option>
								<option value="verified" <?php if ( $wpl_item['status'] == 'verified' ): ?>selected="selected"<?php endif; ?>><?php echo __('verified','wplister'); ?></option>
								<option value="published" <?php if ( $wpl_item['status'] == 'published' ): ?>selected="selected"<?php endif; ?>><?php echo __('published','wplister'); ?></option>
								<option value="sold" <?php if ( $wpl_item['status'] == 'sold' ): ?>selected="selected"<?php endif; ?>><?php echo __('sold','wplister'); ?></option>
								<option value="ended" <?php if ( $wpl_item['status'] == 'ended' ): ?>selected="selected"<?php endif; ?>><?php echo __('ended','wplister'); ?></option>
								<option value="changed" <?php if ( $wpl_item['status'] == 'changed' ): ?>selected="selected"<?php endif; ?>><?php echo __('changed','wplister'); ?></option>
							</select>
							<br class="clear" />

							<label for="wpl-text-post_id" class="text_label"><?php echo __('Product ID','wplister'); ?>:</label>
							<input type="text" name="wpl_e2e_post_id" size="30" value="<?php echo $wpl_item['post_id']; ?>" class="text_input" />
							<br class="clear" />

							<label for="wpl-enable_dev_mode" class="text_label"><?php echo __('Update advances settings','wplister'); ?>:</label>
							<input type="checkbox" name="wpl_e2e_enable_dev_mode" id="wpl-enable_dev_mode" value="1" class="checkbox_input" />
							<span style="line-height: 24px">
								<?php echo __('Yes, I know what I am doing.','wplister'); ?>
							</span>
							<br class="clear" />


						</div>
					</div>




					<div class="submit" style="padding-top: 0; float: right; display:none;">
						<input type="submit" value="<?php echo __('Save listing','wplister'); ?>" name="submit" class="button-primary">
					</div>
						
				</div> <!-- .meta-box-sortables -->
			</div> <!-- #postbox-container-2 -->


		</div> <!-- #post-body -->
		<br class="clear">
	</div> <!-- #poststuff -->

	</form>


	<?php if ( get_option('wplister_log_level') > 6 ): ?>
	<pre><?php #print_r($wpl_int_shipping_options); ?></pre>
	<pre><?php print_r($wpl_item); ?></pre>
	<?php endif; ?>


	<script type="text/javascript">
		jQuery( document ).ready(
			function () {
		

				// check required values on submit
				jQuery('.wplister-page form').on('submit', function() {
					
					// duration is required
					if ( jQuery('#wpl-text-listing_duration')[0].value == '' ) {
						alert('Please select a listing duration.'); return false;
					}

					// dispatch time is required
					if ( jQuery('#wpl-text-dispatch_time')[0].value == '' ) {
						alert('Please enter a handling time.'); return false;
					}

					// first category is required
					if ( jQuery('#wpl-text-ebay_category_1_id')[0].value == '' ) {
						alert('Please select a main category.'); return false;
					}

					return true;
				})


			}
		);
	
	</script>

</div>
Back to Top