-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
programmatically add product #28
Comments
Hello! I see that you assigned someone to take up this 'issue', is there an update? |
There will be an update soon but right now we are working in the Woocommerce plugin. |
Hello, thank you for your response, what can i expect with soon? I got a webshop that needs to import 30000 products with multiple images, and needs to go live in the end of the week, and you can imagine the server size if i need to import the images to the server.. If you could please look into it for me? I could even help translate the plugin to Dutch or something in return |
Hi, After searching online for this solution, i got here thanks to you. Your function is simple and clean, but you are trying to use array as string, it is impossible and not right. We need to supply URL and SIZES to the database. I changed it and now it is working perfectly.
Thanks. |
Hi smoove, Thankyou for your help! I got the Featured image working, but for some reason I cant seem to get the Gallery image working.. I get the images from an API and I try to loop through them with the following code:
The function (Generate_Image) is the same as in your response! Thanks a lot! |
Sure, no problem. It will be easier to get a sample of export of that API. Copy paste here just few products as an array, how they showing at your end. I guess in your case it will be a screenshot of the export of these lines.
Hope i can help. |
I have a question... Does this filter code apply to using a column in my Woocommerce product import CSV file? Instead of default "Image" that Woocommerce uses, I would title my columns "_knawatfibu_url" and "_knawatfibu_wcgallary" so that when I do my product import it does not also import the media files to the media library?
|
Hello there,
I have a script that programmatically adds products from a xml, now i would like to incorporate your plugin to add the external images and i use the following script
function Generate_Image( $post_id, $image_url, $flag ){ if( $flag == 0){ update_post_meta($post_id,'_knawatfibu_url',$image_url); } if( $flag == 1 ){ # Add gallery image to product $attach_id_array = get_post_meta($post_id,'_knawatfibu_wcgallary', true); $attach_id_array .= ','.$image_url; update_post_meta($post_id,'_knawatfibu_wcgallary',$attach_id_array); } }
But it does not seem to add the image to the product meta,
Could you please help me?
Thanks!
The text was updated successfully, but these errors were encountered: