Jump to content
VJ

Easy Populate & Products Attributes

Recommended Posts

certainly it's possible, but it might be easier to use the latest version that already has that built in.

Share this post


Link to post
Share on other sites

Hello, Here's where I'm at. I installed EP and it worked great. Then I installed the add extra fields Contribution, and added extra fields. I was then getting an error message directly related to the extra fields. I then carefully uninstalled extra fields. Including the 2 fields from the products table, which I deleted. (products_extra_fields, and products_to_products_extra_fields). I see that much of the extra fields contribution seems to relate to the searchability of the extra field values. I don't need to search the fields, so I thought I could just add fields to the table manually, and tell EP to take care of it. Nice try. I have searched the error message and it seems this was fixed years ago, and switching to the version I'm using solved the problems of those who didn't do things I did. I bet Surfalot already knows what I did wrong, but just in case not, I will continue.

 

My extra fields DO appear as checkboxes in the "Export EP or Froogle Products File" customization area.

 

I see extra fields set to false, but I saw nothing that said to set it to 'true'. Set to true generates the same error.

 

// Extra Fields Contribution (***UNTESTED AND MAY NOT BE FUNCTIONAL***)

define ('EP_EXTRA_FIELDS_SUPPORT', false); // default is false

 

I downloaded: http://www.instantvideogames.com/catalog/D...9Mar29-0909.csv

 

trimmed, modified, uploaded: http://www.instantvideogames.com/catalog/U...9Mar29-0909.csv

 

Result:

File uploaded.

Temporary filename: /tmp/phpkfDRUA

User filename: UPLOAD_ATTEMPT_EP2009Mar29-0909.csv

Size: 6788

| PS2007 | Arena Foot | The second | ArenaFootb | EA Sports | Everyone 1 | 2007 | 11.99 | 5 | 0.3 | 12/31/1969 | 3/16/2009 | PlayStatio | Sports | Taxable Go | Active Updated

1064 - 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 'condition='',year='2007', products_weight='0.3',' at line 5

 

UPDATE products SET products_price='11.99', products_image='ArenaFootballRoadtoGlory250_f.jpg', subtitle='',developer='EA Sports',rating='Everyone 10+',condition='',year='2007', products_weight='0.3', products_tax_class_id='1', products_date_available='1969-12-31 17:00:00', products_date_added='2009-03-16 22:56:00', products_last_modified='2009-03-29 09:40:11', products_quantity = 5, manufacturers_id = 29, products_status = 1 WHERE (products_id = 136) LIMIT 1

 

[TEP STOP]

 

 

Adding a value to 'condition' generates:

1064 - 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 'condition='New',year='2007', products_weight='0.' at line 5

 

From easypopulate.php:

 

//$custom_fields[TABLE_PRODUCTS] = array();

$custom_fields[TABLE_PRODUCTS] = array( 'subtitle' => 'Subtitle', 'developer' => 'Developer', 'rating' => 'Rating', 'condition' => 'Condition', 'year' => 'Year' );

$custom_fields[TABLE_PRODUCTS_DESCRIPTION] = array(); // this line is used if you have no custom fields to import/export

 

Using Vista and Excel

 

Settings & Info

 

EP vers: 2.76h-MS2

osCommerce Online Merchant v2.2 RC2a

OS: Linux 2.6.18-92.1.10.el5PAE

HTTP: Apache

DB: MySQL 5.0.67.d7-ourdelta-log

PHP: 5.2.8 (Zend: 2.2.0)

 

Temp Directory:

/home/content/h/o/d/hodja451/html/catalog/temp/

Temp Dir is Writable

Magic Quotes is: off

register_globals is: off

Split files on: 300 records

Model Num Size: 15

Price with tax: false

Calc Precision: 2

Replace quotes: false

Field seperator: comma

Excel safe output: true

Preserve tab/cr/lf: false

Category depth: 7

Enable attributes: true

SEF Froogle URLS: false

More Pics: false

Unknown Pics: false

