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

scrolling middle column

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-06-2009, 03:05 AM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default scrolling middle column

Is it possible or has someone attempted to have a scrolling middle column in a 3 column layout with the left and right columns static ?
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
  #2  
Old 02-06-2009, 03:10 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: scrolling middle column

Sure, just use a div with a fixed height and overflow: auto; Just make sure that the middle column isn't more than 600 or so pixels high, as you don't want two scrollbars (middle AND main site) as that gets confusing and messes with the scrollwheel on the mouse.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 02-06-2009, 04:17 AM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: scrolling middle column

Hi Balinor,

Thanks for your quick reply, but I think the dual scroll bars is going to be a problem. The left and right columns are already approx 800 high and I get scrollbars on the main site as it stands already with the home page. The client just wanted a solution to someone browsing one of the categories that may have lots of product in it (using the products.tpl for buy now) and they have to scroll and scroll down to the bottom and then have to scroll the reverse to get back to the menus etc at the top of the page. He has "seen" plenty of sites where the centre panels only scrolls and left and right columns are static, but as I tried to explain he already has scrollers just on his home page due to the length of both columns.

I even contemplated a "top of page" link in the bottom.tpl but can't seem to get the a reference to the top working properly. I initially attached it to the header image, but obviously when you click the "top of page" it takes you back to the home page not the top of the current.

Do you have any suggestions as to a quick "top of page" link?

Thanks again for your help
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
  #4  
Old 02-06-2009, 04:25 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: scrolling middle column

Just put the anchor at the top of customer/main/subcategories.tpl
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote

The following user thanks balinor for this useful post:
beetlejuice (02-06-2009)
  #5  
Old 02-06-2009, 05:01 AM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: scrolling middle column

Thanks again Balinor
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
  #6  
Old 02-06-2009, 02:06 PM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: scrolling middle column

****EDIT************

Didn't work mate, still takes me back to the home page. Here's my subcategories.tpl, can you tell me what I need to alter?

