Hi,
I would like to add additional columns to the import process.
Many of my products feature fractions in their product names and do not display in the correct order. My spreadsheet factors this with an 'Order' column, which I would like to import via CSV Import PRO.
Does anyone know where I begin, or if there is any example code out there for adding additional columns to the import process?
Thanks in advance, best regards
Gary
I would like to add additional columns to the import process.
Many of my products feature fractions in their product names and do not display in the correct order. My spreadsheet factors this with an 'Order' column, which I would like to import via CSV Import PRO.
Does anyone know where I begin, or if there is any example code out there for adding additional columns to the import process?
Thanks in advance, best regards
Gary
Hi again,
I managed to do it myself, CSV Import PRO now imports Sort Order and I am very happy with that!
I have posted the code snippets below so that others can learn how to add additional columns to their import pipeline. For reference, I am using OpenCart v1.4.9.3. There are 4 code additions to be made to the admin controller file, 2 additions to the admin language file and 1 addition to be made to the admin template file. I have listed the updated code snippets, I hope you find them helpful:
Here are the related files that we need to be aware of:
The language file is quick and easy to update (/admin/language/english/tool/csv_import.tpl); the additions below should be added under the '// Entry' and '// Field Names' sections, respectively, as follows:
The fourth file (/admin/view/template/tool/csv_import.tpl) can also be easily modified; simply find the first <tr>...</tr> in the code below and add the second table row which includes our 'Sort order' text field:
All the best,
Gary
I managed to do it myself, CSV Import PRO now imports Sort Order and I am very happy with that!
I have posted the code snippets below so that others can learn how to add additional columns to their import pipeline. For reference, I am using OpenCart v1.4.9.3. There are 4 code additions to be made to the admin controller file, 2 additions to the admin language file and 1 addition to be made to the admin template file. I have listed the updated code snippets, I hope you find them helpful:
Here are the related files that we need to be aware of:
- /admin/controller/view/template/tool/csv_import.tpl
- /admin/language/english/tool/csv_import.tpl
- /admin/model/tool/csv_import.tpl (I did not update this file)
- /admin/view/template/tool/csv_import.tpl
Code: Select all
// GET HEADINGS INFO
$headings_info = array(
'csv_import_field_sort_order' => 'sort_order',
Code: Select all
// SPECIFY REQUIRED LANGUAGE TEXT
$language_info = array(
'text_field_sort_order',
Code: Select all
//required product data
$prod_data = array(
'sort_order' => 0,
Code: Select all
//Optional Import Fields:
//SEO Keyword
if (isset($this->field_names['keyword']) && isset($raw_prod[$this->field_names['keyword']])) {
$product['keyword'] = $raw_prod[$this->field_names['keyword']];
}
//Sort Order
if (isset($this->field_names['sort_order']) && isset($raw_prod[$this->field_names['sort_order']])) {
$product['sort_order'] = $raw_prod[$this->field_names['sort_order']];
}
Code: Select all
$_['entry_sort_order']= 'Sort Order:';
$_['text_field_sort_order'] = 'Sort Order';
Code: Select all
<tr><td style="width:200px;"><h2><?php echo $text_field_oc_title; ?></h2></td><td><h2><?php echo $text_field_csv_title; ?></h2></td>
<tr><td style="width:200px;"><?php echo $text_field_name; ?></td><td><input type="text" name="csv_import_field_name" value="<?php if ($csv_import_field_name) {echo $csv_import_field_name; } ?>"></td></tr>
<tr><td style="width:200px;"><?php echo $text_field_sort_order; ?></td><td><input type="text" name="csv_import_field_sort_order" value="<?php if ($csv_import_field_sort_order) {echo $csv_import_field_sort_order; } ?>"></td></tr>
Gary
Hi Aaron,
Please do share what modifications you have made! I remembered your other post today -and having read it -am glad to see resolved it. CSV Import Pro is a great extension, and all the better for people like you and the author posting on the forum to expand upon its uses!
Gary
PS,
if you decide to post your Gender/Size mod, could you also write about how you added those columns to the cart or the pipeline for doing so? I am looking to add additional data to my products and it would be great if you could touch on that, too.
Please do share what modifications you have made! I remembered your other post today -and having read it -am glad to see resolved it. CSV Import Pro is a great extension, and all the better for people like you and the author posting on the forum to expand upon its uses!
Gary
PS,
if you decide to post your Gender/Size mod, could you also write about how you added those columns to the cart or the pipeline for doing so? I am looking to add additional data to my products and it would be great if you could touch on that, too.
sorry i not uploaded the Gender / Size modification yet i totally forgot about this thread i will try an gather it up later on today.
What do you mean you cant do the sub cats? etc.
First create a column called Main Category then create another Column Called Sub Categories and then you put main cats in main cats and sub cats in sub cats then in the csv import pro you will use the category more with the right arrow so it adds it like Main Category > Sub Categories
What do you mean you cant do the sub cats? etc.
First create a column called Main Category then create another Column Called Sub Categories and then you put main cats in main cats and sub cats in sub cats then in the csv import pro you will use the category more with the right arrow so it adds it like Main Category > Sub Categories
Total Import PRO, but finding it really hard going to get my head round it all. Although I do have rather a lot of projects on the go currently. lolaaron1988 wrote:Ok mate so you using Total Import Pro or CSV Import Pro?
Aaron
What I really need a a video of someone who has total import pro and a website where I can see what is actually uploaded to the store.
I guess I am going to have to create a dummy store and start adding stuff myself, although I purchased the module as I saw a video for CSV import pro and thought there would be one for total as well but sadly not yet. My problem is I learn 99% of my stuff visually rather than from a manual....
Hi there,
it looks like you guys may be able to help me, I'm a very happy user of Total Import PRO, but I've come up with an issue where I've added an additional field/column in the "product" table called "cost" which is all fine and working, however I need to modify/hack Total Import PRO to allow me to import that additional field from the CSV file and I'm not sure where to begin, I'm running 1.5.4 of Opencart and (I think) the latest Total Import PRO, can you guys point me in the right direction as I'm getting desperate.
Cheers
James.
it looks like you guys may be able to help me, I'm a very happy user of Total Import PRO, but I've come up with an issue where I've added an additional field/column in the "product" table called "cost" which is all fine and working, however I need to modify/hack Total Import PRO to allow me to import that additional field from the CSV file and I'm not sure where to begin, I'm running 1.5.4 of Opencart and (I think) the latest Total Import PRO, can you guys point me in the right direction as I'm getting desperate.
Cheers
James.
Who is online
Users browsing this forum: No registered users and 16 guests