Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jun 2009
    Location
    Kent, UK
    Posts
    347
    Plugin Contributions
    5

    Default New Mod: Expandable / Collapsible Attributes Field in Product Page

    Hey im uploading this mod to the addons area, hopefully it will get some interest.

    It is a cosmetic mod using jquery to make the attributes area a little more appealing, it has an expandable / collapsible div for attributes, so if like me on some of your products have a large amount of attributes, this is perfect for tucking them away until the customer actually wants to input something. For browsers with javascript disabled it displays as expanded.

    Its a pretty simple mod with the only override being the modules_attributes.php file and some additional css.

    Not tested for compatibility with other mods but i am using Tabbed products Pro on 1.3.9h and is working fine.


    See it on my live store: http://www.livvylougifts.co.uk

  2. #2
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: New Mod: Expandable / Collapsible Attributes Field in Product Page

    Liking your mods a lot

  3. #3
    Join Date
    Jun 2009
    Location
    Kent, UK
    Posts
    347
    Plugin Contributions
    5

    Default Re: New Mod: Expandable / Collapsible Attributes Field in Product Page

    This is now live in addons area: http://www.zen-cart.com/index.php?ma...oducts_id=1989

    If you fancy posting your site and giving alternative working demo's that would be great :)

    I have had to submit an update though which is not yet live because i forgot to include modified tpl_modules_attributes.php so please follow manual instructions in the readme.txt for that file until the update is accepted :)

  4. #4
    Join Date
    Sep 2010
    Posts
    448
    Plugin Contributions
    0

    Default Re: New Mod: Expandable / Collapsible Attributes Field in Product Page

    How do I move this up the page?
    I want it to be placed under Tabbed Products

  5. #5
    Join Date
    Jun 2009
    Location
    Kent, UK
    Posts
    347
    Plugin Contributions
    5

    Default Re: New Mod: Expandable / Collapsible Attributes Field in Product Page

    again, without a link for reference i cannot help?

  6. #6
    Join Date
    Mar 2007
    Posts
    112
    Plugin Contributions
    0

    Default Re: New Mod: Expandable / Collapsible Attributes Field in Product Page

    Quick question - does your mod handle multiple option names? When I looked at the example on your store, I only saw products with one option name (i.e. Personalize). What we need is a (toggle-like) link for each option name, like:

    + Choose color
    + Choose size
    + Choose whatever

    Thanks!
    RAB

    Why is it I'm always surprised when something actually works?

  7. #7
    Join Date
    Jun 2009
    Location
    Kent, UK
    Posts
    347
    Plugin Contributions
    5

    Default Re: New Mod: Expandable / Collapsible Attributes Field in Product Page

    http://www.livvylougifts.co.uk/index...roducts_id=591

    if you see the link above i have dropdown boxes for that product, the mod is purely aesthetic, it doesnt alter the attributes themselves, it only wraps the attribute module in a expandable box the function of the attributes remains unchanged

    is this what you meant?

  8. #8
    Join Date
    Jun 2009
    Location
    Kent, UK
    Posts
    347
    Plugin Contributions
    5

    Default Re: New Mod: Expandable / Collapsible Attributes Field in Product Page

    reading your message again i realised i've missed the point. At the moment it just deals with the module in its entirety not individual attributes

  9. #9
    Join Date
    Jun 2009
    Location
    Kent, UK
    Posts
    347
    Plugin Contributions
    5

    Default Re: New Mod: Expandable / Collapsible Attributes Field in Product Page

    I've been looking into this (as per your pm and message above)

    The mod controls at a template level rather than modifying the attributes code (in tpl_modules_attributes.php) and as such it is indiscriminate as to what attributes it wraps.

    So from what i can see you need to somehow distinguish between attributes at code level and wrap it there, this is all done in includes/modules/attributes.php (obv use override templates for testing)
    Code:
    switch ($products_options_names->fields['products_options_images_style']) {
                          case '0':
                          $tmp_checkbox .= zen_draw_checkbox_field('id[' . $products_options_names->fields['products_options_id'] . ']['.$products_options_value_id.']', $products_options_value_id, $selected_attribute, 'id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '"') . '<label class="attribsCheckbox" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '">' . $products_options_details . '</label><br />' . "\n";
                          break;
    i have left the javascript in the template file (tpl_modules_attributes.php) and then lifted the additional div code which the javascript controls to wrap the checkboxes
    Code:
     $tmp_checkbox .= '<div id="expanding_attribs">
    <h2 class="expheading">Personalise This Product Here!</h2>
    <div class="expcontent">' . zen_draw_checkbox_field('id[........

    this wraps each individual checkbox with the javascript, so its part of the way there, perhaps one of the pros can jump on this thread and give some guidance on how to wrap the checkboxes and their values in their entirety?

  10. #10
    Join Date
    Mar 2007
    Posts
    112
    Plugin Contributions
    0

    Default Re: New Mod: Expandable / Collapsible Attributes Field in Product Page

    Terrific - your contribution to both Add-ons and this forum is another wonderful example of the true superiority of the Zen Cart family in the world of open source apps!

    I'll play with this and let you know of any successes!

    Thanks - much appreciated!
    RAB

    Why is it I'm always surprised when something actually works?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 17 Sep 2013, 05:30 PM
  2. New Field In Product Listing Page
    By jill8026 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 4 Dec 2010, 01:38 PM
  3. Collapsible Attributes
    By Dave Mc in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 7 Jul 2010, 03:58 PM
  4. Attributes field not showing correctly in New install with
    By roshlin in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 1 Feb 2009, 12:45 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR