Announcement

Collapse
No announcement yet.

Combine base price + option price

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

    Combine base price + option price

    I am trying to combine the base price with the option price in the option prompt. I tried several variable like below, but I am obviously missing something:

    HTML Code:
    <mvt:assign name="l.settings:pm:combinedprice" value="l.settings:attributemachine:product:price + l.settings:option:price" />
    &mvte:pm:combinedprice;
    Any thoughts?

    Thanks for any insight.

    EDIT: I originally had tried to make the base price zero, and use the actual option prices. I had a custom field to override the base price on the page. This worked, except the AttributeMachine was updating the price to Zero.

    #2
    Beuller?

    Comment


      #3
      eldon99 You should be able to replace this line, https://github.com/mivaecommerce/sha...ibutes.mvt#L40, within the default Shadows template with the following:

      Code:
      <mvt:assign name="l.settings:option:combinedprice" value="l.settings:product:price + l.settings:option:price" />
      <mvt:do name="l.settings:option:formatted_combinedprice" file="g.Module_Root $ g.Store:currncy_mod:module" value="CurrencyModule_AddFormatting( g.Store:currncy_mod, l.settings:option:combinedprice )" />
      &nbsp;&mvte:option:formatted_combinedprice;
      This will display the sum of the main product price and option price.
      Nicholas Adkins
      Technical Training Specialist / Miva, Inc.
      [email protected]
      https://www.miva.com/mivalearn

      Comment


        #4
        Nick, thank you! That worked perfectly.

        Comment

        Working...
        X