markinhos3 Posted August 7, 2017 Share Posted August 7, 2017 Hi guys!! My prestashop version is 1.6.1.10 What I want is put in some place of invoice.tpl "if the customer is new or not in my shop". I'm using this code at the end of invoice.tpl: {if (Order::getCustomerOrders((int)$this->context->customer->id) > 1)} <span> Old Customer </span> {else} <span> New Customer </span> {/if} I know with this i get an array and I have to use the property count , but I don't know how to do it well, please someone could help me? A lot of thanks in advance!! Link to comment Share on other sites More sharing options...
markinhos3 Posted August 7, 2017 Author Share Posted August 7, 2017 Hi ndiaga!!Thank you for your replay! What i need is to show in the invoice.tpl a sentence saying: New/Old Customer Then i need to get the number of orders by id_customer and make a condition with IF: if number of orders > 1 , then print "Old Customer" else, print "New Customer" What i don't know is how to do the count of orders and put it in a correct sentence, and call the function getCustomerOrders correctly, plus make the conditions well. Thank you again for your attention! Link to comment Share on other sites More sharing options...
Mian Waqas Posted April 27, 2020 Share Posted April 27, 2020 Hi markin, were you able to succeed in it? i am stuck in same thing, cant find a code for it. please if you share how you did it will be helpfull thanks 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