Add SKU column before product title
- Added SKU column as second column after checkbox - SKU displayed in monospace font for readability - Slightly reduced product name truncation to fit table Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -620,6 +620,7 @@ class Informatiq_SP_Admin {
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30px;"><input type="checkbox" id="informatiq-sp-select-all-header"></th>
|
||||
<th><?php esc_html_e( 'SKU', 'informatiq-smart-pricing' ); ?></th>
|
||||
<th><?php esc_html_e( 'Product', 'informatiq-smart-pricing' ); ?></th>
|
||||
<th><?php esc_html_e( 'Your Price', 'informatiq-smart-pricing' ); ?></th>
|
||||
<th><?php esc_html_e( 'Suggested', 'informatiq-smart-pricing' ); ?></th>
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
// Render table rows
|
||||
var html = '';
|
||||
if (pageProducts.length === 0) {
|
||||
html = '<tr><td colspan="9">No products found.</td></tr>';
|
||||
html = '<tr><td colspan="10">No products found.</td></tr>';
|
||||
} else {
|
||||
pageProducts.forEach(function(product) {
|
||||
var localPrice = product.local_price ? data.currency + parseFloat(product.local_price).toFixed(2) : '-';
|
||||
@@ -348,7 +348,8 @@
|
||||
|
||||
html += '<tr>';
|
||||
html += '<td>' + checkbox + '</td>';
|
||||
html += '<td><a href="post.php?post=' + product.id + '&action=edit" title="SKU: ' + product.sku + '">' + self.truncate(product.name, 40) + '</a></td>';
|
||||
html += '<td><code style="font-size: 11px;">' + product.sku + '</code></td>';
|
||||
html += '<td><a href="post.php?post=' + product.id + '&action=edit">' + self.truncate(product.name, 35) + '</a></td>';
|
||||
html += '<td>' + localPrice + priceLabel + '</td>';
|
||||
html += '<td>' + suggestedPrice + '</td>';
|
||||
html += '<td style="' + percentDiffStyle + '">' + percentDiffHtml + '</td>';
|
||||
|
||||
Reference in New Issue
Block a user