Jump to content
musicmaster

[Free Script] Prestools Suite: Mass Edit, Order Edit And Much More

Recommended Posts

I guess I should write in this thread because I am using the new module...

 

This module works just fine, however, there is one potential problem... When a product is manually added to the order, the appropriate TAX RATE is not applied - tax is listed at 0%. Is this normal? I cannot manually modify the Tax either.

 

Any suggestions to this issue?

Share this post


Link to post
Share on other sites

@spiffyd: I saw you are from the US. So I assume the tax is specific for the states. As the script only took the country into account when determining which tax was applicable that may have caused the problem.

 

I have adapted the script (see at post #1). Can you test it?

Share this post


Link to post
Share on other sites

I just tested out 1.02. When I added a new product to the order with your module, I don't see changes in tax column, it still says 0%.

 

If you can't get it working, maybe is there a way to turn that column to an input box so the user can manually specify a tax percentage? It's at least a workaround.

Share this post


Link to post
Share on other sites

My preferred way to go forward would be if you sent me some of your database files (product and all the tax files). I could then check better what goes wrong. You might also help with a screendump of what the order_edit looks immediately after you added a product.

 

I added a little debug line to the code so please use the newly updated version. It gives a line with info at the right top when you add a product .

 

Changing the tax field would be a major effort. Besides, I think it would be disadvantageous for most people as they would run the risk to accidentally change their taxes. If you want a workaround you could put the taxes as a negative discount in the general section of the order.

Share this post


Link to post
Share on other sites

Hi musicmaster and ty for this great script!

I have 2 questions for you (sorry for my english...

- Is possible insert the stock quantity data in the Product Edit sections?

- Is possible a "mass update system" and not 1by1? (like Mass Update module)

 

i'm looking for a mass update method for the stock of my ecommerce filtered by name...

Edited by PEPPE83

Share this post


Link to post
Share on other sites

Hi Peppe83,

 

I added the stock quantity and made mass update a bit easier with a "submit all" function. Mass changes are planned for some future version. Please have a look and see if everything works ok.

Share this post


Link to post
Share on other sites

Hi Peppe83,

 

I added the stock quantity and made mass update a bit easier with a "submit all" function. Mass changes are planned for some future version. Please have a look and see if everything works ok.

 

Hi musicmaster.........THANK YOU!!!!!! I test the new version now... :D

 

EDIT: i see only a big X in the quantity row....

Edited by PEPPE83

Share this post


Link to post
Share on other sites

I made a few more changes. The main problem was that when the table had been sorted with one of the headings above the columns it no longer worked correctly. I hope that is now repaired (it was quite complicated).

Share this post


Link to post
Share on other sites

HI,

 

Thanks for your script. Works perfect!

 

i have a question about security of the script.

 

What do i need to delete from login1.php, that it won't give the popup anymore and after that only the login? so this line also removed : Please first generate a hash key from your password and insert it at the top of the file "login1.php"

 

Thanks again for your script,

 

Fabian

Share this post


Link to post
Share on other sites

Hi, I'm using this great script to edit product descriptions. Is it possible to increase the size of the textarea for short and long descriptions without manually expanding the box, by using rows and cols?

 

I assume these lines would need editing but I'm not sure how:

 

 

if (in_array("shortdescription", $input["fields"]))   $infofields[$if_index++] = array("description_short","", "description_short", DISPLAY, 0, LEFT, NO_SORTER, TEXTAREA); if (in_array("description", $input["fields"]))   $infofields[$if_index++] = array("description","", "description", DISPLAY, 0, LEFT, NO_SORTER, TEXTAREA);

 

 

Cheers

Share this post


Link to post
Share on other sites

Hi, I've tried editing the below line by increasing the height and adding a width but I can't get it to work. To be honest I'm not sure what I'm doing!

 

else if((field=="description") || (field=="meta_description"))
    tblEl.rows[i].cells[fieldno].innerHTML = '<textarea name="'+field+row+'" height="3" onchange="reg_change(this);">'+tmp+'</textarea>';

 

Cheers

Share this post


Link to post
Share on other sites

The "height=" attribute very probably doesn't do anything. An unfortunate but harmless programming mistake.

 

Instead you should use the usual attributes of a textarea: rows and columns. So instead of 'height="3"' you might get 'rows="5" cols="30"' for example.

Share this post


Link to post
Share on other sites

Hi,

 

Is there any chance this has been updated for 1.5.2? I desperately need to manually edit the Warehouse Id field in the order_details table. If it hasn't been updated yet, any pointers on how to edit the code to include the Warehouse_Id field would be greatly appreciated! Excellent Script

Share this post


Link to post
Share on other sites

I have just given up (again) on PS 1.5 because it is so instable and because unlike 1.4 persistent trying doesn't help. So I very probably won't spend any time on fitting the script for 1.5 before next year.

 

The easiest way to insert the warehouse id is probably to put it in place of another similar variable. You should start with the big table as that is the place where the variable name is set. If the variable is not in the product table itself you should also look at the processing file and add the right processing code there.

Edited by musicmaster

Share this post


Link to post
Share on other sites

Hi, I've just noticed a problem with the edit orders mod - If you add a product to the order the currency is in the shop default currency rather than the order currency.

Share this post


Link to post
Share on other sites

Hi Pel024, Could you have a look at the attached file an test it for me? It should solve your currency problem.

 

Update: File removed. It can be found as part of the latest version of the script in post #1

Edited by musicmaster

Share this post


Link to post
Share on other sites

Anyone ever try this in PS 1.5.2? I'm getting the error below because it doesn't look like approve.php exists in the admin directory.

 

Fatal error: require() [function.require]: Failed opening required 'approve.php' (include_path='.:/usr/local/php52/pear') in /home/incontis/public_html/admin123/order_edit.php on line 3

Share this post


Link to post
Share on other sites

Anyone ever try this in PS 1.5.2? I'm getting the error below because it doesn't look like approve.php exists in the admin directory.

 

Fatal error: require() [function.require]: Failed opening required 'approve.php' (include_path='.:/usr/local/php52/pear') in /home/incontis/public_html/admin123/order_edit.php on line 3

 

Ok, I see what I did. I only downloaded the order_edit.zip file from post #29 which only had the order_edit.php file in it. I now downloaded the zip file 1.04 from the original post and get the following error message. I know I am logged in because I have my admin page opened on another tab. Even tried logging out and back in.

 

"Plz login to view this page"

Share this post


Link to post
Share on other sites

Works fine in 1.5.2.

and for order in 1.3.

 

Do oy have the edit product php for Prestashop 1.3.3

Thanks

Best regards

 

the Error in PS 133

 

MySQL error 1146: Table 'lxxx_tax_rule' doesn't exist

Generated by URL '/lxxxx/product_edit.php'

with Query 'SELECT rate,name,tr.id_tax_rule,g.id_tax_rules_group FROM axxxx_tax_rule tr LEFT JOIN a133_tax t ON (t.id_tax = tr.id_tax) LEFT JOIN axxxxx_tax_rules_group g ON (tr.id_tax_rules_group = g.id_tax_rules_group) WHERE tr.id_country = '8''

Share this post


Link to post
Share on other sites

Tried in PS 1.5.2 and it works, but it would be nice if it was possible to (for products)

Edit more than one language at once

Edit combinations

Edit images (and, nothing happens when I toggle hide/show for image)

Edit categories

 

Question: What is the X at the first row?

 

/Mats

Share this post


Link to post
Share on other sites

Mohsart, thanks for your suggestions.

 

The X at the first row is to remove records from the view. This is easy to keep overview. It is also with an eye on future extensions where you might get the possibility to apply certain changes for all products in view. For example to raise all prices with 5% or to add the same description to a number of related products.

Share this post


Link to post
Share on other sites

Well its important for me to see deducting ITEM (which is usually VOUCHER) on invoice. nothing to do shipping and handling.

 

I dont want to change price directly, but with voucher. If customer did use voucher, its OK on invoice. But sometimes they forgot to use it, so i need to deduct price. I dont want to change price directly, but with voucher.

 

hope you understand

thanks

Share this post


Link to post
Share on other sites

Hello I am using PS1.4.7.0

When trying to see the order_edit.php I get:

 

Plz login to view this page

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web-owner/data/********/someadminfolder/approve.php:5) in /var/www/web-owner/data/********/someadminfolder/approve.php on line 6

Edited by a_smith

Share this post


Link to post
Share on other sites

it works in 1.5 great tool!!

 

any hint on how to enable edit categories too in product_edit.php?

 

(i mean for changing the category products are in)

Edited by misthero

Share this post


Link to post
Share on other sites

In their simplest form categories are rather similar to manufacturers. What makes it complicated is that you can have more than one category for a product and that there is a default category. An additional problem is that you would need a format that displayed in a transparent way in which categories a product is. That is difficult to do without taking a lot of space.

 

It is for those complications that categories are not changeable. It is just too much work - at least for the moment.

Share this post


Link to post
Share on other sites

Hello musicmaster, at first thx a lot for a great job :-)

 

