Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Missing Addresses - Get Only A Comma


Guest

Recommended Posts

I'm not 100% sure my issue is related to the PWA contribution, but I decided to post here just in case.

 

I am using PWA on my site. I've been tinkering with it lately to get it to work. I noticed in my initial installation of PWA that a couple lines of code where left out. I was excited to realize that the oversights may have been the cause of my problems. Overall, I think I have PWA working finally. However, I have only one problem that I know of now. When I choose the option to checkout out as a guest, I get a single comma in the address sections (near the arrow_south_east.gif) during the checkout process.

 

I'd be extremely grateful for anyone's assistance on this issue. It's the only issue during the three months that I have been designing my site that I have not been able to figure out on my own. I am really stuck this time.

 

Brianne

Link to comment
Share on other sites

I'm not 100% sure my issue is related to the PWA contribution, but I decided to post here just in case.

 

I am using PWA on my site. I've been tinkering with it lately to get it to work. I noticed in my initial installation of PWA that a couple lines of code where left out. I was excited to realize that the oversights may have been the cause of my problems. Overall, I think I have PWA working finally. However, I have only one problem that I know of now. When I choose the option to checkout out as a guest, I get a single comma in the address sections (near the arrow_south_east.gif) during the checkout process.

 

I'd be extremely grateful for anyone's assistance on this issue. It's the only issue during the three months that I have been designing my site that I have not been able to figure out on my own. I am really stuck this time.

 

Brianne

url would help.

Link to comment
Share on other sites

url would help.

 

 

Sorry... the site is still in test mode, but I do temporarily have it up in live mode. Try www.basketscene.com.

 

Thanks for your response.

 

Brianne

Link to comment
Share on other sites

Sorry... the site is still in test mode, but I do temporarily have it up in live mode. Try www.basketscene.com.

 

Thanks for your response.

 

Brianne

Nice site.

 

One of your files has

<TD class=main vAlign=top><BR><BR>, <BR></TD>

 

It may be an information box, or a language file.

Link to comment
Share on other sites

Nice site.

 

One of your files has

<TD class=main vAlign=top><BR><BR>, <BR></TD>

 

It may be an information box, or a language file.

 

 

Actually, I noticed that also when I was performing my initial research on this issue. However, after referring to the code in the checkout_shipping file, I couldn't resolve the issue simply by reviewing the php code. I'm sure it's a matter of not understanding the code because I am not a php programmer. Anyway, below is the code in question. Maybe you can detect the error better. It may have something to do with the PayPal code. Thanks again for your help.

 

<tr>
                   <td class="main" align="center" valign="top"><?php echo '<b>' . TITLE_SHIPPING_ADDRESS . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
<? //---PayPal WPP Modification START ---//-- ?>
<?php 
		if ($ec_checkout && $ec_enabled) { 
			$paypal_ec_payer_info = $_SESSION['paypal_ec_payer_info'];
			$address_label = $paypal_ec_payer_info['payer_firstname'] . ' ' . $paypal_ec_payer_info['payer_lastname'] . '<br>';
			if ($paypal_ec_payer_info['payer_business']) $address_label .= $paypal_ec_payer_info['payer_business'].'<br>';
			$address_label .= $paypal_ec_payer_info['ship_street_1'] . '<br>';
			if ($paypal_ec_payer_info['ship_street_2']) $address_label .= $paypal_ec_payer_info['ship_street_2'].'<br>';
			$address_label .= $paypal_ec_payer_info['ship_city'] . ', ' . $paypal_ec_payer_info['ship_state'] . '  ' . $paypal_ec_payer_info['ship_postal_code'] . '<br>';
			$address_label .= $paypal_ec_payer_info['ship_country_name'];
?>
                   <td class="main" valign="top"><?php echo $address_label; ?></td>
<?php } else { ?>
                   <td class="main" valign="top"><?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?></td>
<?php } ?>
<? //---PayPal WPP Modification END ---//-- ?>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
               </table></td>
             </tr>

Link to comment
Share on other sites

Actually, I noticed that also when I was performing my initial research on this issue. However, after referring to the code in the checkout_shipping file, I couldn't resolve the issue simply by reviewing the php code. I'm sure it's a matter of not understanding the code because I am not a php programmer. Anyway, below is the code in question. Maybe you can detect the error better. It may have something to do with the PayPal code. Thanks again for your help.

 

<tr>
                   <td class="main" align="center" valign="top"><?php echo '<b>' . TITLE_SHIPPING_ADDRESS . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
<? //---PayPal WPP Modification START ---//-- ?>
<?php 
		if ($ec_checkout && $ec_enabled) { 
			$paypal_ec_payer_info = $_SESSION['paypal_ec_payer_info'];
			$address_label = $paypal_ec_payer_info['payer_firstname'] . ' ' . $paypal_ec_payer_info['payer_lastname'] . '<br>';
			if ($paypal_ec_payer_info['payer_business']) $address_label .= $paypal_ec_payer_info['payer_business'].'<br>';
			$address_label .= $paypal_ec_payer_info['ship_street_1'] . '<br>';
			if ($paypal_ec_payer_info['ship_street_2']) $address_label .= $paypal_ec_payer_info['ship_street_2'].'<br>';
			$address_label .= $paypal_ec_payer_info['ship_city'] . ', ' . $paypal_ec_payer_info['ship_state'] . '  ' . $paypal_ec_payer_info['ship_postal_code'] . '<br>';
			$address_label .= $paypal_ec_payer_info['ship_country_name'];
?>
                   <td class="main" valign="top"><?php echo $address_label; ?></td>
<?php } else { ?>
                   <td class="main" valign="top"><?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?></td>
<?php } ?>
<? //---PayPal WPP Modification END ---//-- ?>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
               </table></td>
             </tr>

 

 

 

Thank you for making think a little harder about this one. It looks like I figured it out. Your response made me take a deeper look into the php code and the tep_address_label function. Recognizing that the function in question is defined in the includes/functions/general.php file, I went there to investigate. It appears that when installing PayPal WPP with PWA, PayPal made an error in terms of not deleting a piece of code (or alternately, duplicating a piece of code). For those of you who have come across this problem, hear is the correction:

 

In the includes/functions/general.php, go to approximately line 495 (where the tep_address_label id defined) and delete the following duplicate piece of code.

 

    $address_query = tep_db_query("select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customers_id . "' and address_book_id = '" . (int)$address_id . "'");
   $address = tep_db_fetch_array($address_query);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...