Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easy Populate & Products Attributes


VJ

Recommended Posts

Hey, I had easy populate working fine then today I tried to upload stuff and it says it works but when I try to find the product in the catalog, its not there. I can find it in the database using phpmyadmin and I cant figure out why it says product not found.

 

I also just tested more and found that the old products wont update either. the only thing that has changed was that my host upgraded there php.

 

Does anyone else know of easy populate not working with php5? I know that another script I was using that I made stopped working also and I had to rewrite it.

 

Ryan

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

from what i understand a few things dont work with php5 and osc, have to search the forums for that info tho.

 

i would venture to say your host should have given you warning on this and to let you decide if you wanted to run it or not, as not every application out there has been written to use php5.

 

about the only thing you could do is turn on sql logging in the admin section of the store, and also look at the access and error logs for the server, to see what is going on when you try to run the ep program.

 

does ep download ok or create the txt file ok?

Edited by Mibble
Link to comment
Share on other sites

no, when I try to create a text file it gives me an 500 internal server error. It uploads and splits the file ok, the dump even shows that it adds the new product and I can see it in phpmyadmin but it won't show up in the catalog which is very weird.

 

Changes to old products dont show up either though.

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

Hi all,

 

I have a pb with EZP because, it doesn't create an EP file with 2 columns for my 2 language name categories (french and english): I have a column named v_categories_name_1 where I can set the french name of my french categories, but the v_categories_name_2 isn't for english categories but for create subcategories.

 

So , my question is: where is the second column for english categories (2nd language) in EP file? Maybe, I must configure something in easypopulate.php to create this column.

 

What do you think about that?

 

Thanks

 

Fab

Link to comment
Share on other sites

i should have kept track of what someone did with their languages, but i didnt, as i dont use multiple languages. there is something in the thread about doing this though.

Link to comment
Share on other sites

Hello everybody, i'm writing this post after visiting almost every post i could find on EP here in the forum, but still i have found no solution for this problem.

I've had some EP versions in osc ms2 (still a "noob" with all this php stuff... but i'm trying) as i went developing my design, but now, i've finally developed a design that i like, but i'm getting a problem that had never encoutered before... i've cleared the products tables in mysql and everything regarding those standard products, (both locally and live site) and went on with standard txt file from EP installation to try and import the same products before trying out my database (excel file, still optimizing), and keep getting this error, if someone can help me, it's great. :D

 

BTW: here's the result after i import that file (sample_output_file.txt)

 

File uploaded.

Temporary filename: C:\WINDOWS\TEMP\php28D.tmp

User filename: sample_output_file.txt

Size: 80290

| MG200MMS | matrox/mg2 | Matrox G20 | Reinforcin | www.matrox | Matrox G20 | Unterst?tz | www.matrox | Matrox G20 | Reinforcin | www.matrox | 299.99 | 23.00 | 2003-11-23 | 2003-11-23 | 32 | 1 | Color | Farbe | Color | 2 | Size | Gr??e | Talla | 3 | Model | Modell | Modelo | 5 | | Value | Value Ausg | Value | 6 | | Premium | Premium Au | Premium | 7 | | Deluxe | Deluxe Aus | Deluxe | 8 | | PS/2 | PS/2 Ansch | PS/2 | 9 | | USB | USB Anschl | USB | 4 | Memory | Speicher | Memoria | 1 | +0.0000 | 4 mb | 4 MB | 4 mb | 2 | +50.0000 | 8 mb | 8 MB | 8 mb | 3 | +70.0000 | 16 mb | 16 MB | 16 mb | 4 | | 32 mb | 32 MB | 32 mb | 5 | Version | Version | Version | 10 | | Download: | Download: | Download: | 13 | | Box: Windo | Box: Windo | Box: Windo | Matrox | Hardware | Graphics C | | Taxable Go | Active !New Product!