Code:
{* $Id: subcategories.tpl,v 1.55.2.4 2008/07/15 12:07:40 ferz Exp $ *} {if $active_modules.Bestsellers ne "" and $config.Bestsellers.bestsellers_menu ne "Y"} <a name="TOP"></a> {include file="modules/Bestsellers/bestsellers.tpl"} {/if} {if $active_modules.Special_Offers && $category_offers} <br /><br /> {include file="modules/Special_Offers/customer/category_offers_short_list.tpl"} {/if} {if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description}<br /><br />{/if} {if $f_products ne ""} <p /> {include file="customer/main/featured.tpl"} {/if} {capture name=dialog} {assign var="tmp" value="0"} {foreach from=$subcategories item=c key=catid} {if $c.category}{assign var="tmp" value="1"}{/if} {/foreach} {if $subcategories} {* <table cellspacing="5" width="100%"> {foreach from=$subcategories item=subcat} <tr> {if $tmp and $first_subcat ne "Y"} <td valign="top" rowspan="{count value=$subcategories print="Y"}"><img src="{if $current_category.icon_url}{$current_category.icon _url}{else}{$xcart_web_dir}/image.php?id={$cat}&amp;type=C{/if}" alt="" /></td> {assign var="first_subcat" value="Y"} {/if} <td class="SubcatTitle"><a href="home.php?cat={ $subcat.categoryid }"><font class="ItemsList">{ $subcat.category|escape }</font></a><br /></td> <td class="SubcatInfo">{if $config.Appearance.count_products eq "Y"} {if $subcat.product_count}{ $subcat.product_count } {$lng.lbl_products} {elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {$lng.lbl_categories|lower} {/if} {/if}</td> </tr> {/foreach} </table> *} {* subcategories in 4 columns mod by Finestshops.com *} <table border=0 cellspacing="0" width="100%"> {foreach from=$subcategories key=k item=subcat name=subcategories} {if $smarty.foreach.subcategories.index is div by 2} </tr><tr valign="top"> {/if} <td valign="top" width="50%" align="center"> <A href="home.php?cat={ $subcat.categoryid }"><IMG alt="{* $subcat.category|escape *}" border="0" src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$subcat.categoryid}{/if}"></a> <br> <A href="home.php?cat={* $subcat.categoryid *}"><FONT class="ItemsList">{ *$subcat.category|escape *}</FONT></A> <br> <FONT class="Text">{if $config.Appearance.count_products eq "Y"} {if $subcat.product_count}{ $subcat.product_count } {*$lng.lbl_products*} {elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {*$lng.lbl_categories|lower*} {/if} {/if} </FONT> </td> {/foreach} </tr> </table> {* subcategories in 4 columns mod by Finestshops.com *} <table width="100%" cellpadding="5" cellspacing="1"> {math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"} {section name=product loop=$products} {assign var="discount" value=0} {if %product.index% is div by $config.Appearance.products_per_row} <tr> {assign var="cell_counter" value=0} {/if} {math equation="x+1" x=$cell_counter assign="cell_counter" } <td width="{$width}%" class="PListCell"> <a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_p age}" class="ProductTitle">{$products[product].product}</a><br /> {if $config.Appearance.display_productcode_in_list eq "Y" and $products[product].productcode ne ""} {$lng.lbl_sku}: {$products[product].productcode}<br /> {/if} <table cellpadding="3" cellspacing="0" width="100%"> <tr> <td height="100" nowrap="nowrap" align="center">{include file="product_thumbnail_cust.tpl" product=$products[product]}</td> </tr> </table> <a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_p age}{if $featured eq 'Y'}&amp;featured{/if}">{$lng.lbl_see_details}</a> {if $products[product].product_type ne "C"} <br /> <br /> {if $active_modules.Subscriptions ne "" and $products[product].catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if $config.General.unlimited_products ne "Y" && ($products[product].avail le 0 or $products[product].avail lt $products[product].min_amount) && $products[product].variantid} &nbsp; {elseif $products[product].taxed_price ne 0} {if $products[product].list_price gt 0 and $products[product].taxed_price lt $products[product].list_price} {math equation="100-(price/lprice)*100" price=$products[product].taxed_price lprice=$products[product].list_price format="%3.0f" assign=discount} {if $discount gt 0} <font class="MarketPrice">{$lng.lbl_market_price}: <s> {include file="currency.tpl" value=$products[product].list_price} </s></font><br /> {/if} {/if} <font class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].taxed_price}</font><br /><font class="MarketPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price}</font>{if $discount gt 0}{if $config.General.alter_currency_symbol ne ""},{/if} {$lng.lbl_save_price} {$discount}%{/if} {if $products[product].taxes}<br />{include file="customer/main/taxed_price.tpl" taxes=$products[product].taxes}{/if} {if $active_modules.Special_Offers ne "" and $products[product].use_special_price ne ""} {include file="modules/Special_Offers/customer/product_special_price.tpl" product=$products[product]} {/if} {else} <font class="ProductPrice">{$lng.lbl_enter_your_price}</font> {/if} {/if} {if $active_modules.Feature_Comparison ne '' && $products[product].fclassid > 0} <div align="center" style="width: 100%; padding-top: 10px;"> {include file="modules/Feature_Comparison/compare_checkbox.tpl" id=$products[product].productid} </div> {/if} {*** Uncomment it if you need 'Buy Now' button *** {if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl" product=$products[product]} {/if} *** Uncomment it if you need 'Buy Now' button ***} {/if} </td> {capture name=prod_index} {math equation="index+x+1" index=%product.index% x=$config.Appearance.products_per_row} {/capture} {if $smarty.capture.prod_index is div by $config.Appearance.products_per_row } </tr> {/if} {/section} {if $cell_counter lt $config.Appearance.products_per_row} {section name=rest_cells loop=$config.Appearance.products_per_row start=$cell_counter} <td class="SectionBox">&nbsp;</td> {/section} </tr> {/if} </table> {/if} {if $tmp and $products ne "" } <br clear="left" /> <hr size="1" noshade="noshade" /> {/if} {if $products} {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} {if $total_pages gt 2} <br /> { include file="customer/main/navigation.tpl" } {/if} <br /> {include file="customer/main/products.tpl" products=$products} {/if} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra='width="100%"'} {*if $products eq ""*} {*/if*} { include file="customer/main/navigation.tpl" } <a href="#TOP">Back to the top</a>

Thanks

beetlejuice
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
  #7  
Old 02-06-2009, 02:09 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: scrolling middle column

If you are using CDSEO you need to do this:

https://www.websitecm.com/support/index.php?_m=knowledgebase&_a=viewarticle&kbarticl eid=39&nav=0,4
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #8  
Old 02-06-2009, 02:21 PM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: scrolling middle column

Thanks Balinor for the quick reply, silly question but do you sleep??

Apart from your ESP knowing I was running CDSEO Pro on this site, I tried what your link provided as:

<a href="{$smarty.server.REQUEST_URI}#TOP">Back to the top</a>

and now I get a File not found error, because the "Back to top" link points to http://mydomain.com.au/cdseopro.php.

Perhaps it will be best if I open a ticket with Jon so you can get on with more important things in life like sleep

thanks again
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
  #9  
Old 02-06-2009, 02:25 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: scrolling middle column

Sleep? Who needs it? And CDSEO is listed in your sig - no ESP necessary.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #10  
Old 02-06-2009, 02:29 PM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: scrolling middle column

sleep is good between 2.00am and 4.00am

But I look after 7 sites and not all have CDSEO even though I've tried to convince all the owners to do so. However well spotted as this particular one does.

Adios
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
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 03:19 PM.

   

 
X-Cart forums © 2001-2020