Forums / All Other Contributions/Addons / Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

Started by lankeeyankee on 21 Dec 2008, 6:31 AM · Views: 83,717

Results 301 to 318 of 318
24 Jul 2012, 7:12 PM
#301
ghatien avatar

ghatien

New Zenner

Join Date:
Jul 2012
Posts:
11
Plugin Contributions:
0

Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

lankeeyankee:

In looking at the sql values, the status is being set to 100 and then the rest of your values are off after that. You are inserting 12 values into 11 fields. So somewhere you missed an edit or entered something incorrectly. Go back and check, because it's not products.quantity_order_units in the db table, it's products_quantity_order_units and I bet that was the value of 100 that was trying to be inserted.

For anyone else that comes across this post that is having similar problems, it always helps to look closely at the error message being returned. In this case, you can count that there are 12 values being inserted into 11 fields and can trace which one is throwing the error which narrows down what to look for.

Thanks for the quick reply...
I don't understand why it is getting the status value at the 4th position when, on txt file, it's on the last position, just before the EOREOR. In this upload, that gave this error, the status should be the last value "1".

Before the changes EasyPopulate runs just fine... Before the changes the upload file worked by this order:
v_products_model;v_products_image;v_products_name_2;v_products_description_2;v_products_url_1;v_products_price;v_products_weight;v_date_avail;v_date_added;v_products_quantity;v_manufacturers_name;v_categories_name_1;v_categories_name_2;v_categories_name_3;v_categories_name_4;v_categories_name_5;v_categories_name_6;v_categories_name_7;v_tax_class_title;v_status;EOREOR

I inserted the v_products_quantity_order_units after price and beforeweight.

According to your guidelines, this are the changes I made on the easypopulate.php file:

$header_array = array(
'v_specials_price' => $iii++,
'v_specials_date_avail' => $iii++,
'v_specials_expires_date' => $iii++,
'v_products_price' => $iii++,
'v_products_quantity_order_units' => $iii++,
'v_products_weight' => $iii++,
'v_date_avail' => $iii++,
'v_date_added' => $iii++,
'v_products_quantity' => $iii++,
);

$filelayout_sql = "SELECT
p.products_id as v_products_id,
p.products_model as v_products_model,
p.products_image as v_products_image,
p.products_price as v_products_price,
p.products_quantity_order_units as v_products_quantity_order_units,
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

$filelayout_sql = "SELECT
p.products_id as v_products_id,
p.products_model as v_products_model,
p.products_image as v_products_image,
p.products_price as v_products_price,
p.products_quantity_order_units as v_products_quantity_order_units,
p.products_weight as v_products_weight,
p.products_date_added as v_date_added,
p.products_date_available as v_date_avail,
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
FROM

$default_these = array(
	'v_products_image',
	// redundant image mods removed
	'v_categories_id',
	'v_products_price',
	**'v_products_quantity_order_units',**
	'v_products_quantity',
	'v_products_weight',
	'v_date_added',
	'v_date_avail',
	'v_instock',
	'v_tax_class_title',
	'v_manufacturers_name',
	'v_manufacturers_id',
	'v_products_dim_type',
	'v_products_length',
	'v_products_width',
	'v_products_height'

// now do a query to get the record's current contents
$sql = "SELECT
p.products_id as v_products_id,
p.products_model as v_products_model,
p.products_image as v_products_image,
p.products_price as v_products_price,
p.products_quantity_order_units as v_products_quantity_order_units,
p.products_weight as v_products_weight,
p.products_date_added as v_date_added,
p.products_date_available as v_date_avail,
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
FROM

// redundant image mods removed
$query .="'".zen_db_input($v_products_model)."',
'".zen_db_input($v_products_price)."',
'".zen_db_input($v_products_quantity_order_units)."',
'".zen_db_input($v_db_status)."',
CURRENT_TIMESTAMP,
$v_date_added,
$v_date_avail,
'".zen_db_input($v_tax_class_id)."',
'".zen_db_input($v_products_weight)."',
'".zen_db_input($v_products_quantity)."',
'$v_manufacturer_id')
";

$query = 'UPDATE '.TABLE_PRODUCTS.'
SET
products_price="'.zen_db_input($v_products_price).
'", products_quantity_order_units="'.zen_db_input($v_products_quantity_order_units) .
'" ,products_image="'.zen_db_input($v_products_image);
// redundant image mods removed
$query .= '", products_weight="'.zen_db_input($v_products_weight) .
'", products_tax_class_id="'.zen_db_input($v_tax_class_id) .
'", products_date_available= ' . $v_date_avail .
', products_date_added= ' . $v_date_added .
', products_last_modified=CURRENT_TIMESTAMP' .
', products_quantity="' . zen_db_input($v_products_quantity) .
'" ,manufacturers_id=' . $v_manufacturer_id .

I also must say that, for existing products on the database, he had the products_quantity_order_units correctly... It just don't let me create/add new products...

25 Jul 2012, 3:47 AM
#302
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

Have you been able to successfully insert any other fields from the products table? What version of EP are you using? Please attach a zip of admin/easypopulate.php here if you are using 1.2.5.4 and I'll have a look at it. If you are not using this version I can't help you since this is the only version I have ever used or needed and my changes in this thread likely won't work with other versions.


Zen Cart and it's community are the best!!

25 Jul 2012, 4:09 AM
#303
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

Actually, in looking at your edits they don't match up with 1.2.5.4 line edits when I compare the edits from the file I posted in the first post. There was a mistake in my original post and it's 11 areas not 7 where the new lines are added. I apologize for the confusion. Please recheck your file to make sure you have added it 11 times and not 7. If it's easier, you can also search by msrp to see the different edits.

If a moderator sees this, can you please change my error in post 1 from 7 edits to 11 edits to avoid further confusion. I am sorry for the mistake!


Zen Cart and it's community are the best!!

25 Jul 2012, 10:39 AM
#304
ghatien avatar

ghatien

New Zenner

Join Date:
Jul 2012
Posts:
11
Plugin Contributions:
0

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

lankeeyankee:

Actually, in looking at your edits they don't match up with 1.2.5.4 line edits when I compare the edits from the file I posted in the first post. There was a mistake in my original post and it's 11 areas not 7 where the new lines are added. I apologize for the confusion. Please recheck your file to make sure you have added it 11 times and not 7. If it's easier, you can also search by msrp to see the different edits.

If a moderator sees this, can you please change my error in post 1 from 7 edits to 11 edits to avoid further confusion. I am sorry for the mistake!

I'm using 1.2.5.4 and added 7 lines... I've been checking the file and v_products_weight only appears 7 times, so where should i add the remaining 4 lines?

Attached is the original easypopulate(before the changes) named as easypopulatebackup.php and the file after the changes named as easypopulate.php. I'm senting also the txt file that I use for upload. the only difference is that, before the changes i didn't had the column v_products_quantity_order_units

If you could take a look it would be a great help.

25 Jul 2012, 7:27 PM
#306
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

Like I said in my last post, search using msrp insead of weight and you will see all 11 edits. I apologize for the error in my original post and the time wasted and any aggravation my error has caused. Hopefully a moderator will see it and change it from 7 to 11.


Zen Cart and it's community are the best!!

28 Jul 2012, 12:58 PM
#307
ghatien avatar

ghatien

New Zenner

Join Date:
Jul 2012
Posts:
11
Plugin Contributions:
0

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

Hi lankeeyankee,

sory once again but it's seems there is no msrp to search on the easypopulate.php file. on my last post I've attached the file if you want to check by yourself...

29 Jul 2012, 6:01 PM
#308
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

ghatien:

Hi lankeeyankee,

sory once again but it's seems there is no msrp to search on the easypopulate.php file. on my last post I've attached the file if you want to check by yourself...
I just double checked the file in the first post and there is msrp in there. Not sure why you can't find it, but it's there. Maybe you are searching by whole world only? The first entry is on line 387. Or you can search by map_price. Either way, follow those and you will see the extra 4 fields you need to enter.


Zen Cart and it's community are the best!!

30 Jul 2012, 7:46 PM
#309
ghatien avatar

ghatien

New Zenner

Join Date:
Jul 2012
Posts:
11
Plugin Contributions:
0

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

Hi again,

I really am very sory and very grateful for all your help but I'm just feeling as a kid on first day of school...

I searched for the whole word MSRP (just like that ctr+f + "msrp") because i assume that it was that. So, what does MSRP stands for? Also i searched for map_price and once again i'm not finding (searching again for the whole word map_price). Please assume that I am kid on first day of school because i really don't understand nothiong about this...

Also, on my 387th line this is there "'v_products_price' => $iii++,"... and this appears about 20 times on the file...

Thanks again...

31 Jul 2012, 1:57 AM
#310
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

ghatien:

Hi again,

I really am very sory and very grateful for all your help but I'm just feeling as a kid on first day of school...

I searched for the whole word MSRP (just like that ctr+f + "msrp") because i assume that it was that. So, what does MSRP stands for? Also i searched for map_price and once again i'm not finding (searching again for the whole word map_price). Please assume that I am kid on first day of school because i really don't understand nothiong about this...

Also, on my 387th line this is there "'v_products_price' => $iii++,"... and this appears about 20 times on the file...

Thanks again...

