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)
-   -   How would I combine the vertical menu items into one box (https://forum.x-cart.com/showthread.php?t=27370)

simcomedia 12-14-2006 12:31 PM

How would I combine the vertical menu items into one box
 
Using 4.1.4 Gold on Unix.

Summary:

We want to combine the following boxes into one:

categories
special
your cart
help

Also, you'll notice we didn't include the authorization box. We want to exclude that from our left side column completely.

So, is there a procedure known where we would combine those 4 into one block? And, if not, any insight on how to do so?

Plus, as according to balinor's excellent template outline, some of these items are 'shared' between admin and customer. Therefore just deleting the 'authorization' box containing customer login/password recovery/order history/etc. has me a bit concerned.

Perhaps this code could be commented out using the {* *} method?

balinor 12-14-2006 04:22 PM

Re: How would I combine the vertical menu items into one box
 
Take the content out of special, your cart and help and move it into customer/categories.tpl, excluding the {capture} bits. For example, in help.tpl, just move this part:

<a href="help.php?section=contactus&amp;mode=update" class="VertMenuItems">{$lng.lbl_contact_us}</a><br />
<a href="help.php?section=business" class="VertMenuItems">{$lng.lbl_privacy_statement} </a><br />
<a href="help.php?section=conditions" class="VertMenuItems">{$lng.lbl_terms_n_conditions }</a><br />
{include file="pages_menu.tpl"}

simcomedia 12-18-2006 09:12 AM

Re: How would I combine the vertical menu items into one box
 
Hi balinor:

Ok, i'm clear on that aspect. But in cases like this 'special.tpl' it's loaded with nothing but 'if' statements.

Code:

{if $active_modules.Gift_Certificates ne "" or $active_modules.Gift_Registry ne "" or $active_modules.Special_Offers ne "" or ($active_modules.Manufacturers ne "" and $config.Manufacturers.manufacturers_menu ne "Y") or ($active_modules.Feature_Comparison ne "" && $is_fc_display_menu eq 'Y')}
{capture name=menu}
{if $active_modules.Manufacturers ne "" and $config.Manufacturers.manufacturers_menu ne "Y"}
<a href="manufacturers.php" class="VertMenuItems">{$lng.lbl_manufacturers}</a><br />
{/if}
{if $active_modules.Gift_Certificates ne ""}
{ include file="modules/Gift_Certificates/gc_menu.tpl" }
{/if}
{if $active_modules.Gift_Registry ne ""}
{ include file="modules/Gift_Registry/giftreg_menu.tpl" }
{/if}
{if $active_modules.Feature_Comparison ne "" && $is_fc_display_menu eq 'Y'}
{ include file="modules/Feature_Comparison/customer_menu.tpl" }
{/if}
{if $active_modules.Survey && $surveys_is_avail}
{include file="modules/Survey/menu_special.tpl"}
{/if}
{if $active_modules.Special_Offers ne ""}
{ include file="modules/Special_Offers/menu_special.tpl" }
{/if}
{/capture}
{ include file="menu.tpl"  menu_title=$lng.lbl_special menu_content=$smarty.capture.menu }
<br />
{/if}


In your example then i'd eliminate this entire chunk?

Code:

{if $active_modules.Gift_Certificates ne "" or $active_modules.Gift_Registry ne "" or $active_modules.Special_Offers ne "" or ($active_modules.Manufacturers ne "" and $config.Manufacturers.manufacturers_menu ne "Y") or ($active_modules.Feature_Comparison ne "" && $is_fc_display_menu eq 'Y')}
{capture name=menu}


and my code would start with the first 'if' statement after that?

Code:

{if $active_modules.Manufacturers ne "" and $config.Manufacturers.manufacturers_menu ne "Y"}
<a href="manufacturers.php" class="VertMenuItems">{$lng.lbl_manufacturers}</a><br />
{/if}


balinor 12-18-2006 09:22 AM

Re: How would I combine the vertical menu items into one box
 
Yes, and you'd remove this:

{/capture}
{ include file="menu.tpl" menu_title=$lng.lbl_special menu_content=$smarty.capture.menu }
<br />
{/if}

simcomedia 12-18-2006 09:33 AM

Re: How would I combine the vertical menu items into one box
 
Ok, now it being the categories.tpl template i'm putting all this into...would I leave the 'capture' section in there that's related to the categories.tpl? Or remove it as well?

balinor 12-18-2006 09:34 AM

Re: How would I combine the vertical menu items into one box
 
You'll need to leave it if you want the menu structure to show. You can just change the title of it to whatever you want.

simcomedia 12-18-2006 09:45 AM

Re: How would I combine the vertical menu items into one box
 
Ok, based on that here's what I have which includes:

categories.tpl
special.tpl
menu_cart.tpl
help.tpl

Code:

{* $Id: categories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *}
{capture name=menu}
{if $active_modules.Fancy_Categories ne ""}
{include file="modules/Fancy_Categories/categories.tpl"}
{assign var="fc_cellpadding" value="0"}
{else}
{if $config.General.root_categories eq "Y"}
{foreach from=$categories item=c}
<font class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems">{$c.category}</a></font><br />
{/foreach}
{else} {foreach from=$subcategories item=c key=catid}
<font class="CategoriesList"><a href="home.php?cat={$catid}" class="VertMenuItems">{$c.category}</a></font><br />
{/foreach}
{/if}
{/if}
{/capture}
{ include file="menu.tpl"  menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}
<p>
{if $active_modules.Manufacturers ne "" and $config.Manufacturers.manufacturers_menu ne "Y"}
<a href="manufacturers.php" class="VertMenuItems">{$lng.lbl_manufacturers}</a><br />
{/if}
{if $active_modules.Gift_Certificates ne ""}
{ include file="modules/Gift_Certificates/gc_menu.tpl" }
{/if}
{if $active_modules.Gift_Registry ne ""}
{ include file="modules/Gift_Registry/giftreg_menu.tpl" }
{/if}
{if $active_modules.Feature_Comparison ne "" && $is_fc_display_menu eq 'Y'}
{ include file="modules/Feature_Comparison/customer_menu.tpl" }
{/if}
{if $active_modules.Survey && $surveys_is_avail}
{include file="modules/Survey/menu_special.tpl"}
{/if}
{if $active_modules.Special_Offers ne ""}
{ include file="modules/Special_Offers/menu_special.tpl" }
{/if}
<p>
{include file="customer/main/minicart.tpl"}
<a href="cart.php" class="VertMenuItems">{$lng.lbl_view_cart}</a><br />
{if $active_modules.Google_Checkout eq ""}
<a href="cart.php?mode=checkout" class="VertMenuItems">{$lng.lbl_checkout}</a><br />
{/if}
{if $active_modules.Wishlist ne "" and $wlid ne ""}
<a href="cart.php?mode=friend_wl&amp;wlid={$wlid}" class="VertMenuItems">{$lng.lbl_friends_wish_list}</a><br />
{/if}
{if $active_modules.Wishlist ne ""}
<a href="cart.php?mode=wishlist" class="VertMenuItems">{$lng.lbl_wish_list}</a><br />
{if $active_modules.Gift_Registry ne ""}
<a href="giftreg_manage.php" class="VertMenuItems">{$lng.lbl_gift_registry}</a><br />
{/if}
{/if}
{if $anonymous_login eq "" && $login ne ""}
<a href="register.php?mode=update" class="VertMenuItems">{$lng.lbl_modify_profile}</a><br />
<a href="register.php?mode=delete" class="VertMenuItems">{$lng.lbl_delete_profile}</a><br />
{/if}
<a href="orders.php" class="VertMenuItems">{$lng.lbl_orders_history}</a><br />
{if $user_subscription ne ""}
{include file="modules/Subscriptions/subscriptions_menu.tpl"}<br />
{/if}
{if $active_modules.RMA ne ""}
{include file="modules/RMA/customer_menu.tpl"}<br />
{/if}
{if $active_modules.Special_Offers ne ""}
{include file="modules/Special_Offers/menu_cart.tpl"}<br />
{/if}
<p>
<a href="help.php?section=contactus&amp;mode=update" class="VertMenuItems">{$lng.lbl_contact_us}</a><br />
<a href="help.php?section=business" class="VertMenuItems">{$lng.lbl_privacy_statement}</a><br />
<a href="help.php?section=conditions" class="VertMenuItems">{$lng.lbl_terms_n_conditions}</a><br />
{include file="pages_menu.tpl"}


balinor 12-18-2006 09:47 AM

Re: How would I combine the vertical menu items into one box
 
Close...you need to move this to the very bottom:

{/capture}
{ include file="menu.tpl" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}

simcomedia 12-18-2006 09:58 AM

Re: How would I combine the vertical menu items into one box
 
Ok, that makes sense.

Now, will I need to delete the contents of those .tpl files?

help.tpl
menu_cart.tpl
special.tpl

Or delete them entirely? Or, can I just leave them 'as is' since the code will be inserted into the categories.tpl for display?

Thanks for your help, balinor.

balinor 12-18-2006 10:00 AM

Re: How would I combine the vertical menu items into one box
 
You'll need to hide them from customer/home.tpl so they don't show up anymore.


All times are GMT -8. The time now is 02:00 PM.

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