Jump to content

Mass Update Module


dtbaker
 Share

Recommended Posts

This module works very well for me, except that I would love to have a field for the Product ID (not reference #) - this number matches my Point-Of-Sale software's product ID # and would help with updating quantities. I am not a coder and have no idea where I would add this field, or how the code would look. Can anyone help?

Share this post


Link to post
Share on other sites

Sorry for the long wait, im currently working to build my own module for fast product management in prestashop. Much more ambitious then this module. More configurations and flexible, no more code changing, much more featues and cool import functions. Ill be looking for some alpha testers soon.

 

Some minor bug fixes for massupdate (ver 1.4). Mostly security issues

massupdate_v1.4.zip

  • Like 1

Share this post


Link to post
Share on other sites

This module works very well for me, except that I would love to have a field for the Product ID (not reference #) - this number matches my Point-Of-Sale software's product ID # and would help with updating quantities. I am not a coder and have no idea where I would add this field, or how the code would look. Can anyone help?

U can add all fiends which are in the product table, so this should do the trick:

"id_product"=>array(
 "db_field"=>"id_product",
 "friendly"=>"Product ID",
 "isLang"  => 0,
 "input_size" => 4,
),

 

Add that code in _getConfig() around line 200 before "name" in AdminMassUpdate.php

Share this post


Link to post
Share on other sites

Height Width Depth Weight

 

Hi Bclaassen,

 

Thanks for your development of this nice piece of coding. I have one "problem".

The items above doesn't seem to have items underneath them, but they are in my database.

 

 

Greetings,

Wilfred

Share this post


Link to post
Share on other sites

  • 2 weeks later...

This could be a very useful module for me. Thanks.

 

I got the attached screen: first a whole list of PHP errors - all on line 150 of AdminMassUpdate.php:

 

Notice: Undefined index: features in C:\xampp\htdocs\_snoepboer\modules\massupdate\AdminMassUpdate.php on line 150
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\_snoepboer\modules\massupdate\AdminMassUpdate.php on line 150

 

The funny thing is that I don't use features at all. The length, height, etc are leftovers from the installation settings.

 

Changing a price worked. However, for my webshop I start from prices including VAT. Being able to set them only without VAT will very probably not be useful to me.

Share this post


Link to post
Share on other sites

This post is intended for the the original author of the massupdate module.

I see that in 1.4 you have added all fixes shared by posters of this forum.

I have since made one other mod to 1.4 as posted in my previous post on page 15.

I have added additional fields and changed name from Mass Update to Product Update on update page, (just my preference)

In this form I can change or update all fields that seemed important

This could be 1.5 if you wish to post it I was not going to step on toes. :)

I have also created a new zip with the changes so anyone can install from BO of Prestashop.

 

 

(image deleted)

Share this post


Link to post
Share on other sites

This post is intended for the the original author of the massupdate module.

I see that in 1.4 you have added all fixes shared by posters of this forum.

I have since made one other mod to 1.4 as posted in my previous post on page 15.

I have added additional fields and changed name from Mass Update to Product Update on update page, (just my preference)

In this form I can change or update all fields that seemed important

This could be 1.5 if you wish to post it I was not going to step on toes. :)

I have also created a new zip with the changes so anyone can install from BO of Prestashop.

 

 

 

 

Its a community product so imo everyone is free to update. But its good to make difference between usersettings and module updates. Which fields u want to activate in massupdate, de column width etc. u can deside ur self (just uncomment the code). Imo bug fixes and new features should result in new versions, but feel free to update anyway.

Share this post


Link to post
Share on other sites

In order to keep this Module moving forward and add to it's features I have modified the original 1.4 massupdate module and renamed it 1.5.

I have added the product reference number and product weight to the update section and given the update page a new name Product Update.

I have also modified the text box widths to fit in the new areas.

This can be installed using the Module import featute in the BO.

As of this post there are no known issues.

 

 

 

Fixed a minor quirk I noticed in Google Chrome wher the $ sign was over the price text instead of to the left.

Also modified Wholesale Price to Wholesale and Price to Retail.

 

 

See post #324

Share this post


Link to post
Share on other sites

For the coders of this module, awesome job!

 

However, i need an option of set the taxes on- or off.. can you code this in? Would save me losts of hours! :)

 

Thanks again for this great (and free!) module!

Share this post


Link to post
Share on other sites

Hello thanks for the module. it's great

i think there is a problem on it after i enter the weight on some products.

now when i try to enter even weight at one product i get the below error.

