Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easy Populate & Products Attributes


VJ

Recommended Posts

Thanks for the heads up on that, however I will need to work on something more permanent for the client whom will not want or know how to run sql queries.  :thumbsup:

 

Steve,

 

I don't know how, but perhaps a button on the EP screen in Admin that basically runs that query? It's adding an additional step to the process though - I guess you could somehow automate the query? If you know how to program it, I'd love to benefit :)

 

Jacob

Link to comment
Share on other sites

Hi,

 

Following up, no response as of yet (it's been days and multiple inquiries) regarding the sql error I have (1064 ... FROM as products as).

 

Is there a different thread i should post it somewhere else?

Lots of other folks inquiries have been addressed, hence the question.

I've searched and found the 1064 error all over the threads as inquiries, but not specifically the same error I have or with EP.

 

I merely need to know where that text is, i.e. in what file.

Is it TABLE_PRODUCTS instead in the file?

If so, i found it, info is all in earlier post of mine.

 

In summary, pertains to easypopulate functioning directly and may or may not have something to do with other contribs, have detailed info handy on everything ever done, even minor wiki stuff... No fields were formally added to EP other than with contribs. Offer open for payment to determine and instruct us on what change needed in file/dbase. This is time-constraint based, would gladly figure it out for learning purpose, if time permitted.

Link to comment
Share on other sites

this:

'/home/warrior007/www/mall/catalog//mall/catalog/temp/test.txt'

 

where you have two // after catalog means your document root ends with a / in your configure.php file, and ep (and just about anything else) dont like that, so remove the / and your site should be a bit better.  strange tho, as to why you have two mall/catalog, so do me a favor, post what you have in your document root for configure.php and also in the admin section, click on tools/server info and search for document root and paste that here.

 

That was the problem, there actually isnt 2 mall/catalogs.. I also had the temp file not writeable for some reason. Thanks! I was a little short on sleep and I thought it was just my tired eyes seeing double

Link to comment
Share on other sites

one more question mibble, EP is overwriting everything when I upload only things like product_model, price and quantity. I remember using it when I first installed about 8 months ago, I could upload only the data I needed (along with v_product_model ofcourse) Any ideas? I just updated to the latest release of EP.

 

Here the text of the test file I am using to test

 

v_products_model	v_products_image	v_products_name_1	v_products_quantity	EOREOR
1way-kit-0103	raptor-onewaykit.jpg	2001-2003 Raptor - L&A Designs one-way Kit	32	EOREOR

 

This product was already in my database, I am not setting a date or description with this file - and I lose everything for the product and it comes up with todays date

Link to comment
Share on other sites

Hi

I can successfully(i think, no errors) upload a file for easy populate, but I am not seeing the 1 test product i added, in the /catalog.

 

At the top where you upload, in admin easy populate,I see the test model number.

 

But I am not seeing the chages when I go to the /catalog

 

Any suggestions? permissions?

I am working locally, if you need to know

 

Thanks

Brian

Link to comment
Share on other sites

with the code for ep, by default it will insert the default fields even if you dont have them with it. you can comment out those areas, if you want to do that but if you read thru the code you will see it fills it all in.

 

one more question mibble, EP is overwriting everything when I upload only things like product_model, price and quantity. I remember using it when I first installed about 8 months ago, I could upload only the data I needed (along with v_product_model ofcourse) Any ideas? I just updated to the latest release of EP.

 

Here the text of the test file I am using to test

 

v_products_model	v_products_image	v_products_name_1	v_products_quantity	EOREOR
1way-kit-0103	raptor-onewaykit.jpg	2001-2003 Raptor - L&A Designs one-way Kit	32	EOREOR

 

This product was already in my database, I am not setting a date or description with this file - and I lose everything for the product and it comes up with todays date

Link to comment
Share on other sites

hmm,. that well that kinda takes a little usefulness out of the script, I have to upload every field? even the dates.. the dates you have to input manually everytime you open the file in excel. Turning into more work than I had before EP. I thought for sure it didnt work that way before.

 

Sorry just whining..

Link to comment
Share on other sites

brian, are you assigning a category to the product?

 

Hi John

What I am doing is downloading the example products, with DVD, hardware, etc, I just copied/pasted a new line, and changed the model number, and couple other things so i can see if it is updated.

 

Brian

 

 

Here is what is at teh top after clicking add to db(can see the model#2323232 and MSINTKB_, the two i added)

 

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

 

File uploaded.

Temporary filename: C:\DOCUME~1\brian\LOCALS~1\Temp\php1.tmp

User filename: EP2004Dec08-2109.txt

Size: 56937

| MG200MMS | matrox/mg2 | Matrox G20 | Reinforcin | www.matrox | Matrox G20 | Unterst | www.matrox | Matrox G20 | Reinforcin | www.matrox | 320.99 | 23 | 0000-00-00 | 12/8/2004 | 32 | 1 | Color | Farbe | Color | 2 | Size | Gr | Talla | 3 | Model | Modell | Modelo | 5 | 0 | Value | Value Ausg | Value | 6 | 100 | 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 | 4 mb | 4 MB | 4 mb | 2 | 50 | 8 mb | 8 MB | 8 mb | 3 | 70 | 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 Updated

| MG400-32 | MSIMPRO | DVD-RPMK | DVD-BLDR | DVD-MATR | DVD-YGEM | DVD-ABUG | DVD-UNSG | DVD-UNSG | DVD-FDBL | DVD-DHWV | DVD-LTWP | DVD-REDC | DVD-FRAN | DVD-CUFI | DVD-SPEE | DVD-SPEE | DVD-TSAB | DVD-BELO | PC-SWAT3 | PC-UNTM | PC-TWOF | PC-DISC | MSINTKB_ | MSINTKB | MSIMEXP | HPLJ1100 | 2323232 |

Link to comment
Share on other sites

That is the default directory path without changes, I have since changed it to /temp

that seemed to corrct one fo the problems but now I have a new one. I never had these problems with the CRE loaded version but it had to many things in it that was useless and not needed.

Thanks Again

Actually, I found when searching through the easypopulate.php that there were many instances where the tempfile directory was having the /catalog/ path attached to it:

$tmpfname = DIR_FS_CATALOG . 'catalog/' . $tempdir

 

Was this intentional? I removed the

. 'catalog/'

and it corrects this error.

Link to comment
Share on other sites

Steve,

 

I don't know how, but perhaps a button on the EP screen in Admin that basically runs that query? It's adding an additional step to the process though - I guess you could somehow automate the query? If you know how to program it, I'd love to benefit :)

 

Jacob

 

I am looking at automating by adding in the query to the easypopulate.php code section where it adds and updates the database

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Can someone point me to the most recent version of this contrib? I have searched through & found several in the Contribs section with various authors, and I would be just pleased as punch to not relive the horror of downloading the wrong (and very buggy) copycat contrib.

 

Thanks!

 

Wendy

Link to comment
Share on other sites

Steve,

 

I don't know how, but perhaps a button on the EP screen in Admin that basically runs that query? It's adding an additional step to the process though - I guess you could somehow automate the query? If you know how to program it, I'd love to benefit :)

 

Jacob

 

you can add this code to the easypopulate.php file :D

 

           tep_db_query("update " . TABLE_PRODUCTS_ATTRIBUTES . " set options_values_price = ABS(options_values_price)");

 

I have not worked out the most optimum place to have the code as yet, so I have just added it near the end of the file thus: ;)

  // VJ product attribs end
// Wolfen added code to update prices with minus - BOF
          tep_db_query("update " . TABLE_PRODUCTS_ATTRIBUTES . " set options_values_price = ABS(options_values_price)");
// Wolfen added code to update prices with minus - EOF
} else {
 // this record was missing the product_model
 array_walk($items, 'print_el');
 echo "<p class=smallText>No products_model field in record. This line was not imported <br>";
 echo "<br>";
}
// end of row insertion code
}


require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

This is a temporary placing of the code, however I believe that the code will be better placed further up the file in order to speed up the query. :thumbsup:

 

Within the options_values_price update section may prove more worthwhile

 

      // insert into options_values_prices table if no price exists
     if (tep_db_num_rows($attribute_prices_values) <= 0) {
    	 $attribute_prices_insert_query = "insert into " . TABLE_PRODUCTS_ATTRIBUTES . " (products_id, options_id, options_values_id, options_values_price, price_prefix) values ('" . (int)$v_products_id . "', '" . (int)$$v_attribute_options_id_var . "', '" . (int)$$v_attribute_values_id_var . "', '" . (float)$$v_attribute_values_price_var . "', '" . $attribute_values_price_prefix . "')";

    	 $attribute_prices_insert = tep_db_query($attribute_prices_insert_query);
     } else { // update options table, if options already exists
    	 $attribute_prices_update_query = "update " . TABLE_PRODUCTS_ATTRIBUTES . " set options_values_price = '" . $$v_attribute_values_price_var . "', price_prefix = '" . $attribute_values_price_prefix . "' where products_id = '" . (int)$v_products_id . "' and options_id = '" . (int)$$v_attribute_options_id_var . "' and options_values_id ='" . (int)$$v_attribute_values_id_var . "'";

    	 $attribute_prices_update = tep_db_query($attribute_prices_update_query);
     }
