Download the PHP package onedesign/oneshipstation without Composer

On this page you can find all versions of the php package onedesign/oneshipstation. 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 oneshipstation

One ShipStation

Integrates Craft Commerce with ShipStation using the Custom Store Integration.

Installation

Note: This plugin is written for Craft 2.x. It may not work in Craft 3+.

Use composer to install this package:

After installing with composer, go to the Craft control panel plugin page to install and configure the settings for the plugin.

Craft Configuration

CSRF Protection

If you have CSRF protection enabled in your app, you will need to disable it for when ShipStation POSTs shipment notifications.

In craft/config/general.php, if you have enableCsrfProtection set to true (or, in Craft 3+, if you don't have it set to false), you will need to add the following:

This will ensure that CSRF protection is enabled for all routes that are NOT the route ShipStation posts to.

"Action" naming collision

ShipStation and Craft have a routing collision due to their combined use of the parameter action. ShipStation sends requests using ?action=export to read order data, and ?action=shipnotify to update shipping data. This conflicts with Craft's reserved word action to describe an "action request", which is designed to allow for easier routing configuration.

Because of this, the route given to ShipStation for their Custom Store integration must begin with your Craft config's "actionTrigger" (in craft/config/general.php), which defaults to the string "actions".

For example, if your actionTrigger is set to "actions", the URL you prove to ShipStation should be:

If your actionTrigger is set to "myCustomActionTrigger", it would be:

Note: the above URL is case sensitive! Due to Craft's segment matching, the oneShipStation segment in the URL must be oneShipStation, not oneshipstation or ONESHIPSTATION.

ShipStation Configuration

Order Statuses

When ShipStation marks an order as shipped it calls back to Craft to update the order. This plugin assumes that there is an order status defined in Craft Commerce with the handle "shipped".

Authentication

Once you have configured your Craft application's OneShipStation, you will need to complete the process by configuring your ShipStation "Custom Store" integration.

There, you will be required to provide a user name, password, and a URL that ShipStation will use to contact your application. These can be found in the plugin settings in Craft control panel.

Using OneShipStation in your Site Templates

Tracking Information

One ShipStation provides a helper method to add to your template to provide customers with a link to track their shipment.

Hooks / Customizing

Custom Fields & Order Notes

Shipstation allows the adding extra data to orders. These fields appear in ShipStation as customField1, customField2, customField3, internalNotes, customerNotes, gift and giftMessage.

You can populate these fields by "latching on" to a Craft hook in your custom site plugin.

Your plugin should return a callback that takes a single parameter $order, which is the order instance. It should return a single value.

In this example, the plugin MyPlugin will send the value my custom value to all orders in the customField1 param to ShipStation:

Note: OneShipStation will add a CustomFieldX child for each plugin that responds to the hook. So, to avoid overlap, be sure to only use one hook.

For internal notes, if a plugin responds to the hook at all, the key will be added. Respond as:

Overriding Shipping Method

By default, One Shipstation will send the shipping method handle to Shipstation for the ShippingMethod on each order.

You can override this very much like you'd add a custom field or internal notes above. In your plugin, define a function oneShipStationShippingMethod(), which returns a callback that takes an order and returns a string. For example, if you want the ShippingMethod to be called Ground for all customers in the US, you could declare a method as follows:

If you return null or void, OneShipstation will assign the shipping method to be the shipping method handle, as default.

Overriding Tracking URLs

Currently One ShipStation only provides links for common carriers. If your carrier is not defined, or if you want a different URL, you can override:

Development

On any Craft 2.x project, navigate to craft/plugins and clone the repository:

Be sure to add craft/plugins/oneshipstation to your other project's gitignore, if applicable:

Bugs / Issues

Submit bug reports and issues via https://github.com/onedesign/oneshipstation/issues. Please be as thorough as possible when submitting bug reports.

Contributing

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!


All versions of oneshipstation with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ~1.0
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 onedesign/oneshipstation contains the following files

Loading the files please wait ....