New Zenner
- Join Date:
- Mar 2012
- Location:
- Melbourne, Australia
- Posts:
- 10
- Plugin Contributions:
- 0
Post #1 by purple_heart
I have been reading through the forum a lot to see if the answer is on here already but from my searches I cannot find it so I apologise in advance if it is repeated.
What I am trying to work out is how I can have one more field added to the customer profile page where you edit different things like adding in a discount which is what I am going to do but what I really need is the Total sales of the customer in money terms.
I believe in order to do this I need to work out how many total_orders there are by customer_id on the phporders table. Since the zen cart coding structures are different to what I have coded in the past I was wondering if someone could help point me in the right direction to achieve this small edit (query, calculation, link to customer id, show on page).
So once I have this I wil then be able to manually apply discounts for each customers for example if total_sales >= $250 discount = 2.5%, if total_sales >= $500 discount = 5.0% and so on. As my items are not totally over priced it is easy for a customer to get a discount which might encourage them to keep buying to get that further discount. Like a special bonus and my own reward program without the visually seeing the points to redeem them.