Jump to content
Sign in to follow this  
bmcewan

Purchase Without Account Updated & Admin Functionality

Recommended Posts

ok im about to throw the towel in and call it a night.

I keep getting this error while trying to retrieve an invoice or packing slip from the admin orders the file is order.php .

Im really lost and need some help please. I will pay someone if need be. Please reply

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/homepw/public_html/restomusclecar.com/admin/includes/functions/database.php on line 99

Orders

 

 

script from order.php

<?php

/*

$Id: order.php 1750 2007-12-21 05:20:28Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2007 osCommerce

 

Released under the GNU General Public License

*/

 

class order {

var $info, $totals, $products, $customer, $delivery, $content_type;

 

function order($order_id = '') {

$this->info = array();

$this->totals = array();

$this->products = array();

$this->customer = array();

$this->delivery = array();

 

if (tep_not_null($order_id)) {

$this->query($order_id);

} else {

$this->cart();

}

}

 

function query($order_id) {

global $languages_id;

 

$order_id = tep_db_prepare_input($order_id);

 

// PWA BOF

// added customers_dummy_account

$order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, customers_dummy_account, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");

// PWA EOF

$order = tep_db_fetch_array($order_query);

 

$totals_query = tep_db_query("select title, text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by sort_order");

while ($totals = tep_db_fetch_array($totals_query)) {

$this->totals[] = array('title' => $totals['title'],

'text' => $totals['text']);

}

 

$order_total_query = tep_db_query("select text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' and class = 'ot_total'");

$order_total = tep_db_fetch_array($order_total_query);

 

$shipping_method_query = tep_db_query("select title from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' and class = 'ot_shipping'");

$shipping_method = tep_db_fetch_array($shipping_method_query);

 

$order_status_query = tep_db_query("select orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . $order['orders_status'] . "' and language_id = '" . (int)$languages_id . "'");

$order_status = tep_db_fetch_array($order_status_query);

 

$this->info = array('currency' => $order['currency'],

'currency_value' => $order['currency_value'],

'payment_method' => $order['payment_method'],

'cc_type' => $order['cc_type'],

'cc_owner' => $order['cc_owner'],

'cc_number' => $order['cc_number'],

'cc_expires' => $order['cc_expires'],

'date_purchased' => $order['date_purchased'],

'orders_status' => $order_status['orders_status_name'],

'last_modified' => $order['last_modified'],

'total' => strip_tags($order_total['text']),

'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title'])));

 

$this->customer = array('name' => $order['customers_name'],

'company' => $order['customers_company'],

'street_address' => $order['customers_street_address'],

'suburb' => $order['customers_suburb'],

'city' => $order['customers_city'],

'postcode' => $order['customers_postcode'],

'state' => $order['customers_state'],

'country' => array('title' => $order['customers_country']),

'format_id' => $order['customers_address_format_id'],

'telephone' => $order['customers_telephone'],

'email_address' => $order['customers_email_address'],

// PWA BOF

'is_dummy_account' => $order['customers_dummy_account']);

// PWA EOF

 

$this->delivery = array('name' => trim($order['delivery_name']),

'company' => $order['delivery_company'],

'street_address' => $order['delivery_street_address'],

'suburb' => $order['delivery_suburb'],

'city' => $order['delivery_city'],

'postcode' => $order['delivery_postcode'],

'state' => $order['delivery_state'],

'country' => array('title' => $order['delivery_country']),

'format_id' => $order['delivery_address_format_id']);

 

if (empty($this->delivery['name']) && empty($this->delivery['street_address'])) {

$this->delivery = false;

}

 

$this->billing = array('name' => $order['billing_name'],

'company' => $order['billing_company'],

'street_address' => $order['billing_street_address'],

'suburb' => $order['billing_suburb'],

'city' => $order['billing_city'],

'postcode' => $order['billing_postcode'],

'state' => $order['billing_state'],

'country' => array('title' => $order['billing_country']),

'format_id' => $order['billing_address_format_id']);

 

$index = 0;

$orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");

