Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Calling specific categories


amcwaters

Recommended Posts

Hello, all. I'm having a little bit of a stumbling block attempting to create a pulldown menu that calls the items in my Category 1. Basically, these are membership items, and work correctly in the catalog itself, but I need to get them into a pulldown for the registration process. I have a feeling this is actually a lot easier than I think, but I'm just not coming up with success.

 

I don't have any code to put up here, but I know where to find the function that builds pulldowns (tep_draw_pulldown_menu), and noticed there's one that builds the county list (tep_get_country_list). I'm assuming that I have to create a new function that builds the pulldown for the specific category information. So my question now becomes, what information am I calling in this function? There's a lot of data being called for categories and products all over the place, and I am lost as to which will be valid for this function.

 

Any help would be appreciated. Thanks.

Link to comment
Share on other sites

is this what you want? it is dynamic, will pull all your categories and sub categories as you add them to admin, no editing of it, if you have renamed index.php or the call refernces like cPath for any reason then change those parts, as well as change Browse Products to say what you want:

<form method="get" action="index.php">
		  <?php echo tep_draw_pull_down_menu('cPath', tep_get_categories(array(array('id' => '', 'text' => 'Browse Products'))), '', 'onChange="this.form.submit();"'); ?>
		</form>

 

HTH

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

is this what you want? it is dynamic, will pull all your categories and sub categories as you add them to admin, no editing of it, if you have renamed index.php or the call refernces like cPath for any reason then change those parts, as well as change Browse Products to say what you want:

<form method="get" action="index.php">
		  <?php echo tep_draw_pull_down_menu('cPath', tep_get_categories(array(array('id' => '', 'text' => 'Browse Products'))), '', 'onChange="this.form.submit();"'); ?>
		</form>

 

HTH

 

Hell of an excellent start! Thanks a billion!

Link to comment
Share on other sites

glad to help, feel free to contact me if you need assistance further

 

Be Well~~

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

Alright. Rabbitseffort made a good post that does indeed work, but does not produce what I need it to. The code above gives the pulldown all categories. What I actually need is to call a specific category (cPath/1) and put it's products as the items in the pulldown. I'm having some trouble making this happen. Anybody have any further information on whether or not this is doable?

 

Thanks in advance!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...