We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17230
    • 35 Posts
    Hi all,

    I’m currently setting up transactions for a small web shop based in Germany. Because of different international tax / pricing systems I need to do some auto calculations on the product price tag. In Germany it’s a usual habit to to set set the price tag including VAT and that’s exactly what my client wants to do in the backend. For international businesses I need to have the price rendered without VAT though to be able to hand over the correct price without VAT to the shop module (which is FoxyCart btw).

    So I’m looking for a nice and clean way to set up a second TV, in which the price without VAT is calculated and stored automatically after being entered in the first TV.

    Of course I could create a Snippet that would render the necessary value on output but I’d rather have the possibility to show the backend user whats going on and what is calculated exactly from the value they have entered. Is there a nice and elegant way to achieve this?

    Thanx for your help!

    Paul

    P.S.: The Site is built on MODx Evolution 1.0.2
      - Just because you're not paranoid doesn't mean they're not after you -
      • 4172
      • 5,888 Posts
      Here es an easy way you can go:
      if you have the price in TV preis
      you could create for example checkbox-tv
      with input-option-values:

      @EVAL $tvKat = $modx->getTemplateVarOutput('preis',$_REQUEST['id']);return $tvKat['preis']*100/119;


      after ressource-saving you can see the price without tax as option.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 17230
        • 35 Posts
        Thanx a lot!

        That’s exactly what I was looking for. Perfect!

        Paul

        P.S.: I’m again really impressed by the power modx offers. Bindings in TV’s are another killer feature...
          - Just because you're not paranoid doesn't mean they're not after you -