seanbon Posted September 12, 2016 Share Posted September 12, 2016 Hi all, How might one work with the invoice PDF template to create some sort of mark or flag next to the customer name to show if someone is a repeat customer (they've placed at least one order at your shop)? Does anyone know a simple and easy way to do this with a template tag or some PHP? Thanks much Sean Link to comment Share on other sites More sharing options...
rocky Posted September 13, 2016 Share Posted September 13, 2016 You can use code like the following in the invoice TPL files: {if isset($order) && $order->getCustomerNbOrders($order->id_customer) > 0}*{/if} 1 Link to comment Share on other sites More sharing options...
seanbon Posted September 15, 2016 Author Share Posted September 15, 2016 Hey Rocky, thanks so much for your response. That code helped! I did have to change the > 0 to > 1 to get it to work properly for me. {if isset($order) && $order->getCustomerNbOrders($order->id_customer) > 1}*{/if} 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