Jump to content


Photo
- - - - -

Mega Menu Featured Product


  • Please log in to reply
1 reply to this topic

#1 steck1983

steck1983

    Member

  • Members
  • 27 posts
  • Framework Version:2.02
  • Country: Country Flag

Posted 05 January 2013 - 06:34 AM

Hi Guys,

 

Im developing a retail site for a client. The client wants a mega menu featuring a featured product on each page. This is similar to:

Please Login or Register to see this Hidden Content

 

Ive chosen to use pagelines/wordpress/jigoshop as the platforms. After looking around I found that no plugin currently has the ability to do this, so I ended up writing my own menu stucture by extending wordpresses's walker nav class and then styling the menu. This way you have the required container divs to construct the mega menu.

 

I'm having some difficulties now though determining how to reference the clast instance of a class with php code. For example in basic, if you have a menu structure ike this :

 

<div>

  <div class="someclass"></div>

  <div class="someclass"></div>

  <div class="someclass"></div>

</divl>

 

I want to reference the last class instance. can I store these in an array and then reference the ubound of the array?

 

What I want to do is insert another class after the last class instance but do this recursively since they can be nested within the panes of the mega menu.

 

<div>

  <div class="someclass"></div>

  <div class="someclass"></div>

  <div class="someclass"></div>

  <div class="newdiv"></div>

</div>

 

If I can do this, problem solved because then I can just call the function that is references the jigoshop products..

 

I contacted one of the pros also. Hopefully will get a response quickly..

 

 

 

 

 



#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 05 January 2013 - 05:09 PM

First,  I'm happy that you went ahead and contacted one of the Pros for this, as it's a customization for which one of them could assist far more than we could here.

 

Candidly, not being a programmer/coder, any answer I give to your enquiry about arrays or mega menus would be a guess at best, and somewhat unfair to you.

 

You may wish to look into:

Please Login or Register to see this Hidden Content

 

I've seen people add images to this one, but not something that rotates. That doesn't mean its not possible.