Forums / General Questions / Getting Order Total module to insert values into Orders_Total table

Getting Order Total module to insert values into Orders_Total table

Locked
Results 1 to 3 of 3
This thread is locked. New replies are disabled.
22 Jul 2009, 06:58
#1
malx avatar

malx

New Zenner

Join Date:
Feb 2009
Posts:
15
Plugin Contributions:
0

Getting Order Total module to insert values into Orders_Total table

Hi,

I've written a small mod for a small tour company that sells bus tickets that at Step 2 of checkout (Payment Information) that asks for a Pickup Destination. My idea was to just save it in the order totals with zero dollar values and a label only and it should get carried around with the order. I save this in the session, and implement the process() method and it displays at step 3 (Order confirmation) as expected.

My problem is that I want it to be in the Orders_Total table along with the other order total entries but can't work out how they get included in the $zf_ot_modules array that does the insert for the other totals? Anyone have any insight into how this works?

Thanks,
Anthony.
22 Jul 2009, 15:13
#2
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Posts:
2,361
Plugin Contributions:
1

Re: Getting Order Total module to insert values into Orders_Total table

You'd be better off saving it as a new field in the orders table, and make it part of the order info array. Much easier to implement than adding a new order totals module.
22 Jul 2009, 23:59
#3
malx avatar

malx

New Zenner

Join Date:
Feb 2009
Posts:
15
Plugin Contributions:
0

Re: Getting Order Total module to insert values into Orders_Total table

Hi Neville,

Thanks for the reply. I did originally think about just modifying the order page but my goal as doing it as an order total module was to avoid changing core code files and database schema. This got me so close that I think I'm going to try and use the apply_credit() method in the order total mod to update the Orders_Totals table manually and see what that gives me. I would have liked to have got this working properly in the framework... will look into a little bit more, suspecting that it might have something to do with notifiers perhaps?

Anthony.