Official Documentation Joomla® Vik Extensions by e4j

Vik Appointments Plugin Events

VikAppointments comes with a variety of core events, organised into groups. These are described in the following topics.

Cart events are triggered every time the global user cart is going to be altered.

onEmptyCart

This event is triggered before the user cart is going to be flushed.

Parameters
  • $cart (VikAppointmentsCart) The instance of the current cart object.
Return Value

None.

@since 1.6.0

onAddItemCart

This event is triggered before adding an item into the cart.

Parameters
  • $cart (VikAppointmentsCart) The cart instance containing all the purchased services.
  • &$item (VikAppointmentsItem) A reference to the item that needs to be pushed into the cart.
  • &$err (string) A reference to the error message that will be displayed in case of error. This value is always empty and can be filled only by this event.
Return Value

Boolean. False to avoid adding the item into the cart. Use $err argument to setup a custom error message to display.

@since 1.6.0

onAddOptionCart

This event is triggered before attaching an option to an item.

Parameters
  • $item (VikAppointmentsItem) The item object that will be linked to the option.
  • &$option (VikAppointmentsOption) A reference to the option that needs to be attached to the item.
Return Value

Boolean. False to avoid attaching the option to the item.

@since 1.6.0

onRemoveItemCart

This event is triggered before deleting an item from the cart. The item to remove needs to match all the provided information: service, employee and checkin.

Notice that it is possible to access the details of the item to remove by using the arguments of this event:

$index = $cart->indexOf($id_ser, $id_emp, $ts);
$item  = $cart->getItemAt($index);
Parameters
  • $cart (VikAppointmentsCart) The cart instance containing all the purchased services.
  • $id_service (integer) The ID of the service that belong to the item to remove.
  • $id_employee (integer) The ID of the employee that belong to the item to remove.
  • $checkin (integer) The checkin timestamp that belong to the item to remove.
Return Value

Boolean. False to avoid deleting the item from the cart.

@since 1.6.0

onRemoveOptionCart

This event is triggered before detaching an option from the item.

Parameters
  • $id_option (integer) The ID of the option to remove.
  • $item (VikAppointmentsItem) The item that owns the option to remove.
Return Value

Boolean. False to avoid detaching the option from the item.

@since 1.6.0

Extensionsforjoomla.com is not affiliated with or endorsed by the Joomla!® Project or Open Source Matters.
The Joomla!® name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
E4J s.r.l. - VAT N. 06794860483

This site uses cookies. By continuing to browse you accept their use. Further information