HTC: false

SPPC: false

Extra Fields: false

 

Please be kind enough to show me the error of my ways.

Or just point and laugh, your choice.

Thanks,

Walter


My experience relates to osCommerce Online Merchant v2.2 RC2

Share this post


Link to post
Share on other sites

I had also tried swiching the fields in the table from charvar to text, no luck

 

Using Go Daddy:

 

 

Operating System:

Linux

Hosting Type:

Shared Hosting

Hosting Configuration:

2.0

PHP Version:

PHP 5.x


My experience relates to osCommerce Online Merchant v2.2 RC2

Share this post


Link to post
Share on other sites

Hi There,

 

Has any one used this in conjunction with the easy fields contrib that shows the RRP.

 

I am wanting to be able to download the CSV with both the price and RRP as a field

 

Hope this is clear


Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Share this post


Link to post
Share on other sites

I guess since I don't know what easy fields & RRP is, that means EP doesn't do it, sorry.

Share this post


Link to post
Share on other sites
Hello, Here's where I'm at. I installed EP and it worked great. Then I installed the add extra fields Contribution, and added extra fields. I was then getting an error message directly related to the extra fields. I then carefully uninstalled extra fields. Including the 2 fields from the products table, which I deleted. (products_extra_fields, and products_to_products_extra_fields). I see that much of the extra fields contribution seems to relate to the searchability of the extra field values. I don't need to search the fields, so I thought I could just add fields to the table manually, and tell EP to take care of it. Nice try. I have searched the error message and it seems this was fixed years ago, and switching to the version I'm using solved the problems of those who didn't do things I did. I bet Surfalot already knows what I did wrong, but just in case not, I will continue.

everything looks in order. are you sure you created the fields: "subtitle", "condition", "developer", "rating", "year" in your "products" table ??

Edited by surfalot

Share this post


Link to post
Share on other sites

I know added them, but I don't know if I missed a detail. Maybe this is a clue: The fields do download through EP, they download empty columns, because they are empty, but the down load file shows v_year ect. and I never typed v_ so I guess EP is working on download, with an error on upload. I first made the fields charvar and picked a size, then switched them to text when it didn't work.

 

I'm afraid the extra fields contribution did required things that I didn't do.

 

Here's the table:

 

http://www.instantvideogames.com/catalog/images/database.jpg

 

Thanks for the quick reply,

Walter


My experience relates to osCommerce Online Merchant v2.2 RC2

Share this post


Link to post
Share on other sites
I know added them, but I don't know if I missed a detail. Maybe this is a clue: The fields do download through EP, they download empty columns, because they are empty, but the down load file shows v_year ect. and I never typed v_ so I guess EP is working on download, with an error on upload. I first made the fields charvar and picked a size, then switched them to text when it didn't work.

the problem is that you are using field names that are "reserved words". You need to change the name of the "condition" table and the "year" table. You can avoid this kind of problem in the future by choosing table names like products_condition and products_year

 

the following may fix it in EP, but you may run into the problems elsewhere.

find in easypopulate.php near line 2746

					// /////////////////////////////////////////////////////////////////////
				//
				// Start: Support for other contributions
				//
				// /////////////////////////////////////////////////////////////////////
				$ep_additional_updates = '';

				foreach ($custom_fields[TABLE_PRODUCTS] as $key => $name) { 
				  $tmp_var = 'v_' . $key;
				  $ep_additional_updates .= $key . "='" . $$tmp_var . "',";
				}

replace with

					// /////////////////////////////////////////////////////////////////////
				//
				// Start: Support for other contributions
				//
				// /////////////////////////////////////////////////////////////////////
				$ep_additional_updates = '';

				foreach ($custom_fields[TABLE_PRODUCTS] as $key => $name) { 
				  $tmp_var = 'v_' . $key;
				  $ep_additional_updates .= "`" . $key . "`='" . $$tmp_var . "',";
				}

Share this post


Link to post
Share on other sites

I switched the field names adding products_ then updated ep.php and it worked like a charm.

 

I skipped the second part because I interpreted that as a second solution, and I figured I would take your advice and avoid future problems by renaming the fields now.

 

Thank you very much for your time.

 

Walter


My experience relates to osCommerce Online Merchant v2.2 RC2

Share this post


Link to post
Share on other sites

Hi,

 

here is my config:

 

Settings & Info

 

EP vers: 2.76h-MS2

osCommerce Online Merchant v2.2 RC2a

OS: Linux 2.6.27.7-grsec

HTTP: Apache/1.3 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.8f AuthPG/1.3 FrontPage/5.0.2.2635

DB: MySQL 4.1.22-standard-log

PHP: 5.2.6 (Zend: 2.2.0)

 

Temp Directory:

/kunden/240310_4202/web/biopur/catalog/temp/

Temp Dir is Writable

Magic Quotes is: off

register_globals is: on

Split files on: 300 records

Model Num Size: 12

Price with tax: false

Calc Precision: 2

Replace quotes: false

Field seperator: tab

Excel safe output: false

Preserve tab/cr/lf: false

Category depth: 7

Enable attributes: true

SEF Froogle URLS: false

More Pics: false

Unknown Pics: false

HTC: false

SPPC: false

Extra Fields: false

 

My problem:

 

I export, do some adds with EXCEL, and reimport. Then the product-description has changed, for example,from:

 

<a href "mailto:xxxxxxxx"> to <a href""mailto:xxxxxxxx"">

 

So, every export/import brings additional "".

 

Whats wrong?

 

Greets

 

ImI

Share this post


Link to post
Share on other sites

is there are reason you turned excel safe output off and then proceeded to use excel? Maybe, so you can use tabs for the delimiter? if so, again, why?

Edited by surfalot

Share this post


Link to post
Share on other sites

Hi!

 

I am still having a problem with adding two category fields (category heading title and category description) into the EasyPopulate source code. Until now I have achieved that these two field are properly downloaded, but I am not able to upload any information for the fields. I receive the following sql error:

1062 - Duplicate entry '44-2' for key 1

INSERT INTO categories_description ( categories_id, language_id, categories_description ) VALUES ( 44, '2', 'Kategoriebeschreibung!!! Hoffe, jetzt klappt\'s endlich!' )

 