while ($orders_products = tep_db_fetch_array($orders_products_query)) {

$this->products[$index] = array('qty' => $orders_products['products_quantity'],

'id' => $orders_products['products_id'],

'name' => $orders_products['products_name'],

'model' => $orders_products['products_model'],

'tax' => $orders_products['products_tax'],

'price' => $orders_products['products_price'],

'final_price' => $orders_products['final_price']);

 

$subindex = 0;

$attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'");

if (tep_db_num_rows($attributes_query)) {

while ($attributes = tep_db_fetch_array($attributes_query)) {

$this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'],

'value' => $attributes['products_options_values'],

'prefix' => $attributes['price_prefix'],

'price' => $attributes['options_values_price']);

 

$subindex++;

}

}

 

$this->info['tax_groups']["{$this->products[$index]['tax']}"] = '1';

 

$index++;

}

}

 

function cart() {

global $HTTP_POST_VARS, $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment, $comments, $customer_default_address_id;

 

$this->content_type = $cart->get_content_type();

 

if ( ($this->content_type != 'virtual') && ($sendto == false) ) {

$sendto = $customer_default_address_id;

}

 

$customer_address_query = tep_db_query("select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address, c.guest_account, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2, co.countries_iso_code_3, co.address_format_id, ab.entry_state from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " co on (ab.entry_country_id = co.countries_id) where c.customers_id = '" . (int)$customer_id . "' and ab.customers_id = '" . (int)$customer_id . "' and c.customers_default_address_id = ab.address_book_id");

$customer_address = tep_db_fetch_array($customer_address_query);

 

if (is_array($sendto) && !empty($sendto)) {

$shipping_address = array('entry_firstname' => $sendto['firstname'],

'entry_lastname' => $sendto['lastname'],

'entry_company' => $sendto['company'],

'entry_street_address' => $sendto['street_address'],

'entry_suburb' => $sendto['suburb'],

'entry_postcode' => $sendto['postcode'],

'entry_city' => $sendto['city'],

'entry_zone_id' => $sendto['zone_id'],

'zone_name' => $sendto['zone_name'],

'entry_country_id' => $sendto['country_id'],

'countries_id' => $sendto['country_id'],

'countries_name' => $sendto['country_name'],

'countries_iso_code_2' => $sendto['country_iso_code_2'],

'countries_iso_code_3' => $sendto['country_iso_code_3'],

'address_format_id' => $sendto['address_format_id'],

'entry_state' => $sendto['zone_name']);

} elseif (is_numeric($sendto)) {

$shipping_address_query = tep_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)$sendto . "'");

$shipping_address = tep_db_fetch_array($shipping_address_query);

} else {

$shipping_address = array('entry_firstname' => null,

'entry_lastname' => null,

'entry_company' => null,

'entry_street_address' => null,

'entry_suburb' => null,

'entry_postcode' => null,

'entry_city' => null,

'entry_zone_id' => null,

'zone_name' => null,

'entry_country_id' => null,

'countries_id' => null,

'countries_name' => null,

'countries_iso_code_2' => null,

'countries_iso_code_3' => null,

'address_format_id' => 0,

'entry_state' => null);

}

 

if (is_array($billto) && !empty($billto)) {

$billing_address = array('entry_firstname' => $billto['firstname'],

'entry_lastname' => $billto['lastname'],

'entry_company' => $billto['company'],

'entry_street_address' => $billto['street_address'],

'entry_suburb' => $billto['suburb'],

'entry_postcode' => $billto['postcode'],

'entry_city' => $billto['city'],

'entry_zone_id' => $billto['zone_id'],

'zone_name' => $billto['zone_name'],

'entry_country_id' => $billto['country_id'],

'countries_id' => $billto['country_id'],

'countries_name' => $billto['country_name'],

'countries_iso_code_2' => $billto['country_iso_code_2'],

'countries_iso_code_3' => $billto['country_iso_code_3'],

'address_format_id' => $billto['address_format_id'],

'entry_state' => $billto['zone_name']);

} else {

$billing_address_query = tep_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)$billto . "'");

$billing_address = tep_db_fetch_array($billing_address_query);

}

 

