Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Step-By-Step Manual Order BETA


frankl

Recommended Posts

  • Replies 98
  • Created
  • Last Reply

Top Posters In This Topic

I found even when following the helpful advice given in this thread i couldnt edit any manually created customer accounts and traded the problem to the error being the wrong figure being put into the database for the address book reference.

 

I also changed the created accounts password to a default of changeme as I foudn the random created one was being put into the database unencrypted and hence the customer wasnt able to log in.

 

Sorry for the double post but i pressed submit before i was ready and you cant edit posts here

Link to comment
Share on other sites

anyone figure out how to install this latest update?

looking at the files,, and doing a compair,, they are totally differnet from beginning to end,, so not sure what changes to make

Regards

Tom

Link to comment
Share on other sites

Finally I've got this mod working ... BUT, I still run into some problems...

1. When I create manually a customer, and submit the details, I get a javascript runtime error ... ::

error.jpg

 

Small translation:

There is a runtime-error

 

Line: 29

Error: 'document.account_edit.confirmation.value' is empty or not an object

 

When I click "no" the customer is added without any problem...

Any one an idea how to get rid of this?!?

 

The second problem is as follow:

When the customer is manually created, a password is send to it's email-address.

But when it wants to login, it gets this error: "Error: No match for E-Mail Address and/or Password."

The customer must click the "Forgot password" link in order to get a new one and to log on.

Does anyone know a solution or the place to find the source of this problem?!

 

But after all, it's a great script! :)

 

Greetings!

Link to comment
Share on other sites

The second problem is as follow:

When the customer is manually created, a password is send to it's email-address.

But when it wants to login, it gets this error: "Error: No match for E-Mail Address and/or Password."

 

Its because the original script put the created password into the database and didnt encrypt it.

 

When the customer then tries to login the script matches an encrypted version of what is typed against the unencrypted database contents. Hence no login.

 

This was a reason i changed it to a default of changeme as it avoids this problems and the countless emails from customers saying ' I cant login'

 

Changes to make to an existing install if yours is working fine to do this are in

 

/admin/create_account_process.php

 

$state = tep_db_prepare_input($HTTP_POST_VARS['state']);

  $country = tep_db_prepare_input($HTTP_POST_VARS['country']);

$password = 'd1e167eec1f4a4dd7337f921fbd7b154:9f';

$password_nocrypt ='changeme';

 

Rem out the randomize script part below

 

/////////////////      RAMDOMIZING SCRIPT BY PATRIC VEVERKA      \\\\\\\\\\\\\\\\\\

 

$t1 = date("mdy");

srand ((float) microtime() * 10000000);

$input = array ("A", "a", "B", "b", "C", "c", "D", "d", "E", "e", "F", "f", "G", "g", "H", "h", "I", "i", "J", "j", "K", "k", "L", "l", "M", "m", "N", "n", "O", "o", "P", "p", "Q", "q", "R", "r", "S", "s", "T", "t", "U", "u", "V", "v", "W", "w", "X", "x", "Y", "y", "Z", "z");

$rand_keys = array_rand ($input, 3);

$l1 = $input[$rand_keys[0]];

$r1 = rand(0,9);

$l2 = $input[$rand_keys[1]];

$l3 = $input[$rand_keys[2]];

$r2 = rand(0,9);

 

$password = $l1.$r1.$l2.$l3.$r2;

 

/////////////////    End of Randomizing Script  \\\\\\\\\\\\\\\\\\\

 

And make this small change to the email sent at the bottom

 

$email_text .= EMAIL_WELCOME . EMAIL_PASS_1 . $password_nocrypt . EMAIL_PASS_2 . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;

    tep_mail($name, $email_address, EMAIL_SUBJECT, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

Link to comment
Share on other sites

Awesome work here...

 

Just one small issue for those of us who charge $ rather than ?... you must edit line 226 in edit_orders.

 

// Set $ot_text (display-formatted value)
$ot_text = "\$" . number_format($ot_value, 2, '.', ',');

 

instead of

// Set $ot_text (display-formatted value)
$ot_text = "\?" . number_format($ot_value, 2, '.', ',');

 

 

Again....solid work!

Link to comment
Share on other sites

*** Warning ***

 

You also need to change the '\?"...

Line 353

text = '\?" . number_format($RunningTax, 2, '.', ',') . "',

Line 360

text = '\?" . number_format($RunningSubTotal, 2, '.', ',') . "',

Line 372

text = '<b>\?" . number_format($Total, 2, '.', ',') . "</b>',

 

 

Sorry for the oversite.

Link to comment
Share on other sites

Qwiz could u give us infos on what u had to change to make it work ?

i didnt actually take notes on this one,, ,, it may have all been just related to my various mods anyway,, also,, looks like u r using ms1 based on u'r signature line and i am running ms2

 

sorry

Tom

Link to comment
Share on other sites

I am having a little problem with the contribution. The first is this

 

create_order_process.php - first change line (around line 102) to suit 2.2 or MS1/MS2

 

 

i do not know what to change. This is what i have around line 102

 

//old
 tep_db_perform(TABLE_ORDERS, $sql_data_array);
 $insert_id = tep_db_insert_id();


   $sql_data_array = array('orders_id' => $insert_id,
'orders_status_id' => $new_value,
'date_added' => 'now()');
tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
 

 

 

So since I have not made that change I was wondering if that is causing my tax rate to be wrong. Right now my tax rate is defaulting to 11.624% but the tax rate for the item is 5.812%

 

I want to thank all you who made this contribution possible this is exactly what I was looking for.

Biscochitos almost as good as grandma

Link to comment
Share on other sites

Chris

in the admin/create_orders_process.php starting right at 102 you should see some code,,, there is one line u comment out,, and one line u uncomment,, depending on what version of oscommerce u r running.

i use ms2,, and here is the way that should look

hope this helps

$sql_data_array = array('orders_id' => $insert_id,

//Comment out line you don't need

// 'new_value' => $new_value, //for 2.2

'orders_status_id' => $new_value, //for MS1 or MS2

'date_added' => 'now()');

 

Tom

Link to comment
Share on other sites

Hello everyone, Just installed the mod and found a couple of things

the $ Pound to $ conversion only works for the initial order editing page, it still seems to stay as a pound in the email to the customer and when one looks at the order in the general order section as well as a customer. also the comments for the order do not seem to be saved and once an order is finished an email is not sent to the customer to inform them of the completed and pending order. this is only sent when the order status is changed to processing.

Any help anyone ??

I am trying to use this for adding auctions that people have won.

Does anyone also know if i could use the 'add product' to just add my own auction products rather then the shop stock items by rewriting it a bit?

Help would be really appreciated. :D

Link to comment
Share on other sites

Gemfields

I added part of another mod,,, to fix the order,, and then restore it to the customers cart,, so they can then log in with the password provided with create account, and then update there shipping info, and check out to complete the order,, that is my solution untill the auction mod comes online.

Tom

Link to comment
Share on other sites

THanks, I have found the error with the $ / pound sign - MY mistake once again :-)

To add an auction in a hurry I have now just added a button which is hardcoded to add a blank article from a category which only has one blank product in it which is marked "out of stock" so normal customers to the shop do not see it.

 

A couple of things I have noted however:

When one presses the update button on the edit_orders page the order is added BUT the comments are not saved AND an email is not sent to the customer even if this is ticked. - anyone hava a fix?

 

Also when a customer looks at the order once they logged on they cannot see the model number (which is what I was going to make the auction number - again anyone know how to fix it? I have done some PHP programming but my head is just frizzly at the moment as I am totally overworked with other stuff.

 

Anyones help would really be appreciated.

 

I had asked the person that was doing the auction mod for a copy but they said to look at it but did not offer a copy so I suppose I will just have to TRY and butcher it from this mod :-(

Link to comment
Share on other sites

I just installed this on MS1 and noticed that when you add a product with attributes it shows the the attribute name and drop down menu to select the attributes but the drop down menu is empty.

 

Is there a fix for this?

Link to comment
Share on other sites

I have got following error, after I have tried to add an new customer.

 

 

 

Fatal error: Cannot redeclare tep_validate_email() (previously declared in /homepages/12/d75470873/htdocs/apotheke/admin/create_account_process.php:24) in /homepages/12/d75470873/htdocs/apotheke/admin/includes/functions/validations.php on line 43

 

 

Who can help me?

Link to comment
Share on other sites

Daniel

 

I had this same problem when using ms2, and Frank was kind enough to help me resolve this issue.

Here is how to fix the problem.

 

If using MS2, go into the create_account_process.php and comment out (i.e. put a /* at the start and a */ at the end) lines starting at No. 24:

 

function tep_validate_email($email) {

$valid_address = true;

 

up to and including lines ending with (and including line 113):

 

return $valid_address;

}

 

This will prevent the mod calling the validate email function twice.

Link to comment
Share on other sites

Now the following Error was there:

 

1062 - Duplicate entry '1' for key 1

 

insert into address_book (customers_id, address_book_id, entry_firstname, entry_lastname, entry_street_address, entry_postcode, entry_city, entry_country_id, entry_gender, entry_company, entry_suburb, entry_zone_id, entry_state) values ('1639', '1', 'blabla', 'blabla', 'blastreet 1', '11111', 'berlin', '81', 'm', 'blabla', '', '91', '')

 

[TEP STOP]

Link to comment
Share on other sites

Daniel

I am so sorry it took me so long to get back to you as i didnt get a notice that you had posted again,

 

try going into create_account_process.php

and finding the line

'address_book_id' => 1,

and changing it to

'address_book_id' => (int)$default_address_id,

 

this fixed the problem for me

let me know

Regards

Tom

Link to comment
Share on other sites

Now It is possible to create a new account. But if I want to add an order to this account, there ist the following error

in create_order_process.php:

 

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

 

insert into orders_status_history (orders_id, new_value, date_added) values ('1427', '1', now())

 

[TEP STOP]

 

How can I solve this (I hope last) problem?

 

Greetings from Berlin

 

Daniel

Link to comment
Share on other sites

Daniel

I had not came accross that one,,

Let me do some thinking about it,, and in the mean time,, maybe someone else may know that one,,

u r running ms2?

Regards

Tom

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