The concerned part is found inside this code:

            // if the categories names are set then try to update them
		foreach ($languages as $key => $lang){
		  $baselang_id = $lang['id'];
		  break;
		}
		// Überarbeiten!!! Für jede Kategorievariable eine eigene Schleife programmieren, für UPDATE und INSERT
           if ( isset( $filelayout['v_categories_name_1_' . $baselang_id] ) ){

	// start from the highest possible category and work our way down from the parent
               $v_categories_id = 0;
               $theparent_id = 0;
               for ( $categorylevel=EP_MAX_CATEGORIES+1; $categorylevel>0; $categorylevel-- ){
			  //foreach ($languages as $key => $lang){
            		$thiscategoryname = $v_categories_name[$categorylevel][$baselang_id];
                   if ( $thiscategoryname != ''){
                       // we found a category name in this field, look for database entry
                       $sql = "SELECT cat.categories_id
                           FROM ".TABLE_CATEGORIES." as cat, 
                                ".TABLE_CATEGORIES_DESCRIPTION." as des
                           WHERE
                               cat.categories_id = des.categories_id AND
                               des.language_id = " . $lang['id'] . " AND
                               cat.parent_id = " . $theparent_id . " AND
                               des.categories_name like '" . tep_db_input($thiscategoryname) . "'";
                       $result = tep_db_query($sql);
                       $row =  tep_db_fetch_array($result);

                       if ( $row != '' ){
                           // we have an existing category, update image and date
						foreach( $row as $item ){
                               $thiscategoryid = $item;
                           }
                           $query = "UPDATE ".TABLE_CATEGORIES."
                                     SET 
                                       categories_image='".tep_db_input($v_categories_image[$categorylevel])."', 
                                       last_modified = '".date("Y-m-d H:i:s")."'
                                     WHERE 
                                       categories_id = '".$row['categories_id']."'
                                     LIMIT 1";

                           tep_db_query($query);
                       } else {
                           // Überarbeiten
		// "$thiscategoryid," instead of "$max_category_id,"
                           $sql = "SELECT MAX( categories_id) max FROM ".TABLE_CATEGORIES;
                           $result = tep_db_query($sql);
                           $row =  tep_db_fetch_array($result);
                           $max_category_id = $row['max']+1;
                           if (!is_numeric($max_category_id) ){
                               $max_category_id=1;
                           }
		      // Anstatt "$max_category_id," wurde "$thiscategoryid," eingesetzt
                           $sql = "INSERT INTO ".TABLE_CATEGORIES." (
                                       categories_id,
                                       parent_id,
                                       categories_image,
                                       sort_order,
                                       date_added,
                                       last_modified
                                  ) VALUES (
                                       $thiscategoryid,
                                       $theparent_id,
                                       '".tep_db_input($v_categories_image[$categorylevel])."',
                                       0,
                                       '".date("Y-m-d H:i:s")."',
                                       '".date("Y-m-d H:i:s")."'
                                  )";
                           $result = tep_db_query($sql);
                           foreach ($languages as $key => $lang){
                               // "$thiscategoryid," instead of "$max_category_id,"
			$sql = "INSERT INTO ".TABLE_CATEGORIES_DESCRIPTION." (
                                               categories_id,
                                               language_id,
                                               categories_name,
					categories_heading_title,
					categories_description
                                      ) VALUES (
                                               $thiscategoryid,
                                               '".$lang['id']."',
                                               '".(!empty($v_categories_name[$categorylevel][$lang['id']])?tep_db_input($v_categories_name[$categorylevel][$lang['id']]):'')."',
					)";
                               tep_db_query($sql);
                           }

                           $thiscategoryid = $max_category_id;
                       }
                       // the current catid is the next level's parent
                       $theparent_id = $thiscategoryid;
                       $v_categories_id = $thiscategoryid; // keep setting this, we need the lowest level category ID later
                   }
			 // }
               }
           }
	// categories_heading_title
	// if the categories heading titles are set then try to update them
		foreach ($languages as $key => $lang){
		  $baselang_id = $lang['id'];
		  break;
		}
		// Überarbeiten!!! Für jede Kategorievariable eine eigene Schleife programmieren, für UPDATE und INSERT
           if ( isset( $filelayout['v_categories_heading_title_1_' . $baselang_id] ) ){

	// start from the highest possible category and work our way down from the parent
               $v_categories_id = 0;
               $theparent_id = 0;
               for ( $categorylevel=EP_MAX_CATEGORIES+1; $categorylevel>0; $categorylevel-- ){
			  //foreach ($languages as $key => $lang){
		$thiscategoryheading_title = $v_categories_heading_title[$categorylevel][$baselang_id];
                   if ( $thiscategoryheading_title != ''){
                       // we found a category heading title in this field, look for database entry
                       $sql = "SELECT cat.categories_id
                           FROM ".TABLE_CATEGORIES." as cat, 
                                ".TABLE_CATEGORIES_DESCRIPTION." as des
                           WHERE
                               cat.categories_id = des.categories_id AND
                               des.language_id = " . $lang['id'] . " AND
                               cat.parent_id = " . $theparent_id . " AND
                               des.categories_heading_title like '" . tep_db_input($thiscategoryheading_title) . "'";
                       $result = tep_db_query($sql);
                       $row =  tep_db_fetch_array($result);

                       if ( $row != '' ){
                           /* // we have an existing category, update image and date
						foreach( $row as $item ){
                               $thiscategoryid = $item;
                           }
                           $query = "UPDATE ".TABLE_CATEGORIES."
                                     SET 
                                       categories_image='".tep_db_input($v_categories_image[$categorylevel])."', 
                                       last_modified = '".date("Y-m-d H:i:s")."'
                                     WHERE 
                                       categories_id = '".$row['categories_id']."'
                                     LIMIT 1";

                           tep_db_query($query); */
                       /*} else {
		// "$thiscategoryid," instead of "$max_category_id,"
                           $sql = "SELECT MAX( categories_id) max FROM ".TABLE_CATEGORIES;
                           $result = tep_db_query($sql);
                           $row =  tep_db_fetch_array($result);
                           $max_category_id = $row['max']+1;
                           if (!is_numeric($max_category_id) ){
                               $max_category_id=1;
                           }*/

                           foreach ($languages as $key => $lang){
                               // "$thiscategoryid," instead of "$max_category_id,"
			$sql = "INSERT INTO ".TABLE_CATEGORIES_DESCRIPTION." (
                                               categories_id,
                                               language_id,
					categories_heading_title,
                                      ) VALUES (
                                               $thiscategoryid,
                                               '".$lang['id']."',
					'".(!empty($v_categories_heading_title[$categorylevel][$lang['id']])?tep_db_input($v_categories_heading_title[$categorylevel][$lang['id']]):'')."'
					)";
                               tep_db_query($sql);
                           }

                           $thiscategoryid = $max_category_id;
                       }
                       // the current catid is the next level's parent
                       $theparent_id = $thiscategoryid;
                       $v_categories_id = $thiscategoryid; // keep setting this, we need the lowest level category ID later
                   }
			 // }
               }
           }
		// categories_description!!!!
		// if the categories description are set then try to update them
		foreach ($languages as $key => $lang){
		  $baselang_id = $lang['id'];
		  break;
		}
		// Überarbeiten!!! Für jede Kategorievariable eine eigene Schleife programmieren, für UPDATE und INSERT
           if ( isset( $filelayout['v_categories_description_1_' . $baselang_id] ) ){

	// start from the highest possible category and work our way down from the parent
               $v_categories_id = 0;
               $theparent_id = 0;
               for ( $categorylevel=EP_MAX_CATEGORIES+1; $categorylevel>0; $categorylevel-- ){
			  //foreach ($languages as $key => $lang){
		$thiscategorydescription = $v_categories_description[$categorylevel][$baselang_id];
                   if ( $thiscategorydescription != ''){
                       // we found a category description in this field, look for database entry
                       $sql = "SELECT cat.categories_id
                           FROM ".TABLE_CATEGORIES." as cat, 
                                ".TABLE_CATEGORIES_DESCRIPTION." as des
                           WHERE
                               cat.categories_id = des.categories_id AND
                               des.language_id = " . $lang['id'] . " AND
                               cat.parent_id = " . $theparent_id . " AND
			des.categories_description like '" . tep_db_input($thiscategorydescription) . "'";
                       $result = tep_db_query($sql);
                       $row =  tep_db_fetch_array($result);

                       if ( $row != '' ){
                           /* // we have an existing category, update image and date
						foreach( $row as $item ){
                               $thiscategoryid = $item;
                           }
                           $query = "UPDATE ".TABLE_CATEGORIES."
                                     SET 
                                       categories_image='".tep_db_input($v_categories_image[$categorylevel])."', 
                                       last_modified = '".date("Y-m-d H:i:s")."'
                                     WHERE 
                                       categories_id = '".$row['categories_id']."'
                                     LIMIT 1";

                           tep_db_query($query); 
                       } else {
		// "$thiscategoryid," instead of "$max_category_id,"
                           $sql = "SELECT MAX( categories_id) max FROM ".TABLE_CATEGORIES;
                           $result = tep_db_query($sql);
                           $row =  tep_db_fetch_array($result);
                           $max_category_id = $row['max']+1;
                           if (!is_numeric($max_category_id) ){
                               $max_category_id=1;
                           }*/
		      // Anstatt "$max_category_id," wurde "$thiscategoryid," eingesetzt

                           foreach ($languages as $key => $lang){
                               // "$thiscategoryid," instead of "$max_category_id,"
			$sql = "INSERT INTO ".TABLE_CATEGORIES_DESCRIPTION." (
                                               categories_id,
                                               language_id,
					categories_description
                                      ) VALUES (
                                               $thiscategoryid,
                                               '".$lang['id']."',
					'".(!empty($v_categories_description[$categorylevel][$lang['id']])?tep_db_input($v_categories_description[$categorylevel][$lang['id']]):'')."'
					)";
                               tep_db_query($sql);
                           }

                           $thiscategoryid = $max_category_id;
                       }
                       // the current catid is the next level's parent
                       $theparent_id = $thiscategoryid;
                       $v_categories_id = $thiscategoryid; // keep setting this, we need the lowest level category ID later
                   }
			 // }
               }
           }	

 

