osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

From account_details.php Tutorial, what does <?php } ?>

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 06-28-2003, 02:59 AM
Lurker
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ComposerDainis
Default From account_details.php Tutorial, what does <?php } ?>

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:

*************************************************
&lt;?php
if (ACCOUNT_STATE == 'true') {
?>
&lt;tr>
&lt;td class="main">&amp;&lt;?php echo ENTRY_STATE; ?>&lt;/td>
&lt;td class="main">&amp;
&lt;?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) . '&amp;' . ENTRY_STATE_ERROR;
} else {
echo tep_draw_input_field('state') . '&amp;' . 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'])) . '&amp;' . ENTRY_STATE_TEXT;
}
?>&lt;/td>
&lt;/tr>

&lt;?php
}
?>

*************************************************

Now, here's my question, the first question for me on this forum! What does the

&lt;?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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 06-29-2003, 11:36 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,092
Thanks: 81
Thanked 348 Times in 327 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

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. If not, put it back.

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


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 06-29-2003, 02:15 PM
Lurker
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ComposerDainis
Default

I guess I'll really need to go deeper here, b/c it looks to me like &lt;?php opens a php statement, and ?> closes one. }{ look like sub section demarkers along with (). But

&lt;?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

&lt;?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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 07:27 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax