Hi All,
I’ve attempted to get this functionality work the way I want it, not to much avail as I’m not exactly a jQuery guru.
Is this something accomplishable?
Before
Change the present functionality from search by product to search by order id
After
Quick search will search by order id by default.
Regards,
Jesse-Lee Stringer
Edit
admin/bottom.tpl
Replace this code
```php
```php
Most of the time I use this to search product SKU, how would I make searching for SKY default ?
[quote name=‘JesseLeeStringer’]Hi All,
I’ve attempted to get this functionality work the way I want it, not to much avail as I’m not exactly a jQuery guru.
Is this something accomplishable?
Before
Change the present functionality from search by product to search by order id
After
Quick search will search by order id by default.
Regards,
Jesse-Lee Stringer[/QUOTE]
Try replacing the code above with this for product code default
```php
You can search for the product code that way, but I like being able to search for the product code (sku) on any of the product search areas.
The code I have below will allow you to search by product code in both the admin and the customer side.
This code came from the CS Knowledge base.
In core/fn.catalog.php
Below:
if ($params['pname'] == 'Y') {
$tmp .= db_quote(" OR descr1.product LIKE ?l", "%$piece%");
}
Add:
$oc_codes = db_get_fields(" SELECT product_code FROM ?:product_options_inventory");
if (in_array($piece, $oc_codes)) {
$pid = db_get_field(" SELECT product_id FROM ?:product_options_inventory WHERE product_code = '$piece'");
$tmp .= db_quote(" OR products.product_id LIKE ?s", "%$pid%");
}
if ($params['pname'] == 'Y') {
$tmp .= db_quote(" OR products.product_code LIKE ?s", "%$piece%");
}
Hope that helps,
Brandon