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

Hide Left & Right Columns On Specific Page Product.php

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-23-2009, 11:46 PM
 
jer jer is offline
 

Newbie
  
Join Date: Aug 2008
Posts: 8
 

Question Hide Left & Right Columns On Specific Page Product.php

My Version: X-Cart version 4.1.10

1. I want to remove or hide the left and right vert menus on pages that display the specific product.

Example url:
http://www.mysite.com/product.php?productid=32&cat=195&page=1

2. I would also liketo remove them on static & help pages like:

http://www.mysite.com/help.php
http://www.mysite.com/help.php?section=about


I am fine with it everywhere else, so how do you remove them?
Where do I edit?
What code do I insert or comment out?

I am not an expert coder so if possible please be specific like "edit file XXXX and add / or remove this code XXXXX.

Thanks

Thanks
__________________
X-Cart version 4.1.10
PHP 5.2.9
GD bundled (2.0.34 compatible)
MySQL server 5.0.67-community
MySQL client 5.0.67
Operation system Linux

Mods:
Easy Variant View Mod
Shadowbox Image Mod
7dana "elegent" template
Reply With Quote
  #2  
Old 04-24-2009, 01:43 AM
  ElegantXMods.com's Avatar 
ElegantXMods.com ElegantXMods.com is offline
 

Advanced Member
  
Join Date: Apr 2009
Location: Stirling, UK
Posts: 94
 

Default Re: Hide Left & Right Columns On Specific Page Product.php

Hi there,

The files you'll need to edit are skin1/customer/home.tpl and skin/customer/home_main.tpl (this is for X-Cart 4, which I'm presuming you're using, you'll need to update your signature so that forum members can help you better).

home.tpl is like a 'master' template for laying out each page, with HTML interspersed with Smarty logic, while home_main.tpl basically sets out what should be displayed on home.tpl depending on which section the customer has gone to.

To remove the left and right columns for specific pages, the exact code changes are different for X-Cart 4.1 and X-Cart 4.2. Would it be possible to tell me which version you're using?
__________________
John
ElegantXMods.com

QuickOrder AJAX-based search and ordering system now available
giving you complete control over how customers browse and search for your products. Click here for details.
PriceSlider - easily filter categories by price range - only $9.99 - details here

X-Cart 4.1, X-Cart 4.2 on Windows/IIS and Linux/Apache.
Reply With Quote
  #3  
Old 04-24-2009, 02:31 PM
 
jer jer is offline
 

Newbie
  
Join Date: Aug 2008
Posts: 8
 

Question Re: Hide Left & Right Columns On Specific Page Product.php

Ok I added my version it was also at the top of the post.

Now I do not want to remove it from all pages just the page that displays the specific product as in the example on my first post and also remove it from the help pages.

Any ideas anyone?
__________________
X-Cart version 4.1.10
PHP 5.2.9
GD bundled (2.0.34 compatible)
MySQL server 5.0.67-community
MySQL client 5.0.67
Operation system Linux

Mods:
Easy Variant View Mod
Shadowbox Image Mod
7dana "elegent" template
Reply With Quote
  #4  
Old 04-27-2009, 01:27 AM
  ElegantXMods.com's Avatar 
ElegantXMods.com ElegantXMods.com is offline
 

Advanced Member
  
Join Date: Apr 2009
Location: Stirling, UK
Posts: 94
 

Default Re: Hide Left & Right Columns On Specific Page Product.php

Open skin1/customer/home.tpl and find the line

Code:
<div id="center-main">

ABOVE this line, insert this code

Code:
{if $main eq "pages" or ($main eq "product" and $product["productid"] eq 111)} {include file="customer/home_main.tpl"} {else}

and replace 111 with your chosen product ID (or you could use the SKU / product code instead: use $product["productcode"] ).

now scroll down and find

Code:
{include file="poweredby.tpl" }

and ABOVE this insert this line:

Code:
{/if}
__________________
John
ElegantXMods.com

QuickOrder AJAX-based search and ordering system now available
giving you complete control over how customers browse and search for your products. Click here for details.
PriceSlider - easily filter categories by price range - only $9.99 - details here

X-Cart 4.1, X-Cart 4.2 on Windows/IIS and Linux/Apache.
Reply With Quote
  #5  
Old 04-28-2009, 10:46 PM
 
jer jer is offline
 

Newbie
  
Join Date: Aug 2008
Posts: 8
 

Question Re: Hide Left & Right Columns On Specific Page Product.php

Thank you very much for your reply, now I think you understand what i want to do except i may have miss typed what i meant.

1. I basically do not want the left or right columns shows on any pages that display products, not just one specific product.


2. Also I do not want it to show on help pages or custom pages i create.

