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:
2026-01-23 18:49:47 +01:00
parent 55db279231
commit eaff86aad1
2 changed files with 4 additions and 2 deletions

View File

@@ -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>';