X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Displaying 'xxx products found' on search results page? (https://forum.x-cart.com/showthread.php?t=7349)

jeremye 04-28-2004 08:54 AM

Displaying 'xxx products found' on search results page?
 
When someone searches, it shows all the results in multiple pages, but I want to display the number of products found in the search.

In /customer/search.php, at the bottom there is a var called $total_products_in_search. I can echo it in that page but of course it prints at the top of the page instead of inside the template.

I am not an expert at smarty templates, but does anyone know how I can add this $total_products_in_search variable to the template for search results? Thanks!

adpboss 04-28-2004 02:49 PM

Please don't post requests here.

This forum is for finished modifications only.

Emerson 04-28-2004 02:59 PM

Hey adpboss,

is you site down??

Quote:

Forbidden
You don't have permission to access / on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/1.3.29 Server at www.adpmods.com Port 80

johnnydos 08-31-2004 04:46 PM

I haven't seen a solution posted, so here is one:

In search.php (the one under /customer) add the following under #Navigation Code
Code:

$smarty->assign("total_products_in_search",$total_products_in_search);

Then you can call {$total_products_in_search} from search_result.tpl

Hope someone finds this helpful.

John


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

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