Bulk replace question

Can you highlight something in editor mode then get the exact html code for what you highlighted?

I want to bulk replace large blocks of text. I figure if I can highlight exactly what I want to replace in editor mode then get that exact html I would be able to replace it more easily.

I’m trying to use just the text and it’s not working. It has many spaces, etc. I’m basically trying to adjust my shipping prices for hundreds of items i will be relisting without having to edit the templates 1 by 1


You maybe have to select the “Exact Search” checkbox to get the search working.

Please note that you are trying to replace formatted text. As far as I can tell it won’t work to replace it with formatted text - only with plain text.
You might want to test it with one single listing first.

If you don’t want to lose the text formatting you’d have to “convert” it to HTML code: Switch to Preview mode and type into your item description. This will convert your item description to HTML code. Switch back to Editor mode to see the changes.
Please note that this step can’t be undone!

Ok the formatted text must be the reason it isnt working. Is there a way to get the code for what i highlighted?

There has to be a way to replace large portions of text if u have the code right?

Maybe you try it with a smaller section of your formatted text first. Try it with one single listing first because - as I mentioned - the replaced text won’t have any text formatting.

You can only “convert” your whole item description:
If you don’t want to lose the text formatting you’d have to “convert” it to HTML code: Switch to Preview mode and type into your item description. This will convert your item description to HTML code. Switch back to Editor mode to see the changes.
Please note that this step can’t be undone!

You need to add a text snippet to the template so all you need to do is change the text snippet and all listings using that template will be changed.

No search and replace! If your text snippet is 100% correct then all listings using a template with that snippet will be 100% correct.

I keep a folder at the top of the left column for templates. Most of these are for shipping and / or category templates. The top sub folder in the templates folder is where I keep my text snippet drafts.

Rather than typing directly in the text snippet window I design the snippet using one of my shipping templates in Preview Mode. I then copy the HTML in Editor Mode, open the snippet window and paste it into a snippet.

I also use this folder to keep copies of custom HTML/CSS tables that I use for various Media templates.

Add blank snippet to Snippet window.

Duplicate existing template and rename.

Use Design Utility to add the snippet to that template

After restarting GS it will appear in the Listing Designs popup window.

Select all listing and switch design to new listing.

Design the snippet using a empty listing template.

Copy html, open snippet window and paste into blank snippet you created before.

Pressing Option + Control keys should toggle visibility of snippet in your listing templates.

Man i wish somebody could make a vid about how to do this. Would be a game changer for me! I’m going to try to figure it out.

It has been awhile but lets see if this quick hack will work…

Quit Garage Sale.

/Users/yourusername/Library/Containers/com.iwascoding.garagesale9/Data/Library/Application Support/GarageSale/DesignTemplates

Go to that folder on your harddrive - replacing “yourusername” with your user account name.

That is where custom templates you create are stored.

Create folder inside it named “_Custom.designTemplate”.

Inside that new folder we will create two text documents using TextEdit in plain text mode - not the rich text mode.

Paste the following in the first one and save it in the new folder you created using the name name “body.html” - do not use the .txt ending as usual.

<div class="gsdescriptionwrapper">
	[[description]]
</div>

<div class="gsterms1wrapper">
	{{textblocks.TOS}}
</div>

In the second one paste the following and save it using the name “Info.plist” in the same new folder you created - do not use the usual .txt ending.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleIdentifier</key>
	<string>com.myserver._custom_mp</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>_Custom</string>
	<key>CFBundleVersion</key>
	<string>1.0</string>
	<key>GSKeywords</key>
	<array>
		<string>Custom</string>
	</array>
	<key>GSRemoteDirectory</key>
	<string></string>
	<key>GSRemoteResources</key>
	<array/>
</dict>
</plist>

Restart GarageSale

Open Text Snippet window and create new text snippet named “TOS”.

Enter the temporary text below:

This is where I want my shipping rates repeated in each listing.

Rates 1

Rates 2

Rates 3

Duplicate one of your existing listings and change it to the new _Custom template, which should now be listed first in the Listing Designs window as it begins with a underline character.

If you look at the bottom of the listing you now see “{{textblocks.TOS}}”. Any text you type in the TOS text snippet will be inserted there. To see it press the Option & Control keys and to make is disappear let go of the those keys.

Even though you typed the text on several lines it will appear one large textblock because it is not formatted with HTML. So duplicate a listing and paste the above text into the Preview Mode. Go to the Editor Mode and copy the HTML, which should look something like the text below. Open the Snippet window again and change the TOS snippet’s text to the HTML you just copied.

<div><div>This is where I want my shipping rates repeated in each listing.</div><div><br></div><div>Rates 1</div><div><br></div><div>Rates 2</div><div><br></div><div>Rates 3</div><br></div>

Now press the Option & Control keys again and your text is on multiple lines using HTML.


Now if you want to get fancier you can add a style tag above the HTML you just pasted to allow you to use CSS to control the appearance of HTML tags. The code below determines the appearance of a division class named “gstable”.

Since your example was a simple block of text containing lists I’d just use a existing listing to generate the HTML for your snippet

<style type="text/css">

.gstable{
	display: table;
	table-layout: fixed;
	width: 100%;
	border-collapse: collapse;
	margin-top: 1em;
}

</style>

<div class="gstable">
(OTHER HTML NOT SHOWN)
</div>

thanks for the help but this is waaay over my head :rofl:

1 Like

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