Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easy Populate & Products Attributes


VJ

Recommended Posts

since no one has responded to this and perhaps that is because i didn't give enough information.

I am trying to have EP populate my attributes download table with the filenames to be downloaded. I'm sure there is a simple way to do this, but sadly I can't wrap my head around query languages well enough to do it :(

I appreciate any help that can be given.

EP doesn't do attributes

 

http://forums.oscomm...hat-does-it-do/

 

*EP does not now and probably will not ever load attributes. Attributes are not handled the way categories or product infomation is and the code is too complex, at least for the people that have attempted it so far. After you use EP to get the products into the database, use one of the attribute handling contribs to add and copy attributes

Link to comment
Share on other sites

Help -

 

Just installed if EP2.77a in a clean install of 2.3.1 and when I try to create a file to download the report auto fills onto the EP page in admin. I can create and write to a temp file which is ok but not nearly as convenient. Any help would be great.

 

I am not clear on what you trying to do, but from my experience it doesn't come any easier than using the temp file for downloads/uploads

Link to comment
Share on other sites

First of all may i say I am lovin this contribution.

 

I have loaded and gone thru some issues with the fine documetation and this thread. I hoping that I have not missed the answer to this as dont want to waste any ones time.

 

I have been reformatting a csv spreadsheet to comply with the EP upload template. This has worked wonders, however on my first successfull upload (that is no errors reported. I noticed that I had missed the reformatting of about 8 items as in their catagories. so I now have on the shop all the catagories but then some catgories named "aincat->Sub cat". I have amended the items but when I re-upload it does not correct this any ideas?

 

Thanking u guys in advance

 

Ricardo

 

To be honest I am not clear on what you mean, but check this and if I have missed the point let me know

 

 

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

 

 

EP won't delete anything. If you had the wrong category for the first upload, on the second upload when you have the correct category it will put the product in the new category but the old category will remain.

 

You will have to delete the categories through the admin, be careful doing this, and dont use the back button on the browser when you are in the admin, especially when you are deleting categories.

 

Also I would check the trouble shooting section in the documentation as it is very good

Link to comment
Share on other sites

since no one has responded to this and perhaps that is because i didn't give enough information.

I am trying to have EP populate my attributes download table with the filenames to be downloaded. I'm sure there is a simple way to do this, but sadly I can't wrap my head around query languages well enough to do it :(

I appreciate any help that can be given.

 

Hi, ignore my previous reply, I think EP could handle attributes on later versions but I wouldn't have a clue about using attributes with EP

Link to comment
Share on other sites

I am not clear on what you trying to do, but from my experience it doesn't come any easier than using the temp file for downloads/uploads

 

True - Temp does - But the pop up box for excel does not come up when I create otherwise

Link to comment
Share on other sites

I was just wondering does easypopulate use the products_model because its the first column in csv and would it update off a different column if I say added a products_id column???

 

Mark

 

As far as I am aware, the products_model field is essential for Easy Populate (EP). Not sure what you mean about products_id

Link to comment
Share on other sites

As far as I am aware, the products_model field is essential for Easy Populate (EP). Not sure what you mean about products_id

 

What I mean is if I modified easypopulate so instead of the first column being products_model but products_id - would easypopulate use the products_model field as the key field for updating the store.

 

The reason I need to update by products_id is because I am creating an online parts system with exploded diagrams and the same part can be in different categories but with the same model number, the problem arises because I am using unique reference numbers on the exploded diagrams which correspond to the product so I have multiple products with the same model number.

 

Mark

Link to comment
Share on other sites

What I mean is if I modified easypopulate so instead of the first column being products_model but products_id - would easypopulate use the products_model field as the key field for updating the store.

 

The reason I need to update by products_id is because I am creating an online parts system with exploded diagrams and the same part can be in different categories but with the same model number, the problem arises because I am using unique reference numbers on the exploded diagrams which correspond to the product so I have multiple products with the same model number.

 

Mark

If I understand what you are saying, why don't you swap the format, put the unique reference numbers in the products_model field and create a new field to hold the actual part number? Probably much easier than changing how the products_model field works

Link to comment
Share on other sites

Hello all,

 

Just looking to install Easy Populate v2 77a (given that I understand this to be the latest version), but wanted to check the following first. When I come to following the install instructions, I note the following;

 

STEP #1 - Upload the following files to your osCommerce Store Directory

 

· Copy file /catalog/admin/easypopulate.php into /catalog/admin/ or whatever folder you have placed the osCommerce admin.

 

· Copy file /catalog/admin/easypopulate_functions.php into /catalog/admin/ folder.

 

Copy file /catalog/admin/includes/classes/table_block.php into /catalog/admin/ folder.

· Copy the /catalog/admin/EPDocumentation/ folder (3 files) into your /catalog/admin/ folder.

 

Should the file name (table_block.php) be copied into the catalog/admin/includes/classes folder and not the admin folder?

Edited by Fresh Start

Kind regards,

 

Peter...

Link to comment
Share on other sites

Hello all, again,

 

Another question. Have just installed Easy Populate v2 77a - went into the admin panel / catalogue, but EP was not there :'( Any idea's where I have gone wrong?

 

Apart from my previous question regarding placing the table_block.php file, I did note that step 3 of the install did not go as planned. The admin panel crashed with the following code;

 

 

STEP #3 - Add a link in the Admin Panel. Edit file "/catalog/admin/incudes/boxes/catalog.php"

 

Find this code (Around Line 25):

 

'' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '' .

 

Directly AFTER add this:

 

'Easy Populate' .

 

Admin panel reappeared when I changed the code to the following;

 

'title' => BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES, 'Easy Populate' .

 

Any idea's where I should start?

:'(

Kind regards,

 

Peter...

Link to comment
Share on other sites

Hi,

 

I would like to know this please..

 

I have an older oscommerce and want to transfer the sql to the new oscmax version... 2.025

 

Because the sql is different I can't just export and import unfortunately.

 

I have exported every table from the old dbase with phpmyadmin to a csv file for Excel and wondered whether I can import this using EP.

 

Will it import the Excel csv as it is or do I have to change it somehow?

 

Thanks

 

oz

Link to comment
Share on other sites

Hi,

 

I would like to know this please..

 

I have an older oscommerce and want to transfer the sql to the new oscmax version... 2.025

 

Because the sql is different I can't just export and import unfortunately.

 

I have exported every table from the old dbase with phpmyadmin to a csv file for Excel and wondered whether I can import this using EP.

 

Will it import the Excel csv as it is or do I have to change it somehow?

 

Thanks

 

oz

 

I've never worked with oscmax before. But I think the best way is to check this is to install EP in oscmax and download the complete shop into csv and check if the column's are the same.

If not, you can always copy past everything in the right column.

Edited by mreuver
Link to comment
Share on other sites

Need help here. How can i import "product_id" into data base with ep? Ive added the field into feed and its not taking the number on the feed, instead the shop is just automatically giving it a id

 

Heres whats really going on ... lol

 

I have need to change wholesalers... I have 3 feeds.

 

1 with all the categories that looks like this ( I could easily input this into data base manually, no big deal, as long as the ids match the names...)

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

categoryID,categoryname

"1","LOTIONS and CREAMS"

"2","ACCESSORIES"

"3","ADJUSTABLE"

 

1 Product feed looks like this after i run a script to capture the data i need.. No problem, except there isn't any categories....

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

v_products_model,v_products_name_1,v_products_description_1,v_products_image,v_products_id,v_products_price,v_products_quantity,v_products_weight,v_manufacturers_name,v_tax_class_title,v_status,EOREOR

BPW103,Bpw Pump Pack 2 1/4 In,"The Boston Professional Pump is the high tech enlargement system made in U.S.A. State of the Art Connector/Air Valve allows pump to disconnect from cylinder while maintaining exact pressure chosen. Heavy duty, light weight hand held Industrial pump. This combination pack includes the pump and the cylinder.",http://img.mysite.com/item_pics/20_5.jpg",20,151.9232,0,1.22,Boston Trading Company,Taxable Goods,Inactive,EOREOR

 

 

And a second feed that has category to product id info and it looks like this

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

itemid,itemsku,categoryID

"2","ACN4591","45"

"2","ACN4591","164"

"8","ALS5100","45"

"18","","118"

"18","","138"

"19","","118"

"19","","138"

"20","BPW103","118"

"20","BPW103","138"

"21","BPW104","118"

"21","BPW104","138"

"22","BPW105","118"

"22","BPW105","138"

"22","BPW105","191"

"23","BPW106","118"

"23","BPW106","138"

 

So basically i need some way to merge the 2 files and add categorys to main products feed in relation to categories to product id feed first.

 

Any Ideas?

Link to comment
Share on other sites

Anyone already working on the support for assinging multiple images to a product for the osCommerce 2.3.1 version?

 

PRODUCTS IMAGE SUPPORT for V2.31 (EP 2.76 for v2.31)

 

Sorry that I dont give the line numbers, because my EP enhanced more. I hope this maybe help.

 

 

 

// default settings
// Products Images for oscommerce v2.31 table stucture
define ('EP_PRODUCTS_IMAGES', false);  // default is false
define ('EP_PRODUCTS_IMAGES_MAX', 6);  // default is 6, maximum number of columns

 

// build images fields. Note: this building limited!
if (EP_PRODUCTS_IMAGES == true) { 
 //$default_these[] = 'v_products_images_htmlcontent';
 for ($i=1;$i<=EP_PRODUCTS_IMAGES_MAX+1;$i++) {
$default_these[] = 'v_products_images_image_' . $i;
$default_these[] = 'v_products_images_htmlcontent_' . $i;
 }
}

 

 

// get data from products images table
       	if (EP_PRODUCTS_IMAGES == true) {
         	$i = 1;
         	$pi_result = tep_db_query("SELECT * FROM ".TABLE_PRODUCTS_IMAGES."  WHERE products_id = " . $row['v_products_id'] . " limit " . EP_PRODUCTS_IMAGES_MAX);
         	while ($pi_row = tep_db_fetch_array($pi_result)) {
           	$row['v_products_images_image_'.$i] = $pi_row['image'];
           	$row['v_products_images_htmlcontent_'.$i] = $pi_row['htmlcontent'];
           	$i++;
         	}
       	}

 

// results displaying
     	if (EP_PRODUCTS_IMAGES == true) {
       	$cells[$tmp_row_count][$tmp_col_count++] = array('text' => '<table border="0" cellpadding="0" cellspacing="0"><tr><td class="smallText">' . tep_draw_checkbox_field('epcust_prod_images', 'show', (!empty($_GET['epcust_pi'])?true:false)) . '</td><td class="smallText"> add images' . '</td></tr></table>');
     	}

 

// settings display info

 

 			Products Images: <?php echo (EP_PRODUCTS_IMAGES?'<font color="green">true':'<font color="grey">false'); ?></font><br />

 

// Quick Links

     	<!-- Products Images Support //-->
     	<a href="easypopulate.php?download=stream&dltype=prodimage<?php if (defined('SID') && tep_not_null(SID)) { echo '&'.tep_session_name().'='.tep_session_id(); } ?>">Download <b>Model/Images<?php if (EP_SPPC_SUPPORT == true) { echo ' w/SPPC'; } ?></b> <?php echo ((EP_EXCEL_SAFE_OUTPUT == true)?".csv":".txt"); ?> file to edit</a><br />
     	<!-- Products Images Support end //-->

 

     	<!-- Products Images Support //-->
     	<a href="easypopulate.php?download=tempfile&dltype=prodimage<?php if (defined('SID') && tep_not_null(SID)) { echo '&'.tep_session_name().'='.tep_session_id(); } ?>">Create <b>Model/Images<?php echo ((EP_EXCEL_SAFE_OUTPUT == true)?".csv":".txt"); ?> file in temp dir</a><br />
     	<!-- Products Images Support end //-->

 

// building fields
if (EP_PRODUCTS_IMAGES == true) { 
 	for ($i=1;$i<=EP_PRODUCTS_IMAGES_MAX+1;$i++) {
   	$ep_products_layout_product .= '$filelayout[\'v_products_images_image_'.$i.'\'] = $iii++;
                                   	$filelayout[\'v_products_images_htmlcontent_'.$i.'\'] = $iii++;
              						';
 	}
}

 

// upgrade method only. Note: if you upgrades more and more the id number will be hihger. I suggest that picture upgrades use last
// or delete always v_products_images_image_1 column to prevent effect
		if (EP_PRODUCTS_IMAGES == true) { 
 			if (isset($filelayout['v_products_images_image_1'])) {
 				tep_db_query("delete from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$v_products_id . "'");
 				for ($i=1;$i<=EP_PRODUCTS_IMAGES_MAX;$i++) {
       	$pi_htmlcontent_var = 'v_products_images_htmlcontent_'.$i;
       	$pi_image_var = 'v_products_images_image_'.$i;
       	if (!empty($pi_image_var) || !empty($pi_htmlcontent_var)) {
         	tep_db_query("insert into " . TABLE_PRODUCTS_IMAGES . " (products_id, image, htmlcontent, sort_order) values ('" . (int)$v_products_id . "', '" . tep_db_input($pi_image_var) . "', '" . tep_db_input($pi_htmlcontent_var) . "', '" . tep_db_input($i) . "')");
       	}
 				}
 			}
		}

 

// case action
case 'prodimage':
   	$iii = 0;
   	$filelayout = array();

   	$filelayout['v_products_model'] = $iii++;

   	foreach ($languages as $key => $lang){
       	$filelayout['v_products_name_'.$lang['id']]    	= $iii++;
       	//$filelayout['v_products_description_'.$lang['id']] = $iii++;
       	//$filelayout['v_products_url_'.$lang['id']] 		= $iii++;
       	foreach ($custom_fields[TABLE_PRODUCTS_DESCRIPTION] as $key => $name) { 
         	$filelayout['v_' . $key . '_'.$lang['id']] 		= $iii++;
       	}
       	if (!empty($ep_additional_layout_product_description)) {
         	eval($ep_additional_layout_product_description);
       	}

   	}

   	$filelayout['v_products_image'] = $iii++;

   	if (!empty($ep_additional_layout_product)) {
     	eval($ep_additional_layout_product);
   	}

   	$filelayout_sql = "SELECT
       	p.products_id as v_products_id,
       	p.products_model as v_products_model,
       	p.products_image as v_products_image,
       	$ep_additional_layout_product_select
       	p.products_status as v_status
       	FROM
       	".TABLE_PRODUCTS." as p
       	" . $sql_filter;
   	break;

Edited by Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Hello,

 

I need to be able to download, work on (to add additional titles) and then upload the product information, including the extra product fields added by the 'Extra Fields' contribution.

 

Will this contribution 'Easy Populate' be all right to use for this purpose? Do I need to change anything before installing it, so that the extra product information is also included when I download, edit and upload?

Link to comment
Share on other sites

Hello,

 

I need to be able to download, work on (to add additional titles) and then upload the product information, including the extra product fields added by the 'Extra Fields' contribution.

 

Will this contribution 'Easy Populate' be all right to use for this purpose? Do I need to change anything before installing it, so that the extra product information is also included when I download, edit and upload?

 

Hi,

 

The Extra Fields contribution is catered for. The Easy Populate documentation gives good instructions on what's involved

Link to comment
Share on other sites

I have just gone through and added all the code for the large Product images as you indicated in the your memo.

I was able to get it to export to a csv file showing the correct columns and image names for the "v_products_images_image_1" etc fields.

However when I try to import the same csv file back into the database using Easypopulate 2.76i-231 the imported values for fields have the field names from the csv file only. ie large image 1 name is "v_products_images_image_1" and html1 is "v_products_images_htmlcontent_1"; large image 2 is ""v_products_images_image_2" and html2 is "v_products_images_htmlcontent_2".

 

Do you have any suggestions of what I need to look for in my changes to fix this?

 

Thanks

Rodney

Link to comment
Share on other sites

Hello,

 

Thank you for the fast reply.

 

I may still run into a few issues, as the products are for a bookshop, certainly with in excess of 300 titles. The task of adding new titles will be ongoing (probably on a weekly basis, or at least on a fortnightly basis).

 

From what I've read, Easy Populate would require the file to be split for download... but the upload seems still to be a potential problem - am I correct?

Link to comment
Share on other sites

I have just gone through and added all the code for the large Product images as you indicated in the your memo.

I was able to get it to export to a csv file showing the correct columns and image names for the "v_products_images_image_1" etc fields.

However when I try to import the same csv file back into the database using Easypopulate 2.76i-231 the imported values for fields have the field names from the csv file only. ie large image 1 name is "v_products_images_image_1" and html1 is "v_products_images_htmlcontent_1"; large image 2 is ""v_products_images_image_2" and html2 is "v_products_images_htmlcontent_2".

 

Do you have any suggestions of what I need to look for in my changes to fix this?

 

Thanks

Rodney

 

 

Hi Rodney,

 

 

I added "memo" codes after additional images.

 

if (EP_ADDITIONAL_IMAGES == true) { 
 	$ep_additional_layout_product_select .= 'p.products_image_description as v_products_image_description,';
}

if (EP_PRODUCTS_IMAGES == true) { 
 	for ($i=1;$i<=EP_PRODUCTS_IMAGES_MAX+1;$i++) {
   	$ep_additional_layout_product .= '$filelayout[\'v_products_images_image_'.$i.'\'] = $iii++;
                                   	$filelayout[\'v_products_images_htmlcontent_'.$i.'\'] = $iii++;
                                  	';
 	}
}

if (EP_MORE_PICS_6_SUPPORT == true) { 
 	$ep_additional_layout_product .= '$filelayout[\'v_products_subimage1\'] = $iii++;
                                   	$filelayout[\'v_products_subimage2\'] = $iii++;
                                   	$filelayout[\'v_products_subimage3\'] = $iii++;
                                   	$filelayout[\'v_products_subimage4\'] = $iii++;
                                   	$filelayout[\'v_products_subimage5\'] = $iii++;
                                   	$filelayout[\'v_products_subimage6\'] = $iii++;
                                   	';
}	

 

Some reason the values can't outputed to file

 

       	if (EP_ADDITIONAL_IMAGES == true) {
         	$i = 2;
         	$ai_result = tep_db_query("SELECT * FROM ".TABLE_ADDITIONAL_IMAGES."  WHERE products_id = " . $row['v_products_id'] . " limit " . EP_ADDITIONAL_IMAGES_MAX);
         	while ($ai_row = tep_db_fetch_array($ai_result)) {
           	$row['v_products_image_'.$i] = (!empty($ai_row['popup_images'])?$ai_row['popup_images']:$ai_row['thumb_images']);
           	$row['v_products_image_description_'.$i] = $ai_row['images_description'];
           	$i++;
         	}
       	}

       	if (EP_PRODUCTS_IMAGES == true) {
         	$i = 1;
         	$pi_result = tep_db_query("SELECT * FROM ".TABLE_PRODUCTS_IMAGES."  WHERE products_id = " . $row['v_products_id'] . " limit " . EP_PRODUCTS_IMAGES_MAX);
         	while ($pi_row = tep_db_fetch_array($pi_result)) {
           	$row['v_products_images_image_'.$i] = $pi_row['image'];
           	$row['v_products_images_htmlcontent_'.$i] = $pi_row['htmlcontent'];
           	$i++;
         	}
       	}

       	if (EP_MVS_SUPPORT == true) { 
         	$vend_result = tep_db_query("select vendors_name from ".TABLE_VENDORS." where vendors_id = " . $row['v_vendor_id'] . "");
         	if ($vend_row = tep_db_fetch_array($vend_result)) {
           	$row['v_vendor'] = $vend_row['vendors_name'];
         	}
       	}

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Gergely,

 

Thanks for getting back to me.

 

I have checked my code again, comparing it to yours but can not see where the problem is. I did put the new code in after the code for the EP_ADDITIONAL_IMAGES.

I have checked that if I manually input a large image, I am able to export the data to a csv file with no problem, including the place holders for all six of the large images. It is just the import part that does not seem to work putting in the 'field name' for the value for every record.

 

Is there any chance that I can send you my easypopulate.php file to look over?

 

Thanks

Rodney

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