Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / How can I see Total sales of the customer in money terms?

How can I see Total sales of the customer in money terms?

Locked
This thread is locked. New replies are disabled.
19 Mar 2012, 1:42 PM
#1
purple_heart avatar

purple_heart

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.

19 Mar 2012, 10:18 PM
#2
purple_heart avatar

purple_heart

New Zenner

Join Date:
Mar 2012
Location:
Melbourne, Australia
Posts:
10
Plugin Contributions:
0

Post #2 by purple_heart

would anyone be able to point me in the right direction to what pages I would need to edit? And if I should put the query I need to call on that same page or some place else? And was wondering on the customers page add the total sales to that page so I can sort by total sales to make it easier to then apply the discount to that customer.
if i can work it out it might end up being a nice mod

20 Mar 2012, 10:14 AM
#3
purple_heart avatar

purple_heart

New Zenner

Join Date:
Mar 2012
Location:
Melbourne, Australia
Posts:
10
Plugin Contributions:
0

Post #3 by purple_heart

can someone help me delete this post or have it moved to the bin as I will ask the question again in Managing Customers and Orders it seems to be more relevant i didnt see this when i posted originally as it was late also :smile: