![]() |
Search Results window title: more descriptive
Hi,
I have gotten x-cart to pass the in_category part of the seach query into a global variable that I have used to do other things on my site (like making mod sort work the way i want it to). I want to use it now to make the title of the search results more informative so when I use hard-coded search links they appear to function a bit nicer. If anyone wants instructions on passing search query bits into global variables I will share the process Б─⌠ it is very simple. So now that I have this variable that contains a category ID, what do i use to display the name of that category id? i tried Code:
$categories[$stay_in_category].category but that just gives me this Code:
Array[12].category I know this is simple, please help :?: thanks -Jordan |
Code:
If anyone wants instructions on passing search query bits into global variables I will share the process Б─⌠ it is very simple. you may as well just post your findings as theres always someone who will find it helpful |
Here is what I did:
My process for passing search query info into global variables:
If you want to do this, you must first perform the "Improved Search Function" mod: http://forum.x-cart.com/viewtopic.php?t=5971 In my /include/func.php, I found this portion: Code:
# Code:
global $stay_in_category, $stay_in_param01, $stay_in_param02, $stay_in_param03; Code:
$smarty->assign("stay_in_param01","$search_param_01"); Code:
#Param02 Search Now, I can have Boomer's CartLab Mod Sort take the current category and use it to sort the search results instead of the pull-down menu... and keep it from "forgetting" the param part of the search... Or I can display the category name instead of "Search Results" in the location header and the dialog title when the search is confined to one category. I just have to know how to turn this $stay_in_category value (a categoryid) into a category name. You can probably find plenty of uses for the global variables, and I bet a few of them would involve turning this value into a name. If you know how, please share. Thanks Jordan |
this was posted a couple of months back, but did anyone come up ideas to use the global variables?
|
All times are GMT -8. The time now is 01:33 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.