You are here

function uc_product_minmax_values_save in Ubercart Product Minimum & Maximum 6

Saves the min & max values.

Parameters

$minmax: A min and max value object.

1 call to uc_product_minmax_values_save()
uc_product_minmax_feature_form_submit in ./uc_product_minmax.module

File

./uc_product_minmax.module, line 424
This module adds a textfield to product forms for you to enter a minimum and maximum quantity of the product that must be in the cart for it to be checked out.

Code

function uc_product_minmax_values_save($minmax) {

  // Allow other modules to change the saved data.
  drupal_alter('product_minmax_values_save', $minmax);
  db_query("DELETE FROM {uc_product_minmax} WHERE pfid = %d", $minmax->pfid);
  drupal_write_record('uc_product_minmax', $minmax);
}