Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easy Populate & Products Attributes


VJ

Recommended Posts

Jared/Mibble/Whomever can help

 

I took my easypopulate.php and opened it in WinMerge with the file that was attached to the above message.  I went through and copied over the changes.  Now, I am getting a parse error.  Thing is, the error is occuring on a line where no changes took place.  Here is the error

 

Parse error: parse error, unexpected T_ELSE in /www/a/alltheabovew/htdocs/catalog/admin/easypopulate.php on line 2538

 

There are no extra spaces after the last ?>  There are no open apostrophes.  I checked Vger's Parse error link, but it did not pertain to me.

Here is the partial code where this error is taking place.

 

 

Thanks for any help.

Lori

 

Find

// Do we have extra images? 	 
 if ( isset($v_products_extra_image) ){
	 
	 // there can be many extra_images defined for a product
	 // so for simplicity's sake, we'll just insert, not update / overwrite
  	 $query = "  INSERT INTO " . TABLE_PRODUCTS_EXTRA_IMAGES . " (
        products_id,
        products_extra_image,
        type)
          VALUES (
              $v_products_id,
              '$v_products_extra_image', 
              '$v_products_extra_image')
         ";
  	 $result = tep_db_query($query);  
   }
	 }

and remove the last } in that section.

Try that and see if it works.

 

// Fredrik

Link to comment
Share on other sites

Mibble....

As suggested I'm trying to install a fresh copy of osC.

 

Installer immediately returns:

FATAL ERROR: register_globals is disabled in php.ini, please enable it!

 

What's this mean? Is this something I have to get my provider to do?

Edited by zellerman
Link to comment
Share on other sites

FOR MIBBLE... SUCCESS!

(RE: could not get EasyPopulate to work)

 

I tried to install a fresh copy of osCommerce instead of using the host provided copy. Upon trying to run the installer I received a Critical Error telling me that my "Register Globals" where off. The error msg said "turn them on!"

 

I searched web and learned about Register Globals and "php.ini" files. I found a suggested php.ini file in my host's (aplus.net) knowledge base and I uploaded it to my site.

 

On a whim I tried running my "stock" (as provided by host) osCommerce with my EasyPopulate. IT WORKED. A download worked the first time.

 

I just needed to turn "register globals" on for php. (If osC needs register globals on for install it doesn't need on after install???)

 

Mibble, thank you for your time and help. I really appreciate it.

 

 

------- KEYWORDS FOR SEARCHES -----------

easypopulate won't work - easypopulate fails - seems to fall through

easypopulate does nothing - no export - no download - no files created

why won't easypopulate work - one fix for easypopulate

easypopulate php options

Link to comment
Share on other sites

i just didnt want u to spend your money needlesly and you learned a lot more this way. sometimes it can get frustrating, however i believe it was worth it for you to learn

Link to comment
Share on other sites

still think something on your server

 

I'm glad everyone else here is up to speed, but where did everyone start, the instructions aren't very layman terms, the best sample i got was pontiac aztek... Is there any samples that I can learn from? I need product code, product, product image, pricing, availability, etc etc. but the instructions are pretty hard for newbs like me.

 

In everyones code posts I don't see the EOREOR field when the instructions say it's REQUIRED? :huh:

Edited by thessrtech
Link to comment
Share on other sites

I'm glad everyone else here is up to speed, but where did everyone start, the instructions aren't very layman terms, the best sample i got was pontiac aztek... Is there any samples that I can learn from? I need product code, product, product image, pricing, availability, etc etc. but the instructions are pretty hard for newbs like me.

 

In everyones code posts I don't see the EOREOR field when the instructions say it's REQUIRED?  :huh:

 

 

Or maybe I start a new text file? or excel file? And it automatically inputs the values for me when i upload it to easypopulation.php?

Link to comment
Share on other sites

I have a quick question:  i am getting error when i use ep but only on a couple products. 

My guess is that the name has apostrophe in it how can i fix this?

 

 

Best bet would be to remove the apostrophe ;)

 

Open your delimited file up in excel, highlight your name column, do a find and replace for all apostophes (I usually replace them with a space), export file again and try uploading.

 

Dan :)

Link to comment
Share on other sites

Best bet would be to remove the apostrophe  ;)

 

Open your delimited file up in excel, highlight your name column, do a find and replace for all apostophes (I usually replace them with a space), export file again and try uploading.

 

Dan :)

 

what does this mean?

 

No products_model field in record. This line was not imported

 

 

File uploaded.

Temporary filename: /var/tmp/phpOwj8MP

User filename: aem.txt

Size: 3270

| | 23-631B | AEM | 5 Bolt Cam | 179.99 | Mitsubishi | Evolution | Engine & P | images/aem

 

No products_model field in record. This line was not imported

 

| | 23-631C | AEM | 5 Bolt Cam | 179.99 | Mitsubishi | Evolution | Engine & P | images/aem

 

No products_model field in record. This line was not imported

 

| | 23-631R | AEM | 5 Bolt Cam | 179.99 | Mitsubishi | Evolution | Engine & P | images/aem

 

No products_model field in record. This line was not imported

Edited by thessrtech
Link to comment
Share on other sites

what does this mean?

 

No products_model field in record. This line was not imported

 

 

This suggests you're missing the v_products_model field in your import file - this is a required field, so even if you assign an arbitrary number using excel and filling down it will work.

 

Also make sure you have EOREOR in the last column for *all* your rows :)

 

Dan

Edited by Geordiedan
Link to comment
Share on other sites

This is the order I'm writing them in.

 

