Jump to content

[Free script] Prestools Suite: mass edit, cleanup, integrity checks and much more


musicmaster
 Share

Recommended Posts

Hi Musicmaster,

 

What I mean is that when I sort the product visualy I change the product place and rearrange the product on the page. Then I click submit for the changes to be online (and on the website the changes are ok) but then on the visual sorting page the products are like previously not like the changes that have already be done. This is why I was wondering if it is possible to have an automatic refresh instead of doing it manually ?

Share this post


Link to post
Share on other sites

Hi Musicmaster,

 

What I mean is that when I sort the product visualy I change the product place and rearrange the product on the page. Then I click submit for the changes to be online (and on the website the changes are ok) but then on the visual sorting page the products are like previously not like the changes that have already be done. This is why I was wondering if it is possible to have an automatic refresh instead of doing it manually ?

Hi Smalto,

 

Do you have a recent version? I cannot see the problems you mention. The only problem I found is one with multi-shopping - that will be solved in the next release.

 

Otherwise can you pm me your access data so that we can have a look together?

Share this post


Link to post
Share on other sites

Hello Musicmaster,

 

I have now tried on Chrome and the refresh is done automatically. In Firefox for mac 51.0.1 the refresh is not automatic.

So it seems that it is related to the browser and not to your script. I will use Chrome on my mac when I use your script.

Thank you.

  • Like 1

Share this post


Link to post
Share on other sites

Hello Musicmaster,

 

I have now tried on Chrome and the refresh is done automatically. In Firefox for mac 51.0.1 the refresh is not automatic.

So it seems that it is related to the browser and not to your script. I will use Chrome on my mac when I use your script.

Thank you.

Thank you for the feedback.

Share this post


Link to post
Share on other sites

Hi, I used your script for a long time... but now I have only forst row inside table...

 

others line are out of table and I cannot edit fileld.. can you help me? thanks

 

Hi ietax,

 

Sorry to hear you found a problem.

 

I have to see this to know what is happening. Can you pm me access data so that I can have a look? Or do you have a screendump?

 

Are you using the latest version? It is recommended to update first when you experience a problem. There is always a chance that the problem has already been solved. And if there are error messages it makes them easier to locate.

 

M.

Edited by musicmaster (see edit history)

Share this post


Link to post
Share on other sites

Hello Musicmaster,

 

I've tested both versions (1.16f and 1.14o2) and I have not found any problem: after "submit" show updated data immediately, without the need to clear the browser cache.

 

If you want, I can control other releases, there is no problem.

 

Thank you.

 

Hi.

 

-

 

Sandro R1

 

Hi Sandro,

 

I have two new versions. Can you test them too?

 

Regards,

 

M.

Prestools_Suite-1.16fx.zip

Prestools_Suite-1.16fy.zip

Share this post


Link to post
Share on other sites

Hi Sandro,

 

I have two new versions. Can you test them too?

 

Hello Musicamaster,

 

I've tested both versions (1.16fx and 1.16fy) and both function properly and DO NOT require the cache refresh (F5 or ctrl + F5) and show immediately changes made (I have only tested this feature, I have not checked nothing else!).

 

I have found that in these versions there is no longer the ability to search in the field "available_for_order", which instead was present in the 1.14e release (screenshot attached).

 

Thanks for everything.

 

Hello.

 

--

 

Sandro

post-323317-0-17492000-1490087786_thumb.jpg

post-323317-0-42995200-1490087792_thumb.jpg

Share this post


Link to post
Share on other sites

Hi Sandro,

 

Two new chances...

 

Hi Musicmaster,

 

release 1.16fc shows the updated data immediately, instead rel. 1.16fd NOT shows immediately the changes and requires refreshing of the F5.

 

Found!  :)

 

Hi.

 

--

 

Sandro

Share this post


Link to post
Share on other sites

Hi Musicmaster,

 

release 1.16fc shows the updated data immediately, instead rel. 1.16fd NOT shows immediately the changes and requires refreshing of the F5.

 

Found!  :)

 

Hi.

 

--

 

Sandro

I think it is .htaccess. I had changed that when some people appeared to load old versions of the javascript file. But it looks like the changes don't work out well in some settings. So I will undo the changes.

 

Thank you for your help finding this out.

Share this post


Link to post
Share on other sites

Hi Musicmaster,

 

