Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Purchase Without Account Updated & Admin Functionality


Guest

Recommended Posts

Thanks for your reply Coopco.

 

My current catalog/includes/header.php is as follows:

 

<?php
/*
 $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// check if the 'install' directory exists, and warn of its existence
 if (WARN_INSTALL_EXISTENCE == 'true') {
if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
  $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
}
 }

// check if the configure.php file is writeable
 if (WARN_CONFIG_WRITEABLE == 'true') {
if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
  $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
}
 }

// check if the session folder is writeable
 if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
if (STORE_SESSIONS == '') {
  if (!is_dir(tep_session_save_path())) {
	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
  } elseif (!is_writeable(tep_session_save_path())) {
	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
  }
}
 }

// check session.auto_start is disabled
 if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
if (ini_get('session.auto_start') == '1') {
  $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
}
 }

 if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
if (!is_dir(DIR_FS_DOWNLOAD)) {
  $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
}
 }

 if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
 }
?>
<div class="fixcenter">
<table background="images/header/headbg.gif" width="780" border="0" cellpadding="0" cellspacing="0">
			  <!--DWLayoutTable-->
			  <tr>
				<td height="113" valign="top"><table align="left" width="100%" border="0" cellpadding="0" cellspacing="0">
				  <!--DWLayoutTable-->
				  <tr>
					<td width="375" height="113" valign="top">
						  <img src="images/header/header_01.gif" width="373" height="113" alt=""></td>
			</tr>
			</table></td>
			<td width="163" valign="top">
					<img src="images/header/header_02.gif" width="163" height="113" alt=""></td>
			<td width="244" valign="top"><table align="right" width="100%" border="0" cellpadding="0" cellspacing="0">
			  <!--DWLayoutTable-->
			  <tr>
				<td width="121" height="113" valign="top">
					  <img src="images/header/header_03.gif" width="121" height="113" alt=""></td>
			<td width="123" valign="top">
					<img src="images/header/header_04.gif" width="123" height="113" alt=""></td>
			</tr>
			  </table></td>
			</tr>
			  <tr>
				<td height="38" colspan="3" valign="top"><table align="left" width="131" border="0" cellpadding="0" cellspacing="0">
				  <!--DWLayoutTable-->
				  <tr>
					<td width="122" height="38" valign="top"><a href="<?php echo tep_href_link(FILENAME_DEFAULT); ?>">
						  <img src="images/header/header_05.gif" width="122" height="38" alt="Home" Border="0"></a></td>
			<td width="111" valign="top"><a href="<?php echo tep_href_link(FILENAME_PRODUCTS_NEW); ?>">
					<img src="images/header/header_06.gif" width="109" height="38" alt="" Border="0"></a></td>
			<td width="111" valign="top"><a href="<?php echo tep_href_link(FILENAME_INFORMATION); ?>">
					<img src="images/header/header_07.gif" width="111" height="38" alt="" Border="0"></a></td>
			<td width="109" valign="top"><a href="<?php echo tep_href_link(FILENAME_SPECIALS); ?>">
					<img src="images/header/header_08.gif" width="109" height="38" alt="" Border="0"></a></td>
			<td width="110" valign="top"><a href="<?php echo tep_href_link(FILENAME_ACCOUNT); ?>">
					<img src="images/header/header_09.gif" width="110" height="38" alt="" Border="0"></a></td>
			<td width="110" valign="top"><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>">
					<img src="images/header/header_10.gif" width="110" height="38" alt="" Border="0"></a></td>
			<td width="109" valign="top"><a href="<?php echo tep_href_link(FILENAME_CONTACT_US); ?>">
					<img src="images/header/header_11.gif" width="109" height="38" alt="" Border="0"></a></td>
			</tr>
			</table></td>
		  </tr>
		</table>
<?php
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
<td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>
 </tr>
</table>
<?php
 }

 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table>
<?php
 }
?>

 

I can easily rollback and install a later version if that would be easier?

 

Hi Toby

 

Sorry, only just saw you last post.

 

I am not sure. You could try the below and fiddle with it until you get it right. I Just pasted some extra lines where I would try it.

 

Good Luck

Coopco

 

 

<?php

/*

$Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// check if the 'install' directory exists, and warn of its existence

if (WARN_INSTALL_EXISTENCE == 'true') {

if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {

$messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');

}

}

 

// check if the configure.php file is writeable

if (WARN_CONFIG_WRITEABLE == 'true') {

if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {

$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');

}

}

 

// check if the session folder is writeable

if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {

if (STORE_SESSIONS == '') {

if (!is_dir(tep_session_save_path())) {

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');

} elseif (!is_writeable(tep_session_save_path())) {

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');

}

}

}

 

// check session.auto_start is disabled

if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {

if (ini_get('session.auto_start') == '1') {

$messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');

}

}

 

if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {

if (!is_dir(DIR_FS_DOWNLOAD)) {

$messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');

}

}

 

if ($messageStack->size('header') > 0) {

echo $messageStack->output('header');

}

?>

<div class="fixcenter">

<table background="images/header/headbg.gif" width="780" border="0" cellpadding="0" cellspacing="0">

<!--DWLayoutTable-->

<tr>

<td height="113" valign="top"><table align="left" width="100%" border="0" cellpadding="0" cellspacing="0">

<!--DWLayoutTable-->

<tr>

<td width="375" height="113" valign="top">

<img src="images/header/header_01.gif" width="373" height="113" alt=""></td>

</tr>

</table></td>

<td width="163" valign="top">

<img src="images/header/header_02.gif" width="163" height="113" alt=""></td>

<td width="244" valign="top"><table align="right" width="100%" border="0" cellpadding="0" cellspacing="0">

<!--DWLayoutTable-->

<tr>

<td width="121" height="113" valign="top">

<img src="images/header/header_03.gif" width="121" height="113" alt=""></td>

<td width="123" valign="top">

<img src="images/header/header_04.gif" width="123" height="113" alt=""></td>

</tr>

</table></td>

</tr>

<tr>

<td height="38" colspan="3" valign="top"><table align="left" width="131" border="0" cellpadding="0" cellspacing="0">

<!--DWLayoutTable-->

<tr>

<td width="122" height="38" valign="top"><a href="<?php echo tep_href_link(FILENAME_DEFAULT); ?>">

<img src="images/header/header_05.gif" width="122" height="38" alt="Home" Border="0"></a></td>

<td width="111" valign="top"><a href="<?php echo tep_href_link(FILENAME_PRODUCTS_NEW); ?>">

<img src="images/header/header_06.gif" width="109" height="38" alt="" Border="0"></a></td>

<td width="111" valign="top"><a href="<?php echo tep_href_link(FILENAME_INFORMATION); ?>">

<img src="images/header/header_07.gif" width="111" height="38" alt="" Border="0"></a></td>

<td width="109" valign="top"><a href="<?php echo tep_href_link(FILENAME_SPECIALS); ?>">

<img src="images/header/header_08.gif" width="109" height="38" alt="" Border="0"></a></td>

<td width="110" valign="top"><a href="<?php echo tep_href_link(FILENAME_ACCOUNT); ?>">

<img src="images/header/header_09.gif" width="110" height="38" alt="" Border="0"></a></td>

<td width="110" valign="top"><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>">

<img src="images/header/header_10.gif" width="110" height="38" alt="" Border="0"></a></td>

<td width="109" valign="top"><a href="<?php echo tep_href_link(FILENAME_CONTACT_US); ?>">

<img src="images/header/header_11.gif" width="109" height="38" alt="" Border="0"></a></td>

</tr>

</table></td>

</tr>

</table>

 

<table border="0" width="100%" cellspacing="0" cellpadding="1">

<tr class="headerNavigation">

<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>

<td align="right" class="headerNavigation">  

 

<?php if ((tep_session_is_registered('customer_id')) && (!tep_session_is_registered('noaccount'))) // DDB - PWA - 040622 - no display of logoff for PWA customers

{ ?>

<a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?>

</a>  | 

<?php } ?>

 

<?php if (!tep_session_is_registered('noaccount')) // DDB - PWA - 040622 - no display of account for PWA customers

{ ?>

<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, 'my_account_f=1', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?> </a>  | 

<?php } ?>

 

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>

 |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>  </td>

</tr>

</table>

<?php

 

if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerError">

<td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>

</tr>

</table>

<?php

}

 

if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerInfo">

<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>

</tr>

</table>

<?php

}

?>

Link to comment
Share on other sites

Hi,

 

 

I am having the exact same problem a xao. The 1064 error which I think relates to the fact that the "order_id" in the order_table is not filled. I hope someone can help as I have little experience with databases and hp.

 

Thanks

Link to comment
Share on other sites

Hi,

I am having the exact same problem a xao. The 1064 error which I think relates to the fact that the "order_id" in the order_table is not filled. I hope someone can help as I have little experience with databases and hp.

 

Thanks

Not the same problem, but did either of you run the sql file? Just a thought.

Link to comment
Share on other sites

Yes, but I had to "modify" it to run, which may be the cause of the error.

 

The SQL that came in the instructions was:

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Purchase without account', 'PURCHASE_WITHOUT_ACCOUNT', 'yes', 'Do you allow customers to purchase without an account?', '5', '10', 'tep_cfg_select_option(array(\'yes\', \'no\'), ', now());

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Purchase without account shippingaddress', 'PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING', 'yes', 'Do you allow customers without account to create separately shipping address?', '5', '11', 'tep_cfg_select_option(array(\'yes\', \'no\'), ', now());

 

My database has a configuration_id as the first field in the configuration table, so when I ran that insert code, it gave me an error on the second insert statement saying "ERROR 1062: Duplicate entry '0' for key 1"

 

Once I added in the configuration_id field and assigned them to an open id #, I could get all my pages to load except what I stated above.

 

Is there something else I need to modify, or a different insert statement that I should run to set this up?

 

BTW: I'm using purchase_without_account_1.1.2b

 

Not the same problem, but did either of you run the sql file? Just a thought.
Link to comment
Share on other sites

Yes, but I had to "modify" it to run, which may be the cause of the error.

 

The SQL that came in the instructions was:

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Purchase without account', 'PURCHASE_WITHOUT_ACCOUNT', 'yes', 'Do you allow customers to purchase without an account?', '5', '10', 'tep_cfg_select_option(array(\'yes\', \'no\'), ', now());

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Purchase without account shippingaddress', 'PURCHASE_WITHOUT_ACCOUNT_SEPARATE_SHIPPING', 'yes', 'Do you allow customers without account to create separately shipping address?', '5', '11', 'tep_cfg_select_option(array(\'yes\', \'no\'), ', now());

 

My database has a configuration_id as the first field in the configuration table, so when I ran that insert code, it gave me an error on the second insert statement saying "ERROR 1062: Duplicate entry '0' for key 1"

 

Once I added in the configuration_id field and assigned them to an open id #, I could get all my pages to load except what I stated above.

 

Is there something else I need to modify, or a different insert statement that I should run to set this up?

 

BTW: I'm using purchase_without_account_1.1.2b

No, sorry I can't help. You seem to know more about databases than me anyway. Maybe shoot djmonkey1 a PM?

Link to comment
Share on other sites

I am not sure as to why you two are having problems with PWA I installed it in my test site and then I put in my actaul store which is heavily modified. I dont have any problems. You also shouldnt have modify the sql file the only way this is recomended is if you absolutely know what you are doing. There is a big change that you can ruin your DB.

Link to comment
Share on other sites

Hello,

I am having a slight problem with PWA, I ran into some code from order editor and hoped someone could point me in the right direction.

 

I was almost done installing PWA and ran into this in admin/includes/classes/order.php

 

Zeile 27:

 

$order_query = tep_db_query("select customers_name, .....

 

?ndern zu:

change to:

 

 

$order_query = tep_db_query("select customers_id, customers_name, .....

 

 

BUT, order editor has already altered that line to:

$order_query = tep_db_query("select * from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");

 

 

Can someone help me fix this? I am relatively new to php and OSC. I would also like to know what the "*" stands for in the order editor line.

 

 

Thank you very much,

Todd

Link to comment
Share on other sites

Hi,

 

I've tried installing purchase_without_account_1.1.2b and thought I had done everything correctly but I have run into a slight problem, if I choose to proceed to checkout with creating an account or try to sign up as a new customer (create_account.php), the page is blank, you can see Here

 

I'm not too sure what I have done wrong as I did follow the instructions carefully. Does anyone have any ideas?

Link to comment
Share on other sites

Hi,

 

I've tried installing purchase_without_account_1.1.2b and thought I had done everything correctly but I have run into a slight problem, if I choose to proceed to checkout without creating an account or try to sign up as a new customer (create_account.php), the page is blank, you can see Here

 

I'm not too sure what I have done wrong as I did follow the instructions carefully. Does anyone have any ideas?

Please Note: That should read as in the above quote

Link to comment
Share on other sites

Hello,

I am having a slight problem with PWA, I ran into some code from order editor and hoped someone could point me in the right direction.

 

I was almost done installing PWA and ran into this in admin/includes/classes/order.php

 

Zeile 27:

 

$order_query = tep_db_query("select customers_name, .....

 

?ndern zu:

change to:

$order_query = tep_db_query("select customers_id, customers_name, .....

BUT, order editor has already altered that line to:

$order_query = tep_db_query("select * from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");

Can someone help me fix this? I am relatively new to php and OSC. I would also like to know what the "*" stands for in the order editor line.

Thank you very much,

Todd

 

 

The code from the last line of PWA is the same as the line of code you posted, BACK UP you file replace that line of code and see if all is good. If not try adding an }else{ statement.

Link to comment
Share on other sites

The contrib that I posted wasnt really a contrib The ONLY thing that i had done was put the lines of code where it belongs and saved the file. The rest of the package is the original buy the author before me. No changes where made to any of the SQL files nor the lines of code that is in the text .doc that is included.

 

The 1.1.2b version fixed the typo that was in the original code RodDoc had pointed out to get the full install with no errors use this one

http://www.oscommerce.com/community/contri.../download,12763

from 30MARCH 06

 

I personally use this in my store and have not had one problem with it. I installed it after add about 25-30 other contribs. To see it in action go toMy Store

 

This is a live site so if you place an order you will be billed. With that said, You can go to the login.php and see the PWA box and yes this does work.

 

A common error when the box does not show after install is 1) The sql file was not ran or was not ran correctly 2) The login.php is missing something. However if you installed the above contrib on a fresh osC install There should be 0 zero errors no where. If there is other contribs installed you would then have to customized any changes made to a line of code that needs to have both contribs to work. I am not a programer I just know what works for me. And if I dont know I ask.

 

My motto:

The only dumb question is, the only one not asked.

Link to comment
Share on other sites

Hi matrix,

I am sorry, when I find an answer I like to post the solution so it can help others also.

 

I got a response from someone in the Order Editor forum about the line with the "*" in it( see my post above). The answer was from djMonkey

 

"*" is a wildcard that tells the query to pull every field from the db- just use the "*". and you'll never have to edit that line again.

Link to comment
Share on other sites

I am using PayPal_Shopping_Cart_IPN and have installed PURCHASE WITHOUT ACCOUNT v0.910 November 6, 2005

 

Please can I ask for help on two items

 

ITEM 1

 

The only crossover between the two contributions is in \catalog\checkout_success.php where at or around line 29, both contributions make a change to

 

tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));

 

//begin PWA
//	tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
// Added a check for a Guest checkout and cleared the session - 030411
if (tep_session_is_registered('noaccount')) {
tep_session_destroy();
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL'));
}
else {
tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string, 'SSL'));
}
 }
//end PWA
//begin PayPal_Shopping_Cart_IPN
 tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
  } else if ((isset($HTTP_GET_VARS['action']) && $HTTP_GET_VARS['action'] == 'success')) {
 PayPal_osC::reset_checkout_cart_session();
  }
//end PayPal_Shopping_Cart_IPN

 

I am not sure what PWA is doing but suspect the "Cart_IPN" code is to do with the IPN confirming sucess etc

 

My test envioronment with Paypal sandpit does not support the IPN piece so I am still guessing. However both contributions appear to be working

 

The question is how do I intergrate the above code?

 

ITEM 2

 

Using PWA I notice that cash or cheque purchases only result in the admin area detailing product activity, whilst use of Paypal creates a "customer" entry. The entry does not seem to preclude repeat PWA by the same person and email address

 

Question is this normal and why the difference?

 

Thank you

 

Nossum

Link to comment
Share on other sites

  • 2 weeks later...
Sorry, here are the contribs:

Register Globals Patch

Easy Populate

STS

Attibute Sets

Small Medium Large Images

osCProductListingSelect

 

Onward and upward!

Janet

 

 

Hi Janet,

I see that you have STS & Register Globals Patch working together. I was wondering what you did to get it to work?

 

I first installed the Register Globals Patch v1.4

then I installed the STS v4.1

 

and it says that register globals needs to be on.

 

when i installed Register Globals patch 1.4 again, it hosed the whole thing.

 

can you tell me how you got yours to work?

 

Thanks.

Link to comment
Share on other sites

Hello.

 

I have installed PWA 0.910 since it seems that it is working. But I got a error that occurs.

 

It seems if the customers leave the shop before completing the order they will turn up in the customer database.

 

The problem is that the entry in the customer database apperently blocks further purchasing attemps from the customer until I manually deletes the entry from the customer database.

 

If they completes the order process they get properly deleted and above doesnt happen.

 

Do anybody have a clue why ?

 

Thanks in advance.

 

By the way, this is a super cool contribution - I love it :)

Link to comment
Share on other sites

The contrib that I posted wasnt really a contrib The ONLY thing that i had done was put the lines of code where it belongs and saved the file. The rest of the package is the original buy the author before me. No changes where made to any of the SQL files nor the lines of code that is in the text .doc that is included.

 

The 1.1.2b version fixed the typo that was in the original code RodDoc had pointed out to get the full install with no errors use this one

http://www.oscommerce.com/community/contri.../download,12763

from 30MARCH 06

 

I personally use this in my store and have not had one problem with it. I installed it after add about 25-30 other contribs. To see it in action go toMy Store

 

This is a live site so if you place an order you will be billed. With that said, You can go to the login.php and see the PWA box and yes this does work.

 

A common error when the box does not show after install is 1) The sql file was not ran or was not ran correctly 2) The login.php is missing something. However if you installed the above contrib on a fresh osC install There should be 0 zero errors no where. If there is other contribs installed you would then have to customized any changes made to a line of code that needs to have both contribs to work. I am not a programer I just know what works for me. And if I dont know I ask.

 

My motto:

The only dumb question is, the only one not asked.

Link to comment
Share on other sites

I get the following error in the includes/functions/general.php: "Warning: htmlspecialchars() expects parameter 1 to be string, array given"

I have checked this file for errors and the instructions but can not find anything. Does anyone have any suggestions?

 

Thanks

Link to comment
Share on other sites

I dont recal PWA using any HTML functions at all. If this is the only contrib you have installed the general.php file is simply a drop in place. Im not saying that PWA didnt cause this error Im just saying that it doesnt sound like a PWA error. If there was other contribs installed look for the changed code and this is what you should have in the funtions/general.php around line 499

function tep_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n") {
// Ingo PWA Beginn
if ($customers_id == 0) {
  global $order;
  if ($address_id == 1) {
	$address = $order->pwa_label_shipping;
  } else {
	$address = $order->pwa_label_customer;
  }
} else {
  $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);
} // Ingo PWA Ende
$format_id = tep_get_address_format_id($address['country_id']);

return tep_address_format($format_id, $address, $html, $boln, $eoln);
 }

 

Hope this helps

 

Eric

Link to comment
Share on other sites

I also have the error that does not show the delivery address. The line that causes the string error is 42. It is part of the standard install. I think it has something to do with parsing. I have added 2 contributions-- this one and the more pics. This is using PWA_1.1.1b download. Does anyone have any suggestions?

Link to comment
Share on other sites

I also have the error that does not show the delivery address. The line that causes the string error is 42. It is part of the standard install. I think it has something to do with parsing. I have added 2 contributions-- this one and the more pics. This is using PWA_1.1.1b download. Does anyone have any suggestions?

 

Make sure that in includes/functions/general.php on aprox. line 42 it looks like this

// Ingo PWA Beginn
if ($customers_id == 0) {
  global $order;
  if ($address_id == 1) {
	$address = $order->pwa_label_shipping;
  } else {
	$address = $order->pwa_label_customer;
  }
} else {
  $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);
} // Ingo PWA Ende

 

There was a typo in the code where customers_id ==o was customer_id ==0 this was resolved in 1.1.2b

 

Hope this helps

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.

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