Back to PhocacartCart class

Method removeCouponDb

public
removeCouponDb
()

Method removeCouponDb - Source code

public function removeCouponDb()
{
    $db = Factory::getDBO();
    $date = Factory::getDate();
    $now = $date->toSql();
    $query = 'UPDATE #__phocacart_cart_multiple' . ' SET coupon = ' . (int) $this->coupon['id'] . ', ' . ' date = ' . $db->quote($now) . ' WHERE user_id = ' . (int) $this->user->id . ' AND vendor_id = ' . (int) $this->vendor->id . ' AND ticket_id = ' . (int) $this->ticket->id . ' AND unit_id = ' . (int) $this->unit->id . ' AND section_id = ' . (int) $this->section->id;
    $db->setQuery($query);
    $db->execute();
    return true;
}