PluginProbe ʕ •ᴥ•ʔ
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / trunk
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments vtrunk
4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.11.0 1.11.1 1.11.2 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.9.0 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 2.0.0 2.0.1 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.10.0 2.10.1 2.11.0 2.11.1 2.11.2 2.11.3 2.11.4 2.12.0 2.13.0 2.14.0 2.14.1 2.15.0 2.15.1 2.16.0 2.16.1 2.16.2 2.16.3 2.17.0 2.17.1 2.17.2 2.18.0 2.19.0 2.19.2 2.19.3 2.19.4 2.2.0 2.2.1 2.20.0 2.20.1 2.20.2 2.20.3 2.20.4 2.20.5 2.20.6 2.21.0 2.22.0 2.22.1 2.23.0 2.24.0 2.25.0 2.25.1 2.25.2 2.26.0 2.27.0 2.27.1 2.28.0 2.29.0 2.29.1 2.29.2 2.29.3 2.29.4 2.3.0 2.3.1 2.30.0 2.31.0 2.31.1 2.31.2 2.31.3 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.40.0 2.40.1 2.5.0 2.5.1 2.5.2 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.9.0 3.0.0 3.0.0-RC1 3.0.0-RC2 3.0.0-beta1 3.0.0-beta2 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.10.0 3.10.1 3.11.0 3.12.0 3.13.0 3.13.1 3.13.2 3.13.3 3.13.4 3.14.0 3.15.0 3.15.1 3.15.2 3.15.3 3.15.4 3.15.5 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.16.6 3.16.7 3.16.8 3.17.0 3.17.1 3.17.2 3.17.3 3.17.4 3.17.5 3.17.6 3.18.0 3.19.0 3.19.1 3.19.2 3.2.0 3.2.1 3.2.2 3.20.0 3.20.1 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 4.0.0 4.0.1 4.0.2 4.0.3 trunk 4.1.0 0.2.19.1 4.1.1 1.0.0 4.2.0 1.0.1 1.0.2
surecart / views / admin / products / import-results.php
surecart / views / admin / products Last commit date
add-new-product-button.php 1 month ago confirm-bulk-delete.php 2 years ago edit.php 3 years ago import-results.php 1 month ago index.php 1 month ago
import-results.php
218 lines
1 <style>
2 #wpwrap {
3 --sc-color-primary-500: #00824C;
4 --sc-focus-ring-color-primary: #00824C;
5 --sc-color-primary-text: #fff;
6 background: var(--sc-color-brand-main-background);
7 }
8
9 /* Prevent flash of unstyled content while web components hydrate. */
10 sc-card:not(:defined),
11 sc-flex:not(:defined),
12 sc-icon:not(:defined),
13 sc-heading:not(:defined),
14 sc-text:not(:defined),
15 sc-button:not(:defined),
16 sc-breadcrumbs:not(:defined) {
17 opacity: 0;
18 }
19
20 sc-card:defined,
21 sc-flex:defined,
22 sc-icon:defined,
23 sc-heading:defined,
24 sc-text:defined,
25 sc-button:defined,
26 sc-breadcrumbs:defined {
27 opacity: 1;
28 transition: opacity 0.15s ease-in;
29 }
30
31 .wrap .import-results-container {
32 width: 100%;
33 padding-top: 3em;
34 }
35
36 .wrap .import-results-container sc-card {
37 width: 100%;
38 max-width: 700px;
39 }
40
41 .import-results-icon {
42 font-size: 24px;
43 color: var(--sc-color-primary-500);
44 }
45
46 .import-results-summary {
47 font-size: 14px;
48 line-height: 1.6;
49 margin:0;
50 }
51
52 .import-results-summary strong {
53 font-weight: 600;
54 }
55
56 .import-results-table {
57 width: 100%;
58 border-collapse: collapse;
59 font-size: 13px;
60 border: 1px solid var(--sc-color-gray-300, #e0e0e0);
61 }
62
63 .import-results-table th,
64 .import-results-table td {
65 text-align: left;
66 padding: 8px 12px;
67 border: 1px solid var(--sc-color-gray-300, #e0e0e0);
68 color: var(--sc-color-gray-700, #555);
69 }
70
71 .import-results-table th {
72 font-weight: 600;
73 background: var(--sc-color-gray-50, #fafafa);
74 }
75
76 .import-results-docs-link {
77 display: inline-flex;
78 align-items: center;
79 gap: 0.3em;
80 color: #2563EB;
81 text-decoration: none;
82 font-size: 14px;
83 }
84
85 .import-results-docs-link:hover {
86 text-decoration: underline;
87 }
88 </style>
89
90 <div class="wrap">
91 <?php \SureCart::render( 'layouts/partials/admin-index-styles' ); ?>
92
93 <sc-flex justify-content="center" class="import-results-container">
94 <sc-card style="--sc-card-padding: var(--sc-spacing-xxx-large)">
95 <sc-flex flex-direction="column" style="--sc-flex-column-gap: 1.25em;">
96 <sc-icon name="download" class="import-results-icon"></sc-icon>
97
98 <sc-heading size="large"><?php esc_html_e( 'Import Products', 'surecart' ); ?></sc-heading>
99
100 <div class="import-results-summary">
101 <?php if ( ! empty( $results_capped ) ) : ?>
102 <p role="alert" style="color: #92400e; background: #fef3c7; padding: 8px 12px; border-radius: 4px; margin: 0 0 0.5em;">
103 &#9888; <?php esc_html_e( 'Note: Only the first 5,000 results are shown below. Your import may have additional rows not displayed here.', 'surecart' ); ?>
104 </p>
105 <?php endif; ?>
106
107 <?php if ( ! empty( $all_skipped ) ) : ?>
108 <?php esc_html_e( 'No products were imported. All products were skipped (see details below).', 'surecart' ); ?>
109 <?php elseif ( $succeeded_count > 0 ) : ?>
110 <?php
111 echo wp_kses(
112 sprintf(
113 /* translators: %s: number of successfully imported products */
114 __( 'You have successfully imported %s products.', 'surecart' ),
115 '<strong>' . esc_html( $succeeded_count ) . '</strong>'
116 ),
117 [ 'strong' => [] ]
118 );
119 ?>
120 <?php else : ?>
121 <?php esc_html_e( 'No products were imported.', 'surecart' ); ?>
122 <?php endif; ?>
123 </div>
124
125 <?php if ( ! empty( $failed_rows ) ) : ?>
126 <div>
127 <p class="import-results-summary">
128 <?php
129 echo wp_kses(
130 sprintf(
131 /* translators: %s: number of failed products */
132 __( '%s products failed to import due to:', 'surecart' ),
133 '<strong>' . esc_html( count( $failed_rows ) ) . '</strong>'
134 ),
135 [ 'strong' => [] ]
136 );
137 ?>
138 </p>
139 </div>
140 <table class="import-results-table">
141 <caption class="screen-reader-text"><?php esc_html_e( 'Failed product imports', 'surecart' ); ?></caption>
142 <thead>
143 <tr>
144 <th scope="col"><?php esc_html_e( 'Product Name', 'surecart' ); ?></th>
145 <th scope="col"><?php esc_html_e( 'Reason', 'surecart' ); ?></th>
146 </tr>
147 </thead>
148 <tbody>
149 <?php foreach ( $failed_rows as $row ) : ?>
150 <tr>
151 <td><?php echo esc_html( $row['name'] ?? '' ); ?></td>
152 <td><?php echo esc_html( $row['reason'] ?? '' ); ?></td>
153 </tr>
154 <?php endforeach; ?>
155 </tbody>
156 </table>
157 <?php endif; ?>
158
159 <?php if ( ! empty( $skipped_products ) ) : ?>
160 <div>
161 <?php if ( empty( $all_skipped ) ) : ?>
162 <p class="import-results-summary" style="margin-bottom: 1em;">
163 <?php
164 echo wp_kses(
165 sprintf(
166 /* translators: %s: number of skipped products */
167 __( '%s products were skipped:', 'surecart' ),
168 '<strong>' . esc_html( count( $skipped_products ) ) . '</strong>'
169 ),
170 [ 'strong' => [] ]
171 );
172 ?>
173 </p>
174 <?php endif; ?>
175 <sc-heading size="medium" style="margin-bottom: 0.5em;">
176 <?php esc_html_e( 'Skipped Products', 'surecart' ); ?>
177 </sc-heading>
178 <p class="description" style="margin-bottom: 1em;">
179 <?php esc_html_e( 'The following products were not imported because they are unsupported product types or could not be processed.', 'surecart' ); ?>
180 </p>
181 <table class="import-results-table">
182 <caption class="screen-reader-text"><?php esc_html_e( 'Skipped products', 'surecart' ); ?></caption>
183 <thead>
184 <tr>
185 <th scope="col"><?php esc_html_e( 'Product Name', 'surecart' ); ?></th>
186 <th scope="col"><?php esc_html_e( 'Type', 'surecart' ); ?></th>
187 <th scope="col"><?php esc_html_e( 'Reason', 'surecart' ); ?></th>
188 </tr>
189 </thead>
190 <tbody>
191 <?php foreach ( $skipped_products as $product ) : ?>
192 <tr>
193 <td><?php echo esc_html( $product['name'] ?? __( 'Unknown', 'surecart' ) ); ?></td>
194 <td><?php echo esc_html( $product['type'] ?? '-' ); ?></td>
195 <td><?php echo esc_html( $product['reason'] ?? __( 'Unknown reason', 'surecart' ) ); ?></td>
196 </tr>
197 <?php endforeach; ?>
198 </tbody>
199 </table>
200 </div>
201 <?php endif; ?>
202
203 <a href="https://surecart.com/docs" target="_blank" rel="noopener noreferrer" class="import-results-docs-link">
204 <?php esc_html_e( 'Go to documentation', 'surecart' ); ?>
205 <span class="screen-reader-text"><?php esc_html_e( '(opens in a new tab)', 'surecart' ); ?></span>
206 <sc-icon name="external-link" style="font-size: 14px;" aria-hidden="true"></sc-icon>
207 </a>
208
209 <div>
210 <sc-button href="<?php echo esc_url( \SureCart::getUrl()->index( 'products' ) ); ?>" size="medium" type="primary">
211 <?php esc_html_e( 'Show All Products', 'surecart' ); ?>
212 </sc-button>
213 </div>
214 </sc-flex>
215 </sc-card>
216 </sc-flex>
217 </div>
218