Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Purchase Without Account Updated & Admin Functionality


Guest

Recommended Posts

I'm considering installing this contributions, but in the installation instructions it says that /catalog/includes/languages/english/images/buttons/button_create_account.gif

 

is an existing file in ms2.2, but as far I can tell it is not. Is this mod fully functional?

Link to comment
Share on other sites

I was having problems with Authorize.net and PWA.. It was giving me cURL errors, saying it could not contact Authorize.net.

 

I replaced the following code

 

// load the before_process function from the payment modules
 $payment_modules->before_process();

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 $order_totals = $order_total_modules->process();

 $sql_data_array = array('customers_id' => $customer_id,
                         'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],
                         'customers_company' => $order->customer['company'],
                         'customers_street_address' => $order->customer['street_address'],
                         'customers_suburb' => $order->customer['suburb'],
                         'customers_city' => $order->customer['city'],
                         'customers_postcode' => $order->customer['postcode'], 
                         'customers_state' => $order->customer['state'], 
                         'customers_country' => $order->customer['country']['title'], 
                         'customers_telephone' => $order->customer['telephone'], 
                         'customers_email_address' => $order->customer['email_address'],
                         'customers_address_format_id' => $order->customer['format_id'], 
                         'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'], 
                         'delivery_company' => $order->delivery['company'],
                         'delivery_street_address' => $order->delivery['street_address'], 
                         'delivery_suburb' => $order->delivery['suburb'], 
                         'delivery_city' => $order->delivery['city'], 
                         'delivery_postcode' => $order->delivery['postcode'], 
                         'delivery_state' => $order->delivery['state'], 
                         'delivery_country' => $order->delivery['country']['title'], 
                         'delivery_address_format_id' => $order->delivery['format_id'], 
                         'billing_name' => $order->billing['firstname'] . ' ' . $order->billing['lastname'], 
                         'billing_company' => $order->billing['company'],
                         'billing_street_address' => $order->billing['street_address'], 
                         'billing_suburb' => $order->billing['suburb'], 
                         'billing_city' => $order->billing['city'], 
                         'billing_postcode' => $order->billing['postcode'], 
                         'billing_state' => $order->billing['state'], 
                         'billing_country' => $order->billing['country']['title'], 
                         'billing_address_format_id' => $order->billing['format_id'], 
                         'payment_method' => $order->info['payment_method'],
                         'cc_type' => $order->info['cc_type'], 
                         'cc_owner' => $order->info['cc_owner'], 
                         'cc_number' => $order->info['cc_number'], 
                         'cc_expires' => $order->info['cc_expires'],
                         'date_purchased' => 'now()', 
                         'orders_status' => $order->info['order_status'], 
                         'currency' => $order->info['currency'], 
                         'currency_value' => $order->info['currency_value']);
 tep_db_perform(TABLE_ORDERS, $sql_data_array);
 $insert_id = tep_db_insert_id();
 for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
   $sql_data_array = array('orders_id' => $insert_id,
                           'title' => $order_totals[$i]['title'],
                           'text' => $order_totals[$i]['text'],
                           'value' => $order_totals[$i]['value'], 
                           'class' => $order_totals[$i]['code'], 
                           'sort_order' => $order_totals[$i]['sort_order']);
   tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
 }

 

 

WITH:

 

//************************************************************
// Authorizenet ADC Direct Connection
//************************************************************

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 $order_totals = $order_total_modules->process();

 $sql_data_array = array('customers_id' => $customer_id,
                         'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],
                         'customers_company' => $order->customer['company'],
                         'customers_street_address' => $order->customer['street_address'],
                         'customers_suburb' => $order->customer['suburb'],
                         'customers_city' => $order->customer['city'],
                         'customers_postcode' => $order->customer['postcode'], 
                         'customers_state' => $order->customer['state'], 
                         'customers_country' => $order->customer['country']['title'], 
                         'customers_telephone' => $order->customer['telephone'], 
                         'customers_email_address' => $order->customer['email_address'],
                         'customers_address_format_id' => $order->customer['format_id'], 
                         'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'], 
                         'delivery_company' => $order->delivery['company'],
                         'delivery_street_address' => $order->delivery['street_address'], 
                         'delivery_suburb' => $order->delivery['suburb'], 
                         'delivery_city' => $order->delivery['city'], 
                         'delivery_postcode' => $order->delivery['postcode'], 
                         'delivery_state' => $order->delivery['state'], 
                         'delivery_country' => $order->delivery['country']['title'], 
                         'delivery_address_format_id' => $order->delivery['format_id'], 
                         'billing_name' => $order->billing['firstname'] . ' ' . $order->billing['lastname'], 
                         'billing_company' => $order->billing['company'],                           'billing_street_address' => $order->billing['street_address'], 
                         'billing_suburb' => $order->billing['suburb'], 
                         'billing_city' => $order->billing['city'], 
                         'billing_postcode' => $order->billing['postcode'], 
                         'billing_state' => $order->billing['state'], 
                         'billing_country' => $order->billing['country']['title'], 
                         'billing_address_format_id' => $order->billing['format_id'], 
                         'payment_method' => $order->info['payment_method'], 
                         'cc_type' => $order->info['cc_type'], 
                         'cc_owner' => $order->info['cc_owner'], 
                         'cc_number' => $order->info['cc_number'], 
                         'cc_expires' => $order->info['cc_expires'], 
                         'date_purchased' => 'now()', 
                         'orders_status' => DEFAULT_ORDERS_STATUS_ID, 
  	 // the following field has been moved from orders to order_status_history
  	 // 'comments' => $order->info['comments'], 
                         'currency' => $order->info['currency'], 
                         'currency_value' => $order->info['currency_value']);
 tep_db_perform(TABLE_ORDERS, $sql_data_array);
 $insert_id = tep_db_insert_id();

