| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
which file to edit ? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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 |
|||||||
#2
|
|||||||
|
|||||||
![]() 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.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
#3
|
|||||||
|
|||||||
![]() 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 ![]() {include file="customer/fts_featured_products.tpl" group="group_name"} |
|||||||
#4
|
|||||||
|
|||||||
![]() 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.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
#5
|
|||||||
|
|||||||
![]() yay that works perfectly... thanks so much Balinor
![]() |
|||||||
#6
|
|||||||
|
|||||||
![]() 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.
__________________
X-Cart 5.3.3.4 Multivendor X-Cart 5.3.3.4 Business (Testing) |
|||||||
#7
|
|||||||||
|
|||||||||
![]() You can try something like:
Code:
|
|||||||||
#8
|
|||||||
|
|||||||
![]() 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.
__________________
X-Cart 5.3.3.4 Multivendor X-Cart 5.3.3.4 Business (Testing) |
|||||||
#9
|
|||||||
|
|||||||
![]() Quote:
I used: Quote:
Now, is there a way to call the same featured products if current product is from category "x"? Many thanks.
__________________
X-Cart 5.3.3.4 Multivendor X-Cart 5.3.3.4 Business (Testing) |
|||||||
|
|||
X-Cart forums © 2001-2020
|