Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easy Populate & Products Attributes


VJ

Recommended Posts

Again

 

also, big FYI to everyone who has catagories that use '

 

Example "CD's"

 

When you upload your products from the tab delimited file, it will duplicate an additional catorgory that has the apostrophe.

 

Example you have a catagory already on the site called CD's, you're updating the information some products in that catagory, when you upload it will duplicat that Catagory, and save those changes to the duplicated catigory along with any sub-cat's.

------------------

 

With that Said, CATAGORIES with the apostrophe will cause DUPLICATE CATAGORIES and ITEMS. Take note as this could affect ALL your items with apostrophe in the CATAGORY name.

Link to comment
Share on other sites

Hi Sean,

 

in my categories there was no apostrophe. The problem was the category level.

 

Now the probs both seem to be fixed... I hope, it will work tomorrow either... ;-)

 

So, I'll go to bed now.

 

tnx and greetings,

Aeryn

Link to comment
Share on other sites

also, via ep when you add a product which is already in the sheet, you will just update the existing product, not add a new one.

Edited by Mibble
Link to comment
Share on other sites

I have a persistent problem with Easy Populate, and I was told to take it over here: I get mangled characters in my product description even though escape character conversion is turned off. Several others posted about having the same problem over here: http://www.oscommerce.com/forums/index.php?showtopic=78558&hl=

 

If anybody can help with this, it would be very much appreciated.

 

Thanks.

Link to comment
Share on other sites

Hi All, I'm currently using easypopulate 2.74 which is working fine for updating my products

 

Can anybody guide me in the direction to enable me to populate my categories as well as the products.

 

Within my categories I need to update my images, description, meta tags etc......

 

Thanks in advance

NZmike.

NZmike

 

Auckland New Zealand

Link to comment
Share on other sites

in the text file you will see things like v_categories_1, v_categories_2, 1 is the main category, 2 is a subcategory of 1 which meand 3 would be a subcatetory of 2 which is a subcategory of 1

Link to comment
Share on other sites

I have a persistent problem with Easy Populate, and I was told to take it over here: I get  mangled characters in my product description even though escape character conversion is turned off. Several others posted about having the same problem over here: http://www.oscommerce.com/forums/index.php?showtopic=78558&hl=

Hello,

 

I have this code in place to better handle special characters, and it seems to work fine.

 

In file admin/easypopulate.php

 

replace,

 

	// make sure all non-set things are set to '';
// and strip the quotes from the start and end of the stings.
// escape any special chars for the database.
foreach( $filelayout as $key=> $value){
  $i = $filelayout[$key];
  if (isset($items[$i]) == false) {
    $items[$i]='';
  } else {
    // Check to see if either of the magic_quotes are turned on or off;
    // And apply filtering accordingly.
    if (function_exists('ini_get')) {
      //echo "Getting ready to check magic quotes<br>";
      if (ini_get('magic_quotes_runtime') == 1){
 // The magic_quotes_runtime are on, so lets account for them
 // check if the last character is a quote;
 // if it is, chop off the quotes.
 if (substr($items[$i],-1) == '"'){
   $items[$i] = substr($items[$i],2,strlen($items[$i])-4);
 }
 // now any remaining doubled double quotes should be converted to one doublequote
 $items[$i] = str_replace('\"\"',""",$items[$i]);
 if ($replace_quotes){
   $items[$i] = str_replace('\"',""",$items[$i]);
   $items[$i] = str_replace("\'","'",$items[$i]);
 }
      } else { // no magic_quotes are on
 // check if the last character is a quote;
 // if it is, chop off the 1st and last character of the string.
 if (substr($items[$i],-1) == '"'){
   $items[$i] = substr($items[$i],1,strlen($items[$i])-2);
 }
 // now any remaining doubled double quotes should be converted to one doublequote
 $items[$i] = str_replace('""',""",$items[$i]);
 if ($replace_quotes){
   $items[$i] = str_replace('"',""",$items[$i]);
   $items[$i] = str_replace("'","'",$items[$i]);
 }
      }
    }
  }
}

 

with,

 

  foreach( $filelayout as $key=> $value){
   $i = $filelayout[$key];
   if (isset($items[$i]) == false) {
     $items[$i]='';
   } else {
     // strip enclosing quotes added by Excel
     $items[$i] = preg_replace('/^"(.*)"$/', '$1', $items[$i]);

     // doubled double quotes should be converted to one doublequote (for some reason Excel adds them)
     $items[$i] = preg_replace('/"{2,}/', '"', $items[$i]);

     // standard functions to clean db input
     $items[$i] = tep_db_input(tep_db_prepare_input($items[$i]));
   }
 }

 

HTH,

VJ

Link to comment
Share on other sites

I have 50 products, 196 options (all options apply to all products). I keyed in the option values by hand and wanted to use Easy Populate to create the product attributes. I downloaded the model/attributes text file and imported it into excel and it filled all 256 columns(this was expected). I cleaned up the last couple of rows and added the EOREOR at the end. I saved it as a text file and uploaded it back to the server via Easy Upload(no errors).

 

Now, when I go to the store and view the products it sorts the options backwards. So, I thought, I'll deal with that later and tried to import the rest of the data. For some reason when I (try to) import the 2nd part of the data from the text file it acts as though it loads, no errors are reported in osc, however, it deletes everything from the previous import and your back to square one with NO product attributes.

 

I really dont want to have to key in 196 options for 50 products, if anyone has a clue I'll buy you a beer... :blink:

 

 

Howard

Link to comment
Share on other sites

Attributes getting confused....

 

I'm having problems with attributes getting 'confused'. I have a program that builds the tab delimited file for EP from a local database. The structure of the upload file looks right. Unforunately when I upload and run this through EP (2.74 MS2) it appears to work, no errors reported and the products are properly added into the catalog, However the options and their associated attributes get very confused.

 