// Make sure the /catalog/includes/class/order.php is included
// and $order object is created before this!!!
if(MODULE_PAYMENT_AUTHORIZENET_STATUS) {
 include(DIR_WS_MODULES . 'authorizenet_direct.php');
}

 

 

 

I hope this helps some of you.. I don't guarantee this to work 100%. It may complicate other things as well. Try it as a last ditch resort.

Link to comment
Share on other sites

thanks for the contributions.

 

BTW, how do I locate PWA vertical boxes in the middle position of the page

between left and right menu columns?

 

The original code is located at left align.

 

Where in login.php file should I change?

 

 

Any help, I'll appreciate.

Link to comment
Share on other sites

Hi,

I just installed this contrib...

www.iPodXtras.com

 

I cannot get past where you enter your info in the PWA account it is just a blank page and in the $breadcrums bar, it doesn't show what it shows either... Can you help me figure out what went wrong... (heres a screen shot of what i see after clicking continue on the PWA page)

 

PWA%20issue....jpg

Link to comment
Share on other sites

mijman2

 

I've had similar problems in a few cases because of STS. If you are using STS you need to make sure the includes for column_left.php and column_right.php are both in the page that doesn't appear.

 

The breadcrumb trail, add this line to your languages/english/create_account.php:

 

define('NAVBAR_TITLE_2', 'Confirm');

 

Tim

Link to comment
Share on other sites

Safoo

 

I'm finally getting back around to the PrintOrder issue. I took the code from your posting...

 

A cusomter is logged in normally :

 

if(tep_session_is_registered('customer_id'))

 

A customer is logged in with PWA:

 

if (tep_session_is_registered('noaccount'))

 

...found the normal customer login in the printorder.php file and replaced it with the 'noaccount' line, but this didn't work. I'm still getting the same problem...

 

I can't print an order. From the checkout_success.php page the PrintOrder contrib adds a button to print your order. This opens a pop-up (printorder.php) but instead of showing the order it redirects to the login screen.

 

Any ideas???

Link to comment
Share on other sites

Here's the code that I think is applicable from printorder.php:

 

