Jump to content
VJ

Easy Populate & Products Attributes

Recommended Posts

ok a few things on downloading attributes . . .

 

I just tested, have 2100 products in the database i am using for testing, and made the request to create model/attributes in the temp folder.

 

approximately line 105, a comment is there for specific attributes.

I set mine to select one option, Color (I have probably 500 products with that option)

 

i also changed my php.ini max_execution_time to 300 (which really is not enough for doing this). I do have product downloaded, however it easily exceeds Excel limitations.

$attribute_options_select = "Color"; //array('Color', 'Size');


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

Working from this morning on to get EP to work

I add the code that is below but i seem to get errors all the time

is the code below correct ??? please help me out to get EP to wrok it will save me lots of time

 

3. For adding link to the Admin, edit file admin/includes/boxes/catalog.php by adding this line:

 

'<a href="' . tep_href_link('easypopulate.php', '', 'NONSSL') . '" class="menuBoxContentLink">Easy Populate</a><br>'.

 

After:

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '"

class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES .

'</a><br>' .

 

see my catalog.php below

 

*/

?>

<!-- catalog //-->

<tr>

<td>

<?php

$heading = array();

$contents = array();

 

$heading[] = array('text' => BOX_HEADING_CATALOG,

'link' => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog'));

 

if ($selected_box == 'catalog') {

$contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_MANUFACTURERS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_REVIEWS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SPECIALS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_LATEST_NEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_LATEST_NEWS . '</a>');

'<a href="' . tep_href_link('easypopulate.php', '', 'NONSSL') . '" class="menuBoxContentLink">Easy Populate</a><br>'.

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '"class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES .'</a><br>' .

 

 

}

 

$box = new box;

echo $box->menuBox($heading, $contents);

?>

</td>

</tr>

<!-- catalog_eof //-->

Share this post


Link to post
Share on other sites

you did not place it in the correct spot, thus you have an ending ); prior to easy populate, which is causing your problem. if you want to do it as you have it, then you need to move your ending statement. Best thing to do, is to reread the instructions, it states:

After:

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '"

class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES .

'</a><br>' .

you do not have it there.


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

Hi John,

 

I used your code as you said and it worked great! Thank you for your help. I truly appreciate it.

 

Just wondering if you know of a way to make the textbox to take input in multi lines, say 2 or 3 lines instead of one line. I need a box like the comments box for customers to input their gift message for items. I have been all over the forum, but can't seem to find out how to do that. One gentleman did it, but he couldn't remember how.

 

Again, THANK YOU SO MUCH for your help.

Share this post


Link to post
Share on other sites

File uploaded.

Termporary filename: /tmp/phpjNOVOc

User filename: onse.txt

Size: 546256

 

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 12 bytes) in /home/dalmar/public_html/kauppa/catalog/admin/easypopulate.php on line 1229

 

ok please help ...

Share this post


Link to post
Share on other sites

prior to uploading you need to do a download, to see what the file looks like.

 

did you do that, then add your products that way?

 

sounds like your file is all messed up somehow.


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

I'm just starting to use easypopulate and I have encountered two problems.

 

1) I download, edit, save and upload my attributes file. The data in my browser is correct, but my database does not get updated. What now?

 

2) Whenever I upload the file the item I updated is shown as not in stock and I have to edit the product and mark it "in stock". Can I make it "in stock" always after an upload?

 

Norm

Share this post


Link to post
Share on other sites

Ive exceeded the attributes for the excel spreadsheet. can I put them in manually? after the quantity but before manufacturers name?

 

The more I use this the better it becomes, thanks again for the contrib.

 

One other comment, I find it best to work with just spreadsheets of each vendor. So I can update it quicker, I usually only have a 100 or so for each vendor.

 

How do you get EP to pull a complete spreadsheet without the attributes.. (only the attributes missing) I dont see that option. doesnt look like it would be too hard to change, maybe I will look at it.

Share this post


Link to post
Share on other sites

Hi,

 

I just installed ep 2.7.3.

 

I download the file,edit and upload it.

 

But here comes the problem:

- all of the products now is double. what happen here?

 

It seems it does not overwrite the old database, it just add as if a new database. That's why now i have 2 x products inventory.

 

can anybody help?

 

Thanks,

Danny

Share this post


Link to post
Share on other sites

Another follow up question:

 

How do i make bulk deletion? say i want to delete product 1-100, without deleting it one by one.

 

can this contribution do this? thanks again,

danny

Share this post


Link to post
Share on other sites

Easy "POPULATE" doesnt yet delete products, I think what they said somewhere in this thread it might be in a future release.

 

You might want to try and set the items inactive.. but to mass delete maybe try to go right into the database? phpmyadmin?

