Results 1 to 4 of 4
  1. #1

    help question help with zen_draw_pull_down_menu function

    Hello all, hopefully this is in the proper forum topic. But, I'm new to zen cart customization and am trying to use some of the built in functions. I'm also kinda new to php development but have done some, I can get around and usually figure out what I need to do. But I'm having an issue with the zen_draw_pull_down_menu function. Here's my code:

    Code:
    $modArray = array('Trex250','Trex450','Trex500','Trex600','Trex700');
    echo zen_draw_pull_down_menu('select_model',$modArray);
    I've looped through the array echoing out to the screen the contents of the array and the proper values are there. But in the drop down I only get the first letter of each array value, not the entire value.

    Can someone please help?

  2. #2

    Default Re: help with zen_draw_pull_down_menu function

    Sorry, forgot to include the version numbers:
    * Open SuSE Linux 11.1
    * zen cart 1.3.8a
    * Apache 2.2.8
    * mysql 5.0.51a
    * php 5.2.9

  3. #3
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: help with zen_draw_pull_down_menu function

    You need to make it a multi-dimensional array, with 'id' being the value that will be returned by the form, and 'text' being the displayed text in the pulldown.
    Code:
     $modArray = array();
     $modArray[] = array('id' => '1', 'text' => 'Trex250');
     $modArray[] = array('id' => '2', 'text' => 'Trex450');
     $modArray[] = array('id' => '3', 'text' => 'Trex500');
     $modArray[] = array('id' => '4', 'text' => 'Trex600');
     $modArray[] = array('id' => '5', 'text' => 'Trex700');
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4

    Default Re: help with zen_draw_pull_down_menu function

    Thank you DrByte! That did it

 

 

Similar Threads

  1. v150 Question with zen_draw_pull_down_menu
    By jrcook416 in forum General Questions
    Replies: 11
    Last Post: 4 Dec 2012, 02:33 PM
  2. Replies: 3
    Last Post: 11 Jan 2011, 02:53 AM
  3. help with zc image function
    By tony_sar in forum General Questions
    Replies: 4
    Last Post: 6 Dec 2010, 01:29 AM
  4. Please help, problem with function
    By ALISON MILLS in forum General Questions
    Replies: 4
    Last Post: 17 Dec 2009, 12:48 PM
  5. Please could I have help with a function
    By setter in forum General Questions
    Replies: 2
    Last Post: 16 Jun 2009, 10:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg