Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Step-By-Step Manual Order


frankl

Recommended Posts

  • Replies 476
  • Created
  • Last Reply

Top Posters In This Topic

okay I have fixed all the link issues and overall lay out to the way I want it.

 

If I create an account and create a manual order all the info is there and I can create an order, However if I goto veiw/edit the customer details even after I created the oder get these errors:

 

Warning: reset(): Passed variable is not an array or object in /web/public_html/catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /web/public_html/catalog/admin/includes/classes/object_info.php on line 18

 

and all the fields are empty on the customer edit page.

 

I can view and edit customers who created their own accounts through the web site.

 

also you can not login with the password that gets email from creating the account.

 

Thak you

Jeff

Link to comment
Share on other sites

i think most of my main issues i have fixed. for the not saving info so you can edit the account i had the wrong line commented outin create_account_process.php

 

$sql_data_array = array('customers_id' => $customer_id,

//cchange line below to suit your version

'address_book_id' => 1, //pre MS2

 

for the password issue i added this function to the create_account_process.php

 

// This function makes a new password from a plaintext password.

function tep_encrypt_password($plain) {

$password = '';

 

for ($i=0; $i<10; $i++) {

$password .= tep_rand();

}

 

$newpw = substr(md5($password), 0, 2);

 

$password = md5($newpw . $plain) . ':' . $newpw;

 

return $password;

}

 

then changed line

'customers_password' => $password,

 

to

'customers_password' => tep_encrypt_password($password),

 

This is a hack I know but it worked for me. hope this helps

Link to comment
Share on other sites

okay I have fixed all the link issues and overall lay out to the way I want it.

 

If I create an account and create a manual order all the info is there and I can create an order, However if I goto veiw/edit the customer details even after I created the oder get these errors:

 

Warning: reset(): Passed variable is not an array or object in /web/public_html/catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /web/public_html/catalog/admin/includes/classes/object_info.php on line 18

 

and all the fields are empty on the customer edit page.

 

I can view and edit customers who created their own accounts through the web site.

 

also you can not login with the password that gets email from creating the account.

 

Thak you

Jeff

 

I am havingthe same prob, All fields are empty if i go to edit a customer. I'm using MS2, so i just uploaded the create_account_process.php contained in the zip.

 

Also when adding an order to a customer, if i complete any comments they don't get appended?

 

Any ideas?

 

cheers

 

stubbsy

Link to comment
Share on other sites

I am havingthe same prob, All fields are empty if i go to edit a customer. I'm using MS2, so i just uploaded the create_account_process.php contained in the zip.

 

This should be the same as my issue search for MS1 and make sure you have the right lines commented out and search for MS2 to make sure the right line are uncommented.

 

Jeff

Link to comment
Share on other sites

hi guys i have installed this mod and amended the files accordingly but nothing happens when i click create account or create order??? it just loads up a blank page, i dunno were to begin? all the permissions are correct and i have double checked that the correct files have been uploaded to the right places.... any suggestions please? oh i have 2.2 btw.

I have read through this thread and seems like everyone got it working. :/

cheers

Edited by alleyesonme
Link to comment
Share on other sites

I installed this mod, everything works except i'm getting only whole $ amounts. no cents. i tried changing it to USD, but this didn't help. any ideas?

i fixed my own problem.

 

i previously had the order edit contrib installed. The new one included in this contribution was the problem. What i did was i uploaded my older order_edit.php files and the currency now has decimal places.

Link to comment
Share on other sites

<snip>

 

2- The way the categories show up. I have many categories and a bunch of sub-categories. many of the sub-categories have the same name. Example:

 

Air Intakes ->Chevy

->Honda

->Hummer

 

SuperChargers ->Chevy

->Honda

->Hummer

 

So in the drop down when manually creating an order, I get a bunch of "Hummer's", "Honda's" or "Chevy's" and I have no clue what the top level category is. Is there a way to modify the query/array to show the top level? In some of the categories, I go 4 and 5 levels deep....... I know this is probably a biggies but unfortunately the dropdown is useless to me now....because of how my product catalog is designed....

 

Besides that, very solid contrib. no errors. writes the correct information to the Db. I like it! Just a little tweaking and this can go down as one of the best contribs around!

Hi, thanks for sharing this great contribution! It's very useful. I have one quick question.

:) Is there a way to modify the query to show the top level when we find the product? I searched for the whole thread and other 2 threads regarding this contribution but I cannot find any solution for this issue. Any help is much appreciated. Thanks.

Best regards,

 

Elmo

Link to comment
Share on other sites

I am having an issue with product attributes, a list shows up but only some of the boxes are populated and they are out of order so I cant even guesstimate which ones to use... any ideas ?

 

Also is there a way to shut off notify as a default setting

Link to comment
Share on other sites

One more this you all need to know is if you are using more than one language you will have to make changes tin the edit_orders where it loads the dropdown selection for cat's and parts otherwise this get screwed up when you try to add products.

 

The code does not use the language_id in any of it's queries

 

Shawn

Link to comment
Share on other sites

<snip>

 

2- The way the categories show up. I have many categories and a bunch of sub-categories. many of the sub-categories have the same name. Example:

 

Air Intakes ->Chevy

                ->Honda

                ->Hummer

 

SuperChargers ->Chevy

                      ->Honda

                      ->Hummer

 

So in the drop down when manually creating an order, I get a bunch of "Hummer's", "Honda's" or "Chevy's" and I have no clue what the top level category is. Is there a way to modify the query/array to show the top level? In some of the categories, I go 4 and 5 levels deep....... I know this is probably a biggies but unfortunately the dropdown is useless to me now....because of how my product catalog is designed....

 

Besides that, very solid contrib. no errors. writes the correct information to the Db. I like it! Just a little tweaking and this can go down as one of the best contribs around!

Hi, thanks for sharing this great contribution! It's very useful. I have one quick question.

:) Is there a way to modify the query to show the top level when we find the product? I searched for the whole thread and other 2 threads regarding this contribution but I cannot find any solution for this issue. Any help is much appreciated. Thanks.

the author was kind enough to provide a tweak to satisfy my needs. if you are interested, send me a PM.

Link to comment
Share on other sites

If I create an account and create a manual order all the info is there and I can create an order, However if I goto veiw/edit the customer details even after I created the oder get these errors:

 

Warning: reset(): Passed variable is not an array or object in /web/public_html/catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /web/public_html/catalog/admin/includes/classes/object_info.php on line 18

 

and all the fields are empty on the customer edit page.

 

I can view and edit customers who created their own accounts through the web site.

 

also you can not login with the password that gets email from creating the account.

 

Thak you

Jeff

i'm having this problem, has anyone fixed it yet?

Link to comment
Share on other sites

Maybe if I ask it this way...

How do you make this link so it includes the osCAdminID=711e419aa660c7bjb371fe26e10243c0f to the end.

 

 

<a href="<? print $PHP_SELF . "?oID=$oID&action=add_product&step=1"; ?>">

 

The below link is what is generated and since there isn't a osCAdminID it sends me to log in.

https://www.domain.com/shop/admin/edit_orde..._product&step=1

 

My brain is fried and I can't think of the answer to save me.

Someone, please help me...

 

M~

Link to comment
Share on other sites

luder1,

 

I'm having the same problem. The only thing I can figure is that the customer entry doesn't get created in the same way that it would through the web site.

 

That's as far as I can get though. Nothing solid yet.

 

Anyone else have any ideas?

 

Thanks,

Benjamin

Edited by TheIdeaMan
Link to comment
Share on other sites

This code should fix both the "edit customer" and "password" problems with the '/admin/create_account_process.php' file in this contribution.

 