I really tried to fix it myself, but as I am not a php crack, I don't know where I shall start searching for the solution. Maybe somebody here know the way to the solution.

 

The whole easypopulate.php can be found here.

 

Thanks a lot!

 

Daniel

Share this post


Link to post
Share on other sites

Yes, when i used the excel-save-output i got in the "model-number" section DATES instead of NUMBERS.

 

Changing the cell-format didnt help, so i switched the excel-save off and opened the .txt-files which ask me prior opening which cell-format i want.

 

That worked to get rid of the Dates but unfortunately it brought the problem with the """".

 

Maybe its an option to do it in the excel-save method, change the file to txt, edit the file and change it back to .csv??

Share this post


Link to post
Share on other sites
Yes, when i used the excel-save-output i got in the "model-number" section DATES instead of NUMBERS.

 

Changing the cell-format didnt help, so i switched the excel-save off and opened the .txt-files which ask me prior opening which cell-format i want.

 

That worked to get rid of the Dates but unfortunately it brought the problem with the """".

 

Maybe its an option to do it in the excel-save method, change the file to txt, edit the file and change it back to .csv??

 

what you are reporting does seem to be a bug in the way EP handles the excel exports strings with quotes.

 

either way you are looking at using the old fashioned importing into excel. You can get the same import control with the CSV files also. In excel XP there is a Data dropdown menu. Use the import/export from that menu and you can import the CSV and specify the model column (and date columns) as text. The is the last screen in the import process. Then excel won't mess up the csv columns.

 

