Zen Cart Logo
Forums / Addon Admin Tools / EasyPopulate 4.0 Support Thread

EasyPopulate 4.0 Support Thread

Sticky

Views: 733,317

Results 2,081 to 2,100 of 3,671
30 Aug 2015, 3:46 PM
#2081
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

EasyPopulate 4.0 Support Thread

Looper:

mc12345678,

install went good. i downloaded a file and excel 2013 opened fine. So i edited one products name description, and price. saved to my temp file in the csv format. then i upload and all seems good. however when i refresh my browser and check the item to see if the corrections are there, nothing changed. Am i missing something under "Product & Pricing Export/Import Options:"?

Looper

Items bolded are addressed below and in sequence with their occurrence in the paragraph.

  1. downloaded a file - Prefix of downloaded file?
  2. temp file - Prefix of file or just provide the full name of file?
  3. after upload, was the file imported? (Please remember details are important, we are not able to see your computer screen while you do the things described.)
  4. missing something - Well, also depends on which of the four options were chosen for export as to when importing what fields will be updated/modified...

Also, while not impossible to use Excel, there are potential issues with its use instead of Open Office which is the recommended editor. Excel tends to cause some issues with 1) quotation and upload of data and 2) dates as the saved date format should be YYYY-MM-DD where YYYY represents the four digit year, MM represents the two digit month (ie 05) and DD represents the two digit day (ie 24) and sometimes it does not save in that format... (I tend to omit the date column(s) if I have to use Excel in place of Open Office)

30 Aug 2015, 4:49 PM
#2082
looper avatar

looper

New Zenner

Join Date:
Aug 2006
Posts:
52
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Success File uploaded successfully: Full-EP2015Aug30-162632.csv

30 Aug 2015, 5:00 PM
#2083
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

Uploading only puts the file on the server for it to then be used for other operations... For example, if it is known that the file is going to have a large number of rows and from past experience importing that many rows will be a problem, it is possible to split the file after it is uploaded and before it is imported...

Upload puts on server, import puts in database. Much like export pulls from database (puts on server), download pulls from server (brings to local computer)...

Not quite there yet.. Find the file in the list down on the screen, select import to the right of the filename... (after you have made your backup in case there are any issues. :) )

30 Aug 2015, 5:22 PM
#2084
looper avatar

looper

New Zenner

Join Date:
Aug 2006
Posts:
52
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

mc12345678,

that did it. many thanks!!! :)

30 Aug 2015, 5:32 PM
#2085
looper avatar

looper

New Zenner

Join Date:
Aug 2006
Posts:
52
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

got it. many thanks!!) I am still using 4.0.30 version

30 Aug 2015, 5:46 PM
#2086
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

Looper:

got it. many thanks!!) I am still using 4.0.30 version

That's okay, seeing what the issue was, 4.0.31 would not have resolved the situation any better. :)
On that note, regarding the version information that is in your signature. It may help someone right now troubleshoot an issue right now, but a year down the road, when someone sees the problem that you had (assuming such problem might relate to info in your signature) then today's message and problem may not line up with tomorrows configuration. Bottom line, the signature should not be the sole means of identifying version information. Version information applicable to a problem/solution should be included in the text of the message that generally will not change.

30 Aug 2015, 5:58 PM
#2087
looper avatar

looper

New Zenner

Join Date:
Aug 2006
Posts:
52
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

:)

not sure i understand, something wrong with my signature?

30 Aug 2015, 7:08 PM
#2088
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

Looper:

:)

not sure i understand, something wrong with my signature?

Not for the purposes of the issues identified so far in this forum.

Point is, if you do come across any issues that need to be corrected, please be sure to include that information (and other that is covered in the posting tips) in the bulk of the message. It will help those helping you (in case the signature is not up-to-date) and those in the future (as the signature gets changed to reflect other information).

31 Aug 2015, 10:37 AM
#2089
cefyn avatar

cefyn

New Zenner

Join Date:
May 2007
Posts:
87
Plugin Contributions:
1

Re: EasyPopulate 4.0 Support Thread

