PDA

View Full Version : Product Names Not Displaying Properly


cajun4
06-27-08, 09:59 PM
We're setting up Miva 5.5.

With some of our product names we use font tags to highlight certain things in color .

For example:
30lb Live Crawfish Feast!!<br>
<font color="cc0000">(Includes Next Day Air Shipping)</font>

This format worked fine with Miva 4.24 and earlier Miva versions.

With Miva 5.5, however, for some reason the contents of the font tags repeat again right after the image (see attached example).

The bad actor seems to be the quotation marks (") around cc0000.
If we remove those, the problem goes away.

What causes this to occur?

And is there a quick "find and replace all" search in Miva 5.5 that we can use to remove the quotes. We have many many product names with this type of format, and it would be a slow process to fix it product by product.

Gordon Totty
A Gourmet Cajun Shop
Great Cajun & New Orleans Foods
www.cajun-shop.com (http://www.cajun-shop.com)

Leanne
06-28-08, 04:19 AM
Gordon,

That's happening because the product name is used for the alt tag for your images. There are other areas where having html in the product name causes issues as well (e.g. It shows in the title tag, plain text order confirmation emails, etc). On our own site, what we did was to create a custom product field that we use to display the product name with the html, and have just a regular plain text product name for all of the other "standard" purposes.

It was pretty easy to set up, just export your products to a flat file, copy the product name column to your new custom field column, and then do some quick find and replace to remove all of the html from the product name column. Re-import to the site, and you're all set.

cajun4
06-28-08, 10:34 PM
I'm still a student when it comes to Miva software.

Are the image alt tags automatically generated by Miva 5.5?

Is it something new with Miva 5.5?
With our Miva 4.24 site, I don't believe that there were alt tags.
At least they don't seem to show when we diplay the pages.
And I don't recall ever adding alt tags in either Miva4.24 or 5.5.

Biffy
06-30-08, 03:17 PM
Anoter way to do that is to use this format:

<span style="color:#cc000;">(Includes Next Day Air Shipping</span>

The problem can be caused when the old font tag is invalid for the document type. The newer span is compatible with all modern doctypes.

Leanne
06-30-08, 03:51 PM
Steve, span tags will still break inside an alt tag for an image, which is the problem here.

Gordon, the alt tags are specified in your page templates. You can remove them, but that's a bad idea both for accessibility/seo reasons and for html/xhtml validity.

cajun4
06-30-08, 04:16 PM
But if we use the format <span style="color:#cc0000">(Includes Next Day Air Shipping</span>, will this resolve our problem?

Our Product Names display fine with our current format.

Our problem is that, whenever we use a font code in the Product Name, part of that Product Name content also shows up at the bottom of our image.

So, when we put 10lb Live Crawfish Sampler<br><font color="cc0000">(Includes Next Day Air Shipping)</font> as our Product Name, the Product Name displays fine but we also get (Includes Next Day Air Shipping)"> displayed at the bottom of our product image.

If I understand Leanne correctly, the reason for this is that Miva 5.5 also puts that Product Name into the image alt tag, and the image alt tag can't properly handle that html content.

Biffy
06-30-08, 08:46 PM
Quite right. Can't use HTML in the image alt tag.

Mark Stephens
06-30-08, 09:27 PM
. . . what we did was to create a custom product field that we use to display the product name with the html, and have just a regular plain text product name for all of the other "standard" purposes.
Similarly, I would just set up a custom field for this part: <font color="cc0000">(Includes Next Day Air Shipping)</font>

And then in the page template place the mvt item for that field anywhere I want it, and in multiple places to reinforce the shipping benefit.

However, don't use the html in the custom field. Add the html for the font color (or size, or face, or whatever) within the page template instead. It's easier to change if needed.

cajun4
06-30-08, 09:48 PM
Leanna, you said:
On our own site, what we did was to create a custom product field that we use to display the product name with the html, and have just a regular plain text product name for all of the other "standard" purposes.

It was pretty easy to set up, just export your products to a flat file, copy the product name column to your new custom field column, and then do some quick find and replace to remove all of the html from the product name column. Re-import to the site, and you're all set.

Exactly how do we do that?
We're kind of neophytes here, so we'll show our ignorance:
We can understand how we can export our products to a flat file, make a new column with a plain text product name, and then import back to Miva.
But how do we identify our data so that Miva knows that the custom product name field is used for the product name, and how does Miva know that the plain text product name is used for populating the Miva image alt tag etc?

Leanne
07-01-08, 12:08 AM
In your admin, click the word utilities, and check the box beside Custom Product Fields. Click Update. You'll see a new tab for custom product fields -- click that and add your new field.

When you import your file, that new custom field will appear in the dropdown selections and you just assign it to the correct column in your import file.

In order to get the field to display on the page, you have to assign it. On the page you want to use it on, go the the Product Display Layout (name varies slightly from page to page) and be sure you're in point and click mode. Click the box beside your new custom field, and click update.

When you do that, your template is going to reset in order to add the custom field. If you've made any modifications to your template that you want to preserve, you'll need to go to advanced mode, find the conditional for the new custom field, and copy it. Select your most recent version of your template from the version history, and hit recall. Paste the custom field conditional where you want it to display, and click update.

cajun4
07-05-08, 04:39 PM
On further investigation, we found that we actually can use font tags in our Product Names without messing up the image alt tags.

The problem that we experienced is associated with our use of quotes in the code. When we removed the quotes, we resolved the problem.

For example, we get the problem with this Product Name:
30lb Live Crawfish Feast!!<br>
<font color="cc0000">(Includes Next Day Air Shipping)</font>

But this Product Name works fine:
30lb Live Crawfish Feast!!<br>
<font color=cc0000>(Includes Next Day Air Shipping)</font>

The quotes worked fine for us with Miva v4.24 and earlier, but not v5.5.

(BTW, we could use the Custom Product field to display the shipping information in red below the price field, but never did get it to display properly in the Product Name field)

Gordon Totty
A Gourmet Cajun Shop
www.cajun-shop.com (http://www.cajun-shop.com)

wcw
07-05-08, 04:46 PM
Are you using &mvt or &mvte to display the name?

Barrett
07-05-08, 11:15 PM
Bill is referring to :

Entity Syntax

http://docs.smallbusiness.miva.com/en-US/merchant/5/webhelp/store_morph_technology_(smt)_-_working_with_page_templates.htm (http://docs.smallbusiness.miva.com/en-US/merchant/5/webhelp/store_morph_technology_%28smt%29_-_working_with_page_templates.htm)

cajun4
07-06-08, 12:23 AM
We are neophytes in this and don't quite know what entity syntax is.

All I can say is that these Product names were previously entered manually into Miva 4.24 and earlier versions, and then copied over to Miva 5.5 when we recently upgraded.