Jump to content
VJ

Easy Populate & Products Attributes

Recommended Posts

Hi!

I have some problem with EASY POPULATE and PRODUCT EXTRA FIELD.

When I try to update PRODUCT EXTRA FIELD with EASY POPULATE it imports the fields into the PRODUCT EXTRA FIELD table but sets the product id as 0 (zero) on all products and obviously doesn't link it to the necessary products.

 

I have set extra fields to true in the EASY POPULATE file.

 

What can be wrong?

 

What version are you using?

 

Did you read the documentation on EXTRA FIELDS CONTRIBUTION?

 

Post a couple of lines of the file you are trying to import.


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites
What version are you using?

 

Did you read the documentation on EXTRA FIELDS CONTRIBUTION?

 

Post a couple of lines of the file you are trying to import.

Hi!

 

I use:

Easy populate 2.76g-MS2

osCommerce v2.2 RC 2a

Product Extra Fields 2.0j

 

My CSV import file:

 

v_products_model v_products_extra_fields_name v_products_extra_fields_id v_products_extra_fields_value EOREOR

100 Capacity 1 1100mAh EOREOR

100 Voltage 2 9.6v EOREOR

100 Dimensions 3 100mm x 100mm x 100mm EOREOR

 

This is the result in the table product_to_product_extra_fields:

 

products_id products_extra_fields_id products_extra_fields_value

0 1 1100mAh

0 2 9.6v

0 3 100mm x 100mm x 100mm

 

I have read the documention, Product Extra Fields and 2.76f-MS2 r1, but I can see that this is implemented in Easy populate version 2.76g-MS2. I have just changed Product Extra Fields to true in the configuration variables.

Share this post


Link to post
Share on other sites

so the products_model of the product you wish to change is "100". That's not the products_id for the item is it?

Share this post


Link to post
Share on other sites
Need some advice, I am trying to add 10 test products, but whenever I upload them using EP, it seems to add 17 products instead. The 10 test products have attributes and the 3 of them have a comma in the title and description, will this cause problems?, I am using MS Excel 2003. I have created a "complete" template, editted it and then saved it as a ms-dos csv and also as a csv file format, but still it always gives me 17 products.

so your output is something different from this: (which worked good for me, 10 prods)

| EM7766 | Long sleev | Long sleev | | 7766.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | 12 | Red | 0 | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7762 | Long sleev | Long sleev | | 7762.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | 12 | Red | 0 | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7760 | Off the sh | Off the sh | | 7760.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | 12 | Red | 0 | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7760Q | Off the sh | Off the sh | | 7760Q.jpg | 28.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 5 | Queen | 0 | Taxable Go | Active !New Product!

| EM7759 | Lace bra t | Lace bra t | | 7759.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7756 | Lace thong | Lace thong | | 7756.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7775 | Lycra stra | Lycra stra | | 7775.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7804 | Bustier, g | Bustier, g | | 7804.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7804Q | Bustier, g | Bustier, g | | 7804Q.jpg | 28.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 5 | Queen | 0 | Taxable Go | Active !New Product!

| EM7805 | Cami set, | Cami top, | | 7805.jpg | 26.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

 

what does yours look like?

 

you might try this setting. it's an alternate parcer for the CSV data. Some versions of PHP 4 have had problems in the built in PHP CSV parcer.

look for this in the easypopulate.php setttings:

define ('EP_EXCEL_SAFE_OUTPUT_ALT_PARCE', false);

change to true.

Edited by surfalot

Share this post


Link to post
Share on other sites
so the products_model of the product you wish to change is "100". That's not the products_id for the item is it?

yes the the products_model is "100". It is not the products_id.

Share this post


Link to post
Share on other sites
yes the the products_model is "100". It is not the products_id.

 

my guess is one of two things. Either the model column in your import file has an extra space or the model number in the product's database entry has a space.

 

