Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 6 votes

NEW! Complete Order Editing Tool!


3242 replies to this topic

#2981 wHiTeHaT

  • Community Member
  • 134 posts
  • Real Name:wHiTy
  • Gender:Male
  • Location:Netherlands

Posted 01 December 2009, 19:06

yes it happens with and without a products attributes.
For the configuration setting you mean quantity pro for atributes. ofcourse i turned it of as i not use it.
It seem to be couse of the option type V2.
I tested localy today on a version without option type v2 ,and there al worked ,however i would like to see this confirmed by someone else.

Thanks in advance

wHiTeHaT ;)

#2982 wHiTeHaT

  • Community Member
  • 134 posts
  • Real Name:wHiTy
  • Gender:Male
  • Location:Netherlands

Posted 01 December 2009, 20:39

i just did a new test and i figured out the errors occure couse of changes to the database by option type v2.

The following database changes where added/altered by option type v2:

# Add Option Types configuration menu in Admin
INSERT INTO `configuration_group` VALUES ('', 'Option Types', 'Configure Option Types and Upload settings.', '17', '1');
UPDATE `configuration_group` SET sort_order = last_insert_id() WHERE `configuration_group_id` = last_insert_id();
INSERT INTO configuration VALUES ('', 'Use Progress Bars?', 'OPTIONS_TYPE_PROGRESS', 'Both', 'Set to use the Progress bar for Text Options<br>None = No Progress Bars<br>Text = Textfields only<br>TextArea = TextAreas only<br>Both = Both Text Fields and Areas', last_insert_id(), '4', now(), now(), NULL, 'tep_cfg_select_option(array(\'None\', \'Text\', \'TextArea\', \'Both\'),'),
                                 ('', 'Upload File Prefix', 'OPTIONS_TYPE_FILEPREFIX', 'Database', 'The prefix that is used to generate unique filenames for uploads.<br>Database = insert id from database<br>Date = the upload Date<br>Time = the upload Time<br>DateTime = Upload Date and Time', last_insert_id(), '5', now(), now(), NULL, 'tep_cfg_select_option(array(\'Database\', \'Date\', \'Time\', \'DateTime\'),'),
                                 ('', 'Delete Uploads older than', 'OPTIONS_TYPE_PURGETIME', '-2 weeks', 'Uploads in the Temporary folder are automatically deleted when older than this setting.<br>Usage: -2 weeks/-5 days/-1 year/etc.', last_insert_id(), '6', now(), now(), NULL, NULL),
                                 ('', 'Upload Directory', 'UPL_DIR', 'images/uploads/', 'The directory to store uploads from registered customers.', last_insert_id(), '7', now(), now(), NULL, NULL),
                                 ('', 'Temporary Directory', 'TMP_DIR', 'images/temp/', 'The directory to store temporary uploads (from guests) which is automatically cleaned.', last_insert_id(), '8', now(), now(), NULL, NULL),
                                 ('', 'Option Type Image - Images Directory', 'OPTIONS_TYPE_IMAGEDIR', 'images/options/', 'What directory to look for Option Type Images.<br>This is where the Images should be stored.', last_insert_id(), '9', now(), now(), NULL, NULL),
                                 ('', 'Option Type Image - Images Prefix', 'OPTIONS_TYPE_IMAGEPREFIX', 'Option_', 'What prefix to use when looking for Option Type Images.<br>This is what the Image\'s name should begin with.', last_insert_id(), '10', now(), now(), NULL, NULL),
                                 ('', 'Option Type Image - Images Name', 'OPTIONS_TYPE_IMAGENAME', 'Name', 'What Option Value item to use as Name for the Option Type Images.<br>When set to "Name", the images should be named: "PREFIX"-"Option value name"-"LanguageID".jpg (Option_RedShirt_1.jpg)<br>When set to "ID", the images should be named: "PREFIX"-"Option value ID"-"LanguageID".jpg (Option_5_1.jpg)', last_insert_id(), '11', now(), now(), NULL, 'tep_cfg_select_option(array(\'Name\', \'ID\'),'),
                                 ('', 'Option Type Image - Use Language ID', 'OPTIONS_TYPE_IMAGELANG', 'Yes', 'Use language ID in Option Type Images Names?<br>This is only needed if different images are used per Language (images with text for example).', last_insert_id(), '12', now(), now(), NULL, 'tep_cfg_select_option(array(\'Yes\', \'No\'),');