i tried to unistall and reinstall the module but i am facing the same error

 

 

 

 

This webpage is not available

The connection to caraccessories.com.cy was interrupted.

Here are some suggestions:

  • Reload this webpage later.
  • Check your Internet connection. Restart any router, modem, or other network devices you may be using.
  • Add Google Chrome as a permitted program in your firewall's or antivirus software's settings. If it is already a permitted program, try deleting it from the list of permitted programs and adding it again.
  • If you use a proxy server, check your proxy settings or contact your network administrator to make sure the proxy server is working. If you don't believe you should be using a proxy server, adjust your proxy settings: Go to the wrench menu >Options > Under the Hood > Change proxy settings... > LAN Settings and deselect the "Use a proxy server for your LAN" checkbox.

Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.

Share this post


Link to post
Share on other sites

This is most likely a problem with your server not the module, I just went to mine and changed 1 weight and 5 weights and all updated successfully.

If this was a problem with the module you would either get Please wait updating message and never go any further or would get an error message in the BO.

 

 

I was getting this same message with Chrome randomly when coming here to forum and when I try to go to my own sites.

The other nite I could not get to any of my sites hosted by Ipage and got this same message.

I waited a little while and all was back to norm, please post if this issue continues and I will look into it.

For now I will wait to here from you as mine seems to work fine.

Share this post


Link to post
Share on other sites

Thank you for the update. It looks good.

 

I had one little problem: you can click on the product name to update it individually. If I do that I get a warning page "insecure security token". It looks quite scary.

 

I also had some problems using it on my old computer. It displayed 207 of my 500+ articles and it wouldn't save "all products". So my suggestions for further improvement would involve some optimization:

- one possibility is record selection: display 100 records at a time. Allow to go to the next set. Allow selection of a certain category and text searches.

- another possibility is field selection. Give the visitor beforehand the option to choose which fields he wants to edit. This would result in less fields on the display, better speed and also the possibility to edit other fields (for which there is now no space).

- a third option is somehow to remember the old values or which fields were changed so that you can submit only those that actually changed.

 

Cheers!

Share this post


Link to post
Share on other sites

Yes I see that funny thing is I never actually clicked those links, My first thought would be to remove the link as this is a mass update and you can update products individually from the catalog.

 

I also noticed that some how once again the last two columns had the dollar sign just over the text boxes instead of to the left.

 

I am going to fix the $ sign issue as for the Invalid Security Token I will do some testing and see what the issue is.

 

Any thoughts?

Share this post


Link to post
Share on other sites

I have found a work around for the Invalid security Token and would like someone to test, it works fine for me but would like to hear from others.

 

Ok so first go to back office and click on Catalog, in your browsers address bar you will see something like this:

 

https://yoursite/sho...eproduct&token=c5c4066fd181aeda83d5119ef3b2be33

 

Copy the number token=(red text) yours will be different then above.

 

Now edit your AdminMassUpdate.php located in modules/massupdate like this, delete the <?php echo $token;?> section and paste the number you copied from the address bar. (example below)

 

<td><a href="?tab=AdminCatalog&id_product=<?php echo $product['id_product'];?>&updateproduct&token=<?php echo $token;?>"><?php echo $product['name'];?></a></td>

 

<td><a href="?tab=AdminCatalog&id_product=<?php echo $product['id_product'];?>&updateproduct&token=c5c4066fd181aeda83d5119ef3b2be33"><?php echo $product['name'];?></a></td>

 

If you did all this correct you should now be able to edit individual products from the mass update page.

This will work untill we find a solution that can be applied in the next update.

Share this post


Link to post
Share on other sites

Fixed a minor quirk I noticed in Google Chrome where the $ sign was over the price text instead of to the left.

Also modified Wholesale Price to Wholesale, Price to Retail & modified width of edit area.

 

If you already have 1.5 installed you can unzip this and just upload the AdminMassUpdate.php file to your massupdate module folder over writing the one there now to have the updates.

 

 

 

 

 

1.6 now available see post #358

