Closed (duplicate)
Project:
Node import
Version:
6.x-1.0-rc4
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Sep 2009 at 21:48 UTC
Updated:
9 Oct 2009 at 15:26 UTC
Jump to comment: Most recent file
Comments
Comment #1
joachim commentedIt's been renamed uc_product_is_product():
all/modules/ubercart/uc_product/uc_product.module:function uc_product_is_product($node) {
Comment #2
matteoraggi commentedI hav the same problem with RC7 of ubercart 2 and drupal 6.14 then I have added this code on the top of uc_product.inc and then it go on the next page :
function uc_product_node_is_product($type) {
if (strpos($type, 'product') === 0) {
return TRUE;
}
return FALSE;
}
?>
but then it is showing on th top this long mesage at step 4:
function uc_product_node_import_fields($type) { $fields = array(); if (($node_type = node_import_type_is_node($type)) !== FALSE && uc_product_node_is_product($node_type)) { $fields['model'] = array( 'title' => t('SKU'), 'group' => t('Product information'), 'weight' => 1, ); $fields['list_price'] = array( 'title' => t('List price'), 'group' => t('Product information'), 'weight' => 2, ); $fields['cost'] = array( 'title' => t('Cost'), 'group' => t('Product information'), 'weight' => 3, ); $fields['sell_price'] = array( 'title' => t('Sell price'), 'group' => t('Product information'), 'weight' => 4, ); $fields['shippable'] = array( 'title' => t('Shippable'), 'group' => t('Product information'), 'input_format' => 'boolean', 'weight' => 5, ); $fields['weight'] = array( 'title' => t('Weight'), 'group' => t('Product information'), 'weight' => 6, ); $fields['weight_units'] = array( 'title' => t('Weight unit'), 'group' => t('Product information'), 'allowed_values' => array('lb' => t('Pounds'), 'kg' => t('Kilograms'), 'oz' => t('Ounces'), 'g' => t('Grams')), 'default_value' => variable_get('uc_weight_unit', 'lb'), 'weight' => 7, ); $fields['length_units'] = array( 'title' => t('Dimensions unit'), 'group' => t('Product information'), 'allowed_values' => array('in' => t('Inches'), 'ft' => t('Feet'), 'cm' => t('Centimeters'), 'mm' => t('Millimeters')), 'default_value' => variable_get('uc_length_unit', 'in'), 'weight' => 8, ); $fields['length'] = array( 'title' => t('Length'), 'group' => t('Product information'), 'weight' => 9, ); $fields['width'] = array( 'title' => t('Width'), 'group' => t('Product information'), 'weight' => 10, ); $fields['height'] = array( 'title' => t('Height'), 'group' => t('Product information'), 'weight' => 11, ); $fields['pkg_qty'] = array( 'title' => t('Package quantity'), 'group' => t('Product information'), 'weight' => 12, ); $fields['default_qty'] = array( 'title' => t('Default cart quantity'), 'group' => t('Product information'), 'default_value' => 1, 'weight' => 13, ); $fields['ordering'] = array( 'title' => t('List position'), 'group' => t('Product information'), 'input_type' => 'weight', 'delta' => 25, 'default_value' => 0, 'weight' => 14, ); } return $fields; }
Comment #3
joachim commentedTry fixing the call rather than adding a function, maybe?
Comment #4
matteoraggi commentedOps, I'm not a developer, ho to do that? Anyway at the end It import only one lne and I get thi attached error report.
Comment #5
matteoraggi commentedhere an'other sample of import with a csv file with english headers, but it again also int oa different taxonomy it imort only the first line
Comment #6
matteoraggi commentedI have solved problem to import my nodes overwriting last code with this patch file: http://drupal.org/files/issues/uc_product.zip
And I hope it will be all right also to import products of ubercart.
Comment #7
joachim commentedThat's not a patch.
And: it seems to me everyone is fixing the wrong thing.
The original poster says the right thing:
Change uc_product_node_is_product to uc_product_is_product.
Comment #8
Robrecht Jacques commentedDuplicate of http://drupal.org/node/555202 which has been fixed and will be included in -rc5.