ThemeShaper Forums » Thematic


Adding PHP function to Menu

(3 posts)
  • Started 11 years ago by initialsbr
  • Latest reply from kga
  • This topic is resolved
  1. initialsbr

    Alright. I'm still not quite getting the hang of this functions/hooks thing. But I'm determined.

    I'm using the WP E-Commerce plugin and I want to put a very minimal shopping cart in the menu. Right now I have the pages listed in the menu. To the right of the pages, I want something like "# items in shopping cart" to show up. Apparently this is the PHP code I use to place the shopping cart places...

    <?php echo nzshpcrt_shopping_basket(); ?>

    So how do I do this? I tried a couple of things but they just ended up breaking the site.

    Also, I'm assuming the # of items would change automatically if I get the shopping cart right. But maybe I have to write some PHP code to make that happen?

    Posted 11 years ago #
  2. @initialsbr: Cozmoslabs has a tutorial on adding a search box to the menu; I'm sure it will be helpful for you.

    It involves removing the default menu (remove action) and putting the menu back in again with modifications - in your case the shopping cart - by adding the action.

    Posted 11 years ago #
  3. kga

    thought I'd chime in to verify that this did work - I'm trying to do the same thing, but I really want the cart at the TOP of the #header, not necessarily IN the #access div. (which I started a thread regarding).

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.