Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Purchase Without Account Updated & Admin Functionality


Guest

Recommended Posts

Hi guys, When i reached the step 3 to step 4 after confirm my order using PWA. It shows the error below. Please advise. Thank you in advance!

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

 

update orders set purchased_without_account = '1' where orders_id = '3'

 

[TEP STOP]

It seems you have missed one addition to your database from the provided SQL statements (step 3 in the install instructions):

ALTER TABLE orders ADD purchased_without_account TINYINT (1) UNSIGNED DEFAULT '0' NOT NULL;

 

Add this to your database after all through your phpMyAdmin panel and it should be okay (if you did the rest alright).

 

HTH

Link to comment
Share on other sites

Hey does anyone know if this can be successfully implemented with "Authorize.Net Consolidated 1.7b" contrib?  I would hope someone would know.

 

Authorize.Net Consolidated 1.7b is located here ---> http://www.oscommerce.com/community/contributions,2184

 

 

Hi, I'm still wondering if anyone has done this.

Link to comment
Share on other sites

It seems you have missed one addition to your database from the provided SQL statements (step 3 in the install instructions):

ALTER TABLE orders ADD purchased_without_account TINYINT (1) UNSIGNED DEFAULT '0' NOT NULL;

 

Add this to your database after all through your phpMyAdmin panel and it should be okay (if you did the rest alright).

 

HTH

 

Hi,

 

Thanks for your reply. However, i'm still having this problem. Anything i need to add to any .php files?

Link to comment
Share on other sites

Hi,

 

Thanks for your reply. However, i'm still having this problem. Anything i need to add to any .php files?

 

There are quite a lot of changes to several .php files but it depends on how you installed the contribution. The new files are obvious but for the existing .php files you will have either overwritten the original osC ones or compared them with those in the PWA package and made the changes by hand ?!

Did you import all the given SQL statements from the install instructions into your database ? I only gave you the last one because I thought that might be the problem but as you must have read there are more.

Check your database to see if they all indeed exist !

Link to comment
Share on other sites

Hi,

I'm having a bit of a problem which I think has been created by this contribution. I have posted elsewhere. Please check out the thread: contrib prob

Does anyone have any idea why this is happening?

Thanks in advance!

 

I can't imagine this is created by PWA. The essence is to order without an account and now you are testing with an account this should show normal behaviour even with PWA installed (correctly). I remember seeing a few threads with people having the same problem as you have but not having read them I can't tell what the answers were. I suspect however it probably is an issues with your shop and cookies/session ID's. You'll have to do a little search for this but there should be your answer.

Link to comment
Share on other sites

Thanks for your reply!

I managed to fix it eventually. I can't remember how I did it though. It had to do with switching between the secure and the non-secure part of the site.

Anyhooo, it's fine now.

Link to comment
Share on other sites

Well, I had an interesting problem today, which I thought you may be interested in hearing about.

 

Mrs X (an existing account holder) e-mailed me today to ask if the order process e-mails she had received had been sent in error. She had placed an order yesterday, but no more orders.

 

Just before that I received two orders from non-account holders which appeared to be from Mrs X, although the invoice and delivery addresses were different to Mrs X'x address.

 

So I went into the website, and clicked on My Account and the set up account page showed as normal. That was OK but then I added something to my basket and clicked on My Account and sure enough I went straight into Mrs X's account!

 

From Mrs X's account I could all her personal information and the two later orders that had been placed completely independently, (one who had paid via paypal and the other who was going to call with a credit card, so two different methods).

 

I removed the two PWA orders from Mrs X's account, but only have an e-mail address for the customer who paid by Paypal, so have only been able to confirm their order, although I have all the other relevant details of the second customers order.

 

Of course I am worried that had the two customers clicked on 'My Account' they would have seen Mrs X's details. After visting Mrs X's account I clicked on logout and have since been unable to gain access in the way I have described above. Unfortunately, we can't guarantee that every customer will logout.

 

Therefore, I'm afraid I will have to spend the rest of the day removing PWA from my websites unless anyone can propose a quick solution.

 

I would be very interested to hear if anyone shed any light on this.

Link to comment
Share on other sites

Hey there,

 

I've only just started using Oscom and PWA, so i dont consider myself an expert, but anyhow, here goes:

 

This sounds like a problem with session data being stored in files which i read about in another post.

Check in your config.php files in /includes/ and /admin/ to see if you have Sessions Storage set to files or mysql.

the code you're looking for is:

define('STORE_SESSIONS', '[insert]'); // leave empty ' ' for default handler or set to 'mysql'

Ensure that this is set to 'mysql', and then let us know.

 

Cheers

Fatmcgav

 

Well, I had an interesting problem today, which I thought you may be interested in hearing about.

 

