roro_1 Posted September 3, 2013 Share Posted September 3, 2013 Hello everyone!Use PS 1.5.4.1 and 1.5.5.0I have to add the features to products (books) and i have to import several thousands of books (which have characteristics as Author, Publisher, Place edition, Year of publication). Now importing as manufactured from there is in the list of possible fields these specific features but there is only a generic field "characteristics"there is a possibility, by acting on the code, add those four specific fields that can be viewed at the time of importation? Who could do it? Link to comment Share on other sites More sharing options...
jgullstr Posted September 3, 2013 Share Posted September 3, 2013 Hi,If you could provide some more details I can try to help;What format are the books you're importing in? (CSV? Can you give an example how the data is structured?)What method do you use for importing? (Module? Custom solution?) Link to comment Share on other sites More sharing options...
roro_1 Posted September 13, 2013 Author Share Posted September 13, 2013 Hi, If you could provide some more details I can try to help; What format are the books you're importing in? (CSV? Can you give an example how the data is structured?) What method do you use for importing? (Module? Custom solution?) Hi jgullstr! The format is CSV This is a example: http://sdrv.ms/18aZFuB The colored columns are the characteristics that i have to enter during the import. For me, it is important that the features remain in column and not inside a record horizontally. With version 1.5.5.0 is not admitted this import but only that within a record (Name: Value, Detail: Value, ... ) My method is only "Import CSV" of PS 1.5.5.0. As far as i know there is not a form appropriate to my needs, but only the default method of PS. I must to use only the PS 1.5.5.0. Link to comment Share on other sites More sharing options...
jgullstr Posted September 13, 2013 Share Posted September 13, 2013 Hi, I'd approach this problem by writing a module, that imports the features by product reference after the CSV import has finished. Depending on the recurrence of imports, the complexity of this method may vary. If you're a developer, I suggest you start by looking at the following snippet (also found here): $feature = array( 'key' => 'Size', 'value' => 'humongous', ); $id_feature = Feature::addFeatureImport($feature['key']); $id_feature_value = FeatureValue::addFeatureValueImport($id_feature, $feature['value']); $feature_value = new FeatureValue($id_feature_value); $feature_value->custom = 0; $feature_value->update(); Product::addFeatureProductImport((int) $product->id, $id_feature, $id_feature_value); There might be better ways to do this, but this is the most obvious that comes to mind for me. Link to comment Share on other sites More sharing options...
roro_1 Posted September 16, 2013 Author Share Posted September 16, 2013 AH thanks! But if I'm not a developer (but only webmaster)? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now