I have the need to have a custom field in the admin 'edit order' screen of woocommerce.
This field is admin only and does not need to display on the customer order process.
The business case is that the person processing the orders clicks in to the edit order screen for each order and assigns a custom ID (these are random serial numbers on our products) from a drop down list preferably.
The drop down list will be populated from a database of unassigned ID's - (this is a sql database we already use for our main web app)
My question is, is a custom field in the 'edit order' screen the place to perform this assignment?
the alternative is to write a small .net application and assign the Id's there but I would like to keep the order processing to just woocommerce.
If it is possible what hooks should i look in to.
thank you
If your good with PHP and MySQL, you can write your own filters and hooks for the wordpress backend. It's just like writing app's except everything will be pointed to the backend, woocommerce side.
You can read more about the filters and hooks for Wordpress:
http://codex.wordpress.org/Plugin_API
You can either write your own plugins or add your functions etc. to your theme's function.php files.
Use Woocommerce Custom Admin Order Field Plugin by WooThemes
Related
I am new to wordpress, just worked on 2 sites and I have new challange! now I have to create custom post types as a product because I already have old system with me. I wanted to convert existing offline course products from core php site to wordpress for that I have to create courses as custom posts because these courses will be in two semesters and they have conditional displays according to date.
So can you please suggest me how my approach should be ( I am thinking of creating custom post use it as product and list it with add to cart button and connect with any available plugin which will handle rest of the checkout process with admin functionalities and then I will build the other things arround it )
Note: Actually I am worried about how to list the products/courses per semester if semester is ended then just list them otherwise list will have add to cart function, how can I add the late fee for registration (if applies) and one time registration fee, also I need to add donation amount separately can this be taken care by anything common.
Thanks and Regards
If you will use the woocommerce then you should import your courses as products (post type).
That will make every course you have as a product then you can update the postmeta of this product to the various values of this product like price
So first step is install woocommerce plugin then loop the courses you have on wp_insert_post.
After that in the same loop you should add post meta for every post you inserted.
I am currently developing an interface that allows you to customize a product. I am implementing on Wordpress, but I need to generate an order after you finish the customization process. So it is necessary that the data is added as a product in the shopping cart WooCommerce. Is that possible? What would be the procedure?
As per your requirements i assume a following scenario
For example you have a site which which sells printed Tshirts.
The flow of this example site is that a user comes selects a tshirt, customizes the tshirt product say by adding Tshirt's color, Image on tshirt and Tshirt's size.
These customization added by the customer at the frontend on product page or cart can be stored in post meta for that order.
So if your case is some what like this then Yes this is possible.
And you can use the following links which will help you to achieve your goal.
How to Add Custom Data to WooCommerce Order
and
Custom WooCommerce Order Meta
Let me know if this solution works for you.
I added a new custom post in Wordpress and named it Products.
In admin menu in Products I have two links - All Products and New Product.
Everything works perfectly, each product has it's own permalink, fields and so on.
Question: What shall I do to have a few editable fields to be common for all products?I mean, I wish to edit a field just a single time in admin and it shall display on all product pages.
Use the Settings API.
There is no built-in way to do it at a custom post type level.
You could also define a secondary custom post type ("All Products Details") and attach it to every Product you create as a custom field on it, but then you also have to implement an automated way of setting defaults for custom fields (Here's a way to do this.).
I am using latest wp and wc and I am trying to add a form field in the frontend single product page where the user will be able to add comments which when the order is done the data will be available under woocommerce -> orders. Have anybody done that or it's not even possible because woocommerce is pretty limited for stuff like this?
When creating an order within the admin section, you get the 'Please Select Products to Add' how can I change the code to only show Configurable products within the grid instead of all the products?
To limit the admin order creation process to configurables only, you need to add a product type filter to the collection which the Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid class is using.
$collection->addFieldToFilter('type_id','configurable');
This can be accomplished in different ways, whether via a block rewrite using Magento's nifty configuration-based classname rewriting or by using an observer (the latter being the preferred way).
Post a comment if you need help with the observer or rewrite config.