I know you can take out the expected headers in the export file, and I've tried also removing some of the lines of code that are associated with the unwanted columns, but it results in messing up the database.
For example, on this OpenCart site I'm making, the manufacturer is always the same company, the one that will run this website. So there is no reason to have this manufacturer field in the Excel spreadsheet because it will never be anybody else, just lines and lines of the same company's name if you were to put it there, an empty, useless column taking up space if you don't. We also have no use for the Location, Quantity, Requires Shipping, Price, Date_Added/Modified/Available, Tax_Class_ID, Viewed, Stock_Status_ID, Cost, etc. columns. This is basically just going to be a catalog, no buying, no pricing, just for browsing. However their thousands of products can be controlled through an Excel database, so they want to be able to adjust the catalog via the spreadsheet. Their product is sold through third-parties. It would be nice to strip those out of the spreadsheet entirely, and have basic defaults built-in and hidden to satisfy OpenCart's need for some sort of value for those fields. I'm sure this is possible, but after tinkering I can't seem to figure it out.
Any suggestions?
Fatal error: Uncaught exception 'Exception' with message 'Unknown codepage: 0' in /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Shared/CodePage.php:91 Stack trace: #0 /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Reader/Excel5.php(1042): PHPExcel_Shared_CodePage::NumberToName(0) #1 /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Reader/Excel5.php(517): PHPExcel_Reader_Excel5->_readSummaryInformation() #2 /hermes/bosweb/web032/b322/my-domain/admin/model/tool/export.php(1481): PHPExcel_Reader_Excel5->load('/tmp/phpd0icZr') #3 /hermes/bosweb/web032/b322/my-domain/admin/controller/tool/export.php(13): ModelToolExport->upload('/tmp/phpd0icZr') #4 [internal function]: ControllerToolExport->index() #5 /hermes/bosweb/web032/b322/my-domain/system/engine/front.php(47): call_user_f in /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Shared/CodePage.php on line 91
Fatal Error: Uncaught exception 'Exception' with message 'Unknown codepage: 0' in /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Shared/CodePage.php:91 Stack trace: #0 /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Reader/Excel5.php(1042): PHPExcel_Shared_CodePage::NumberToName(0) #1 /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Reader/Excel5.php(517): PHPExcel_Reader_Excel5->_readSummaryInformation() #2 /hermes/bosweb/web032/b322/my-domain/admin/model/tool/export.php(1481): PHPExcel_Reader_Excel5->load('/tmp/phpd0icZr') #3 /hermes/bosweb/web032/b322/my-domain/admin/controller/tool/export.php(13): ModelToolExport->upload('/tmp/phpd0icZr') #4 [internal function]: ControllerToolExport->index() #5 /hermes/bosweb/web032/b322/my-domain/system/engine/front.php(47): call_user_f in /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Shared/CodePage.php on line 91
How can i resolve this?
Thank you for any help in advance.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Op al uw computervragen een antwoord -- Extigo Computers
http://www.extigo.nl
Using OC 1.4.9.4
The XLS file you sent me does not work for Opencart 1.4.9, among others 2 worksheets for 'Specials' and 'Discounts'. If you are using an older version of Opencart, please upgrade to at least 1.4.9.x or 1.5.0.x, chances are your issues are already fixed for these later versions.mattappleton wrote:Hello, just downloaded this tool, i am receiving this error though when trying to import:
How can i resolve this?
Thank you for any help in advance.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
You can't add worksheets or columns, it has to obey a specific format, otherwise it won't work.extigo wrote:I am using your Export Import tool for quite a while now and I recently added a new tab at the products page. When I export the XLS file I do not get the Specs with it. But when I import the tool, the specs are gone! How is this possible and is there a way to fix it?
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
OK I found it ---> http://www.mhccorp.com/opencart/export-import-tool
thank you.
My experience using the module is as follows:
First of all - I'm using OC version 1.4.9.5. The module was installed successfully and the settings in the php.ini is as follows.
memory_limit = 512M;
post_max_size = 30M;
upload_max_filesize = 999M;
Firstly I exported the file to see the file layout etc. We have 24 416 products - and still much more to come. Now what I didnt know and it does not seem to be documented in the Read.me file - is the fact that you CANNOT just import your new products, it has to be appended to the existing export file. If you have as many products as I do - the import process takes forever despite the fact that the limits have been increased in the php.ini file.
Now what has happened to me is - being unaware of the fact that you have to append your new products to the existing export file - I just added the new products and imported them - this resulted in all my categories (over 300 of them) and all the products being deleted. The only thing that imported successfully was the new category the actual products did not import! I've been trying to import the original export file that lists the 24 416 products and its been more than 30 minutes and it still has not imported which leaves me with the question of how I'm gonna get all those products back again.
In addition to the above - I visited your website and sent an email inquiring whether it was possible to have the module allow me to select which categories I want to export or import, which attributes I want to export or export for eg image only, product pricing only, product description only or ALL and etc. - to this I have not received a reply - I am more than willing to pay for this!
Ideally the module would work a lot better if one was able to just import the new products without it deleting all the categories and products in the database, and not have to append the new products to an existing file. In time that file obviously will become larger and the export/import process will be subject to potential problems which when a person gets to that amount of products in your store - that's exactly the time when one does not need problems with the import or export. In my case, the module cannot import the original export file and as a result I've lost over 300 categories and 24 416 products.!!!
Adding an incremental Import where products are added and/or replaced is on our to-do list, quite a few users have asked for this feature.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
i sent you a PM but i dont know for sure if this message has been sent.
I used your module with success on OC 1.4.9 and now i have installed it on OC 1.5.1.1. When i want to export i get this warning:
Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in /public/sites/www.stoelenco.nl/login258_sc/controller/tool/export.php on line 76
I have only 1 item in the shop at this moment so thats not an issue i think.
Thanx a lot for your answer.
John
By comment out this rule it works perfect! Thanx for your quick anwer JNeuhoff.funt wrote:Dear JNeuhoff,
i sent you a PM but i dont know for sure if this message has been sent.
I used your module with success on OC 1.4.9 and now i have installed it on OC 1.5.1.1. When i want to export i get this warning:
Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in /public/sites/www.stoelenco.nl/login258_sc/controller/tool/export.php on line 76
I have only 1 item in the shop at this moment so thats not an issue i think.
Thanx a lot for your answer.
John
Here's the model code modifications... this only reads the changes, which are manually added in the backend through the modified product_form.tpl, I'm trying to figure out how to re-work this so that it instead posts the changes from the export.php-generated spreadsheet?
Code: Select all
admin/model/catalog/product.php
// Change lines (starting around line 12, in addProduct function)
foreach ($data['product_description'] as $language_id => $value) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_keywords = '" . $this->db->escape($value['meta_keywords']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "'");
}
// to
foreach ($data['product_description'] as $language_id => $value) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_keywords = '" . $this->db->escape($value['meta_keywords']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "', alt_text = '" . $this->db->escape($value['alt_text']) . "', title_text = '" . $this->db->escape($value['title_text']) . "'");
}
// Change lines (starting around line 59, in addProduct function)
foreach ($data['product_image'] as $image) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_image SET product_id = '" . (int)$product_id . "', image = '" . $this->db->escape($image) . "'");
}
// to
foreach ($data['product_image'] as $image) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_image SET product_id = '" . (int)$product_id . "', image = '" . $this->db->escape($image['image']) . "', sort_order = '" . (int)$image['sort_order'] . "'");
$product_image_id = $this->db->getLastId();
foreach ($image['language'] as $language_id => $language) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_image_description SET product_image_id = '" . (int)$product_image_id . "', language_id = '" . (int)$language_id . "', product_id = '" . (int)$product_id . "', alt_text = '" . $this->db->escape($language['alt_text']) . "', title_text = '" . $this->db->escape($language['title_text']) . "'");
}
}
// Change lines (starting around line 113, in editProduct function)
foreach ($data['product_description'] as $language_id => $value) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_keywords = '" . $this->db->escape($value['meta_keywords']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "'");
}
// to
foreach ($data['product_description'] as $language_id => $value) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_keywords = '" . $this->db->escape($value['meta_keywords']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "', alt_text = '" . $this->db->escape($value['alt_text']) . "', title_text = '" . $this->db->escape($value['title_text']) . "'");
}
// Change lines (starting around line 170, in editProduct function)
$this->db->query("DELETE FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "'");
if (isset($data['product_image'])) {
foreach ($data['product_image'] as $image) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_image SET product_id = '" . (int)$product_id . "', image = '" . $this->db->escape($image) . "'");
}
}
// to
$this->db->query("DELETE FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "'");
$this->db->query("DELETE FROM " . DB_PREFIX . "product_image_description WHERE product_id = '" . (int)$product_id . "'");
if (isset($data['product_image'])) {
foreach ($data['product_image'] as $image) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_image SET product_id = '" . (int)$product_id . "', image = '" . $this->db->escape($image['image']) . "', sort_order = '" . (int)$image['sort_order'] . "'");
$product_image_id = $this->db->getLastId();
foreach ($image['language'] as $language_id => $language) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_image_description SET product_image_id = '" . (int)$product_image_id . "', language_id = '" . (int)$language_id . "', product_id = '" . (int)$product_id . "', alt_text = '" . $this->db->escape($language['alt_text']) . "', title_text = '" . $this->db->escape($language['title_text']) . "'");
}
}
}
// Change lines (starting around line 252, in copyProduct function)
foreach ($results as $result) {
$data['product_image'][] = $result['image'];
}
// to
foreach ($results as $result) {
$descriptions = $this->getProductImageDescriptions($result['product_image_id']);
$data['product_image'][] = array(
'image' => $result['image'],
'sort_order'=> $result['sort_order'],
'language' => $descriptions
);
}
// Add after (around line 282, in deleteProduct function)
$this->db->query("DELETE FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "'");
// line
$this->db->query("DELETE FROM " . DB_PREFIX . "product_image_description WHERE product_id = '" . (int)$product_id . "'");
// Change lines (starting around line 413, function getProductDescriptions)
public function getProductDescriptions($product_id) {
$product_description_data = array();
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_description WHERE product_id = '" . (int)$product_id . "'");
foreach ($query->rows as $result) {
$product_description_data[$result['language_id']] = array(
'name' => $result['name'],
'meta_keywords' => $result['meta_keywords'],
'meta_description' => $result['meta_description'],
'description' => $result['description']
);
}
return $product_description_data;
}
// to
public function getProductDescriptions($product_id) {
$product_description_data = array();
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_description WHERE product_id = '" . (int)$product_id . "'");
foreach ($query->rows as $result) {
$product_description_data[$result['language_id']] = array(
'name' => $result['name'],
'meta_keywords' => $result['meta_keywords'],
'meta_description' => $result['meta_description'],
'description' => $result['description'],
'alt_text' => $result['alt_text'],
'title_text' => $result['title_text']
);
}
return $product_description_data;
}
// Change (around line 482, in getProductImages function)
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "'");
// to
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "' ORDER BY sort_order ASC");
// Add after (around line 500, after getProductImages function) lines
public function getProductImageDescriptions($product_image_id) {
$product_image_description_data = array();
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_image_description WHERE product_image_id = '" . (int)$product_image_id . "'");
foreach ($query->rows as $result) {
$product_image_description_data[$result['language_id']] = array(
'alt_text' => $result['alt_text'],
'title_text' => $result['title_text']
);
}
return $product_image_description_data;
}
I get the exact same error. Is there a solution?mattappleton wrote:Hello, just downloaded this tool, i am receiving this error though when trying to import:
Fatal error: Uncaught exception 'Exception' with message 'Unknown codepage: 0' in /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Shared/CodePage.php:91 Stack trace: #0 /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Reader/Excel5.php(1042): PHPExcel_Shared_CodePage::NumberToName(0) #1 /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Reader/Excel5.php(517): PHPExcel_Reader_Excel5->_readSummaryInformation() #2 /hermes/bosweb/web032/b322/my-domain/admin/model/tool/export.php(1481): PHPExcel_Reader_Excel5->load('/tmp/phpd0icZr') #3 /hermes/bosweb/web032/b322/my-domain/admin/controller/tool/export.php(13): ModelToolExport->upload('/tmp/phpd0icZr') #4 [internal function]: ControllerToolExport->index() #5 /hermes/bosweb/web032/b322/my-domain/system/engine/front.php(47): call_user_f in /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Shared/CodePage.php on line 91
Fatal Error: Uncaught exception 'Exception' with message 'Unknown codepage: 0' in /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Shared/CodePage.php:91 Stack trace: #0 /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Reader/Excel5.php(1042): PHPExcel_Shared_CodePage::NumberToName(0) #1 /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Reader/Excel5.php(517): PHPExcel_Reader_Excel5->_readSummaryInformation() #2 /hermes/bosweb/web032/b322/my-domain/admin/model/tool/export.php(1481): PHPExcel_Reader_Excel5->load('/tmp/phpd0icZr') #3 /hermes/bosweb/web032/b322/my-domain/admin/controller/tool/export.php(13): ModelToolExport->upload('/tmp/phpd0icZr') #4 [internal function]: ControllerToolExport->index() #5 /hermes/bosweb/web032/b322/my-domain/system/engine/front.php(47): call_user_f in /hermes/bosweb/web032/b322/my-domain/system/PHPExcel/Classes/PHPExcel/Shared/CodePage.php on line 91
How can i resolve this?
Thank you for any help in advance.
Never mind. Found a fix that solved it https://gist.github.com/762095deejunit wrote: I get the exact same error. Is there a solution?
This is a mysql error which usually referrences a temporary table and is caused by one of the querys trying to write a massive temporary table. In my case the query tried to write a 2GB table!!!
For me this was a result of having thousands of categories but then isnt this the point of the module?! You wouldnt need such a module if you were only adding a few items in one or two categories.
Can anybody recommend a simular module that parses on the fly?
Andy
Just looking for a bit of advice on the import / export tool. I have 13000 products to import which naturally with a large number of products like this trying to import the data in one go is not a viable option or advised. What I have attempted to do was import the products in blocks of 500 products at a time. Whilst doing this I am having the following issues
I upload the first 500 products and check the admin to ensure they are there along with images and all the relevant data. These products have copied over correctly without any issues.
Now when I import the next 500 products this overwrites the first 500 products. No matter what I do I have the same problem every time I attempt to import the products it over the existing products in my store.
does anyone have any idea of what I am doing wrong or how to over come this issue
thanks in advance
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sSciencePlanFelineMatureAdult7ActiveLongevityChicken2kg.jpg',1,12.49,'2011-07-12' at line 1
Error No: 1064
I saw a post that said to change the $imageName to something other than = $product[7]; but I don't know if this is right for this error.
We had over 800 products on our website, and now after trying the import and getting this message, there are only 244 now showing.
Please help. We're already live.
Many thanks
Gill
Users browsing this forum: No registered users and 3 guests