Common Large Category Structure for Multi-Site Marketplace

I need the groups help on this. I am confident the multi-site environment for marketpress would benefit greatly from a large,common categories list for their products. The reasons are as follows:

* Individual store owners do not have to sort out what to name their category for their items. They need only insert within an existing structure. Everyone needs structure :wink:

* Super-Admin's do not have to deal with store owners who have created poorly thought out, or worse... category names that have little relevance to the product. This is suicide in an eMall environment

I have finally gotten a script created that will import the entire Google Product Category database into the tables wp_term & wp_term_taxonomy. I have tested them and they display normally within Product Categories. It is wonderful.

However.... when it is time to add a product, the store owner must now navigate through 6000 categories to find the correct one. What we need is an autocomplete field that will allow a store owner to find smaller category trees based on their search word.

Can someone pickup on this where I have left off and build that interface for MarketPlace store owners everywhere ?

All php script files can be downloaded here to import Google Products Category from scratch from this list: http://www.google.com/basepages/producttype/taxonomy.en-US.txt

See the attached screen shot for the end result.

Also see this Youtube video demonstrating the need I wish to improve: https://www.youtube.com/watch?v=NA8LJqzSQ94

What sayeth the group ?

Sincerely,

Jay
CompuMatter

[attachment=43739]

  • Jack Kitterhing
    • Code Norris

    Hi there Jay,

    Hope you're well today and thanks for your question.

    This is certainly some great progress! Nice job :slight_smile:

    Ideally I would say that the search categories field could be auto complete similar in a way to the Gravity forms interface.

    That would provide a easy to use interface, that isn't complex. I'll include one of our developers @Hoang Ngo to see if he can point you in the right direction for this :slight_smile:

    Thanks!

    Kind Regards
    Jack.

  • Jay
    • The Incredible Code Injector

    Jack,

    Thanks. Glad you see the merit. I think this will be a game changing environment for Multi-Site MarketPlace users.

    I have seen posts referencing this desire numerous times.

    I appreciate you bumping it along.

    Jay

  • Jay
    • The Incredible Code Injector

    Quick note:
    the php script files I supplied above succeed with import but they also show mysql errors in log file. I have refined PersistanceManager.php file in that zip which has cured this and as of now, have uploaded the new zip file with the latest php script in its place.

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    I hope you are well today and I'm sorry about the issue.

    Here is a small code to add a metabox, which help you filter the current category

    add_action( 'add_meta_boxes', 'category_search_metabox' );
    function category_search_metabox() {
    	add_meta_box(
    		'hcategory-auto-suggestion',
    		__( 'Find category', 'marketpress' ),
    		'_category_search_metabox',
    		'product', 'side'
    	);
    }
    
    function _category_search_metabox() {
    	echo '<p>' . __( 'This box will do a filter for product categories', 'marketpress' ) . '</p>';
    	echo '<input type="text" id="product_category_filter">';
    }
    add_action('admin_footer','_category_search_metabox_script');
    function _category_search_metabox_script(){
    	?>
    	<script type="text/javascript">
    		jQuery(document).ready(function(){
    			jQuery('#product_category_filter').keyup(function(e){
    				var keyword = jQuery(this).val().toLowerCase();
    				jQuery('#product_categorychecklist').find('li').each(function(){
    					//idea is just hide the top
    					var text = jQuery(this).find('label').first().text().toLowerCase();
    					if(text.indexOf(keyword)==-1){
    						//hide this parent
    						if(jQuery(this).closest('ul').hasClass('child')){
    							jQuery(this).closest('ul').hasClass('child').closest('li').hide();
    						}else{
    							jQuery(this).closest('li').hide();
    						}
    					}else{
    						//show this parent
    						if(jQuery(this).closest('ul').hasClass('child')){
    							jQuery(this).closest('ul').hasClass('child').closest('li').show();
    						}else{
    							jQuery(this).closest('li').show();
    						}
    					}
    				})
    			})
    		})
    	</script>
    <?php
    }

    Please drag and drop it to the position you feel easier to track product categories.

    Best Regards
    Hoang

  • Jay
    • The Incredible Code Injector

    Hello Hoang,

    I am busy with moving my business to a new location so could not respond before today.

    Unfortunately I could not get this code to work. Perhaps we are not understanding the problem or the placement of the code.

    I have placed this code in themes/mytheme/functions.php

    It had zero effect on anything. I added a new product, and the huge Google Products category was still there just as before. There was no new interface for Ajax Autocomplete to find the appropriate category. Perhaps I do not understand your method for usage of this code.

    I look forward to hearing from you further or having perhaps a new person test this code with different results.

    Sincerely,

    Jay
    CompuMatter

  • Jay
    • The Incredible Code Injector

    OK, I am having new problem. I have done too much development on different websites while testing categories and failed to recognize that site #8 was not pulling its categories from the main site site #1 but instead was pulling it's own wp_8_terms

    So now my question to the group is this. How do I cause site wp_8 (and all stores for that matter) to use the category structure I have imported to wp_1

    This is clearly a very important last piece of this Multi-Site Master Category puzzle.

    What sayeth the group ?

    Jay

  • Jay
    • The Incredible Code Injector

    Hoang

    The long term best solution may be different. However in this phase
    I will give you 3 choices to pick best one as you understand db table logic best

    IIDEA A
    If you can use core table called wp_term and not wp_1_term I like that best because if store #1 is deleted other stores are not effected

    IDEA 2:
    Use store #1 wp_1_term as originally discussed

    You pick one of those solutions

    Sincerely

    Jay

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    Hmm, I understand that the #1 is the root blog.

    Unfortunately, marketpress still not support function out of the box like that. In backend, it's can only get the product categories internal.

    For reduce the repeat task when import categories, how about we will make a sync, if any new product category added on the main blog (#1), it will added to the others too.

    Best Regards
    Hoang

  • Jay
    • The Incredible Code Injector

    Hoang,

    I considered a sync but thought it would be redundant unnecessary data. However using sync would insure the site could be separated as a standalone via export and still have its categories intact.

    So I agree. Please use sync on store #1

    Also thank you Hoang and also WPMUDev for working with me and dedicating the manpower required to nail this functionality into place.

    Sincerely

    Jay

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    I hope you are well today.

    Jay, as i said above, marketpress and wordpress don't support for cross site taxonomy.

    But I think we can still archive this by this way:
    1. In the add/edit product, we will override the product_categories by our query, so it will return the product categories from main blog.
    2. When user submit, we will create the product category for the subsite, that's way, the data duplicate will reduce most, and the marketpress/wordpress still function properly.

    Best Regards,
    Hoang

  • Jay
    • The Incredible Code Injector

    Hoang,

    I was down for a few days. We moved our retail store to a nice new location. All settled in now and totally want to get this project working.

    Cross site taxonomy, or however we do it is key to this entire discussion. It is after all the title of this post. To that end, it is a major need and desire within the community. Any multi-site marketpress website will go bad with bad category conventions used by random sellers. It has to be controlled or it will get 'out of control' :wink:

    I think your idea is PERFECT. This is good because in their store they will only have the categories they have used before. This makes their site easily portable should they wish separate from the multi-site and be a stand alone store in the future. It is the best solution.

    So I am ready. How can we begin overriding the product_categories by our query so it will return categories from the main blog and also the same for creating category for the sub-site as it is added.

    I am ready to move on this right away.

  • Jay
    • The Incredible Code Injector

    Jack,

    Thanks for staying on this.

    This is actually a VERY opportune time for us to beta test this environment.

    We just moved to a new physical store location and we are literally stacked to the ceiling with hundreds of things to sell from perhaps hundreds of different categories. It will give us and the community a real-world / in production test environment as we will be the first client store in this multi-store environment that will be pulling its category structure from the Google Product category base that Hoang and you are implementing.

    Armed with its success (or failures), we will report back, refine it and keep the community abreast.

    See attached store pic of items ready to add !

    Jay

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    I hope you are well today and I'm sorry about the delay :slight_smile:.

    Yeah, the store look promising !!!

    I have consider the way I posted before, it's have a weakness, it's not allow user to review that. So I have change a little bit :slight_smile:

    Please add this code to your functions.php, but firstly, please remove the old code I posted for you.

    add_action( 'add_meta_boxes', 'category_search_metabox' );
    function category_search_metabox() {
    	add_meta_box(
    		'hcategory-auto-suggestion',
    		__( 'Find category', 'marketpress' ),
    		'_category_search_metabox',
    		'product', 'side'
    	);
    	if ( get_current_blog_id() != 1 ) {
    		add_meta_box(
    			'hcategory-from-root',
    			__( 'Root categories to Import', 'marketpress' ),
    			'_category_from_root',
    			'product',
    			'side'
    		);
    	}
    }
    
    function _category_from_root( $post ) {
    	echo '<div class="categorydiv">';
    	echo '<input type="text" class="filter_categories" data-target="root_categories">';
    	switch_to_blog( 1 );
    	echo '<ul class="categorychecklist form-no-clear" data-wp-lists="list:product_category" id="root_categories">';
    	wp_terms_checklist( 0, array(
    		'taxonomy' => 'product_category'
    	) );
    	echo '</ul><br/>';
    	restore_current_blog();
    	echo '<button type="button" class="h_import_product_category button">' . __( 'Import', 'marketpress' ) . '</button>';
    	echo '</div>';
    }
    
    function _category_search_metabox() {
    	echo '<p>' . __( 'This box will do a filter for product categories', 'marketpress' ) . '</p>';
    	echo '<input type="text" class="filter_categories" data-target="product_categorychecklist">';
    }
    
    add_action( 'admin_footer', '_category_search_metabox_script' );
    function _category_search_metabox_script() {
    	?>
    	<script type="text/javascript">
    		jQuery(document).ready(function () {
    			jQuery('.filter_categories').keyup(function (e) {
    				var keyword = jQuery(this).val().toLowerCase();
    				var target = jQuery(this).data('target');
    				jQuery('#' + target).find('li').each(function () {
    					//idea is just hide the top
    					var text = jQuery(this).find('label').first().text().toLowerCase();
    					if (text.search(keyword) == -1) {
    						//not found, just hde the element
    						jQuery(this).hide();
    					} else {
    						var parents = jQuery(this).parents('li');
    						parents.show();
    						jQuery(this).show();
    					}
    				})
    			});
    			jQuery('.h_import_product_category').click(function () {
    				//find the ids
    				var ids = [];
    				jQuery('#root_categories').find('input:checked').each(function () {
    					ids.push(jQuery(this).val());
    				});
    				jQuery.ajax({
    					'url'  : '<?php echo admin_url('admin-ajax.php') ?>',
    					data   : {
    						'action': 'import_category_from_root',
    						'ids'   : ids,
    						'nonce' : '<?php echo wp_create_nonce( 'import_category_from_root' ); ?>'
    					},
    					type   : 'POST',
    					success: function () {
    						jQuery('#product_categorychecklist').load('<?php echo "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?> #product_categorychecklist');
    					}
    				})
    			})
    		})
    	</script>
    <?php
    }
    
    if ( get_current_blog_id() != 1 ) {
    	add_action( 'wp_ajax_import_category_from_root', 'import_category_from_root' );
    	function import_category_from_root() {
    		if ( $_SERVER['REQUEST_METHOD'] == "POST" && isset( $_POST['nonce'] ) ) {
    			if ( ! wp_verify_nonce( $_POST['nonce'], 'import_category_from_root' ) ) {
    				exit;
    			}
    
    			$ids   = $_POST['ids'];
    			$terms = array();
    			switch_to_blog( 1 );
    			if ( is_array( $ids ) && count( $ids ) ) {
    				$terms = get_terms( 'product_category', array(
    					'include'    => $ids,
    					'hide_empty' => false
    				) );
    			}
    			restore_current_blog();
    			//check if the parent no include inside, reset to 0
    
    			foreach($terms as &$term){
    			 	if(!in_array($term->parent,$ids)){
    					$term->parent = 0;
    				}
    			}
    
    			$result = array();
    			h_sort_terms_hierarchicaly( $terms, $result );
    			foreach ( $result as $row ) {
    				_import_category_from_root( $row );
    			}
    		}
    		exit;
    	}
    
    	function h_sort_terms_hierarchicaly( Array &$cats, Array &$into, $parentId = 0 ) {
    		foreach ( $cats as $i => $cat ) {
    			if ( $cat->parent == $parentId ) {
    				$into[$cat->term_id] = $cat;
    				unset( $cats[$i] );
    			}
    		}
    
    		foreach ( $into as $topCat ) {
    			$topCat->children = array();
    			h_sort_terms_hierarchicaly( $cats, $topCat->children, $topCat->term_id );
    		}
    	}
    
    	function _import_category_from_root( $term, $parent_id = 0 ) {
    		$exists = term_exists( $term->slug, 'product_category' );
    		if ( ! $exists ) {
    			$id = wp_insert_term( $term->name, 'product_category', array(
    				'slug'        => $term->slug,
    				'description' => $term->description,
    				'parent'      => $parent_id
    			) );
    		} else {
    			if ( is_array( $exists ) ) {
    				$id = $exists;
    			} else {
    				$id = array(
    					'term_id' => $exists
    				);
    			}
    		}
    
    		if ( is_array( $term->children ) && count( $term->children ) ) {
    			foreach ( $term->children as $child ) {
    				_import_category_from_root( $child, $id['term_id'] );
    			}
    		}
    	}
    }

    This code will add another metabox called "Import categories from root", so it will let user chose and import categories from the root to current blog, and then, he can assign the product to those categories :slight_smile:.

    Also, the search function including too. Which will help to quickly find the categories you need.

    Best Regards,
    Hoang

  • Jay
    • The Incredible Code Injector

    Hoang,

    I am very excited about this and am grateful for your fast reply to my contact. I have today and tomorrow completely available to test this. I will get back to you today and let you know the results.

    What is your GMT ?

    Thanks.

    Jay

  • Jay
    • The Incredible Code Injector

    Hoang,

    Thank you for the code. I have tested it and am reporting to you and this post.

    There are some issues here I would like to share with you.

    To begin with, I think it is too complicated to ask store owners to select root categories they are interested in. Here is why.

    There are 25 root categories distributed among 6000 total categories. It will be very confusing for them to 'import' only the categories that apply to their store as they will be traversing the entire category structure to find it.

    In addition, sellers that offer many categories of products may have to 'revisit' this import root categories process many times. This will result in the seller having frustration of repeating this process each time.

    I also found that typing a single keyword such as 'fish' (to find fish tanks) caused a freeze on the very first letter as you see in this video http://youtu.be/ZJ9LCftMOeQ

    I also did not see a feature for importing all categories.

    Moving forward....

    You have told me that wordpress / marketpress will not support the use of cross site taxonomy. I understand this. However, can we use a main site taxonomy ONLY TO SELECT our category when initially adding the product ?

    I will explain. A store owner adds a product and selects a category from the MASTER wp_term_taxonomy. We then save that category (and its parent tree structure back to root) into the this sellers wp_x_term_taxonomy table. See attached image on that thought.

    In this way each store has its own categories stored correctly in its local table and not a cross site.

    This method also insures that we import the category each seller uses only at the time it is selected from the master list and does not require the user know the 'root' categories as the programming will automatically copy all parent categories of the one selected into the sellers table structure.

    If the above cannot be done, my suggestion is that we import / sync ALL categories at one time. In this way there will be no delay when adding products and sellers will not have to revisit import process over and over.

    Hoang, the first code you sent me was much faster. It is the best method of selecting a category as this video demonstrated: http://youtu.be/6-9sp27CNOQ

    Your thoughts ?

    Jay
    CompuMatter

    Also: my skype is compumatter.jay if you wish to communicate with me for quick thoughts.

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    I hope you are well today.

    About the search category, the old way is faster but it not really accuracy, I think better, we should make the search start when user input 3 characters.

    The code I sent above, only show the Root Categories Metabox for sub site, not the main site, since I get categories from main site as the source categories.

    This way it work, when user go to Products-> Add New in subsite, you will see a metabox say Root Categories (Source categories), and client can import categories he want from there. The categories imported will insert to the client site.

    This only happen once time, as the later, the categories he need already in his site.

    BTW, the Import All feature is good too, I think better, we can add another button beside the "Import" button, the "Import All" button, the more options we have for client, the better it go :slight_smile:.

    Best Regards,
    Hoang

  • Jay
    • The Incredible Code Injector

    Hoang,

    Good morning and thank you for working hard on this solution.

    When we are in sub-site I do not see the categories of the master site.

    How do I tell the sub-site to see the categories of the master site.

    Now, I can see only see all the master categories list when I am in the master site > add product

    However, when I am in the the sub-site, I do not see any of the master categories when I am adding a product.

    Your thoughts ?

    Jay

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    Hmm, I will need more information to check why it not working on your side, can you please send in:

    - Mark to my attention - ATTN: Hoang Ngo
    - Link back to this thread
    - Include admin/network access
    - Include cPanel (I will need to look at the DB so need PHPMyAdmin or similar)
    - Include FTP
    - Include any relevant URLS for your site

    On the contact form, select "I have a different question", this ensures it comes through and gets assigned to me.

    Best Regards,
    Hoang

  • Jay
    • The Incredible Code Injector

    Hoang,

    Because we are moving our building these past few days I am not as instant on my replies.

    Please allow me. By this evening I will have the information you need.

    Also, my main store database which I have stored the master information is cm_terms and cm_term_taxonomy (not wp_) as my table prefix is different. Perhaps that is the issue ?

    Let me know your thoughts.

    Jay
    CompuMatter

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    I hope you are well today.

    Thanks for your information :slight_smile:.

    Also, my main store database which I have stored the master information is cm_terms and cm_term_taxonomy (not wp_) as my table prefix is different. Perhaps that is the issue ?

    That's fine, no worries about it :slight_smile:.

    Best Regards,
    Hoang

  • Jay
    • The Incredible Code Injector

    Hoang,

    I have just tested SSH and it works fine. Be sure to use port 925 for this.

    SSH username: wpmu-hoang
    Directory is /home/ws-000000015-ci (there is also -cw but that is different site so ignore. Be sure to use one ending in -ci)

    I have just tested this login and created testit directory

    Jay

  • Jay
    • The Incredible Code Injector

    Hoang,

    I have also just tested FTP successfully

    Please go to host: 173.10.110.109
    username: wpmu-hoang
    password: same as given on all others
    Port: 21

    See screen shot. This will allow you to create folders in wp-content with no problems.

    Jay

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    It's work for me now. Thank you :slight_smile:.

    Hmm, it's really weird. It seem the plugin not take affect with the wordpress.
    I'm sorry for this inconvenience, can you please take a screenshot of the network plugins page ?

    Thanks!!!

    Best Regards,
    Hoang

  • Jay
    • The Incredible Code Injector

    Hoang,

    Good evening. I am checking as a follow up. Please let me know if I am being to aggressive on my end. If so, I apologize. Just trying to push through this solution and want to insure you have what you need to resolve it.

    Thanks.

    Jay

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    I hope you are well today and I sorry about the delay.

    Can you please enable the WP_DEBUG to true by this code

    define('WP_DEBUG', true);
    
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);

    I have make the code as separate plugin, but it seem have some issue on your site. Enable the debug will help me find it :slight_smile:

    Thanks!!!.

    Best Regards,
    Hoang

  • Jay
    • The Incredible Code Injector

    Hello Hoang

    I have given you ssh and FTP login as requested so you can make any changes you need

    There are no production sites on the server so you are free to add this debug code please.

    If you are prevented to add this code please let me know

    I want you to make any changes you need to as long (as you document those changes for the group of course)

    I am trying to grease the wheel so we can avoid long delays for questions you can resolve without waiting for my input

    Otherwise can we use skype or other IM to make quicker our communication ?

    Let me know your thoughts

    Sincerely

    Jay

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    I do apologize for this inconvenience :slight_frown:, but I try to update the wp-config.php, but It seem I don't have enough permission for rewrite this file :slight_frown:

    So for turn on the debug mode in silent, please
    1. Update the
    define('WP_DEBUG', false);
    to `define('WP_DEBUG', true);
    2. Add those code to your wp-config.php

    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);

    Otherwise can we use skype or other IM to make quicker our communication ?

    I'm sorry, but we don't do live support, you will need to either find a live support chat session or use the forum. In this case, forum is the best way for communicate :slight_smile:

    Best regards,
    Hoang

  • Jay
    • The Incredible Code Injector

    Hoang,

    OK, these are the current changed settings for you:

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);

    I have also changed permissions on that file wp-config.php which should allow you to make changes to it in the future.

    I understand about Skype. No problem. We will keep it going.

    Sincerely,

    Jay
    CompuMatter

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    Thanks you.

    There's still some notes:
    1. Please use the plugin only for now, we do not need to copy the function to functions.php anymore
    2. Your site using prosites plugin, so I enabled the plugin for every site using.
    3. I still not have permission for the wordpress files, please enable all files for me :slight_smile:, that's will make me easier for this issue.

    Thanks!!!

    Best regards,
    Hoang

  • Jay
    • The Incredible Code Injector

    Hoang,

    I still find that eanacortes.com/wp-admin is not working with global categories. It shows no categories.

    I see your plugin is enabled, but it still shows no categories.

    Does it work for you ?

    Jay

  • Hoang Ngo
    • Code Slayer

    @Jay

    Yes, it's working for me, please check the screenshot.

    I'm sorry for the confusion, but for security, please don't chmod 777, the safe way, we should add my account to same group as the owner of the folders, and after that, use
    chmod -R g+rwx DirectoryName
    This will make my account have enough permission for the folders, and it will not public too :slight_smile:.

    I have some done modification too, so now the search will work faster, Import categories working, you can do some test now.

    If you have any issues please don't hesitate to let us know so we can assist

    Best regards,
    Hoang

  • Jay
    • The Incredible Code Injector

    Hoang,

    I see what you are doing. It is different than what I am doing. I forgot you have an extra step of importing 'root categories'.

    The idea of importing root categories has never been intuitive to me. It requires a store owner to select a category twice, first as a root category and then the sub category using the normal add product interface. It will be a support nightmare.

    As a user, I find this is an extra step I would want to eliminate. As discussed earlier, there should be an ability to import ALL categories at one time so we do not have to import root categories every time we are adding a new category. Some stores resell used goods of all kinds. It would be very confusing for them to have to find a root category each time and then to go forward and add this category to their product. They will certainly be confused by this.

    Can you provide a single way to simply import all categories one time ?

    Permissions: I have logged into my server as wpmu-hoang both using ssh and ftp. In both cases I am able to edit files, create new files etc. I have even created a video from filezilla to show this to you. Please see video: https://www.youtube.com/watch?v=-ZMir5dt8Ng which will help me understand where this is failing for you.

    Thanks again.

    Jay

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    I hope you are well today.

    The idea of importing root categories has never been intuitive to me. It requires a store owner to select a category twice, first as a root category and then the sub category using the normal add product interface. It will be a support nightmare.

    As a user, I find this is an extra step I would want to eliminate. As discussed earlier, there should be an ability to import ALL categories at one time so we do not have to import root categories every time we are adding a new category. Some stores resell used goods of all kinds. It would be very confusing for them to have to find a root category each time and then to go forward and add this category to their product. They will certainly be confused by this.

    Actually user only need to import once time, but yeah, the import all is a great thing.

    Permissions: I have logged into my server as wpmu-hoang both using ssh and ftp. In both cases I am able to edit files, create new files etc. I have even created a video from filezilla to show this to you. Please see video: https://www.youtube.com/watch?v=-ZMir5dt8Ng which will help me understand where this is failing for you.

    Thank you :slight_smile:. Yes I can access, but my opinion is it will be more safe as we don't do the chmod 777.

    I'm updating the plugin, thanks for your patience here.

    Best Regards,
    Hoang

  • Jay
    • The Incredible Code Injector

    Hoang,

    Good morning. I just wanted to follow up and see if you are moving forward soon with the 'all categories' import. I have many items in my store and am wishing to use this interface to sell them. I do not want to lose this unique opportunity to act / test this new environment as a real seller which provides the best feedback

    Your thoughts.

    Jay
    CompuMatter

  • Jay
    • The Incredible Code Injector

    Hoang,

    It is good to hear back from you. I was hoping the project was not dropped.

    I have clicked the Import All function and there is no response. Nothing happens. I have checked the database tables cm_8_term_taxonomy
    for progress but nothing is there.

    I then tried clicking the Import All button followed by the Import button. Still nothing happens.

    I feel I am missing some instruction. Your thoughts ?

    See attached picture.

    Jay

  • Jay
    • The Incredible Code Injector

    Jack,

    Thanks. Patience is a virtue....

    It's requiring a lot of push to bring it to the finish line. I appreciate Hoang's effort and the effort of the group. I wish it were up and running as I had tons of merchandise to test it with. I am taking advantage of alternatives to sell my merchandise as a result of the long effort here.

    However, I don't want to see this fade away. A centralized large category list is a long overdue need and we are a short throw from the finish line.

    I will immediately volley my test results as as soon as I hear back from Hoang.

    Sincerely,

    Jay

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    I hope you are well today and I'm sorry for the delay.

    I've try to import all, and the function working for me. But one thing, because the categories data is too large, and sometime it will cause out of memory issue. I increase it to 512MB.

    I'm sorry for this inconvenience, please give it another try and let see if it work.

    Best Regards
    Hoang

  • Jay
    • The Incredible Code Injector

    Hoang

    My memory is increased in PHP from earlier manual imports I have done. So I understand this.

    However that is not the problem. When I click Import All nothing happens at all. As mentioned on previous post If I check database on cm_8_term_taxonomy there is nothing there. If this was memory failure at lease one category would import but the table is empty

    Also if the server were having out of memory issue it would also fail for you. Did you test this on my server or your dev machine?

    Please review video I prepared on last post and you will see nothin happens when the import all button is pressed

    Jay

  • Jay
    • The Incredible Code Injector

    Hoang,

    I am not sure what is different today over yesterday however now when I click the 'Import All' button it imports properly. I have verified this by viewing the database table immediately after clicking. Yesterday it was empty but today it works. I will test this further and give you my results.

    I would like to now suggest you provide some feedback to the end user that an import is in progress. With no feedback / progress bar etc, the user will be left to think it is failing and possibly quit the program. Do you have a solution for this ?

    Thanks.

    Jay

  • Jay
    • The Incredible Code Injector

    Hoang,

    I have verified that the import categories plugin (breaks / fails) at exactly 2320 items. It never imports all 6000. I have tried this three times.

    # My environment variables are all set very high ie;
    max_input_vars = 10000
    suhosin.post.max_vars = 10000
    suhosin.request.max_vars = 10000

    # I have Increased memory_limit in php.ini
    memory_limit = -1

    Please test on my server using your plugin 'Import All'.

    Please first make sure that cm_8_terms and cm_8_term_taxonomy are empty tables and then test.

    You will find same result. It imports 2320 categories only.

    This is similar to the failure of the plugin 'bulk categories' import which we tried in this post: https://premium.wpmudev.org/forums/topic/category-list-importing-ebay-or-other

    Your thoughts.

    Sincerely,

    Jay

  • Hoang Ngo
    • Code Slayer

    Hi @Jay,

    I hope you are well today

    [12-Jun-2014 19:38:13 UTC] PHP Fatal error: Call to undefined function file_str_replace() in /home/ws-000000015-ci/public_html/wp-content/plugins/cm-ecore/includes/php/onloads/get-styles.php on line 86

    I have checked the debug log and I found this issue, hmm, how about if I quickly disable this plugin to run the test and re-enable that :slight_smile: ?

    Please Advise.
    Thanks!!

    Best regards,
    Hoang

  • Jay
    • The Incredible Code Injector

    Hoang,

    Please disable any plugin you wish. There is nothing on that server more important than this project.

    I invite you to do whatever you need. Just let me know if it is the problem so I will know this.

    Thanks.

    Jay

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.