Hi MC , fancy meeting you here . Zen Cart 1.5.4 ,yesterdays EP4 update . SBA 1.5.4 .When I import SBA-Stock-EP2015 whether edited in office libre or excel I get this error on every product.
MySQLi error 1062: Duplicate entry '' for key 'idx_customid'
When executing:
UPDATE products_with_attributes_stock SET
quantity = 1, customid = ''
WHERE (
stock_id = 122 )
Perhaps you could help an inaccurate and unreliable operator to get back on the right track. Sorry, had to laugh at your comment on the SBA thread , I probably have made a stupid mistake somewhere.

31 Aug 2015, 5:28 PM
#2090
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

cefyn:

Hi MC , fancy meeting you here . Zen Cart 1.5.4 ,yesterdays EP4 update . SBA 1.5.4 .When I import SBA-Stock-EP2015 whether edited in office libre or excel I get this error on every product.
MySQLi error 1062: Duplicate entry '' for key 'idx_customid'
When executing:
UPDATE products_with_attributes_stock SET
quantity = 1, customid = ''
WHERE (
stock_id = 122 )
Perhaps you could help an inaccurate and unreliable operator to get back on the right track. Sorry, had to laugh at your comment on the SBA thread , I probably have made a stupid mistake somewhere.

Liked that, huh? :)

So, the obvious solution is to provide a unique customid for each and every product variant... But if that were the only solution then how could the SBA plugin work without having a unique customid for each and every variant?

Couple of things going on here, I just had to figure out a good way to resolve it... See, the customid is designated as a unique key in the table definition for SBA, which means that every customid (that has data) is supposed to be different from every other customid. But unique keys (different than a primary key) are supposed to also be allowed the value NULL...

Okay, so it could be set to null... But then there is the issue that some servers treat '' as null or reject null expecting ''... So sure could omit the customid from the update if it is not provided, but then what if it were being reset to blank/NULL? Still needs to get updated to blank/NULL without losing the other properties of the entry...

Why does it seem that this issue has "snuck in"? When this feature was initially developed, I was advised that there would be a unique customid applied to each and every product (and was provided an example file dataset to match), so.. Naturally when I was testing it I followed suit and had a unique customid applied to each such product... No issues, right? Well, no one till now had pointed out the flaw which was that the case of populating the SBA database with stock quantities failed for product that did not have a customid (same thing will happen if it does have a customid but it is not unique compared to all other customid entries). Not sure I totally agree with the later requirement, but seems there was a need for it so I don't want to go mess that up...

So, I could upload a revision 4.0.31a to fix the issue above... It's not so significant to warrant a complete revision number change I think, just a bug fix... or I could provide the below code fix.. :) The problem is seen in both the stock and the detailed imports, so corrections are provided for both below.

Now, as for sorting by name.... :) If going to add that as a feature, then probably should consider all the methods of sorting, or provide a way/instruction on how to setup the export of the SBA file to be sorted by name... (to make it quicker)... Afterall, the stock export is all about doing an inventory in a store that uses SBA, whereas the detailed SBA export is all about the SBA only aspect of the data... For some both data dumps are relatively the same, but for others that use SBA to "highlight" some product and not on all product, then the detailed SBA data relatively speaking will have far fewer rows than the sba stock dump... (Yes, I know that it is possible to have many many variants for a single product causing this "number of rows" discussion to be way off...)

For the detailed import fix, find in admin/easypopulate_4_import.php approximately line 397:

          $sql = $db->bindVars($sql, ':customid:', $items[$filelayout['v_customid']], 'string'); 

and replace with:

          $sql = $db->bindVars($sql, ':customid:', (zen_not_null($items[$filelayout['v_customid']]) ? $items[$filelayout['v_customid']] : 'NULL'), (zen_not_null($items[$filelayout['v_customid']]) ? 'string' : 'passthru'));

For the stock import fix, find in admin/easypopulate_4_import.php approximately line 494:

      } elseif ($items[(int)$filelayout['v_SBA_tracked']] == "X") {

Replace:

        } elseif ($items[(int) $filelayout['v_SBA_tracked']] == "X") {
          $sql = "UPDATE " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " SET 
					quantity					    = " . $items[(int) $filelayout['v_products_quantity']] . ($ep_4_SBAEnabled == '2' ? ", customid  = '" . $items[(string) $filelayout['v_customid']] . "' " : "") . ") . "
					WHERE (
					stock_id = " . $items[$filelayout['v_table_tracker']] . " )";
          if ($result = ep_4_query($sql)) {
            zen_record_admin_activity('Updated products with attributes stock ' . (int) $items[$filelayout['v_table_tracker']] . ' via EP4.', 'info');
            $display_output .= sprintf(EASYPOPULATE_4_DISPLAY_RESULT_UPDATE_PRODUCT, $items([int) $filelayout['v_products_model']]) . $items[(int) $filelayout['v_products_quantity']] . ($ep_4_SBAEnabled == '2' ? " " . $items[(string) $filelayout['v_customid']] : "");
            $ep_update_count++;
            if ($sync) {
              $stock->update_parent_products_stock((int) $query[$items[(int) $filelayout['v_products_model']]][(int) $filelayout['v_table_tracker']]);
              //		$messageStack->add_session('Parent Product Quantity Updated', 'success');
              unset($query[$items[(int) $filelayout['v_products_model']]]);
            }
          } else { // error Attribute entry not found - needs work!
            $display_output .= sprintf('<br /><font color="red"><b>SKIPPED! - SBA Tracked Quantity ' . ($ep_4_SBAEnabled == '2' ? 'and CustomID ' : '') . 'on Model: </b>%s - Not Found!</font>', $items[(int) $filelayout['v_products_model']]);
            $ep_error_count++;
          } // if 

        } //end if Standard / SBA stock

With:

        } elseif ($items[(int) $filelayout['v_SBA_tracked']] == "X") {
          $sql = "UPDATE " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " SET 
            quantity              = " . $items[(int) $filelayout['v_products_quantity']] . ($ep_4_SBAEnabled == '2' ? ", customid  = :customid: " : "") . "
                    WHERE (
                    stock_id = " . $items[$filelayout['v_table_tracker']] . " )";
          $sql = $db->bindVars($sql, ':customid:', (zen_not_null($items[$filelayout['v_customid']]) ? $items[ $filelayout['v_customid']] : 'NULL'), (zen_not_null($items[$filelayout['v_customid']]) ? 'string' : 'passthru'));
          if ($result = ep_4_query($sql)) {
            zen_record_admin_activity('Updated products with attributes stock ' . (int) $items[$filelayout['v_table_tracker']] . ' via EP4.', 'info');
            $display_output .= sprintf(EASYPOPULATE_4_DISPLAY_RESULT_UPDATE_PRODUCT, $items[$filelayout['v_products_model']]) . $items[$filelayout['v_products_quantity']] . ($ep_4_SBAEnabled == '2' ? " " . $items[$filelayout['v_customid']] : "");
            $ep_update_count++;
            if ($sync) {
              $stock->update_parent_products_stock((int) $query[$items[(int) $filelayout['v_products_model']]][(int) $filelayout['v_table_tracker']]);
              //        $messageStack->add_session('Parent Product Quantity Updated', 'success');
              unset($query[$items[(int) $filelayout['v_products_model']]]);
            }
          } else { // error Attribute entry not found - needs work!
            $display_output .= sprintf('<br /><font color="red"><b>SKIPPED! - SBA Tracked Quantity ' . ($ep_4_SBAEnabled == '2' ? 'and CustomID ' : '') . 'on Model: </b>%s - Not Found!</font>', $items[(int) $filelayout['v_products_model']]);
            $ep_error_count++;
          } // if 

        } //end if Standard / SBA stock
31 Aug 2015, 11:27 PM
#2091
cefyn avatar

cefyn

New Zenner

Join Date:
May 2007
Posts:
87
Plugin Contributions:
1

Re: EasyPopulate 4.0 Support Thread

That's fantastic MC , the EP4 export/import SBA facility works perfectly with these edits. Thank you so much for the time and trouble you have taken to help me out.

1 Sep 2015, 12:01 AM
#2092
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

cefyn:

That's fantastic MC , the EP4 export/import SBA facility works perfectly with these edits. Thank you so much for the time and trouble you have taken to help me out.

Absolutely no problem, it's a shame that anything had to be done at all as that feature has been available for quite some time now and no one has commented about the issues involved.. Doesn't have to be a big production, and as have seen I only discovered the issue when it was commented about on some other forum... :)

I do recall that at the time of development there was a bit of a clock ticking and only some of the specific functionality was requested (meaning anything extra was a "bonus" but not a development requirement). I do know that a basic import/export will eventually follow; however, I've been wanting to wait until SBA structure and building is settled/finalized... It's expected to be somewhat complicated (meaning lot's of code to put together/write) and I'd rather write it one time and be done not having to revise it significantly because of significant changes in the SBA code/processing/structure.

For anyone reading, hopefully can see how easy it can be to have an issue corrected with proper information, methods of duplicating the issue and posing the question(s)/issue(s) to the proper location...

1 Sep 2015, 4:24 AM
#2093
looper avatar

looper

New Zenner

Join Date:
Aug 2006
Posts:
52
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Gotcha :)
Thanks

13 Sep 2015, 11:03 PM
#2094
blackorchidcouture avatar

blackorchidcouture

Zen Follower

Join Date:
Apr 2010
Location:
Albuquerque, NM
Posts:
198
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Hi all! So I have ZC v154 and have used Easy Populate 4 for around a year with no issues, and before that another version of EP for many years, so I know the ins and outs. I recently downloaded an EP file using the manufacturer filter so I could just update one category of products. I edited the file and uploaded it, and when I import the file I'm getting the error "No model field in record. This line was not imported". I know for a fact that the v_products_model fields are all filled in, I didn't change anything in that column.

So, I went onto GitHub and saw there was a newer version of EP4, so I installed that. It now looks different in my back end because of the updated version, but it is still doing the same error when I import the files (and I've tried a few files).

Ok, I've done a little more experimenting, and if I create a new EP file in my admin and import that, it imports fine and says the products have been updated. If I take this file and download it to my computer and then upload it again and import it, it also works. So it's somehow in editing my file, or renaming it, this edited file is the one that then says no model field in record. The only column I'm editing is the description, so I'm not sure what's happening.

Any ideas??? Thanks!

13 Sep 2015, 11:40 PM
#2095
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

Flename of revised file?

Looked at upload file with plain text editor to see that quotes are appropriately applied after save?

14 Sep 2015, 12:27 AM
#2096
blackorchidcouture avatar

blackorchidcouture

Zen Follower

Join Date:
Apr 2010
Location:
Albuquerque, NM
Posts:
198
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Ok, I'm a dork. I've been working on this for days. I just came back to my latest edited file and realized that just ONE of my model id fields had become blank somehow. So I'm not sure what was happening with the previous day's errors, but I think that upgrading to the newest version of EP4 helped, then I somehow deleted on of the model ID fields. Anyway, I just fixed that field, and uploaded/imported, and it worked!!!!!

Yeah, I'm a dork.....

Sorry for any confusion!!

14 Sep 2015, 12:39 AM
#2097
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

No, actually the way that you presented it indicated that it was something in the process on your side, so glad it was something easy to address. :) course thought was that all items in the list were an issue not just a single line. But hopefully there won't be a need to seek help in the future. :P of course if ever do, know where to swing by for assistance. :)

14 Sep 2015, 1:59 AM
#2098
blackorchidcouture avatar

blackorchidcouture

Zen Follower

Join Date:
Apr 2010
Location:
Albuquerque, NM
Posts:
198
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Thanks :)

18 Sep 2015, 9:39 PM
#2099
harryjl avatar

harryjl

New Zenner

Join Date:
Sep 2015
Location:
CA
Posts:
3
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Hey guys, whats the best way to add (if thats possible) custom fields into Attributes to be exported/imported.

Besides the "Price", I need to include the "Part#" to the DropDown Menu.

Any tips?

Thanks.

19 Sep 2015, 3:03 AM
#2100
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

HarryJL:

Hey guys, whats the best way to add (if thats possible) custom fields into Attributes to be exported/imported.

Besides the "Price", I need to include the "Part#" to the DropDown Menu.

Any tips?

Thanks.

Have you tried using the export Attributes Detailed link that is below the dropdowns? Or do you need to use the dropdowns for your purpose? And when you say "Part#" are you referring to the existing product_model field in the product database or an additional field that has been added?