Have you tried a comma separated file instead of the tab separated (I assume) you are using? This is one of those cases where I can't tell if the import data is good because it's a tabbed file posted through html.

 

if you don't have another model number with "100" in it, we can try this change to the script (only for this test, don't leave it like this).

 

find in easypopulate.php:

		$sql = "SELECT p.products_id as v_products_id FROM ".TABLE_PRODUCTS." as p WHERE p.products_model = '" . $v_products_model . "'";

 

change to:

		$sql = "SELECT p.products_id as v_products_id FROM ".TABLE_PRODUCTS." as p WHERE TRIM(p.products_model) = '" . trim($v_products_model) . "'";

 

if that gets the correct products_id in the extra fields table, it would confirm the suspicion.

Edited by surfalot

Share this post


Link to post
Share on other sites
Hi,

 

i m looking for a way to include the contrib Quantity Price Breaks Per Product ndid anybody done this before? i so what is to do>?

 

thanks

 

alfred

take a look at the list on the contribution page. There are several versions (like 1.90) that support it. Those older versions have issues with data containing quotes, tabs, and commas though.

Share this post


Link to post
Share on other sites
my guess is one of two things. Either the model column in your import file has an extra space or the model number in the product's database entry has a space.

 

Have you tried a comma separated file instead of the tab separated (I assume) you are using? This is one of those cases where I can't tell if the import data is good because it's a tabbed file posted through html.

 

if you don't have another model number with "100" in it, we can try this change to the script (only for this test, don't leave it like this).

 

find in easypopulate.php:

		$sql = "SELECT p.products_id as v_products_id FROM ".TABLE_PRODUCTS." as p WHERE p.products_model = '" . $v_products_model . "'";

 

change to:

		$sql = "SELECT p.products_id as v_products_id FROM ".TABLE_PRODUCTS." as p WHERE TRIM(p.products_model) = '" . trim($v_products_model) . "'";

 

if that gets the correct products_id in the extra fields table, it would confirm the suspicion.

 

I have used a comma separated file. I have tried to change the script easypopulate.php as you suggested but it still doesn´t work. All products_id is still 0 in the products_to_products_extra_fields table.

Share this post


Link to post
Share on other sites
I have used a comma separated file. I have tried to change the script easypopulate.php as you suggested but it still doesn´t work. All products_id is still 0 in the products_to_products_extra_fields table.

run this in your phpMyAdmin -> SQL Tab and tell me how many rows you get returned:

 

select * from products where products_model = '100';

Share this post


Link to post
Share on other sites
run this in your phpMyAdmin -> SQL Tab and tell me how many rows you get returned:

 

select * from products where products_model = '100';

I get 1 row returned.

Share this post


Link to post
Share on other sites

In my admin area,

 

to upload my edit CSV file with the new products do I simply just go to upload & import EP file? Or do I do something more to get all of my new products onto the website?

 

