main
Prevent PO Box Address for OpenCart 3
An OpenCart 3 extension template that blocks PO Box addresses during checkout and improves shipping address validation.
Features
- Prevents PO Box addresses in shipping and billing forms
- Works with OpenCart 3.x and the OCMOD modification system
- No core file edits required
- Easy to install as a
.ocmod.zipextension package - Includes a ready-to-use
install.xmldefinition and upload package structure
Installation
- Download or clone this repository.
- Open the OpenCart admin panel and go to
Extensions > Installer. - Upload the generated
.ocmod.zippackage. - Go to
Extensions > Modificationsand clickRefresh. - Open
Extensions > Extensions, chooseShippingor the appropriate extension type, and install the module if needed.
Setup
- Customize
install.xmlif required:- Update
<name>,<code>, and<version> - Adjust the address validation rules in the modification definitions
- Update
- Place any additional files in the
upload/directory for packaging. - If you add install scripts, include
install.phporinstall.sql.
Usage
- After installation, checkout address fields are validated for PO Box patterns.
- Users attempting to enter a PO Box address will be prompted to use a street address instead.
- Test on a development store before deploying to production.
Requirements
- OpenCart 3.x
- PHP 7.3 or higher
- MySQL 5.7 or higher
- OCMOD support enabled
Author
Mohamed Youssef
Website: my-dev.pro
License
This extension template is provided as-is for OpenCart module development. Review and adapt it to your own store policies and licensing needs.
Releases
1