Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2010
    Posts
    14
    Plugin Contributions
    0

    Default Is there a way to create a "select all" option at top of dropdown list?

    I want to have dowloadable .iso files on my website. I use winrar to create downloadable parts that are 100mb each. Since some of my .iso files are 3 - 4 gigabytes in size, so this would result in more than 15 checkboxes for the customer to select one by one. It also looks a little sloppy and unprofessional to have a big cluster of boxes at the bottom of the product description. Does anyone know a way to create a "select all" option at the top of a dropdown list? As in, the customer checks off the top box, and the rest below get automatically selected also. Using the existing "Option Name Manager", "Option Valued Manager", and "Attributes Controler" tools, I could not figure out a way to do this. I want to bundle the values "download part 1, download part 2, download part 3 etc. so that one click selects them all. Is there a line of code that I could enter in my Zen Cart files that would accomodate this? If so, where would it go?

    If anyone could help me with this, it would be greatly appreciated

  2. #2
    Join Date
    Aug 2010
    Posts
    14
    Plugin Contributions
    0

    Default Re: Is there a way to create a "select all" option at top of dropdown list?

    Somebody? Anybody?

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

    Default Re: Is there a way to create a "select all" option at top of dropdown list?

    If you link each file to a SEPARATE optionName+optionValue pair, then you can set the attribute to be pre-checked

    If I recall correctly, that's explained here: http://www.zen-cart.com/content.php?...s-downloadable or here http://www.zen-cart.com/content.php?...to-my-products
    .

    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
    Join Date
    Aug 2012
    Posts
    1
    Plugin Contributions
    0

    Default Re: Is there a way to create a "select all" option at top of dropdown list?

    i have not understood the technique.
    please explain i wanted to make birthday card maker software where i need that

  5. #5
    Join Date
    Aug 2010
    Posts
    14
    Plugin Contributions
    0

    Default Re: Is there a way to create a "select all" option at top of dropdown list?

    Thanks DrByte! I have in fact figured out how to make options/values pre-selected before they're added to the cart. I think I need to re-word my initial question though. I put "select all option from a dropdown list" but I think checkboxes are probably the only way to go for what I'm trying to do.

    If I have a product called "monkeybuscuits", I want to have an option - let's call it "monkeybuscuitsDivX" - that has fifteen .rar file parts, which means fifteen checkboxes involved "part1.rar", "part2.rar, "part3.rar" and so on and so on. Why not just make them all required and therefore preselected so that all the customer has to do is click "add this to my cart"? Because there will also be another option "monkeybuscuits.iso" that's going to have twenty .rar file parts, therefore twenty checkboxes of it's own. If I make them all preselected, the customer's not going to be able to choose only one of the options unless he manually unchecks a whole bunch of boxes.

    There must be a way to modify one of the Zen cart .php files on my server so that I can create a "select all" checkbox. Probably a very basic code for those who know how to write it, and I think I'm going to educate myself in .php, but I'm hoping someone could help me with this one specific request as I'd like to impliment it asap.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Is there a way to create a "select all" option at top of dropdown list?

    As the system is architected right now, I think you'd still need to have all the 15 and 20 separate checkboxes (actually radio buttons are better, because they technically can't be deselected) for each "file".
    But then you might be able to use some custom jQuery or other fancy javascript stuff to insert some buttons onto the page that invite the user to click to auto-select all the buttons for one file-format vs the other.
    But that's all pretty much outside actual Zen Cart core code, and more just custom templating and javascripting. And actually fairly complex because all the attributes on each product are built dynamically and so the javascript will need to take all that into account in order to know what items to "check" etc. Not something you're gonna write overnight.
    .

    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.

 

 

Similar Threads

  1. v154 Deleting an Option with a "TEXT" or "FILE" value for ALL products
    By kcb410 in forum Setting Up Categories, Products, Attributes
    Replies: 26
    Last Post: 3 Feb 2015, 08:18 PM
  2. Replies: 2
    Last Post: 17 May 2011, 03:50 AM
  3. Best or easiest way to add "Free Gift Wrap" Option for all items?
    By noelsaw in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 5 Sep 2009, 01:38 AM
  4. Replies: 1
    Last Post: 31 Jul 2009, 01:07 PM
  5. Ability to get a list of "option value" by "customer"?
    By Banhi in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 26 Jan 2008, 07:57 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