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

Category Dropdown Menu For vs 4.4.1

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-21-2010, 03:11 PM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Default Category Dropdown Menu For vs 4.4.1

Hello, I am looking for help with this issue. I am in the process of upgrading my cart to 4.4.1 and I was trying to use some code that I had for my drop down category menu in version 4.3 but it is not working in vs 4.4.1. Can someone please help me convert this code to work with version 4.4.1? As you will notice in the code, I do not want any categories with Id's higher then 899 showing up in the list. Remember this code came from version 4.3 and earlier and I need to use it in version 4.4.1. It worked great before in previous versions.

Thank you very much in advance for your help. Merry Xmas to all! Shareen

{*
$Id: categories.tpl,v 1.35 2009/05/12 07:37:15 max Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
<div class="search">
<div class="valign-middle">

{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"}
<select name="listCategories" onchange="window.location=this.options[selectedIndex].value">
<option value=""><font class="VertMenuItems">Select A Design Category</font></option>
{foreach from=$categories item=c}
{if $c.order_by < 899 && $c.product_count ne 0}
<option value="home.php?cat={$c.categoryid}"><font class="VertMenuItems">{$c.category}</font></option>
{/if}
{/foreach}
</select>
{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}
</form>

</div>
</div>
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
  #2  
Old 12-29-2010, 10:07 AM
 
garry garry is offline
 

Senior Member
  
Join Date: Oct 2003
Location: Wolverhampton UK
Posts: 102
 

Default Re: Category Dropdown Menu For vs 4.4.1

Hi

Hope this helps.


<select name="listCategories" onchange="window.location=this.options[selectedIndex].value">
<option value="">Select A Category</option>
{foreach from=$categories_menu_list item=c name=categories}

<option value="home.php?cat={$c.categoryid}">{$c.category} </option>

{/foreach}
</select>
__________________
Garry


http://www.natralife.co.uk


X-Cart Gold version 4.5.4
PHP 5.3.18
MySQL client 5.0.96
Reply With Quote
  #3  
Old 12-29-2010, 02:07 PM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Question Re: Category Dropdown Menu For vs 4.4.1

This works perfect. Thank you so much. I am using the smart template for vs. 4.4.1 and I put my category drop-down list on the custom horizontal menu. How would I move it to the far right? Look at the picture I have included. Thank you in advance for taking the time to help me.
Attached Thumbnails
Click image for larger version

Name:	dropdown_categories_list.png
Views:	254
Size:	50.3 KB
ID:	2267  
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
  #4  
Old 02-02-2011, 01:38 PM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Default Re: Category Dropdown Menu For vs 4.4.1

Garry, the drop down categories is working out great but do you know of a way to increase the size and make it wider? Some of the category names are being cut off. The code I am using is below.
Thank you for your help.


<select name="listCategories" onchange="window.location=this.options[selectedIndex].value">
<option value=""><font class="VertMenuItems">Select A Product Category</font></option>
{foreach from=$categories_menu_list item=c name=categories}
{if $c.order_by < 899 && $c.product_count ne 0}
<option value="home.php?cat={$c.categoryid}">{$c.category} </font></option>
{/if}
{/foreach}
</select>
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
  #5  
Old 02-02-2011, 11:59 PM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default Re: Category Dropdown Menu For vs 4.4.1

The changes that you are looking to make aren't in that code, they will be css changes that you will need to make.
If you use Firebug in Firefox, you'll be able to see which css classes need to be altered.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #6  
Old 02-03-2011, 05:03 AM
 
sparker2 sparker2 is offline
 

eXpert
  
Join Date: Feb 2007
Posts: 290
 

Default Re: Category Dropdown Menu For vs 4.4.1

Ok Thank you for your reply. I will have to figure this out. I am not sure how to go about this but I will do more digging. Thanks again for your help. Take care!
__________________
Shareen
sparker2@cox.net
http://www.stitches4u.com
X-Cart Version 4.5.0 with Smart Template vs 4.4.x
Reply With Quote
  #7  
Old 02-03-2011, 05:43 AM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default Re: Category Dropdown Menu For vs 4.4.1

Use Firefox and Firebug addon, click on the search bar with Firebug, you will see the class or id of the element, and you will see the CSS of it, and what CSS you need to modify. You can modify it in Firebug for temporary uses, but then you will need to go into the actual css and make the change and save it.
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
  #8  
Old 05-09-2011, 12:49 AM
 
xtech xtech is offline
 

X-Adept
  
Join Date: Jun 2010
Posts: 605
 

Default Re: Category Dropdown Menu For vs 4.4.1

Hi,
Is it possible to make dropdown category in hover like boots.com on the top??
__________________
X-cart Platinum
4.6.1
Reboot template
Reply With Quote
  #9  
Old 10-02-2011, 12:52 PM
 
uros uros is offline
 

Member
  
Join Date: Oct 2002
Location: Slovenia
Posts: 29
 

Default Re: Category Dropdown Menu For vs 4.4.1

Hey, can you tell me how can i implement this into version 4.4.3

Thank you
__________________
X-cart version 4.4.4
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:52 PM.

   

 
X-Cart forums © 2001-2020