Class ShipcloudController

Class ShipcloudController

HttpViewController implements HttpViewControllerInterface
AdminHttpViewController implements AdminStatusOnlyInterface
ShipcloudController

Methods summary

public __construct( HttpContextReaderInterface $httpContextReader, HttpResponseProcessorInterface $httpResponseProcessor, ContentViewInterface $contentView )
protected isConfigured( void )

determines if Shipcloud is configured and ready to use

public proceed( HttpContextInterface $httpContext )

Override "proceed" method of parent and use it for initialization.

public actionDefault( void ) : HttpControllerResponseInterface

Run the actionDefault method.

protected splitStreet( string $street_address ) : array

Heuristically splits up a street address into its component street name and house number

protected getDeclaredValue( integer $orders_id ) : float

retrieves an order's total

public actionCreateLabelForm( void ) : HttpControllerResponse

Shows a form for entering data for a label

protected makeProductName( $product )
protected getTransportConditions( $orderId )
protected _prepareSingleFormDataForShipmentRequest( array $postDataArray, boolean $anon_from = false, string $language_code = null ) : KeyValueCollection

Uses POST data from the form returned by actionCreateLabelForm() to populate a KeyValueCollection to be fed to the ShipmentFactory

protected shortenString( string $subject, integer $maxLength ) : string

shortens a string to a maximum length, appending “…” if shortening required

protected getOrderLanguageCode( integer $orders_id ) : string

Looks up the language for a given order and returns the 2-letter ISO code

public actionCreateLabelFormSubmit( void ) : JsonHttpControllerResponse

Processes form submit for forms created by actionCreateLabelForm()

public actionGetShipmentQuote( void ) : JsonHttpControllerResponse

Uses form data (cf. actionCreateLabelForm()) to retrieve a shipment quote

public actionGetMultiShipmentQuote( void ) : JsonHttpControllerResponse

Retrieves shipment quotes (bulk retrieval)

public actionUnconfiguredNote( void ) : HttpControllerResponse

Returns message to be displayed to users if the Shipcloud interface is still unconfigured

public actionLoadLabelList( void ) : HttpControllerResponse

Outputs a list of labels for an order identified by its orders_id via the corresponding GET parameter

public actionDeleteShipment( void )

Deletes a shipment label

public actionPickupShipments( void ) : JsonHttpControllerResponse

Requests pickups for a given list of shipments from each of the carriers involved

public actionLoadMultiLabelList( void ) : HttpControllerResponse

Retrieves list of labels for a set of orders listed in POST[orders_ids].

public actionCreateMultiLabelForm( void ) : HttpControllerResponse

Shows form for bulk label retrieval

protected _getShippingWeight( $orders_id )

computes total weight of products for an order

public actionCreateMultiLabelFormSubmit( void ) : JsonHttpControllerResponse

Processes form data from form returned by actionCreateMultiLabelForm().

protected _enforceLengthLimits( string $carrier, array $toArray ) : array

modifies an array containing a delivery address to suit carrier-specific field lengths

Methods inherited from AdminHttpViewController

validateCurrentAdminStatus()

Methods inherited from HttpViewController

_callActionMethod(), _getPostData(), _getPostDataCollection(), _getQueryParameter(), _getQueryParametersCollection(), _getServerData(), _render(), _validatePageToken(), getTemplateFile()

Constants summary

MAX_DESCRIPTION_LENGTH : integer
50

Properties summary

protected $shipcloudText : ShipcloudText

wrapper for text phrases


		
protected $shipcloudConfigurationStorage : ShipcloudConfigurationStorage

configuration storage


		
protected $shipcloudLogger : ShipcloudLogger

logger


		

Properties inherited from HttpViewController

$assets, $contentView, $httpContextReader, $httpResponseProcessor, $postDataArray, $queryParametersArray, $serverDataArray