Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Purchase Without Account Updated & Admin Functionality


Guest

Recommended Posts

Hi Fredrik,

Not good news, sorry. I finally removed the print button on the checkout success page, because of this. Nothing more irritating than a web page that does not function properly.... In case you did not follow all the rest of the talks on this subject...

 

As I understand it, the customer must have a running session that matches the order they are requesting, at the time the printout is requested, or they will be sent to the login page.

This is a security measure put in place to keep somebody from entering various order numbers and finding out all the info on those orders.

With PWA, the session has to be destroyed when the order is completed.

Since the "session" is destroyed when they hit that page, they cannot view any order.

The only idea I saw was to have the session destroyed upon clicking the continue button, but that is not a good idea either, because what if they don't click continue, but choose another of the various links on the page? No session destroy.

 

Apparently, there is no way to time the session destroy, so that it can wait 5 or 10 minutes, either. That would be the ideal, plenty of time to print an order.

 

I am at a loss, just learning php and have had a few issues with PWA, although I feel it is a great contribution.  I would just like to get these two to work together, if possible.

 

Anyway, Fredrik, if you have any thoughts or come up with a solution, please post here, as I think there are quite a few of us with the print order contribution that need a solution.

 

Peace,

Erin :)

 

 

Erin, Fredrik,

 

Did you find out a solution to this problem?

 

I have the same problem. Cutomers using PWA at the Confirm Order (at the end of check out) click on "Print Order" it takes them to the Login Page. Why?

 

There has to be a fix!

 

Any help would be greatly appreciated.

 

Pete

Link to comment
Share on other sites

Erin, Fredrik,

 

Did you find out a solution to this problem?

 

I have the same problem. Cutomers using PWA at the Confirm Order (at the end of check out) click on "Print Order" it takes them to the Login Page. Why?

 

There has to be a fix!

 

Any help would be greatly appreciated.

 

Pete

 

Hi Pete,

The customer goes to the login page, because the session is destroyed on checkout success. It is important that the session is destroyed for security reasons.

 

I never did find a solution, but there is one possibility. You could put an IF statement on the print order button, so that the button is only shown to those customers that are registered. I think somebody mentioned that earlier, but cannot recall.

 

I just removed my print button from the success page, but kept it in the account page.

After I finish rebuilding my online inventory (at least 3 weeks), I will most likely add the if statement, so that the button is only shown to registered customers. At least that would take care of half the problem and add something positive to the checkout experience.

I don't know what code is actually needed and my php skills are not so hot, yet. That is why I can only offer a hint at a solution. When I get it to work for me, I will be happy to post my solution here. As I said that will be several weeks from now.

 

Hope this helps you.

 

On another note:

I have modified my PWA quite a bit and even regular customers can use it, if they want. The only problem with that is when they go to log into their account, after using pwa, they have to get a new password, because their current password is no longer recognized. Not quite sure why that happens, but it is a only a minor irritation and not many people who are registered customers are going to use pwa when they have to retype all the information that is normally in their account. I just wanted them to have that option.

If anyone knows a way around this, I would love to hear about it.

 

Peace,

Erin :D

Link to comment
Share on other sites

Is everyone aware that even without the print order function installed, that when a registered user clicks continue on the Checkout Success page that it takes them to the login page? :'( This does not happen when a PWA is used to purchase. I would like that changed as well.

 

Thanks,

Rick

Edited by RGStephens
Link to comment
Share on other sites

Well thats weird, when i checkout with a PWA account the print order page comes up fine? and when i click continue it redirects me to the login page as usual, am i missing something?

 

Danny

 

EDIT: OhhhI see what your saying, i can put another order number as the link and it can spit any order.........thats not good.

Edited by computerwiz5
Link to comment
Share on other sites

I never did find a solution, but there is one possibility. You could put an IF statement on the print order button, so that the button is only shown to those customers that are registered. I think somebody mentioned that earlier, but cannot recall.

 

Adding to that you can have some text for the PWS customer saying you can print out an invoice through the automated email you just recieved.????

 

Danny

Link to comment
Share on other sites

Well thats weird, when i checkout with a PWA account the print order page comes up fine? and when i click continue it redirects me to the login page as usual, am i missing something?

 

Danny

 

EDIT:  OhhhI see what your saying, i can put another order number as the link and it can spit any order.........thats not good.

 

I believe that is the point....A PWA should not go to a login page....in fact nobody should be directed to a login page after clicking either continue or print order from the checkout success, it should direct them to the catalog top page. Am I wrong about this?

 

Rick

Link to comment
Share on other sites