the new release 1.16q works perfectly and does not require updating the cache after changes.

Thanks also to have added available_for_order to search fields.

Thank you very much.

Hi.

 

--

 

Sandro

Share this post


Link to post
Share on other sites

Is there an option to default submit to all shops?

 

No.  But I could consider adding one. On the other hand: changing the source code should be rather easy for anyone knowing a bit of html.

 

I How to edit combinations massively. Each combination has a different price

 

Products with combinations have as their quantity field a link. If you click that link you get on the combinations page of that product where you can change prices, etc. An alternative road is the combinations field.

Share this post


Link to post
Share on other sites

Hello

I've bought the features plugin one month ago... and it's the first time I want to use it, but I don't understand why there is " 3 circles " for edit, and nothing happened when I checked each of them and I couldn't change features...

Could you help me please...

Share this post


Link to post
Share on other sites

The three circles have to do with a different interface, for example the choice between a line and a textarea input. They should work all three.

 

That they are not working suggests that some javascript error is happening. If you can give me access (by PM) I can have a look and solve the problem for you.

Share this post


Link to post
Share on other sites

Hi MusicMaster

 

I've been using Prestools Package 1.03 and Prestools Suite 1.10. I would like to add 1 delivery method to all product in a particular category. It returns with error 404.

 

The link is /prestools/product-proc.php?c=18&d=18

 

I've just edited some categories and it was working fine, then this particular category & sub-categories didn't work.

 

Any idea what's happening?

Share this post


Link to post
Share on other sites

Hi MusicMaster

 

I've been using Prestools Package 1.03 and Prestools Suite 1.10. I would like to add 1 delivery method to all product in a particular category. It returns with error 404.

 

The link is /prestools/product-proc.php?c=18&d=18

 

I've just edited some categories and it was working fine, then this particular category & sub-categories didn't work.

 

Any idea what's happening?

Hi Ben,

 

I am puzzled by this problem. 404 (file not found) is a very unusual error to experience in this context. It might help if you could provide the url of the not found file. The only situation where I found 404's were in the case were some antispam program had renamed or deleted the product-proc.php file.That happens usually after a couple of minutes - what might explain that it initially works ok.

 

"?c=18&d=18" doesn't say much. The real info is transferred invisible (the POST option in html).

 

If you PM me access data and tell me how to reproduce the problem I will have a look.

 

An alternative is that you switch verbose on and report to me the output both with a category where it works and a category where it doesn't work.

 

M

Edited by musicmaster (see edit history)

Share this post


Link to post
Share on other sites

Hi Ben,

 

I am puzzled by this problem. 404 (file not found) is a very unusual error to experience in this context. It might help if you could provide the url of the not found file. The only situation where I found 404's were in the case were some antispam program had renamed or deleted the product-proc.php file.That happens usually after a couple of minutes - what might explain that it initially works ok.

 

"?c=18&d=18" doesn't say much. The real info is transferred invisible (the POST option in html).

 

If you PM me access data and tell me how to reproduce the problem I will have a look.

 

An alternative is that you switch verbose on and report to me the output both with a category where it works and a category where it doesn't work.

 

M

 

Hi M,

 

I ticked the verbose but the result is still the same. It returns 404. I tried on a different category too & it seems like the result is the same.

 

Do you think it's because I renamed the carrier? But it shouldn't cause an error.

 

Please check your PM. Thanks

Share this post


Link to post
Share on other sites

 

Hello, I need to copy massive combinations in prestashop 1.7, is it for that prestashop version? where do I buy it?
Thanks and great work

 

 

Hi neouy,

 

I need to make some minor adaptations to make combination copying work under 1.7 as Prestashop has added a new field (ISBN). I hope to include it in the next update. With the free version you can only copy combinations for one product at a time. If you buy the plugin (at Prestools.com) you can copy to as many products as you want.

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Hi neouy,

 

I need to make some minor adaptations to make combination copying work under 1.7 as Prestashop has added a new field (ISBN). I hope to include it in the next update. With the free version you can only copy combinations for one product at a time. If you buy the plugin (at Prestools.com) you can copy to as many products as you want.

 

 

 

Perfect thank you very much, I want to buy to copy many combinations at the same time, my prestashop is 1.7.1.0, you can notify me when you are ready to buy?

Share this post


Link to post
Share on other sites

Hi,