Thanks
__________________
X-Cart version 4.1.10
PHP 5.2.9
GD bundled (2.0.34 compatible)
MySQL server 5.0.67-community
MySQL client 5.0.67
Operation system Linux

Mods:
Easy Variant View Mod
Shadowbox Image Mod
7dana "elegent" template
Reply With Quote
  #6  
Old 04-29-2009, 01:56 AM
  ElegantXMods.com's Avatar 
ElegantXMods.com ElegantXMods.com is offline
 

Advanced Member
  
Join Date: Apr 2009
Location: Stirling, UK
Posts: 94
 

Default Re: Hide Left & Right Columns On Specific Page Product.php

Hi there,

In that case, just change the code from my previous post:

Code:
{if $main eq "pages" or ($main eq "product" and $product["productid"] eq 111)} {include file="customer/home_main.tpl"} {else}

to:

Code:
{if $main eq = "pages" or $main eq "product"} {include file="customer/home_main.tpl"} {else}
__________________
John
ElegantXMods.com

QuickOrder AJAX-based search and ordering system now available
giving you complete control over how customers browse and search for your products. Click here for details.
PriceSlider - easily filter categories by price range - only $9.99 - details here

X-Cart 4.1, X-Cart 4.2 on Windows/IIS and Linux/Apache.
Reply With Quote
  #7  
Old 04-30-2009, 09:57 PM
 
jer jer is offline
 

Newbie
  
Join Date: Aug 2008
Posts: 8
 

Default Re: Hide Left & Right Columns On Specific Page Product.php

That code setup did not workI get errors.

If this helps I have a 7dana template, and an image mod and below I have posted my home.tpl code:

