Dokan Optimization Documentation IDEA

  • by

It’s a discussed idea about optimization dokan to do some stuffs like below

  • Put datas for seller dashboard to a seller_summary table
  • Put datas for admin dashboard to admin_summary table
  • Make a system to Queue list of changes column. As for example –
    • Assume, when someone purchase a product, the seller_summary table’s balance has been changed. So, we put the balance in queue like
    • Again, change pageview column, add it too in queue. So, after some workaround, queue will look like this
      • balance
      • pageview
    • So action_scheduler than process these queue and update the summary table.
  • Another idea was, just put a expired_at column in summary table or something another table like that. Then works like transiend.

Here’s the tables as far discussion, but not implemented yet.

Sellers dashboard data

Table: dokan_vendor_summary

Table NameColumn NameKeyExample
dokan_vendor_summaryidprimary1
vendor_idunique2
sales_amount100
sales_earning92
pageview_count10
order_counts[‘total’ => 5, ‘completed’ => 1, ‘pending’ => 1, ‘processing’ => 1, ‘cancelled’ => 1, ‘refunded’ => 1, ‘on_hold’ => 0 ]
review_counts[‘total’ => 3, ‘pending’ => 1, ‘spam’ => 1, ‘trash’ => 1 ]
product_counts[‘total’ => 3, ‘live’ => 1, ‘offline’ => 1, ‘pending_review’ => 1 ]
balance1000
expired_at‘1970-01-01 00:00:01’
updated_at‘1970-01-01 00:00:01’

Admin Dashboard Data

Table: dokan_summary or if in transient and wp_options

Table NameColumn NameKeyExample
dokan_summaryidprimary1
products[‘this_month’ => 1, ‘last_month’ => 3, ‘this_period’ => 0, ‘class’ => ”, ‘parcent’ => 80]
withdraw[‘pending’ => 0, ‘completed’ => 0, ‘cancelled’ => 0 ]
vendors[‘inactive’ => 10, ‘active’ => 10, ‘this_month’ => 6, ‘last_month’ => 10, ‘this_period’ => ”, class’ => ”, ‘parcent’ => 80]
sales[‘this_month’ => 1, ‘last_month’ => 3, ‘this_period’ => 0, ‘class’ => ”, ‘parcent’ => 80]
orders[‘this_month’ => 1, ‘last_month’ => 3, ‘this_period’ => 0, ‘class’ => ”, ‘parcent’ => 80]
earnings[‘this_month’ => 1, ‘last_month’ => 3, ‘this_period’ => 0, ‘class’ => ”, ‘parcent’ => 80]

If we want to show pending counts of –

  • Pending withdraws
  • Pending vendors
  • Pending refunds
  • Pending verifications

Then, we can store this also in the above table or in transient.

Leave a Reply

Your email address will not be published. Required fields are marked *