Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Martin 44 posts 66 karma points
    Nov 16, 2011 @ 10:53
    Martin
    0

    AddToBasket problem

    Here is the Variant dropdown (XSLT):

    <xsl:variable name="product" select="CommerceLibrary:GetProduct($catalogName, $productSku)/product"/>
    <
    select class="sel required" name="variantSku">
      <xsl:for-each select="$product/variants/product">
        <
    option value="{./@variantSku}">...</option>
      </xsl:for-each>
    </select>

    HTML output:

    <select class="sel required" name="variantSku">
      <option value="vvariant2">...</option>
    </select>

     

    Add to cart:

      <xsl:variable name="catalogName" select="umbraco.library:RequestQueryString('catalog')"/>
      <xsl:variable name="productSku" select="umbraco.library:RequestQueryString('product')"/>
      <xsl:variable name="postedSku" select="umbraco.library:RequestForm('sku')"/>
      <xsl:variable name="postedVariant" select="umbraco.library:RequestForm('variantSku')"/>
      <xsl:variable name="postedQuantity" select="umbraco.library:RequestForm('quantityInput')"></xsl:variable>

      <xsl:if test="string-length($postedSku) > 0">
        <xsl:variable name="addToBasketResult" select="CommerceLibrary:AddToBasket($catalogName, $postedQuantity, $postedSku, $postedVariant)"/>

     

    This is what I get:

    The variant with SKU '201194-vvariant2' does not exist.

     

    What am i doing wrong? This problem only happens, if it's a product I have created using the API.

  • Martin 44 posts 66 karma points
    Nov 19, 2011 @ 11:23
    Martin
    0

    Further investigation shows that it works if my product SKU and variant SKU is numeric. Why do we have this limitation?

  • Søren Spelling Lund 1797 posts 2786 karma points
    Nov 29, 2011 @ 15:14
    Søren Spelling Lund
    0

    Hi Martin,

    It might be a casing issue, i.e. sku "ABC" is different from "abc".

Please Sign in or register to post replies

Write your reply to:

Draft