Once buy for customers.

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Tagged: 

Viewing 5 reply threads
  • Author
    Posts
    • #127199
      krejzamates
      Participant

      Hello, I created a multi vendors marketplace.
      We are preferring to sell virtual items for once buy ( only 1 stück ), but I can’t search the option. Where I can find a do this? Thanks! I hope that you understand.

    • #127362
      Sushobhan
      Keymaster

      Hi,
      Thanks for getting in touch with us!
      Sorry, I couldn’t fully understand your query. If I’m correct, you want to sell your products (virtual items) only once. You can achieve this by configuring it’s inventory. Go to Inventory tab and from there enable Manage stock?. Set Stock quantity as 1 and Allow backorders? to ‘Do not allow’. Ref: https://imgur.com/0Gl8WuW
      Looking forward to helping you.
      Thank You!

    • #127370
      krejzamates
      Participant

      Hello, Thanks for response. The vendors on my website will sell the virtual items ALWAYS once. Can I LIKE ADMIN set it, like they cannot (vendors) set something the inventory tab and others?

    • #127395
      krejzamates
      Participant

      Like they cannot see this gyazo.com/e07d24db3b47a69efc20507bf49bef6f

    • #127397
      krejzamates
      Participant

      I am really sorry for my annoying questions.

    • #127651
      Sushobhan
      Keymaster

      Well, hiding inventory tab from vendors can be easily done from WCFM admin dashboard >> Capability page see here- https://imgur.com/lUQT1KG. But setting all the products inventory values via code requires customization. You can use the following snippet (will not work on variable product type) to get the idea-

      add_filter('wcfm_product_data_factory', function($data) {
          $data['manage_stock'] = true;
          $data['backorders'] = 'no';
          $data['stock_quantity'] = 1;
          return $data;
      });

      Add this code to your child theme’s functions.php
      In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/
      Let me know how this goes.
      Thanks!

Viewing 5 reply threads
  • You must be logged in to reply to this topic.