Jump to content
Sign in to follow this  
bmcewan

Purchase Without Account Updated & Admin Functionality

Recommended Posts

Greg,

 

How would this work with the new Paypal IPN 2.8??

 

David

 

 

 

Hi Safoo,

 

In checkout_paypalipn.php:

 

put something like:

 

if (tep_session_is_registered('noaccount')) $paypal_custom_var = 'custom=pwa&';

 

Now amend the paypalipn_v0.981 url used to regretably redirect the customer to PayPal via the GET method whence they could easily change the price of the items being purchased, to

Now in paypal_notify.php change

EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $item_number, 'SSL', false) . "\n" .

To:

((isset($_POST['custom']) && $_POST['custom'] == 'pwa' ) ? '' : EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $item_number, 'SSL', false) . "\n") .

In the above the PayPal custom var parameter passed to PayPal which PayPal then returns back to the IPN script.

 

JaBevan, there is an important update to the PPSCIPN contrib required change the sendto and billto fields types in the orders_session_info db table from tinyint(1) to int(11) otherwise as soon as you get more than 127 customers your confirmation emails will not contain the relevant billing and shipping addresses.

Share this post


Link to post
Share on other sites
Greg,

 

How would this work with the new Paypal IPN 2.8??

 

David

 

Duh. Nevermind. This is what I get for coding without enough coffee or sleep. Didn't find paypal_notifiy.php because I was in the wrong directory.

 

Added it in - thanks!

Share this post


Link to post
Share on other sites
How can I change the width of the box tables in order_info.php? I'd like to set the width to 100%. I've changed all of the width parameters in order_info.php and order_info_check.php, but still only get a width of about 75%. You can see what Im talking about using this link.

 

Anybody?

Share this post


Link to post
Share on other sites

if you are getting FILENAME_COOKIE_USAGE means a language file got mangled somewhere,

search in your catalog/includes/filenames.php on or about line 35, to see if the definition is there.


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

 

It's because the "Required..." phrase is messed up. Here's some code I fixed today to fix this problem. Note, don't use this exact code, just use the general layout):

 

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
     <tr>
         <td class="main"><b><?php echo CATEGORY_ADDRESS; ?></b></td>
         <td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td>
     </tr>
</table></td>

Share this post


Link to post
Share on other sites
It's because the "Required..." phrase is messed up. Here's some code I fixed today to fix this problem. Note, don't use this exact code, just use the general layout):

 

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

    <tr>

        <td class="main"><b><?php echo CATEGORY_ADDRESS; ?></b></td>

        <td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td>

    </tr>

</table></td>

 

Which file did you modify?

Share this post


Link to post
Share on other sites

Hi All -

 

PWA works great! Thanks for all the hard work, everyone!

 

I want to try it with a twist now: I'd like to hide the account functionality altogether, and see how sales are affected by not even offering an account option. In other words, when someone hits "checkout" I want them to simply see the content on "Order_Info.php" (to fill in their name and address info).

 

I tried simply changing the URL to "Checkout" to go to Order_Info.php, but clicking "submit" from there after filling in the form simply reloads the Order_Info.php, without keeping any of the data entered.

 

Can anyone suggest what I can do to accomplish my objective?

 

Thanks,

 

- James

Share this post


Link to post
Share on other sites

Hello,

How I make to ran the sql script to create the 'purchased_without_account' field in the orders table?

I have error : 1054 - Unknown column 'purchased_without_account' in 'field list' and sure this is the problem...

Thank,

Anibal

Share this post


Link to post
Share on other sites

Hi there,

 

Hoping someone can shed some light on this error. When trying to edit or delete a user signed up with PWA I get

 

Warning: reset(): Passed variable is not an array or object in /Library/Apache2/htdocs/catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /Library/Apache2/htdocs/catalog/admin/includes/classes/object_info.php on line 18

 

Accounts signed up via the standard osC method edit and delete fine.

 

Can someone point me at what might be going on here?

 

