Results 1 to 8 of 8

Thread: Inserting a Space in the Variant Drop-down Menu

  1. #1
    Join Date
    Apr 2012
    Posts
    4

    Default Inserting a Space in the Variant Drop-down Menu

    I am having trouble inserting a space between the description and price in the variant drop down menu. See below

    I was considering editing the xml file itself manually inserting a space. Is there an easier way? Will this even work? Any help would be appreciated.
    Thanks,
    V

  2. #2
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    873

    Default

    Editing the xmlpackage is the 'correct' way to do it.

    If you really need another way of achieving it - then I guess you 'could' rename your product to end with a space....




    TTFN

    BFG

  3. #3
    Join Date
    Apr 2012
    Posts
    4

    Default Thanks. Further Assistance is Required

    Thank you for you response. You have pointed me in the right direction. Unfortunately, I am not well versed with .asp /.aspx (?) programming. I included a code snippet, so that you or anyone else could further assist me:
    HTML Code:
    <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'icon', 1)" disable-output-escaping="yes"/>
                            </p></td>
                                          <td width="270"><p></p>
                                            <p> </p><span style="font-size: 16px; font-weight:bold;">
                                            <xsl:value-of select="$pName" disable-output-escaping="yes" />
                                            </span></td>
                                        </tr>
                                        <tr>
                                          <td><xsl:value-of select="$pDescription" disable-output-escaping="yes"/></td>
                                        </tr>
                                        <tr>
                                          <td><p></p> Options: <select name="variants" onChange="SetCartVariant(this.value)">
                                            <xsl:apply-templates select="/root/ProductVariants/Variant" />
                                            </select>
                                            <xsl:if test="aspdnsf:AppConfigBool('DisplayOutOfStockProducts') = 'true'">
                                              
                                              
                                              <xsl:value-of select="aspdnsf:DisplayProductStockHint(ProductID, VariantID, 'Product  ')" disable-output-escaping="yes" />
                                              
                                            </xsl:if> </td>
                                        </tr>
                                        <tr>
                                          <td><p></p><xsl:value-of select="aspdnsf:AddtoCartForm(ProductID, $defaultVariant, 1)" disable-output-escaping="yes"/></td>
    I really appreciate any help that I can get.
    Thanks Again,
    V

  4. #4
    Join Date
    Apr 2012
    Posts
    165

    Default

    what is your site?

  5. #5
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    873

    Default

    You need to look at the part of the xmlpackage that starts with :-

    HTML Code:
    <xsl:template match="Variant">

    Post that part in here & I'll take a look.




    TTFN

    BFG

  6. #6
    Join Date
    Apr 2012
    Posts
    4

    Default

    Thanks, for your help. Here is the code
    HTML Code:
          <xsl:template match="Variant">
            <xsl:param name="vName" select="aspdnsf:GetMLValue(Name)"></xsl:param>
            <xsl:param name="pSalesPromptName" select="aspdnsf:GetMLValue(/root/Products/Product/SalesPromptName)"></xsl:param>
            <xsl:param name="pTaxClassID" select="/root/Products/Product/TaxClassID" />
    
            <option value="{VariantID}">
              <xsl:if test="IsDefault=1">
                <xsl:attribute name="selected">selected</xsl:attribute>
              </xsl:if>
              <xsl:value-of select="$vName" />
              <xsl:if test="./HidePriceUntilCart != 1">
                <xsl:value-of select="aspdnsf:GetVariantPrice(VariantID, HidePriceUntilCart, Price, SalePrice, ExtendedPrice, Points, $pSalesPromptName, 1, $pTaxClassID, '0.00', 'false')" disable-output-escaping="yes" />
              </xsl:if>
            </option>
          </xsl:template>
    Thnx again,
    V

  7. #7
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    873

    Default

    How's this?


    HTML Code:
          <xsl:template match="Variant">
            <xsl:param name="vName" select="aspdnsf:GetMLValue(Name)"></xsl:param>
            <xsl:param name="pSalesPromptName" select="aspdnsf:GetMLValue(/root/Products/Product/SalesPromptName)"></xsl:param>
            <xsl:param name="pTaxClassID" select="/root/Products/Product/TaxClassID" />
    
            <option value="{VariantID}">
              <xsl:if test="IsDefault=1">
                <xsl:attribute name="selected">selected</xsl:attribute>
              </xsl:if>
              <xsl:value-of select="$vName" />
              <xsl:text> : </xsl:text>
              <xsl:if test="./HidePriceUntilCart != 1">
                <xsl:value-of select="aspdnsf:GetVariantPrice(VariantID, HidePriceUntilCart, Price, SalePrice, ExtendedPrice, Points, $pSalesPromptName, 1, $pTaxClassID, '0.00', 'false')" disable-output-escaping="yes" />
              </xsl:if>
            </option>
          </xsl:template>
    (all I did was add this : <xsl:text> : </xsl:text>)



    TTFN

    BFG

  8. #8
    Join Date
    Apr 2012
    Posts
    4

    Thumbs up It Worked

    Thank you very much!
    It works perfectly.
    Best Regards,
    V

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •