An open API service indexing awesome lists of open source software.

https://github.com/yashgupta-dev/opencart-shell

use to create extension and controller, language, model, template, library it will save your max time to create files.
https://github.com/yashgupta-dev/opencart-shell

bin core opencart php shell shellscript vendor

Last synced: 4 months ago
JSON representation

use to create extension and controller, language, model, template, library it will save your max time to create files.

Awesome Lists containing this project

README

          

# OpenCart Extension Creation Script

This script automates the creation of extensions for OpenCart, specifically targeting the creation of controllers, models, languages, views, and OCMOD files.

## Usage

### Prerequisites

Ensure you have the following prerequisites installed:

- **Composer**: Required for installing PHP libraries.
- **OpenCart**: Ensure OpenCart is installed and configured properly.

### Commands

1. **Create Extension**:
```bash
./vendor/bin/opencart.sh create-extension [-c] [-m]
```
- ``: Type of the extension (e.g., module, payment, shipping).
- ``: Name of the extension (e.g., my_extension_name).
- `[-c]`: Optional flag to create catalog-side files.
- `[-m]`: Optional flag to create model in admin side with install & unsinstall methods also it will ask to enter table name & fields name & field data type.

2. **Install Validation Library**:
```bash
./vendor/bin/opencart.sh install-validation-library
```
- Installs Code Corner's validation library via Composer.

3. **Create Library**:
```bash
./vendor/bin/opencart.sh create-library
```
- ``: Name of the library to create.

4. **Create Model**:
```bash
./vendor/bin/opencart.sh create-model
```
- ``: Path to store the model (e.g., extension/payment).
- ``: Name of the model to create.

5. **Create Controller**:
```bash
./vendor/bin/opencart.sh create-controller
```
- ``: Path to store the controller (e.g., extension/payment).
- ``: Name of the controller to create.

6. **Create Language File**:
```bash
./vendor/bin/opencart.sh create-language
```
- ``: Path to store the language file (e.g., extension/payment).
- ``: Name of the language file to create.

7. **Create View Template**:
```bash
./vendor/bin/opencart.sh create-template
```
- ``: Path to store the template (e.g., extension/payment).
- ``: Name of the template to create.

8. **Create OCMOD XML File**:
```bash
./vendor/bin/opencart.sh create-ocmod [-z]
```
- ``: Name of the OCMOD XML file.
- `[-z]`: Optional flag to create a zip file.

### Notes

- Always ensure paths and names are specified correctly to avoid errors.
- Modify the script as per your specific requirements and file structure.
- Ensure proper permissions are set for script execution (`chmod +x opencart.sh`).

---

This README provides a structured overview of how to use the script and its various functionalities. Adjust the content based on your specific script's features and usage guidelines.