updateShippingPaymentId method

Future<int> updateShippingPaymentId(
  1. String store_id,
  2. String payment_method_id,
  3. String shipping_method_id
)

Implementation

Future<int> updateShippingPaymentId(String store_id, String payment_method_id,
    String shipping_method_id) async {
  Database? db = await DatabaseCreator.instance.database;

  Map<String, dynamic> row = {
    'payment_method_id': payment_method_id,
    'shipping_method_id': shipping_method_id,
  };

  // do the update and get the number of affected rows
  int updateCount = await db!
      .update('cartTable', row, where: 'store_id = ?', whereArgs: [store_id]);

  return updateCount;
}