Download the PHP package tigron/skeleton-package-delivery without Composer

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

skeleton-package-delivery

Description

Gives delivery functionality of products in Skeleton

Installation

Installation via composer:

composer require tigron/skeleton-package-delivery

Howto

Create a module in your application that extends from Skeleton\Package\Web\Module\Crud

<?php
/**
 * Module Crud
 *
 * @author Christophe Gosiau <[email protected]>
 * @author Gerry Demaret <[email protected]>
 * @author David Vandemaele <[email protected]>
 */

use Skeleton\Package\Web\Module\Delivery

class Web_Module_Deliver extends Delivery {

    /**
     * The template
     *
     * @access public
     */
    public $template = 'delivery.twig';
}

Create a template for your module that injects the generated templates into your layout

{% extends "_default/layout.base.twig" %}

{% block header_js %}
    {% embed "@skeleton-package-crud/javascript.twig" %}{% endembed %}
{% endblock header_js %}

{% block header_css %}
    {% embed "@skeleton-package-crud/css.twig" %}{% endembed %}
{% endblock header_css %}

{% block content %}
    {% embed "@skeleton-package-crud/content.twig" %}{% endembed %}
{% endblock content %}

Create a route in your application Config.php

/**
 * Routes
 */
'routes' => [
    'web_module_deliver' => [
        '$language/deliver'
    ],
]

Now make sure you implement the following classes:

Deliverable

<?php
/**
 * Deliverable interface
 *
 *
 * @author Gerry Demaret <[email protected]>
 * @author Christophe Gosiau <[email protected]>
 * @author David Vandemaele <[email protected]>
 */

namespace Skeleton\Package;

interface Deliverable {

    /**
     * Get name
     *
     * @access public
     * @return string $name
     */
    public function get_name();

    /**
     * Get weight
     *
     * @access public
     * @return double $weight (in kg)
     */
    public function get_weight();
    }

Delivery\Recipient

<?php
/**
 * Recipient interface
 *
 *
 * @author Gerry Demaret <[email protected]>
 * @author Christophe Gosiau <[email protected]>
 * @author David Vandemaele <[email protected]>
 */

namespace Skeleton\Package\Delivery;

interface Recipient {

    /**
     * Get firstname
     *
     * @access public
     * @return string $firstname
     */
    public function get_firstname();

    /**
     * Get lastname
     *
     * @access public
     * @return string $lastname
     */
    public function get_lastname();

    /**
     * Get company
     *
     * @access public
     * @return string $company
     */
    public function get_company();

    /**
     * Get street
     *
     * @access public
     * @return string $street
     */
    public function get_street();

    /**
     * Get housenumber
     *
     * @access public
     * @return string $housenumber
     */
    public function get_housenumber();

    /**
     * Get zipcode
     *
     * @access public
     * @return string $zipcode
     */
    public function get_zipcode();

    /**
     * Get city
     *
     * @access public
     * @return string $city
     */
    public function get_city();

    /**
     * Get country
     *
     * @access public
     * @return Country $country
     */
    public function get_country();

    /**
     * Get phone
     *
     * @access public
     * @return string $phone
     */
    public function get_phone();

    /**
     * Get fax
     *
     * @access public
     * @return string $fax
     */
    public function get_fax();

    /**
     * Get vat
     *
     * @access public
     * @return string $vat
     */
    public function get_vat();

    /**
     * Get email
     *
     * @access public
     * @return string $email
     */
    public function get_email();
}

Courier

<?php
/**
 * Shipping method interface
 *
 * @author Christophe Gosiau <[email protected]>
 * @author Gerry Demaret <[email protected]>
 * @author David Vandemaele <[email protected]>
 */

namespace Skeleton\Package;

interface Courier {

    /**
     * Get name
     *
     * @abstract
     * @access public
     * @param Basket $basket
     * @return string $name
     */
    public function get_name();

    /**
     * Validate shipment
     *
     * @access public
     * @param Shipment $shipment
     * @return array $errors
     */
    public function validate_shipment(\Skeleton\Package\Shipment $shipment);

    /**
     * Handle a shipment
     *
     * @access public
     * @param \Skeleton\Package\Shipment $shipment
     */
    public function handle(\Skeleton\Package\Shipment $shipment);

    /**
     * Is traceable
     *
     * @access public
     * @return bool $traceable
     */
    public function is_traceable();

    /**
     * Trace
     *
     * @access public
     * @return array  $trace
     */
    public function trace(\Skeleton\Package\Delivery\Shipment $shipment);

    /**
     * Has label
     *
     * @access public
     * @return bool $has_label
     */
    public function has_label();

    /**
     * Get label
     *
     * @access public
     * @return File $label
     */
    public function get_label(\Skeleton\Package\Delivery\Shipment $shipment);

}

Now start creating deliveries:

    $delivery = new \Skeleton\Package\Delivery();
    $delivery->set_trigger($my_class);
    $delivery->set_delivery_recipient($my_shipping_address); // Delivery Recipient
    $delivery->set_courier($this->shipping_method->shipping_method_courier); // Courier
    $delivery->save();

    foreach ($this->get_order_items() as $order_item) {
        $delivery->add_deliverable($order_item->product); // Deliverable
    }

All versions of skeleton-package-delivery with dependencies

PHP Build Version
Package Version
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 tigron/skeleton-package-delivery contains the following files

Loading the files please wait ...