Announcement

Collapse
No announcement yet.

Attributes Double Negative

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

  • lesliekirk
    replied
    Thanks, Matt - that fixed it.

    Leave a comment:


  • Matt Zimmermann
    replied
    Hi Leslie,

    Try replacing the 'else' eval with this:
    Code:
    &nbsp;<mvt:eval expr="' -$' $ glosub(rnd(l.settings:option:price, 2), '-', '')" />

    Leave a comment:


  • lesliekirk
    started a topic Attributes Double Negative

    Attributes Double Negative

    How can I fix the double negative that the PROD Page Product Attribute Template displays with a negative value attribute?



    Aesthetically, the second negative looks bad. I can see the coding that needs to be tweaked, I just don't know how to get rid of the second - that comes from the attribute price.

    Code:
    <mvt:if expr="l.settings:option:price GT 0">
                                        &nbsp;<mvt:eval expr="'+ $' $ rnd(l.settings:option:price, 2)" />
                                    <mvt:else>
                                        &nbsp;<mvt:eval expr="'- $' $ rnd(l.settings:option:price, 2)" />
                                    </mvt:if>
    Also, in the example, the product price is $14.30, but selecting the -$4.30 attribute does not change the product price to $10.00.

Working...
X