Plugin Details
Home / Plug-in market / Virtual Product
Virtual Product
# Virtual Product Plugin for BeikeShop
## Functional Features
Virtual goods support
- ** Product Type Setting ** : Supports setting ordinary products as virtual products, applicable to digital products such as e-books, digital materials, audio-visual files, software systems, online courses, activation codes, etc., which do not require physical logistics
- ** Inventory Management ** : Virtual goods do not require physical inventory. They are automatically dispatched after purchase and are not subject to inventory quantity restrictions
- ** Order Processing ** : After a successful order payment, the system automatically completes the order without the need for manual shipping operations
Multiple download methods
- ** Local file Upload ** : Supports uploading digital files in common formats such as ZIP, PDF, MP4, MP3, and EXE
- Automatic file type detection and size limitation
- Supports resume download from breakpoint
The files are stored locally on the server, which is safe and reliable
- ** Cloud Disk Link Sharing ** : Supports mainstream cloud disks such as Baidu Netdisk, Quark Netdisk, Alibaba Cloud Disk, OneDrive, and Google Drive
- A password for extracting from the cloud disk can be set
- Supports customizing the validity period of cloud disk links
After the customer makes a purchase, the cloud disk link and password will be displayed
Download Control and Protection
- ** Download Limit ** : The maximum number of downloads for each order can be set (e.g., allowing 3 downloads)
- ** Download Validity Period ** : The validity period of the download link can be set (e.g., valid within 7 days)
Automatic email notification
- ** Automatic sending upon successful payment ** : After a customer successfully makes a payment, the system will automatically send an email containing the download link
- ** Customized Email Template ** : Supports customizing email subject lines and body contents
- ** Variable Replacement Support ** : Dynamic variables (order number, customer name, product name, download link, etc.) can be used in emails.
Environmental requirements
-BeikeShop >= 1.5.0
PHP >= 8.0
- Supports file upload function
Installation steps
Place the plugin directory under the \'plugins/VirtualProduct/\' directory
2. Run the database migration
```bash
php artisan migrate --path=plugins/VirtualProduct/database/migrations
` ` `
3. Enable the plugin in the background plugin management
4. (Optional) Configuration file upload size limit:
Modify \'upload_max_filesize\' and \'post_max_size\' in \'php.ini\'
It is recommended to set it to at least 50MB to support large file uploads
## Instructions for Use
Background Settings
#### enable virtual goods
1. Enter the background "Product Management" → "Product List"
2. Select the product you want to set as a virtual commodity and click "Edit"
3. On the product editing page, find the "Virtual Products" TAB
4. Check "Enable Virtual Goods Function"
5. Select the download type: "Local Upload" or "Cloud Disk Link"
#### Upload configuration locally
1. Select the "Local Upload" type
2. Click "Select File" to upload the digital file
3. Set download restrictions
- ** Download times ** : It is recommended to set it to 3 to 5 times to leave room for customers to re-download
- ** Validity period ** : It is recommended to set it at 7 to 30 days, which may be adjusted according to the type of product
4. Fill in the file description (optional, displayed on the download page)
5. Click "Save" to complete the Settings
#### network disk link configuration
1. Select the "Cloud Disk Link" type
2. Fill in the cloud disk sharing link (complete URL)
3. Fill in the extraction password (if available)
4. Set download restrictions (same as local upload)
5. Click "Save" to complete the Settings
#### mail Settings
Enter "Virtual Goods" → "Email Settings"
2. Configure the email template
- ** Email Subject ** : It is recommended to include the order number and product name, such as "Order {order_number} - {product_name} Download Link"
- ** Email Body ** : Supports html and can insert variables
3. Set the automatic sending option
- ** Automatically sent after successful payment ** : It is recommended to enable
- ** Send after manual review ** : Applicable to virtual goods that require manual verification
4. Click "Save Settings"
Front desk purchase process
1. ** Browsing goods ** : Customers browse and select virtual goods in the mall
2. ** Add to Cart ** : Add to cart and settle the bill just like regular items
3. ** Payment Order ** : Complete the payment process
4. ** Receive Email ** : After a successful payment, you will automatically receive an email containing the download link
5. ** Download File **
Click the download link in the email
Or log in to your account, find the corresponding order in "My Orders", and click the "Download" button
6. ** Complete Download ** : Use the remaining download times within the validity period to complete the download
## Email template variable
The email template supports the following variables, which can be inserted in the \'{variable_name}\' format:
Email template example
` ` `
Dear customer {customer_name}, hello!
Thank you for purchasing the product: {product_name}
Your order number: {order_number}
Please click on the following link to download your digital goods
{download_links}
Download restrictions
- Download limit: {download_limit}
- Valid until: {expire_date}
If you have any questions, please contact our customer service team.
Wish you a pleasant experience!
{shop_name}
{shop_url}
` ` `
Frequently Asked Questions
Q: Is there a limit on the size of the uploaded files?
A: The filesize is limited by the PHP configuration \'upload_max_filesize\'. It is recommended to set it to 50MB or larger. If you need to upload larger files, it is recommended to use the cloud disk link method.
Q: Can the download link be modified?
A: Yes. After modifying the virtual product Settings, the new download link will take effect, and the old link in the sent email will become invalid.
Q: What should I do if the customer doesn\'t receive the download email?
A: Log in to your account, find the corresponding order in "My Orders", and click the "Download" button.