_buttons_template.php
11 years ago
_import_file.php
11 years ago
_reimport_options.php
11 years ago
_reimport_template.php
11 years ago
_settings_template.php
11 years ago
_reimport_template.php
97 lines
| 1 | <?php $custom_type = get_post_type_object( $post_type ); ?> |
| 2 | <div class="wpallimport-collapsed wpallimport-section"> |
| 3 | <script type="text/javascript"> |
| 4 | __META_KEYS = <?php echo json_encode($existing_meta_keys) ?>; |
| 5 | </script> |
| 6 | <div class="wpallimport-content-section"> |
| 7 | <div class="wpallimport-collapsed-header"> |
| 8 | <?php if ( "new" == $post['wizard_type']): ?> |
| 9 | <?php if ( ! $this->isWizard ):?> |
| 10 | <h3><?php _e('Record Matching', 'pmxi_plugin'); ?></h3> |
| 11 | <?php else: ?> |
| 12 | <h3 style="padding-left:0;"><?php printf(__('WP All Import will create new %s for each unique record in your file.','pmxi_plugin'), $custom_type->labels->name);?></h3> |
| 13 | <?php endif; ?> |
| 14 | </div> |
| 15 | <div class="wpallimport-collapsed-content" style="padding: 0;"> |
| 16 | <div class="wpallimport-collapsed-content-inner"> |
| 17 | <table class="form-table" style="max-width:none;"> |
| 18 | <tr> |
| 19 | <td> |
| 20 | <input type="hidden" name="duplicate_matching" value="auto"/> |
| 21 | <?php if ( ! $this->isWizard ):?> |
| 22 | <h4><?php printf(__('WP All Import will associate records in your file with %s it has already created from previous runs of this import based on the Unique Identifier.','pmxi_plugin'), $custom_type->labels->name);?></h4> |
| 23 | <?php endif; ?> |
| 24 | <div class="wpallimport-unique-key-wrapper"> |
| 25 | <label style="font-weight: bold;"><?php _e("Unique Identifier", "pmxi_plugin"); ?></label> |
| 26 | |
| 27 | <input type="text" class="smaller-text" name="unique_key" style="width:300px;" value="<?php if ( ! $this->isWizard ) echo esc_attr($post['unique_key']); elseif ($post['tmp_unique_key']) echo esc_attr($post['unique_key']); ?>" <?php echo ( ! $isWizard ) ? 'disabled="disabled"' : '' ?>/> |
| 28 | |
| 29 | <?php if ( $this->isWizard ): ?> |
| 30 | <input type="hidden" name="tmp_unique_key" value="<?php echo ($post['unique_key']) ? esc_attr($post['unique_key']) : esc_attr($post['tmp_unique_key']); ?>"/> |
| 31 | <a href="javascript:void(0);" class="wpallimport-auto-detect-unique-key"><?php _e('Auto-detect', 'pmxi_plugin'); ?></a> |
| 32 | <?php else: ?> |
| 33 | <a href="javascript:void(0);" class="wpallimport-change-unique-key"><?php _e('Edit', 'pmxi_plugin'); ?></a> |
| 34 | <div id="dialog-confirm" title="<?php _e('Warning: Are you sure you want to edit the Unique Identifier?','pmxi_plugin');?>" style="display:none;"> |
| 35 | <p><?php printf(__('It is recommended you delete all %s associated with this import before editing the unique identifier.', 'pmxi_plugin'), strtolower($custom_type->labels->name)); ?></p> |
| 36 | <p><?php printf(__('Editing the unique identifier will dissociate all existing %s linked to this import. Future runs of the import will result in duplicates, as WP All Import will no longer be able to update these %s.', 'pmxi_plugin'), strtolower($custom_type->labels->name), strtolower($custom_type->labels->name)); ?></p> |
| 37 | <p><?php _e('You really should just re-create your import, and pick the right unique identifier to start with.', 'pmxi_plugin'); ?></p> |
| 38 | </div> |
| 39 | <?php endif; ?> |
| 40 | |
| 41 | <p> </p> |
| 42 | <?php if ( $this->isWizard ):?> |
| 43 | <p class="drag_an_element_ico"><?php _e('Drag an element, or combo of elements, to the box above. The Unique Identifier should be unique for each record in your file, and should stay the same even if your file is updated. Things like product IDs, titles, and SKUs are good Unique Identifiers because they probably won\'t change. Don\'t use a description or price, since that might be changed.', 'pmxi_plugin'); ?></p> |
| 44 | <p class="info_ico"><?php printf(__('If you run this import again with an updated file, the Unique Identifier allows WP All Import to correctly link the records in your updated file with the %s it will create right now. If multiple records in this file have the same Unique Identifier, only the first will be created. The others will be detected as duplicates.', 'pmxi_plugin'), $custom_type->labels->name); ?></p> |
| 45 | <?php endif; ?> |
| 46 | </div> |
| 47 | <?php if ( ! $this->isWizard ):?> |
| 48 | |
| 49 | <?php include( '_reimport_options.php' ); ?> |
| 50 | |
| 51 | <?php endif; ?> |
| 52 | </td> |
| 53 | </tr> |
| 54 | </table> |
| 55 | </div> |
| 56 | </div> |
| 57 | <?php else: ?> |
| 58 | <?php if ( ! $this->isWizard ):?> |
| 59 | <h3><?php _e('Record Matching', 'pmxi_plugin'); ?></h3> |
| 60 | <?php else: ?> |
| 61 | <h3 style="padding-left:0;"><?php printf(__('WP All Import will merge data into existing %s.','pmxi_plugin'), $custom_type->labels->name);?></h3> |
| 62 | <?php endif; ?> |
| 63 | </div> |
| 64 | <div class="wpallimport-collapsed-content" style="padding:0;"> |
| 65 | <div class="wpallimport-collapsed-content-inner"> |
| 66 | <table class="form-table" style="max-width:none;"> |
| 67 | <tr> |
| 68 | <td> |
| 69 | <div class="input" style="margin-bottom:15px; position:relative;"> |
| 70 | <input type="hidden" name="duplicate_matching" value="manual"/> |
| 71 | <h4><?php printf(__('Records in your file will be matched with %ss on your site based on...', 'pmxi_plugin' ), $custom_type->labels->singular_name);?></h4> |
| 72 | <div style="margin-left: -4px;"> |
| 73 | <div class="input"> |
| 74 | <input type="radio" id="duplicate_indicator_title" class="switcher" name="duplicate_indicator" value="title" <?php echo 'title' == $post['duplicate_indicator'] ? 'checked="checked"': '' ?>/> |
| 75 | <label for="duplicate_indicator_title"><?php _e('Title', 'pmxi_plugin' )?></label><br> |
| 76 | <input type="radio" id="duplicate_indicator_content" class="switcher" name="duplicate_indicator" value="content" <?php echo 'content' == $post['duplicate_indicator'] ? 'checked="checked"': '' ?>/> |
| 77 | <label for="duplicate_indicator_content"><?php _e('Content', 'pmxi_plugin' )?></label><br> |
| 78 | <input type="radio" id="duplicate_indicator_custom_field" class="switcher" name="duplicate_indicator" value="custom field" <?php echo 'custom field' == $post['duplicate_indicator'] ? 'checked="checked"': '' ?>/> |
| 79 | <label for="duplicate_indicator_custom_field"><?php _e('Custom field', 'pmxi_plugin' )?></label><br> |
| 80 | <span class="switcher-target-duplicate_indicator_custom_field" style="vertical-align:middle; padding-left:17px;"> |
| 81 | <?php _e('Name', 'pmxi_plugin') ?> |
| 82 | <input type="text" name="custom_duplicate_name" value="<?php echo esc_attr($post['custom_duplicate_name']) ?>" /> |
| 83 | <?php _e('Value', 'pmxi_plugin') ?> |
| 84 | <input type="text" name="custom_duplicate_value" value="<?php echo esc_attr($post['custom_duplicate_value']) ?>" /> |
| 85 | </span> |
| 86 | </div> |
| 87 | </div> |
| 88 | </div> |
| 89 | <?php include( '_reimport_options.php' ); ?> |
| 90 | </td> |
| 91 | </tr> |
| 92 | </table> |
| 93 | </div> |
| 94 | </div> |
| 95 | <?php endif; ?> |
| 96 | </div> |
| 97 | </div> |