Please refer to line 387 of the file i post one of this thread, not your file but the file in post one of this thread. It will show msrp. There you can copy and paste from that point forward. You should not be searching for the whole word only, but simply msrp since it is not a whole word but part of a string_of_words_like _this.


Zen Cart and it's community are the best!!

2 Dec 2012, 1:03 AM
#311
imacamper avatar

imacamper

New Zenner

Join Date:
Nov 2009
Posts:
50
Plugin Contributions:
0

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

Mike_Dean:

I've taken a complete clean ZC, cleaned all instances of easy populate from the phpmyadmin db and instead of using 1.2.5.4, I've installed 1.2.5.5.csv and this is what I get displayed on the admin screen when I chose EP from the Tools menu

. https://www.evoluted.net Layout: Manny . https://www.tenka.co.uk REQUIREMENTS ============ This script requires PHP and GD2 if you wish to use the thumbnail functionality. INSTRUCTIONS ============ 1) Unzip all files 2) Edit this file, making sure everything is setup as required. 3) Upload to server 4) ?????? 5) Profit! CONFIGURATION ============= Edit the variables in this section to make the script work as you require. Start Directory - To list the files contained within the current directory enter '.', otherwise enter the path to the directory you wish to list. The path must be relative to the current directory. / $startdir = DIR_FS_CATALOG . $tempdir; / Show Thumbnails? - Set to true if you wish to use the scripts auto-thumbnail generation capabilities. This requires that GD2 is installed. / $showthumbnails = true; / Show Directories - Do you want to make subdirectories available? If not set this to false / $showdirs = true; / Force downloads - Do you want to force people to download the files rather than viewing them in their browser? / $forcedownloads = false; / Hide Files - If you wish to hide certain files or directories then enter their details here. The values entered are matched against the file/directory names. If any part of the name matches what is entered below then it is now shown. / $hide = array( 'dlf', 'index.php', 'Thumbs', '.htaccess', '.htpasswd', 'fileList.php' ); / Show index files - if an index file is found in a directory to you want to display that rather than the listing output from this script? / $displayindex = false; / Allow uploads? - If enabled users will be able to upload files to any viewable directory. You should really only enable this if the area this script is in is already password protected. / $allowuploads = false; / Overwrite files - If a user uploads a file with the same name as an existing file do you want the existing file to be overwritten? / $overwrite = false; / Index files - The follow array contains all the index files that will be used if $displayindex (above) is set to true. Feel free to add, delete or alter these / $indexfiles = array ( 'index.html', 'index.htm', 'default.htm', 'default.html' ); / File Icons - If you want to add your own special file icons use this section below. Each entry relates to the extension of the given file, in the form => . These files must be located within the dlf directory. / $filetypes = array ( 'png' => 'jpg.gif', 'jpeg' => 'jpg.gif', 'bmp' => 'jpg.gif', 'jpg' => 'jpg.gif', 'gif' => 'gif.gif', 'zip' => 'archive.png', 'rar' => 'archive.png', 'exe' => 'exe.gif', 'setup' => 'setup.gif', 'txt' => 'text.png', 'htm' => 'html.gif', 'html' => 'html.gif', 'fla' => 'fla.gif', 'swf' => 'swf.gif', 'xls' => 'xls.gif', 'doc' => 'doc.gif', 'sig' => 'sig.gif', 'fh10' => 'fh10.gif', 'pdf' => 'pdf.gif', 'psd' => 'psd.gif', 'rm' => 'real.gif', 'mpg' => 'video.gif', 'mpeg' => 'video.gif', 'mov' => 'video2.gif', 'avi' => 'video.gif', 'eps' => 'eps.gif', 'gz' => 'archive.png', 'asc' => 'sig.gif', ); / That's it! You are now ready to upload this script to the server. Only edit what is below this line if you are sure that you know what you are doing! */ error_reporting(0); if(!function_exists('imagecreatetruecolor')) $showthumbnails = false; $leadon = $startdir; if($leadon=='.') $leadon = ''; if((substr($leadon, -1, 1)!='/') && $leadon!='') $leadon = $leadon . '/'; $startdir = $leadon; if($_GET['dir']) { //check this is okay. if(substr($_GET['dir'], -1, 1)!='/') { $_GET['dir'] = $_GET['dir'] . '/'; } $dirok = true; $dirnames = split('/', $_GET['dir']); for($di=0; $di<(sizeof($dirnames)-2)) { $dotdotdir = $dotdotdir . $dirnames[$di] . '/'; } if($dirnames[$di] == '..') { $dirok = false; } } if(substr($_GET['dir'], 0, 1)=='/') { $dirok = false; } if($dirok) { $leadon = $leadon . $_GET['dir']; } } if($_GET['download'] && $forcedownloads) { $file = str_replace('/', '', $_GET['download']); $file = str_replace('..', '', $file); if(file_exists($leadon . $file)) { header("Content-type: application/x-download"); header("Content-Length: ".filesize($leadon . $file)); header('Content-Disposition: attachment; filename="'.$file.'"'); readfile($leadon . $file); die(); } } $opendir = $leadon; if(!$leadon) $opendir = '.'; if(!file_exists($opendir)) { $opendir = '.'; $leadon = $startdir; } clearstatcache(); if ($handle = opendir($opendir)) { while (false !== ($file = readdir($handle))) { //first see if this file is required in the listing if ($file == "." || $file == "..") continue; $discard = false; for($hi=0;$hi
File
Size
Last Modified
'.$files[$i].''; $thumb2 = ' onmouseover="o('.$i.', ''.urlencode($leadon . $files[$i]).'');" onmouseout="f('.$i.');"'; } if($filetypes[$ext]) { $icon = $filetypes[$ext]; } $filename = $files[$i]; if(strlen($filename)>43) { $filename = substr($files[$i], 0, 40) . '...'; } $fileurl = $leadon . $files[$i]; if(!$forcedownloads) { $fileurl = $_SESSION['PHP_SELF'] . '?dir=' . urlencode($leadon) . '&download=' . urlencode($files[$i]); } $fileurl = "../".$tempdir.$files[$i]; ?>