| MG400-32M | MSIMPRO m | DVD-RPMK | DVD-BLDRN | DVD-MATR | DVD-YGEM | DVD-ABUG | DVD-UNSG | DVD-UNSG2 | DVD-FDBL | DVD-DHWV | DVD-LTWP | DVD-REDC | DVD-FRAN | DVD-CUFI | DVD-SPEED | DVD-SPEED | DVD-TSAB | DVD-BELOV | PC-SWAT3 | PC-UNTM g | PC-TWOF g | PC-DISC g | MSINTKB m | MSIMEXP m | HPLJ1100X |

 

 

As you can see, it imports the first product, but the remaining only get the first column "read" as they don't even appear on the DB or everywhere else...

 

(Sorry for the topic appearing on other place in the forum, if i can i will delete the other one... :) )

Miguel

Link to comment
Share on other sites

first thing i noticed is your temp file, where do you have your store located? how are the file pointers setup in easy populate?

do you have each line ending with EOREOR?

 

you can email me your file, i can look at it.

Link to comment
Share on other sites

anyone have any ideas on why this won't work with php 4.38?

 

Go to this page to see all my php info. I need to know what to change so I can get this to work, I have a lot of products to add.

 

Ryan

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

it works with php 4.3.8 no problem. need to know what you have for your settings, ie your temp folder setting, the properties for it, how you have that set in the ep file.

Link to comment
Share on other sites

Here is the stuff from the beginning of the EP file.

<?php

// Current EP Version
$curver = '2.72-MS2';

/*
 $Id: easypopulate.php,v 2.72 2003/12/28 VJ Exp $
*/

//
//*******************************
//*******************************
// C O N F I G U R A T I O N
// V A R I A B L E S
//*******************************
//*******************************

// **** Temp directory ****
// if you changed your directory structure from stock and do not have /catalog/temp/, then you'll need to change this accordingly.
//
$tempdir = "/temp/";
$tempdir2 = "/temp/";

//**** File Splitting Configuration ****
// we attempt to set the timeout limit longer for this script to avoid having to split the files
// NOTE:  If your server is running in safe mode, this setting cannot override the timeout set in php.ini
// uncomment this if you are not on a safe mode server and you are getting timeouts
// set_time_limit(330);

// if you are splitting files, this will set the maximum number of records to put in each file.
// if you set your php.ini to a long time, you can make this number bigger
global $maxrecs;
$maxrecs = 300; // default, seems to work for most people.  Reduce if you hit timeouts
//$maxrecs = 4; // for testing

//**** Image Defaulting ****
global $default_images, $default_image_manufacturer, $default_image_product, $default_image_category;

// set them to your own default "We don't have any picture" gif
//$default_image_manufacturer = 'no_image_manufacturer.gif';
//$default_image_product = 'no_image_product.gif';
//$default_image_category = 'no_image_category.gif';

// or let them get set to nothing
$default_image_manufacturer = '';
$default_image_product = '';
$default_image_category = '';

//**** Status Field Setting ****
// Set the v_status field to "Inactive" if you want the status=0 in the system
// Set the v_status field to "Delete" if you want to remove the item from the system <- THIS IS NOT WORKING YET!
// If zero_qty_inactive is true, then items with zero qty will automatically be inactive in the store.
global $active, $inactive, $zero_qty_inactive, $deleteit;
$active = 'Active';
$inactive = 'Inactive';
//$deleteit = 'Delete'; // not functional yet
$zero_qty_inactive = true;

//**** Size of products_model in products table ****
// set this to the size of your model number field in the db.  We check to make sure all models are no longer than this value.
// this prevents the database from getting fubared.  Just making this number bigger won't help your database!  They must match!
global $modelsize;
$modelsize = 25;

//**** Price includes tax? ****
// Set the v_price_with_tax to
// 0 if you want the price without the tax included
// 1 if you want the price to be defined for import & export including tax.
global $price_with_tax;
$price_with_tax =false;

