Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2009
    Posts
    119
    Plugin Contributions
    0

    Default Select Product via Drop-Down for 1.3.9?

    Hi

    i'm trying to install this mod on this test site ( http://motorcycleparts.ie/ )

    the mod is only listed for 1.3.8 but when i install it i get the drop down box but nothing in it... but if i click in the drop down menu then it selects the product as intended.

    So basically it works but doesnt show me the contents of the drop down box...

    This code is from the mod so I'm assuming that something here is not compatible with 1.3.9?

    Any pointers or help appreciated

    Thanks


    Code:
    ////////////////////////////////////////////////////////////////////////////////
    // Add a drop down box for product selection - Ryan Garlick  - FrameTheTV.com
    
    if ($_GET['main_page'] != 'advanced_search_result') {   // don't diplay the box on the search results page
    
      $testA = array();
      $testA = zen_get_categories_products_list($current_category_id);
      $testR = array();
      $drop_index = 0;
    
      foreach ($testA as $key => $value) {
    
         $testR[$drop_index] = array('id' => zen_href_link(zen_get_info_page($key),'cPath='.zen_get_generated_category_path_rev($_GET['cPath']).'&products_id='.$key.''), 'text' => zen_products_lookup($key, 'products_model'));
         $drop_index++;
      }
    
      sort($testR);
    
      echo "Product Selection: ";
      echo zen_draw_pull_down_menu('prodselect', $testR, '', 'onchange="window.location = this.options[this.selectedIndex].value"');
      echo "<br /><br />";
    
    }
    // end of drop down box for product selection
    ///////////////////////////////////////////////////////////////////////////////

  2. #2
    Join Date
    Jan 2009
    Posts
    119
    Plugin Contributions
    0

    Default Re: Select Product via Drop-Down for 1.3.9?

    Ok I figured out where i was going wrong.

    I wasn't using the product model field and this line of code calls for that...
    Code:
    $testR[$drop_index] = array('id' => zen_href_link(zen_get_info_page($key),'cPath='.zen_get_generated_category_path_rev($_GET['cPath']).'&products_id='.$key.''), 'text' => zen_products_lookup($key, 'products_model'));
    Just in case anyone else is looking to use this mod you can also change 'products_model' to 'products_name' to get the drop down to use the product name field instead

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,710
    Plugin Contributions
    13

    Default Re: Select Product via Drop-Down for 1.3.9?

    The $GET is going to become problematic with PCI compliance and versions of Zen Cart beyond 1.3.9h.
    Might want to contact the mod creator or look for a support thread to fix the possible security problem.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  4. #4
    Join Date
    Jan 2009
    Posts
    119
    Plugin Contributions
    0

    Default Re: Select Product via Drop-Down for 1.3.9?

    Hi

    The mod is working now but I cant see any logic to the way its displaying the products. The main listing is alphabetical but the drop down doesnt seem to be in any particular order. I've set the sort order but i cant see it doing anything..

    Can some one take a look at it for me please?

    http://motorcycleparts.ie/index.php?...ha_filter_id=0

    Thanks

  5. #5
    Join Date
    Jan 2009
    Posts
    119
    Plugin Contributions
    0

    Default Re: Select Product via Drop-Down for 1.3.9?

    I've just noticed that I uploaded a very big file by mistake... that might have something to do with the sorting issues. I'll upload a smaller file later and see how that works..

  6. #6
    Join Date
    Jan 2009
    Posts
    119
    Plugin Contributions
    0

    Default Re: Select Product via Drop-Down for 1.3.9?

    Hi

    I've figured out that the drop down box is listing products in model number order. Can anyone tell me how to get it to list in product name order?


    Thanks

  7. #7
    Join Date
    Jan 2009
    Posts
    119
    Plugin Contributions
    0

    Default Re: Select Product via Drop-Down for 1.3.9?

    i finally sorted this out so just in case anyone else runs into the same issues...i took another look at the categories and it turns out the drop down box is sorting by product id which is why some listings didnt look correct. the commercial version of easypopulate allows you to assign product id when entering products so i can upload product in the order i want them to appear in the drop down.

    someone might be able to confirm if any free mod also allows the product id to be assigned.

 

 

Similar Threads

  1. Category Drop Down SELECT Menu Sidebox Mod.
    By jettrue in forum All Other Contributions/Addons
    Replies: 142
    Last Post: 19 Apr 2023, 05:16 PM
  2. Select an accessory drop-down menu
    By DML73 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 24 Nov 2013, 06:40 PM
  3. drop down does not appear to select anything when submitted
    By jerbroo in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 27 Mar 2008, 05:29 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