if ($this->content_type == 'virtual') {

$tax_address = array('entry_country_id' => $billing_address['entry_country_id'],

'entry_zone_id' => $billing_address['entry_zone_id']);

} else {

$tax_address = array('entry_country_id' => $shipping_address['entry_country_id'],

'entry_zone_id' => $shipping_address['entry_zone_id']);

}

 

$this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID,

'currency' => $currency,

'currency_value' => $currencies->currencies[$currency]['value'],

'payment_method' => $payment,

'cc_type' => '',

'cc_owner' => '',

'cc_number' => '',

'cc_expires' => '',

'shipping_method' => $shipping['title'],

'shipping_cost' => $shipping['cost'],

'subtotal' => 0,

'tax' => 0,

'tax_groups' => array(),

'comments' => (tep_session_is_registered('comments') && !empty($comments) ? $comments : ''));

 

if (isset($GLOBALS[$payment]) && is_object($GLOBALS[$payment])) {

if (isset($GLOBALS[$payment]->public_title)) {

$this->info['payment_method'] = $GLOBALS[$payment]->public_title;

} else {

$this->info['payment_method'] = $GLOBALS[$payment]->title;

}

 

if ( isset($GLOBALS[$payment]->order_status) && is_numeric($GLOBALS[$payment]->order_status) && ($GLOBALS[$payment]->order_status > 0) ) {

$this->info['order_status'] = $GLOBALS[$payment]->order_status;

}

}

 

$this->customer = array('firstname' => $customer_address['customers_firstname'],

'lastname' => $customer_address['customers_lastname'],

'company' => $customer_address['entry_company'],

'street_address' => $customer_address['entry_street_address'],

'suburb' => $customer_address['entry_suburb'],

'city' => $customer_address['entry_city'],

'postcode' => $customer_address['entry_postcode'],

'state' => ((tep_not_null($customer_address['entry_state'])) ? $customer_address['entry_state'] : $customer_address['zone_name']),

'zone_id' => $customer_address['entry_zone_id'],

'country' => array('id' => $customer_address['countries_id'], 'title' => $customer_address['countries_name'], 'iso_code_2' => $customer_address['countries_iso_code_2'], 'iso_code_3' => $customer_address['countries_iso_code_3']),

'format_id' => $customer_address['address_format_id'],

'telephone' => $customer_address['customers_telephone'],

'email_address' => $customer_address['customers_email_address'],

// PWA BOF 2b

'is_dummy_account' => $customer_address['guest_account']);

// PWA EOF 2b

 

$this->delivery = array('firstname' => $shipping_address['entry_firstname'],

'lastname' => $shipping_address['entry_lastname'],

'company' => $shipping_address['entry_company'],

'street_address' => $shipping_address['entry_street_address'],

'suburb' => $shipping_address['entry_suburb'],

'city' => $shipping_address['entry_city'],

'postcode' => $shipping_address['entry_postcode'],

'state' => ((tep_not_null($shipping_address['entry_state'])) ? $shipping_address['entry_state'] : $shipping_address['zone_name']),

'zone_id' => $shipping_address['entry_zone_id'],

'country' => array('id' => $shipping_address['countries_id'], 'title' => $shipping_address['countries_name'], 'iso_code_2' => $shipping_address['countries_iso_code_2'], 'iso_code_3' => $shipping_address['countries_iso_code_3']),

'country_id' => $shipping_address['entry_country_id'],

'format_id' => $shipping_address['address_format_id']);

 

$this->billing = array('firstname' => $billing_address['entry_firstname'],

'lastname' => $billing_address['entry_lastname'],

'company' => $billing_address['entry_company'],

'street_address' => $billing_address['entry_street_address'],

'suburb' => $billing_address['entry_suburb'],

'city' => $billing_address['entry_city'],

'postcode' => $billing_address['entry_postcode'],

'state' => ((tep_not_null($billing_address['entry_state'])) ? $billing_address['entry_state'] : $billing_address['zone_name']),

'zone_id' => $billing_address['entry_zone_id'],

'country' => array('id' => $billing_address['countries_id'], 'title' => $billing_address['countries_name'], 'iso_code_2' => $billing_address['countries_iso_code_2'], 'iso_code_3' => $billing_address['countries_iso_code_3']),

'country_id' => $billing_address['entry_country_id'],

'format_id' => $billing_address['address_format_id']);

 