Mrs X (an existing account holder) e-mailed me today to ask if the order process e-mails she had received had been sent in error. She had placed an order yesterday, but no more orders.

 

Just before that I received two orders from non-account holders which appeared to be from Mrs X, although the invoice and delivery addresses were different to Mrs X'x address.

 

So I went into the website, and clicked on My Account and the set up account page showed as normal. That was OK but then I added something to my basket and clicked on My Account and sure enough I went straight into Mrs X's account!

 

From Mrs X's account I could all her personal information and the two later orders that had been placed completely independently, (one who had paid via paypal and the other who was going to call with a credit card, so two different methods).

 

I removed the two PWA orders from Mrs X's account, but only have an e-mail address for the customer who paid by Paypal, so have only been able to confirm their order, although I have all the other relevant details of the second customers order.

 

Of course I am worried that had the two customers clicked on 'My Account' they would have seen Mrs X's details. After visting Mrs X's account I clicked on logout and have since been unable to gain access in the way I have described above. Unfortunately, we can't guarantee that every customer will logout.

 

Therefore, I'm afraid I will have to spend the rest of the day removing PWA from my websites unless anyone can propose a quick solution.

 

I would be very interested to hear if anyone shed any light on this.

Link to comment
Share on other sites

Hey there,

 

I've only just started using Oscom and PWA, so i dont consider myself an expert, but anyhow, here goes:

 

This sounds like a problem with session data being stored in files which i read about in another post.

Check in your config.php files in /includes/ and /admin/ to see if you have Sessions Storage set to files or mysql.

the code you're looking for is:

define('STORE_SESSIONS', '[insert]'); // leave empty ' ' for default handler or set to 'mysql'

Ensure that this is set to 'mysql', and then let us know.

 

Cheers

Fatmcgav

 

Hi, thanks for the quick reply.

 

Sessions is already set to mysql as I read somewhere about that too.

 

Rosey

Link to comment
Share on other sites

Uh, the only other thing i could suggest is goin through all your code changes, to make sure that theyre correct, you havent missed a line or anything.

 

As i said, i'm still a relative Oscom newb, so i'm grasping at straws here :)

 

Cheers

Fatmcgav

 

Hi, thanks for the quick reply.

 

Sessions is already set to mysql as I read somewhere about that too.

 

Rosey

Link to comment
Share on other sites

Hey there,

 

I've only just started using Oscom and PWA, so i dont consider myself an expert, but anyhow, here goes:

 

This sounds like a problem with session data being stored in files which i read about in another post.

Check in your config.php files in /includes/ and /admin/ to see if you have Sessions Storage set to files or mysql.

the code you're looking for is:

define('STORE_SESSIONS', '[insert]'); // leave empty ' ' for default handler or set to 'mysql'

Ensure that this is set to 'mysql', and then let us know.

 

Cheers

Fatmcgav

 

 

if you are not signed in, you should not have an account button. Even if you add something to your cart and fill in your order information for PWA, then still you should never have a "my account" option. Only registered customers should see that.

Treasurer MFC

Link to comment
Share on other sites

if you are not signed in, you should not have an account button. Even if you add something to your cart and fill in your order information for PWA, then still you should never have a "my account" option. Only registered customers should see that.

That's not how mine works. Anyone who comes to the site can see the My Account link. Once a visitor clicks on that link, they go to the login page where registered users can log in (and click on Sign In) and unregistered users can use click on Create Account instead of Sign In.

Link to comment
Share on other sites

That's not how mine works.  Anyone who comes to the site can see the My Account link.  Once a visitor clicks on that link, they go to the login page where registered users can log in (and click on Sign In) and unregistered users can use click on Create Account instead of Sign In.

 

well, get rid of the my account option unless the customer_id is registered and the noaccount is not registered. Then you have the option only for registered and signed in users.

Treasurer MFC

Link to comment
Share on other sites

well, get rid of the my account option unless the customer_id is registered and the noaccount is not registered. Then you have the option only for registered and signed in users.

 

As I see it, although getting rid of the account buttons for PWA customers will stop customers seeing someone elses account details, this would not necessarily solve the problem of customers orders somehow became attached to Mrs X's account because she hadn't logged out.

Link to comment
Share on other sites

As I see it, although getting rid of the account buttons for PWA customers will stop customers seeing someone elses account details, this would not necessarily solve the problem of customers orders somehow became attached to Mrs X's account because she hadn't logged out.

If we are talking about the same thing (the My Account link that takes you to the login page), I don't see how a registered user would log in if the link was not there. Maybe I'm missing something.

Link to comment
Share on other sites

Hi,

 

I've just installed PWA, and it works fine except when I click on the checkout button, I go to the login.php page, there are three columns. The first two are the original New Customer/Returning Customer columns. The third column has the three options stacked. I think I should only see the contents of the third column.

 

