commerce_product_save

  1. commerce
    1. 7
Versions
7 commerce_product_save($product)

Saves a product.

Parameters

$product The full product object to save.

Return value

SAVED_NEW or SAVED_UPDATED depending on the operation performed.

▾ 7 functions call commerce_product_save()

CommerceBaseTestCase::createDummyProduct in tests/commerce_base.test
Creates a dummy product for use with other tests.
CommerceCartTestCaseAnonymousToAuthenticated::testCommerceCartAnonymousToAuthenticated in modules/cart/tests/commerce_cart.test
Test anonymous cart conversion.
CommerceCartTestCaseAttributes::setUp in modules/cart/tests/commerce_cart.test
Implementation of setUp().
CommerceProductCRUDTestCase::testCommerceProductCrud in modules/product/tests/commerce_product.test
Test the product CRUD functions.
CommerceProductCRUDTestCase::testCommerceProductTokens in modules/product/tests/commerce_product.test
Test product Token replacement.
commerce_order_update_7100 in modules/order/commerce_order.install
Loads and resaves all the products on the site, updating the default price field to have proper component price amount values.
commerce_product_product_form_submit in modules/product/includes/commerce_product.forms.inc
Submit callback for commerce_product_product_form().

Code

modules/product/commerce_product.module, line 462

<?php
function commerce_product_save($product) {
  return entity_get_controller('commerce_product')->save($product);
}
?>