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 ?

PhilJ 03-22-2015 08:32 AM

Re: Admin Quick Find Togglable Panel
 
Have you got Webmaster mode enabled? Perhaps that's why.

anandat 03-22-2015 09:06 AM

Re: Admin Quick Find Togglable Panel
 
Quote:

Originally Posted by PhilJ
Have you got Webmaster mode enabled? Perhaps that's why.

No webmaster mode is disabled.

PhilJ 03-22-2015 01:00 PM

Re: Admin Quick Find Togglable Panel
 
Not sure what's going on there then, ought to work fine on your live site...

anandat 04-01-2015 08:26 PM

Re: Admin Quick Find Togglable Panel
 
Quote:

Originally Posted by PhilJ
Not sure what's going on there then, ought to work fine on your live site...

Same error on live server ! :(
No idea exactly

Also can you please tell me how to display quick find toggle panel only Admin page & not on every pages ?
Bcoz I have around 2500+ manufactures so I don't want to load them on each and every page every time. Just need to use toggle panel from admin's home only. ;-)

PhilJ 04-01-2015 08:52 PM

Re: Admin Quick Find Togglable Panel
 
Re. your error, I would check the error logs in var/log

If you want to display it on admin homepage only, in step 2, I think you can use...
Code:

{* Quick Find Admin Panel *}
{if $main eq "top_info"}
{include file="quick_find.tpl"}
{/if}
{* / Quick Find Admin Panel *}


anandat 04-01-2015 09:59 PM

Re: Admin Quick Find Togglable Panel
 
Quote:

Originally Posted by PhilJ

If you want to display it on admin homepage only, in step 2, I think you can use...
Code:

{* Quick Find Admin Panel *}
{if $main eq "top_info"}
{include file="quick_find.tpl"}
{/if}
{* / Quick Find Admin Panel *}



Thanks it worked perfectly :D/

Quote:

Re. your error, I would check the error logs in var/log
var/log file display the same error as shown in admin log error

PHP Warning: Unexpected character in input: ' in /home/user/public_html/store/var/templates_c/bb2137ca057b8814db40b23a8d677d43/%%8B^8B4^8B45DCD5%%orders_list.tpl.php on line 126

which tpl/php file I should trace to find "character in input" error ? Any idea ?

PhilJ 04-01-2015 10:02 PM

Re: Admin Quick Find Togglable Panel
 
skin/common_files/main/orders_list.tpl

anandat 04-02-2015 07:54 PM

Re: Admin Quick Find Togglable Panel
 
1 Attachment(s)
Quote:

Originally Posted by PhilJ
skin/common_files/main/orders_list.tpl

Please find my attached orders_list.tpl

I checked the code & could not find anything suspicious:(

PhilJ 03-08-2017 08:20 PM

Re: Admin Quick Find Togglable Panel
 
1 Attachment(s)
New version that remembers the quick view panel state with a cookie... just replace skin/common_files/quick_find.tpl with attached.

georgewf 04-09-2017 01:33 PM

Re: Admin Quick Find Togglable Panel
 
really nice!

Just one thing, on my site the Products pulldown triggers a search which returns all items.

Raptor 04-12-2017 10:31 PM

Re: Admin Quick Find Togglable Panel
 
Use this all the time - awesome :)

PhilJ 07-29-2017 03:19 PM

Re: Admin Quick Find Togglable Panel
 
1 Attachment(s)
New version, which can be fluid or fixed width, plus the toggle button is moved to the admin top header menu...



1) Upload attached quick_find.tpl to skin/common_files

2) At the end of skin/common_files/head_admin.tpl

INSERT...
Code:

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

3) In skin/common_files/admin/goodies.tpl

BEFORE...
Code:

<li class="orange">
INSERT...
Code:

{* Quick Find Admin Panel *}
<li class="orange qf_toggler" title="Quick Find">
<a href='javascript:;' class="qf_toggler_icon"><i class="fa fa-search-plus fa-flip-horizontal"></i></a>
</li>
{* / Quick Find Admin Panel *}

Done.

Note the options at the top of quick_find.tpl

Quote:

{*-------------------------------*}
{* Set Width - eg. 97% or 1366px *}
{*-------------------------------*}

{assign var='qf_width' value="97%"}

{*-------------------------------*}
{* Show Languages Field - true or false *}
{*-------------------------------*}

{assign var='qf_languages' value=true}


PhilJ 09-10-2017 03:42 PM

Re: Admin Quick Find Togglable Panel
 
^ updated for the RMA module / returns.


All times are GMT -8. The time now is 03:47 AM.

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