(btw I've tried posting an example couple of lines from the tab delimuted file here but it's too big to be useful in a BB - I'm happy to mail it to anyone who thinks they might be able to help.)

 

Can anyone give me a clue where to start looking, or any debug techniques that may help?

 

Thanks,

EtU

Link to comment
Share on other sites

I just installed this mod, and am having a few questions.

 

When i download the excel file (txt file), every item has every attribute associated with it. That's not how they are on my store.

 

Am i doing something wrong here?

Link to comment
Share on other sites

when looking at the attributes, all attributes are listed, however the only ones which are active have dollar values, weights, sort order, etc next to them. search the store for products with attributes, then find them in the spreadsheet. you will see what i mean

Link to comment
Share on other sites

hb, the better way for adding that many, well i do it via a spreadsheet.

 

here is the way the attributes work, from the osc standpoint.

 

option must be created. thus the table gets updated with an id#, language id#, option id# and description.

then the attribute is created. first, it is assigned an id # with the name you put in there. then it updates another table, tieing the two together.

and finally you assign it to a product, along with the name, price, sort order, etc. not an easy thing for ep to do, as we are limited to 256 columns. for one attribute, it takes about 30 or so colums, depending upon what you are doing.

Link to comment
Share on other sites

In the spreadsheet, every attribute is listed with every product. But not all those attributes are associated with every product.

 

I feel that something is wrong. I'm not going to upload the file to test it, as I feel it will associate all those attributes with all the products.

 

For example, I have color values for one product, but not another. Both product have all the variable data in them for the colors.

 

What is wrong here?

Link to comment
Share on other sites

John

 

The part I dont understand is why I can load the first text file of 256 columns but the second will not load, even if I try to load it first. I did many hours of testing and trying things that I thought might work however, I was not able to make it work. The best I can do using EP is about 80 of the 196 options. It very frustrating as I am not a programmer, even though I have a pretty good understanding of sql. If I knew how to do it using a spreadsheet I would. Are you talking about just loading into the tables using phpadmin or something like that?

 

Howard

Link to comment
Share on other sites

there is nothing wrong with the file. just the way it works, on the attributes.

thats what i don't understand. for the life of me, I don't see where an attribute is associated with a product. Since they are all listed with every product, I can't see how the database can say one attribute is not associated with a particular product.

 

btw: anyone who can help can IM me at freechalupas on AIM so I don't flood this topic with my posts :huh:

Link to comment
Share on other sites

I think I figured it out...

 

For an attribute to be associated with a product, there must be a value in the price field for that attribute.

 

Most of my attributes are for sizes of products, so there aren't prices assoicated with it. I noticed 0's in the fields that had a value associated with it.

 

So, empty price field=no attribute.

Value in price field=attribute associated.

 

Is this right?

Link to comment
Share on other sites

Hi, all.

I am having problems with easypopulate. I have to display specifications of products in a table in product pages. To make these tables easier to change I use some code in stylesheet.css to alter the appearance, if need be.

 

The problem is when I use Easypopulate to upload products the formatting from the stylesheet is not applied. However, when I edit the product from admin and go through the process of previewing and updating the product the link is re-established and my table displays as it should,even though I don't change the code I just preview and then update.

 

So it would appear that clicking update in the product description from admin links the product page to the stylesheet. Is there a fix for this or has someone else had similar problems? I am sure someone else has used Easypopulate and stylesheet formatting.

Thanks for you help

Link to comment
Share on other sites

Hi there,

 

The following sample from my import file does not give an error ( and list all the products as updated OK), but nothing is loaded. All the products exist, so I am just adding the product attributes options & values. I know I must be close, but just can't work it out. I am only importing 1 language - English & the only attribute I want is Size, which is the '2' for option_id_1

 

Getting really desperate to get this to work as I have a client waiting for this data to be imported !!!!

 

TIA, Dave Porter

 

( note {tab} indicates where a tab character is ! )

 

v_products_model{tab}v_attribute_options_id_1{tab}v_attribute_options_name_1_1{t

ab} v_attribute_values_id_1_1{tab}v_attribute_values_price_1_1{tab}v_attribute_value

s_name_3_1_1{tab}EOREOR

5{tab}2{tab}Size{tab}1{tab}132{tab}EDP Spray 50ml{tab}EOREOR

41{tab}2{tab}Size{tab}1{tab}0{tab}EDT SPRAY 100ML EOREOR

Link to comment
Share on other sites

Hi Again,

 

In the example "sample_output_file.txt" ( which I'm using to analyse), the first v_attribute_options_id is v_attribute_options_id_3_1

 

I don't understand why it starts at 3 and not 1.

 

I really would like to see some details documentation on this - it can't be that dificult.

 

If anyone can help I'd really appreaciate it !

 

regards, Dave Porter

Link to comment
Share on other sites

Hi John,

 

I only have the Size ( ID 2 ) in the Product Options. I was assuming that the 'Option Values' would get imported automatically if the entry in the 'Product Attributes' did not exist in the 'Option Values'. but maybe that is my problem & I'm expecting it to be too clever ?

 

In the sample_output_file it has the ID's for the 'Option Values', but how do I get these ? There will probably be a couple of thousand of them ?

 

Hope you can help.

 

regards, Dave

Link to comment
Share on other sites

one thing to note, for options/attributes, is the limitation of excel.

 

only so many columns across, after that you are hosed. i have a site which has over 16000 attributes, thus was not able to use ep.

i did create the basics in excel, for uploading via ep to the store.

also in excel i created other basics so i could piece together the code and run via mysql to tie them in.

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...