Search by

gp247 / shop

gp247

E-commerce package of GP247 (cart, checkout, orders, customers) β€” the selling layer that S-Cart is built on

Package info

github.com/gp247-dev/shop

Homepage

pkg:composer/gp247/shop

Statistics

Installs: 1 517

Dependents: 3

Suggesters: 0

Stars: 0

Open Issues: 0


README

  _____  _____     ___  _  _   _____ 
 / ____|  __ \   |__ \| || | |___  |
| |  __| |__) |     ) | || |_   / / 
| | |_ |  ___/     / /|__   _| / /  
| |__| | |        / /_   | |  / /   
 \_____|_|       |____|  |_| /_/    

🌐 Language: πŸ‡»πŸ‡³ TiαΊΏng Việt Β· πŸ‡¬πŸ‡§ English (current) Β· πŸ‡―πŸ‡΅ ζ—₯本θͺž

E-commerce package of GP247 β€” the selling layer that S-Cart is built on

composer require gp247/shop

Tests Total Downloads Latest Stable Version License Ask DeepWiki

Introduction

GP247/Shop is a core package in the GP247 ecosystem that turns your GP247 site into a full-featured online store. It provides comprehensive e-commerce functionality and inherits all GP247 ecosystem features.

Key Features

E-commerce Features

  • Product Management
    • Product categories and attributes
    • Product variants and options
    • Inventory management
    • Bulk import/export
  • Order Management
    • Order processing and tracking
    • Multiple payment gateways
    • Shipping methods integration
    • Order status management
  • Customer Management
    • Customer profiles and accounts
    • Address management
    • Order history
    • Customer groups and discounts
  • Marketing Tools
    • Promotions and discounts
    • Coupon management
    • Newsletter integration
    • Product reviews and ratings
  • Shopping Features
    • Shopping cart
    • Wishlist
    • Product comparison
    • Recently viewed products
  • Multi-vendor Support
    • Vendor dashboard
    • Commission management
    • Vendor product management
    • Vendor order tracking

GP247 Ecosystem Features

  • Page content management
  • Flexible template system
  • Extensible plugin system
  • Navigation and link management
  • Integrated contact and subscription forms
  • Multi-language support
  • SEO optimization
  • Responsive design
  • Security features
  • Backup and restore

Installation

πŸ“˜ Full installation guide β€” choosing a package set (S-Cart, GP247 CMS, core only), hosting without a command line, adding front/shop to an existing site, troubleshooting: Installing GP247 and S-Cart.

Option 1: New installation with GP247 CMS

  1. Install gp247/cms (includes Laravel, GP247/Core, GP247/Front)

composer create-project gp247/cms

  1. Install gp247/shop package

composer require gp247/shop

  1. Register the service provider in bootstrap/providers.php (add at the end of the array)
return [
    // ... existing providers
    GP247\Shop\ShopServiceProvider::class,
];
  1. Install and create sample data

php artisan gp247:shop-install

php artisan gp247:shop-sample

Option 2: Use S-Cart source code

S-Cart already includes all the necessary components. See the full details at the GitHub repository.

  1. Create the project

composer create-project gp247/s-cart

  1. Install the platform (auto-detects core + front + shop)

php artisan gp247:install

When it finishes, the last block of the output prints the admin path, the user name admin and a random password. The password is shown only once β€” copy it before you close the Terminal.

  1. (Optional) Install sample data

php artisan gp247:shop-sample

Customization

Customize Admin Views

To customize admin views, run:

php artisan vendor:publish --tag=gp247:shop-view-admin

The views will be published to resources/views/vendor/gp247-shop-admin.

Customize Front Views

To customize and update front views, run:

php artisan vendor:publish --tag=gp247:shop-view-front

The views will be stored in app/GP247/Templates/GP247Front.

If you are not using the GP247Front template, manually copy the views from vendor/gp247/shop/src/Views/front to your template directory.

Overriding controllers

Step 1: Copy the controller files you want to override from vendor/gp247/shop/src/Controllers (or src/Api/Controllers) to app/GP247/Shop/Controllers (or app/GP247/Shop/Api/Controllers)

Step 2: Change the namespace from GP247\Shop\Controllers (or GP247\Shop\Api\Controllers) to App\GP247\Shop\Controllers (or App\GP247\Shop\Api\Controllers) β€” just prepend App, keep the rest as-is.

Running the tests

The gp247/shop test suite lives in the tests/ folder of this repository and runs automatically on GitHub Actions for every change (PHP 8.3 / 8.4 Γ— MySQL / MariaDB). The tests are not part of the Composer package; to run them yourself:

  1. Clone this repository.

  2. Create a blank Laravel application and install gp247/shop from your clone as described in the Installation section above, with gp247/core 3.18.0 or later and gp247/front 3.14.0 or later (the test base classes and shared helpers ship in GP247\Core\Testing and GP247\Front\Testing). The tests check the copy installed in the application's vendor/, so point Composer at the clone first: composer config repositories.shop '{"type": "path", "url": "/path/to/shop", "options": {"symlink": false}}', then composer require "gp247/core:^3.18" "gp247/front:^3.14" "gp247/shop:*@dev". Register GP247\Front\FrontServiceProvider and GP247\Shop\ShopServiceProvider in bootstrap/providers.php and run php artisan gp247:install. Use a database reserved for tests β€” its name must end with _test or _testing. The suite refuses any other database so it never touches real data; to use another name, confirm it with GP247_TEST_DATABASE=<database name>.

  3. From the application's root run:

    GP247_HOST_APP="$PWD" vendor/bin/phpunit -c /path/to/shop/phpunit.xml.dist

Documentation

License

The GP247/Shop is open-sourced software licensed under the MIT license.