v_products_model;v_manufacturers_name;v_products_name;v_products_price;

v_categories_name_1;v_categories_name_2;v_categories_name_3;v_products_image

 

 

Also does it matter if the subcategory isn't there when I'm uploading? Or will it create the subcategory according to what I write?

 

I'm just using notepad and I'm using semi colon's because in my easypopulate.php page it shows the coding as

 

global $separator;
//$separator = "\t"; // tab is default
//$separator = ","; // comma
$separator = ";"; // semi-colon
//$separator = "~"; // tilde
//$separator = "-"; // dash
//$separator = "*"; // splat

 

Which makes me assume that semi-colon is default correct?

 

 

Here are some new findings, when i open the txt file in excel and use semi colon as the delimiter everything is on one long line? Why is that? Also, do you have to have a seperator before and after EOREOR?

Edited by thessrtech
Link to comment
Share on other sites

The download ships with semi-colon set as default, but that's the first thing most folks change ;)

 

Not being funny, but isn't notepad a seriously longwinded way of doing this? most folks use EP because it means you can use Excel to manage your local file before exporting as a tab delimited file and dumping it into your store..

Link to comment
Share on other sites

The download ships with semi-colon set as default, but that's the first thing most folks change ;)

 

Not being funny, but isn't notepad a seriously longwinded way of doing this? most folks use EP because it means you can use Excel to manage your local file before exporting as a tab delimited file and dumping it into your store..

 

Yeah I just used notepad as the starting point :)

 

 

It uploaded all of the products finally however there are no pictures, and the pricing is all wrong, everything saved as 1.00 :'(

Edited by thessrtech
Link to comment
Share on other sites

Good stuff :)

 

Ditch the semi-colons, set to tab delim, have a play in Excel and try an export  from there.

 

Oh, and make sure you read the install file twice, and the comments in the code three times! :P :D :D

 

Dan

 

 

My sites all Fubar'd now what did I do wrong? :'(

 

http://ssr-engineering.com/apexstore/catalog/index.php

Link to comment
Share on other sites

What exactly did you do?

 

I don't know exactly? I uploaded and got a weird error however it said products have been added so i overlooked it.

 

Warning: Invalid argument supplied for foreach() in apexstore/catalog/admin/easypopulate.php on line 1778

 

 

I put : instead of ; on some of the items so i think it screwed the order up the first time, then I fixed it. and uploaded it again, and then the product names didn't show up...

 

 

How do you save as a tab delimited txt file from excel? I try to save as tab delimited and it just saves with spaces.

Edited by thessrtech
Link to comment
Share on other sites

file > save as > text (tab delimited) in the dropdown.

 

Tab delim will look like 'spaces' when open in notepad, but they're tabs alright.

 

Ensure you've changed the commented out lines in easypopulate.php as mentioned above too :)

 

Have a search on this trhead for your error - is your document root defined as per here:

 

http://www.oscommerce.com/forums/index.php?act...ndpost&p=665875

 

?

Link to comment
Share on other sites

file > save as > text (tab delimited) in the dropdown.

 

Tab delim will look like 'spaces' when open in notepad, but they're tabs alright.

 

Ensure you've changed the commented out lines in easypopulate.php as mentioned above too :)

 

Have a search on this trhead for your error - is your document root defined as per here:

 

http://www.oscommerce.com/forums/index.php?act...ndpost&p=665875

 

?

 

 

I just did everything you told me too, saved from excel, deleted all the junk categories and started over. Nothing happened and I got this message..

 

File uploaded.

Temporary filename: /var/tmp/php6bW9ha

User filename: aem5.txt

Size: 3220

 

My document root doesen't have the apostrophe's around it like his did. It's just normal.

Edited by thessrtech
Link to comment
Share on other sites

- Provide "EasyPopulate" Local Maintenance Database??

- IN ONE MINUTE- USE A DB TO CREATE PDF PRODUCT CATALOG FOR YOUR CUSTOMERS!

(and make store maintanance simple)

 

I read here that people seem to use Excel to maintain their product. Why wouldn't you use a (local) database?? I use FileMaker Pro (Mac). Export with EasyPopulate and import into Filemaker.

 

Using a db is easier and provides many more options and opportunities. For example, with Filemaker I have a "layout" view where I can just hit a "button" and print a paper catalog. With a db you can pre-fill fields when you create a new record, etc. Allows for much more automation. I just don't understand why you'd want to mess with Excel???

 

And how's this for a trick... Using my database I setup a "catalog" layout. Using Mac OSX I then print the catalog as a "PDF" file and upload to my site (with a "catalog") link. In one minute I have a pdf catalog available for customers to download and with no work at all on my part (after initial db layout is done). Let's see you do that with Excel! :rolleyes:

 

I'm not much help with PHP but if you need any DataBase help/suggestions (especially Filemaker Pro)removed

I may develop an "EasyPopulate database" to contribute here. I'm surprised someone hasn't done that yet.

 

any comments??? any interest??

 

removed

Edited by Mibble
Link to comment
Share on other sites

filemaker pro costs money. lots of people use openoffice which is available freely. also most poeple do not have a mac, using a pc, thus not using macosx

Edited by Mibble
Link to comment
Share on other sites

did you change the code in ep from semicolon to tab delimited?

 

I just did everything you told me too, saved from excel, deleted all the junk categories and started over. Nothing happened and I got this message..

 

File uploaded.

Temporary filename: /var/tmp/php6bW9ha

User filename: aem5.txt

Size: 3220

 

My document root doesen't have the apostrophe's around it like his did. It's just normal.

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