| 1 |
<?php |
<?php |
| 2 |
// $Id:$ |
// $Id: ec_live_subproducts_tangible.module,v 1.1.1.1.2.4 2007/04/16 00:10:20 brmassa Exp $ |
| 3 |
/******************************************************************************* |
/******************************************************************************* |
| 4 |
D R U P A L M O D U L E |
D R U P A L M O D U L E |
| 5 |
******************************************************************************** |
******************************************************************************** |
| 36 |
return $attributes; |
return $attributes; |
| 37 |
case "cart add item": |
case "cart add item": |
| 38 |
return ec_live_subproducts_cart_add_item($node, $data); |
return ec_live_subproducts_cart_add_item($node, $data); |
| 39 |
// case "on payment completion": |
// case "on payment completion": |
| 40 |
// $attributes = db_query("SELECT a.aid, a.stock FROM ec_live_attribute a INNER JOIN ec_live_product_attribute pa ON pa.aid = a.aid WHERE pa.nid = %d ", $node->nid ); |
// $attributes = db_query("SELECT a.aid, a.stock FROM {ec_live_subproducts_attribute} a INNER JOIN {ec_live_subproducts_product_attribute} pa ON pa.aid = a.aid WHERE pa.nid = %d ", $node->nid ); |
| 41 |
// while ($attribute = db_fetch_object($attributes)) { |
// while ($attribute = db_fetch_object($attributes)) { |
| 42 |
// if ($attribute->stock > 0) { |
// if ($attribute->stock > 0) { |
| 43 |
// $edit["aid"] = $attribute->aid; |
// $edit["aid"] = $attribute->aid; |
| 44 |
// $edit["stock"] = $attribute->stock-1; |
// $edit["stock"] = $attribute->stock-1; |
| 45 |
// subproductapi_set_attribute($edit, "update"); |
// subproductapi_set_attribute($edit, "update"); |
| 46 |
// } |
// } |
| 47 |
// } |
// } |
| 48 |
case "subproduct_types": |
case "subproduct_types": |
| 49 |
return array("ec_live_subproducts_tangible"); |
return array("ec_live_subproducts_tangible"); |
| 50 |
case "wizard_select": |
case "wizard_select": |