Share this post


Link to post
Share on other sites

there are a few things to do in the database if you delete a product, that is another subject. the thing to consider if you delete one, is then there will be no record for your customers in their acccount of what they have purchased, as the products are no longer in the database. products dont use that much space, is there really a reason to delete unless you may need to delete 10000 items in a 1000000 record or higher database

 

for your double products, you probably changed something in how the model # is, etc. if not exact to your database they will then show up as double. which means you can not change the model # and category, etc.

Edited by Mibble

John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

I have added a minor release (2.74) to EP to fix a couple of issues in v2.73

 

http://www.oscommerce.com/community/contributions,500

 

- Fixed rounding issues with when using prices with tax.

- Fixed price with tax in Model/Price/Quantity download

- Modified Date Available code to set Null if left empty (instead of setting current timestamp)

 

Thanks to all for the hard work on this contribution and to John (Mibble) for all his hard work in supporting it.

 

Cheers

Rob

Share this post


Link to post
Share on other sites

I got a question on how it handles ". Right now it changes them to ". This seems not to work well on display if the " it changed was in a tag such as <td colspan="2">

 

After you upload it back to the database and display the product the source code it showing <td colspan=Ŗ"> which I dont think the browser likes. It converts the others like ' though so that is weird

 

is there any way around this little problem?

Edited by ryanf

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

Share this post


Link to post
Share on other sites

try adding a '\' in front of your " and also your ' then those will go in as absolute values which should then allow that to work.

 

there is a conversion in osc which shows what characters are converted to what.


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

try adding a '\' in front of your " and also your ' then those will go in as absolute values which should then allow that to work.

 

there is a conversion in osc which shows what characters are converted to what.


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

That doesn't seem to work. I don't know if it is changing on my when I edit the description in the admin panel but I know that it looks fine before I download ep and bad after I upload it.

Edited by ryanf

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

Share this post


Link to post
Share on other sites

look in your easy populate file,

 

line 01327: $items[$i] = str_replace('\"\"',""",$items[$i]);

01329: $items[$i] = str_replace('\"',""",$items[$i]);

01339: $items[$i] = str_replace('""',""",$items[$i]);

01341: $items[$i] = str_replace('"',""",$items[$i]);

 

 

there are move but that gives you an idea


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

well, problem solved, I am just going to leave out the quotation marks. It seems to work on all the browsers, at least the newer ones. Does anyone know if it will mess up the older ones?


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

Share this post


Link to post
Share on other sites

Greetings everyone,

 

GREAT contribution. This is exactly what I needed, and my vote for the best contrib ever! Unfortunately, I have a few questions I am hoping you all can help with (there always are, eh?)

 

First, I have multiple products that need to be listed in multiple categories. They are the SAME product, they just apply to multiple pieces of machinery. For example:

 

Category 1

- Sub Category 1.1

- Sub Category 1.2

-- Item 1.2.1

- Sub Category 1.3

- Sub Category 1.4

Category 2

Category 3

- Sub Category 3.1

-- Item 3.1.1 (SAME ITEM AS Item 1.2.1)

 

My problem comes in with the model numbers. In the above example, Item 1.2.1 and Item 3.1.1 need to have the same model numbers, to be easily searchable by the end user. But as far as I can tell from EP documentation, EP *requires* that model numbers are unique. Is there any way around this requirement?

 

Second, I don't want to populate all the attributes that EP has in their default csv file. Basically, I just want:

 

v_products_model

v_products_image (default, no image)

v_products_name_1

v_products_description_1

v_products_url_1

v_products_name_2

v_products_description_2

v_products_url_2

v_products_name_3

v_products_description_3

v_products_url_3

v_products_price

v_products_weight

v_date_avail

v_date_added

v_products_quantity

v_manufacturers_name

v_categories_name_1

v_categories_name_2

v_categories_name_3

v_tax_class_title

v_status

 

Can I create a CSV with ONLY these files and have it still work? Logically, it seems like I should be able to... but I figure I'd ask you experts first.

 

Third, is there any place I can get exact documentation of what each field is? For example, what exactly is the difference between v_products_name_1, v_products_name_2, and v_products_name_3? What about v_categories_name_1, v_categories_name_2, and v_categories_name_3?

 

Many thanks to anyone who can help with these questions... and once again, GREAT contribution!

Share this post


Link to post
Share on other sites

Hi all,

 

I added some code to make products with price 0 also inactive.

I rather have them deleted, but this fuction is still not available.

 

But my question is, does someone know a page with an overview of the table relations in the database???

 

eg. orders <-> orders_products etc. etc.

 

Thank you.

 

Greetz.

RattleSn@ke.

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

×