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

Sliding Menu that displays categories and sub-categories

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #31  
Old 10-29-2003, 08:40 AM
 
Gibberish Gibberish is offline
 

Senior Member
  
Join Date: Sep 2003
Posts: 182
 

Default

If your still around Deals on Deals I have been ripping your code apart trying to get it to work on my xcart 3.4.8

I am stuck on one part though. I am getting an error that says:

Warning: Variable passed to each() is not an array or object in /usr/www/htdocs/saddlemen/test_site/xcart/customer/slidedown.php on line 32
slideMenu.init();

Line 32 is the bold one:

function preparelist($list)
{
$r = array();
$c = false;
$cnt = 1;
while (list ($k, $v) = each ($list) ){
$l = split('/',$v['category']);
// init tree
$p = & $r;
for( $i=0; $i<sizeof($l); $i++ ){
$idx = find_idx($p,$l[$i]);
$lastest = ( $i == sizeof($l)-1 );
if( $idx == -1 ) {
if( $lastest ){
if( isset($p[0]) && isset($p[0]['orderby']) && $p[0]['orderby'] > $v['order_by']){
array_unshift($p, array( 'label'=>$l[$i] ) );
$idx = 0;
}


Now I may have been just staring at this code to long, Im going to go get something to eat and come back but thought I would post in the chance you see this.
Reply With Quote
  #32  
Old 02-25-2004, 12:27 PM
 
pchopper pchopper is offline
 

Newbie
  
Join Date: May 2003
Posts: 7
 

Default Lost my categories

I copied everything and checked to make sure that white space was not added. I lost my categories and after restoring the back up of the two files I still don't have my categories.

Please help.

xcart 3.5.4
Reply With Quote
  #33  
Old 04-08-2004, 02:22 AM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default

Hi Guys,

After hunting around for a reason why I have zero
slideMenu.makeMenu(XXXXXXX) entries when I view source, I debugged a long time to find out that with recent version of Smarty Class, {php}{/php} tags are not allowed references to smarty variables.

meaning the $allcategories and $list is basically empty

Code:
$list = preparelist($allcategories); sort_cat(&$list); fill_menu($list,0);

To get around this, you will have to use a smarty prefilter function, which brings on a performance hit onto your pages. IMO if you can bear to use this mod that DealsonDeals kindly and FREELY provided, then don't worry about the performance hit.

in categories.tpl, after {php}, insert this line:

Code:
extract($this->get_template_vars());

I'm doing my own version of submenu display, but I'm going to reference to DealsOnDeals' code to do this, I hope you don't mind DealsOnDeals!
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote
  #34  
Old 07-06-2005, 05:58 PM
 
shirley2005 shirley2005 is offline
 

Advanced Member
  
Join Date: Jun 2005
Posts: 33
 

Default

I'm looking for a way to better display categories and subcategories.

How to get a menu like in http://www.kegworks.com ?
__________________
x-cart 4.0.14 Pro
Reply With Quote
  #35  
Old 07-06-2005, 10:06 PM
 
kevin02 kevin02 is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 60
 

Default

Looks like a lot of hand written code. Any one else??
__________________
Apache Linux 2.2.24
MySQL version: 5.5.30-cll
X-cart V 4.5.5
PHP 5.2.0
Reply With Quote
  #36  
Old 03-12-2007, 08:48 PM
 
pdheady pdheady is offline
 

Advanced Member
  
Join Date: Mar 2007
Location: West Palm Beach, FL
Posts: 36
 

Default Re: Sliding Menu that displays categories and sub-categories

cant get it working with 4.0.19 too bad i wanted to test it out
__________________
Xcart 4.0.19
Reply With Quote
  #37  
Old 03-13-2007, 08:51 AM
  august's Avatar 
august august is offline
 

Senior Member
  
Join Date: Jul 2003
Posts: 178
 

Talking Re: Sliding Menu that displays categories and sub-categories

Quote:
Originally Posted by shirley2005
I'm looking for a way to better display categories and subcategories.

How to get a menu like in http://www.kegworks.com ?


http://www.bcsengineering.com/store/catalog/Group_Categories_for_Better_Viewing__FREE_Xcart_Mo d-p-62.html

http://www.xcartmods.co.uk/#m2
__________________
"The point is, to make so much money, that money isn't the point anymore."

Pro Version 4.0.19
Gold Version 4.1.3
Linux
Reply With Quote
  #38  
Old 05-11-2007, 09:26 PM
  shopccp's Avatar 
shopccp shopccp is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 35
 

Default Re: Sliding Menu that displays categories and sub-categories

Will the code work for horizontal categories?
__________________
X-Cart Gold v4.4.4
Apache v2.2.20
PHP v5.3.8
MySQL v5.1.56-log
Linux kernel v2.6.18-238.19.1.el5xen
Reply With Quote
  #39  
Old 04-06-2009, 04:51 AM
 
ladybird ladybird is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 93
 

Default Re: Sliding Menu that displays categories and sub-categories

Hi Ya'll

just wondering if any one has made the above code work on 4.5 or 4.9?

i would basically just like the sub categories to appear out to the right when a client either hovers over or clicks on a category.

Any suggestions? Gratefully received.
__________________
x-cart gold 4.1.9
x-cart gold 4.1.5
www.makeuwell.com.au
www.amberbebe.com
Sydney Australia
Reply With Quote
  #40  
Old 06-16-2010, 09:41 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Sliding Menu that displays categories and sub-categories

will this work on 4.1.9 & 4.1.11 ??
__________________
4.6.1 Platinum


Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:33 PM.

   

 
X-Cart forums © 2001-2020