Replace the code after the "} else {" around line 357 and before the "// build the message content here" around line 418 with the code below:

 

    $sql_data_array = array('customers_firstname' => $firstname,
                           'customers_lastname' => $lastname,
                           'customers_email_address' => $email_address,
                           'customers_telephone' => $telephone,
                           'customers_fax' => $fax,
                           'customers_newsletter' => $newsletter,
                           'customers_password' => tep_encrypt_password($password));
                           //'customers_password' => $password,
                           //'customers_default_address_id' => 1);

   if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;
   if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob);

   tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

   $customer_id = tep_db_insert_id();

   $sql_data_array = array('customers_id' => $customer_id,
                           //change line below to suit your version
                           //'address_book_id' => 1,  //pre MS2
                           'entry_firstname' => $firstname,
                           'entry_lastname' => $lastname,
                           'entry_street_address' => $street_address,
                           'entry_postcode' => $postcode,
                           'entry_city' => $city,
                           'entry_country_id' => $country);

   if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
   if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company;
   if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb;
   if (ACCOUNT_STATE == 'true') {
     if ($zone_id > 0) {
       $sql_data_array['entry_zone_id'] = $zone_id;
       $sql_data_array['entry_state'] = '';
     } else {
       $sql_data_array['entry_zone_id'] = '0';
       $sql_data_array['entry_state'] = $state;
     }
   }

   tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

$address_id = tep_db_insert_id();

tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");

   tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . tep_db_input($customer_id) . "', '0', now())");

   $customer_first_name = $firstname;
   //$customer_default_address_id = 1;
$customer_default_address_id = $address_id;
   $customer_country_id = $country;
   $customer_zone_id = $zone_id;
   tep_session_register('customer_id');
   tep_session_register('customer_first_name');
   tep_session_register('customer_default_address_id');
   tep_session_register('customer_country_id');
   tep_session_register('customer_zone_id');

 

Hope that helps.

Link to comment
Share on other sites

<snip>

 

2- The way the categories show up. I have many categories and a bunch of sub-categories. many of the sub-categories have the same name. Example:

 

Air Intakes ->Chevy

                ->Honda

                ->Hummer

 

SuperChargers ->Chevy

                      ->Honda

                      ->Hummer

 

So in the drop down when manually creating an order, I get a bunch of "Hummer's", "Honda's" or "Chevy's" and I have no clue what the top level category is. Is there a way to modify the query/array to show the top level? In some of the categories, I go 4 and 5 levels deep....... I know this is probably a biggies but unfortunately the dropdown is useless to me now....because of how my product catalog is designed....

 

Besides that, very solid contrib. no errors. writes the correct information to the Db. I like it! Just a little tweaking and this can go down as one of the best contribs around!

Hi, thanks for sharing this great contribution! It's very useful. I have one quick question.

:) Is there a way to modify the query to show the top level when we find the product? I searched for the whole thread and other 2 threads regarding this contribution but I cannot find any solution for this issue. Any help is much appreciated. Thanks.

the author was kind enough to provide a tweak to satisfy my needs. if you are interested, send me a PM.

I can not make manual orders to

 

1-take all categories level products, i have 2550 productos in all categories

 

2-i use many currencies, should i create one manualorder.php sistem for each currency ?

 

3-every new customer i created, then i can not edit it. appears '

Warning: reset(): Passed variable is not an array or object in /home/altomark/public_html/shop/admin/includes/classes/object_info.php on line 17'

 

4.-

 

 

:unsure: i dont know where to start !!

Link to comment
Share on other sites

If I create an account and create a manual order all the info is there and I can create an order, However if I goto veiw/edit the customer details even after I created the oder get these errors:

 

Warning: reset(): Passed variable is not an array or object in /web/public_html/catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /web/public_html/catalog/admin/includes/classes/object_info.php on line 18

 

and all the fields are empty on the customer edit page.

 

I can view and edit customers who created their own accounts through the web site.

 

also you can not login with the password that gets email from creating the account.

 

Thak you

Jeff

i'm having this problem, has anyone fixed it yet?

 

To all that read this:

 

This error has to do with the primary address for a customer not being updated in the database upon initial creation of their account, I've said this many times in many threads, but no one is comming up with a fix for this problem, I have a work around fix for this problem and it's all explained on my forum under my OSC, but it's not the fix I'm looking for, but it works for now, the disadvantage for my fix is that a customer can't have two address, just one address.

 

Many of us really would like to see a real fix for this problem. It shouldn't be that hard to do.

Best Regards

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