Download the PHP package darinlarimore/simple-commerce-ups without Composer

On this page you can find all versions of the php package darinlarimore/simple-commerce-ups. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package simple-commerce-ups

Simple Commerce Ups

Simple Commerce Ups is a Statamic addon that calculates shipping costs from the UPS API.

Features

This addon:

How to Install

You can search for this addon in the Tools > Addons section of the Statamic control panel and click install, or run the following command from your project root:

Then, you'll need to publish the config file:

Then crete the UPS shipping method, name the Shipping method 'UpsGround' for now.

Setup Instructions

API Credentials

In order to use the UPS api, you'll need to do the following:

  1. Go to the UPS Developer portal and login to your account.
  2. From the Apps section, follow the prompts to create a new app.
  3. Select "I want to integrate UPS technology into my business" and select or create an account to associate. Screenshot 2025-03-29 at 9 20 20 PM
  4. Add your contact information Screenshot 2025-03-29 at 9 20 51 PM
  5. In the next view leave callback URL blank and select the "Ratings" and "Authorization (OAuth)" APIs Screenshot 2025-03-29 at 9 30 00 PM

    Screenshot 2025-03-29 at 9 22 41 PM Screenshot 2025-03-29 at 9 22 30 PM
  6. This next view should have your api credentials! Screenshot 2025-03-29 at 9 24 21 PM

  7. Copy the Client ID from UPS and paste in your .env file:

  8. Copy the Client Secret from UPS and paste in your .env file:

  9. Copy your Account Number from UPS and paste in your .env file:

The addon will use these environment variables to authenticate with the UPS API.

Add a Package Dimensions Field to your Products

Each product needs package dimensions and weight for the packing algorithm to work. Add a package dimensions field to your product blueprint.

The package dimensions field will automatically create nested fields for:

These values will be used to calculate optimal box packing and shipping rates.

Note: Units are determined by your UPS_UNIT_OF_MEASUREMENT configuration.

Add Shipping Method(s)

For each shipping service you want to use (eg. UPS Ground or UPS 2nd Day Air), you'll need to create a new shipping method. To do this, run php please make:ups-shipping-method UPS-Ground which will create a new shipping method in /app/ShippingMethods/UPSGround.php.

In the new file, note the calculateCost() function. This is where the fetchShippingRates() function is called to fetch UPS rates. You can pass in the service code for the UPS service you want to use. The list of service codes available:

Create a new shipping method for each service you want to use, and modify the name, description, and service code within each method.

Add Shipping Method to Simple Commerce Config

In the config/simple-commerce.php file, add the new shipping method to the shipping methods array.

Box Management

UPS shipping rates are calculated based on package dimensions and weight. The addon includes a box management interface in the control panel under "Simple Commerce > UPS Boxes".

Default Boxes

The addon comes with several pre-configured UPS box sizes:

Custom Boxes

You can add custom box sizes through the control panel. Each box requires:

All measurements respect your unitOfMeasurement configuration (metric or imperial).

Package Separately Option

Products can be configured to ship in individual boxes by enabling the package_separately option in the package dimensions.

When enabled, each item quantity will be packed in its own box instead of attempting to combine multiple items in a single box.

Configuration

Unit of Measurement

Set UPS_UNIT_OF_MEASUREMENT in your .env file:

Test Endpoint

Set UPS_USE_TEST_ENDPOINT in your .env file:

Ship From Address

Set shipping origin address in your .env file:

Pickup Type

Set your UPS pickup type in .env:


All versions of simple-commerce-ups with dependencies

PHP Build Version
Package Version
Requires statamic/cms Version ^5.0
dvdoug/boxpacker Version ^4.0
duncanmcclean/simple-commerce Version ^7.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package darinlarimore/simple-commerce-ups contains the following files

Loading the files please wait ...