![]() |
which file to edit ?
Hi wonder if anyone can help.....
Im trying to add extra code in specific category pages - (im using BCSE's Featured Products Manager) so im trying to add a line of smarty code. How do I see which php file I need to add the code to for specific subcategories ? I know which file to edit if I want to add to the main welcome page etc.... but not so sure about specific category/subcategory pages. Hope that made sense ;-) Using 4.4 |
Re: which file to edit ?
You don't edit php files in X-Cart, you edit templates. Your best bet is to use Webmaster Mode - it will tell you exactly which template is which. In general, subcategories are controlled by customer/main/subcategories.tpl, but there are now a few templates associated with that area.
|
Re: which file to edit ?
Thnx Balinor, using the webmaster mode I have found that it is either of the 2 files:
customer/main/subcategories.tpl customer/main/subcategories_t.tpl But if I added the code to either of these then it would show up on every subcategory page. So I assume I need to use if and else etc but im ok at click and paste and editing files but not at coding :-) so if anyone could advise it would be great..... this is an example of the code for the featured product manager that I want to add to specific subcategory pages: {include file="customer/fts_featured_products.tpl" group="group_name"} |
Re: which file to edit ?
Try:
{if $cat eq "x"}code to show{/if} Replace x with the category id number. Haven't tested this with 4.4, but if that doesn't work we can try another smarty variable. |
Re: which file to edit ?
yay that works perfectly... thanks so much Balinor :-)
|
Re: which file to edit ?
Quote:
This works on 4.4.2. Thanks balinor. How can I have this work for both a category and its subcategories? Now, this code shows featured products for a "x" category, but not the subcategories of "x". I appreciate any help. |
Re: which file to edit ?
You can try something like:
Code:
{if $cat eq X or $current_category.parent eq X} |
Re: which file to edit ?
Quote:
Thanks cherie. I tried as following. But it did not work. {if $cat eq "x" or $current_category.parent eq "x"} {include file='customer/fts_featured_products.tpl' group='groupname'} {/if} This shows featured products for x category but not for the subcategories of x. I appreciate any other suggestions. Thank you. |
Re: which file to edit ?
Quote:
I used: Quote:
Now, is there a way to call the same featured products if current product is from category "x"? Many thanks. |
All times are GMT -8. The time now is 12:02 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.