Announcement

Collapse
No announcement yet.

Ampersand in Product Reference breaks dynamic pricing.

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

    Ampersand in Product Reference breaks dynamic pricing.

    As above. If you have an ampersand in your product reference then SD will happily let you type it in. Now if this product has dynamic pricing, as soon as you make a selection that affects the price you will get an error message like:
    The specified product (reference 47) has just been removed from the catalog. Please return to the catalog and continue shopping. If you press the Refresh or Reload button on your browser, the removed products will no longer be visible in the catalog. We apologize for the inconvenience.
    Example. SD V16.0.2 demo site. Allow user defined product references. Change the first product on the site (Engagement Ring) from reference 47 to 47& and upload. Kaboom when you try to select a choice.

    I note that way back in 2009 (SD V10) there was a KB article saying that such characters would be invalid from 10.0.3 onwards!!!
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    #2
    And a similar problem if there is a backslash in the product reference. Especially if it's the last character where you get a JavaScript error when viewing the product page.

    No doubt other characters will break things.

    P.S. I always use variable EncodedProductAnchor when needing an unique ID for a product that's going to be used in JavaScript or PHP code. EncodedProductAnchor is always purely alphanumeric plus underscore. And can be converted back to the actual product ID by a little bit of JS, Perl or PHP.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment

    Working...
    X