<?=$files[$i];?> KB*

Zen Cart:: the art of e-commerce

I came across this thread since I was getting the same after installing EasyPopulate. After a lot of looking and testing, I found the problem went away when I started converting short codes (<?) to long codes (<?php). Then I finally figured out I needed to ensure short_opentag=On was set in my php.ini file.

Hopefully this will help someone else.

23 Apr 2013, 5:48 PM
#312
scottm4321 avatar

scottm4321

New Zenner

Join Date:
Feb 2013
Posts:
12
Plugin Contributions:
0

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

Does this modification also input the data into the table or does it just create a new field in the ez pop csv file? In made the mods and it did create the ez pop fields but no data was inserted into the table.

Thanks!

23 Apr 2013, 7:49 PM
#313
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

scottm4321:

Does this modification also input the data into the table or does it just create a new field in the ez pop csv file? In made the mods and it did create the ez pop fields but no data was inserted into the table.

Thanks!
You have to create the new fields in the products table, the script does not do that for you. Once you have created the new fields in the db you will be able to change the data in those fields with the script.


Zen Cart and it's community are the best!!

30 Apr 2013, 4:25 AM
#314
chrysalid avatar

chrysalid

New Zenner

Join Date:
Aug 2012
Posts:
19
Plugin Contributions:
0

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

Hello,
I am using EasyPopulate 4.0 and it works great :)
Judging by this thread title, I assume I can use EasyPopulate to add fields?
The version doesn't match - but I assume there is an updated mod?
Help!
Thanks :)
Amber

30 Apr 2013, 8:37 AM
#315
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

chrysalid:

Hello,
I am using EasyPopulate 4.0 and it works great :)
Judging by this thread title, I assume I can use EasyPopulate to add fields?
The version doesn't match - but I assume there is an updated mod?
Help!
Thanks :)
Amber

You do not use this tutorial for EP4
EP4 has an admin setting where you can add custom fields for your csv.

7 May 2015, 1:02 PM
#316
cdgl avatar

cdgl

New Zenner

Join Date:
May 2015
Location:
Desio
Posts:
9
Plugin Contributions:
0

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

Design75:

You do not use this tutorial for EP4
EP4 has an admin setting where you can add custom fields for your csv.

:no:

Avviso Server Upload Failure could not be uploaded due to a server issue. Check that the file size being uploaded does not exceed the maximum for your PHP server configuration in php.ini, and file uploads are permitted. Contact your web host if you cannot resolve this issue.

Easy Populate advanced 3.0.3

Zencart 1.5.0 installated

????????????

8 May 2015, 5:16 PM
#317
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

CDGL:

:no:

Avviso Server Upload Failure could not be uploaded due to a server issue. Check that the file size being uploaded does not exceed the maximum for your PHP server configuration in php.ini, and file uploads are permitted. Contact your web host if you cannot resolve this issue.

Easy Populate advanced 3.0.3

Zencart 1.5.0 installated

????????????

Like the message is telling you, either the file size you are uploading is too big or you don't have proper permissions on the server to upload files. I would contact your host about this. Also, this is the wrong thread for support for a different version and a different issue than what this thread is about.


Zen Cart and it's community are the best!!

20 Jun 2015, 10:24 AM
#318
cdgl avatar

cdgl

New Zenner

Join Date:
May 2015
Location:
Desio
Posts:
9
Plugin Contributions:
0

Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

Hi

A person technique Zencart to configure the php.ini where is it ?.

Regards