Bill Dalton Posted February 16, 2016 Share Posted February 16, 2016 (edited) Need to test for Group id 5, and run this code, however I don't know how to test for customer group. {if customergroup = 5 {if $order[orders].price_display_method == $order[orders].shop.ps_tax_inc} {* with tax *} <td class="align-right">{displayPrice price=$price_rounded currency=$order[orders].id_currency}</td> <td class="align-right">{displayPrice price=$price_rounded*$order[orders].order_detail[detail].product_quantity currency=$order[orders].id_currency}</td> {else} <td class="align-right">{displayPrice price=$price_wt_rounded currency=$order[orders].id_currency}</td> <td class="align-right">{displayPrice price=$price_wt_rounded*$order[orders].order_detail[detail].product_quantity currency=$order[orders].id_currency}</td> {/if} {else} {if $order[orders].price_display_method == $order[orders].shop.ps_tax_exc} {* without tax *} <td class="align-right">{displayPrice price=$price_rounded currency=$order[orders].id_currency}</td> <td class="align-right">{displayPrice price=$price_rounded*$order[orders].order_detail[detail].product_quantity currency=$order[orders].id_currency}</td> {else} <td class="align-right">{displayPrice price=$price_wt_rounded currency=$order[orders].id_currency}</td> <td class="align-right">{displayPrice price=$price_wt_rounded*$order[orders].order_detail[detail].product_quantity currency=$order[orders].id_currency}</td> {/if} {/if} Edited February 16, 2016 by Bill Dalton (see edit history) Link to comment Share on other sites More sharing options...
Bill Dalton Posted February 16, 2016 Author Share Posted February 16, 2016 I should add, I realize the code looks redundant, but it must be that way to overcome one of those quirks you can run into useing PS 1.5.6.3 Plus I forgot to mention the PS ver. Link to comment Share on other sites More sharing options...
razaro Posted February 17, 2016 Share Posted February 17, 2016 It depends where you test that code and what variables you have available. Link to comment Share on other sites More sharing options...
Bill Dalton Posted February 17, 2016 Author Share Posted February 17, 2016 It is a tpl template used to generate a PDF invoice using module m4pdf. The m4pdf module works fine, but recently I installed a new module called deluxeinvoiceb2b The purpose of this module is to allow for the creating of a tax free group, and it works perfect on the front end and backend, and even send the numbers to m4pdf tax free. Unfortunately m4pdf ends up treating the numbers as taxable, it is not getting the message that tax has been turned off for this order. So I need a way of conditionally running the code above based on the group for the customer being invoiced. Link to comment Share on other sites More sharing options...
razaro Posted February 17, 2016 Share Posted February 17, 2016 Do you have customer variable available ? So could use {if $customer.id_default_group == 5} But probably not so easy and customer could be in $order[orders].customer maybe. So try to test with {$order[orders]|var_dump} or {$order[orders].customer|var_dump} 1 Link to comment Share on other sites More sharing options...
Bill Dalton Posted February 17, 2016 Author Share Posted February 17, 2016 Yeah looks like it is going to take a couple of steps. Doesn't seem to be a Global var. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now