Thanks much!

Iggy


Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites

Checkout_proccess.php has no comments in it to indicate what changes were made for the PWA contributions. Are the changes clearly made in the other files? some have comments in them, but I don't want to take those at face value. diff won't work for me as my existing code has so many changes in it.

 

Mocara.

Share this post


Link to post
Share on other sites

I tried to install this contribution and ran into the following problems. Can someone tell me how to fix them?

 

First I backed up the database and modified the files and uploaded them. I then modified the database using PHPMYADMIN, as suggested in the instructions. I added/edited the files as suggested in the instructions, then uploaded everything. Then I went to www.mysite.com/catalog/default.php to try to see if the installation had worked but I had the following error message:

 

Fatal error: Call to a member function on a non-object in /mysite.com/catalog/includes/header.php on line 16

 

My site (www.mysite.com/catalog/default.php) wouldn't come up in my web browser due to this message so then I figure I'd restore the database using the backup file I'd created earlier. I was still able to get to the admin section to try to do the restore. When trying to do the restore something went wrong and I got an error message. Now none of the pages in my site works. This is the error message I get no matter what page I try to go within the site:

 

1146 - Table 'happyjoyjoy.configuration' doesn't exist

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

Every single page on my site gives me the above message.

I don't want to do a fresh install of oscommerce because I've already spent so much time working on the catalog and catalog entries. How do I fix this? Can someone please help.

Edited by simplyme

Share this post


Link to post
Share on other sites
you are running ms1 if you have default.php so you will probably have to make modifications to make it work.

 

Okay I restored using PHPMYADMIN. Now to get rid of the error message are you saying I should change the default.php to index.php since I'm using ms1 ?

Share this post


Link to post
Share on other sites

I installed PWA to my active oscommerce. I got this error. Can anyone help me with this?

 

1054 - Unknown column 'purchased_without_account' in 'field list'

 

select customers_id, purchased_without_account, customers_firstname, customers_password, customers_email_address, customers_default_address_id from customers where upper(customers_email_address) = 'MAIL@MAIL.COM' and upper(customers_firstname) = 'FIRSTNAME' and upper(customers_lastname) = 'LASTNAME'

 

[TEP STOP]

Share this post


Link to post
Share on other sites

Does this contribution work on MS1? I'm using ms1. I get the following error message when I go the www.mysite.com/catalog/default.php

 

Fatal error: Call to a member function on a non-object in /home/htdocs/user/file/here/mysite.com/catalog/includes/header.php on line 16

 

I tried changing the default.php to index.php by modifying the application_top.php file but I still got the same error message. How do I fix this?

Share this post


Link to post
Share on other sites

Hi All -

 

PWA 0.80 works great with Ms2.2 ! Great Contribution!

 

only one question (excuse my bad english)

 

an order with an account will be send to the customer under the e-mail adress of the shop. Thats OK

 

but if sombody makes an order with PWA, no account, he will get the mail from the root of the server: For example:

Order

wwwrun@xxxxxxxxxxx.pureserver.info

 

if an custumer use just a fake e-mail adress, the "Mail Delivery System" will sent to wwwrun@xxxxxxxxxxx.pureserver.info and thats the root of the server and in most cases it will find its way to nirvana ......

 

that?s the problem, how could I fix it? I think it is a problem of the modificated checkout_process.php, but my php knowledge is no the best ... :'(

 

thanks for your help

 

Mark

Share this post


Link to post
Share on other sites

if a registered customer uses a fake email address you get the same thing. it is not limited to PWA. kind of tough to keep people from using a fake address.


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

Hi all

I've read through large portions of this thread, and I'm preparing to install this contribution on osc MS2 that already has nochex apc and paypal IPN 2.8 installed.

 

I'm a little confused by the instructions and I wonder if anyone could clarify for me the successful approach - the instructions say

These 4 files exist in stock OSC, so if you do not want to overwrite them, look for the differences compared to your files:

 

