Is Auto Reorder available in nopcommerce from customer front side? - nopcommerce

We are customizing the nopCommerce for one of our client.
They need the functionality to auto reorder from customer front where customer select the cycle period and cycle times, they don't need Recurring product where admin set the cycle period and cycle times.

as of now, NopCommerce dont have such feature out of the box, so what you will have to do is create a plugin for it.
here is what you might look at.
1) create a table with customer id, product id, starting date, ending date, interval.
2) customer frontend view make design should support subscribing to a product, and post data to your plugin, and insert record in the new table for each product.
3) have a schedule task run daily against that table for orders that are due.

Related

How to limit one order per day for each user in woocommerce

I need to limit users to purchase one order per day in woocommerce.
The woocommerce has limit order option.
when I set the limit option to 1, it works probably, but if user wants to edit order, he can not because when woocommerce starts edit an order, first create a new empty order in database, then after user ends the edition, woocommerce set last order as canceled and update new order.
As I set order limit to one, the empty order does not create, so the user cannot edit his order.
How can I force woocommerce to limit one order per day while users could edit that one order?

Woocommerce - how to match orders and items back to customers

I've been provided with a Woocommerce SQL dump (don't have access to that platform anymore as it was shut down), and need to identify their most valuable customers and what they bought, i.e.
Customer X spent the most at $X, and the last purchase item was 'Red umbrella'
Customer Y spent next most at $Y etc
I can see a wp_users table which has the customer data, a wp_woocommerce_order_items table which has the items data.
My question is - where can I find revenue data, and how can I link these tables (which IDs in each table correspond to which other ID in other tables?) - in particular how do I link customers, to orders, to items?
Thanks a lot
Look for the table wp_postmeta in that table, the field _customer_user will hold the id of the customer who placed that order post_id field in that same table.

How to set custom order total in woocommerce?

I currently have 6 items in cart, which cost £456. I'm trying to implement a custom payment system, so the customer can pay some now and some later. So i want the cost to be £400.
The only function i've found is set_total in WC_Abstract_Order but to use WC_Abstract Order you need the order id and the order hasn't been placed yet for an id to be generated.
Any idea how to solve?

Drupal Commerce: renew role / subscription

We are selling a product using Drupal Commerce that will renew yearly, but not automatically (expensive, users will likely use POs). Right now, after purchase, they will receive the appropriate role based on their purchase for 1 year.
If they pay before the end date, I would like them to get an additional, non-overlapping year.
I would like a solution that is independent of payment type because some things will be done manually.
I had implemented such a solution before. There was a subscription for a year,two years & three years. The problem was how to maintain the subscription limit & how to extend it.
The solution was creating a hidden field within for every user. When a user first buys a package for a year we programatically make a entry of the end timestamp in the end field. When he buys one more package the current timestamp value of the field is added by additional timestamp
timestamp = timestamp + 1years timestamp
or
timestamp = timestamp + 2years timestamp
Hope this helps you

Reserve items in shopping cart

Question has been asked with no answers over a month ago:
Shopping Cart reserve product
I have a shopping cart for my site in ASP.NET using SQL Server. When a user adds an item to the shopping cart I need to set a value in the product table to reserve the item (in order to avoid more people reserving the item, or buying it). Now, if the current user decides to abandon their cart by closing the browser, then how am I to restore the product record to being 'unreserved'?
Is there another way of reserving the item globally?
When a user "reserves" an item give the reservation an end date/time (e.g. DateTime.Now + 6 hrs, or whatever), by which they must have purchased the reserved item, otherwise after that date/time the reservation becomes void - I believe this is how the vast majority of bricks-and-mortar shops would work as well.
If you're worried about having a tbReservations table with loads of deprecated rows you can setup a SQL job to clear the table of old/invalid reservations each night or whenever is suitable for the business case.
Read the post by Benson Yu in this thread. In the Session_End method you can "unreserve" the products that were not checked out.

Resources