Jump to content


  • Content count

  • Joined

  • Last visited

Profile Information

  • Real Name
    Rose Camp
  • Gender
  • Location
    Christchurch, NZ
  1. Sorry. I've put this in the wrong thread really!. Moved it to general support. move to new location of post
  2. I have set up a new info box to allow users to see our recommended products for each area of play (i.e. category). At the moment, the box displays all the categories that we will set up recommended products for. I've got the recommended products display working aok. BUT what I can't get to work is... I would like the recommended info box to contain only two links initially, until the second link is selected by the user. e.g. Initially I would like the 'Basic Equipment Recommended...' box on the right to just have two links in it... About the Basic List Recommended List However if they do select 'Recommended List' from the info box, I would like it to expand to list the categories that are flagged to be included on the list. i.e. as is displayed at present. screenshot included... View sample page I want to do this because some users may not want to view the Recommended List, but would rather be able to view the other boxes now quite a way down on the right column. Being a newbie to osCommerce and php I have attacked this various ways and am hitting the wall of my understanding and reading. Just get stumped. * First I tried setting up a global variable $display_recommend_list. If it was not set or not 'y', I would display the two-option version of the infobox. But the global variable seems to get lost/reset on every repaint. * Then I added a field to the Sessions table so that I could store whether the user had selected the Recommended List during this session. But I couldn't seem to get hold of the session id $SID. Half the time is seemed to be blank, or not in the database yet. Just very confusing. * Looked at using a dropdown menu i.e. hover over 'recommended list' would list all the categories. But this would display very differently from the Category /Product List in the left box, so I'm a bit uncertain about trying that. And a bit confused what contribution to use. Any suggestions or pointers out there? I would greatly appreciate it! My lack of understanding of oscommerce and php is showing! Thanks Rose This was the code I was using in my info box to determine what I displayed... *************** // test to display expanded list of categories for the Recommended List or display activate list link if ( (!isset($SID)) && (tep_not_null($SID)) ) { $display_recommend_list = 'n'; } else { // echo "session id is: " . $SID; $session_record = tep_db_query("select display_recommend_list from " . TABLE_SESSIONS . " where sesskey = '" .tep_db_input($SID) . "'"); $want_to_see_recommended_products = tep_db_fetch_array($session_record); $display_recommend_list = trim($want_to_see_recommended_products['display_recommend_list']); } // echo "one. " . '$display_recommend_list'; if ($display_recommend_list == 'n') { $categories_string .= '<a href="' . tep_href_link(FILENAME_RECOMMENDED_LIST) . '">' . BOX_INFORMATION_RECOMMENDED_LIST . '</a><br><br>'; } else { .... display category list *********************
  3. RoseCamp

    -> Php Assignment Symbol?

    It's hard not to feel stupid... but I will ask the question! Why is $messageStack the same as $message? I would have thought that $message->send() was looking for a variable called $messageStack, not $message? Rose
  4. RoseCamp

    -> Php Assignment Symbol?

    Thanks Jack. That has cleared it up a bit for me, but I still can't find the definition for the class message. I have found class messagestack, but I wouldn't have thought that was the same thing. I finally found the definition for the send function too. Don't know how I missed it first time. So where is the $message class defined? or is it assumed, and the -> just tells it to go look for the send function? I have finally found a bit of info in the PHP manual, thanks to your description. http://www.php.net/manual/en/functions.var...e-functions.php Perhaps I just need to ponder on that for a bit. Rose
  5. I am new to coding in PHP and have recently implemented an online store based on osCommerce. There is lots of great code to copy and/or learn from. There are a couple of things that I can't find any info about on the PHP sites or elsewhere.... First thing: The symbol -> is used in various places. It seems to be used to append something to an existing variable. eg. in \includes\functions\general.php, about line 1033... $message->build_message(); $message->send($to_name, $to_email_address etc) Can anyone provide a link to an explanation of the -> symbol, just so I can confirm my assumption /and so I can figure out how I can't find a description for it? Second query: the send() in the above code example. I can't find an explanation of that either. I've searched my osCommerce source code, it doesn't seem to be a osCommerce function. .. Thanks Rose