$index = 0;

$products = $cart->get_products();

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

$this->products[$index] = array('qty' => $products[$i]['quantity'],

'name' => $products[$i]['name'],

'model' => $products[$i]['model'],

'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),

'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),

'price' => $products[$i]['price'],

'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']),

'weight' => $products[$i]['weight'],

'id' => $products[$i]['id']);

 

if ($products[$i]['attributes']) {

$subindex = 0;

reset($products[$i]['attributes']);

while (list($option, $value) = each($products[$i]['attributes'])) {

$attributes_query = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'");

$attributes = tep_db_fetch_array($attributes_query);

 

$this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options_name'],

'value' => $attributes['products_options_values_name'],

'option_id' => $option,

'value_id' => $value,

'prefix' => $attributes['price_prefix'],

'price' => $attributes['options_values_price']);

 

$subindex++;

}

}

 

$shown_price = $currencies->calculate_price($this->products[$index]['final_price'], $this->products[$index]['tax'], $this->products[$index]['qty']);

$this->info['subtotal'] += $shown_price;

 

$products_tax = $this->products[$index]['tax'];

$products_tax_description = $this->products[$index]['tax_description'];

if (DISPLAY_PRICE_WITH_TAX == 'true') {

$this->info['tax'] += $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));

if (isset($this->info['tax_groups']["$products_tax_description"])) {

$this->info['tax_groups']["$products_tax_description"] += $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));

} else {

$this->info['tax_groups']["$products_tax_description"] = $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));

}

} else {

$this->info['tax'] += ($products_tax / 100) * $shown_price;

if (isset($this->info['tax_groups']["$products_tax_description"])) {

$this->info['tax_groups']["$products_tax_description"] += ($products_tax / 100) * $shown_price;

} else {

$this->info['tax_groups']["$products_tax_description"] = ($products_tax / 100) * $shown_price;

}

}

 

$index++;

}

 

if (DISPLAY_PRICE_WITH_TAX == 'true') {

$this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost'];

} else {

$this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost'];

}

}

}

?>

Share this post


Link to post
Share on other sites

OK I fixed it!

FYI Here is what happened...

 

When executing the common.sql and the english.sql it did not add the Customer_Dummy_Account table add for some reason.

But the php myadmin stated ok no problems. I created the table and tada! all is well

 

on the above posts I stated the comments box was large. I fixed it and figured out why. I have the fixed width contrub. with no height so by removing the '60' and replacing the '5' with '8' it looks great

 

Spoke with my hosting and they stated there was a scripting error in the sql query.

 

I do want to thank the author of this contrib. It is a great addon for buyers.

 

I can sleep now :D

Edited by restomusclecar

Share this post


Link to post
Share on other sites

Hi there,

 

It's a great contribution, but I have a problem.

 

Everything works but if a customer wants to checkout without an account, the ability to send the order has been left out. What I mean is this:

 

a customer is choosing The Netherlands as his home country. After 'registering' he will be transferred to checkout_shipping.php. At that page the module 'pick-up in store' has been left out and the only one available is 'Parcel shipment' but it says that is isn't able to ship within this country.

 

if a customer registered and his home country is in The Netherlands, after entering checkout_shipping.php he has the options to choose from 'pick-up in store' AND send it through 'Parcel shipment' to The Netherlands.

 

Therefore: the PWA doesn't allow shipping the items !!!

 

Could someone please tell me what went wrong here.

 

marcus

Share this post


Link to post
Share on other sites

Hey all,

 

After unsuccesful attempts to use newer versions of this contribution on my heavily modified MS2 version... I went back to an "OLD" version 0.910 which install seemed to work but with a minor glitch.

 

I can checkout without creating an account with no problem. The shopping_cart.php file directs to the new "order_info.php" but it seems existing customers my bypass the log-in area.

 

So I tried to change it to go to account.php - which directs to the login.php page which shows three options, checkout without account, create account or log-in.

 

The problem is it puts you into an endless loop, after you log-in, where you never actually get to checkout_shipping.php in that config.

 

