Announcement

Collapse
No announcement yet.

Adding SD styling to prices breaks Recently Viewed Products.

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

    Adding SD styling to prices breaks Recently Viewed Products.

    PROBLEM

    Recently Viewed Products saves some product details (name, price, image) via JavaScript as single quoted text.
    The price is extracted from layouts Product Price Excluding Tax and Product Price Including Tax.
    If a site owner styles the displayed product price, that adds a SPAN containing single quotes around the returned price. Too many quotes breaks the Save Recent Product Details... layouts.

    DEMONSTRATION

    Standard demo site.
    Select the Engagement Ring.
    Go to Design Tab.
    Click on the displayed product price to view layout Product Price Including Tax.
    In Layout Code pane, right click layout Tax Inclusive Price, select Edit Appearance and set the Font Colour to red.
    OK out and an error should appear in the Save Recent Products Details... layout.

    SOLUTION
    Don't use a Layout (which the user can tinker with elsewhere in the design) in the "Save Recent Products Details..." code. Use a Variable instead.

    In the 3 "Save Recent Products Details..." layouts, replace all:
    Code:
    <actinic:variable name="PreFormattedPrice" value="Product Price Including Tax" />
    With:
    Code:
    <actinic:variable name="TaxInclusivePrice" selectable="false" />
    And also replace all:
    Code:
    <actinic:variable name="PreFormattedPrice" value="Product Price Excluding Tax" />
    With:
    Code:
    <actinic:variable name="TaxExclusivePrice" selectable="false" />
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey
Working...
X