2 replies [Last post]
diegohermes's picture
Offline
Joined: 09/12/2007
Juice: 147
Was this information Helpful?

I read about the invoice system, i know how to create my own tokens and put them on the invoice, what i need to know is how can i do to show the tokens based on the payment method, if the payment method is "X" i will show a table or div or list (wharever) whith a,b,c tokens, if is "Y" i will not show them, as far as i can see the available variables in the invoice system don't let-me do that. I believe this must be simple, only set a variable or get a value from somewhere or maybe there is a variable for that, anyone can help me?

thanks

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Custom invoice based on the payment method

You won't be able to do this w/ tokens, because it functions as a filter just doing text replacements at display time. For the actual logic, you'll need to use the variable directly - $order->payment_method.

diegohermes's picture
Offline
Joined: 09/12/2007
Juice: 147
Re: Re: Custom invoice based on the payment method

Thanks Ryan, it works just fine.