0

Working on our new Cartthrob install, I want to hide the shipping and tax fields on both the cart page and the checkout page if either the shipping or tax are $0.00...

I tried this for shipping:

{if exp:cartthrob:cart_shipping != "$0.00"}
    <tr>
      <td>
        Shipping
      </td>
      <td>
      {exp:cartthrob:cart_shipping}
      </td>
   </tr>
   {/if} 

But doesn't seem to do what I want... Any suggestions or maybe I'm just not using the tag correctly?

2
  • Does {exp:carttrhob:cart_shipping} output with the prepended dollar sign?
    – jrothafer
    Sep 4 '15 at 18:28
  • yep, it outputs $0.00.. I've tried both as well "0.00" and "$0.00". Sep 4 '15 at 19:54
0

OK - after futzing around a bit I got something that works for what I want.

       {if {exp:cartthrob:cart_shipping prefix="" decimals="0"} != 0}

       YES 

       {if:else}

       NO

       {/if}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.