X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Add module to catagory view (https://forum.x-cart.com/showthread.php?t=43247)

ibit-matt 10-26-2008 12:53 PM

Add module to catagory view
 
1 Attachment(s)
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

Yurij 10-27-2008 04:50 AM

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} 


ibit-matt 10-27-2008 11:36 AM

Re: Add module to catagory view
 
1 Attachment(s)
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?

Yurij 10-28-2008 12:28 AM

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%"'


ibit-matt 10-28-2008 04:07 AM

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?

ibit-matt 10-28-2008 11:08 AM

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 :-)

Yurij 10-29-2008 12:17 AM

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.

ibit-matt 10-29-2008 04:24 AM

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

ibit-matt 10-30-2008 07:33 AM

Re: Add module to catagory view
 
Anyone :-)


All times are GMT -8. The time now is 03:23 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.