This is a discussion on From account_details.php Tutorial, what does <?php } ?> within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi, I'm new around here, and I hope that the forum will accept my "newbie" stage, as I get accustomed ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi, I'm new around here, and I hope that the forum will accept my "newbie" stage, as I get accustomed to what types of questions are appropriate for this forum. If I make any mistakes, just let me know! Here's my first question. I'm new to php, so it would be great, if someone could point me in the right direction (tutorials, explanations, etc.) So, from the Mod Guide Chapter 3 Practice Exercises, I changed the order of the address items to: City, State, Post Code, and Country. And it works, see: http://bloomfront.com/purchase/default.php! Now, this may seem like a trivial question, but I'm thinking that I can avoid some problems later on down the line if I ask now. Here's the code that I moved to move the position of State: ************************************************* <?php if (ACCOUNT_STATE == 'true') { ?> <tr> <td class="main">&<?php echo ENTRY_STATE; ?></td> <td class="main">& <?php $state = tep_get_zone_name($country, $zone_id, $state); if ($is_read_only == true) { echo tep_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], $account['entry_state']); } elseif ($error == true) { if ($entry_state_error == true) { if ($entry_state_has_zones == true) { $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . tep_db_input($country) . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo tep_draw_pull_down_menu('state', $zones_array) . '&' . ENTRY_STATE_ERROR; } else { echo tep_draw_input_field('state') . '&' . ENTRY_STATE_ERROR; } } else { echo $state . tep_draw_hidden_field('zone_id') . tep_draw_hidden_field('state'); } } else { echo tep_draw_input_field('state', tep_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], $account['entry_state'])) . '&' . ENTRY_STATE_TEXT; } ?></td> </tr> <?php } ?> ************************************************* Now, here's my question, the first question for me on this forum! What does the <?php } ?> do? Does it need to be below the STATE information, or is it something that needs to be above certain code? Should I have left it above the COUNTRY info? I could do a test and just move it up and down in the file and see what happens, but I'd rather ask. There's one after GENDER or before ENTRY_FIRST_NAME in the original account_details.php file, but I don't know which, so I'm not sure how to move things around. OK, that's it, I may have missed something very simple, so I thought I'd ask. Looking forward to participating at oscdox.com. Sincerely, Dainis |
| Sponsored Links | ||
| ||
|
#2
| ||||
| ||||
| That just opens and closes a php statement. The easiest way to see what happens when you remove something is to remove it, and test your cart. If everything works fine, move on. I know it sounds simplistic, but sometimes trial and error is the best teacher. In this case, just leave it be, since everything is working.
__________________ Michael Sasek osCMax Developer
|
|
#3
| |||
| |||
| I guess I'll really need to go deeper here, b/c it looks to me like <?php opens a php statement, and ?> closes one. }{ look like sub section demarkers along with (). But <?php } ?> all by itself, to me, at this time, looks like an empty piece of useless code. Aha, unless it's some kind of insertion of the } into the php code. I wonder if there's a <?php { ?> above it somewhere? With regard to "leaving it be," I already didn't do that when I did the practical exercise -- I needed to choose whether to bring that piece of code along with the code for STATE (leaving it BELOW state), or whether to leave it ABOVE whatever it was above, I can't remember what that was right now. At any rate, thanks for the tip. I'll be on the lookout and prowl for further info. --Dainis |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Were is the tutorial on adding new boxes For version 2? | badadz | osCMax v2 Features Discussion | 0 | 10-18-2005 01:09 AM |
| Tutorial on Setting Up PayPal IPN for osCMax v2.0/v1.7 | uli_nyc | Paypal | 7 | 10-15-2005 11:52 AM |
| osCMax dynamic meta tag tutorial | michael_s | osCMax v1.7 Discussion | 0 | 01-12-2005 12:10 PM |
| htmlarea / WYSIWYG Editor 1.7 a tutorial, or a guide? | prot | osCMax v1.7 General Mods Discussion | 7 | 06-28-2004 03:43 PM |
| Remove Country DropDown in account_details.php | Petter | osCommerce 2.2 Modification Help | 10 | 05-10-2004 01:20 AM |