X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Admin Quick Find Togglable Panel (https://forum.x-cart.com/showthread.php?t=71112)

PhilJ 02-03-2015 08:04 PM

Admin Quick Find Togglable Panel
 
1 Attachment(s)
A quick little v4.4.x - v4.7.x admin mod that shows a useful toggleable panel for regularly used admin search sections that might save a few clicks...

The panel can be toggleable (default) or shown at all times and you can show or hide the languages field (see settings at the top of quick_find.tpl).




1) Upload attached quick_find.tpl to skin/common_files

2) In skin/common_files/admin/home.tpl and skin/common_files/single/home.tpl

Before...
Code:

<table width="100%" cellpadding="0" cellspacing="0" align="center">
Insert...
Code:

{* Quick Find Admin Panel *}
{include file="quick_find.tpl"}
{* / Quick Find Admin Panel *}


3) See this post for the manufacturers dropdown.


11th Sept 2017 - Latest version here


JacksmithxD 02-04-2015 03:28 AM

Re: Admin Quick Find Togglable Panel
 
Installed it with ease. I know it only saves seconds but those seconds will add up to a huge amount eventually! It'll also come in handy when a user calls up as you can quickly search via order ID to locate them.

Changing/Finding products is easier as it saves you a few clicks. It would be silly not to use this mod really as it takes 2 minutes to install and it's FREE.

Overall it'll make tasks easier and quicker so I'll be using it a lot.

I do suggest to add a 'Search' button though.

Thanks Phil,

mcanitano 02-05-2015 06:26 AM

Re: Admin Quick Find Togglable Panel
 
Awesome mod. Easy installation.

Trying to get it to work on 4.5.5 Gold, having two errors. When toggler is set to hide, the click does not actually show anything, instead I'm getting an error in the java code (see below). Also, the manufacturers list is limited to only the # of manufacturers in the "Manufacturers list limit (leave empty if unlimited)" value from the Manufacturers module.

Code:

Uncaught TypeError: undefined is not a functionsearch.php?mode=search&page=1:527 (anonymous function)jquery-min.js:2 f.extend._Deferred.e.resolveWithjquery-min.js:2 e.extend.readyjquery-min.js:2 c.addEventListener.C

PhilJ 02-06-2015 04:07 AM

Re: Admin Quick Find Togglable Panel
 
Hi Marcello, perhaps try upgrading your version of jQuery to say, v1.8.3, which should be safe to use.

skin/common_files/lib/jquery-min.js

https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js

Yes, it will limit the manufs according to the manuf module setting.

mcanitano 02-06-2015 05:28 AM

Re: Admin Quick Find Togglable Panel
 
Quote:

Originally Posted by PhilJ
Hi Marcello, perhaps try upgrading your version of jQuery to say, v1.8.3, which should be safe to use.

skin/common_files/lib/jquery-min.js

https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js

Yes, it will limit the manufs according to the manuf module setting.


Thanks, upgrading jquery worked! Any ideas how to not use the limited manufacturers shown, and instead use all?

PhilJ 02-06-2015 05:38 AM

Re: Admin Quick Find Togglable Panel
 
Quote:

Any ideas how to not use the limited manufacturers shown, and instead use all?

1) Create & upload new PHP file /modules/Manufacturers/quick_find.php

Code:

<?php
$limit = 9999;
$qry = "SELECT manufacturerid, manufacturer FROM $sql_tbl[manufacturers] ORDER BY manufacturer ASC LIMIT $limit";
$result = db_query($qry);
while ($result_row = db_fetch_array($result)) {
    $manufacturers[] = $result_row;
}
$smarty->assign("manufacturers_quickfind",$manufacturers);
?>


2) In /admin/auth.php

Before...
Code:

include $xcart_dir . '/include/get_language.php';
Insert...
Code:

// Quick Find Admin Panel
include $xcart_dir . '/modules/Manufacturers/quick_find.php';



3) In /skin/common_files/quick_find.tpl replace...
Code:

            {section name=mid loop=$manufacturers_menu}
            <option value="{$manufacturers_menu[mid].manufacturerid}">{$manufacturers_menu[mid].manufacturer}</option>
            {/section}

With...
Code:

            {section name=mid loop=$manufacturers_quickfind}
            <option value="{$manufacturers_quickfind[mid].manufacturerid}">{$manufacturers_quickfind[mid].manufacturer}</option>
            {/section}


Updated 8th August 2019

mcanitano 02-06-2015 06:17 AM

Re: Admin Quick Find Togglable Panel
 
Works like a charm! Love this addition, makes everything so much easier.

mcanitano 02-10-2015 09:57 AM

Re: Admin Quick Find Togglable Panel
 
We had an issue with this working in IE & FireFox. I think the issue was because of the ToggleClass('expanded'), in IE/FireFox, it requires the div "toggler" to have "overflow:hidden;" in the CSS style.

It wouldn't expand on those two browsers until we added that. Then again, it might have been because we messed with the CSS initially.

PhilJ 03-05-2015 05:04 AM

Re: Admin Quick Find Togglable Panel
 
updated, form action paths tweaked.

anandat 03-22-2015 06:54 AM

Re: Admin Quick Find Togglable Panel
 
Phil,
This is very nice tweak. Saves lots very unnecessary clicks :)
I guess it will soon become default x-cart option ;-)

I upgraded jquery-min.js to 1.8.3 as mentioned above.
Everything is working fine on my test localhost store with XAMPP

Just one error shows admin

Quote:

[22-Mar-2015 20:33:26] PHP Warning: Unexpected character in input: ' in D:\xampp\htdocs\store2015\var\templates_c\bef7c6dc 93b8a4551b2f08b628549d0c\%%8B^8B4^8B45DCD5%%orders _list.tpl.php on line 126

I am not able to paste here the entire line no 126 code of file %%8B^8B4^8B45DCD5%%orders_list.tpl.php because of notepad++ shows some nul sign just before "lambda_14($_tmp)); ?>"

I have attached screenshot for better review of code.
http://www.pixentral.com/hosted/1AxHncXxQlWCc8PONToMT3qKG6stex1_thumb.jpg

Do you have any idea why I am getting this error ?


All times are GMT -8. The time now is 08:05 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.