# Add products_options type, length (txt fields), and comment to options
ALTER TABLE products_options
  ADD products_options_type INT( 2 ) NOT NULL ,
  ADD products_options_length INT( 2 ) DEFAULT '32' NOT NULL ,
  ADD products_options_order VARCHAR( 32 ) DEFAULT '1' NOT NULL ,
  ADD products_options_comment VARCHAR( 32 ) AFTER products_options_name;

# Add Attributes Sort Order to the basket attributes table
ALTER TABLE products_attributes
  ADD products_options_sort_order INT( 2 ) DEFAULT '1' NOT NULL;

# Add option value text to the basket attributes table
ALTER TABLE customers_basket_attributes
  ADD products_options_value_text VARCHAR( 32 ),
  CHANGE `products_options_id` `products_options_id` VARCHAR( 32 ) NOT NULL;

# Following Table is used to store Uploaded files (and generate unique file-ID's) -- This is to track Customer Uploads
CREATE TABLE `files_uploaded` (
`files_uploaded_id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`sesskey` VARCHAR( 32 ) ,
`customers_id` INT( 11 ) ,
`files_uploaded_name` VARCHAR( 64 ) NOT NULL ,
`date` VARCHAR( 32 ) ,
PRIMARY KEY ( `files_uploaded_id` )
) COMMENT = 'Must always have either a sesskey or customers_id';


#2983 Solan

  • Community Member
  • 252 posts
  • Real Name:Solan
  • Gender:Female
  • Location:Sweden

Posted 05 December 2009, 14:59

How do i do if i have a nother language than the files in the package?

#2984 wHiTeHaT

  • Community Member
  • 134 posts
  • Real Name:wHiTy
  • Gender:Male
  • Location:Netherlands

Posted 06 December 2009, 12:22

View PostSolan, on 05 December 2009, 14:59, said:

How do i do if i have a nother language than the files in the package?

copy for example the english translation to it and replace the text with the language you want.

#2985 Octane

  • Community Member
  • 2 posts
  • Real Name:Michael

Posted 08 December 2009, 14:06

Are there step-by-step instructions on how to install this please?

I hope this isn't a repost, but 152 pages is taking me ages to read through!

Thanks
Michael

#2986 surfalot

  • Community Member
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 08 December 2009, 19:57

View PostOctane, on 08 December 2009, 14:06, said:

Are there step-by-step instructions on how to install this please?

I hope this isn't a repost, but 152 pages is taking me ages to read through!

Thanks
Michael
why yes, yes there is. The INSTALL.htm doc in the download should do it.

nobody expect you to read an entire topic before posting. the last few pages should be sufficient for anyone.

#2987 gregp

  • Community Member
  • 60 posts
  • Real Name:Greg

Posted 09 December 2009, 06:18

Great module thanks! One question; whenever I update an order and the email is sent out, the order number always comes up as 0 in the email subject. $oID works at least somewhere in edit_orders.php script as the html interface works faultlessly and <?php print $oID; ?> in the html returned the correct number. But not in the email. Any clues?

I guess like any new contribution I don't know how the different files all work in together - I've been editing edit_orders.php as this is the page that the admin interface uses and contains lots of tep_mail commands; but I note edit_orders_ajax.php has some too; I have ajax enabled so maybe I should be hunting in there, but when I edit the order in the admin interface I'm still using edit_orders.php, not the ajax version.


Regardless, if someone can point me in the right direction for the root cause of this problem I'd be most grateful. I do have the purchase without account module installed on the offchance that has anything to do with this.

Update... I've just turned off ajax and found that edit_orders.php now gets used. The order number DOES display OK in this file, just not in the ajax one for some reason.

Edited by gregp, 09 December 2009, 06:32.


#2988 fruchtge

  • Community Member
  • 15 posts
  • Real Name:Jens Honda
  • Gender:Male
  • Location:Berlin

Posted 09 December 2009, 18:22

Hi there,

i have a question to this part of the code in edit_orders.php


          // For each available payment module, check if enabled
          for ($i=0, $n=sizeof($directory_array); $i<$n; $i++) {
          $file = $directory_array[$i];

          include(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/payment/' . $file);
          include($module_directory . $file);

          $class = substr($file, 0, strrpos($file, '.'));
          if (tep_class_exists($class)) {
             $module = new $class;
             if ($module->check() > 0) {
              // If module enabled create array of titles
                     $enabled_payment[] = array('id' => $module->title, 'text' => $module->title);

                      //if the payment method is the same as the payment module title then don't add it to dropdown menu
                      if ($module->title == $order->info['payment_method']) {
                              $paymentMatchExists='true';
                         }
              }
            }
          }
                 //just in case the payment method found in db is not the same as the payment module title then make it part of the dropdown array or else it cannot be the selected default value
                  if ($paymentMatchExists !='true') {
                        $enabled_payment[] = array('id' => $order->info['payment_status'], 'text' => $order->info['payment_method']);
           }
            $enabled_payment[] = array('id' => 'bar', 'text' => 'Bar');
            $enabled_payment[] = array('id' => 'terminal', 'text' => 'Terminal CC/EC');
                    //draw the dropdown menu for payment methods and default to the order value
                            if (ORDER_EDITOR_USE_AJAX == 'true') {
                          echo tep_draw_pull_down_menu('update_info_payment_method', $enabled_payment, $order->info['payment_method'], 'id="update_info_payment_method" style="width: 150px;" onChange="init(); updateOrdersField(\'payment_method\', this.options[this.selectedIndex].text)"');
                          } else {
                          echo tep_draw_pull_down_menu('update_info_payment_method', $enabled_payment, $order->info['payment_method'], 'id="update_info_payment_method" style="width: 150px;" onChange="init();"');
                          }
                    }  else { //draw the input field for payment methods and default to the order value  ?>

                   <input name="update_info_payment_method" size="35" value="<?php echo $order->info['payment_method']; ?>" id="update_info_payment_method" onChange="init();<?php if (ORDER_EDITOR_USE_AJAX == 'true') { ?> updateOrdersField('payment_method', encodeURIComponent(this.value));<?php } ?>">

                   <?php } //END for payment dropdown menu use this by quick_fixer ?>





in this part

$enabled_payment[] = array('id' => $module->title, 'text' => $module->title);    

the payment module title is read and if i change it to

$enabled_payment[] = array('id' => $module->code, 'text' => $module->title);    

the payment module code is read and in this part

                        $enabled_payment[] = array('id' => $order->info['payment_status'], 'text' => $order->info['payment_method']);
           }
            $enabled_payment[] = array('id' => 'bar', 'text' => 'Bar');
            $enabled_payment[] = array('id' => 'terminal', 'text' => 'Terminal CC/EC');
                    //draw the dropdown menu for payment methods and default to the order value
                            if (ORDER_EDITOR_USE_AJAX == 'true') {
                          echo tep_draw_pull_down_menu('update_info_payment_method', $enabled_payment, $order->info['payment_method'], 'id="update_info_payment_method" style="width: 150px;" onChange="init(); updateOrdersField(\'payment_method\', this.options[this.selectedIndex].text)"');
                          } else {
                          echo tep_draw_pull_down_menu('update_info_payment_method', $enabled_payment, $order->info['payment_method'], 'id="update_info_payment_method" style="width: 150px;" onChange="init();"');
                          }
                    }  else { //draw the input field for payment methods and default to the order value  ?>

                   <input name="update_info_payment_method" size="35" value="<?php echo $order->info['payment_method']; ?>" id="update_info_payment_method" onChange="init();<?php if (ORDER_EDITOR_USE_AJAX == 'true') { ?> updateOrdersField('payment_method', encodeURIComponent(this.value));<?php } ?>">

                   <?php } //END for payment dropdown menu use this by quick_fixer ?>

the module 'title' now 'text' and $order->info['payment_method'] is written in the field payment_method in table order. My question is now how can I wirte 'code' now 'id' into a new field in table orders called payment_code at the same time. Problem is that input values are used an i only can define one value.

please help me i have no idea thank you!
life long and knusper

#2989 exca

  • Community Member
  • 23 posts
  • Real Name:yunanto

Posted 10 December 2009, 10:57

help me..
i was intall " Autoinstaller 2.14 for Order Editor 5.0.6.6' BUT SOMETHING happend.
the editor work perfect but
why i lost my email function? so when some order and purcahe, they not get email confirmation? an dif i update status order, buyer also miss email update? anyone can help me..??please....
or can help me to reapir my email function.

i knew this condition after buyer tell me not receive email

i also intall qtpro

#2990 surfalot

  • Community Member
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 11 December 2009, 03:51

View Postexca, on 10 December 2009, 10:57, said:

help me..
i was intall " Autoinstaller 2.14 for Order Editor 5.0.6.6' BUT SOMETHING happend.
the editor work perfect but
why i lost my email function? so when some order and purcahe, they not get email confirmation? an dif i update status order, buyer also miss email update? anyone can help me..??please....
or can help me to reapir my email function.

i knew this condition after buyer tell me not receive email

i also intall qtpro

you might want to try to PM Pektsekye since that person put together the autoinstaller version. I don't see now a normal install would affect the sending of email notification functions.

#2991 surfalot

  • Community Member
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 11 December 2009, 05:09

View Postgregp, on 09 December 2009, 06:18, said:

Great module thanks! One question; whenever I update an order and the email is sent out, the order number always comes up as 0 in the email subject. $oID works at least somewhere in edit_orders.php script as the html interface works faultlessly and <?php print $oID; ?> in the html returned the correct number. But not in the email. Any clues?

I guess like any new contribution I don't know how the different files all work in together - I've been editing edit_orders.php as this is the page that the admin interface uses and contains lots of tep_mail commands; but I note edit_orders_ajax.php has some too; I have ajax enabled so maybe I should be hunting in there, but when I edit the order in the admin interface I'm still using edit_orders.php, not the ajax version.


Regardless, if someone can point me in the right direction for the root cause of this problem I'd be most grateful. I do have the purchase without account module installed on the offchance that has anything to do with this.

Update... I've just turned off ajax and found that edit_orders.php now gets used. The order number DOES display OK in this file, just not in the ajax one for some reason.
hmm, the order number is not part of the subject of a customer email in the default shop. I'm guessing maybe you are modifying your code to add that. $oID is valid in many of the functions in edit_orders.php, not not so in edit_orders_ajax.php. If you are working in the edit_orders_ajax.php file, you would probably have better luck using (int)$_GET['oID'] to use an order number in that script.

#2992 Franklin Ferreira

  • Community Member
  • 4 posts
  • Real Name:Franklin Ferreira

Posted 11 December 2009, 20:06

Hello partners

I've got a problem to edit some orders.

When I click to change the quantity of any product in the list, appears the box with "Working, please wait" and then the box shipping quotes and orders total box disappear.

I looked around this forum but not found solution, please help me.

Thanks

Edited by Franklin Ferreira, 11 December 2009, 20:07.


#2993 wHiTeHaT

  • Community Member
  • 134 posts
  • Real Name:wHiTy
  • Gender:Male
  • Location:Netherlands

Posted 11 December 2009, 21:58

Optiontype V2 was NOT the guilty one.
I did a reïnstall and all worked well.
But i have to continue my investigation of what broke the code.
My suspicion is now focused on the "manual order entry" contribution.This one i havent reïnstalled yet.

#2994 tfoolen

  • Community Member
  • 45 posts
  • Real Name:Tom Foolen

Posted 14 December 2009, 12:53

Nice contrib; easy to install.

However: when I add a product to the order, the order total doesn't change. Anyone a clue on that? Same goes for a new order creation (I have also installed this contrib).

Furthermore: after adding a product to the order, I get
Fatal error: Call to a member function count_contents() on a non-object in catalog\includes\modules\order_total\ot_qty_discount.php on line 53

Contrib for qty discount seems to work fine in the rest of the application.

Ciao,
Tom

#2995 Franklin Ferreira

  • Community Member
  • 4 posts
  • Real Name:Franklin Ferreira

Posted 14 December 2009, 17:07

View Postmaxxxie, on 18 August 2007, 02:53, said:

Hi DJ,

This didn't produce an output - however, here's something interesting. Recalling something I'd read in an earlier post about replacing 'require' statements with 'include' statements, and that doing this had fixed some other problem I'd experienced with this contribution, I did the same in edit_orders_ajax.php. And voila! IT WORKS!!!!!!!!!!!!!!! Maxxxie is a happy girl :)

Yippeeeee!!!

One last thing - when I turn off Ajax and use IE to edit the order, I still get the problem of the missing Update button. However, my care factor for this right now is approximately zero :)

DJ, your assistance has been very much appreciated. I can't remember the last time I encountered someone who was so responsive with troubleshooting their contribution :D

Max


Hi Maxxie, can you explain in detail how do you fix this problem?

Tnks

#2996 Franklin Ferreira

  • Community Member
  • 4 posts
  • Real Name:Franklin Ferreira

Posted 15 December 2009, 11:29

View PostFranklin Ferreira, on 11 December 2009, 20:06, said:

Hello partners

I've got a problem to edit some orders.

When I click to change the quantity of any product in the list, appears the box with "Working, please wait" and then the box shipping quotes and orders total box disappear.

I looked around this forum but not found solution, please help me.

Thanks


I found what I think may be the cause of the error.
This is occurring when the list of products is very large ...

Can anyone help? I can not solve this ...

#2997 surfalot

  • Community Member
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 16 December 2009, 00:49

View PostFranklin Ferreira, on 15 December 2009, 11:29, said:

I found what I think may be the cause of the error.
This is occurring when the list of products is very large ...

Can anyone help? I can not solve this ...

what is "very large"?

#2998 Franklin Ferreira

  • Community Member
  • 4 posts
  • Real Name:Franklin Ferreira

Posted 16 December 2009, 11:22

View Postsurfalot, on 16 December 2009, 00:49, said:

what is "very large"?


Hi

A lists with 15 up to 60 items.

The error also occurs when i click in the radio box to modify the shipping tax.


Tnks

#2999 nafri

  • Community Member
  • 124 posts
  • Real Name:naf

Posted 21 December 2009, 14:32

hi

i got a small issue with order editor..
When customer places an order online .on the admin side the sort order of the order total is

subtotal
shipping
tax
total

When i edit the order to add an other item .The sort order changes to

subtoal
tax
shipping
total

the total calculated is right..but the sort order is not.shipping should be before tax.I have checked the order total module and the sort is set as
Sub-Total 1
shipping 2
tax 3
total 4

does anybody know why the sort order changes.when order is edited.Also when i create a manual order the shipping also shows up after tax.

kind regards

nafri

#3000 Steelworks

  • Community Member
  • 65 posts
  • Real Name:Zach

Posted 21 December 2009, 23:18

Im looking for a bit of help. When I am attempting to send a new order confirmation email, I am getting an error that reads
"1146 - Table 'XXXXXX.eorder_text' doesn't exist
SELECT * FROM eorder_text where eorder_text_id = '2' and language_id = '1'

Now, from what I can tell, this is related to the email_order_text contribution, which I dont have. HTML emails is turned off, HTML Invoices is turned off. What am I missing here?

Thanks for your help ppl. Now Im gunna read back thru to find that fix for the Status is blank/Order number is 0 problem that I saw a few pages back.