Keyword

K2 Reservation Plugins

  • Nurettin Acar
  • Nurettin Acar's Avatar Topic Author
  • Offline
  • New Member
More
12 years 6 months ago #64670 by Nurettin Acar
K2 Reservation Plugins was created by Nurettin Acar
hi everyone.
i am working on easy reservation calendar plugins for K2.

i have problem with plugins multi fields data.
i just create 4 field startDay,endDay,satatus,note

my data must be like that:

$reservation=array(
array("sDate"=>"04-03-2012","eDate"=>"29-04-2012","status"=>"r","note"=>"reserved by x"),
array("sDate"=>"05-05-2012","eDate"=>"11-05-2012","status"=>"b","note"=>"booked by y"),
array("sDate"=>"26-06-2012","eDate"=>"29-06-2012","status"=>"b","note"=>"reserved by z"),
array("sDate"=>"26-07-2012","eDate"=>"29-08-2012","status"=>"b","note"=>"reserved by t"),
);

and at the backend i am creating fields by javascript




name of field names are
startDay=plugins[k2reservationStartDay];
EndDay=plugins[k2reservationEndDay];
status=plugins[k2reservationStatus];
note=plugins[k2reservationNote];

i can add one data like that to database
{"k2reservationitemCalendarWidth":"800","k2reservationitemShowMonths":"8","k2reservationStartDay":"04-03-2012","k2reservationEndDay":"29-04-2012","k2reservationStatus":"b","k2reservationNote":"reserved by x"}


but i should add like array in array;
{"k2reservationitemCalendarWidth":"800","k2reservationitemShowMonths":"8","k2reservationStartDay":"04-03-2012,05-05-2012,26-06-2012,26-07-2012","k2reservationEndDay":"29-04-2012,11-05-2012,29-06-2012,29-08-2012","k2reservationStatus":"r,b,b,b","k2reservationNote":"reserved by x,booked by y,reserved by z,reserved by t"}

i am not good with json so i am looking for solitions.
Thank You.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum