Thread: A few questions

Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 45
  1. #31
    Join Date
    Aug 2006
    Posts
    35
    Plugin Contributions
    0

    Default Re: A few questions

    Ok that will be my second attempt. As for my 1st attempt, I am trying to get this right, but it's giving me difficulties, I was trying to put some scripts in the other attributes page, but It is reading it, but not giving an output, I am trying to put an if statement in php to check the name, then from that name, I think I like your advice, on that page I am going to do that, I will use javascript to create the link, as well as create the popup window, when they close the window I will have javascript populate it, that will take care of all occurences of that. I think, hmm. This might get deeper than I thought, as far as php, is there a way I can get it to display using code on the
    tpl_modules_attributes.php
    page I wanted to put an if statement, but I don't know what to check for, for the option_name, or option_
    here is an example
    The first 3 lines i what they already had, my code is below that, but not producing any output, I copied and pasted it from the source code so it should have matched, the variables. for that attribute only, but it doesn't work for anything.
    Code:
    <div class="wrapperAttribsOptions">
    <h4 class="optionName back"><?php echo $options_name[$i] ; ?></h4>
    <div class="back"><?php echo $options_menu[$i]; ?></div>
    <?php
    if ($options_name[$i] == "<label class=\"attribsInput\" for=\"attrib-60-285\">Custom Laminate:</label></h4>") {
    ?>
    <br />
    <a href="../../../wilsonart.php" title="Wilson Art">Choose Color!</a>
    <?php
    }
    ?>
    Once I get the url's to display dynamically I can move onto the second part, is there a way I can work this into what I have, to make it show the links, then I can reproduce this code, to show links for more variety of attributes, then even setup a switch statement to make the code shorter. That will eliminate my first problem.
    I can set up a case to show a specific link for each condition, then if there are more than one attribute that needs links it will also show them all, but first I have to figure out how to get one to display?

  2. #32
    Join Date
    Aug 2006
    Posts
    35
    Plugin Contributions
    0

    Default Re: A few questions

    I also tried a few varieties of this to try and get it to display but nothing is displaying it under that link.

  3. #33
    Join Date
    Aug 2006
    Posts
    35
    Plugin Contributions
    0

    Default Re: A few questions

    actually wait, I got it to display, I had it typed a little bit wrong, first question, is this a safe, and reliable method, here is my code for getting it to display, I could reproduce this to get them to display properly for all of them, is it reliable.
    Code:
    <div class="wrapperAttribsOptions">
    <h4 class="optionName back"><?php echo $options_name[$i] ; ?></h4>
    <div class="back"><?php echo $options_menu[$i]; ?></div>
    <?php
    // start my code below here
    if ($options_name[$i] == "<label class=\"attribsInput\" for=\"attrib-60-285\">Custom Laminate:</label>") {
    ?>
    <br />
    <a href="../../../wilsonart.php" title="Wilson Art">Choose Color!</a>
    <?php
    }
    // end my code.
    ?>

  4. #34
    Join Date
    Aug 2006
    Posts
    35
    Plugin Contributions
    0

    Default Re: A few questions

    Ok If this is safe, I have ti handling everything, can someone please tell me real quick whether this is safe to use or not. It seems to work, I have it going to the other page, passing the url information with it, then coming back onto the page with products carrying that data with it as well, the only other thing I need is to get it to display in the text field, am I on the right track.???

  5. #35
    Join Date
    Aug 2006
    Posts
    35
    Plugin Contributions
    0

    Default Re: A few questions

    Ok everything is done, the whole system is complete but 2 things. I need advice on 2 things now, if someone can.

    1. I need to find out, is the system I showed safe, I think it is, I just want to make sure it won't cause problems later on.

    2. I was also wondering, does anyone have any ideas, how to populate that get query, hopefully without using javascript, I only use javascript for non-functional stuff, it has to be something where the site can still function, so I want to avoid javascript if possible.

  6. #36
    Join Date
    Aug 2006
    Posts
    35
    Plugin Contributions
    0

    Default Re: A few questions

    Ok on both pages I have broken down the code a few times, I know the system almost backwards and forwards for this part, but I still can't seem to figure it out, that area you gave me over there will all that code, I see now is where the text stuff is generated, after going over it like 3-5 times I know the way the system works almost now, but I could probably(after awhile) get it to display what I want, but I don't see how I can later when I get more than one text field, and i need like 3-4 different value fields to display different things based on which attribute, then I will start getting in over my head.

  7. #37
    Join Date
    Aug 2006
    Posts
    35
    Plugin Contributions
    0

    Default Re: A few questions

    or would javascript be safe to use, it's just there are so many people with older browser, or with javascript disabled.

  8. #38
    Join Date
    Aug 2006
    Posts
    35
    Plugin Contributions
    0

    Default Re: A few questions

    Code:
    $tmp_html = '<input type="text" name="id[' . TEXT_PREFIX . $products_options_names->fields['products_options_id'] . ']" size="' . $products_options_names->fields['products_options_size'] .'" maxlength="' . $products_options_names->fields['products_options_length'] . '" value="' . stripslashes($value) .'" id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '" />  ';
    I found this, I know for a fact this is where I can setup something to display what I want. I need to tell it, if it is that attribute, then display $_GET['imgnumber']
    I need to set it in an if statement, so if later on down the road, if I need to, I need to be able to add more if statements, or string them to it, so in time, I will be able to continue to add new values into it? Like if it's one attribute then display this, if it's this attribute display this, then if it's none of those attributes it displays the original there which seems to be stripslashes($value) which I have no idea where it's populating that from, I could pop into that value something like $_GET['imgnumber'] and I think it would work, but then all text fields would be like that, I need it to be that only if that one is present?????

  9. #39
    Join Date
    Aug 2006
    Posts
    35
    Plugin Contributions
    0

    Default Re: A few questions

    uh nevermind, obviously that's not the right one, I tried feeding it a few values and it didn't change it, I have to keep looking, any advice would be appreciated.

  10. #40
    Join Date
    Aug 2006
    Posts
    35
    Plugin Contributions
    0

    Default Re: A few questions

    Code:
    $tmp_html = '<input type="text" name="id[' . TEXT_PREFIX . $products_options_names->fields['products_options_id'] . ']" size="' . $products_options_names->fields['products_options_size'] .'" maxlength="' . $products_options_names->fields['products_options_length'] . '" value="' . htmlspecialchars($tmp_value) .'" id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '" />  ';
    after some more digging I found this one for sure, it's the right one this time, I changed the value inside special chars to just 3, and it appeared within it on the page, now I need to set this up, any advice, would be appreciated.

 

 
Page 4 of 5 FirstFirst ... 2345 LastLast

Similar Threads

  1. A few questions...
    By bendparker in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 21 Oct 2008, 06:17 PM
  2. A few questions
    By vito in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 Aug 2008, 02:00 AM
  3. Few Questions on a few issues.
    By RSprinkel in forum General Questions
    Replies: 6
    Last Post: 10 Mar 2007, 12:02 PM
  4. Few Questions
    By maxpower1998 in forum General Questions
    Replies: 0
    Last Post: 13 Nov 2006, 10:35 AM

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