Support Forums

cat_tree module

This is a discussion on cat_tree module within the Techconnx forums, part of the Third Party Support category; In quick search module and in searchform.tpl, if I take off |truncate: 20 the categories are displayed with the subcategories ...


Go Back   68 Classifieds Forums > Third Party Support > Techconnx

Reply
 
Thread Tools Display Modes
Old 08-23-2010, 04:27 PM   #11
Customer
 
Join Date: Apr 2009
Location: South of Spain
Posts: 203
Rep Power: 12
magicosta is on a distinguished road
Default

In quick search module and in searchform.tpl, if I take off |truncate: 20 the categories are displayed with the subcategories but when I jump to step 2 it is back as normal displaying just the main categories.

<p>
<label for="type">{$smarty.const.LANG_SEARCH_INCAT}{$smar ty.const.LANG_COLON}</label>
<select name="type" id="type">
<option value=''>{$smarty.const.LANG_SEARCH_ALLCAT}</option>
{foreach from=$getcats item=cat}
<option id="searchmod" {if $cat.parent_id == 0}class="parent" {/if}value="{$cat.id}"{if $type==$cat.id} SELECTED{/if}>{$cat.name|truncate:20}</option>
{/foreach}
</select>
</p>
__________________
Default Template - V 4.1.10 - Developper
magicosta is offline   Reply With Quote
Old 08-23-2010, 04:39 PM   #12
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,071
Rep Power: 62
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Quote:
Originally Posted by magicosta
Thank you Mike for that suggestion, unfortunatly it does not work.

I did what you suggest and nothing else happen.
I may have the wrong $script_name. I would suggest using the smarty {debug} to check what the actual script name is at that particular page and then change the code that I posted earlier to reflect the correct script name and that should resolve your issue.

An FYI: to see what variables are given to any template or displayed page, place "{debug}" at the very top above everything else in the layout.tpl file of the template that you are using. Make sure that you turn off any pop up window blocker that you may have. This built in smarty function will then pop up a separate window displaying all available variables for any page that you visit as well as which template file and script file is in use.
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 08-23-2010, 05:20 PM   #13
Customer
 
Join Date: Apr 2009
Location: South of Spain
Posts: 203
Rep Power: 12
magicosta is on a distinguished road
Default

Thank you again for your help, Mike

I put {debug} and the $script_name is the right one.

Anyway, I will just take off |truncate:20 and get the cat displayed with subcat for that page.

This will do!
__________________
Default Template - V 4.1.10 - Developper
magicosta is offline   Reply With Quote
Old 08-24-2010, 09:05 AM   #14
curmudgeon
 
Join Date: Mar 2006
Posts: 5,347
Rep Power: 133
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Glad you got a suitable workaround magicosta.

This does bring up a good point though Mike and I think as I revise and update my mods I am going to prepent all my variables with something so I know they are unique to my mods, something like $tech_varname or some such thing.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 08-24-2010, 09:57 AM   #15
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,960
Rep Power: 73
seymourjames is a jewel in the rough
Default

$script_name is used in the templatecodes module underpinning all templatecodes modules like the quick search module. The $script_name is defined for all the major scripts where templatecodes modules interact so logical testing can be carried out. Perhaps it is where issues are arising??? I may misunderstand but I thought 68C used $SCRIPT_NAME.

The quick checkout module should show normally providing you do not fall here

{if $script_name != 'search.php' || $script_name != 'usercheckout.php'}

What you will need to do is test for the presence of Larry's module, turn the quick search module off and report a message. You can see this action if you goto http://demo.templatecodes.com/ . Then goto the search page. Then click the quick search module. In fact if you have the quick checkout module the usercheckout is not a problem anymore but the standard checkout process will be and that is why the test is included for usercheckout - not everyone uses the quick checkout. My question is are you using an old version of templatecodes quick search module without the quick checkout?
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds

Last edited by seymourjames; 08-24-2010 at 10:17 AM.
seymourjames is offline   Reply With Quote
Old 08-25-2010, 11:20 AM   #16
Customer
 
Join Date: Apr 2009
Location: South of Spain
Posts: 203
Rep Power: 12
magicosta is on a distinguished road
Default

In fact, I am using Sigma templatecodes module with quick search module but without quick checkout module.
__________________
Default Template - V 4.1.10 - Developper
magicosta is offline   Reply With Quote
Old 08-25-2010, 08:46 PM   #17
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,960
Rep Power: 73
seymourjames is a jewel in the rough
Default

Right so if you are changing a step in the checkout process with Larry's module so it is no longer a case or usercheckout.php you will need to test for this module being used at this point (i.e. the url whatever it is) and disable the quick search module for that specific url as well.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline   Reply With Quote
Old 08-25-2010, 11:23 PM   #18
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,071
Rep Power: 62
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Or use the template variable $body instead of the $script_name

... || $body != whatever it is from the debug}
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 08-26-2010, 05:43 AM   #19
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,960
Rep Power: 73
seymourjames is a jewel in the rough
Default

Good point Mike or he will need to define the script_name in the templatecodes module making long term upgrade more complicated than it needs to be. Better to use $body as you propose.

{if $script_name != 'search.php' || $script_name != 'usercheckout.php' || $body!= 'larrys-module.php' }

glad we got that one resolved.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline   Reply With Quote
Old 08-26-2010, 03:28 PM   #20
Customer
 
Join Date: Apr 2009
Location: South of Spain
Posts: 203
Rep Power: 12
magicosta is on a distinguished road
Default

Thank you very much all for your help.

At the end, here is the code that works:

{if $body!= '/../../modules/cat_tree/templates/cat_tree_step1.tpl'}

Then it displays a message of error when the user try to use the quick search function which I have changed for:

The Quick Search function is desactivated during the step 1 of the publication process
__________________
Default Template - V 4.1.10 - Developper
magicosta is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
google maps module/seo friendly urls module incompatibility everyounce Techconnx 2 06-24-2009 01:01 AM


All times are GMT -4. The time now is 01:54 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0