Jump to content

[Free script] Prestools - mass edit and other maintenance tools


Recommended Posts

7 hours ago, vipkoszulka said:

Hi, love the script, it saved me a lot of time. One question though, in the combination edit field, when I want to assign images to a combination they all show up as just empty fields, making it impossible to work with as I don't know which image is which. Is there any way around it? I can choose the images individually for each category where they do show up after choosing one, however that's a lot slower and the image names are all --unnamed image <number> which makes it a bit tedious.

2023-08-16 08_31_39-Window.png

2023-08-16 08_31_29-Window.png

Strange. I don't see empty fields anywhere. I only see the "unnamed image" variant. I wonder what could cause this. Spaces in the legend field?

Do you have a recent version? I can have a look for that if you want.

The recommendation is that you assign names (legends) to the images first. Then you won't see "unnamed image" entries. In theory I could make a graphic interface for this. But would be quite complicated to make and there are no plans at the moment.

Link to comment
Share on other sites

16 hours ago, musicmaster said:

Strange. I don't see empty fields anywhere. I only see the "unnamed image" variant. I wonder what could cause this. Spaces in the legend field?

Do you have a recent version? I can have a look for that if you want.

The recommendation is that you assign names (legends) to the images first. Then you won't see "unnamed image" entries. In theory I could make a graphic interface for this. But would be quite complicated to make and there are no plans at the moment.

Ok yeah, that's my bad, I was a version behind. I get the unnamed images now.
Now I'm wondering what would be the best way to automate filling the image_lang table with image names, I have every image catalogued and named properly, wondering if there's a way for prestashop to fill in that file name into the legend field. That'd make my life a lot easier.

  • Like 1
Link to comment
Share on other sites

When you import an image its filename gets lost. So I don't think there is an easy solution there unless you do some creative programming that changes the way products are imported.

A possible option for Prestools would be to change its image_edit page so that you can link an image to a combination. But that has no priority and if you want that option within the next year you would need to make it a paid job.

Link to comment
Share on other sites

I think the best solution for me right now is updating from 1.7 to 8.1, my main issue was super slow saving time and too many combinations per product so I guess just switching to the new product page and using a module to speed up the entire image to combination issue is a solid compromise. Thank you so much for the replies though.

Link to comment
Share on other sites

  • 1 month later...

I have another question, in combination edit the fields seem to be mixed up, default combination is under weight, and default combination has the amount available. I'm attaching a screenshot below.
Furthermore, I'm trying to refresh my default combinations, I need to do that after migrating to 8.1.1 for a certain functionality to work properly. Is there a way to mass touch all those fields? In ProdCombi the field default_on isn't editable - is that something that has to be purchased?

2023-09-22 14_15_56-Prestashop Combination Multiedit — Mozilla Firefox.png

Link to comment
Share on other sites

6 hours ago, vipkoszulka said:

I have another question, in combination edit the fields seem to be mixed up, default combination is under weight, and default combination has the amount available. I'm attaching a screenshot below.
Furthermore, I'm trying to refresh my default combinations, I need to do that after migrating to 8.1.1 for a certain functionality to work properly. Is there a way to mass touch all those fields? In ProdCombi the field default_on isn't editable - is that something that has to be purchased?

2023-09-22 14_15_56-Prestashop Combination Multiedit — Mozilla Firefox.png

Default_on is not editable for a reason: If you make one combination the default some other that was default before must be have the default_on flag removed. So you have the default_on only editable on the pages where you have all combinations present. I don't know exactly what your problem is that you want to have fixed. But my guess would that purchasing a custom made script would be the best solution.

As for the missing field: obviously priceVAT is missing. But I have no idea why that happens with you. It is not normal behavior.

I am working at the moment on ProdCombi. So there will soon be an update. But I won't touch default_on or PriceVAT.

Link to comment
Share on other sites

On 9/22/2023 at 9:23 PM, musicmaster said:

Default_on is not editable for a reason: If you make one combination the default some other that was default before must be have the default_on flag removed. So you have the default_on only editable on the pages where you have all combinations present. I don't know exactly what your problem is that you want to have fixed. But my guess would that purchasing a custom made script would be the best solution.

As for the missing field: obviously priceVAT is missing. But I have no idea why that happens with you. It is not normal behavior.

I am working at the moment on ProdCombi. So there will soon be an update. But I won't touch default_on or PriceVAT.

Yeah it's a weird migration related issue, I'll mess around with the database then. Thanks for the reply!

Not sure what's going on with the missing fields, I did a clean reinstall to the latest version and it's still out of order. Curious.

2023-09-25 09_32_33-Prestashop Combination Multiedit — Mozilla Firefox.png

Link to comment
Share on other sites

1 hour ago, vipkoszulka said:

Yeah it's a weird migration related issue, I'll mess around with the database then. Thanks for the reply!

Not sure what's going on with the missing fields, I did a clean reinstall to the latest version and it's still out of order. Curious.

2023-09-25 09_32_33-Prestashop Combination Multiedit — Mozilla Firefox.png

You could check for javascript errors.

If you want I can have a look. Likely there are more people with this problem, so I would like to have it fixed. But for that I would need access.

Link to comment
Share on other sites

3 hours ago, musicmaster said:

You could check for javascript errors.

If you want I can have a look. Likely there are more people with this problem, so I would like to have it fixed. But for that I would need access.

Sounds good, what's the best way for me to send you the info?
EDIT - also no errors in console except for a favicon 404

