Image alt text lost after importing?

TOOL:

Didn't mention it previously? I posted a snippet of the first line plus first product of the CSV file, showing you that i'm using a CSV!



Outside of the script / admin interface? Yes! In Excel! Saving an .XLSX to .CSV. Making changes to products in Excel and then performing an upload is a better approach when dealing with any catalogue in excess of 50 products.



Yes, perhaps I should too. Offering something for free that i've spent a lot of time on, which has avoided many issues people have reported, including this alternate text problem, seems as though no one cares or prefer to continue using an alternative and laborious method.



I guess you missed the point where I was offering people a solution to their problem - regardless of the fact that it is now fixed via a 'unified diff formatted' snippet. The fact I've never experienced this for any client in 2.2.4 shows that the spreadsheet functions and calculations - i.e. what I'm using, works!







BRANDON:

I said several times in my posts above → Excel.

Ok guys, settle. Thank you all for your input and help. Lots of ways to do this obviously.



The bug fix for me doesn't work, but that's evidently because I don't know what I'm doing. A helpdesk ticket also gave me code that doesn't exist in my exim file, so that doesn't help either.



So, I'll simply go back to exporting/importing all fields instead of only selecting what I need. If exp/imp all fields, alt text seems to be retained… just takes a bit longer.



Thanks again… my train ride ends here as well.

Well duh, you are using Excel, I got that part.



You made it sound like you don't use the admin to do your imports. You actually said something about being outside of the admin interface, which would lead me to believe that you are using a different script or something.



Obviously if you are importing using all the fields including the image alt text, this will work. Just for me, I prefer to import in only what I need. I update my stock and prices weekly, so that is why I only import in the 4 or 5 fields that I do.



Honestly, I haven't even tried CS-Cart's fix, since this doesn't matter to me. Like I said before, I use Magic thumb, and it takes care of the alt tags for me.



I will say this though, your posts are pretty funny. You are kind of getting worked up over nothing. The whole point of this thread was that when you do an import into CS-Cart with only the product code, and price fields, the alt tags are removed. This was a bug that was confirmed by CS-Cart, so it really isn't anything to argue about.



Thanks,



Brandon

[font=verdana,geneva,sans-serif]Totally agree mate.[/font]

[font=verdana,geneva,sans-serif]Was just trying to help, as I had not experienced the issue being mentioned through my method. It wasn't clear to me that it was only a 'couple' columns being imported that triggered the problem.[/font]

[font=verdana,geneva,sans-serif]You've clarified that. So what's the problem?[/font]



[font=verdana,geneva,sans-serif]I apologise for spending my time here trying to assist and offer a solution that I'd spent a lot of time on that helped me, my colleagues and clients - where there is no need to mess around with CSV's and various syntax.[/font]



[font=verdana,geneva,sans-serif]WWGREEN:[/font]

[font=verdana,geneva,sans-serif]If you are interested in the spreadsheet that has saved me millions of hours… well at least thousands, then let me know.[/font]

[font=verdana,geneva,sans-serif]Three Tabs:[/font]

[font=verdana,geneva,sans-serif]- 1 = Product Data Entry - All code for html, descriptions, size charts, exceptions, drop down menus, radio buttons, etc, are constructed.[/font]

[font=verdana,geneva,sans-serif]- 2 = Product + Image Export Import all products + images to CS-Cart.[/font]

[font=verdana,geneva,sans-serif]- 3 = Product Combinations + Images ExportImport all secondary images and combinations for inventory tracking to CS-Cart.[/font]



[font=verdana,geneva,sans-serif]Cheers![/font]

I would be interested in seeing your Excel Spreadsheet. Sounds like a real time saver.

Based on the Tool solution in post 6, I made small improvement. Now if you enter alt manually it will show your text, if it is empty it will show product name in alt and title. I believe it makes sense. So no need to worry any more if it is imported or not (unless you make it different from product name), as it always will be.



You have to change image.tpl



starting from line 144 -


{if $detailed_image_path || $wrap_image}


{/if}

{assign var="alt_text" value=$images.icon.alt|default:$images.detailed.alt}
{$alt_text}




replace with





{if $detailed_image_path || $wrap_image}


{/if}
{assign var="alt_text" value=$images.icon.alt|default:$images.detailed.alt}
{if $alt_text}{$alt_text}{else}{$product.product|escape:html}{/if}




tested on versions 3.01 + (but should work same way for previous versions)



if you do not see changes after applying this code, just use ?cc to clear cache.

Thanks for this! Worked great in 2.2.4

OK then! Is there any help for someone who just read this thread and still has not a clue?



I would love, love, love to have my product names automatically become alt img text for the photos. Our products google well by name but the competition is killing me on the image search.



I usually use the admin interface because I am only adding a few things at a time and there is no place to add the alt text. It sounds here like I might be able to add code to a template to make this happen? I would be ecstatic if it occurred to all existing products.



Originally I was able to find a few templates and hacked away at them until I got the site cutomized, so I can download, save, modify and upload, but I don't really know any code.



Is someone out there patient enough detail the process, like I was blindfolded or something? Feel free to write me at tip AT skookum DOT us. I'm not even sure what version I have if that matters, but it is an older one and can be seen at www.dangelointernational.com. Thank you, thank you, thank you in advance. You will have a new friend forever if you can get me through this. The boss guy is not too happy about the competition's images pushing him off google.