Advertisement
Guest User

Autosku Features Example

a guest
Oct 23rd, 2012
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. /* From Commerce Kickstart file ... /profiles/commerce_kickstart/modules/commerce_kickstart/commerce_kickstart_product/commerce_kickstart_product.ins, lines 23 - 34 */
  2.  
  3.   // Setup AutoSKU for product types provided by this module.
  4.   foreach (commerce_kickstart_product_commerce_product_default_types() as $type => $type_info) {
  5.     $record = new stdClass();
  6.     $record->product_type = $type;
  7.     $record->pattern = '[commerce-product:title]';
  8.     $record->advanced = array(
  9.       'update_existing' => 0,
  10.       'hide_sku' => 1,
  11.       'case' => 'uppercase',
  12.     );
  13.     drupal_write_record('commerce_autosku_patterns', $record, 'product_type');
  14.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement