Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Add module to catagory view

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-26-2008, 12:53 PM
 
ibit-matt ibit-matt is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 60
 

Default Add module to catagory view

What template do I have to edit to add a new module underneath the product in the catagory view


Also How do I remove these


Sort by:Product Price Default



See screenshot






Thanks in advance
Attached Thumbnails
Click image for larger version

Name:	screen.JPG
Views:	611
Size:	60.4 KB
ID:	1196  
__________________
X Cart Version 4.1.11
Reply With Quote
  #2  
Old 10-27-2008, 04:50 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: Add module to catagory view

Quote:
Originally Posted by ibit-matt
What template do I have to edit to add a new module underneath the product in the catagory view
Also How do I remove these
Sort by:Product Price Default

See screenshot

Thanks in advance
>> 1) What template do I have to edit to add a new module underneath the product in the catagory view

"skin1/customer/main/subcategories.tpl"

>> 2) Also How do I remove these

open file "skin1/customer/main/subcategories.tpl" and
"skin1/customer/main/search_result.tpl", find and comment next lines :

subcategories.tpl
PHP Code:
{if $sort_fields}
<
div align="right">{include file="main/search_sort_by.tpl" sort_fields=$sort_fields selected=$search_prefilled.sort_field direction=$search_prefilled.sort_direction url="home.php?cat=`$cat`&"}</div>
{/if} 

search_result.tpl
PHP Code:
{if $sort_fields}
<
tr>
    <
td>{include file="main/search_sort_by.tpl" sort_fields=$sort_fields selected=$search_prefilled.sort_field direction=$search_prefilled.sort_direction url="`$navigation_script`&"}
    <
br /><br /><br />
    </
td>
</
tr>
{/if} 
Reply With Quote
  #3  
Old 10-27-2008, 11:36 AM
 
ibit-matt ibit-matt is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 60
 

Default Re: Add module to catagory view

Thanks for the reply I have added the module to the catagory page See screenhot attached.

The code in the module is the following

Code:
{* $Id: categories.tpl,v 1.1.2.34 2008/05/26 07:35:16 max Exp $ *} {capture name=menu} <h1>Test</h1> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}

I want the custom module to have the title What else do I need? Also remove the folder icon

The code above is taken from my custom catagoris block on the homepage what do I need to change to get what I need please?


Also how do I make this module show up on certain catagories not all of them?
Attached Thumbnails
Click image for larger version

Name:	screen.JPG
Views:	622
Size:	66.9 KB
ID:	1201  
__________________
X Cart Version 4.1.11
Reply With Quote
  #4  
Old 10-28-2008, 12:28 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: Add module to catagory view

Quote:
Originally Posted by ibit-matt
Thanks for the reply I have added the module to the catagory page See screenhot attached.

The code in the module is the following

Code:
{* $Id: categories.tpl,v 1.1.2.34 2008/05/26 07:35:16 max Exp $ *} {capture name=menu} <h1>Test</h1> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}

I want the custom module to have the title What else do I need? Also remove the folder icon

The code above is taken from my custom catagoris block on the homepage what do I need to change to get what I need please?


Also how do I make this module show up on certain catagories not all of them?


You better use next construction with "dialog.tpl".

PHP Code:
{capture name=dialog}

  <
h1>Test</h1>


{/
capture}
{include 
file="dialog.tpl" title="This is title..." content=$smarty.capture.dialog extra='width="100%"'
Reply With Quote
  #5  
Old 10-28-2008, 04:07 AM
 
ibit-matt ibit-matt is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 60
 

Default Re: Add module to catagory view

Thanks for the reply

Also how do I make this module show up on certain catagories not all of them?

Will I need to use a php if statement?
__________________
X Cart Version 4.1.11
Reply With Quote
  #6  
Old 10-28-2008, 11:08 AM
 
ibit-matt ibit-matt is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 60
 

Default Re: Add module to catagory view

Can anyone advise me on this please.

This is the end of my /customer/main/subcategories.tpl

Code:
{include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra='width="100%"'} {if $products eq ""} {if $f_products ne ""} <p /> {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" } <br /> { include file="customer/main/what_else_Wireless_Rapid_Deployment.tpl" } <br />


I have added the

Code:
{ include file="customer/main/what_else_Wireless_Rapid_Deployment.tpl" } <br />

Can I add a php if statement to tell this bit of code to only show up on certain catagories by using the catagories id

Thankyou
__________________
X Cart Version 4.1.11
Reply With Quote
  #7  
Old 10-29-2008, 12:17 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: Add module to catagory view

What specifically do you want to display in this block?

PS. If you want to use only on the categories pages, you can use for that the file home.php.
Reply With Quote
  #8  
Old 10-29-2008, 04:24 AM
 
ibit-matt ibit-matt is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 60
 

Default Re: Add module to catagory view

OK this is what I am trying to do.

Here is a catagory with products in it and my custom block at the bottom which tells the user they need these products as well

http://www.rapidvisionsystems.com/home.php?cat=19

The problem I have is the custom block I have made shows up on this catagory

http://www.rapidvisionsystems.com/home.php?cat=20

But the custom block has the same products as the main products above.

I need away to tell that custom block to show up only on certain catagories.



Thanks
__________________
X Cart Version 4.1.11
Reply With Quote
  #9  
Old 10-30-2008, 07:33 AM
 
ibit-matt ibit-matt is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 60
 

Default Re: Add module to catagory view

Anyone
__________________
X Cart Version 4.1.11
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:49 AM.

   

 
X-Cart forums © 2001-2020