Edited by tdr170 (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Sorry about that, Not sure it will work with your old version have you thought about updating, you are way behind on features.

Does the module install, do you have a mass update sub category under catalog should be on far right side.

Lets start with that.

Share this post


Link to post
Share on other sites

Hi

Thanks for coming back on this.

I appreciate am using an old version of PS but I have a bespoke shipping module that was developed around PS 1.3.2 which I have just installed and got the site up and running again. I need to make the current site work a bit before I can contemplate any upgrade.

At the moment 1.3.2 seems to have all I need. Its just the tedious proces of updating stock across all the products and combinations that I need to fix.

 

Re the mass update module.

I upload it using the facility in modules to add new.

It shows up in the module listings.

However, when I click on configure I just get a "fatal error message"

There does not seem to be a mass update subcategory in the catalogue or in the tabs.

just my categories and subcategories

 

Appreciate any help you can offer.

However, can you confirm that you mass update will update stock in combinations? I do not want to waste your time if it does not.

 

Thanks very much.

Share this post


Link to post
Share on other sites

The current config does not just the product name, reference #, quantity, weight, wholesale and retail prices.

My guess is though that your older version does not work with this module.

I use 1.4.X and have never had an install issue.

Also you would not have the link in the Catalog page if it will not install.

Share this post


Link to post
Share on other sites

Hi

 

Thanks very much for your quick response.

I understand that there are structural differences between 1.3.x and 1.4.x so this is probably why it will not work

Thanks anyway.

 

Good luck

 

Try searching the forum and as always do a Google seach for - mass update prestashop 1.3 - that how I found this.

 

 

Try This, be sure to read through post.

http://www.prestashop.com/forums/topic/65839-mass-update-module-modified/

Share this post


Link to post
Share on other sites

  • 4 weeks later...

I have found a work around for the Invalid security Token.....

 

This will work untill we find a solution that can be applied in the next update.

 

Token is a global which is generated by prestashop. Its a security messure. Token should should be added as a get variable on all links.

 

Just add

&token=$this->token

to any links. AdminMassUpdate extends AdminTab which has a public var $token.

 

In other classes (non extended AdminTab classes) u can fetch the token by:

 

global $cookie;
$token = Tools::getAdminToken($tab.(int)(Tab::getIdFromClassName($tab)).(int)($cookie->id_employee));

 

Havent got time to update it my self, working all my spare time on a new module.

Share this post


Link to post
Share on other sites

Hi!

 

I have a problem with this module! It isn't update the fields over 166. products. So from the 167. products' changed fileds dont set.

 

 

One suggestion: an ORDER BY column at the //all products would be useful. (f.o.: id_product, reference, name, etc...)

 

Spidy

Share this post


Link to post
Share on other sites

 

 

There is a fix for Version 1 Back on page3 that fixes the updating please wait issue.

 

I found this issue when I was using Presta 1.4.3.2 and version 1.0 of this module on Chrome

Moved to IE and no problems there!

Share this post


Link to post
Share on other sites

How can I add/change more columns?

 

thanks in advance

 

You can change them in the AdminMassUpdate.php from line 196. But keep in mind that only those columns can added what are in the product, product_lang, feature or feature_lang tables.

Share this post


Link to post
Share on other sites

Hi!

 

I have a problem with this module! It isn't update the fields over 166. products. So from the 167. products' changed fileds dont set.

 

 

One suggestion: an ORDER BY column at the //all products would be useful. (f.o.: id_product, reference, name, etc...)

 

Spidy

 

Tested on my site today and have no problem changing data above 166.

Share this post


Link to post
Share on other sites

Anyone working on supporting combinations for this module? would be nice to be able to easily update prices and stock levels for all products with combinations too... Or does a similar module exist that can do it?

Share this post


Link to post
Share on other sites

Guys i just loved this work and i reallt thank all the support, i just need ONE SINGLE HELP.

 

I want to add the field

Supplier Reference: so i can quick edit it, i dont use manufacters or suppliers, i just use the reference field, so i would love to have that field on the code. Just tell me the code that i can add it, i know some stuff but not to much with connecting with databases.

BIG THX FOR ALL

Share this post


Link to post
Share on other sites

Edit the AdminMassUpdate.php file located in modules/massupdate on line 203 you will find:

 

"reference"=>array(

"db_field"=>"reference",

"friendly"=>$this->l('Reference'),

"isLang" => 0,

"input_size" => 4,

 

change to: (if you want you can change ('Reference') to ('yourchoice') )

 

"supplier_reference"=>array(

"db_field"=>"supplier_reference",

"friendly"=>$this->l('Reference'),

"isLang" => 0,

"input_size" => 4,

 

 

I to have been extremely busy, I am trying to find the time to fix the (token issue) Thanks to bclaassen.

Share this post


Link to post
Share on other sites

  • 1 month later...

Hi,

I have prestashop 1.4.7.3, I tried to install it, but It didn't work. Somebody knows if needs some changes to make it works on this prestashop version?

Thanks in advance

Share this post


Link to post
Share on other sites

I had a problems with updating the products above 166. , it seems that my host php var limits sets to 1000, so I could handle only 1000 variables together on same page (prestashop module translations has over 5000 variables on same page...still not working for me...lol).

 

At the end I modified the massupdate v1.2 and now it has pagination with 200 products/page.

 

http://www.megafileupload.com/en/file/354199/massupdate-1-2p-zip.html

 

If somebody vindicate it, I can do it with massupdate v1.5 too.

Share this post


Link to post
Share on other sites

Is there any way to implement some sort of language switcher into this excellent module? Or does anyone know how to change the language (from default) directly in the code?

 

Cheers

Share this post


Link to post
Share on other sites

Is there any way to implement some sort of language switcher into this excellent module? Or does anyone know how to change the language (from default) directly in the code?

 

Cheers

The module uses the default language file, if exist, but most times, You have to translate it in the Tools/Translation/Module Translations menu in the Back Office.

Share this post


Link to post
Share on other sites

Hi @Spidy - Sorry I did't mean translate the module itself, I mean the product data (meta_description, description_short etc). I've edited AdminMassUpdate.php to display these fields but only in the stores default language, English. I need to edit all these fields in all (15) languages. Using this module would be a lot quicker than doing this via the product pages, and I can't take the stress of a csv import! Ideally this could be achieved via a language switcher in the module but manually editing the code would also be fine only I don't have the knowledge to do it.

Share this post


Link to post
Share on other sites

Feel free to try and add pagination to 1.5 this is open source and all are free to contribute.

There is also an issue with getting Invalid Security Token if you use a link to edit product in catalog mode, if that is something you have time to tackle please feel free.

 

I have just completed my site and edited some weights in products from 256 - 300 and all updated without any issues. (763 Total)

 

In an effort to make sure that there is not a problem with the original 1.5 download here is a fresh copy.

This download has the product link removed so no issue with the Invalid Security Token issue.

 

 

 

 

1.6 now available see post #358

Edited by tdr170 (see edit history)

Share this post


Link to post
Share on other sites

Hi @Spidy - Sorry I did't mean translate the module itself, I mean the product data (meta_description, description_short etc). I've edited AdminMassUpdate.php to display these fields but only in the stores default language, English. I need to edit all these fields in all (15) languages. Using this module would be a lot quicker than doing this via the product pages, and I can't take the stress of a csv import! Ideally this could be achieved via a language switcher in the module but manually editing the code would also be fine only I don't have the knowledge to do it.

Hi Pel024! Sorry, but maybe it will help You.

 

If You use the massupdate v1.5, see the 46. row:

$this->_id_lang = $cookie->id_lang;

 

Just change it with the language ID:

$this->_id_lang = 1;

 

in the v1.2 its a little bit more complicated.

Share this post


Link to post
Share on other sites

PS 1.4.3 - pagination don't work

 

I don't think so that the pagination code depends on PS version, its a simple php and html code. I think it would be something else.

 

Tested on PS 1.4.7 and still working.

Share this post


Link to post
Share on other sites

Hi Pel024! Sorry, but maybe it will help You.

 

If You use the massupdate v1.5, see the 46. row:

$this->_id_lang = $cookie->id_lang;

 

Just change it with the language ID:

$this->_id_lang = 1;

 

in the v1.2 its a little bit more complicated.

 

This works, cheers. However I've come across a new problem - when saving any modifications, the module strips out any html tags, so any formatting is lost. Any idea how to prevent this from happening?

Share this post


Link to post
Share on other sites

This works, cheers. However I've come across a new problem - when saving any modifications, the module strips out any html tags, so any formatting is lost. Any idea how to prevent this from happening?

 

Yes I know that (html tags problem)! I will check it, and try to fix if I have some free time.

Share this post


Link to post
Share on other sites

Using Prestashop 1.4.8.2 i get this error

 

 

 

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /home/mobila/public_html/feronerie-mobilier.com/classes/SpecificPrice.php on line 124

 

I am on a shared hosting. In Cpanel i have

Main Domain mobila-online.biz Home Directory /home/mobila CPU Usage 0 / 100 % Memory Usage 0 / 1048576 KB Entry Processes 0 / 30

Share this post


Link to post
Share on other sites

Great News, Thanks to Spidy's input there is now pagination in the Mass Update module.

 

The new Mass Update v1.6 is now available with a couple of additions first is the addition of pagination with products set at 100 per page.

You can edit the Adminmassupdate.php at line 95 to change this limit.

Second I changed the install path to Administration so that the module will install to the administration block under modules.

 

I created a new zip file using the old 1.5 files with an updated adminmassupdate.php from Spidy to make sure there is no hidden code.

The file is safe and has been tested on 1.4.7 and works great.

 

(updated version to correct echo value issue some were receiving) See post 394

Edited by tdr170 (see edit history)
  • Like 2

Share this post


Link to post
Share on other sites

I deleted my Mass update and had no issues with installing the above file.

 

I also downloaded the file above to make sure it was not damaged on upload and it installed without any issues.

 

What version of Prestshop are you using, and have you tried to install any other modules recently.

Share this post


Link to post
Share on other sites

ok the module works great.

 

is it possible that you adapt the module for me? i will pay for your work.

 

i need the following functions:

 

- searchbar = so that i can filter the products i need

- categories = maybe a drop down menu with the available categories and the possibility to switch it

- short and long description fields = i must edit them sometimes

 

 

thanks

Share this post


Link to post
Share on other sites

At this time I just can not devote the time to do this type of coding as I am developing web sites for customers.

( the search and categories are good ideas )

If anyone else has the time please feel free.

As for the descriptions they are already included, all you need to do is remove the // from in front of the two fields.

Edit the Adminmassupdate.php file found in the massupdate folder.

Share this post


Link to post
Share on other sites

Just be aware that when editing descriptions all html tags will be stripped out so all formatting (if you have done any) will be lost after updating. Does anyone know how prevent this from happening?

 

This module has got to be the most useful module I've used, both free and paid. Something like this should form part of the default prestashop install. Thanks to the creator and all those who've contributed.

Share this post


Link to post
Share on other sites

Line 272 the code looks like this:

 

 

// "Category"=>array(

// "db_field"=>"id_category_default",

// "friendly"=>$this->l('Category'),

// "isLang" => 0,

// "input_size" => 1,

// ),

 

To enable remove the //

 

 

"Category"=>array(

"db_field"=>"id_category_default",

"friendly"=>$this->l('Category'),

"isLang" => 0,

"input_size" => 1,

),

Share this post


Link to post
Share on other sites

Not sure what the issue is for you I uploaded your file to my test site and the Category was there.

You may also need to adjust some of the input sizes to get things to fit.

You could also remove the $ sign if needed by removing this line from Wholesale and retail.

"prefix"=> '(' . $sign . ')',

 

 

 

Share this post


Link to post
Share on other sites

Not sure what you mean by override the file, are you saying if you try to edit the file then upload you get this error when overwriting adminmassupdate.

If so try deleting the original and upload the edited file, with my FTP program I can right click a file and choose edit and edit it right on the server, can you do that.

Share this post


Link to post
Share on other sites

Is there any posibility that this module could show combinations too?? The fact is product on my shop don´t have a start price, each combination give the final price and because of that, I need to edit the combinations prices with this module.

 

THNX !!

Share this post


Link to post
Share on other sites

:rolleyes: Great module! Usefull.

1. But I have problem using products combinations.

It's not correctly update quantity of products with combinations.

2. Do You have possibility add in table ID product row?

 

PS 1.4.7.3

:wub: Sorry my bad English.

Thank you very much.

Edited by subarufor (see edit history)

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Not sure whats up with your file, have you modified the AdminMassUpdate.php file as height, width, depth and headphone are not part of the code and your showing weight twice.

Replace your AdminMassUpdate.php with the one from post 358.

Share this post


Link to post
Share on other sites

Hi!!! Great module but i have a little problem....why i see this??? Every field is: <? echo $value;?>

Prestashop is 1.4.8.2

Mass Module is 1.6

 

Fresh install without editing any module files.

 

TY!!!

post-369356-0-97100900-1341558018_thumb.png

Share this post


Link to post
Share on other sites

Also try changing the language in the sql name section line 276

 

 

"name"=>array(

"db_field"=>"name",

"friendly"=>$this->l('Name'),

"isLang" => 1,

"input_size" => 25,

),

Share this post


Link to post
Share on other sites

nothing changes.

I also tried this:

reinstallation of the module

I changed the BO from Italian to English and Reinstalling of the module

 

information as I can add that I still work offline with wamp, PS version is 1.4.8.2. :wacko:

Share this post


Link to post
Share on other sites

Not sure about that I have never used wuth a Wamp server you may have to wait until you go live.

As you can see in this forum most do not have issues and this is the first time I have seen a problem like yours.

  • Like 1

Share this post


Link to post
Share on other sites