CSV has better control (and more tollerant) of the special characters.

 

this may fix it for the setting you are using currently.

 

find in easypopulate.php near line 1190 of v2.76h.

	  $newreaded = str_replace('"EOREOR"', 'EOREOR', $newreaded);
   $readed = explode( $ep_separator . 'EOREOR',$newreaded);

 

replace wth

	  $newreaded = str_replace('"EOREOR"', 'EOREOR', $newreaded);
   $newreaded = str_replace('""', '"', $newreaded);
   $readed = explode( $ep_separator . 'EOREOR',$newreaded);

Edited by surfalot

Share this post


Link to post
Share on other sites

I just checked again: Its not the Date/Number-thing that went wrong. Excel opening .csv-files seems to use the tab/delimiter as default, so there is one big data-mess. Maybe i change the settings in the easypopulate.php to tab/delimiter as standard for the excel-save-mode.

Share this post


Link to post
Share on other sites

THX!! It works now!

 

Now i just have to find a way of getting rid of those """"""""""""""""" in my product-descriptions..... :rolleyes:

Share this post


Link to post
Share on other sites
don't know where you are getting the default of 1000 for quantity. that doesn't exist in EP.

 

these are the two places in the code you are looking for...

			if (ltrim(rtrim($v_products_quantity)) == '') {
			$v_products_quantity = 1;
		}

 

 

			// default the stock if they spec'd it or if it's blank
		if (isset($v_status_current)){
		  $v_db_status = strval($v_status_current); // default to current value
		} else {
		  $v_db_status = '1'; // default to active
		}

 

Hi Todd, thanks for your reply, but must said that is an error on de EP Documentation:

EP Documentacion-> Support -> Description of Columns ->

'v_products_quantity' Number of the products you have on hand. If left blank, it defaults to 1000

 

But just like you said, $v_products_quantity is set to 1 in the code, soy thanks fot both solutions!

 

Y thanks for your TIME!!!

Oscar

Share this post


Link to post
Share on other sites

:blush: I'll try to update that in the next version. That must have been left over from years ago.

 

BTW, thanks for actually reading the docs, you are a rare one!

Share this post


Link to post
Share on other sites

I was wondering if any one had successfully added a colum for the the EP to download?

 

I changed the code in admin/easypopulate.php to read:

 

$custom_fields[TABLE_PRODUCTS] = array( 'products_retail_price' => 'RRP' );
$custom_fields[TABLE_PRODUCTS_DESCRIPTION] = array( 'products_retail_price' => 'RRP' );

 

with the aim of the script downloading the RRP field as well as the price field from the catalogue. The RRP field was added via EZ Fields contibution.

 

When i uploaded the file it downloaded and created the csv with no problems at all. However the RRP column was empty and a lot of the catalogue does have a price in there.

 

I then added one RRP on th CSV in order to upload to see if worked but all i got when trying to split the file was:

 

Warning: fopen(/home/raunchyr/public_html/temp/EP2009Mar31-1503.csv) [function.fopen]: failed to open stream: No such file or directory in /home/******/public_html/admin/easypopulate.php on line 1228

Warning: fgets(): supplied argument is not a valid stream resource in /home/******/public_html/admin/easypopulate.php on line 1233
Creating file EP_Split1.csv ... 
Warning: fgets(): supplied argument is not a valid stream resource in /home/******/public_html/admin/easypopulate.php on line 1243
Added 0 records and closing file...


Warning: fclose(): supplied argument is not a valid stream resource in /home/raunchyr/public_html/admin/easypopulate.php on line 1270
You can download your split files in the Tools/Files under /home/******/public_html/temp/

 

Have i done something wrong?


Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Share this post


Link to post
Share on other sites

Product attributes problems - please help!!

I installed EP and uploaded a file from anothe shopping cart. Everything is spot on except when I go to products attributes to amend those items with variations in size etc, none of the products appear for editing. Even if I add a new product manually via admin I cannot add any attributes. Anyone any ideas??

Greatly appreciated,

Michelle.

Share this post


Link to post
Share on other sites
I was wondering if any one had successfully added a colum for the the EP to download?

 

I changed the code in admin/easypopulate.php to read:

 

$custom_fields[TABLE_PRODUCTS] = array( 'products_retail_price' => 'RRP' );
$custom_fields[TABLE_PRODUCTS_DESCRIPTION] = array( 'products_retail_price' => 'RRP' );

 

with the aim of the script downloading the RRP field as well as the price field from the catalogue. The RRP field was added via EZ Fields contibution.

 

When i uploaded the file it downloaded and created the csv with no problems at all. However the RRP column was empty and a lot of the catalogue does have a price in there.

 

I then added one RRP on th CSV in order to upload to see if worked but all i got when trying to split the file was:

 

Warning: fopen(/home/raunchyr/public_html/temp/EP2009Mar31-1503.csv) [function.fopen]: failed to open stream: No such file or directory in /home/******/public_html/admin/easypopulate.php on line 1228

Warning: fgets(): supplied argument is not a valid stream resource in /home/******/public_html/admin/easypopulate.php on line 1233
Creating file EP_Split1.csv ... 
Warning: fgets(): supplied argument is not a valid stream resource in /home/******/public_html/admin/easypopulate.php on line 1243
Added 0 records and closing file...


Warning: fclose(): supplied argument is not a valid stream resource in /home/raunchyr/public_html/admin/easypopulate.php on line 1270
You can download your split files in the Tools/Files under /home/******/public_html/temp/

 

Have i done something wrong?

why add your field to both tables? the retail price field is probably only in the products table. Leave the products_description table setting as it was.

If it was your intention to split the file, you should review the temp directory setup instructions in the docs again. Doesn't look like it was setup correctly.

if it wasn't your intention to split the file, you are using the wrong upload field on the easy populate page.

Share this post


Link to post
Share on other sites

Hi,

 

Hope for a little help - I can't figure out, whats wrong.

 

When I try to export my from Easy Populate I get the following error:

 

1054 - Unknown column 'p.products_subimage1' in 'field list'

 

SELECT p.products_id as v_products_id, p.products_model as v_products_model, p.products_image as v_products_image, p.products_subimage1 as v_products_subimage1, p.products_subimage2 as v_products_subimage2, p.products_subimage3 as v_products_subimage3, p.products_subimage4 as v_products_subimage4, p.products_subimage5 as v_products_subimage5, p.products_subimage6 as v_products_subimage6, p.products_price as v_products_price, p.products_weight as v_products_weight, p.products_date_available as v_date_avail, p.products_date_added as v_date_added, p.products_tax_class_id as v_tax_class_id, p.products_quantity as v_products_quantity, p.manufacturers_id as v_manufacturers_id, subc.categories_id as v_categories_id, p.products_status as v_status FROM products as p, categories as subc, products_to_categories as ptoc WHERE p.products_id = ptoc.products_id AND ptoc.categories_id = subc.categories_id

 

[TEP STOP]

Share this post


Link to post
Share on other sites
Hi,

 

Hope for a little help - I can't figure out, whats wrong.

 

When I try to export my from Easy Populate I get the following error:

 

1054 - Unknown column 'p.products_subimage1' in 'field list'

 

SELECT p.products_id as v_products_id, p.products_model as v_products_model, p.products_image as v_products_image, p.products_subimage1 as v_products_subimage1, p.products_subimage2 as v_products_subimage2, p.products_subimage3 as v_products_subimage3, p.products_subimage4 as v_products_subimage4, p.products_subimage5 as v_products_subimage5, p.products_subimage6 as v_products_subimage6, p.products_price as v_products_price, p.products_weight as v_products_weight, p.products_date_available as v_date_avail, p.products_date_added as v_date_added, p.products_tax_class_id as v_tax_class_id, p.products_quantity as v_products_quantity, p.manufacturers_id as v_manufacturers_id, subc.categories_id as v_categories_id, p.products_status as v_status FROM products as p, categories as subc, products_to_categories as ptoc WHERE p.products_id = ptoc.products_id AND ptoc.categories_id = subc.categories_id

 

[TEP STOP]

appears as though you have an additional images feature in EP turned on that doesn't apply to your situation. I'd be able to tell better what is going on if you looked at the "how to ask for help" part of the docs and posted a little more info about your situation.

Share this post


Link to post
Share on other sites

Hi,

 

hope you can help.

 

I have installed this module 2.76g as recommended, having looked around and cant find my answer to the issue I have.

 

 

I dont get my attributes to assign to my products when I upload, when I download the EP file I get all my products listed with all the product attributes not the ones relevant to the products (unless I custom download and switch off the attributes and just get the data minus the attributes).

 

Okay so am I doing anything wrong uploading as things dont link together (products and attributes), although the attributes I have in the csv file do get loaded into the relvant tables other than the one that actually links the attributes to the products.

 

So If I am not doing anyuthing wrong, I need to find a way to assign the products to the product attributes, in the same sort of way I guess to how products get assigned to categories via products_id and categories_id in the table products_to_categories.

 

was thinking that product attributes_id and products_id in table product_attributes links with products_id in the products table already.

 

Hope someone can point me in the right direction, I dont mind if I having to do two uploads, one for the normal products tuff and one for the products to product attributes.

 

Just thinking that if I am not doing anything wrong how easy would it be to say:-

 

upload the products

upload the attributes

upload the file that connects the attributes to products

 

Please help


Getting better with mods but no programmer am I.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×