June 10, 2014 at 7:41 pm #21728
Hello there, I am looking to add an additional option to the ‘Stock Status' field when vendors are editing a product. Currently under Inventory -> Stock Status there are the two options ‘In Stock/Out Of Stock' I would like to add a third option which will have the same functions as Out Of Stock but named ‘Available In Store Only' So that customers will not be able to purchase the product online but will know that they can collect from the shop in person.
I imagine I can just create a copy of the ‘out of stock' functions and rename it to ‘Available In Store'. Im not sure what code I would need to duplicate so that I can do this. Could anyone direct me to the files and lines which I would need to copy and alter to do this? It would be really great!
GaryJune 11, 2014 at 10:11 pm #21808
Hello I just wanted to alter this question. Ok so not all my vendors will want to physically online until they are familiar to the site, but I dont want to label products as out of stock. Instead if a product is out of stock I want to replace the text with ‘Contact Store For Availability' I have managed to do this for the frontend store for visitors to see by adding an availability code to functions.php
//change woocommerce ‘out of stock' product status to any text status you want
$availability[‘availability'] = str_ireplace(‘Out of stock', ‘Contact Store For Availability', $availability[‘availability']);
//$availability[‘availability'] = str_ireplace(‘Out of stock', ‘Sold Out!', $availability[‘availability']);
//$availability[‘availability'] = str_ireplace(‘Out of stock', ‘Call for Price', $availability[‘availability']);
on the theme files, but on the dokan vendor dashboard the text is still ‘Out Of Stock'. How can I change this text for vendors to see as ‘Contact Store For Availability' instead.
One last question, In the vendors stores, only 4 products are shown at one time with the paginator, where can I alter the number of products shown on the Vendors Store to 12?
Thank you very much, I really appreciate your theme and help so far.
GaryJune 12, 2014 at 12:03 pm #21842
SkModeratorPost count: 371
woocommerce dosen't have any hook to change the text or add a new option for vendors or admin. They have only option to change the text for customer (you have done that). Dokan bring the options to add or edit products from admin panel. So It's not possible to change the text for vendors.
Thank you.June 13, 2014 at 4:45 am #21875
Ah ok, thanks for letting me know, at least the visitors can see the change in text. As for the vendor shop though, is there a code I can add to functions.php or some way to expand the number of products shown from 4 to 12 in their store? I have managed to do it for the marketplace but I cant seem to figure out how to show more products per page in each of their store.
Kind RegardsJune 14, 2014 at 6:06 am #21903
Nizam UddinKeymasterPost count: 670
To show more products per page in each of their store, please navigate to
Blog pages show at mostand increase the number. Thanks
The topic ‘How To Add Field to Stock Status Drop Down Options In Vendor Dashboard’ is closed to new replies.