The file admin/model/tool/export.php does both the Export and Import and is therefore the only only which needs to be updated with the DB_PREFIXes.And the import script too? (if there is one)
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Unknown: Only variables should be assigned by reference in D:\xampp\htdocs\winehunter\admin\model\tool\export.php on line 1105Unknown: Only variables should be assigned by reference in D:\xampp\htdocs\winehunter\admin\model\tool\export.php on line 1106Unknown: Assigning the return value of new by reference is deprecated in D:\xampp\htdocs\winehunter\admin\Spreadsheet\Excel\Writer\Workbook.php on line 193Unknown: Assigning the return value of new by reference is deprecated in D:\xampp\htdocs\winehunter\admin\Spreadsheet\Excel\Writer\Workbook.php on line 202Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\winehunter\admin\index.php:57) in D:\xampp\htdocs\winehunter\admin\Spreadsheet\Excel\Writer.php on line 68Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\winehunter\admin\index.php:57) in D:\xampp\htdocs\winehunter\admin\Spreadsheet\Excel\Writer.php on line 69Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\winehunter\admin\index.php:57) in D:\xampp\htdocs\winehunter\admin\Spreadsheet\Excel\Writer.php on line 70Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\winehunter\admin\index.php:57) in D:\xampp\htdocs\winehunter\admin\Spreadsheet\Excel\Writer.php on line 71Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\winehunter\admin\index.php:57) in D:\xampp\htdocs\winehunter\admin\Spreadsheet\Excel\Writer.php on line 72Unknown: Non-static method OLE::Asc2Ucs() should not be called statically, assuming $this from incompatible context in D:\xampp\htdocs\winehunter\admin\Spreadsheet\Excel\Writer\Workbook.php on line 593Unknown: Non-static method OLE::Asc2Ucs() should not be called statically, assuming $this from incompatible context in D:\xampp\htdocs\winehunter\admin\OLE\PPS\Root.php on line 52Unknown: Non-static method OLE::LocalDate2OLE() should not be called statically, assuming $this from incompatible context in D:\xampp\htdocs\winehunter\admin\OLE\PPS.php on line 190Unknown: Non-static method OLE::LocalDate2OLE() should not be called statically, assuming $this from incompatible context in D:\xampp\htdocs\winehunter\admin\OLE\PPS.php on line 191Unknown: Non-static method OLE::LocalDate2OLE() should not be called statically, assuming $this from incompatible context in D:\xampp\htdocs\winehunter\admin\OLE\PPS.php on line 190Unknown: Non-static method OLE::LocalDate2OLE() should not be called statically, assuming $this from incompatible context in D:\xampp\htdocs\winehunter\admin\OLE\PPS.php on line 191ÐÏࡱá����������������;��þÿ �����������������������������
And what version of PHP?
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
I love this contrib, it has been really useful.
Quick question: how easy is it to amend the contrib to support other mods? For example, I'd love to use it in conjuction with QPhoria's excellent mod "Options Plus", which adds extra columns to databases for things like size and weight for each option.
If it's reasonably simple (I'm guessing no!) then I'd like to have a go at this myself, with a bit of guidance...
Many thanks
Mat
It shouldn't be too hard if you know PHP and MySQL a bit. Just add the additional product option fields needed for your purposes in file
admin/model/tool/export.php
in the import methods:
validateOptions
uploadOptions
storeOptionsIntoDatabase
storeOptionDetailsIntoDatabase
storeOptionNamesIntoDatabase
and for the export in methods
populateOptionsWorksheet
I have been reading about this Import/Export module from here and it seems most of the talk has been mostly a year ago. Hopefully i can still salvage some help with an error exporting from this module.
I get this error (which is dumped in the Excel file when i try to export)
My shop has around 1000 products, 20 categories. the import works fine but I cannot export.
Error: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay<br />Error No: 1104<br />SELECT p.product_id, pd.name, GROUP_CONCAT( DISTINCT CAST(pc.category_id AS CHAR(11)) SEPARATOR "," ) AS categories, p.sku, p.location, p.quantity, p.model, m.name AS manufacturer, p.image AS image_name, p.shipping, p.price, p.date_added, p.date_modified, p.date_available, p.weight, wc.unit, p.length, p.width, p.height, p.status, p.tax_class_id, p.viewed, pd.language_id, ua.keyword, pd.description, pd.meta_description, p.stock_status_id, mc.unit AS length_unit, GROUP_CONCAT( DISTINCT CAST(pr.related_id AS CHAR(11)) SEPARATOR "," ) AS related FROM `product` p LEFT JOIN `product_description` pd ON p.product_id=pd.product_id AND pd.language_id=1 LEFT JOIN `product_to_category` pc ON p.product_id=pc.product_id LEFT JOIN `url_alias` ua ON ua.query=CONCAT('product_id=',p.product_id) LEFT JOIN `manufacturer` m ON m.manufacturer_id = p.manufacturer_id LEFT JOIN `weight_class_description` wc ON wc.weight_class_id = p.weight_class_id AND wc.language_id=1 LEFT JOIN `length_class_description` mc ON mc.length_class_id=p.length_class_id AND mc.language_id=1 LEFT JOIN `product_related` pr ON pr.product_id=p.product_id GROUP BY p.product_id ORDER BY p.product_id, pc.category_id;
Any help would be most appreciated.
Thank you
Try and change your MySQL configuration so that:
SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=sufficient high number, e.g. 20
Ask your web host support on how to change these settings, or whether they can do it for you.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
My host company says this in there support database:
MySQL will refuse to execute select statements that process a very large number of rows. You should either adjust your select statement to make it more efficient, or set SQL_BIG_SELECTS=1 in the session before executing the large select statement. Use something like this to do that ..
$db->sql_query("SET OPTION SQL_BIG_SELECTS=1");
Where could i use this?
Online 1187 of the admin/model/tool/export.php script
I added
mysql_query("set sql_big_selects=1");
Works great.
Not being a programmer - I have a need to have readyman's GlobalAttributes module included in the Import/Export of data is there any step by step help on how I could achieve this?JNeuhoff wrote:Hi Mat,
It shouldn't be too hard if you know PHP and MySQL a bit. Just add the additional product option fields needed for your purposes in file
admin/model/tool/export.php
in the import methods:
validateOptions
uploadOptions
storeOptionsIntoDatabase
storeOptionDetailsIntoDatabase
storeOptionNamesIntoDatabase
and for the export in methods
populateOptionsWorksheet
Alternately is there someone who is willing to do this for me? More than happy to contribute.
Cheers
A stupid question is the one you -don't- ask.........(Anon)
)C1.5.0.1 (IN devel)
OC V1.4.9.5
OC V1.4.9.2
OC V1.4.7
OC V1.3.4
Nope - the best way to do this is to do an initial export to spreadsheet, then add new products to this spreadsheet underneath the existing products. It's quite simple and no reason to get confused between old and new products.mixxin wrote:Is there a way to only update or add new to the database via the spreadsheet without wiping out the whole database?
Mixxin
If not, ignore this!
----
QPhoria's Options Plus module adds additional parameters to Product Options. It's really useful.
First things first, this mod adds weight to the import/export module, because that's the only thing I needed to add. It should be pretty simple to add any of the other extended options.
Secondly, you need to make sure that Import/Export module works correctly with the version off OC you have installed (sorry if this is obvious!)
You only need to update the file: \admin\model\tool\export.php
Here's a list of updates to that file. Please note I re-traced my steps on an older version of Export/Import, but I'm sure not much has changed, and the principle is the same.
Once again, the updates I made are just for weight, but I think there's no reason why you can't make them for any of the additional options.
1/ Search for:
$sql = "INSERT INTO `".DB_PREFIX."product_option_value` (`product_option_value_id`, `product_id`, `product_option_id`, `quantity`, `subtract`, `price`, `prefix`, `sort_order`) VALUES ";
replace with:
$sql = "INSERT INTO `".DB_PREFIX."product_option_value` (`product_option_value_id`, `product_id`, `product_option_id`, `quantity`, `subtract`, `price`, `weight`, `prefix`, `sort_order`) VALUES ";
(add `weight`)
2/ Search for
$price = $option['price'];
add underneath:
$weight = $option['weight'];
3/ Search for
$optionPrice = isset($row[7]) ? $row[7] : "0";
add underneath:
$optionWeight = isset($row[8]) ? $row[8] : "0";
4/ Change the index numbers in the two lines following the above addition. This will make sense when you see it.
5/ Search for
$options[$i]['price'] = $optionPrice;
add underneath:
$options[$i]['weight'] = $optionWeight;
6/ Search for
$worksheet->setColumn($j,$j++,max(strlen('price'),10)+1,$priceFormat);
add underneath:
$worksheet->setColumn($j,$j++,max(strlen('weight'),10)+1,$priceFormat);
7/ Search for
$worksheet->writeString( $i, $j++, 'price', $boxFormat );
add underneath:
$worksheet->writeString( $i, $j++, 'weight', $boxFormat );
8/ Search for
$query .= " pov.price AS option_price, ";
add underneath:
$query .= " pov.weight AS option_weight, ";
9/ Search for
$worksheet->write( $i, $j++, $row['option_price'], $priceFormat );
add underneath:
$worksheet->write( $i, $j++, $row['option_weight'], $priceFormat );
Hope that helps someone in the future! I know it's all pretty obvious, but maybe it helps someone to confirm that it's possible, and if it's not working for them, just to check they added things in the right place.
Let me know if you have any questions. Can't promise to answer them but will do my best.
<br />
<b>Fatal error</b>: Call to undefined function iconv() in <b>/home/vinylper/public_html/cart/admin/pear/Spreadsheet/Excel/Writer/Worksheet.php</b> on line <b>1566</b><br />
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes) in /home/worldofm/public_html/admin/model/tool/export.php on line 457
XLS below that 900kb, this problem not happen. Hope someone can answer this. Thanks.
Users browsing this forum: No registered users and 28 guests