public static
addNewVendorTicket
(mixed $vendorId, mixed $ticketId, mixed $unitId, mixed $sectionId)
public static function addNewVendorTicket($vendorId, $ticketId, $unitId, $sectionId)
{
$app = Factory::getApplication();
$paramsC = PhocacartUtils::getComponentParameters();
$pos_payment_force = $paramsC->get('pos_payment_force', 0);
$pos_shipping_force = $paramsC->get('pos_shipping_force', 0);
if ((int) $pos_payment_force > 0) {
$pos_payment_force = PhocacartPayment::isPaymentMethodActive($pos_payment_force) === true ? (int) $pos_payment_force : 0;
}
if ((int) $pos_shipping_force > 0) {
$pos_shipping_force = PhocacartShipping::isShippingMethodActive($pos_shipping_force) === true ? (int) $pos_shipping_force : 0;
}
$date = Factory::getDate();
$now = $date->toSql();
$db = Factory::getDBO();
$query = 'INSERT INTO #__phocacart_cart_multiple (user_id, vendor_id, ticket_id, unit_id, section_id, shipping, payment, cart, date)' . ' VALUES (0, ' . (int) $vendorId . ', ' . (int) $ticketId . ', ' . (int) $unitId . ', ' . (int) $sectionId . ', ' . (int) $pos_shipping_force . ', ' . (int) $pos_payment_force . ', \'\', ' . $db->quote($now) . ');';
$db->setQuery($query);
$db->execute();
return true;
}