I'm guessing I missed something in the install, but I can't find it. Does anybody have a quick answer to where I should be looking? I've been looking through this forum but haven't found the same issue so far.

 

Thanks! Janet

Link to comment
Share on other sites

If we are talking about the same thing (the My Account link that takes you to the login page), I don't see how a registered user would log in if the link was not there.  Maybe I'm missing something.

 

 

well, as I see it, all users have a login or sign up link. That one should take you to the login page. Only registered users have an account and should only see the "my account" option after login.

Treasurer MFC

Link to comment
Share on other sites

well, as I see it, all users have a login or sign up link. That one should take you to the login page. Only registered users have an account and should only see the "my account" option after login.

All visitors will see My Account, but if they have not logged in, clicking on My Account takes them to the login page. Once logged in, clicking on My Account takes them to their account page.

Link to comment
Share on other sites

All visitors will see My Account, but if they have not logged in, clicking on My Account takes them to the login page.  Once logged in, clicking on My Account takes them to their account page.

 

like I said, that makes no sense, why should I click on "My account" if I don't have one.

Treasurer MFC

Link to comment
Share on other sites

Thanks for your reply!

I managed to fix it eventually. I can't remember how I did it though. It had to do with switching between the secure and the non-secure part of the site.

Anyhooo, it's fine now.

 

I am encountering the same problem. Does anyone have any hints where to look for this "secure to non-secure" switch?

Link to comment
Share on other sites

like I said, that makes no sense, why should I click on "My account" if I don't have one.

I tend to agree that it makes no sense, but that's the way osC is designed by default. It would be nice if there were a Login and a Create Account link instead (for users who have not logged in).

Link to comment
Share on other sites

I tend to agree that it makes no sense, but that's the way osC is designed by default.  It would be nice if there were a Login and a Create Account link instead (for users who have not logged in).

 

 

well, I have a login link outside the header navigator.

in the header navigator I use this :

 

<?php if (tep_session_is_registered('customer_id')) { ?>

<td nowrap class="headerNavigation"><a href="<?php echo tep_href_link(basename($PHP_SELF), tep_get_all_get_params() . 'action=logoff', 'NONSSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></td>

<td nowrap class="headerNavigation"> | </td>

<?php if (!tep_session_is_registered('noaccount')) { ?>

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

<td nowrap class="headerNavigation"> | </td>

<td nowrap class="headerNavigation"><a href="<?php echo tep_href_link('discount_qualifications.php', '', 'SSL'); ?>"><?php echo TEXT_MY_DISCOUNT; ?></a></td>

<td nowrap class="headerNavigation"> | </td>

<?php }} ?>

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

<td nowrap class="headerNavigation"> | </td>

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

 

that means that pwa users only get the logoff option after they completed their order information successfuly, registered customers get also the my account and my discounts options after successful sign in.

everybody gets the my basket and checkout option but that is also because I use page cache so I need to retain those options at all times.

Treasurer MFC

Link to comment
Share on other sites

Can someone point out to me which of the downloads are required in order to do an initial install of PWA? I have downloaded v0.82 but am unsure if everything is all there in order for me to install. STEP 4 refers to changing some coding which doesnt exist in my current configuration, more specificallyediting code out of v0.71.

 

To make it easier if someone would be so kind as to list the dates of the downloads or direct me to a bundled up version for initial install I would appeciate it immensely.

 

comicsbytheweb

Link to comment
Share on other sites

Hi,

 

I have just installed the PWA contribution, however when trying to view orders placed with it through the admin, I get this error:

 

Parse error: parse error, unexpected T_CASE in /home/stev9321/public_html/sfdm/orders.php on line 76

 

This is the code it refers to: Line 76 = case 'deleteconfirm':

 

The surronding code is :

 

// start pwa changes

$pwa_check_query= tep_db_query("select purchased_without_account from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");$pwa_check= tep_db_fetch_array($pwa_check_query); if ($pwa_check['purchased_without_account'] != '1'){ $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); }

else { $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); } tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

$customer_notified = '1'; }

 

tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

$customer_notified = '1';

}

 

tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "')");

 

$order_updated = true;

}

 

if ($order_updated == true) {

$messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');

} else {

$messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');

}

 

tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit'));

break;

case 'deleteconfirm':

$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);

 

tep_remove_order($oID, $HTTP_POST_VARS['restock']);

 

tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action'))));

break;

}

}

 

if (($action == 'edit') && isset($HTTP_GET_VARS['oID'])) {

$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);

 

$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");

$order_exists = true;

if (!tep_db_num_rows($orders_query)) {

$order_exists = false;

$messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');

}

}

 

include(DIR_WS_CLASSES . 'order.php');

 

Anybody have any idea why this would occur.

 

Thanks

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