"Find and replace" + characters count limit in item specifics

Hi,
I have some problems working with items’s specifics.
First one, is there a way to bulk find and replace one or more words in items’ specifics? It seems not available in the options and I need to do it one by one.
Then, ebay has a limit of 65 characters count in items’ specifics fields. This is very annoying because GS does not show any count as it does in title field and there is no way to know if the limit is reached or not. I have something like 650 listings to modify one by one… GS didn’t inform me about the limit before trying to launch those listings.
I hope a fix or a new feature is something possible.

Thank you
Federico

Maybe this can be done with a script. This way you won’t have to do it one by one.
Can you let me know:

  1. The word to be replaced
  2. The “new” word
  3. The name of the attribute (e.g. “Author”)

Maybe a script can help you with that, too. How about a script that checks all selected listings and then shows a table with listings in which attribute values that are too long were found?
It might be possible to cut off the too long values, too.

Hi Kristian,
thank you for your help!
Script is surely a solution for my problem, but I think GS should show on its own a characters count like it still does in title field. Now I already know which ones are too long because they didn’t launch. I need to replace " condition as shown in " with " check " and the attribute name is " CONSERVAZIONE - CONDITION ".
Thank you again for your help.

Federico

This is a good solution, if I can also replace the words above. Unfortunately they are too long…

The script below should do the trick but please try it with a handful selected listings first. Just to make sure it works as expected and doesn’t break anything.

// This script checks the given attribute ("attrName") and replaces "textToBeReplaced" with "newText"
function run(){
	let textToBeReplaced = "condition as shown in";
	let newText = "check";
	let attrName = "CONSERVAZIONE - CONDITION";
	
	for (const listing of selectedListings) {
		if (String(listing.attributes[attrName]).includes(textToBeReplaced)) {	
			var attributes = listing.attributes;
			attributes[attrName] = String(attributes[attrName]).replace(textToBeReplaced, newText);
			listing.attributes = attributes;
			consoleLog("Listing edited: " + listing.title);
		}
	}
}

To use it open GarageSale’s script editor, click the + button and paste the script. Select one or more listings in GarageSale’s main window, then click the “Run” button in script editor.

1 Like

:heart_eyes: super Kristian !! This solved my problem in few seconds !

Does this script also do this somehow?

Below you find another script that shows listing with too long attribute values.
The script does not alter the too long attribute value. Does this work for you already?

// This script finds attribute values longer than the allowed 65 character limit 
function run() {
	var arr = [];
	for (const listing of selectedListings) {
		for (const key in listing.attributes) {
			const value = listing.attributes[key];
			if (String(value).length > 65) {
				consoleLog("Attribute '" + key + "' has more than 65 characters! (Listing: " + listing.title + "; item ID: " + listing.itemID + ")" );
   				arr.push(listing);
   			}
   		}
	}
	showListings(arr, "These listings have attribute values longer than 65 characters:");
}
1 Like

Hi Kristian,
I just tried it here and YES, it works! You just made my day much much better !!! I hope I will find one day a way to thank you enough for all this.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.