Announcement

Collapse
No announcement yet.

Attribute Prompt Colon

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • lesliekirk
    replied
    Originally posted by burch View Post
    Re: Attribute Prompt Colon
    In PR8 Update 6 there will be a new token, attribute:raw_prompt, which contains the prompt exactly as configured by the user. To maintain consistency between versions, however, we won't change the default templates to use raw_prompt--they will retain the present behavior.
    It's an old post, but good to bring back around. This token does the trick

    &mvt:attribute:raw_prompt;

    Thanks Burch!

    Leave a comment:


  • Mike521w
    replied
    Re: Attribute Prompt Colon

    sounds good to me, thanks!

    Leave a comment:


  • burch
    replied
    Re: Attribute Prompt Colon

    While working through the changes proposed above I figured out why we did it in the component modules in the first place.

    The code in the component module adds a colon to the end of the prompt, but only if there isn't one already. This allows the same template code to handle attribute prompts that contain the colon and do not, consistently displaying a single colon after the prompt.

    This is great if you like the colons, not so great if you don't.

    In PR8 Update 6 there will be a new token, attribute:raw_prompt, which contains the prompt exactly as configured by the user. To maintain consistency between versions, however, we won't change the default templates to use raw_prompt--they will retain the present behavior.

    Leave a comment:


  • burch
    replied
    Re: Attribute Prompt Colon

    The colon is, in fact, hard coded into both the MMUI and CSSUI attribute components. I'm not sure why, but if I had to guess I'd say it's a legacy carryover from the 4.x MMUI code.

    I'll file a bug and in PR8 Update 6 we'll provide a token for the prompt without a trailing colon and modify the templates to use it and put the colon output into the template code instead. The original "prompt" token will keep the colons for backwards compatibility.
    Last edited by Rick Wilson; 04-09-12, 08:15 AM.

    Leave a comment:


  • Mike521w
    replied
    Re: Attribute Prompt Colon

    I just discovered this exact same problem myself, very annoying. You're right, with the sebenza template the colon is configurable, but with the miva default template it always adds a colon after the attribute prompt, whether I have a colon in the prompt or not.

    It looks ridiculous in cases where I use an image link for the prompt instead of plain text.

    Leslie, there is a workaround that's also annoying. Finish each of your attribute prompts with
    HTML Code:
    <span class="attributeColon">
    Then in your Product Attribute Template you put an unbalanced close span after the prompt:
    HTML Code:
    &mvt:attribute:prompt;</span>
    Now when the page is rendered the colon will come up as:
    HTML Code:
    <span class="attributeColon">:</span>
    Now you can control that prompt with CSS and/or javascript.

    Leave a comment:


  • lesliekirk
    replied
    Re: Attribute Prompt Colon

    Okay, I know why some of you think I'm insane. I've discovered that if I'm using the Sebenza Product Page templates - I have control over the colon that appears after the attribute prompt.

    But if I use the default PROD page template with the default Product Display > Product Attribute Template there is no control over the colon - as in , it's not in the Product Attribute template.

    Default template uses this token:

    &mvt:attribute:prompt;

    Sebenza template uses this:

    &mvt:attr:prompt;:

    So for an example of a page that has the colon after the prompt, go here. That layout is using the token:

    &mvt:attribute:prompt;

    and the sites that are wanting to have control over the colon also are using the token

    &mvt:attribute:prompt;

    in the default layout Product Display > Product Attribute Template

    Leave a comment:


  • Rick Wilson
    replied
    Re: Attribute Prompt Colon

    I'm not fully following can you post a link so I can see it?

    Leave a comment:


  • lesliekirk
    replied
    Re: Attribute Prompt Colon

    Oh come on, nobody is bothered by this?

    Leave a comment:


  • lesliekirk
    replied
    Re: Attribute Prompt Colon

    This is still an issue on more than one store. There are no colon's in the Product Attribute Template layout. No Inventory Variants, no Inventory Kit Builder in use. For S&G I removed the

    <mvt:item name="attributemachine" param="head" />

    and the

    <mvt:item name="attributemachine" param="body" />

    To see if it "removed" the colons - I didn't think it would and it didn't.

    So I'm thinking this is something that has been coded into the &mvt:attribute:prompt; token - so I guess I just have to site around and hope hundreds of other users hate this too?

    Leslie

    Leave a comment:


  • Siamese-Dream.Com
    replied
    Re: Attribute Prompt Colon

    Is this a wombat store using attribute inventory?

    If so, it MIGHT be in the attribute machine. I noticed that our radio button attributes have a colon after the attribute Prompt

    I am guessing the selector / checkbox attributes would have a colon after the prompt too, but I just don't have the time to look right now.

    But see if you find anything in the attribute machine.

    Mark

    Leave a comment:


  • lesliekirk
    replied
    Re: Attribute Prompt Colon

    Originally posted by wcw View Post
    Did you look at the actual text in the prompt field for the products?
    Yes.


    So no one else has encountered this issue?

    Leave a comment:


  • wcw
    replied
    Re: Attribute Prompt Colon

    Did you look at the actual text in the prompt field for the products?

    Leave a comment:


  • Bruce - PhosphorMedia
    replied
    Re: Attribute Prompt Colon

    I don't see it, but i'm pretty sure that the internal code for evaluating the attribute prompt does not add a colon....URL?

    Leave a comment:


  • lesliekirk
    replied
    Re: Attribute Prompt Colon

    I've looked everywhere - there is no colon added in the attribute itself. Here's the Attribute Template Code:

    Code:
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <mvt:foreach iterator="attribute" array="attributes">
        <input type="hidden" name="Product_Attributes[&mvt:attribute:index;]:code" value="&mvte:attribute:code;">
        <mvt:if expr ="l.settings:attribute:template_code NE 0">
        <input type="hidden" name="Product_Attributes[&mvt:attribute:index;]:template_code" value="&mvte:attribute:template_code;">
        </mvt:if>
        <mvt:if expr = "l.settings:attribute:type EQ 'checkbox'">
         <mvt:if expr = "l.settings:attribute:code EQ 'Discount'">
          <input type="hidden" name="Product_Attributes[&mvt:attribute:index;]:value" value="Yes">
         <mvt:else>
        <tr>
            <td>&nbsp;</td>
            <td align="left" valign="middle">
            
                <mvt:if expr = "g.Product_Attributes[l.settings:attribute:index]:value">
                <input type="checkbox" name="Product_Attributes[&mvt:attribute:index;]:value" value="Yes" checked>
                <mvt:else>
                <input type="checkbox" name="Product_Attributes[&mvt:attribute:index;]:value" value="Yes">
                </mvt:if>
                <mvt:if expr="l.settings:attribute:image">
                <img src="&mvte:attribute:image;" alt="&mvte:attribute:prompt;">
                <mvt:else>
                <mvt:if expr="( l.settings:attribute:required ) AND ( l.settings:attribute:code EQ 'Discount' ) AND ( NOT NULL l.settings.customfield_values:customfields:discount_code  ) ">
                <b>&mvt:attribute:prompt;</b>
                <mvt:elseif expr="( l.settings:attribute:required ) AND ( l.settings:attribute:code != 'Discount' )">
                <b>&mvt:attribute:prompt;</b>
                <mvt:else>
                <strong>&mvt:attribute:prompt;</strong></mvt:if>
                </mvt:if>
            
            </td>
        </tr>    
        </mvt:if>
        <mvt:else>
        <tr>
        <td>
        <mvt:if expr="l.settings:attribute:image">
                <img src="&mvte:attribute:image;" alt="&mvte:attribute:prompt;">
                <mvt:else>
                <mvt:if expr="l.settings:attribute:required">
                <h2 style="margin-bottom:0px; padding-bottom:5px; line-height:normal; text-transform: uppercase;">&mvt:attribute:prompt;</h2>
                <mvt:else>
                <h2 style="margin-bottom:0px; padding-bottom:5px; line-height:normal; text-transform: uppercase;">&mvt:attribute:prompt;</h2></mvt:if>
              </mvt:if>
        
        </td></tr>
        
        <tr>
        <td bgcolor="#f5f5f5" style="border-top: 1px solid #999999; margin-right:10px;"></td>
      </tr>
        
        
        <tr>
            
            <mvt:if expr="( (l.settings:attribute:type EQ 'text') AND (l.settings:attribute:code EQ 'Discount') )">
            <td align="left" valign="top" bgcolor="#f5f5f5">
                <div style="padding-left:15px; padding-right:15px; padding-top:3px; padding-bottom:5px;">
    <input type="text" name="Product_Attributes[&mvt:attribute:index;]:value" id="discount_code" value="&mvte:attribute:value;" size=40>
    &nbsp;&nbsp;            
    <span id="discount_status" style="font-weight: bold;">&nbsp;</span></div>
            </td>
                    <mvt:elseif expr="( l.settings:attribute:type EQ 'text' )">
            <td align="left" valign="top" bgcolor="#f5f5f5">
                <div style="padding-left:15px; padding-right:15px; padding-top:3px; padding-bottom:5px;">
                <input type="text" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:attribute:value;" size=40>
                </div>
                 </td>
            <mvt:elseif expr="l.settings:attribute:type EQ 'memo'">
            <td align="left" valign="top" bgcolor="#f5f5f5">
            <div style="padding-left:15px; padding-right:15px;">    
                <textarea name="Product_Attributes[&mvt:attribute:index;]:value" rows=10 cols=58 wrap="on">&mvte:attribute:value;</textarea>
                </div>
            </td>
            <mvt:elseif expr="l.settings:attribute:type EQ 'radio'">
            <td align="left" valign="top" bgcolor="#f5f5f5"><div style="padding-left:5px; padding-right:15px;">
                <table border="0">
                    <mvt:foreach iterator="option" array="attribute:options">
                    <tr>
                        <td valign = "middle">
                            <mvt:if expr="( ( g.Product_Attributes[l.settings:attribute:index]:value EQ 0 ) AND ( l.settings:option:id EQ l.settings:attribute:default_id ) ) OR
                                                    ( g.Product_Attributes[l.settings:attribute:index]:value EQ l.settings:option:code )">
                            <input type="radio" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:option:code;" checked>
                            <mvt:else>
                            <input type="radio" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:option:code;">
                            </mvt:if>
                        </td><td valign = "middle">
                            <mvt:if expr="l.settings:option:image">
                            <img src="&mvte:option:image;" alt="&mvte:option:prompt;">
                            <mvt:else>
                                &mvte:option:prompt;
                            </mvt:if>
                        </td>
                    </tr>
                    </mvt:foreach>
                </table></div>
            </td>
            <mvt:elseif expr="l.settings:attribute:type EQ 'select'">
            <td align="left" valign="top" bgcolor="#f5f5f5">
                <div style="padding-left:15px; padding-right:15px; padding-top:3px; padding-bottom:5px;">
                <select name="Product_Attributes[&mvt:attribute:index;]:value">
                    <mvt:foreach iterator="option" array="attribute:options">
                        <mvt:if expr="( ( g.Product_Attributes[l.settings:attribute:index]:value EQ 0 ) AND ( l.settings:option:id EQ l.settings:attribute:default_id ) ) OR ( g.Product_Attributes[l.settings:attribute:index]:value EQ l.settings:option:code )">
                    <option value="&mvte:option:code;" selected>&mvte:option:prompt;</option>
                        <mvt:else>
                    <option value="&mvte:option:code;">&mvte:option:prompt;</option>
                        </mvt:if>
                    </mvt:foreach>
                </select>
                </div>
            </td>
            </mvt:if>
        </tr>
        <tr>
        <td bgcolor="#f5f5f5" style="border-bottom: 1px solid #999999; margin-right:10px;">    </td>
      </tr>
      <tr><td><br></td></tr>
        </mvt:if>
    </mvt:foreach>
        <input type="hidden" name="Product_Attribute_Count" value="&mvte:global:Product_Attribute_Count;">
    </table>
    Am I overlooking something here?

    Leave a comment:


  • Bruce - PhosphorMedia
    replied
    Re: Attribute Prompt Colon

    ...and there is no colon hiding next to that prompt? also, check to see if its in the prompt itself...seen lots of store owners do this.

    Leave a comment:

Working...
X