Created
June 8, 2011 21:05
-
-
Save rfay/1015397 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Implements hook_feeds_processor_targets_alter(). | |
| * | |
| * On behalf of commerce_product_reference.module. | |
| */ | |
| function commerce_product_reference_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_name) { | |
| module_load_include('inc', 'commerce_feeds', 'mappers/commerce_product_reference'); | |
| _commerce_product_reference_feeds_processor_targets_alter($targets, $entity_type, $bundle_name); | |
| } | |
| /** | |
| * Implements hook_commerce_product_update(). | |
| */ | |
| function commerce_feeds_commerce_product_update($product) { | |
| feeds_item_info_save($product, $product->product_id); | |
| } | |
| /** | |
| * Implements hook_commerce_product_delete(). | |
| */ | |
| function commerce_feeds_commerce_product_delete($product) { | |
| db_delete('feeds_item') | |
| ->condition('entity_type', 'commerce_product') | |
| ->condition('entity_id', $product->product_id) | |
| ->execute(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment