News:

Support the VirtueMart project and become a member

Main Menu

Order total value field in MYSQL?

Started by jfelix, March 05, 2013, 17:51:34 PM

Previous topic - Next topic

jfelix

Hi everybody,

I am developing a custom wholesale feature for VM2 and I got stuck. I am using Joomla 2.5.9 with Virtuemart 2.018a.

Here is what I am developing: The site will have Shopper Groups and each group will have a discount (percentage). For example:

Standards Clients: 0%
Bronze Clients: 2%
Silver Clients: 4%
Gold Clients: 8%

In order to the client to move into a higher group he/she will need to gather bonus points. Bonus point will be calculated based on the placed orders total values. And here is my problem. In MYSQL I found only a field for the items total (#__product_subtotal_with_tax) in virtuemart_order_items table. This is not enough for me because this value is not the total value of the order (the order may contain coupon discounts, payment discounts or fees which will be added or subtracted in order to get to the total value).

My question is the following: is there a field in MYSQL where this data(order total amount) is stored or this is not stored just calculated in a function and echo-d to the screen?

I hope I managed to describe clearly what the problem is.  If someone has dealt with similar problems before please help. Thanks. :)