Announcement

Collapse
No announcement yet.

Unformatted Price

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

  • Matt Zimmermann
    replied
    Since you're dealing with variants, you'll probably have to use JavaScript to make this happen. You would want to use "includes()" [ https://developer.mozilla.org/en-US/...tring/includes ] to check for the decimal and then "padEnd()" [ https://developer.mozilla.org/en-US/.../String/padEnd ] to add the trailing zero, if needed.

    Leave a comment:


  • afiumano
    replied
    I did a quick search for some documenation on doing the decimal points but couldn't find anything off the bat. Do you have any examples or places I can check?

    Leave a comment:


  • Matt Zimmermann
    replied
    You might try using a conditional to check for the decimal point and, if present, pad two places to the right.

    Leave a comment:


  • afiumano
    replied
    So another problem we ran into is we have some products that are $4.20. So using '$&mvt:product:price;' drops the zero showing it as '$4.2'. Is there a way to have no cents show as $68 without any zeors, but $4.20 show with the zero?

    Leave a comment:


  • afiumano
    replied
    I figured this out - I had to simply select "Variant Price is set by the Master Product and its Attributes" when generating the variants.

    Leave a comment:


  • afiumano
    started a topic Unformatted Price

    Unformatted Price

    We want to show pricing on the product page as: $68 (without any cents as they are all zeros). This works fine using $&mvt:product:price; for most products. However, we have a product that has to use inventory variants so that we can show a different image for each variant. When a variant is selected. the visible price changes from '$68' to '$68.00'. How could this be altered to keep the format of '68'?
Working...
X