Page 17 of 28 FirstFirst ... 7151617181927 ... LastLast
Results 161 to 170 of 279
  1. #161
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Flexible Attributes addon support

    Oops, didn't see that the previous try at this post actually posted:)

    The corresponding database field stores the products_options_sort_order value, but I'm not sure where the PRODUCTS_OPTIONS_SORT_ORDER constant's value is set. It is not defined in a PHP file, so it must be set in admin and stored in the db, then retrieved at runtime. I've never been able to find out how/where stored settings are turned into constants for use.

  2. #162
    Join Date
    Jun 2010
    Posts
    207
    Plugin Contributions
    1

    Default Re: Flexible Attributes addon support

    Quote Originally Posted by gjh42 View Post
    Oops, didn't see that the previous try at this post actually posted:)

    The corresponding database field stores the products_options_sort_order value, but I'm not sure where the PRODUCTS_OPTIONS_SORT_ORDER constant's value is set. It is not defined in a PHP file, so it must be set in admin and stored in the db, then retrieved at runtime. I've never been able to find out how/where stored settings are turned into constants for use.

    I did a comparison of all files that contain "PRODUCTS_OPTIONS_SORT_ORDER" via Dev Toolkit in the localhost files and the live site files. the only difference I found was in admin/option_name.php:

    Localhost:
    Line #37 : $db->Execute("UPDATE " . TABLE_PRODUCTS_OPTIONS . " set products_options_sort_order= " . (int)$_POST['products_options_sort_order'][$id] . " where products_options_id=" . (int)$id . " and language_id=" . (int)$_GET['lng_id']);

    Live Site:
    Line #37 : $db->Execute("UPDATE " . TABLE_PRODUCTS_OPTIONS . " set products_options_sort_order= " . $_POST['products_options_sort_order'][$id] . " where products_options_id= $id and language_id=" . $_GET['lng_id']);

    I modified the live site's file to match the code in the localhost file, but it did not make any difference. Still stumped...

  3. #163
    Join Date
    Jun 2010
    Posts
    207
    Plugin Contributions
    1

    Default Re: Flexible Attributes addon support

    Quote Originally Posted by gjh42 View Post
    attributes.php sets the query sort order with this:
    PHP Code:
                if ($pr_attr->fields['total'] > 0) {
                  if (
    PRODUCTS_OPTIONS_SORT_ORDER=='0') {
                    
    $options_order_by' order by LPAD(popt.products_options_sort_order,11,"0")';
                  } else {
                    
    $options_order_by' order by popt.products_options_name';
                  } 
    so finding where the PRODUCTS_OPTIONS_SORT_ORDER constant is defined/set will be helpful. It should be set in admin and stored in the database, but I'm not sure that constant name will help to track down the setting location.
    Hmmm... so the code says to order it by the sort order, and if that doesn't work then order them by option name in alphabetical order, right? It does indeed seem to be ordering it by name right now (Juice 1, Juice 2, Juice 3, Juice Choice, etc...). I wonder if that code could be tweaked to tell it to sort by ID instead, since I added the options in the order I want them to show up...


    I changed order by popt.products_options_name to order by popt.products_options_id and it looks like it's gonna work!!!! I need to add a few CSS modifications, but I think I'm on to something here. I'll post back here with my final results.
    Last edited by hockey2112; 18 Nov 2011 at 08:03 PM.

  4. #164
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Flexible Attributes addon support

    Somehow there is a PRODUCTS_OPTIONS_SORT_ORDER constant that should be generated (or should be empty or '0' or null); if that is 0 then the correct sort order is used. If it has a nonzero value, then the name sort is used.

    So the real question is how to control that constant. If that can be done, the stock code will work correctly. Until then, a tweak may be what you need to get on with the rest of your work.

  5. #165
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Flexible Attributes addon support

    I would copy the desired statement to replace the name statement for now:
    PHP Code:
                  if (PRODUCTS_OPTIONS_SORT_ORDER=='0') {
                    
    $options_order_by' order by LPAD(popt.products_options_sort_order,11,"0")';
                  } else {
                    
    //$options_order_by= ' order by popt.products_options_name';
                    
    $options_order_by' order by LPAD(popt.products_options_sort_order,11,"0")';
                  } 

  6. #166
    Join Date
    Jun 2010
    Posts
    207
    Plugin Contributions
    1

    Default Re: Flexible Attributes addon support

    Quote Originally Posted by gjh42 View Post
    I would copy the desired statement to replace the name statement for now:
    PHP Code:
                  if (PRODUCTS_OPTIONS_SORT_ORDER=='0') {
                    
    $options_order_by' order by LPAD(popt.products_options_sort_order,11,"0")';
                  } else {
                    
    //$options_order_by= ' order by popt.products_options_name';
                    
    $options_order_by' order by LPAD(popt.products_options_sort_order,11,"0")';
                  } 
    That seems to work as well. I have made that change. Thanks again for all your help!!!!

  7. #167
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

    Default Re: Flexible Attributes support

    Could this mod be used to setup the attributes just like the left eye/right eye grid on this page:

    http://www.clearlycontacts.ca/contac...prod91399.html
    Danielle

  8. #168
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: Flexible Attributes addon support

    This mod is awesome! I am having a difficult time doing a few things though. You can see my live page here: http://www.framesforlife.com/copy-ex...example-1-p-11

    Here is my flexible_attributes.css stylesheet coding:
    Code:
    /* Global Entries*/
    .wrapperAttribsOptions label {font-size: 1.0em;}/*make "label" elements match other text*/
    h3#attribsOptionsText {display: none;}/*hide the "Please Choose:" heading*/
    h4.optionName {font-size: 1.0em;}
    .wrapperAttribsOptions+br.clearBoth {display: none;}/*allows floated attributes to sit side by side if desired. Without this each attribute has to go to new line*/
    
    /*My Entries*/
    #wAttrib-4 {clear: left;} /*Artwork Size Text Box. This starts on a new line*/
    #wAttrib-1 {clear: left; float: left;}/*Select Width Drop-down*/
    #wAttrib-2 {clear: left; float: left;}/*Select Height Drop-down*/
    #wAttrib-3 {float: left;} /*Width Fractions. this will sit beside width drop-down*/
    #wAttrib-5 {float: left;} /*Height Fractions. this will sit beside width drop-down*/
    #wAttrib-42 .attribPrice {display: none;} /*this is not working yet*/
    #wAttrib-78 .attribPrice {display: none;} /*this is not working yet*/
    Here are my issues:
    1. Is it possible to make the text disappear for attribute #3 and attribute #5 (Width and Height Fractions)? I want the title text to be hidden from the visitors so the field can come closer to the first box (as both tie together). I tried this code:
    Code:
    #wAttrib-3 {float: left; display:none;}
    but the whole box disappeared. My plan is to preferably hide this text so the visitor cannot see it.

    2. Is is possible to make text appear to the right of the field instead instead of before the field?

    3. The rules for attribute #42 and #78 above do not seem to be working. I am trying to hide the (+3.33) pricing in both of these drop-downs. All pricing in these two drop-down menus need to be hidden. The ID #'s are 42 and 78 and you can see I have them defined. I am following the rules of this post: http://www.zen-cart.com/forum/showpo...01&postcount=5 according to blackbelt.

    Any ideas please?

  9. #169
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Flexible Attributes addon support

    Danielle - Yes, you can get that layout.
    Set up the four headings as read-only attributes floated left, then the four right eye attributes floated left with the first one also clear:left;, then the left eye the same. You can hide attribute labels per the method I will show sports guy. (The details may differ for some kinds of attributes.)

  10. #170
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Flexible Attributes addon support

    sports guy - Use this rule for hiding text as you describe:

    #wAttrib-3 label, #wAttrib-5 label {display: none;} /*hide fraction text*/

    A rule like this will put the text to the right of its input:

    #wAttrib-5 h4.optionName {float: right;} /*text to right of input*/

    The pricing span in the define does not actually function, as I found when I tested it some time later. I have added a note to that thread to alert people.
    You would need to go into the attributes code and add the span with class.

 

 
Page 17 of 28 FirstFirst ... 7151617181927 ... LastLast

Similar Threads

  1. v154 Flexible Footer Menu Multilingual [Support Thread]
    By rbarbour in forum All Other Contributions/Addons
    Replies: 128
    Last Post: 6 Sep 2023, 10:30 PM
  2. v152 Flexible Language/Currency Header Options (Support Thread)
    By rbarbour in forum All Other Contributions/Addons
    Replies: 17
    Last Post: 20 May 2021, 03:46 PM
  3. v151 Flexible Return Authorization (RMA) for ZC v1.5.x [Support Thread]
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 167
    Last Post: 11 Apr 2021, 08:56 PM
  4. Flexible Product Listing [support]
    By gjh42 in forum All Other Contributions/Addons
    Replies: 27
    Last Post: 27 Apr 2015, 11:16 AM
  5. help with flexible product listing addon
    By artifaxworthing in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 19 Jun 2010, 11:25 AM

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