again prestools doesn't save anymore. I worked yesterday without any problem but in the afternoon, without any advise, it was not possible anymore to save changement.

Today I update to the last version and it save the first change (!) and after that no more. Of course I emptied the cache without results. Any solution?

Share this post


Link to post
Share on other sites

Hi,

again prestools doesn't save anymore. I worked yesterday without any problem but in the afternoon, without any advise, it was not possible anymore to save changement.

Today I update to the last version and it save the first change (!) and after that no more. Of course I emptied the cache without results. Any solution?

Hi Vladip,

 

Is it possible for you to pm me access to you Prestools page so that I can have a look myself?

 

My guess is that you have some kind of data that causes a javascript error. But I have to look to know more.

Share this post


Link to post
Share on other sites

OK could you explain please for free version if that OK I'll buy your plugin???

But in product-edit I checked "Combinations", I clicked on the number of combination and in the new window I don't see any delete button only "Hide display"

Could you help me please??

Share this post


Link to post
Share on other sites

OK and with plugin version is it possible to delete only some combinations of one or several products??

I am not sure what you mean. You can select which combinations to delete with the free version too. The limitation is that you can apply to only one product at a time.

Share this post


Link to post
Share on other sites

Yes you 're right, I just see it I test it but when I check "select combinations from product" no combinations are displays...

Some pictures explain to you

I 've a product ID 2011 with 3 combinationscombination.jpg

 

when I checked on combination-edit I see this 3 combinations: combination-edit.jpg

 

But in combination delelete no choice for deleting for example the 2nd combinationcombination-delete.jpg

 

Maybe I've don't undersand...

Edited by romelik (see edit history)

Share this post


Link to post
Share on other sites

okkkk...!!! but so I don't understand Target ID...???

 

I tried but I 've a alert :"This version of Combi-copy CANNOT be used with this version of Prestashop!"

My prestashop version 1.6.1.4.

 

Edit: I've 17rows in ps_product_attribute and not 16... why???Do you no?

 

In fact it's not 17rows but 17columns...

Edited by romelik (see edit history)

Share this post


Link to post
Share on other sites

I see that I had left some debug code (the query) in the page - that is no repaired. But this doesn't affect the results. 

 

Are you sure that the category in which you are searching contains this word? If I look on your site it is in a subcategory of it.

Share this post


Link to post
Share on other sites

The indexation system of Prestashop has some deficiencies. It does not index supplier references (it has code for it but that has been outdated for at least five years) and of the categories that a product belongs to it only indexes the default one. I hope that the first problem will be repaired in the following edition of PS 1.7 - but that doesn't help all those using older versions.

 

With 1.17d I have solved those two problems for the indexation in Prestools. So products last changed with Prestools will contain the improved indexation. If you next change the product in Prestashop you will get its indexation again. 

 

Note that in Prestools only fields relevant for indexation trigger re-indexation. Price changes for example will not do so. An easy way to trigger re-indexation is to change products to inactive, then change them back to active and them to submit all. Note that as you don't submit in between the products are never inactivated: you just fooled the software that the active field had been changed.

Share this post


Link to post
Share on other sites

You can already edit the supplier reference with the plugin. But I am not sure what you mean with the "product sheet".

 

Thank you very much for your work. I download today your module but I can´t see supplier_reference for edit. I see in product-edit.php around line 1210 where you allow supplier reference if dont exist product reference "p.reference ".$inc." or p.supplier_reference"

 

There are a way to can choose and edit p.supplier_reference ?

 

best regards

Edited by seog (see edit history)

Share this post


Link to post
Share on other sites

Thank you very much for your work. I download today your module but I can´t see supplier_reference for edit. I see in product-edit.php around line 1210 where you allow supplier reference if dont exist product reference "p.reference ".$inc." or p.supplier_reference"

 

There are a way to can choose and edit p.supplier_reference ?

 

best regards

 

 

Line 1210 is about the search function in Prestools. Besides that it is not correct. p.supplier_reference is a heritage field that no longer has a function. The supplier reference field is now in the ps_product_supplier table. So I will need to fix or remove this here.

 

You can edit the supplier reference by choosing to edit the supplier.

Edited by musicmaster (see edit history)

Share this post


Link to post
Share on other sites

Hello I've bought your features plugin and override my prestashop to be able to save multi features value...

