RentalSystem(Rent, Product Rent
) is a Magento 2 module that enables customers to rent products from your store. This module offers extensive rental management features for both the admin panel and storefront, allowing you to efficiently offer rental services.
Features:
Customers can rent any product available in your store, providing flexibility and expanding the range of services you can offer.
Admins can configure products in the admin panel to be available for rent. This includes:
- Setting the rental price
- Defining the quantity available for rent
- Setting the maximum number of products a customer can add to their rental cart
Admins can set up discounts based on the rental duration. For example, a 10% discount can be applied if the rental period exceeds 5 days. These settings are managed from the admin panel.
Configure the stores where customers can pick up their rented products. This adds convenience for customers and helps manage logistics effectively.
Admins receive notifications for new rental orders, ensuring they are always informed and can process orders promptly.
Limiting the quantity of products in the rental cart:
Customers can view their rental history in their account, providing transparency and allowing them to track their rental activities.
In the free version of the module, admins cannot view orders directly from the admin panel. This feature is available in the premium version.
We are continuously working to improve PeachCode_RentalSystem. Here are some upcoming features and improvements:
1: Admin Panel: 1.1 Allow editing of order details from the admin panel
2: User:
2.1 Allow users to view a page with all products available for rent
A separate page with all products
Link: rent/products/allproducts
- Created custom Indexer for rent Product Only
3: Customer Data: 3.1 Display the rental cart via Private Content
4: Rent Checkout (Front): 4.1 Need to add payment capabilities directly on the checkout page
5: MSI attribute: 5.1 Need to add rent qty for sources
To install the PeachCode_RentalSystem module, follow these steps:
composer require peachcode/rentalsystem:dev-main
2) Download the module package. Extract the package into the app/code/PeachCode/RentalSystem directory.
Run the following commands:
bin/magento setup:upgrade bin/magento setup:di:compile bin/magento setup:static-content:deploy bin/magento cache:flush
Log in to the admin panel and navigate to
Stores -> Configuration -> PeachCode -> RentalSystem
to configure the module settings.
After installing the module, you can configure it by navigating to the configuration section in the admin panel. Here, you can set rental prices, configure discounts, and set up store pickup locations.
On the product page, you will find the option to rent the product.
You need to select the Start Date and End Date for your rental.
After successfully adding the product to your cart, you will see a success message.
The link to the rent cart can be found in the page header.
On the rent/cart/view/
page, you can fill in the following information:
- Stores
- Payment method
- Customer information
On this page, you will find all the cart information.
You can also remove a product from the cart.
After placing the order, you will be redirected to the order confirmation page.
You will receive an email confirmation of your order.
Customers can view their rental history in their account, providing transparency and allowing them to track their rental activities.
Query Example:
query { customerOrders(customerId: 1) { order_id customer_id customer_email total_items html_address total_summ email_sent created_at updated_at } }
How to add item to cart:
- Query
mutation { addRentProductToCart(input: { productId: 1 customerId: 1 endDate: "2024-07-28 00:00:00" startDate: "2024-07-27 00:00:00" }) { cartId endDate startDate } }
- Request
{ "data": { "addRentProductToCart": { "cartId": 1, "endDate": "2024-07-28 00:00:00", "startDate": "2024-07-27 00:00:00" } } }
How to place order?
- Query
mutation { createRentOrderFromCart(input: { cartId: 2 customerId: 1 htmlAddress: "second data" }) { customerId orderId } }
- Request
{ "data": { "createRentOrderFromCart": { "customerId": 1, "orderId": 1 } } }
If you have any questions or need further assistance, please feel free to contact me through my account or email. I would be happy to assist you.
Anatolii Dolia
https://anatoliidolia.github.io/
Magento 2.4.6
Magento 2.4.7