Can anyone make a suggestion. I've gone over the threads from that timeframe/version several times... I'm not sure if it is doing something incorrectly, or if there is a mod I missed.

 

ANy assistance would be great! :)

Edited by knipper

Steve K AKA - Knipper -

Share this post


Link to post
Share on other sites

User forum in the page Billing & Shipping Information

 

Hi all and sorry for my bad english

 

I have installed this contrib_pwa 2.0f and it works fine - the problem I have is that i have instaled forum in my shop and if the client want buy with PWA in my page : Billing & Shipping Information i have the: Forum username: Required for the forum.

How can I do that I will not defend in the page Billing & Shipping Information _for guest ,like PASSWORD field.

How can I do _not to defend the field FOR USER FORUM.

 

Can someone help me pls?

 

Have a nice day all!

Share this post


Link to post
Share on other sites
Hello,

 

"PWA Customer Account Delete Addon" has been added to the contribution at the following URL:

http://addons.oscommerce.com/info/355

 

Please make those changes to delete the temporary customer account after a customer does the purchase through PWA. Temporary customer account created through PWA also gets deleted if the customer does the logoff before completing the purchase. My Account and Logoff links would not show up after the Checkout Success.

 

Lakshmanan

 

Dude, this is the perfect addon! got rid of the problem of having guests not being allowed to use their informatioin over again when PingWA. works like a charm. well done!

 

live axn at http://archmolds.com/insoles/

Share this post


Link to post
Share on other sites

Hello

 

I keep getting the following error on my site when I go to create an account, I have installed PWA and it was working I have then installed Required Customer Details.

 

Parse error: syntax error, unexpected T_ELSE in /home/lynd4651/public_html/create_account.php on line 693

 

This is the Section of code

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="2" cellpadding="2">

<tr>

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

<td class="main"><?php echo tep_draw_password_field('password') . ' ' . (tep_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?></td>

</tr>

<tr>

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

<td class="main"><?php echo tep_draw_password_field('confirmation') . ' ' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<?php

// PWA BOF

}

else { // Ingo PWA Ende

?>

<tr>

<td><?php echo tep_draw_hidden_field('guest', 'guest'); ?></td>

</tr>

<?php }

// PWA EOF

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

Share this post


Link to post
Share on other sites

Hi,

 

is it possible to combined the login site with create account and this PWA ?

 

i think to use a radio button to register with account or no account...

 

is it possible?

 

what must i change to do that?

 

thank you

Share this post


Link to post
Share on other sites

I have a BIG problem with PWA!

 

I run osCommerce with tax on as standard. I also have a Customer group function but I do not think this is the cause of the problem.

 

The problem is that when someone is logged in with PWA function every price in the site is corrupted!

Prices show witout tax!!? Does anyone know about this problem?

have a look at www.golvvarmebutiken.se/catalog

 

Only in Swedish sorry about this.

PLEASE NOTE! the store is live!

 

 

Best regards/

Martin

Share this post


Link to post
Share on other sites

Need help,

 

just added pwa 1.2.4 (tried newer ones but doesn't work).

Everything would be fine but there is no delivery and no billing address in the confirmation mail.

Does anyone may have an idea how I may fix the problem?

 

catalog/checkout_process.php

// lets start with the email confirmation
 $email_order = STORE_NAME . "\n" . 
			 EMAIL_SEPARATOR . "\n" .
		 EMAIL_TEXT_KDNR . ' ' . $customer_id . "\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" . ////// PWA - un comment this line to use this option (($customer_id == 0)? '' : 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";
// PWA BOF
 if ($customer_id == 0) {
$email_order .= EMAIL_WARNING . "\n\n";
 }
 // PWA EOF
 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";
}
 }

 

This is in the email:

Lieferanschrift
------------------------------------------------------


, 


Rechnungsanschrift
------------------------------------------------------


, 


Zahlungsweise
------------------------------------------------------
Vorkasse

 

Thanks!

Edited by gershwin

Share this post


Link to post
Share on other sites

can anyone suggest why in shipping_confirmation.php, when using pwa, the order total, sub total and shipping method are all listed twice (the total is still correct)

 

many thanks

steve

Share this post