<?php
/*
 $Id: printorder.php,v 1.2 12/03/2003 randynewman
 
 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');

 if (!tep_session_is_registered('noaccount')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

 

Notice I changed the 'customer_id' line to 'noaccount'. Would I also need to change anything in 'includes/application_top.php'?

Link to comment
Share on other sites

mijman2

 

I've had similar problems in a few cases because of STS.? If you are using STS you need to make sure the includes for column_left.php and column_right.php are both in the page that doesn't appear.

 

The breadcrumb trail, add this line to your languages/english/create_account.php:

 

define('NAVBAR_TITLE_2', 'Confirm');

 

Tim

Hi,

 

Not quite sure what you mean, This page is Order_Info_Process.php and it comes up blank and doesnt create a customer. I fouund it would do this when I entered a garbage email address in the PWA form. e.g [email protected]

 

Soon as I enter [email protected] it will process. Looks to me that this page should contain a back button with a message that says something about invalid email address? I cant quite see where I am in Orders_Info_Process when it throws up this blank page.

 

Cheers

Stot

Edited by Stot
Link to comment
Share on other sites

Mijman2, Stot

 

In Order_Info_Process.php find the code:

<!-- body_text_eof //-->
   <!--No right navigation-->
 </tr>
<!-- body_eof //-->

and replace it with

 

<!-- body_text_eof //-->
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
 </tr>
<!-- body_eof //-->

 

Top tip: If you are using STS and add a contribution that comes up with a blank page always check that column_left.php and column_right.php are both included in the page. I know this to be a problem with a few contributions - PWA, Printable catalog and a couple more I can't recall.

 

Tim

Link to comment
Share on other sites

Still struggling with the PrintOrder contrib working with the PWA contrib. Not making any headway. Can anyone offer any suggestions???

Link to comment
Share on other sites

Hey all,

 

is anyone using this PWA with the plug-n-pay gateway?

 

It seems that when customers pay with plug-n-pay credit cards and go threw purchase without account the order does not get placed upon successfull checkout.

 

I am updating to the latest version of this mod to see if it helps but wondered if anyone could help shed light on this ..

 

Thanks..

Link to comment
Share on other sites

Hi all,

 

I'm not sure if this has been requested or even modified already, but i thought it rather silly that you should be able to proceed directly to checkout if the user trys to click the 'my account' link.

 

Below is what i did to version 0.70 to make it include the non PWA login boxes only when clicking through the 'my account' link.

 

edit catalog/login.php

on approx line 150(ish) replace:

 

if (PWA_ON == 'false') {

require(DIR_WS_INCLUDES . FILENAME_PWA_ACC_LOGIN);

} else {

require(DIR_WS_INCLUDES . FILENAME_PWA_PWA_LOGIN);

}

 

with:

if (PWA_ON == 'false')

{

require(DIR_WS_INCLUDES . FILENAME_PWA_ACC_LOGIN);

}

else

{

if ($PWA == 'off')

{

require(DIR_WS_INCLUDES . FILENAME_PWA_ACC_LOGIN);

}

else

{

require(DIR_WS_INCLUDES . FILENAME_PWA_PWA_LOGIN);

}

}

 

edit catalog/account.php

on approx line 17(ish) replace:

 

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

 

with:

 

tep_redirect(tep_href_link(FILENAME_LOGIN, 'PWA=off', 'SSL'));

 

Hope this is of some use.

 

Thanks for this Very useful contrib.

 

Chris

Edited by rickcj
Link to comment
Share on other sites

This contribution is exactly what I'm looking for, if I can get it to work on my site.

 

I am using STS and although my template originally doesn't include the column_left andcolumn_right files I wrote them into my login.php file and that took away one fatal error however this one pops up:

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/tearetre/public_html/catalog/includes/boxes/categories.php:13) in /home/tearetre/public_html/catalog/includes/boxes/categories.php on line 13

 

any ideas. thanx.

Link to comment
Share on other sites

Re: my previous post

 

Is it possible that??? Since my version of the sts_template.html page doesn't actually require any of the category boxes (i.e. column_left.php and column_right.php) that by merely adding

  require(DIR_WS_INCLUDES . 'column_left.php');
 require(DIR_WS_INCLUDES . 'column_right.php'):

to login.php to solve the compatability issue creates this additional problem of not finding the category boxes.

 

If this is the case, is there any resolution to getting PWA to work with STS while not including the column_left.php and column_right.php files.

 

I'm learning as I go, please excuse the ignorance...

 

Thanx for any insight

Link to comment
Share on other sites

definitely ignorance, i figured out my problem. amongst all the file ftping and configuration I forget to ftp some of the files.

 

now that that's solved and it seems that I have options on my login.php page, when i checkout without an account, fill in the info and click continue, the

catalog/Order_Info_Process.php pages comes up with my template but nothing from the order. any suggestions...

Link to comment
Share on other sites

On Checkout_success.php

 

Current PWA says:

 

// if the customer is not logged on, redirect them to the shopping cart page

if (!tep_session_is_registered('customer_id')) {

// BoF Purchase Without Account 0.71

tep_redirect(tep_href_link(FILENAME_DEFAULT));

// EoF Purchase Without Account 0.71

}

 

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);

 

// BoF Purchase Without Account 0.71

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

}

// EoF Purchase Without Account 0.71

}

 

While:

 

PayPal 2.3 says find:

 

tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));

}

 

replace with:

 

//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')) {

$cart->reset(true);

// unregister session variables used during checkout

tep_session_unregister('sendto');

tep_session_unregister('billto');

tep_session_unregister('shipping');

tep_session_unregister('payment');

tep_session_unregister('comments');

tep_session_unregister('paypal_order_id');

}

//end PayPal_Shopping_Cart_IPN

Link to comment
Share on other sites

Hello All,

 

When I am in "Proceed Directly to Checkout" and click "Checkout", I am getting Order_Info.php executed.

But I am getting question marks (?). Like below

?First Name: ?

 

How and where do I remove these question marks?

 

Thanks very much

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