i have one little problem, if i want to edit order, and add item which is in sale, it add a product with a non-sale price, for example product cost 28,50€, sale price is 22,50€, if i add this product to order, the price added will be 28,50... could you look on it ? thanks for your answer

Share this post


Link to post
Share on other sites

Hello I am using PS1.4.5.1

When trying to see the order_edit.php I get:

 

Plz login to view this page

Warning: Cannot modify header information - headers already sent by (output started at /home/fancyc6/public_html/****admin/triple_edit_1.04/approve.php:5) in /home/fancyc6/public_html/*****ADMIN/triple_edit_1.04/approve.php on line 6

 

Any Idea?

 

thanks

Share this post


Link to post
Share on other sites

@lubo_ke: I have looked at it but adding discounts would have its own problems. What do you do when the discount has changed between the order date and the date of the change?

 

So I think it is better when discounts are applied manually in the discounts field of the order.

Share this post


Link to post
Share on other sites

Hello,

 

I'm having problems when I try to add a new product with 1.3.2.3:

 

The error message says:

 

from ps_product p left join ps_product_lang pl on p.id_product=pl.id_product and pl.id_lang='3' left join ps_lang l on pl.id_lang=l.id_lang left join ps_tax_rule tr on tr.id_tax_rules_group=p.id_tax_rules_group AND tr.id_country='6' AND tr.id_state='173' left join ps_tax t on t.id_tax=tr.id_tax left join ps_tax_lang tl on t.id_tax=tl.id_tax and tl.id_lang='3' left outer join ps_product_attribute a ON a.id_product=p.id_product AND a.default_on='1' where true AND (p.reference like '%protector%' or p.supplier_reference like '%protector%' or pl.name like '%protector%')

MySQL error 1146: Table 'prestashop.ps_tax_rule' doesn't exist

Generated by URL '/adminA2/add_product.php'

with Query 'SELECT COUNT(*) AS rcount from ps_product p left join ps_product_lang pl on p.id_product=pl.id_product and pl.id_lang='3' left join ps_lang l on pl.id_lang=l.id_lang left join ps_tax_rule tr on tr.id_tax_rules_group=p.id_tax_rules_group AND tr.id_country='6' AND tr.id_state='173' left join ps_tax t on t.id_tax=tr.id_tax left join ps_tax_lang tl on t.id_tax=tl.id_tax and tl.id_lang='3' left outer join ps_product_attribute a ON a.id_product=p.id_product AND a.default_on='1' where true AND (p.reference like '%protector%' or p.supplier_reference like '%protector%' or pl.name like '%protector%') '

Could you help me??

Thanks a lot!!!

Share this post


Link to post
Share on other sites

I have tried with the 1.5 and with 1.4 version. But the result is the same:

 

MySQL error 1146: Table 'prestashop.ps_tax_rule' doesn't exist

 

:(

 

I have checked on my database this table, and it doesn't exist. How can I solve it?

 

Thanks a lot!

 

@OrtopediaPlus.com: in the first post with the downloads you will also find links to the previous version of this script. You should look there.

Share this post


Link to post
Share on other sites

@OrtopediaPlus.com: I don't understand you. First you complain that the present software doesn't work with version 1.3. And when I then refer you to a version that should work with 1.3 you complain that that software doesn't work with 1.4 and 1.5.

Share this post


Link to post
Share on other sites

Hi all,

Upon logging in I get the following error:

 

Warning: require(../config/settings.inc.php) [function.require]: failed to open stream: No such file or directory in /admin123/Orderedit/order_edit.php on line 4

 

Fatal error: require() [function.require]: Failed opening required '../config/settings.inc.php' (include_path='.:/usr/local/php5/lib/php') in /admin123/Orderedit/order_edit.php on line 4

Edited by lisajef

Share this post


Link to post
Share on other sites

Hello,

thank you very much for the changes made. I still had the old version and so far everything has worked in version 1.4.7.3

 

I wanted to ask if you have solved the issue of why yes combinations would be good to have it.

Another thing, if I have wholesale and retail prices for different groups of customers, non lo manages why this script? I read in one of the lines order_edit.php including calling prices for groups, but does not work.

Share this post


Link to post
Share on other sites

Hi AppTechDesigner,

 

Combinations work.

 

Groups and other discounts and special prices don't work. As it is quite some work and I don't need it myself I don't have any plans for it either.

Share this post


Link to post
Share on other sites

Hi,

I used a earlier version with a lot of pleasure! It really helped me a lot thanks for that.

 

But 4 months ago it did not work anymore... it can be because i changed server but i am not sure about that. In firefox i get to see a white page with noting on it, in chrome i get the following error: HTTP-fout 500 (Internal Server Error). Putting the restrictions to 777 didn't help for testing. Any idea what can it can be?

Share this post


Link to post
Share on other sites

Hi.

 

Thank you for this script.Need help plss..

Using ps1.4.8.2 and already unzipped and upload all the files in triple edit 1.08 to admin directory..

So I think already in the correct directory - my link:www.myshop.com/shop/myadmin/order_edit.php

 

but when try to access the status is Plz login to view this page.

But i already login to my backoffice.

 

What I did wrong?

 

Thanks in advance!

Edited by halenaa

Share this post


Link to post
Share on other sites

Hi Smiles,

 

Can you check that you copied all the files to your admin directory? You might take a fresh install to be sure you have all the files.

 

As i had the same error wit the 4 files version i tryed to instal it again. And on your advice once more but the error stays the same...

Share this post


Link to post
Share on other sites

Hi.

 

Thank you for this script.Need help plss..

Using ps1.4.8.2 and already unzipped and upload all the files in triple edit 1.08 to admin directory..

So I think already in the correct directory - my link:www.myshop.com/shop/myadmin/order_edit.php

 

but when try to access the status is Plz login to view this page.

But i already login to my backoffice.

 

What I did wrong?

 

Thanks in advance!

This is comes from a readme file of an earlyer version it is missing in the lates version:

 

** Security addon ** note this is lite security!!

 

upload md5.php and visit it, then fill in the box with you brand new password

 

edit login1.php and replace your_md5_hash_goes_here with your new md5 hash string

 

delete md5.php from server

 

uploade the other files to /prestashop_folder/admin_folder/

 

go ahead and safely change orders.

Share this post


Link to post
Share on other sites

Hi.

 

Thank you for this script.Need help plss..

Using ps1.4.8.2 and already unzipped and upload all the files in triple edit 1.08 to admin directory..

So I think already in the correct directory - my link:www.myshop.com/shop/myadmin/order_edit.php

 

but when try to access the status is Plz login to view this page.

But i already login to my backoffice.

 

What I did wrong?

 

Thanks in advance!

I Halenaa, i had your same problem.

I solved using www.myshop.com/shop/myadmin/login1.php

 

Hy

Share this post


Link to post
Share on other sites

This is comes from a readme file of an earlyer version it is missing in the lates version:

 

Hi.

 

Ok can access now thanks to your help with max-viola.

Edited by halenaa

Share this post


Link to post
Share on other sites

I Halenaa, i had your same problem.

I solved using www.myshop.com/shop/myadmin/login1.php

 

Hy

 

Updated

 

for product.edit php.

After i click edit the short description my short description text is not in the editable box unlike long description which in the editable box.

 

and in the editable box have this <p>◄<span style= or this <div id= and my description (not editable) and at the end got this code " onchange="reg_change(this);" /> (not editable)

 

so I don't know how to edit my short description.

 

Please guide me

 

Thanks

Edited by halenaa

Share this post


Link to post
Share on other sites

Here is a first release of version 1.09.

 

The main difference is that it can edit categories in product_edit. As it involves quite a lot of new code (nearly 200 lines) I would appreciate it when some people test it and give feedback.

Edited by musicmaster

Share this post


Link to post
Share on other sites

Here is a first release of version 1.09.

 

The main difference is that it can edit categories in product_edit. As it involves quite a lot of new code (nearly 200 lines) I would appreciate it when some people test it and give feedback.

 

Can i test it on a live site or (of course) better in test enviroment?

Share this post


Link to post
Share on other sites

@McDaim: PS offers excellent options for changing payment from bankwire to Paypal - so there is no need for that in the script. As for the tax: which module do you mean: order_edit or product_edit?

 

@Smiles: You can see the software as version 1.08 with some extra's. With 1.08 I haven't heard complaints so it is mainly editing categories where you should take some care.

Share this post


Link to post
Share on other sites

@McDaim: PS offers excellent options for changing payment from bankwire to Paypal - so there is no need for that in the script. As for the tax: which module do you mean: order_edit or product_edit?

 

@Smiles: You can see the software as version 1.08 with some extra's. With 1.08 I haven't heard complaints so it is mainly editing categories where you should take some care.

I mean order edit, exsample customer buy, payment methode Bank Wire but will edit to PayPal, or payment PayPal edit to Bank Wire and also nice is if Tax edit possible

Share this post


Link to post
Share on other sites

I mean order edit, exsample customer buy, payment methode Bank Wire but will edit to PayPal, or payment PayPal edit to Bank Wire and also nice is if Tax edit possible

Sorry, I can't help you with that.

Share this post


Link to post
Share on other sites

Attached you will find the newest test version.

 

In addition to editing categories in product_edit you have now also a new program product_sort. It allows you to easily sort products within a category. See the readme for a short manual.

Edited by musicmaster

Share this post


Link to post
Share on other sites

Leomazz,

 

- Did you adapt login1.php?

- What passwords did you try?

 

Yes, I visit md5 and copy the key to login1.php

The pass I tried was four alpha and four numeric.

Share this post


Link to post
Share on other sites

Nandotx, do you mean the id that Prestashop gives to a product? No, that can't be changed. And as it is used in many tables in the database I rather wouldn't change it either.

Share this post


Link to post
Share on other sites

Musicmaster, thanks for the script , I have tried it in local and it´s awesome. But I have a problem when trying it on server. I do the same, copy he files under my admin folder, generate my Md5 password and editing it at login1.php. But when I try to login I introduce the pasrword and, the field password gets clear and nothing happend.

If it helps, When I introduce a false password I get the message "wrong password try it again"

any idea?

 

Ps 1.4.8.3

 

Thanks in advance.

Edited by Paulcocu

Share this post


Link to post
Share on other sites

Hi, Paulcocu,

The most common error is that people make is that they change the test on line 6 of login1.php (if ($myHash == "Insert here your hash key!")) and fill in their password-hash there.

 

If you have it working on your local computer you could simply copy the files to the server and use the same password for both locations.

Share this post


Link to post
Share on other sites

Thanks for your fast reply, at first I copy the files to the server and used the same pasword, but it doesn´t work, don´t know why, because is the same installation. Then I copy the original files and the result was the same. I have only edited the line 2 of login1.php.

 

I have also given all pemissions to the folder, but it doesn´t work.

 

This is how my login1.php looks like

 

 

$myHash = "efe594a5ce935c4419ab37e556534c4a"; // Insert here your hash key (created with md5.php)

$unsafeaccess = false;

 

session_start();

if ($myHash == "Insert here your hash key!") { // Do not change this line!!!

if(isset($_POST['pswd']) && ($_POST['pswd'] == "opensecret"))

{ $unsafeaccess = true;

echo "<b>This password is unsafe. Please create your own password!</b>";

}

 

echo '<script type="text/javascript">

alert(\'Please first generate a hash key from your password and insert it at the top of the file "login1.php"\');

</script>';

echo 'Login form: <br>Please first <a href="md5.php">generate a hash key from your password</a> and insert it at the top of the file "login1.php"';

echo '<form method="post" action=""><input type="password" name="pswd"><input type="submit" name="login" value="Login"></form>';

if(!($unsafeaccess))

return;

}

if(isset($_POST['pswd']))

{ $password = $_POST['pswd'];

if (( md5($password) == $myHash ) || ($unsafeaccess)) {

$_SESSION['phplogin'] = true;

if(isset($_GET['url']))

header('Location: '.$_GET['url']); //Replace index.php with what page you want to go to after succesful login

else

header('Location: order_edit.php'); //Replace index.php with what page you want to go to after succesful login

echo "Redirection problem for ".$_GET['url'];

exit;

} else {

echo '<script type="text/javascript">

alert(\'Wrong Password, Please Try Again!\');

</script>';

}

}

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>

<title> PHP Login </title>

</head>

<body>

<center>

Password:<br>

<form method="post" action="">

<input type="password" name="pswd">

<input type="submit" name="login" value="Login">

</form>

</center>

</body>

</html>

 

 

 

Could be the problem in the redirection?

 

 

Thanks for the help :rolleyes:

Edited by Paulcocu

Share this post


Link to post
Share on other sites

I am puzzled, but redirection might be a problem.

 

Could you check a few things:

- do you get the same effect for all the different programs (product_edit, cate_edit, etc)?

- Can you check the url in the command address line of your browser?

- can you look at the source of that empty page?

Share this post


Link to post
Share on other sites

Hi musicmaster,

 

I get the same effect for all the different programs, Is not an empty page what I get, I get the login screen continously like @leomazz. I test it on different browsers.

 

In the web console of mozilla I get this warning:

 

"A form was sent with windows-1252 encoding, which can not encode all Unicode characters, so that user input may have been corrupted. To avoid this problem, the page should be changed so that the form is sent to the UTF-8 encoding either changing the page itself to UTF-8 or specifying accept-charset = utf-8 in the form element."

 

The character encoding of the HTML document has not been declared. The text document will display "garbage" text in some browser configurations if the document contains characters outside the US-ASCII range. The character encoding of the page should be declared in the document or in the transfer protocol

 

Does it says something to you?

 

I appreciate your help, your script would be so usefull for me..

Share this post


Link to post
Share on other sites

Hi Musicmaster,

 

I tried it, the result is the same :unsure:, but now the warning dissapeared in the web consonle, this is what it shows:

 

[20:40:53.074] POST http://www.myweb.es/editorder/login1.php?url=/editorder/order_edit.php [HTTP/1.1 302 Found 47ms]

[20:40:53.127] GET http://www.myweb.es/editorder/order_edit.php [HTTP/1.1 302 Found 47ms]

[20:40:53.182] GET http://www.myweb.es/editorder/login1.php?url=/editorder/order_edit.php [HTTP/1.1 200 OK 31ms]

 

Can I do anything more? Maybe could be something related with my hosting configuration?

 

Thanks a lot.

Share this post


Link to post
Share on other sites