ALSO WILL Easy populate work with the contribtion MSRP & savings (http://addons.oscommerce.com/info/3574) or how can I make this work?

Edited by boostanddestroy

noob-

Share this post


Link to post
Share on other sites

Hi Surfalot, if I upload the sample file in the contrib it works 100%, but if I make the smallest change (i.e change th price or something) then upload it, it adds products all over the place.

 

Now it must be the way I am saving the file.

 

I am using Excel 2003, then when I save file, I choose CSV (MS-DOS), then I am prompted with the following:

 

Sample_Output_file.csv may contain features that are not compatible with CSV (MS-DOS). Do you want to keep the workbook in this format?

To keep this format, which leaves out any incompatible features, click yes, or to Preserve the features, click NO.

 

Now no matter what I choose yes or no, the file always uploads fine but the products are not in the correct category, but If I upload the unmodified sample file it works fine.

 

I have tried this with openoffice and the same thing, so it must be something I am doing wrong.

 

Can someone please help? I have entered the products in manually also and then download the "complete" file and changed the price and when I upload it , again it gives me duplicate products. It has to be the way I am doing it.

 

When I upload the below 10 product .csv file, it places

10 products into "Heartsbox" Category,

4 products into 2009 Valetines Collections Category (Bustier, g-string and stockings with skull print. / Lace bra top and matching booty shorts / Bustier, g-string and stockings with skull print. & Lycra strappy teddy with O rings. )

2 products into Beyond Dark Category (Bustier, g-string and stockings with skull print - Queen Size / Cami set, with skull print.)

 

=============

 

CSV File : here

 

EP vers: 2.76g

osCommerce Online Merchant v2.2 RC2a

OS: Linux 2.6.24.7

HTTP: Apache

DB: MySQL 5.0.45-log

PHP: 4.4.7 (Zend: 1.3.0)

 

Temp Directory:

/hermes/web01/b1438/pow.kbleyth/htdocs/temp/

Temp Dir is Writable

Magic Quotes is: off

register_globals is: off

Split files on: 300 records

Model Num Size: 30

Price with tax: false

Calc Precision: 2

Replace quotes: false

Field seperator: comma

Excel safe output: true

Preserve tab/cr/lf: false

Category depth: 3

Enable attributes: true

SEF Froogle URLS: false

More Pics: false

Unknown Pics: false

HTC: false

SPPC: false

Extra Fields: false

 

File uploaded.

Temporary filename: /tmp/phpvtCjRg

User filename: EP-HeartsBox Collection-test.csv

Size: 3493

| EM7766 | Long sleev | Long sleev | | 7766.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | 12 | Red | 0 | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7762 | Long sleev | Long sleev | | 7762.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | 12 | Red | 0 | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7760 | Off the sh | Off the sh | | 7760.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | 12 | Red | 0 | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7760Q | Off the sh | Off the sh | | 7760Q.jpg | 28.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 5 | Queen | 0 | Taxable Go | Active !New Product!

| EM7759 | Lace bra t | Lace bra t | | 7759.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7756 | Lace thong | Lace thong | | 7756.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7775 | Lycra stra | Lycra stra | | 7775.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7804 | Bustier, g | Bustier, g | | 7804.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

| EM7804Q | Bustier, g | Bustier, g | | 7804Q.jpg | 28.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 5 | Queen | 0 | Taxable Go | Active !New Product!

| EM7805 | Cami set, | Cami top, | | 7805.jpg | 26.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product!

 

Have tried with define ('EP_EXCEL_SAFE_OUTPUT_ALT_PARCE', true); // default is: false and also set to false, but makes no diffence.

 

http://bytesnkisz.com/

Edited by stu2000

Stuart

Share this post


Link to post
Share on other sites
I get 1 row returned.

 

Same line, different change. after this line:

 

		$sql = "SELECT p.products_id as v_products_id FROM ".TABLE_PRODUCTS." as p WHERE p.products_model = '" . $v_products_model . "'";

 

add the following just below:

echo $sql;
  exit;

post me what you get, the line I'm looking for should start with "SELECT p.products_id as v_products_id".

then remove the code.

Edited by surfalot

Share this post


Link to post
Share on other sites
In my admin area,

 

to upload my edit CSV file with the new products do I simply just go to upload & import EP file? Or do I do something more to get all of my new products onto the website?

 

ALSO WILL Easy populate work with the contribtion MSRP & savings (http://addons.oscommerce.com/info/3574) or how can I make this work?

the best practice is to add a few products manually in the osC admin then export and replicate format for each new product. Ensure to have unique model numbers. Then yes, just upload with Upload & Import

Edited by surfalot

Share this post


Link to post
Share on other sites
I get 1 row returned.

 

never mind the post above. I know what it is, can't believe the codes been out there this long with this error. My hunch is its a globals off issue. anyway

 

find this:

	if (isset($items[$filelayout['v_products_extra_fields_id']]) ){

add this just below:

		$v_products_model = $items[$filelayout['v_products_model']];

Share this post


Link to post
Share on other sites
When I upload the below 10 product .csv file, it places

10 products into "Heartsbox" Category,

4 products into 2009 Valetines Collections Category (Bustier, g-string and stockings with skull print. / Lace bra top and matching booty shorts / Bustier, g-string and stockings with skull print. & Lycra strappy teddy with O rings. )

2 products into Beyond Dark Category (Bustier, g-string and stockings with skull print - Queen Size / Cami set, with skull print.)

 

post a link to a csv file after you've edited it.

 

are you using a Mac, M$, or Linux

Share this post


Link to post
Share on other sites
Same line, different change. after this line:

 

		$sql = "SELECT p.products_id as v_products_id FROM ".TABLE_PRODUCTS." as p WHERE p.products_model = '" . $v_products_model . "'";

 

add the following just below:

echo $sql;
  exit;

post me what you get, the line I'm looking for should start with "SELECT p.products_id as v_products_id".

then remove the code.

 

 

What if some of the products that we carry can apply to 5 or 10 different applications not only one. How are we supposed to go about that? Just put a "(1)" after the model number to keep it easy and make it different or how do you guys do it.


noob-

Share this post


Link to post
Share on other sites

hello all

 

 

within easy populate where in the code does it tell you where to find the location for the product photo/file. i have lots of product and cant just jam it into one folder, i need to put it into many different folders. if i can tell easy populate to look into another folder insted of the Images folder can i go into the spreed sheet and put the location of the file within that folder insted of just the file name. for example i want to put folders within folders for the product so if the product starts with an a it will be in folder a. from their i want to tell the spreed sheet to find the photo in folder a within the lets say images2 folder. can i do that???

 

please help me. I really need to find a solution to this problem

 

 

thank you

 

will

Share this post


Link to post
Share on other sites
What if some of the products that we carry can apply to 5 or 10 different applications not only one. How are we supposed to go about that? Just put a "(1)" after the model number to keep it easy and make it different or how do you guys do it.

That should work, just as long as each is unique so EP can tell them apart. Note about google, if you want the original model number to be searchable, use a hyphen "-" between the original model number and whatever you designate as the sub-model. that character is the only one that will make it look like 2 "words" to the search engine.

Share this post


Link to post
Share on other sites
hello all

 

 

within easy populate where in the code does it tell you where to find the location for the product photo/file. i have lots of product and cant just jam it into one folder, i need to put it into many different folders. if i can tell easy populate to look into another folder insted of the Images folder can i go into the spreed sheet and put the location of the file within that folder insted of just the file name. for example i want to put folders within folders for the product so if the product starts with an a it will be in folder a. from their i want to tell the spreed sheet to find the photo in folder a within the lets say images2 folder. can i do that???

 

please help me. I really need to find a solution to this problem

 

 

thank you

 

will

you shouldn't be looking in the code for that. if you want the shop to look in a sub-folder for an image, just put the sub-folder name in front of the image name. So image column entry for image.jpg in folder /images/product_group1/ would look like product_group1/image.jpg

so the shop will automatically add http://www.myshop.com/images/ in front of every image name when it is displayed to the customer.

Edited by surfalot

Share this post


Link to post
Share on other sites
you shouldn't be looking in the code for that. if you want the shop to look in a sub-folder for an image, just put the sub-folder name in front of the image name. So image column entry for image.jpg in folder /images/product_group1/ would look like product_group1/image.jpg

so the shop will automatically add http://www.myshop.com/images/ in front of every image name when it is displayed to the customer.

 

 

so i don’t even need to change the code or anything? If i want to separate all my products into separate folder within the Images folder all i have to do is tell easypopulate what folder it is in . so for example all i would have to do is put a/atr1192.jpeg . That is awesome, i thought about doing that but didn’t know if easypopulate would recognize it. Thanks a lot

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

×