Needs work
Project:
Ubercart Terms of Service
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2012 at 13:53 UTC
Updated:
2 Nov 2012 at 04:55 UTC
Jump to comment: Most recent file
Comments
Comment #1
hipfox commentedBypass checked when not required.
Comment #2
bgm commentedIt seems that we don't write to the DB whether the TOS has been accepted or not. We just assume that if they have checked out, they accepted the TOS.
I think the simplest would be to save it in the $order->data, which then gets serialized?
Comment #3
tr commentedThat would be the simplest way, but a lot of contributed modules stomp all over $order->data by assigning their own values to it rather than *appending* their values. So the safest way, which is also more useful in the long run, is to create a new table for this module with columns order_id as an integer key and tos as a boolean signifying whether the TOS has been agreed to or not. Then a simple join can retrieve this value for any particular order whenever it's needed. This is still really simple, and a very small bit of code.