Edited by vipkoszulka (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Hello @musicmaster 

Im using your amazing prestools, but we have little issue searching products in html:

<section class="grizz-description-section"> <div class="desc-item desc-item-6">

but when we search it is changed to:

<section class=/"grizz-description-section/"> <div class=/"desc-item desc-item-6/">

 

I assume its some kind of security to prevent scripts, but can we somehow workaround it?

Link to comment
Share on other sites

40 minutes ago, Diwad said:

Hello @musicmaster 

Im using your amazing prestools, but we have little issue searching products in html:

<section class="grizz-description-section"> <div class="desc-item desc-item-6">

but when we search it is changed to:

<section class=/"grizz-description-section/"> <div class=/"desc-item desc-item-6/">

 

I assume its some kind of security to prevent scripts, but can we somehow workaround it?

Sorry, I don't understand what you mean. Can you be more explicit?: tell every step you take and show screen dumps.

Link to comment
Share on other sites

When we put this in the search field:

<section class="grizz-description-section"> <div class="desc-item desc-item-6"> and click "Search" after refresh it is <section class=/"grizz-description-section/"> <div class=/"desc-item desc-item-6/"> with added "/"

Link to comment
Share on other sites

  • 2 weeks later...

Hi Wim, hope you are well.

I am not sure if what I am asking is possible or wanted by anyone else BUT, something I would find quite handy is a duplicate the current field DOWN button.

So, on the attached image, we have some garden charms.

I would like it so that on the item i am editing, instead of choosing from the selection of 20 ish different themes, push another triangle or arrow that's pointed down and it will DUPLICATE the value of the current field down to the next record below.

Sometimes I have lists of charms and for maybe 5 in a row they will have the same theme.

or for me, it could be the fitting that would be the same for a few records down.

Anyway, just wondered.

Take care

Simon

 

image.thumb.png.a131ea8d0045db0ab813e8c279ca89ea.png 

Link to comment
Share on other sites

21 hours ago, MJ_C said:

Hi Wim, hope you are well.

I am not sure if what I am asking is possible or wanted by anyone else BUT, something I would find quite handy is a duplicate the current field DOWN button.

So, on the attached image, we have some garden charms.

I would like it so that on the item i am editing, instead of choosing from the selection of 20 ish different themes, push another triangle or arrow that's pointed down and it will DUPLICATE the value of the current field down to the next record below.

Sometimes I have lists of charms and for maybe 5 in a row they will have the same theme.

or for me, it could be the fitting that would be the same for a few records down.

Anyway, just wondered.

Take care

Simon

Hi Simon,

I can see your point. But I don't see at the moment how I could integrate it in the already crowded page without increasing confusion. But maybe in the future I will see a way. Many concepts in Prestools were only implemented years after the first idea. Some ideas take time...

Regards,

M

 

Link to comment
Share on other sites

  • 4 weeks later...

Hello @musicmaster

My team love prestools, using it every day. Bought all the plugins.

What I’m wondering is that maybe you could implement AI generation for features? Like we want to set „color” feature or „cable length” which are included in the title. 
 

There is no single module that can help in features generation like that. Big catalogs like ours need massive amounts of time to keep it up to date.

How I see it is additional mass action when we have for example „color” feature listed. Action like „identify” that could scan titles with AI and set colors.

Edited by Diwad (see edit history)
Link to comment
Share on other sites

3 hours ago, Diwad said:

What I’m wondering is that maybe you could implement AI generation for features? Like we want to set „color” feature or „cable length” which are included in the title. 

There is no single module that can help in features generation like that. Big catalogs like ours need massive amounts of time to keep it up to date.How I see it is additional mass action when we have for example „color” feature listed. Action like „identify” that could scan titles with AI and set colors.

Hi Diwad,

Interesting idea. But for a real implementation a lot of details will need to be filled in.

I will think about it. In the meantime, if you have concrete wishes I can make some custom application for you.

Link to comment
Share on other sites

Hi @musicmaster

I've been using Prestashop since 2014, and I've only just found your suite of tools - they are awesome, and I can't believe I haven't found them before now. I used to do everything in PHPMyAdmin ... :(

Anyway, I've just installed the latest version of the suite, and I did a category update on a set of products, to add them to a new category I'd created, called Sale:

- Search for all products with a specific supplier name

- Click Edit button on the category column

- From Mass Update box, choose Category -> Add -> Sale

- Update and Submit

- As expected, all products had the new category ID added to their list of categories. All good and no visible errors!

However, what I didn't notice (until I was editing an affected product in the back office), was that for some of the amended products, the default category was no longer set. On others that were changed, the default category remained as it was previously.

I checked the affected products vs my DB backup, and prior to the above update, they did have a default category set, so I'm not sure what I've done wrong. Are you aware of anything that could reset the default category when doing an update like this?

Prestashop version: 1.7.7.8. Prestools version 1.32q. Release date: 13-nov-2023. PHP version 7.4.33 and MySQL version 10.6.16-MariaDB

Thankfully, using your tool I can go through quickly and set the default categories for the ones that need it.

Link to comment
Share on other sites

2 hours ago, andyfick said:

Hi @musicmaster

I've been using Prestashop since 2014, and I've only just found your suite of tools - they are awesome, and I can't believe I haven't found them before now. I used to do everything in PHPMyAdmin ... :(

Anyway, I've just installed the latest version of the suite, and I did a category update on a set of products, to add them to a new category I'd created, called Sale:

- Search for all products with a specific supplier name

- Click Edit button on the category column

- From Mass Update box, choose Category -> Add -> Sale

- Update and Submit

- As expected, all products had the new category ID added to their list of categories. All good and no visible errors!

However, what I didn't notice (until I was editing an affected product in the back office), was that for some of the amended products, the default category was no longer set. On others that were changed, the default category remained as it was previously.

I checked the affected products vs my DB backup, and prior to the above update, they did have a default category set, so I'm not sure what I've done wrong. Are you aware of anything that could reset the default category when doing an update like this?

Prestashop version: 1.7.7.8. Prestools version 1.32q. Release date: 13-nov-2023. PHP version 7.4.33 and MySQL version 10.6.16-MariaDB

Thankfully, using your tool I can go through quickly and set the default categories for the ones that need it.

Hi Andy,

Good to hear that you like Prestools.

Thank you for reporting this bug. I had recently made an update that enabled the handling of products without category (normally impossible, but it happens after faulty data imports) and that involved changing some code regarding the default category. I assume something has gone wrong there. I still need to study what went wrong there but for the moment I have returned the old code so that things at least work again. Remember to press ctrl-F5 (on the pc) after an update to refresh your cache as otherwise it will keep using the old version of the javascript file.

I try to keep Prestools as bug free as possible. So bug reports are always welcome.

Link to comment
Share on other sites

Hi, I have one more quick question - is there a way, and if not would it be possible to automate deleting old connections? It seems to be a notorious issue, and I couldn't find a good way to do it automatically. I tried writing my own script and setting up a cron job but I'm not a php guy in the slightest so it's not perfect. Plus, the cron module from Prestashop doesn't seem to work on 8.0+ versions, at least for us, so I have to set it up server-side.

My initial idea was to set up TRUNCTATE sql queries but we're on shared hosting right now and setting up events in phpmyadmin is blocked for some reason.

Edited by vipkoszulka (see edit history)
Link to comment
Share on other sites

49 minutes ago, vipkoszulka said:

Hi, I have one more quick question - is there a way, and if not would it be possible to automate deleting old connections? It seems to be a notorious issue, and I couldn't find a good way to do it automatically. I tried writing my own script and setting up a cron job but I'm not a php guy in the slightest so it's not perfect. Plus, the cron module from Prestashop doesn't seem to work on 8.0+ versions, at least for us, so I have to set it up server-side.

My initial idea was to set up TRUNCTATE sql queries but we're on shared hosting right now and setting up events in phpmyadmin is blocked for some reason.

I don't see why you should care about the Prestashop version. Just write a script that logs into the database and truncates the table and link it to cron in Cpanel.

Link to comment
Share on other sites

The cron module gave us several critical errors in the admin panel after upgrading to 8, although it could be a conflict with some other module, I didn't look too much into it.

I got it to work, and it was way less code than I thought. Guess it's time to actually learn PHP.

Anyways that's offtopic, thanks for the quick reply.

Link to comment
Share on other sites

Hi musicmaster

Where can I see the last version of Prestools in your website ? or please, let me know if there is a way to know when an update is available.

Always I´m thankful for your scritp and I suggest to other users the super package, definitely a great value package (the best!)

Thanks

 

Link to comment
Share on other sites

19 minutes ago, motonet said:

Hi musicmaster

Where can I see the last version of Prestools in your website ? or please, let me know if there is a way to know when an update is available.

Always I´m thankful for your scritp and I suggest to other users the super package, definitely a great value package (the best!)

Thanks

 

Hi,

Good to hear you like the software.

On average the software is updated every two weeks. Usually tiny improvements. You are advised to update twice a year.

When you have one or more of the paid plugins you should simultaneously download their latest version from your user account.

Link to comment
Share on other sites

  • 1 month later...

I've noticed that we need a bulk update for the description and tag copy fields in our system. Specifically, when we copy the tags into the description field, they should be concatenated with spaces between them.

For example, if we have the tags "555444" and "12222", when copied into the description field, they should appear like this: "555444 12222", with a space between them.

However, we've observed that currently, these tags are being copied without spaces between them.

Please consider this request and update our procedures accordingly or identify the most suitable solution to implement this behavior.

Thank you in advance for your attention to this request and for your efforts in implementing the necessary changes.

service-turbo12.jpg

Link to comment
Share on other sites

23 hours ago, constantin980 said:

I've noticed that we need a bulk update for the description and tag copy fields in our system. Specifically, when we copy the tags into the description field, they should be concatenated with spaces between them.

For example, if we have the tags "555444" and "12222", when copied into the description field, they should appear like this: "555444 12222", with a space between them.

However, we've observed that currently, these tags are being copied without spaces between them.

Please consider this request and update our procedures accordingly or identify the most suitable solution to implement this behavior.

Thank you in advance for your attention to this request and for your efforts in implementing the necessary changes.

 

Hi Constantin,

Thanks for reporting the problem. I will fix. In the next release - that will appear in about a week it will be repaired.

Regards,

M

Link to comment
Share on other sites

Hi @musicmaster,

I have a little problem. I have re-arranged about 7000 products. For most of them I have added a new category. For about a 1000 products I have also changed the main category to a different one and remove the old one. In the middle of the process I have noticed that every change I make takes longer and longer. But I have finished re-arranging. Since then I have noticed multiple problems. First, I was not able to add missing products to the search index after the change. I had timeouts. After timeout has passed not a single product were added to the search index which is weird because usually Presta adds about 300 products until timeout. Re-indexing using Prestools was working but it add about 10 products until timeout. I have decided to manually truncate the search tables in the database and re-built the etire index. That worked and now I am able to re-index search with a normal pace (about 300 products until timeout). But today I have also noticed another problem. Any change I make using Prestools takes a lot of time. Usually small changes was immediate. Now it takes about 4-5 minutes to make a small change, like re-arranging a category of 1 product. Here's an example where I removed one shop ID from 1 product. It took 4 minutes to remove shop ID from the product. More products, more time it needs to make the change (very often causing the timeout). I have no idea what happened and what to do in order to detect the problem and fix it. Making changes in the product in the back office are immediate. But I think that CSV import also slowed down. Can you help me with that?

 

11:55:39---

Go back to product-edit page
100 Records - of which 1 submitted.
***Adding Array ( ) Removing Array ( [2] => 3 ) *************************************************************************************************


Time=11:55:39 [starttime was 11:55:39]
3-1-1,TIMEOUT-1711277980==1711277739==6

TIME=11:59:40 [starttime was 11:55:39]

Finished successfully!

Go back to product-edit page

 

Link to comment
Share on other sites

10 hours ago, banan_44 said:

Hi @musicmaster,

I have a little problem. I have re-arranged about 7000 products. For most of them I have added a new category. For about a 1000 products I have also changed the main category to a different one and remove the old one. In the middle of the process I have noticed that every change I make takes longer and longer. But I have finished re-arranging. Since then I have noticed multiple problems. First, I was not able to add missing products to the search index after the change. I had timeouts. After timeout has passed not a single product were added to the search index which is weird because usually Presta adds about 300 products until timeout. Re-indexing using Prestools was working but it add about 10 products until timeout. I have decided to manually truncate the search tables in the database and re-built the etire index. That worked and now I am able to re-index search with a normal pace (about 300 products until timeout). But today I have also noticed another problem. Any change I make using Prestools takes a lot of time. Usually small changes was immediate. Now it takes about 4-5 minutes to make a small change, like re-arranging a category of 1 product. Here's an example where I removed one shop ID from 1 product. It took 4 minutes to remove shop ID from the product. More products, more time it needs to make the change (very often causing the timeout). I have no idea what happened and what to do in order to detect the problem and fix it. Making changes in the product in the back office are immediate. But I think that CSV import also slowed down. Can you help me with that?

 

11:55:39---

Go back to product-edit page
100 Records - of which 1 submitted.
***Adding Array ( ) Removing Array ( [2] => 3 ) *************************************************************************************************


Time=11:55:39 [starttime was 11:55:39]
3-1-1,TIMEOUT-1711277980==1711277739==6

TIME=11:59:40 [starttime was 11:55:39]

Finished successfully!

Go back to product-edit page

 

Sorry, I don't have a solution for that. I have no idea why this database is becoming slow. If someone else has a solution it would be welcome.

Two suggestions:

 - Make sure that the database doesn't get too big. So truncate ps_connections, ps_guest, etc

 - Make sure that this database is the only database in your Mysql installation. The Mysql system tables are not indexed, so if you have more databases in one installation things can become slow quickly.

Link to comment
Share on other sites

That's unfortunate. I will try to find someone who can look into it. The problem is only with the Prestools. Changes in the back office are still immediate. I have truncated ps_connections, ps_guest and other tables that store a lot of information which can be removed. I also do not have other databases in the mysql istallation.

BTW. Can you make a fix to the filter in the Prestools? I think filtering by shop ID does not work properly. I have a multishop with 4 shops. IDs: 1,2,3,10. I cannot filter products that appear in particular shop id. I tried to find all products assigned to shop id 10 and I do not have any results. I have tried "in", "=", ">=" and "<=" operators and it does not show me any products while I know that there are products assigned to that shop id.

image.png.fc5b9be25b0c9f8b2a719495d36a9264.pngimage.png.5c50ae1ff973e69e72c6191c51185ce4.png

Link to comment
Share on other sites

14 minutes ago, banan_44 said:

That's unfortunate. I will try to find someone who can look into it. The problem is only with the Prestools. Changes in the back office are still immediate. I have truncated ps_connections, ps_guest and other tables that store a lot of information which can be removed. I also do not have other databases in the mysql istallation.

BTW. Can you make a fix to the filter in the Prestools? I think filtering by shop ID does not work properly. I have a multishop with 4 shops. IDs: 1,2,3,10. I cannot filter products that appear in particular shop id. I tried to find all products assigned to shop id 10 and I do not have any results. I have tried "in", "=", ">=" and "<=" operators and it does not show me any products while I know that there are products assigned to that shop id.

image.png.fc5b9be25b0c9f8b2a719495d36a9264.pngimage.png.5c50ae1ff973e69e72c6191c51185ce4.png

I will look at the shop search.

Just one other point about the speed. Many operations cause the need for re-indexation of products. That is dosed so that not too much is done at once. However, if you have big texts and many languages this operation could take too much time. You can try the option "skip indexation" in product-edit. The verbose option could be tried to see what queries are done.

 

Link to comment
Share on other sites

16 hours ago, banan_44 said:

BTW. Can you make a fix to the filter in the Prestools? I think filtering by shop ID does not work properly. I have a multishop with 4 shops. IDs: 1,2,3,10. I cannot filter products that appear in particular shop id. I tried to find all products assigned to shop id 10 and I do not have any results. I have tried "in", "=", ">=" and "<=" operators and it does not show me any products while I know that there are products assigned to that shop id.

image.png.fc5b9be25b0c9f8b2a719495d36a9264.pngimage.png.5c50ae1ff973e69e72c6191c51185ce4.png

This option shouldn't have been there at all. There is a special drop down menu option for the shop. 

Link to comment
Share on other sites

2 hours ago, musicmaster said:

This option shouldn't have been there at all. There is a special drop down menu option for the shop. 

I suspect that you mean a drop down menu "shop" next to the "language" dropdown menu. I am aware of that. Is there a way to search for products that are assigned to shop 2 and 10 but not assigned to shop 1 and 3 so I could re-arrange it? For example, I want to change assignment from shop 2 to shop 1. But in shop 2 I also have products that are assigned only to shop 2 only. When I change a shop in the drop down menu I am seeing products assigned to the shop 2 but I am not able to quickly filter the product to show me products assigned to a different shop as well. I want to chech the shopz column next to each product. Quite difficult if I want to make a bulk change.

Link to comment
Share on other sites

On 23.03.2024 at 17:25, musicmaster said:

Hi Constantin,

Mulțumesc pentru raportarea problemei. voi repara. În următoarea ediție - care va apărea în aproximativ o săptămână, va fi reparat.

Salutari,

M

please keep in mind when copying these tags that they should not exceed 800 characters for the short description and 21844 characters for the long description, if they exceed these characters the products become unavailable

Link to comment
Share on other sites

  • 2 weeks later...

I'm reaching out to follow up on the recent tests conducted regarding the limitation of the "Description Short" field. Unfortunately, it seems that the issue persists, as instead of encountering a specific error message when the character limit is exceeded, users are only met with a generic error prompt.

The description_short field is too long. The length is 960. The maximum allowed length is 800 on line 1.

Upon reviewing the test results, it has become evident that a more informative error message would greatly enhance user experience. Specifically, when the character limit for the product ID is surpassed, it would be beneficial for users to receive a notification indicating that the character limit has been exceeded and that their input needs to be restricted accordingly.

To address this issue effectively, I would recommend implementing an error message that explicitly states when the character limit for the product ID has been reached, prompting users to adjust their input accordingly. Additionally, upon acceptance, users should be made aware that their input has been limited to adhere to the specified character count.

By incorporating these adjustments, we can ensure that users are provided with clear and actionable feedback, thus enhancing the usability of the system.

Please let me know if you require any further clarification or if there are any additional steps we need to take to resolve this matter.

Thank you for your attention to this issue.

ps: 

Also, I have identified another limitation in operation that requires attention. When setting the number of records to 100 or 200 for bulk editing, it is observed that only 199 products are edited, with one product consistently remaining unchanged.

Edited by constantin980
Add info (see edit history)
Link to comment
Share on other sites

On 3/25/2024 at 4:45 PM, banan_44 said:

That's unfortunate. I will try to find someone who can look into it. The problem is only with the Prestools. Changes in the back office are still immediate. I have truncated ps_connections, ps_guest and other tables that store a lot of information which can be removed. I also do not have other databases in the mysql istallation.

BTW. Can you make a fix to the filter in the Prestools? I think filtering by shop ID does not work properly. I have a multishop with 4 shops. IDs: 1,2,3,10. I cannot filter products that appear in particular shop id. I tried to find all products assigned to shop id 10 and I do not have any results. I have tried "in", "=", ">=" and "<=" operators and it does not show me any products while I know that there are products assigned to that shop id.

image.png.fc5b9be25b0c9f8b2a719495d36a9264.pngimage.png.5c50ae1ff973e69e72c6191c51185ce4.png

This should now work the way you want.

  • Like 1
Link to comment
Share on other sites

2 hours ago, constantin980 said:

I'm reaching out to follow up on the recent tests conducted regarding the limitation of the "Description Short" field. Unfortunately, it seems that the issue persists, as instead of encountering a specific error message when the character limit is exceeded, users are only met with a generic error prompt.

The description_short field is too long. The length is 960. The maximum allowed length is 800 on line 1.

Upon reviewing the test results, it has become evident that a more informative error message would greatly enhance user experience. Specifically, when the character limit for the product ID is surpassed, it would be beneficial for users to receive a notification indicating that the character limit has been exceeded and that their input needs to be restricted accordingly.

To address this issue effectively, I would recommend implementing an error message that explicitly states when the character limit for the product ID has been reached, prompting users to adjust their input accordingly. Additionally, upon acceptance, users should be made aware that their input has been limited to adhere to the specified character count.

By incorporating these adjustments, we can ensure that users are provided with clear and actionable feedback, thus enhancing the usability of the system.

Please let me know if you require any further clarification or if there are any additional steps we need to take to resolve this matter.

Thank you for your attention to this issue.

ps: 

Also, I have identified another limitation in operation that requires attention. When setting the number of records to 100 or 200 for bulk editing, it is observed that only 199 products are edited, with one product consistently remaining unchanged.

 Thank you for the feedback.

- I can add the product id to the error message

 - I can add a field size counter to the description_short field. However, there are two limitations: it won't work under TinyMce and it is not 100% accurate. Before submission the field is balanced - so that if you have an opening h1 or div tag without a closure that closing tag is added. That can increase the field size.

 - I am puzzled by your ps that not all records are processed. I cannot reproduce that. Can you provide more details? Is it the first or the last? Does it happen always or sometimes? Does it happen with specific fields? Does it sometimes concern more than one?

 

Link to comment
Share on other sites

 

2 hours ago, musicmaster said:

 Thank you for the feedback.

- I can add the product id to the error message

 - I can add a field size counter to the description_short field. However, there are two limitations: it won't work under TinyMce and it is not 100% accurate. Before submission the field is balanced - so that if you have an opening h1 or div tag without a closure that closing tag is added. That can increase the field size.

 - I am puzzled by your ps that not all records are processed. I cannot reproduce that. Can you provide more details? Is it the first or the last? Does it happen always or sometimes? Does it happen with specific fields? Does it sometimes concern more than one?

 

 

Adding a counter for tags that do not contain <div> or <h1>, and implementing a counter to limit the data retrieval for the short description, sounds like a practical solution to enhance control and efficiency in data management.

For tags without <div> or <h1>, we can create a function to count them during the data retrieval process. This function will iterate through the tags and increment the counter for each tag that doesn't contain <div> or <h1>. This counter can then be displayed or used for further processing as needed.

Similarly, for limiting the data retrieval for the short description, we can incorporate a counter that tracks the number of characters retrieved. This counter can be set to a specific limit, and the data retrieval process can be programmed to stop once the limit is reached. This will prevent excessive data retrieval and ensure that the short description remains within the desired character limit.

By implementing these counters, we can introduce better control and optimization in data retrieval processes, leading to improved efficiency and performance.

It is advisable to remove characters from tags containing <div>, <h1>, <h2>, etc., to ensure data integrity and uniformity. This will allow us to focus only on the text content within these tags and avoid including HTML code or other formatting elements in our data.

By removing these characters, we will simplify the data processing process and ensure that the retrieved information is clean and relevant. This practice will improve the quality and consistency of our data and facilitate its use in various contexts and applications.

Regarding the addition of the product ID to the error message, that sounds like a beneficial enhancement. It would certainly provide users with clearer feedback when they encounter errors related to exceeding character limits.

Regarding the puzzling issue concerning the processing of records, I apologize for any confusion caused. Upon further investigation, it seems that the occurrence of records not being processed is an isolated incident. I haven't been able to reproduce it consistently, and it appears to happen sporadically. Unfortunately, I don't have specific details regarding whether it affects the first or last record, or if it's related to specific fields. I will keep monitoring the situation and provide more information if it recurs.

Link to comment
Share on other sites

  • 2 weeks later...
On 4/10/2024 at 1:45 PM, constantin980 said:

 

 

Adding a counter for tags that do not contain <div> or <h1>, and implementing a counter to limit the data retrieval for the short description, sounds like a practical solution to enhance control and efficiency in data management.

For tags without <div> or <h1>, we can create a function to count them during the data retrieval process. This function will iterate through the tags and increment the counter for each tag that doesn't contain <div> or <h1>. This counter can then be displayed or used for further processing as needed.

Similarly, for limiting the data retrieval for the short description, we can incorporate a counter that tracks the number of characters retrieved. This counter can be set to a specific limit, and the data retrieval process can be programmed to stop once the limit is reached. This will prevent excessive data retrieval and ensure that the short description remains within the desired character limit.

By implementing these counters, we can introduce better control and optimization in data retrieval processes, leading to improved efficiency and performance.

It is advisable to remove characters from tags containing <div>, <h1>, <h2>, etc., to ensure data integrity and uniformity. This will allow us to focus only on the text content within these tags and avoid including HTML code or other formatting elements in our data.

By removing these characters, we will simplify the data processing process and ensure that the retrieved information is clean and relevant. This practice will improve the quality and consistency of our data and facilitate its use in various contexts and applications.

Regarding the addition of the product ID to the error message, that sounds like a beneficial enhancement. It would certainly provide users with clearer feedback when they encounter errors related to exceeding character limits.

Regarding the puzzling issue concerning the processing of records, I apologize for any confusion caused. Upon further investigation, it seems that the occurrence of records not being processed is an isolated incident. I haven't been able to reproduce it consistently, and it appears to happen sporadically. Unfortunately, I don't have specific details regarding whether it affects the first or last record, or if it's related to specific fields. I will keep monitoring the situation and provide more information if it recurs.

Matching the tags is done by the browser. So I have no control over it and different browsers may even produce slightly different results.

For the moment I have added a counter below the descriptions plus a red color when they are to big.

Don't forget to refresh the browser cache (ctrl-F5 on the pc) when installing the new version.

Link to comment
Share on other sites

  • 3 weeks later...

Hi.

I have updated prestools (Prestashop version: 1.6.1.13. Prestools version 1.34b. Release date: 4-may-2024. PHP version 7.0.33 and MySQL version 10.1.26)

I have found that when I try to update the short description (description_short field) there is a limit in the length of the field and I receive a warning and can not update

Warning says i.e. : "The description_short field is too long. The length is 2858. The maximum allowed length is 800."

With previous version I used to update this field and other fields containing html without that limitation

Any suggestion on this?

Thanks in advance!
 

Link to comment
Share on other sites

On 5/10/2024 at 3:56 PM, motonet said:

Hi.

I have updated prestools (Prestashop version: 1.6.1.13. Prestools version 1.34b. Release date: 4-may-2024. PHP version 7.0.33 and MySQL version 10.1.26)

I have found that when I try to update the short description (description_short field) there is a limit in the length of the field and I receive a warning and can not update

Warning says i.e. : "The description_short field is too long. The length is 2858. The maximum allowed length is 800."

With previous version I used to update this field and other fields containing html without that limitation

Any suggestion on this?

Thanks in advance!
 

I have uploaded a new version that produces a warning instead of a blockade when a description is too long.

Link to comment
Share on other sites

Hello, I have Prestashop version: 1.7.8.9. and Prestools version 1.32s. When I go to Tools & Stats > Discount overview it shows this error: 

MySQL error 1054: Unknown column 'tr.state' in 'on clause'
Generated by URL '/admin8797/Prestools_Suite/discount-list.php'

image.thumb.png.b355a57644b3e668c4b94889029c1fc3.png

Link to comment
Share on other sites

4 hours ago, TecMikro said:

Hello, I have Prestashop version: 1.7.8.9. and Prestools version 1.32s. When I go to Tools & Stats > Discount overview it shows this error: 

MySQL error 1054: Unknown column 'tr.state' in 'on clause'
Generated by URL '/admin8797/Prestools_Suite/discount-list.php'

image.thumb.png.b355a57644b3e668c4b94889029c1fc3.png

Thank you for reporting this bug. I have fixed it.

Link to comment
Share on other sites

En 12/5/2024 a las 10:37 AM, musicmaster dijo:

I have uploaded a new version that produces a warning instead of a blockade when a description is too long.

Thank you very much, musicmaster.

Link to comment
Share on other sites

  • 3 weeks later...
Posted (edited)

@musicmaster I have noticed 2 anomalies and I am wondering if this is a problem with my shop or general. 

1. I did a mass change to name of about 9000 products in 2 different languages (replaced one word with other). The process looked like this:

- I have set a view of 1000 products.
- I have replaced a word in the name of the product.
- I have a multistore so I have applied changes to all shops.
- After succesful replacement I wen to the next page of products (next 1000 products) and did the same process until I changed all products.

After the change I had a notification that I need to re-inder products. So I went to Back Office - Shop Parameters- Search and I clicked on Add missing products to the index. Unfortuantely, the products are not adding to the search anymore. I can see in the processes of the database that one process is woking until timeout: "DELETE si FROM `ps_search_index` si INNER JOIN `ps_product` p ON (p.id_product = si.id_product)". When this process is current I cannot do any modification to a product. In many cases wile this process is runnng I am not able to access front office as well. I have a message that states SQL LOCK while the process is active. I have to either wait until the process will be killed by my server after a while or kill the process myself in order to access my shop again. This is not the first time I have such situation. This always happens when I do a mass update of couple thousand products in the Prestools. When I do a small mass change (for example 600-800 products) then this problem does not occur which is strange. And this applies not only to changing name. Last time I have did a huge mass replacement of a few words in the description and short description and I also had the same problem. If I recall I changed ~5000 products. Adding missing products to the search index is possible using Prestools but it adds about 30 products until the server stops the query (indexation in the Back Office indexes about 600 products in the same time as it takes prestools to add 30 products). The only way to fix indexation in the Back Office again is to rebuild entire search index. After that everytihng is working flawlessly until next mass change. Strange situation. Right now I either have to change for example 500 products, add mising products to the index and then change another 500 products, or I can make a huge mass change of a few thousand products and then rebuild entire index which takes a few days because I have a lot of products. It's a little bit annoying and I do not know why this issue happens in such strange behaviour.

2. This issue is linked to the search indexing in prestools. I have enabled "indexes" column to check it everything is ok when all od my products are fully indexed because I noticed that some of the products does not appear in search results despite full indexation. I have noticed that some of the products have "0" in the "indexes" column. I went to "Product Search Words" section for the product with 0 indexes and I hit Re-Index button. As a result I have a following error:

NW
Warning: Undefined array key "id_shop" in /XXXXX/prestools/utilities-proc.php on line 515

Time=00:56:00 [starttime was 00:56:00]

I checked a few products with 0 values in the indexes columnt and all gave me the same error. But when I go to the back office, open this product and save it, the "indexes" column is now filled with values and the product appears in the search results. I am not sure what I can do to make a mass updated of that column in prestools. Going into each product in the back office is kinda a slow option to create indexes for search results. 

Edited by banan_44 (see edit history)
Link to comment
Share on other sites

9 hours ago, banan_44 said:

@musicmaster I have noticed 2 anomalies and I am wondering if this is a problem with my shop or general. 

1. I did a mass change to name of about 9000 products in 2 different languages (replaced one word with other). The process looked like this:

- I have set a view of 1000 products.
- I have replaced a word in the name of the product.
- I have a multistore so I have applied changes to all shops.
- After succesful replacement I wen to the next page of products (next 1000 products) and did the same process until I changed all products.

After the change I had a notification that I need to re-inder products. So I went to Back Office - Shop Parameters- Search and I clicked on Add missing products to the index. Unfortuantely, the products are not adding to the search anymore. I can see in the processes of the database that one process is woking until timeout: "DELETE si FROM `ps_search_index` si INNER JOIN `ps_product` p ON (p.id_product = si.id_product)". When this process is current I cannot do any modification to a product. In many cases wile this process is runnng I am not able to access front office as well. I have a message that states SQL LOCK while the process is active. I have to either wait until the process will be killed by my server after a while or kill the process myself in order to access my shop again. This is not the first time I have such situation. This always happens when I do a mass update of couple thousand products in the Prestools. When I do a small mass change (for example 600-800 products) then this problem does not occur which is strange. And this applies not only to changing name. Last time I have did a huge mass replacement of a few words in the description and short description and I also had the same problem. If I recall I changed ~5000 products. Adding missing products to the search index is possible using Prestools but it adds about 30 products until the server stops the query (indexation in the Back Office indexes about 600 products in the same time as it takes prestools to add 30 products). The only way to fix indexation in the Back Office again is to rebuild entire search index. After that everytihng is working flawlessly until next mass change. Strange situation. Right now I either have to change for example 500 products, add mising products to the index and then change another 500 products, or I can make a huge mass change of a few thousand products and then rebuild entire index which takes a few days because I have a lot of products. It's a little bit annoying and I do not know why this issue happens in such strange behaviour.

2. This issue is linked to the search indexing in prestools. I have enabled "indexes" column to check it everything is ok when all od my products are fully indexed because I noticed that some of the products does not appear in search results despite full indexation. I have noticed that some of the products have "0" in the "indexes" column. I went to "Product Search Words" section for the product with 0 indexes and I hit Re-Index button. As a result I have a following error:

NW
Warning: Undefined array key "id_shop" in /XXXXX/prestools/utilities-proc.php on line 515

Time=00:56:00 [starttime was 00:56:00]

I checked a few products with 0 values in the indexes columnt and all gave me the same error. But when I go to the back office, open this product and save it, the "indexes" column is now filled with values and the product appears in the search results. I am not sure what I can do to make a mass updated of that column in prestools. Going into each product in the back office is kinda a slow option to create indexes for search results. 

I have fixed your point 2 and uploaded a new version. I will need some time to study point 1.

Link to comment
Share on other sites

On 5/30/2024 at 1:36 AM, banan_44 said:

@musicmaster I have noticed 2 anomalies and I am wondering if this is a problem with my shop or general. 

1. I did a mass change to name of about 9000 products in 2 different languages (replaced one word with other). The process looked like this:

- I have set a view of 1000 products.
- I have replaced a word in the name of the product.
- I have a multistore so I have applied changes to all shops.
- After succesful replacement I wen to the next page of products (next 1000 products) and did the same process until I changed all products.

After the change I had a notification that I need to re-inder products. So I went to Back Office - Shop Parameters- Search and I clicked on Add missing products to the index. Unfortuantely, the products are not adding to the search anymore. I can see in the processes of the database that one process is woking until timeout: "DELETE si FROM `ps_search_index` si INNER JOIN `ps_product` p ON (p.id_product = si.id_product)". When this process is current I cannot do any modification to a product. In many cases wile this process is runnng I am not able to access front office as well. I have a message that states SQL LOCK while the process is active. I have to either wait until the process will be killed by my server after a while or kill the process myself in order to access my shop again. This is not the first time I have such situation. This always happens when I do a mass update of couple thousand products in the Prestools. When I do a small mass change (for example 600-800 products) then this problem does not occur which is strange. And this applies not only to changing name. Last time I have did a huge mass replacement of a few words in the description and short description and I also had the same problem. If I recall I changed ~5000 products. Adding missing products to the search index is possible using Prestools but it adds about 30 products until the server stops the query (indexation in the Back Office indexes about 600 products in the same time as it takes prestools to add 30 products). The only way to fix indexation in the Back Office again is to rebuild entire search index. After that everytihng is working flawlessly until next mass change. Strange situation. Right now I either have to change for example 500 products, add mising products to the index and then change another 500 products, or I can make a huge mass change of a few thousand products and then rebuild entire index which takes a few days because I have a lot of products. It's a little bit annoying and I do not know why this issue happens in such strange behaviour.

2. This issue is linked to the search indexing in prestools. I have enabled "indexes" column to check it everything is ok when all od my products are fully indexed because I noticed that some of the products does not appear in search results despite full indexation. I have noticed that some of the products have "0" in the "indexes" column. I went to "Product Search Words" section for the product with 0 indexes and I hit Re-Index button. As a result I have a following error:

NW
Warning: Undefined array key "id_shop" in /XXXXX/prestools/utilities-proc.php on line 515

Time=00:56:00 [starttime was 00:56:00]

I checked a few products with 0 values in the indexes columnt and all gave me the same error. But when I go to the back office, open this product and save it, the "indexes" column is now filled with values and the product appears in the search results. I am not sure what I can do to make a mass updated of that column in prestools. Going into each product in the back office is kinda a slow option to create indexes for search results. 

I see I uploaded an old version. That has now been fixed.

Link to comment
Share on other sites

On 5/31/2024 at 3:57 PM, musicmaster said:

I see I uploaded an old version. That has now been fixed.

Thank you. So the current version on your website fixes both problems?

Link to comment
Share on other sites

16 hours ago, banan_44 said:

Thank you. So the current version on your website fixes both problems?

The fact that the indexation in the backoffice sometimes hangs is a known problem that turns up quite often on the forum. Sometimes people even resort to use SQL to empty the indexation tables to get out of the situation. But it is a Prestashop problem and I am not aware of a structural diagnosis or solution.

I fixed a few bugs in the indexation routines. What still could be added is a routine like there is with image regeneration - that with repeated calls from javascript evades server timeouts.

Link to comment
Share on other sites

Thank you for the info. I have updated prestools to the latest version on your website. I have also updated super package because I have noticed that there is a new version available. I have noticed a new bug. When I export offers to the csv file I have a following information before each line which kind of messes up the csv file. I have exported following columns: id_product;name;active;categories;"category ids";price;"VAT group";"VAT perc";priceVAT;quantity;ean;reference

<br />
<b>Deprecated</b>:  ctype_digit(): Argument of type float will be interpreted as string in the future in <b>/xxxx/prestools/functions1.php</b> on line <b>1084</b><br />

 

Link to comment
Share on other sites

9 hours ago, banan_44 said:

Thank you for the info. I have updated prestools to the latest version on your website. I have also updated super package because I have noticed that there is a new version available. I have noticed a new bug. When I export offers to the csv file I have a following information before each line which kind of messes up the csv file. I have exported following columns: id_product;name;active;categories;"category ids";price;"VAT group";"VAT perc";priceVAT;quantity;ean;reference

<br />
<b>Deprecated</b>:  ctype_digit(): Argument of type float will be interpreted as string in the future in <b>/xxxx/prestools/functions1.php</b> on line <b>1084</b><br />

 

Thank you for the report. I have uploaded an update that should fix the problem.

  • Like 1
Link to comment
Share on other sites

On 6/8/2024 at 9:34 AM, musicmaster said:

Thank you for the report. I have uploaded an update that should fix the problem.

Thank you. That helped but I found another bug now. I wanted to make a mass change in the description for 3 products. Submit all button is not working. Nothing happens when I click it 😢

screenshot.thumb.jpg.e414dbaeb97335bc6ee670b2c81ce142.jpg

 

Link to comment
Share on other sites

1 hour ago, banan_44 said:

Thank you. That helped but I found another bug now. I wanted to make a mass change in the description for 3 products. Submit all button is not working. Nothing happens when I click it 😢

screenshot.thumb.jpg.e414dbaeb97335bc6ee670b2c81ce142.jpg

Thanks for noticing that. Somehow I had accidentally deleted one character from the javascript file. That has now been fixed. Don't forget to refresh you javascript cache (ctrl-F5 on a pc) after you have unzipped the new version.

Link to comment
Share on other sites

On 6/9/2024 at 9:02 PM, musicmaster said:

Thanks for noticing that. Somehow I had accidentally deleted one character from the javascript file. That has now been fixed. Don't forget to refresh you javascript cache (ctrl-F5 on a pc) after you have unzipped the new version.

Strange. I have updated the script to the lastest version from your link. I have cleared cache but I still have the problem :(

Link to comment
Share on other sites

13 hours ago, banan_44 said:

Strange. I have updated the script to the lastest version from your link. I have cleared cache but I still have the problem :(

I am not sure whether what you did also empties the scripts cache. Check like 4481 of product-edit9.js. It should contain "var descriptcheck = -1;". If I remember well this was "var desciptcheck = -1;" in the defect version.

Link to comment
Share on other sites

En 12/5/2024 a las 10:37 AM, musicmaster dijo:

I have uploaded a new version that produces a warning instead of a blockade when a description is too long.

Hi musicmaster. I have updated to Prestools version 1.34e. Release date: 8-jun-2024, but I still receive when I try to submit description_short:

"The description_short field is too long. The length is 1140. The maximum allowed length is 800"

Thanks in advance

Link to comment
Share on other sites

3 hours ago, motonet said:

Hi musicmaster. I have updated to Prestools version 1.34e. Release date: 8-jun-2024, but I still receive when I try to submit description_short:

"The description_short field is too long. The length is 1140. The maximum allowed length is 800"

Thanks in advance

With the latest version you should get this warning but with the option to continue submitting.

Did you cleanse the browser cache (ctrl-F5 on the pc). Otherwise you will still see the old javascript file being run.

Link to comment
Share on other sites

Hey musicmaster

https://dddd.ddd/admin/prestools/hook-info.php

Prestashop 8.1.7, cPanel, AlmaLinux 8, PHP 8.2, 8.0.37 - MySQL Community Server

 

Report

---

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/dddd/public_html/admin/prestools/hook-info.php on line 158

 

I have over a thousand of these "deprecated" before I can even get to the hook info.

 

thanks

 

Link to comment
Share on other sites

https://dddd.ddd/admin/prestools/integrity-checks.php

Out-of-bound values

This section checks for a few keys (shop and currency) whether there are values that are not defined in their base table (like ps_shop). The list below will show the tables with id_shops that are either zero or have a non-existing id number. The format is "tablename-(zerocount;non-existcount)". Such values don't need to be problematic (in some tables a zero stands for "all"), but when you have problems it is a good idea to check them out:
Shops:
Currencies:
Groups:

MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups FROM ps_group' at line 1
Generated by URL '/admin/prestools/integrity-checks.php'
with Query 'SELECT GROUP_CONCAT(id_group) AS groups FROM ps_group'
generated by /home/dddd/public_html/admin/prestools/integrity-checks.php on line 1337

 

Any idea on this one?

Link to comment
Share on other sites

Hi and thank you for a great tool! It saved me a lot of time :)

I have one problem though. I am trying to change the base prices of products that have attributes and they are marked red (which means that no changes can be made.

Any idea why?

 

Link to comment
Share on other sites

On 7/5/2024 at 3:21 PM, danielle771 said:

Hi and thank you for a great tool! It saved me a lot of time :)

I have one problem though. I am trying to change the base prices of products that have attributes and they are marked red (which means that no changes can be made.

Any idea why?

You are right. That should be fixed.

Unfortunately it will take a while before I find time to fix it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...