Page 208 of 361 FirstFirst ... 108158198206207208209210218258308 ... LastLast
Results 2,071 to 2,080 of 3607
  1. #2071
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: EasyPopulate 4.0 Support Thread

    Quote Originally Posted by outeredge2 View Post
    Is there a sample file floating around that I could use to start putting together my products list?
    Not to be smart, but if you export your products list you'll have your own personal sample file... (Covered in instructions on how to use and learn to use the program)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #2072
    Join Date
    Mar 2010
    Location
    Green Bay, WI
    Posts
    360
    Plugin Contributions
    1

    Default Re: EasyPopulate 4.0 Support Thread

    Quote Originally Posted by mc12345678 View Post
    Not to be smart, but if you export your products list you'll have your own personal sample file... (Covered in instructions on how to use and learn to use the program)
    Not being smart at all..... I appreciate the response. Will look for it.

    Question:
    What is the difference between EasyPopulate 4.0 and Easy Populate 1.2.5.4? Which is better and easier to use?
    Forums are for helping people!! if you don't want to help people then shut up and get off the forum!

  3. #2073
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: EasyPopulate 4.0 Support Thread

    Quote Originally Posted by outeredge2 View Post
    Not being smart at all..... I appreciate the response. Will look for it.

    Question:
    What is the difference between EasyPopulate 4.0 and Easy Populate 1.2.5.4? Which is better and easier to use?
    I humbly can not answer the question of "which is easier" as I have not used the other version in a great deal of time if at all... I think I came across the issues that have not been addressed in that version and then when seeing what features were available in this one I made my decsion and as you can see do things to keep it afloat and fnd ways to make improvements (though really little has been needed to accomplish that because of the work put nto it.)

    But if not mistaken the other version doesn't support attributes, so I've heard. If a rumor, please disspell it... On the topic of attributes through the need of someone else and their permission some functionality was added to work with SBA (primarily as reworked by potteryhouse.)


    So hopefully the regular users of the program will chime in as they are the ones deal with it (or the other) routinely.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #2074
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: EasyPopulate 4.0 Support Thread

    Quote Originally Posted by adb34 View Post
    OK silly question time:

    I want to change the category that a lot of my products are in, so, if I use this plugin to download all my products, change the category of the products then upload. The question is will I duplicate the products in the different categories or will the category be over written by the new category?

    Told you it is a silly question!
    Quote Originally Posted by mc12345678 View Post
    Actually, not as silly as you may think. Normally this will create a linked product (duplicate but not so much a duplicate as it maintains the same products_id).

    There currently is no "remove a product from a category" type feature... If a product being processed on import is in the category "assigned", then nothing is done, if it is not in the category that is assigned/determined in the process, then the product is added to the category (if the category didn't exist before, then it is created before this addition).

    Removal from a category is somewhat of a two step process. The product's master_categories_id in the products table needs to reflect an existing category and the table products_to_categories needs to have the entry for the products_id removed for the category from which it is leaving and if not already associated with the new category an entry made... I did not find any code that did a delete on the products_to_categories table on import and there is nothing that specifically modifies an existing master_categories_id entry other than a product update with master_categories_id as a user defined field. The only other instance of affecting the master_categories_id is upon initial insert of a product as it must have/maintain a master_categories_id assigned.

    So, removal of a product from one category (ie part of a process to move a product from one category to another) is not yet in the code... Perhaps can come up with something like another status switch that would "reassign" the master_categories_id to the chosen category and remove the linked product from the products_to_categories table in relation to the previous master category (status of 9 deletes a product, perhaps a different number could be used to do a move). It would not *directly* resolve issues associated with other linked product, but it would support a move action... Technically if the product were moved through each respective linked category, then there would remain but one category associated with the product (this could be accomplished in a single file upload where each line of the file had the product moved to each linked category and then a final move to the desired end category...)

    Perhaps if considered further necessary (large issue with linked product) an additional option (dropdown, link, whatever) to address just bulk linked product changes would help...

    I would suggest though in the interim not counting on the above to happen/be implemented quickly... Work on this is generally a free time dependent project, though now that a path is seen, it may not be as long as originally anticipated and there are other factors that could make it go faster. :)
    Below is the code described above that I have prepared... I keep looking at it to ensure that each possibility is addressed and while I see that some conditions seem to be over described, I didn't want to eliminate the potential code needed to address the possibility of that condition. Would appreciate any operational testing feedback.. I've set up some tests that seem to have worked but could use some independent verification.

    So beginning in EP4 version 4.0.29 the following code begins at line 1508. The code begins at other locations for earlier versions but until now has remained relatively consistent code.

    The expectation of the below code is that if the status of a product is set to 7 (instead of the typical 0 to disable, 1 to enable, or 9 to delete), then the category of that row will become the master category for that item and the product will be removed from the previous master category. With the appropriate series of applicable add and move database entries a product's linked categories can be stripped, the master category revised to the desired category.
    I chose the number 7 to be non-adjacent to the number 9, but I also am concerned that for those using a number pad without looking at the pad that they may incorrectly enter 9 instead of 7; however, also hope that the difference in shape (sharp corners (7) versus rounded (9) or what is likely to be a majority (1 or 0) will stand out a little..) Could use a two+ digit status indicator or maybe a "word", but I'm going with what I got at the moment.

    Find:
    Code:
    //==================================================================================================================================
    			// Assign product to category if linked
    			// chadd - need to dig into further
    			if (isset($v_categories_id)) { // find out if this product is listed in the category given
    				$result_incategory = ep_4_query('SELECT
    					'.TABLE_PRODUCTS_TO_CATEGORIES.'.products_id,
    					'.TABLE_PRODUCTS_TO_CATEGORIES.'.categories_id
    					FROM
    					'.TABLE_PRODUCTS_TO_CATEGORIES.'
    					WHERE
    					'.TABLE_PRODUCTS_TO_CATEGORIES.'.products_id='.$v_products_id.' AND
    					'.TABLE_PRODUCTS_TO_CATEGORIES.'.categories_id='.$v_categories_id);
    					if (($ep_uses_mysqli ? mysqli_num_rows($result_incategory) : mysql_num_rows($result_incategory)) == 0) { // nope, this is a new category for this product
    					$res1 = ep_4_query('INSERT INTO '.TABLE_PRODUCTS_TO_CATEGORIES.' (products_id, categories_id)
    						VALUES ("'.$v_products_id.'", "'.$v_categories_id.'")');
                if ($res1) {
                  zen_record_admin_activity('Product ' . (int)$v_products_id . ' copied as link to category ' . (int)$v_categories_id . ' via EP4.', 'info');
                }
    				} else { // already in this category, nothing to do!
    				}
    			}
    //==================================================================================================================================
    And replace with:
    Code:
    //==================================================================================================================================
          // Assign product to category if linked
          // chadd - need to dig into further
              if (isset($v_categories_id)) { // find out if this product is listed in the category given
            $result_incategory = ep_4_query('SELECT 
              '.TABLE_PRODUCTS_TO_CATEGORIES.'.products_id,
              '.TABLE_PRODUCTS_TO_CATEGORIES.'.categories_id,
              '.TABLE_PRODUCTS.'.master_categories_id
              FROM
              '.TABLE_PRODUCTS.'
              LEFT JOIN
              '.TABLE_PRODUCTS_TO_CATEGORIES.' ON ('.TABLE_PRODUCTS.'.products_id = '.TABLE_PRODUCTS_TO_CATEGORIES.'.products_id AND '.TABLE_PRODUCTS_TO_CATEGORIES.'.categories_id='.$v_categories_id.')
              WHERE
              '.TABLE_PRODUCTS.'.products_id='.$v_products_id);
    $result_incategory = ($ep_uses_mysqli ? mysqli_fetch_array($result_incategory) : mysql_fetch_array($result_incategory));
              if (!zen_not_null($result_incategory['products_id']) || sizeof($result_incategory) <= 0 /* ($ep_uses_mysqli ? mysqli_num_rows($result_incategory) : mysql_num_rows($result_incategory)) == 0 */) { // nope, this is a new category for this product
                  if ($items[$filelayout['v_status']] == 7) {
    
                    /* $result_incategory = ep_4_query('SELECT 
                      '.TABLE_PRODUCTS.'.master_categories_id
                      FROM
                      '.TABLE_PRODUCTS.'
                      WHERE
                      '.TABLE_PRODUCTS.'.products_id='.$v_products_id);
    
                      $result_incategory = ($ep_uses_mysqli ? mysqli_fetch_array($result_incategory) : mysql_fetch_array($result_incategory)); */
                    //do category move action.
                    // if the master_categories_id != categories_id, then for "safety" sake, should successfully insert the product to the category before deleting it from the previous category. Should also verify that the master_categories_id is set, because if it is not then there is a bigger issue.  As part of the verification, if it is not set, then don't try to delete the previous, just add it and provide equivalent information.
                    if ((int) $result_incategory['master_categories_id'] != (int) $v_categories_id) {
                      //move is eminent
                      if ($result_incategory['master_categories_id'] > 0) {
                        //master_category is assigned to the product do the move.
                        // Ensure the product still is on the way to the move and available.
                        $res1 = ep_4_query('INSERT INTO ' . TABLE_PRODUCTS_TO_CATEGORIES . ' (products_id, categories_id)
                VALUES (' . $v_products_id . ', ' . $v_categories_id . ')');
                        if ($res1) {
                          //Successfully inserted the product to the category, now need to remove the link from the previous category.
                          $res1 = ep_4_query('UPDATE ' . TABLE_PRODUCTS . ' set master_categories_id = ' . $v_categories_id . ' 
                                     WHERE products_id = ' . $v_products_id);
    
                          $res2 = ep_4_query('DELETE FROM ' . TABLE_PRODUCTS_TO_CATEGORIES . ' WHERE products_id = ' . $v_products_id . ' AND categories_id = 
                                 ' . $result_incategory['master_categories_id']);
                          if ($res1 && $res2) {
                            zen_record_admin_activity('Product ' . (int) $v_products_id . ' moved to category ' . (int) $v_categories_id . ' via EP4.', 'info');
                          } else if ($res1 && !$res2) {
                            zen_record_admin_activity('Product ' . (int) $v_products_id . ' master_categories_id changed to category ' . (int) $v_categories_id . ' via EP4.', 'info');
                          } else if (!$res1 && $res2) {
                            zen_record_admin_activity('Product ' . (int) $v_products_id . ' deleted from category ' . (int) $result_incategory['master_categories_id'] . ' and added to category ' . (int) $v_categories_id . ' via EP4.', 'info');
                          } else if (!$res1 && !$res2) {
                            zen_record_admin_activity('Product ' . (int) $v_products_id . ' copied as link to category ' . (int) $v_categories_id . ' via EP4.', 'info');
                          }
                        }
                      } /* EOF Master Category is set */ else {
                        //master_category is not assigned, assign the category to the master category and do the move.
                        $res1 = ep_4_query('INSERT INTO ' . TABLE_PRODUCTS_TO_CATEGORIES . ' (products_id, categories_id)
                VALUES (' . $v_products_id . ', ' . $v_categories_id . ')');
                        if ($res1) {
                          //Successfully inserted the product to the category, now need to remove the link from the previous category.
                          $res1 = ep_4_query('UPDATE ' . TABLE_PRODUCTS . ' set master_categories_id = ' . $v_categories_id . ' 
                                     WHERE products_id = ' . $v_products_id);
                          if ($res1) {
                            zen_record_admin_activity('Product ' . (int) $v_products_id . ' moved to category ' . (int) $v_categories_id . ' via EP4.', 'info');
                          } else {
                            zen_record_admin_activity('Product ' . (int) $v_products_id . ' copied as link to category ' . (int) $v_categories_id . ' via EP4.', 'info');
                          }
                        }
                      } // EOF Master category is not defined.
                    } // End if master and category different, nothing else to do as no where to go because both are the same...
                  } /* EOF status == Move */ else {
                    $res1 = ep_4_query('INSERT INTO ' . TABLE_PRODUCTS_TO_CATEGORIES . ' (products_id, categories_id)
                VALUES (' . $v_products_id . ', ' . $v_categories_id . ')');
                    if ($res1) {
                      zen_record_admin_activity('Product ' . (int) $v_products_id . ' copied as link to category ' . (int) $v_categories_id . ' via EP4.', 'info');
                    }
                  } // Don't move the product
                } else { // already in this category, nothing to do! // Though may need to do the move action so there is still possibly something to do... 
                  if ($items[$filelayout['v_status']] == 7) {
    //                $result_incategory = ($ep_uses_mysqli ? mysqli_fetch_array($result_incategory) : mysql_fetch_array($result_incategory));
    
    //do category move action.
                    // if the master_categories_id != categories_id, then for "safety" sake, should successfully insert the product to the category before deleting it from the previous category. Should also verify that the master_categories_id is set, because if it is not then there is a bigger issue.  As part of the verification, if it is not set, then don't try to delete the previous, just add it and provide equivalent information.
                    if ($result_incategory['master_categories_id'] != $result_incategory['categories_id']) {
                      //move is eminent
                      if ($result_incategory['master_categories_id'] > 0) {
                        //master_category is assigned to the product complete the move.
                        // Ensure the product still is on the way to the move and available.
                        //      $res1 = ep_4_query('INSERT INTO '.TABLE_PRODUCTS_TO_CATEGORIES.' (products_id, categories_id)
                        //      VALUES ("'.$v_products_id.'", "'.$v_categories_id.'")');
                        $res1 = ep_4_query('UPDATE ' . TABLE_PRODUCTS . ' set master_categories_id = ' . $v_categories_id . ' 
                                     WHERE products_id = ' . $v_products_id);
    
                        /* if ($res1) */
                          //Successfully updated the product to the category, now need to remove the link from the previous category.
    
                        $res2 = ep_4_query('DELETE FROM ' . TABLE_PRODUCTS_TO_CATEGORIES . ' WHERE products_id = ' . $v_products_id . ' AND categories_id = 
                                 ' . $result_incategory['master_categories_id']);
                        
                        if ($res1 && $res2) {
                          zen_record_admin_activity('Product ' . (int) $v_products_id . ' moved from category ' . (int)$result_incategory['master_categories_id'] . ' to category ' . (int) $v_categories_id . ' via EP4.', 'info');
                        } else if ($res1 && !$res2) {
                          zen_record_admin_activity('Product ' . (int) $v_products_id . ' master_categories_id changed from category ' . (int)$result_incategory['master_categories_id'] . ' to category ' . (int) $v_categories_id . ' via EP4.', 'info');
                        } else if (!$res1 && $res2) {
                          zen_record_admin_activity('Product ' . (int) $v_products_id . ' deleted from category ' . (int) $result_incategory['master_categories_id'] . ' and added to category ' . (int) $v_categories_id . ' via EP4.', 'info');
                        }
                      } else {
                        //master_category is not assigned, assign the category to the master category and do the move.
                        //   $res1 = ep_4_query('INSERT INTO '.TABLE_PRODUCTS_TO_CATEGORIES.' (products_id, categories_id)
                        //      VALUES ("'.$v_products_id.'", "'.$v_categories_id.'")');
                        //Successfully inserted the product to the category, now need to remove the link from the previous category.
                        $res1 = ep_4_query('UPDATE ' . TABLE_PRODUCTS . ' set master_categories_id = ' . $v_categories_id . ' 
                                     WHERE products_id = ' . $v_products_id);
                        if ($res1) {
                          zen_record_admin_activity('Product ' . (int) $v_products_id . ' master_categories_id established as category ' . (int) $v_categories_id . ' via EP4.', 'info');
                        }
                      }
                    } // End if master and category different, nothing else to do as no where to go because both are the same...
                    //continue;
                  }
                }
              }
    //==================================================================================================================================
    This is expected to be included in the upcoming 4.0.31 code...
    Last edited by mc12345678; 29 Aug 2015 at 05:14 AM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #2075
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: EasyPopulate 4.0 Support Thread

    Sorry forgot to mention the file: admin/easypopulate_4_import.php beginning at line 1508.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #2076
    Join Date
    Aug 2006
    Posts
    52
    Plugin Contributions
    0

    Default Re: EasyPopulate 4.0 Support Thread

    is there an Easy Populate for ZC1.54 that works?
    thanks
    MBP loaded
    Zen Cart 1.5.6
    XAMPP 7.3.1 Includes: Apache 2.4.37, MariaDB 10.1.37, PHP 7.3.1, phpMyAdmin 4.8.4,

  7. #2077
    Join Date
    Sep 2008
    Location
    WA
    Posts
    555
    Plugin Contributions
    0

    Default Re: EasyPopulate 4.0 Support Thread

    Yes, ep4

  8. #2078
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: EasyPopulate 4.0 Support Thread

    Quote Originally Posted by Looper View Post
    is there an Easy Populate for ZC1.54 that works?
    thanks
    Quote Originally Posted by lruskauff View Post
    Yes, ep4
    Instructions to obtain the generally accepted version are provided in post 1 of this thread. A new version has been uploaded to test at an alternate forked location, details to follow while verifying all changes/improvements have been properly identified.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #2079
    Join Date
    Aug 2006
    Posts
    52
    Plugin Contributions
    0

    Default Re: EasyPopulate 4.0 Support Thread

    Thanks for responses. I'll give it another try today
    MBP loaded
    Zen Cart 1.5.6
    XAMPP 7.3.1 Includes: Apache 2.4.37, MariaDB 10.1.37, PHP 7.3.1, phpMyAdmin 4.8.4,

  10. #2080
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: EasyPopulate 4.0 Support Thread

    Quote Originally Posted by Looper View Post
    Thanks for responses. I'll give it another try today
    If you have any difficulty installing/operating it please post details so that the issue can be duplicated and corrected... Depending on what is being seen/how the store is setup the latest version posted may correct your issue if you have had problems with this version of EP which by the statement above seems to be the case. Anyways, please post if was successfully installed or if not details of possibly reproducing the issue.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 19
    Last Post: 23 Jan 2023, 08:04 AM
  2. BackUp ZC [Support Thread]
    By skipwater in forum All Other Contributions/Addons
    Replies: 285
    Last Post: 23 Dec 2020, 10:40 AM
  3. Wordpress On ZC [Support Thread]
    By hira in forum All Other Contributions/Addons
    Replies: 1858
    Last Post: 17 Jan 2014, 01:24 AM
  4. ZJ Black 2 support thread
    By Liamv in forum Addon Templates
    Replies: 1
    Last Post: 15 Feb 2010, 02:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR