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:

Setup Instructions

API Credentials

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

  1. Go to UPS and login to your account.
  2. From the Apps section, follow the prompts to create a new app.
  3. Copy the Client ID from UPS and paste in the clientId field in the config.
  4. Copy the Client Secret from UPS and paste in the clientSecret field in the config.
  5. Copy the Account Number from UPS and paste in the accountNumber field in the config.

Add Fields to your Products

In order for the packing algorhythm to work you must add fields for weight, height, width, and depth to your products. They must have the following handles and types:

Field Name Field Type * Field Handle *
Weight (lbs) Float weight
Height (in) Float height
Width (in) Float width
Depth (in) Float depth

* required

Note: The unitOfMeasurement and weightUnitOfMeasurement can be set in the config file and field names can be changed accordingly.

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.


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 ....