Code:
{* $Id: home.tpl,v 1.88.2.11 2007/08/08 13:51:54 max Exp $ *} <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> {if $printable ne ''} {include file="customer/home_printable.tpl"} {else} {config_load file="$skin_config"} <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>{strip} {capture name=title} {if $config.SEO.page_title_format eq "A"} {section name=position loop=$location} {if not %position.first%}&nbsp;::&nbsp;{/if} {$location[position].0|strip_tags|escape} {/section} {else} {section name=position loop=$location step=-1} {if not %position.first%}&nbsp;::&nbsp;{/if} {$location[position].0|strip_tags|escape} {/section} {/if} {/capture} {if $config.SEO.page_title_limit <= 0} {$smarty.capture.title} {else} {$smarty.capture.title|replace:"&nbsp;":" "|truncate:$config.SEO.page_title_limit|replace:" ":"&nbsp;"} {/if} {/strip}</title> {include file="meta.tpl" } <link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}" /> {* xCartMod.com - Dynamic Images 2 *} {if $active_modules.Detailed_Product_Images ne "" and $config.Detailed_Product_Images.det_image_thumbnails eq "Y" and $main eq "product"} <link rel="stylesheet" href="{$SkinDir}/modules/Detailed_Product_Images/dynamic_images.css" /> {if $config.Detailed_Product_Images.det_image_thumbs_shadowbox eq "Y"} <script type="text/javascript" src="{$SkinDir}/shadowbox/src/adapter/shadowbox-base.js"></script> <script type="text/javascript" src="{$SkinDir}/shadowbox/src/shadowbox.js"></script> <script type="text/javascript"> Shadowbox.loadSkin('classic', '{$SkinDir}/shadowbox/src/skin'); Shadowbox.loadLanguage('en', '{$SkinDir}/shadowbox/src/lang'); Shadowbox.loadPlayer(['img'], '{$SkinDir}/shadowbox/src/player'); window.onload = Shadowbox.init; </script> {/if} {include file="main/include_js.tpl" src="modules/Detailed_Product_Images/product_images_thumbs.js"} {/if} {* xCartMod.com - Dynamic Images 2 *} </head> <body{$reading_direction_tag}{if $body_onload ne ''} onload="javascript: {$body_onload}"{/if}> {include file="rectangle_top.tpl" } {include file="head.tpl" } {if $active_modules.SnS_connector} {include file="modules/SnS_connector/header.tpl"} {/if} <!-- main area --> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td class="VertMenuLeftColumn"><br><br> {if $categories ne "" and ($active_modules.Fancy_Categories ne "" or $config.General.root_categories eq "Y" or $subcategories ne "")} {include file="customer/categories.tpl" } <br /> {/if}<!-- {if $active_modules.Bestsellers ne "" and $config.Bestsellers.bestsellers_menu eq "Y"} {include file="modules/Bestsellers/menu_bestsellers.tpl" } {/if} {if $active_modules.Manufacturers ne "" and $config.Manufacturers.manufacturers_menu eq "Y"} {include file="modules/Manufacturers/menu_manufacturers.tpl" } {/if} --> <div class="VertMenuTitle">Package Deals</div> <div class="VertMenuBox" style="padding:5px;"><a href="home.php?cat=180" class="VertMenuItems">High School Dances</a><br /> <a href="home.php?cat=181" class="VertMenuItems">Graduations</a><br /> <a href="home.php?cat=182" class="VertMenuItems">Weddings</a><br /> <a href="home.php?cat=183" class="VertMenuItems">Quincineta</a><br /> <a href="home.php?cat=184" class="VertMenuItems">Debutante Balls</a><br /> <a href="home.php?cat=185" class="VertMenuItems">Formal Events</a><br /> <a href="home.php?cat=186" class="VertMenuItems">Corporate Accounts</a><br /> <a href="home.php?cat=187" class="VertMenuItems">Fashion Shows</a><br /> <a href="home.php?cat=188" class="VertMenuItems">Special Events</a><br /> <a href="home.php?cat=189" class="VertMenuItems">College Events</a><br /> <a href="home.php?cat=190" class="VertMenuItems">Missionary Special</a><br /> </div><br /> {include file="customer/special.tpl"} {if $active_modules.Survey && $menu_surveys} {foreach from=$menu_surveys item=menu_survey} {include file="modules/Survey/menu_survey.tpl"} <br /> {/foreach} {/if} {include file="help.tpl" } <img src="{$ImagesDir}/spacer.gif" width="150" height="1" alt="" /> </td> <td valign="top" width="100%"> <!-- central space --> {if $gcheckout_enabled and $main ne "cart" and $main ne "checkout" and $main ne "anonymous_checkout" and $main ne "order_message"} <div align="right">{include file="modules/Google_Checkout/gcheckout_button.tpl"}</div> {/if} {include file="dialog_message.tpl"} {if $active_modules.Special_Offers ne ""} {include file="modules/Special_Offers/customer/new_offers_message.tpl"} {/if} {include file="customer/home_main.tpl"} <!-- /central space --> &nbsp; </td> <td class="VertMenuRightColumn"><br /><div class="VertMenuBox" style="padding:3px;"><a href="home.php?cat=190"><img src="{$ImagesDir}/missionary.jpg" width="160" height="600" alt="" /></a></div> <br /> {if $active_modules.SnS_connector && $config.SnS_connector.sns_display_button eq 'Y' && $sns_collector_path_url ne ''} {include file="modules/SnS_connector/button.tpl"} <br /> {/if} {if $active_modules.Feature_Comparison ne "" && $comparison_products ne ''} {include file="modules/Feature_Comparison/product_list.tpl" } <br /> {/if} {include file="customer/menu_cart.tpl" } <br /> {if $login eq "" } {include file="auth.tpl" } {else} {include file="authbox.tpl" } {/if} {include file="news.tpl" } {if $active_modules.XAffiliate ne "" && $config.XAffiliate.partner_register eq 'Y'} <br /> {include file="partner/menu_affiliate.tpl" } {/if} {if $active_modules.Interneka ne ""} <br /> {include file="modules/Interneka/menu_interneka.tpl" } {/if} <br /> {include file="poweredby.tpl" } <br /> <img src="{$ImagesDir}/spacer.gif" width="150" height="1" alt="" /> </td> </tr> </table> {include file="rectangle_bottom.tpl" } {if $active_modules.Google_Analytics ne "" && $config.Google_Analytics.ganalytics_code ne ""} {include file="modules/Google_Analytics/ga_code.tpl"} {/if} </body> </html> {/if}
__________________
X-Cart version 4.1.10
PHP 5.2.9
GD bundled (2.0.34 compatible)
MySQL server 5.0.67-community
MySQL client 5.0.67
Operation system Linux

Mods:
Easy Variant View Mod
Shadowbox Image Mod
7dana "elegent" template
Reply With Quote
  #8  
Old 05-01-2009, 12:19 AM
  ElegantXMods.com's Avatar 
ElegantXMods.com ElegantXMods.com is offline
 

Advanced Member
  
Join Date: Apr 2009
Location: Stirling, UK
Posts: 94
 

Default Re: Hide Left & Right Columns On Specific Page Product.php

Where you have the line:

Code:
<!-- main area -->

replace it with

Code:
<!-- main area --> {if $main eq "pages" or $main eq "product"} {include file="customer/home_main.tpl"} {else}

then below that find the line

Code:
{include file="rectangle_bottom.tpl" }

and replace it with

Code:
{/if} {include file="rectangle_bottom.tpl" }
__________________
John
ElegantXMods.com

QuickOrder AJAX-based search and ordering system now available
giving you complete control over how customers browse and search for your products. Click here for details.
PriceSlider - easily filter categories by price range - only $9.99 - details here

X-Cart 4.1, X-Cart 4.2 on Windows/IIS and Linux/Apache.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 04:47 AM.

   

 
X-Cart forums © 2001-2020