// Wolfen added code to update prices with minus - BOF
          tep_db_query("update " . TABLE_PRODUCTS_ATTRIBUTES . " set options_values_price = ABS(options_values_price)");
// Wolfen added code to update prices with minus - EOF
  	 }
  	 // options_values price update end

  	 $attribute_values_count++;
  	 $v_attribute_values_id_var = 'v_attribute_values_id_' . $attribute_options_count . '_' . $attribute_values_count;
   }

   $attribute_options_count++;
   $v_attribute_options_id_var = 'v_attribute_options_id_' . $attribute_options_count;
	 }

	 $attribute_rows++;
 }
 // VJ product attribs end

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

no, the dates you can leave blank, unless you want a totally different one.

 

Why is it writing todays date when I upload with no date field. I need to upload 600 products at a time but only want to upload the prices, and quantity. Is this possible?

Link to comment
Share on other sites

Sorry I posted again in the wrong place <_< I wanted to know if I could delete the fields I don't use (such as v_products_name_2 and so on...) from my excel file before I upload...

 

... and one more question, I have followed the instructions given in the "New Fields with Easy Populate" contribution to have my product page show the new fields and they indeed are shown but not the contained information just the titles of the fields... what can I do???

Link to comment
Share on other sites

In my product info page the "Click to enlarge picture" doesn't work either, that's not half as important as the new fields not displaying the information but... what can I do???

:(

Any idea will be appreciated. Thanks!

Link to comment
Share on other sites

In my product info page the "Click to enlarge picture" doesn't work either, that's not half as important as the new fields not displaying the information but... what can I do???

:(

Any idea will be appreciated. Thanks!

 

I finally decided to take on easypopulate thanks to the unvaluable help of Mibble (thanks again John! ;) ) I have about 17 new fields in different languages...

 

Now I'm still working on trying to know why the new fields won't display the information, so any help is very welcomed!

Link to comment
Share on other sites

Fatal error: Cannot redeclare tep_get_tax_class_title() in /home/ronin2nr/public_html/shop/admin/easypopulate_functions.php on line 34

 

........here is that line.....

 

 

 

 

 

function tep_get_tax_class_title($tax_class_id) {

if ($tax_class_id == '0') {

return TEXT_NONE;

} else {

$classes_query = tep_db_query("select tax_class_title from " . TABLE_TAX_CLASS . " where tax_class_id = '" . $tax_class_id . "'");

$classes = tep_db_fetch_array($classes_query);

 

return $classes['tax_class_title'];

}

}

WHAT DO I DO?

Link to comment
Share on other sites

Hi,

 

Posting this Q here hopefully for some input....

 

I'm (trying) to use EP and upload this simple file:

Should put the 4 test products in Category: Parts Dept. > Manco Parts > Part# 10xx

 

v_products_model v_products_name_1 v_products_description_1 v_products_price v_manufacturers_name v_categories_name_1 v_categories_name_2 v_categories_name_3 EOREOR used for cell A used for cell A

manco_10041 10041 LOOM 3.000IN ID BULK 7 Manco Parts Dept. Manco Parts Part# 100x EOREOR 10041 manco_

manco_10046 10046 BUMPER TUBE 0 Manco Parts Dept. Manco Parts Part# 100x EOREOR 10046 manco_

manco_1007 1007 BOLT 5/8-11 X 6.000 HHCS G5 Z 3.5 Manco Parts Dept. Manco Parts Part# 100x EOREOR 1007 manco_

 

The last 2 columns should be ommited right? (after EOREOR) I use them for adding a prefix to column A

 

EP says they have been entered into database but it is only one entry of _manco not even in the right subcategory.

 

Many pre thanks fo any suggestions, KJ

define('PROJECTS', 'Something that goes on forever!');

Link to comment
Share on other sites

you had asked this in the somewhere and were given an answer, that if you have anything after the eoreor ep will then start inserting any data after the eoreor into the file. just because you have a new line doesnt mean the computer knows it is a new line, as in a txt file it flows as one line.

so prior to uploading any data, delete anything and everything after eoreor and delete everything and everything after the last line.

Edited by Mibble
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...