Browse files

increasing search field input lengths, adding warning in case there a…

…re duplicate skus in ec_products
  • Loading branch information...
1 parent 9df19b8 commit ecbe11bac2788f747b48029dc4cb013ce7d22944 Torben Brosten committed Feb 18, 2009
Showing with 26 additions and 13 deletions.
  1. +19 −13 www/admin/products/index.adp
  2. +7 −0 www/admin/products/index.tcl
@@ -2,35 +2,41 @@
<property name="doc(title)">@title;noquote@</property>
<property name="context">@context;noquote@</property>
+<if @repeat_sku_warn@ true>
+<p>Warning: More than one product has been assigned to the following skus. Some bulk actions may not work as expected.</p>
+<p> @repeat_skus;noquote@</p>
<li>@n_products@ products
(<a href="list">All</a> |
<a href="by-category">By Category</a> |
<a href="add">Add</a>)
+<li><a href="recommendations">Recommendations</a></li>
+<li><a href="../cat/">Categorization</a></li>
+<li><a href="custom-fields">Custom Fields</a></li>
+<li><a href="upload-utilities">Bulk upload products</a></li>
-<li><a href="recommendations">Recommendations</a>
-<li><a href="../cat/">Categorization</a>
-<li><a href="custom-fields">Custom Fields</a>
-<li><a href="upload-utilities">Bulk upload products</a>
<form method=post action=search>
-<li>Search by Name: <input type=text name=product_name size=20>
-<input type=submit value="Search">
+<li>Search by Name: <input type=text name=product_name size=40>
+<input type=submit value="Search"></li>
<form method=post action=search>
-<li>Search by SKU: <input type=text name=sku size=3>
-<input type=submit value="Search">
+<li>Search by SKU: <input type=text name=sku size=90>
+<input type=submit value="Search"></li>
-<li><a href="@audit_html;noquote@">Audit all Products</a>
+<li><a href="@audit_html;noquote@">Audit all Products</a></li>
@@ -21,3 +21,10 @@ set audit_html "[ec_url_concat [ec_url] /admin]/audit-tables?[export_url_vars ta
db_1row products_select "select count(*) as n_products, round(avg(price),2) as avg_price from ec_products_displayable"
+set repeat_skus [db_list possible_sku_ref_issues "select sku from ec_products where active_p = 't' group by sku having count(sku) > 1"]
+if { [llength $repeat_skus] > 0 } {
+ set repeat_sku_warn 1
+} else {
+ set repeat_sku_warn 0

0 comments on commit ecbe11b

Please sign in to comment.