// **** Quote -> Escape character conversion ****
// If you have extensive html in your descriptions and it's getting mangled on upload, turn this off
// set to 1 = replace quotes with escape characters
// set to 0 = no quote replacement
global $replace_quotes;
$replace_quotes = true;

// **** Field Separator ****
// change this if you can't use the default of tabs
// Tab is the default, comma and semicolon are commonly supported by various progs
// Remember, if your descriptions contain this character, you will confuse EP!
global $separator;
$separator = "\t"; // tab is default
//$separator = ","; // comma
//$separator = ";"; // semi-colon
//$separator = "~"; // tilde
//$separator = "-"; // dash
//$separator = "*"; // splat

// **** Max Category Levels ****
// change this if you need more or fewer categories
global $max_categories;
$max_categories = 3; // 7 is default

// VJ product attributes begin
// **** Product Attributes ****
// change this to false, if do not want to download product attributes
global $products_with_attributes;
$products_with_attributes = true; 

// change this if you want to download selected product options
// this might be handy, if you have a lot of product options, and your output file exceeds 256 columns (which is the max. limit MS Excel is able to handle)
global $attribute_options_select;
//$attribute_options_select = array('Size', 'Model'); // uncomment and fill with product options name you wish to download // comment this line, if you wish to download all product options
// VJ product attributes end

 

my store is www.abdulky.com

 

Ryan

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

ok so what is the problem? please state what you have tried, ie does the download work, creating the current inventory text file?

and what happens if you turn around and import that file into your database without making any changes?

Link to comment
Share on other sites

It gives me an internal 500 error when trying to download the complete file to edit. I can upload a txt file no problem, it says that the products are updated and finds new ones if they are there. But then it doens't insert them into the products_description table and I can't find them on the website. They are in other tables like the products table.

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

erm... Mibble, i presume you're meaning my problem, as for the download, it works fine (i presume), i have not made any changes to the "stock" EP installation package file "sample_output_file.txt".

 

the result i'm refering in my previous post is from my local store :

 

Easy Populate 2.74-MS2 - Default Language : Portugues(1)

 

File uploaded.

Temporary filename: C:\WINDOWS\TEMP\php32D.tmp

User filename: sample_output_file.txt

Size: 80290

| MG200MMS | matrox/mg2 | Matrox G20 | Reinforcin | www.matrox | Matrox G20 | Unterst?tz | www.matrox | Matrox G20 | Reinforcin | www.matrox | 299.99 | 23.00 | 2003-11-23 | 2003-11-23 | 32 | 1 | Color | Farbe | Color | 2 | Size | Gr??e | Talla | 3 | Model | Modell | Modelo | 5 | | Value | Value Ausg | Value | 6 | | Premium | Premium Au | Premium | 7 | | Deluxe | Deluxe Aus | Deluxe | 8 | | PS/2 | PS/2 Ansch | PS/2 | 9 | | USB | USB Anschl | USB | 4 | Memory | Speicher | Memoria | 1 | +0.0000 | 4 mb | 4 MB | 4 mb | 2 | +50.0000 | 8 mb | 8 MB | 8 mb | 3 | +70.0000 | 16 mb | 16 MB | 16 mb | 4 | | 32 mb | 32 MB | 32 mb | 5 | Version | Version | Version | 10 | | Download: | Download: | Download: | 13 | | Box: Windo | Box: Windo | Box: Windo | Matrox | Hardware | Graphics C | | Taxable Go | Active !New Product!

| MG400-32M | MSIMPRO m | DVD-RPMK | DVD-BLDRN | DVD-MATR | DVD-YGEM | DVD-ABUG | DVD-UNSG | DVD-UNSG2 | DVD-FDBL | DVD-DHWV | DVD-LTWP | DVD-REDC | DVD-FRAN | DVD-CUFI | DVD-SPEED | DVD-SPEED | DVD-TSAB | DVD-BELOV | PC-SWAT3 | PC-UNTM g | PC-TWOF g | PC-DISC g | MSINTKB m | MSIMEXP m | HPLJ1100X |

 