Then my checkout_success page must be different than yours.  Can you post the code that adds the PWA functionality to your checkout_success page so I can compare it to mine?  It should be around line 30 (I think)

 

Thanks,

 

Rick :)

 

Here you go man:

 

<?php
/*
 $Id: checkout_success.php,v 1.49 2003/07/24 23:03:53 Strider Exp $
 $Id: checkout_success.php,v 1.49 2003/06/09 23:03:53 hpdl Exp $
 $Id: checkout_success.php,v 1.6.2.1 2003/05/03 23:41:23 wilt Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

// if the customer is not logged on, redirect them to the shopping cart page
 if (!tep_session_is_registered('customer_id')) {
   tep_redirect(tep_href_link(FILENAME_DEFAULT));
 }

 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'update')) {
   $notify_string = 'action=notify&';
   $notify = $HTTP_POST_VARS['notify'];
   if (!is_array($notify)) $notify = array($notify);
   for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
     $notify_string .= 'notify[]=' . $notify[$i] . '&';
   }
   if (strlen($notify_string) > 0) $notify_string = substr($notify_string, 0, -1);

//    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')); 
}
 }

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

 $breadcrumb->add(NAVBAR_TITLE_1);
 $breadcrumb->add(NAVBAR_TITLE_2);

 $global_query = tep_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "'");
 $global = tep_db_fetch_array($global_query);

 if ($global['global_product_notifications'] != '1') {
   $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int)$customer_id . "' order by date_purchased desc limit 1");
   $orders = tep_db_fetch_array($orders_query);

   $products_array = array();
   $products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$orders['orders_id'] . "' order by products_name");
   while ($products = tep_db_fetch_array($products_query)) {
     $products_array[] = array('id' => $products['products_id'],
                               'text' => $products['products_name']);
   }
 }
 
// PWA:  Added a check for a Guest checkout and cleared the session - 030411 v0.71
if (tep_session_is_registered('noaccount')) {
$order_update = array('purchased_without_account' => '1');
tep_db_perform(TABLE_ORDERS, $order_update, 'update', "orders_id = '".$orders['orders_id']."'");
//  tep_db_query("insert into " . TABLE_ORDERS . " (purchased_without_account) values ('1') where orders_id = '" . (int)$orders['orders_id'] . "'");
tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . tep_db_input($customer_id) . "'");
tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . tep_db_input($customer_id) . "'");
tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . tep_db_input($customer_id) . "'");
tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . tep_db_input($customer_id) . "'");
tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . tep_db_input($customer_id) . "'");
tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . tep_db_input($customer_id) . "'");
tep_session_destroy();
}

?>
<!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 (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=650,height=500,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>
</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"><?php echo tep_draw_form('order', tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="4" cellpadding="2">
         <tr>
           <td valign="top"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE); ?></td>
           <td valign="top" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?><div align="center" class="pageHeading"><?php echo HEADING_TITLE; ?></div><br><?php echo TEXT_SUCCESS; ?><br><br>
<?php
 if ($global['global_product_notifications'] != '1') {
   echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">';

   $products_displayed = array();
   for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
     if (!in_array($products_array[$i]['id'], $products_displayed)) {
       echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>';
       $products_displayed[] = $products_array[$i]['id'];
     }
   }

   echo '</p>';
 } else {
   echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;
 }
?>
           <h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td>
         </tr>
       </table></td>
     </tr>
<?php // ###### Added CCGV Contribution #########
require('add_checkout_success.php'); //ICW CREDIT CLASS/GV SYSTEM 
// ###### Added CCGV Contribution ######### ?>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr> 
       <td align="left" class="main"><?php echo '<a href="javascript:popupWindow(\'' .  (HTTP_SERVER . DIR_WS_CATALOG . FILENAME_ORDERS_PRINTABLE) . '?' . (tep_get_all_get_params(array('order_id')) . 'order_id=' . $HTTP_GET_VARS['order_id']) . '\')">' . tep_image_button('button_printorder.gif', IMAGE_BUTTON_PRINT_ORDER) . '</a>'; ?></td>
       <td align="right" class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
             </tr>
           </table></td>
           <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
           <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
           <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
               <td width="50%"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
             </tr>
           </table></td>
         </tr>
         <tr>
           <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
           <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
           <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
           <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
         </tr>
       </table></td>
     </tr>
<?php if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php'); ?>
   </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'); ?>

Link to comment
Share on other sites

Can't see anything different other than you have included code for the Gift Voucher mod.

 

So when you do a regular purchase and check out, after getting the checkout_succes screen, are you saying that you can hit the continue button and go directly to Catalog top? If your mod does that then the problem with me going to the login is being caused by something else.

 

Sure would like to identify this. :huh:

 

Rick

Link to comment
Share on other sites

Another thing I would like to fix is the Login_PWA_Optional.php code that puts the 3 options side by side instead of stacked. When mine loads up the option to proceed directly to checkout is musch skinnier than the other two. They are not equally sized. There is also an an area of gray on the bottom of the login and create account which I would like to get rid of. Anybody know how to fix this?

 

Rick :'(

Edited by RGStephens
Link to comment
Share on other sites

The mistery is solved as to why I get directed to the Login screen after checkout success. The issue is not in the PWA code after all, nor is it in the checkout success code. In my code and also in yours, computerwiz5, the Continue button directs us to a variable called FILENAME_DEFAULT. When you look up this variable in Filenames it point to index.php just like you would expect. So why wasn't I going to index.php and instead login? The answer lies in index.php. There is an include in index.php which loads application_top.php. This is the culprit.

 

When the code goes back to application_top.php there are several places where conditions are checked and then it gets redirected to, you guessed it login.php.

 

So to correct the issue I have changed the variable FILENAME_DEFAULT in checkout_success to a new variable called FILENAME_SHOPPING_CART. This does not send it to the index page but instead to the empty shopping cart page. More logical than the login page.

 

Hope this helps somebody else out there. Now I can go on to something else. This one was killing me.

 

Computerwiz5, thanks for providing your code, it helped to start narrowing the problem for me. Perhaps you could post your includes/application_top.php when you get time and I'll see what exactly is causing me to go wrong and you to go to the correct page. I'm pretty sure it is contribution I have installed. Anyway, I would still like to go to the index page but for now this works.

 

Rick

Link to comment
Share on other sites

I am having problems with printorder now? Can anyone help me?

 

Thanks

Danny

 

 

What is wrong with Print Order? I found it to be in conflict with Shipping Status and you said you had that module in. If so, that could be the issue right there.

 

BTW did you look at my configure.php yet?

 

Rick

Link to comment
Share on other sites

Hi,

i have installed PWA v0.81 (including PWA straight to checkout) on OSC 2.2.

 

Everthing works fine expect one thang: When a customer orders something he will be asked during shopping process after his email & telephone number (so far so good). When i get the email confirmation that this customer ordered items from my shop i cant see his email adress & telephone number in the confirmation mail, so it is complicated to contact the customer later on.

 

here is my code from checkout_process.php:

 

// lets start with the email confirmation

// DDB - 041103 - Add test for PWA : no display of invoice URL if PWA customer

if (!tep_session_is_registered('noaccount'))

{

$email_order = STORE_NAME . "\n" .

EMAIL_SEPARATOR . "\n" .

EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

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

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

if ($order->info['comments'])

{

$email_order .= tep_db_output($order->info['comments']) . "\n\n";

}

$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .

EMAIL_SEPARATOR . "\n" .

$products_ordered .

EMAIL_SEPARATOR . "\n";

} else {

$email_order = STORE_NAME . "\n" .

EMAIL_SEPARATOR . "\n" .

EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

if ($order->info['comments']) {

$email_order .= tep_db_output($order->info['comments']) . "\n\n";

}

$email_order .= EMAIL_TEXT_PRODUCTS . "\n" .

EMAIL_SEPARATOR . "\n" .

$products_ordered .

EMAIL_SEPARATOR . "\n";

}

 

for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {

$email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";

}

 

if ($order->content_type != 'virtual') {

$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .

EMAIL_SEPARATOR . "\n" .

tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";}

 

$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .

EMAIL_SEPARATOR . "\n" .

tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";

if (is_object($$payment)) {

$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .

EMAIL_SEPARATOR . "\n";

$payment_class = $$payment;

$email_order .= $payment_class->title . "\n\n";

if ($payment_class->email_footer) {

$email_order .= $payment_class->email_footer . "\n\n";

}

}

tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

 

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

 

any ideas? thanks so far

 

PS: Before installing PWA, email & telephone number was included in the confirmation mail.

Link to comment
Share on other sites

I just removed my print button from the success page, but kept it in the account page.

 

Peace,

Erin  :D

Hey Erin,

 

Thanks for the TIP!

 

I think others would like to use your "fix" in the mean time. Can you post how you removed the PRINT ORDER button from the success page?

 

I'm assuming that the PRINT ORDER button will not show up when a customer uses PWA, but is visible and functionable when a customer is logged in, correct?

 

How about a link to your website as well... :blink:

 

Thanks for sharing,

 

Pete

Link to comment
Share on other sites

Hi,

i have installed PWA v0.81 (including PWA straight to checkout) on OSC 2.2.

 

Everthing works fine expect one thang: When a customer orders something he will be asked during shopping process after his email & telephone number (so far so good). When i get the email confirmation that this customer ordered items from my shop i cant see his email adress & telephone number in the confirmation mail, so it is complicated to contact the customer later on.

 

here is my code from checkout_process.php:

 

// lets start with the email confirmation

// DDB - 041103 - Add test for PWA : no display of invoice URL if PWA customer

if (!tep_session_is_registered('noaccount'))

{

  $email_order = STORE_NAME . "\n" .

                EMAIL_SEPARATOR . "\n" .

                EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

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

                EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

  if ($order->info['comments'])

  {

    $email_order .= tep_db_output($order->info['comments']) . "\n\n";

  }

  $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .

                  EMAIL_SEPARATOR . "\n" .

                  $products_ordered .

                  EMAIL_SEPARATOR . "\n";

} else {

  $email_order = STORE_NAME . "\n" .

                EMAIL_SEPARATOR . "\n" .

                EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

                EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

  if ($order->info['comments']) {

    $email_order .= tep_db_output($order->info['comments']) . "\n\n";

  }

  $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .

                  EMAIL_SEPARATOR . "\n" .

                  $products_ordered .

                  EMAIL_SEPARATOR . "\n";

  }

 

  for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {

    $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";

  }

 

if ($order->content_type != 'virtual') {

    $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .

                    EMAIL_SEPARATOR . "\n" .

                    tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";}

 

  $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .

                  EMAIL_SEPARATOR . "\n" .

                  tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";

  if (is_object($$payment)) {

    $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .

                    EMAIL_SEPARATOR . "\n";

    $payment_class = $$payment;

    $email_order .= $payment_class->title . "\n\n";

    if ($payment_class->email_footer) {

      $email_order .= $payment_class->email_footer . "\n\n";

    }

  }

  tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

// send emails to other people

  if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

    tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

  }

 

any ideas? thanks so far

 

PS: Before installing PWA, email & telephone number was included in the confirmation mail.

 

I don't ever remember seeing that info in the email. However...why do you need it in the email? Why can't you just log into admin and get the details from the order itself if you need to contact the customer?

Link to comment
Share on other sites

I have what may be an idiot (or at least an ignorant) question. I've downloaded v.82, I understand the php additions and changes.

 

I have a mySQL admin tool, I can get to that.

 

I have backed up my entire site.

 

Can someone walk me through the process of adding the scripts to my database?

Link to comment
Share on other sites

Hey Erin,

 

Thanks for the TIP!

 

I think others would like to use your "fix" in the mean time. Can you post how you removed the PRINT ORDER button from the success page?

 

I'm assuming that the PRINT ORDER button will not show up when a customer uses PWA, but is visible and functionable when a customer is logged in, correct?

 

How about a link to your website as well... :blink:

 

Thanks for sharing,

 

Pete

 

 

Hi Pete,

Actually, I do not have a print button on the success page, at all. Until I finish putting my inventory online, I won't even address the problem.

 

It should be pretty easy (an hour or 2 for a newby like me) to figure out the right code.

 

You just have to say IF the customer is registered, show the print button.

ELSE, do nothing or, as somebody else said, show a "print a copy of your order from the email we just sent you".

 

I have too many irons in the fire at the moment, to work it out. Once I have it working, I will post here.

 

Right now, if a customer checks out with a mail order, they are shown a

Send payment to address and told they can print out the page, when they reach the confirmation page.

If they are paying by credit card, I tell them that IF they are members, they can follow the link to their account history, telling them they can get their information through the link.

 

It works for me, for now, as 99.9% are using the create account, before checkout. I have mine set up amazon style, with some wording modifications, and they all seem happy to become a member. So, since it is not high priority for me, I am working on other mods and inventory.

As I said, when I get around to providing the print button for registered users, I will post here (If somebody else doesn't beat me to it :) )

 

My site is www.grandpasgeneral.com and is live. We are new age, occult, and metaphysical products.

 

Hope that answers your questions.

 

By the way, I am NOT looking for a site critique from anybody. I have so much to learn AND I also break many "rules" about page content. However, it works for me. Your mileage may vary. ;)

 

Peace,

Erin

Edited by irishmystic
Link to comment
Share on other sites

Here is my problem. I accept payments through paypal using the paypal_IPN mod. Orders were processed with no problems and show up in processing in admin. When someone purchases using PWA though, the order doesnt show up in admin. The only way I know I have an order is when paypal notifies me. Any ideas?

Link to comment
Share on other sites

Does anyone know how to fix this type of problem? this started once I installed this contrib. when I try to add a product to my cart.

 

Sub-Total: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'enin'' at line 1

 

select specials_new_products_price from specials where products_id = '41' and status enin'

 

[TEP STOP]

 

many thanks in advance for your help

 

Sam

Link to comment
Share on other sites

I have a problem where my checkout process goes from order_info.php to checkout_payment.php and skips checkout_shipping. I need to get this page to show? Any ideas on how to make this appear? Ive been working all day and cant figure out. HELP! Thanks.

Link to comment
Share on other sites

Hi,

i have installed PWA v0.81 (including PWA straight to checkout) on OSC 2.2.

 

Everthing works fine expect one thang: When a customer orders something he will be asked during shopping process after his email & telephone number (so far so good). When i get the email confirmation that this customer ordered items from my shop i cant see his email adress & telephone number in the confirmation mail, so it is complicated to contact the customer later on.

 

here is my code from checkout_process.php:

 

// lets start with the email confirmation

// DDB - 041103 - Add test for PWA : no display of invoice URL if PWA customer

if (!tep_session_is_registered('noaccount'))

{

  $email_order = STORE_NAME . "\n" .

                EMAIL_SEPARATOR . "\n" .

                EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

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

                EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

  if ($order->info['comments'])

  {

    $email_order .= tep_db_output($order->info['comments']) . "\n\n";

  }

  $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .

                  EMAIL_SEPARATOR . "\n" .

                  $products_ordered .

                  EMAIL_SEPARATOR . "\n";

} else {

  $email_order = STORE_NAME . "\n" .

                EMAIL_SEPARATOR . "\n" .

                EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

                EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

  if ($order->info['comments']) {

    $email_order .= tep_db_output($order->info['comments']) . "\n\n";

  }

  $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .

                  EMAIL_SEPARATOR . "\n" .

                  $products_ordered .

                  EMAIL_SEPARATOR . "\n";

  }

 

  for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {

    $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";

  }

 

if ($order->content_type != 'virtual') {

    $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .

                    EMAIL_SEPARATOR . "\n" .

                    tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";}

 

  $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .

                  EMAIL_SEPARATOR . "\n" .

                  tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";

  if (is_object($$payment)) {

    $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .

                    EMAIL_SEPARATOR . "\n";

    $payment_class = $$payment;

    $email_order .= $payment_class->title . "\n\n";

    if ($payment_class->email_footer) {

      $email_order .= $payment_class->email_footer . "\n\n";

    }

  }

  tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

// send emails to other people

  if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

    tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

  }

 

any ideas? thanks so far

 

PS: Before installing PWA, email & telephone number was included in the confirmation mail.

 

this email is intended for the customer as a type of receipt correct? I'm having the same problem. Since installing PWA, i believe

tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";}

it not returning any info because there is no customer account.

 

Is there some sort of change that can be made to tep_address_label in the function definition to account for account-less orders?

Link to comment
Share on other sites

this email is intended for the customer as a type of receipt correct?  I'm having the same problem.  Since installing PWA, i believe

tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";}

it not returning any info because there is no customer account. 

 

Is there some sort of change that can be made to tep_address_label in the function definition to account for account-less orders?

 

That is not correct, there actually IS/SHOULD BE an account. It is just deleted at order process completion.

Treasurer MFC

Link to comment
Share on other sites

Is there some sort of change that can be made to tep_address_label in the function definition to account for account-less orders?

 

 

That is not correct, there actually IS/SHOULD BE an account. It is just deleted at order process completion.

 

Hi Amanda, Yeah, and Jayos,

This is what I did on my checkout_process.php. I don't claim that it is perfect code, just that it works for me. I know very little about how to code properly and pretty much wing most of it. :-"

 

BACK UP!

 

    $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n\n" .
                 tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
//---------THIS IS ALL EXPERIMENTAL--------------------
// place email and phone after billing information
$email_order .= EMAIL_TEXT_EMAIL . "\n" .
tep_db_output($order->customer['email_address']) . "\n\n";
 $email_order .= EMAIL_TEXT_PHONE . "\n" .
tep_db_output($order->customer['telephone']) . "\n\n";
      
  //-------------------------Next comes delivery address

 

 

I also define the email and phone text in the english file.

 

What prints out is this:

---------------Billing Information-----------------

 

erin amazon

236 34TH ST

Hermosa Beach, CA    90254

United States

 

Email:

[email protected]

 

Phone:

555-555-5555

 

 

---------------Delivery Information------------

 

 

 

 

Hope this helps!

 

Peace,

Erin :)

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