Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

mail_open
Magmi Image Renaming
sonny nguyen

New
May 2, 2015 - 1:05 am
Member Since: March 3, 2015
Forum Posts: 3
sp_UserOfflineSmall Offline

So I downloade the Magmi script provided by UnderstandingE and it works like charm. Lately, I have ran into importing images that end in the same name but from different directories. I have read the Magmi Wiki about Imaging renaming:

Local image,Same image name, different directories

Say your images are located like this:

thumbs/01.png standard/01.png

So you surely have data with columns

image => ‘standard/01.png’ thumbnail => ‘thumbs/01.png’

Since those are not the same images, regex replace may be a good way to "rename" image depending on its container directory.

you can now set the following formula in image renaming

re::(.*)/(.*)\.(.*)$::$2_$1.$3

Then ‘standard/01.png’ value will be renamed as 01_standard.png in magento and ‘thumbs/01.png’ will be renamed as 01_thumbs.png in magento

thus avoiding conflicts & overwriting.

However it doesn’t work when I apply. I am not sure if I am doing it right. So in the Magmi page, I would check Image attributes processor v1.0.33 and configure it. In the Imaging Renaming textbox, I pasted in re::(.*)/(.*)\.(.*)$::$2_$1.$3. Am I suppose to configure anything else? I played around with other options however it does not rename the images. Help me pls!!

Dave Furness

Founder
May 3, 2015 - 4:48 pm
Member Since: July 19, 2013
Forum Posts: 4606
sp_UserOfflineSmall Offline

Hi Sonny,

Hmmm, This is one for Matt as he is the Magmi expert. I will ask him to take a look at this for you as soon as he can and hopefully he can help you with this.

Dave

Every expert was once a beginner

Avatar
Matthew Ogborne

Founder
May 4, 2015 - 7:36 am
Member Since: July 18, 2013
Forum Posts: 4565
sp_UserOfflineSmall Offline

Howdy Sonny,

Before we start it’s worth nothing that this will not work for images in the “media_gallery” column, only the small_image etc… columns.

If we look at the example, let’s break this up into pieces:

re::

This says “rewrite”.

The next part:

(.*)/

Is the folder name that is then called by “$1”, eg “thumbs”

The next part:

(.*)

Is the actual image name, eg “01”

And the next part is:

\.(.*)$

Which is the image file name, eg “.jpg”

Then the final part is the rewriting:

::$2_$1.$3

Which in English says “image name” + “_. (underscore and a full stop)” + “folder name” + “extension”

Hence why we go from “thumbs/01.png” to “01_thumbs.png”

So if this isn’t working for you, then I would guess that you’re not just importing a image value similar to “thumbs/01.png” into your small_image etc… columns.

Matt

"Selling an item online is easy, but making living from a business that sells online, well that’s something different entirely!"

Ultimo Magento Theme

sonny nguyen

New
May 4, 2015 - 10:29 pm
Member Since: March 3, 2015
Forum Posts: 3
sp_UserOfflineSmall Offline

Thank you for the explanation Matt. To be honest, I am still confused. Also, thanks for pointing it out but I am using this for the “image, small_image, and thumbnail” columns only.

So my links look like this:
Product 1: https://site.com/Content/Products/DeepZoom/2684-0_14361_files/9/0_0.jpg
Product 2: https://site.com/Content/Products/DeepZoom/2685-0_14364_files/9/0_0.jpg
Product 3: https://site.com/Content/Products/DeepZoom/2691-0_14372_files/9/0_0.jpg

Also by the way, my configuration on Magmi is this: (I hope it is all correct)
MagmiImage Enlarger

Avatar
Matthew Ogborne

Founder
May 11, 2015 - 8:03 am
Member Since: July 18, 2013
Forum Posts: 4565
sp_UserOfflineSmall Offline

Hi Sonny,

In those URL’s you have 4 parts to the URL, not 3 as used in the example so it’s probably not working for you.

Try something like this:

re::(.*)/(.*)/(.*)\.(.*)$::$3_$2.$4

Matt

"Selling an item online is easy, but making living from a business that sells online, well that’s something different entirely!"

Ultimo Magento Theme

sonny nguyen

New
May 23, 2015 - 3:07 am
Member Since: March 3, 2015
Forum Posts: 3
sp_UserOfflineSmall Offline

Hi Matt, thank you for helping and sorry for not replying sooner. I been really busy but it still does not work. I will just have to do this manually then >_<!! Thanks anyways.

PS.. if you do find a solution give me a shout!

 

Why Should You Join UnderstandingE?

 
  • Access to over 500 step-by-step video tutorials
  • +20 video courses available
  • Magento, M2E Pro, Magmi, eBay, Amazon & Design all covered
  • Everything is in 100% Plain English
  • Learn how to build your own multi-channel software for eBay & Amazon
  • Access to the community forums, meet fellow business owners like yourself

Join Now with 2 Clicks

 

Join now for less that £1 per day you can gain access to over 400 step-by-step video tutorials & learn how to build your very own multi-channel software.

 

Forum Timezone: Europe/London

Most Users Ever Online: 1012

Currently Online:
9 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Jim @ Moogento: 688

Steve Froggatt: 514

Badeth - UE: 513

Jimbob: 453

Paul Cartwright: 414

Forum Stats:

Groups: 6

Forums: 37

Topics: 5223

Posts: 27502

Administrators: Matthew Ogborne: 4565, Dave Furness: 4606