I've tried rolling back and reinstalling all stock languages, double checked the configuration variables, and still comes up with this error... any help welcome :)

Link to comment
Share on other sites

This is the code that I dont think is running:

// the following is common in both the updating an existing product and creating a new product
               if ( isset($v_products_name)){
	 foreach( $v_products_name as $key => $name){
    	 if ($name!=''){
  	 $sql = "SELECT * FROM ".TABLE_PRODUCTS_DESCRIPTION." WHERE
    	 products_id = $v_products_id AND
    	 language_id = " . $key;
  	 $result = tep_db_query($sql);
  	 if (tep_db_num_rows($result) == 0) {
     // nope, this is a new product description
     $result = tep_db_query($sql);
     $sql =
    	 "INSERT INTO ".TABLE_PRODUCTS_DESCRIPTION."
       (products_id,
       language_id,
       products_name,
       products_description,
       products_url)
       VALUES (
      	 '" . $v_products_id . "',
      	 " . $key . ",
      	 '" . $name . "',
      	 '". $v_products_description[$key] . "',
      	 '". $v_products_url[$key] . "'
      	 )";
     // support for Linda's Header Controller 2.0
     if (isset($v_products_head_title_tag)){
    	 // override the sql if we're using Linda's contrib
    	 $sql =
       "INSERT INTO ".TABLE_PRODUCTS_DESCRIPTION."
      	 (products_id,
      	 language_id,
      	 products_name,
      	 products_description,
      	 products_url,
      	 products_head_title_tag,
      	 products_head_desc_tag,
      	 products_head_keywords_tag)
      	 VALUES (
         '" . $v_products_id . "',
         " . $key . ",
         '" . $name . "',
         '". $v_products_description[$key] . "',
         '". $v_products_url[$key] . "',
         '". $v_products_head_title_tag[$key] . "',
         '". $v_products_head_desc_tag[$key] . "',
         '". $v_products_head_keywords_tag[$key] . "')";
     }
     // end support for Linda's Header Controller 2.0
     $result = tep_db_query($sql);
  	 } else {
     // already in the description, let's just update it
     $sql =
    	 "UPDATE ".TABLE_PRODUCTS_DESCRIPTION." SET
       products_name='$name',
       products_description='".$v_products_description[$key] . "',
       products_url='" . $v_products_url[$key] . "'
    	 WHERE
       products_id = '$v_products_id' AND
       language_id = '$key'";
     // support for Lindas Header Controller 2.0
     if (isset($v_products_head_title_tag)){
    	 // override the sql if we're using Linda's contrib
    	 $sql =
       "UPDATE ".TABLE_PRODUCTS_DESCRIPTION." SET
      	 products_name = '$name',
      	 products_description = '".$v_products_description[$key] . "',
      	 products_url = '" . $v_products_url[$key] ."',
      	 products_head_title_tag = '" . $v_products_head_title_tag[$key] ."',
      	 products_head_desc_tag = '" . $v_products_head_desc_tag[$key] ."',
      	 products_head_keywords_tag = '" . $v_products_head_keywords_tag[$key] ."'
       WHERE
      	 products_id = '$v_products_id' AND
      	 language_id = '$key'";
     }
     // end support for Linda's Header Controller 2.0
     $result = tep_db_query($sql);
  	 }
   }
	 }
 }

products_description is the only table not getting changed for me. I just downloaded a new copy of easypopulate so I know its nothing that I may have changed. How is this part different than the insert into table products?

 

Ryan

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

Ok, after putting in a lot of echos the part above is not working for me. when I put

echo $v_products_name . '<br />';

Before the first if statement it doesn't print anything so it will never enter the if statement which it needs to. So anyone know why it would lose that variable?

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

Problem solved, I went to an old txt file and used that and it worked so I just copy pasted all my new items into the olf text file and they all update fine, very wierd but I don't really care for an explaination as long as it works :)

 

Ryan

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

Hi,

 