Link to post
Share on other sites

I've installed pwa 2.0f but when utilizing it, users recieve an email with an invalid link because they dont have an account. Any way to remedy this? Thanks.

Share this post


Link to post
Share on other sites

OK i have a small problem, i installed the script and everything looks fine until i enter the detail and press continue. What it does rather then taking me to the checkout process it takes me back to the login page where i have a choice to create account, checkout without registration etc ...

 

Anyone know how i can solve the problem so it carry on to the checkout process.

Share this post


Link to post
Share on other sites

Installed the ver. 2.0h_1

Running an osC 2.2 RC2 with STS, HTSEO and FCK.

 

Followed the Install Guide.txt from start to end, and did it over and over again.

 

Still there is nothing in the shop that indicate that the user can choose to checkout without being logged in.

I can't see any difference at all after installing it.

 

Has maked the changes to the database, and did all what the guide tells.

 

Has anyone maybe a tip that can help me?

Share this post


Link to post
Share on other sites

Good evening,

 

I attempted to add this contribution and everything went as instructed, until I got to step 17 where it says:

 

17.in catalog/includes/header.php

***FIND:

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <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>

 

 

***REPLACE WITH:

<!-- PWA BOF -->

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><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('customer_id') && (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])) && !$order->customer['is_dummy_account']) { ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', '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>

<!-- PWA EOF -->

'

 

 

 

Unfortunately I do not have that frist block of code in my header file anywhere. I used a file compare to try and merge the code but that is not working either. Any ideas?


Always grateful for any help received!!

Share this post


Link to post
Share on other sites

In step #4 it says:

***FIND:

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;

}

 

But my document says:

$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']);

}

}

I can't find the portion that the directions need. Any ideas? This is supposed to be catalog/checkout_success.php

Share this post


Link to post
Share on other sites

I followed all the install instructions, and all went well until 17.

 

17.in catalog/includes/header.php

 

***FIND:

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <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>

 

***REPLACE WITH:

<!-- PWA BOF -->

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><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('customer_id') && (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])) && !$order->customer['is_dummy_account']) { ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', '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>

<!-- PWA EOF -->

 

 

I use a greenmania template and that code I 'm supposed to replace doesn't exist. What should I do instead?

Share this post


Link to post
Share on other sites
Not even to Step 1 and I already have a question :(

NOTE: YOU NEED TO HAVE RC2 installed

What is RC2?

 

I am having issues with steps 4, 6, and 12. The text that I am supposed to change is not in my files. Is there a different version of the contribution I should look at? My site is currently in operable because of these incomplete changes!

Share this post


Link to post
Share on other sites

Hello!

 

I have installed Purchase Without Account 2.1 and my customers report

that the account_history doesn't work anymore.

If I call the account_histrory I get this:

 

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

 

select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, customers_dummy_account, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing _city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from orders where orders_id = '30089'

 

Can someone help, please?

 

Kind regards

 

Andreas

Share this post


Link to post
Share on other sites

Wow, seems like a lot of craziness with this contrib, but it is a huge change in the function.

 

My problem is, I made all the changes and everything worked pretty well. I went to purchase a product to test and when I'm prompted to put in "Billing & Shipping Information" I fill in all the info and hit the "continue" button and I get this error "Error Your Password must contain a minimum of 5 characters.". Anyone know where this is coming from?

Share this post


Link to post
Share on other sites

Is there anything expected to appear under the Customers column in the order listing? I get the Order Total, Date Purchased, etc.. but under Customers its blank. I understand that logically customer's data would be erased from the database but should something show up in the first field? or should it be blank?

 

- G

Share this post


Link to post
Share on other sites

I've encountered a problem where a registered customer can see the order of the previous customer that did not create an account in the account_history.php.

 

The reason of this is simple: the guest account is deleted after completion of the order, then the customer_id is reused for the next customer and the script account_history does not take pwa into account.

 

Fix:account_history.php line 59:

 

Add o.customers_dummy_account <> '1' to the query, giving the following code:

 

//BOF PWA

$history_query_raw = "select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.customers_dummy_account <> '1' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1' order by orders_id DESC";

//EOF PWA

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  

×