In product-solo I saw all my features value : ex: Size 10cm, 20cm, 30cm... but in product-edit I saw only tle last value so 30cm ... is it possible to display all the values??

Thank you...

Share this post


Link to post
Share on other sites

Hello I've bought your features plugin and override my prestashop to be able to save multi features value...

In product-solo I saw all my features value : ex: Size 10cm, 20cm, 30cm... but in product-edit I saw only tle last value so 30cm ... is it possible to display all the values??

Thank you...

That is doubtful....

 

The problem is that what you have is a customization. That plugin makes changes to the standard Prestashop database and I don't know which one. Accidentally it works ok with product-solo but I don't know why.

 

So I would need to have a closer look first before I can say more.

Share this post


Link to post
Share on other sites

I've made the override of this post by  jgullstr the 21 august 2014 in page 9

https://www.prestashop.com/forums/topic/176242-modification-select-multiple-values-for-one-feature/page-9/#post_id_1771267

In the database in ps_feature_product I change the primary key existing to a combination of the three values : id_feature, id_product and id_feature_value.

In your script in product-solo.php you have all the features_value with this query:

foreach($features AS $key => $feature)
	{ $xquery = "SELECT fv.custom AS custom,fl.value AS value FROM ". _DB_PREFIX_."feature_product fp";
	  $xquery.=" left join ". _DB_PREFIX_."feature_value fv on fp.id_feature_value=fv.id_feature_value";
	  $xquery.=" left join ". _DB_PREFIX_."feature_value_lang fl on fp.id_feature_value=fl.id_feature_value AND fl.id_lang='".$id_lang."'";
	  $xquery .= " WHERE fp.id_product = '".$id_product."' AND fp.id_feature='".$key."'";
	  $xres=dbquery($xquery);
	  while ($xrow=mysqli_fetch_array($xres)) /* mag maar één keer gebeuren */
	  { echo "<tr><td>".$key."-".$feature."</td><td>";
	    if($xrow["custom"] == "1") echo $xrow["value"];
		else echo "<b>".$xrow["value"]."</b>";
		echo "</td></tr>";
	  }
	}

I tried to put it in product-edit but with no succes... if you 've a idea... thank you

Edited by romelik (see edit history)

Share this post


Link to post
Share on other sites

In line 2134 of product-edit.php you have the following

foreach($features AS $key => $feature)
{ $cleanfeature = str_replace('"','_',$feature);
  if (in_array($cleanfeature, $input["fields"]))
  { if($datarow['value'.$key] == "")
		echo "<td></td>";
	else if($datarow['custom'.$key] == "0")
  	    echo "<td><b>".$datarow['value'.$key]."</b></td>";
	else // custom = 1
  	    echo "<td>".$datarow['value'.$key]."</td>";
	  
/*  if($datarow['value'.$key] != "")
  	    echo "<td idx='".$datarow['custom'.$key]."'>".$datarow['value'.$key]."</td>";
	else
  	    echo "<td idx='-1'></td>";
*/  }
}

In your case you will get after the line "if (in_array($cleanfeature, $input["fields"]))" an extra "if" for your multi-value features and for them you can then copy the code from product-solo. Of course those values will be view-only as the software isn't designed for handling multi-value features.

Share this post


Link to post
Share on other sites

Maybe for someone else ... I achieved something...

$display_multi_features_value = 1;
if ($display_multi_features_value == 1){
	echo "<td>";	
	foreach($features AS $key => $feature)
	{ $xquery = "SELECT fv.custom AS custom,fl.value AS value FROM ". _DB_PREFIX_."feature_product fp";
	  $xquery.=" left join ". _DB_PREFIX_."feature_value fv on fp.id_feature_value=fv.id_feature_value";
	  $xquery.=" left join ". _DB_PREFIX_."feature_value_lang fl on fp.id_feature_value=fl.id_feature_value AND fl.id_lang='".$id_lang."'";
	  $xquery .= " WHERE fp.id_product = '".$datarow['id_product']."' AND fp.id_feature='".$key."'";
	  $xres=dbquery($xquery);
	  while ($xrow=mysqli_fetch_array($xres)) /* mag maar één keer gebeuren */
	  { echo "<p>".$key."-".$feature.":";
	    if($xrow["custom"] == "1") echo $xrow["value"];
		else echo "<b>".$xrow["value"]."</b>";
		echo "</p>";
	  }
	}
}
else
	foreach($features AS $key => $feature)
	{ $cleanfeature = str_replace('"','_',$feature);
	  if (in_array($cleanfeature, $input["fields"]))
	  { if($datarow['value'.$key] == "")
			echo "<td></td>";
		else if($datarow['custom'.$key] == "0")
	  	    echo "<td><b>".$datarow['value'.$key]."</b></td>";
		else // custom = 1
	  	    echo "<td>".$datarow['value'.$key]."</td>";
	  
/*	  if($datarow['value'.$key] != "")
	  	    echo "<td idx='".$datarow['custom'.$key]."'>".$datarow['value'.$key]."</td>";
		else
	  	    echo "<td idx='-1'></td>";
*/	  }
	} 

 I change in the sql request : ".'id_product'." by ".$datarow['id_product']." else i 've error : "variable id_product' is not defined."

 