I am pretty new to OSCommerce and easypopulate and am struggling with a few aspects of operation. Hopefully somebody can help.

 

We have used EasyPopulate latest version on MS 2.2 ok and made changes so all seems to work sometimes. Trouble is that now we have increased our product database to nearly 500 products with many size attributes we are having difficulty both downloading and uploading the txt files.

 

I understand that there is a 30 second limit for the script to run and this is a global php setting so I guess my shared hosting support would not change this. When I try download a complete tab delim file it always fails. I've not been able to get a complete download since I enlarged the data. Also when I do the products and attributes only it more often than not fails also. Umpteen attempts usually result in a successful download though. I understand how to split files for upload (although I've not done this yet) but is it not an issue for script timeouts when downloading data? Is there some way to get easypopulate to export in sections like split files? BTW, i've tried direct download and also to temp folder methods with same results. Temp folder usually better though so I use that.

 

Having got the txt file on my machine ( eventually ) can anyone tell me if it is necessary to keep the rows in the same order or can I re-sort in excel? Does easypopulate care that the data is in different order? Does it affect my database order?

 

I was wondering if it was necessary to always upload a complete set of data same as I download or if i can eliminate rows that I do not want to change and just upload a txt file that has changes to it?

 

My host is using php 4 on Win2k IIS v5. I noted a tip to overcome the script timeouts somewhere in this forum by modifying .htaccess with the following code added:

php_flag safe_mode off

php_value max_execution_time 30000000

 

I did this full of hope it would solve my problem but it doesnt seem to have worked. Anyone else used this or got any ideas why it does not work?

 

Thanks in advance.

 

John D.

Link to comment
Share on other sites

i have not found a good way of really doing attributes with easypopulate, if you have quite a few. it was never completely developed from what i can tell.

 

thus, just use ep for the catalog products, for the attributes, if you are using the same ones over and over, you can generate the code via a vb script or macro from excel.

Link to comment
Share on other sites

Hi out there,

 

I've postet my question in a other thread already but as i was told, this was the wrong place. Sorry for being wrong. I try to ask here again.

 

Please excuse my lousy english - i do my very best

 

I've got a oscommerce with Master Products - Mod and I tried to work with EP now, because there are so many items in my shop... or should I say there sould be so many items?

 

I installed the EP and made the changes that are described in this thread:

http://www.oscommerce.com/forums/index.php?sho...c=67284&st=950&

 

Then I downloaded the complete file and, how described in the manual, just uploaded it again to test, if it all works correctly.

 

But it doesn't. Now there is a new top-category that should not be there and some products are lost.

 

I opened the .txt-file in my open office and the "new" category was in the downloaded file already.

 

You can find the data-file here:

http://www.schnuffelnase.de/problems

 

As you can see in line 338 this is the first time "new" category appears. The products in this "new" category are not just in the wrong one, they are doubled. 11 items that should not be there at all...

 

Please, please help! I just don't know what to do any more... I've tried 4 times already - restore backup, instal EP again, download... and so on... always with the same result. So I resigned and tried to insert all the products with the admin-panel. But it's just too much...

 

Thanks a lot.

 

Yours, Aeryn

Link to comment
Share on other sites

Hi John,

 

I don't know how to 'send' the file, cause the email function of this forum doesn't allow attachments. Please klick on the link I posted, there is the file and a .zip either. I don't know how to send it another way...

 

greetings,

Aeryn

Link to comment
Share on other sites

aeryn, you need to remove the column for products_id from the easypopulate data file, think that is corrupting it too.

also, the columns are they in the original order as the file?

Link to comment
Share on other sites

Hi again,

 

I found the solution to my first problem - the categorie-level was not deep enough.

 

But the problem with the doubeled products still appears.

 

Before the download there are 390 items. The downloaded file contains 390 items. But when the file is uploaded back to the server (with no changes of course) there are 393 items (all located in one categorie 3rd level). No new ones, just copies of items that are already there...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...