This topic contains 6 reply and 2 voices, and was last updated by RevolvedMedia 4 years, 7 months ago
Viewing 6 Posts - 1 through 6 (of 6 total)
Author Posts
March 21, 2015 at 2:40 pm 39681
RevolvedMedia We would like to be able to charge a fixed price to feature (sticky) a product for a set duration. The scenario: - Seller logins in to dashboard - Seller fills out the add new product form: Options: 1)Add a check box [ ] Feature Product for $xx.xx When checking the box - the user is taken to checkout to pay for the feature placement 2) Light box pop up "Would you like to feature your product" Yes/No Yes - Take them to checkout to pay for feature placement No - Close light box Upon payment confirmation product is made sticky and automatically set to approved from pending. - cron function to unstick expired featured (sticky) products Let me know if this is something in the works or if I should begin moding or creating an addon to do so. Thanks for any information, Rob
March 21, 2015 at 2:45 pm 39684
Nayem Nayem

Hello Robert,

Thank you very much for your great idea. We do not have this feature right now. But we will work on featured product for seller. We did not start it yet.

Thank you 🙂

March 25, 2015 at 8:17 am 39939
RevolvedMedia RevolvedMedia

I’m going to be working on this as well, I hope you don’t mind but I will document files changes here to help me keep track of what files I have modified and where. As well this might help you in implementing this feature faster.

March 25, 2015 at 9:04 am 39943
RevolvedMedia RevolvedMedia

Line numbers listed are placement within the modified file and will not reflect the location to insert the code in an original unmodified file.

/dokan/templates/product-listing.php


//Added the featured column label to the products dashboard list
Line: 26 - <th><?php _e( 'Featured', 'dokan' ); ?></th> <?php /* RevolvedMedia - Modified - March 25 2015 */ ?>

//Added product featured status column value and statement
Line 80 -   <td class="featured column-featured"><?php  /* RevolvedMedia - Modified - March 25 2015 */
                if($product->is_featured()){
			echo '<span class="wc-featured tips">Yes</span>';
		} else {
		        echo '<span class="wc-featured not-featured tips">No</span>';
		}
                ?>
             </td><?php /* End Modified code */ ?>

//More to come….

March 25, 2015 at 11:10 am 39955
Nayem Nayem

Hello,

Sure, You are always welcome to share good things in our forum.

Thank you 🙂

March 25, 2015 at 11:17 am 39956
RevolvedMedia RevolvedMedia

Great thanks!

March 25, 2015 at 1:52 pm 39973
RevolvedMedia RevolvedMedia

//Next we created a product category using the wp admin dashboard. The category will be used for site products only. This way we can utilize the build in cart and woocommerce payment system – and the woocommerce_order_status_completed to process our order 😉

/wp-admin/edit-tags.php?taxonomy=product_cat&post_type=product

For example purposes:

Our Products
– Advertising

We’re using a sub category for our “Advertising” products as we may add additional products at a later date. Keeping our options open 🙂

We don’t want all stores to have access to this Category so lets filter out for anyone but admin.

Note, Dokan has two options for displaying categories selections: Single and Multiple. but we can handle both with a single variable.

We will want to make this change in two files:

/dokan/templates/new-product.php
===============================================

Line: 62

<?php
  /**************
   * RevolvedMedia - Modified - March 25 2015
   * 
   * Our Admin only categories are:
   * 
   * 107 - Our Products - You can find your values by inspecting the drop down
   * 108 - Advertising
   * 
   * These will be filtered out for all except admins - (ideally once is_admin is working)
   * 
   * You can find the values for your categories by checking the values in the drop down
   * 
   * @ to-do Add an option within Dokan Admin dashboard to select "admin only" categories
   * and pass the value globally with the plugin
   * 
   * Note: is_admin is not functional and always returns false
   *    - not sure if its Dokan or something else, will update code once I find the issue
   *    - until then it doesn't hurt to leave it in place
   */ 
                                            
     if(!is_admin()){ 
         $exclude_admin_category = "107,108";
     } else {
         $exclude_admin_category = "";
     }
  ?> 

Line: 100 // Added exclude value – RevolvedMedia – Modified – March 25 2015

'exclude' => $exclude_admin_category,

Line: 120 // Added exclude value – RevolvedMedia – Modified – March 25 2015

'exclude' => $exclude_admin_category,

/dokan/templates/product-edit.php
===============================================

Line: 241

<?php
  /**************
   * RevolvedMedia - Modified - March 25 2015
   * 
   * Our Admin only categories are:
   * 
   * 107 - Our Products - You can find your values by inspecting the drop down
   * 108 - Advertising
   * 
   * These will be filtered out for all except admins - (ideally once is_admin is working)
   * 
   * You can find the values for your categories by checking the values in the drop down
   * 
   * @ to-do Add an option within Dokan Admin dashboard to select "admin only" categories
   * 
   * 
   * Note: is_admin is not functional 
   *    - not sure if its Dokan or something else, will update code once I find the issue
   */
                                            
     if(!is_admin()){ 
         $exclude_admin_category = "107,108";
     } else {
         $exclude_admin_category = "";
     }
  ?>    

Line: 290 // Added exclude value – RevolvedMedia – Modified – March 25 2015

'exclude' => $exclude_admin_category,

Line: 315 // Added exclude value – RevolvedMedia – Modified – March 25 2015

'exclude' => $exclude_admin_category,

Now the categories are hidden when editing or posting a new product.

Viewing 6 Posts - 1 through 6 (of 6 total)