With this code I must write the value of my new variable $display_multi_features_value to display it, if it's possible I would like that :

$display_multi_features_value == 1  by default, if features is not checked

and  $display_multi_features_value == 0 if features is checked  but I don't understand how you check your checkbox...

Share this post


Link to post
Share on other sites

Hi Romelik, 

 

Compliments for finding a solution.

 

The checkboxes are the array $input["fields"]. If a field is checked you find it in the array. Otherwise not.

 

So if you had multiple values for the features "cars" and "trucks" I would expect the following kind of code to work (untested so it may contain some bugs, but you know how to code):

$multivalue_features = array("cars","trucks");
foreach($features AS $key => $feature)
{ $cleanfeature = str_replace('"','_',$feature);
  if (in_array($cleanfeature, $input["fields"]))
  { if (in_array($cleanfeature, $multivalue_features))
    { echo "<td>"; 
$xquery = "SELECT fv.custom AS custom,fl.value AS value FROM ". _DB_PREFIX_."feature_product fp";
   ....

} else { if($datarow['value'.$key] == "")

Share this post


Link to post
Share on other sites

The download links ar not working, can someone give me them?

On the whole Prestashop forum the download links are failing. I hop they repair this soon.

 

In the meantime you can download the software from the bottom of the www.prestools.com homepage.

Share this post


Link to post
Share on other sites

There was a little bug fix for the paid suppliers plugin. People who have this plugin or the whole package are encouraged to upgrade. They should simultaneously upgrade the free software to 1.17f or higher.

 

The bug concerned the currency. There was no option to set it and always the default currency was used. As far as I know know it didn't cause problems for anyone. 

Edited by musicmaster (see edit history)

Share this post


Link to post
Share on other sites

Hi Musicmaster, Thanks for your plugin.

When select warehouse, warehousing column is empty. Warehousing is not editable.

Export CSV - warehousing column = qty column.

In CSV file: Notice:  Undefined index: supplier in ..../product-csv.php on line 610.

Prestashop 1.6.1.13. Prestools 1.17f. PHP 7.

Best regards

Share this post


Link to post
Share on other sites

Hi Piotr,

 

Stock keeping with a warehouse is not supported in Prestools, except for a few little things. First of all you can see - but not change - your stock in warehouses when you select the warehouse field. The second is that if you select the "stockflags" field and you choose to change from manual to Adv Stockmanagement with Warehousing  you have the option to move the existing stock to a warehouse (in Prestashop the stock is set to zero).

 

Demand was too low and it is quite complicated, so I never came to implement this. And with 1.7 ASM was dropped....

 

I will have a look at the CSV. It looks like the supplier isn't handled correctly. I will repair that in the next update.

 

Regards,

M

Share this post


Link to post
Share on other sites

Hi Musicmaster,

Thanks for your reply.

Unfortunately I can not see.

If I find warehouse 0 or 1 or 2 or 3 products not found.

Warehouse/warehousing column is the quantity of products in the warehouse or warehouse id?

Regards,

Piotr

post-1314847-0-16933500-1495032442_thumb.png

post-1314847-0-42189200-1495032456_thumb.png

Share this post


Link to post
Share on other sites

Warehousing displays now just the total quantity. If you want I can change it to what you see online. But I am not sure how to implement a nested array in csv. So either you would get name and quantity of one warehouse or you would get a list of warehouse names without quantity. 

 

It is not clear to me what you are aiming for with "find 1 in warehousing".

Share this post


Link to post
Share on other sites