/catalog/checkout_process.php

/catalog/checkout_success.php

/catalog/login.php

/catalog/create_account.php

/catalog/includes/header.php

/catalog/includes/filenames.php

/catalog/includes/languages/english.php

/catalog/includes/languages/english/login.php

/catalog/admin/orders.php

 

Then all of those files are supplied in the package, presumably for upload, but 5 of them later in the instructions then have line changes to be made manually.

 

Just wondered if anyone can clarify whether all the nine files need to be uploaded, or what they've done that has worked.

 

Thanks

 

Jax

Share this post


Link to post
Share on other sites

4..Typo error. All files are delivered and must be updated for this contribution.

 

In case you have a plain OSC installation, you can replace your files with these ones but in most cases you must use a tool like Winmerge or Beyond Compare to compare these files with your OSC files and make the necessary changes.

 

Often with OSC contributions, people include the changed files *.php plus indicate in the readme.txt what changes have to be done.

 

It is all the same, just be very careful not screwing about your OSC installation if it has been customised. ALWAYS take backups of the files you must change.

 

Good luck !

 

Didier.

Share this post


Link to post
Share on other sites

I'm hoping someone can help me. I have a client that wants to use the NO ACCOUNT features... in other words, no option of creating an account. I, therefore, downloaded the older version of the contribution.

 

I made some modifications to my login.php file to get rid of include errors, but now I'm getting a PARSE ERROR on my order_info.php

 

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/smdwynne/public_html/Order_Info.php on line 21

 

I don't know enough about straight programming to find this error and I'm hoping that someone can look at the code and tell me where I'm missing my jot or tiddle.

<?php
/*
 $Id: Order_Info.php,v 0.52 2002/09/21 hpdl Exp $
by Cheng

OSCommerce v2.2 CVS (09/17/02)

  Modified versions of create_account.php and related
 files.  Allowing 'purchase without account'.

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

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

 require(includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT);

 $breadcrumb->add('Order Info', tep_href_link('Order_Info.php', '', 'SSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (getenv(HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="Order_Info_v0.52/stylesheet.css">
<?php require(includes/form_check.js.php'); ?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><form name="account_edit" method="post" <?php echo 'action="' . 
tep_href_link('Order_Info_Process.php', '', 'SSL') 
. '"'; ?> onSubmit="return check_form();"><input type="hidden" name="action" value="process"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <!--tr>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
           <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr//-->
       </table></td>
     </tr>
<?php
 if (sizeof($navigation->snapshot) > 0) {
?>
     <tr>
       <td class="smallText"><br><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></td>
     </tr>
<?php
 }
?>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td>
<?php
 $email_address = tep_db_prepare_input($HTTP_GET_VARS['email_address']);
 $account['entry_country_id'] = STORE_COUNTRY;

 require(DIR_WS_MODULES . 'Order_Info_Check.php');
?>
       </td>
     </tr>
     <tr>
       <td align="right" class="main"><br><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
     </tr>
   </table></form></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Thanks,

 

Tina

Share this post


Link to post
Share on other sites

Found my own error, and the one after it. I'm stuck on this one though

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/smdwynne/public_html/includes/functions/database.php:13) in /home/smdwynne/public_html/includes/functions/database.php on line 13

 

Anybody have any ideas? I believe I followed the read-me and put the files where they belong.

 

Thanks again,

 

Tina

Share this post


Link to post
Share on other sites

Hello Tina,

 

I had a quick look but I cannot find the reason for it. Searching for this message in the OSC forum, it seems to be linked to a wrong installation or some trailing spaces at the end of the php files. Do a search for your error..it is a common one but I never got it (wow..i'm sure that I will have this error in the coming hour..aaarrggg...Murphy's law of course)

 

Didier.

Share this post


Link to post
Share on other sites

I resolved my error by chaning the filename information to point directly to Order_Info.php rather than going through login.php. It's not a true fix, simply a bypass, but it works for me.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×