I've a table which has customers names along with the products they purchased with their prices. So there are multiple records for each customer. This table is simple 3 column table : name, product and price.
What I wanna do is:
Put all records belonging to one customer together (I've done it) and just after these rows add one new extra row which would just show total price of all the products each customer has purchased. This row would have empty cell in name and product column. And would have total in price column.
EDIT
It's just a plain simple table without any class or ids. customer wise grouped Table is generated by php. So I've a table like this
<table>
<tr>
<td> name1 </td>
<td> product1 </td>
<td> 100 </td>
</tr>
<tr>
<td> name1 </td>
<td> product2 </td>
<td> 200 </td>
</tr>
<tr>
<td> name2 </td>
<td> product3 </td>
<td> 50 </td>
</tr>
<tr>
<td> name2 </td>
<td> product1 </td>
<td> 100 </td>
</tr>
</table>
And I want to convert this to :
<table>
<tr>
<td> name1 </td>
<td> product1 </td>
<td> 100 </td>
</tr>
<tr>
<td> name1 </td>
<td> product2 </td>
<td> 200 </td>
</tr>
<!-- New row -->
<tr>
<td> </td>
<td> </td>
<td> 300 </td>
</tr>
<tr>
<td> name2 </td>
<td> product3 </td>
<td> 50 </td>
</tr>
<tr>
<td> name2 </td>
<td> product1 </td>
<td> 100 </td>
</tr>
<!-- New row -->
<tr>
<td> </td>
<td> </td>
<td> 150 </td>
</tr>
</table>