ShopUrls

Helper to get configured URLs to be used in the webshop.
Generated URLs consider configured categories for several webshop pages and settings for trailing slashes or item URL patterns.

Namespace

IO\Extensions\Constants

Properties
Type Name Description

``

$urlMap

bool

$appendTrailingSlash

Define if a trailing slash should be appended to URLS or not. Consider this option to avoid unnecessary 301 redirects.

string

$trailingSlashSuffix

Suffix to append to URLs containing a trailing slash if required.

bool

$includeLanguage

Indicate if the language should be included in URLs. This is false if the current language equals the default language of the webstore. Otherwise the language should be included in the URLs to be detected correctly.

string

$basket

Relative URL of the basket view.

string

$cancellationForm

Relative URL of the cancellation form view.

string

$cancellationRights

Relative URL of the cancellation rights view.

string

$checkout

Relative URL of the checkout view.

string

$confirmation

Relative URL of the order confirmation view of the most recent order. Use orderConfirmation() to get the URL for the order confirmation view of a specific order.

string

$contact

Relative URL of the contact view.

string

$gtc

Relative URL of the general terms and conditions view.

string

$home

Relative URL of the home page.

string

$legalDisclosure

Relative URL of the legal disclosure view.

string

$login

Relative URL of the login page.

string

$myAccount

Relative URL of the my-account view.

string

$passwordReset

Relative URL of the view displaying the form to reset a password.

string

$privacyPolicy

Relative URL of the privacy policy.

string

$registration

Relative URL of the registration form.

string

$search

Relative URL of the item search view.

string

$termsConditions

Relative URL of the general terms and conditions view.

Deprecated: since 5.0.12. Use $gtc instead.

string

$wishList

Relative URL of the wish list view.

string

$returns

Relative URL of the returns form for the most recent order. Use returns() to get the URL for the returns form for a specific order.

string

$returnConfirmation

Relative URL of the order return confirmation.

Deprecated: since 5.0.12. This is not in use anymore since only a success message will be displayed after submitting a return.

string

$changeMail

Relative URL of the form to change a customer’s mail.

string

$newsletterOptOut

Relative URL of the form to unsubscribe from a newsletter.

string

$orderDocument

Get a preview URL for an order document.

Deprecated: since 5.0.12. Not in use anymore. Use orderDocumentPreview() instead.

``

$templateType

``

$cache

Methods
public __construct($dispatcher)
Parameters

Type

Name

Description

``

$dispatcher

public returns($orderId, $orderAccessKey = null):string

Get the URL of the return form for a specific order.

Parameters

Type

Name

Description

string | int

$orderId

The id of the order to return items for.

string

$orderAccessKey

Access key to authorize accessing the order. Required for guest accounts.

public orderPropertyFile($path):string

Get the URL of a file stored in an order property.

Parameters

Type

Name

Description

string

$path

The path to the file read from the value of the order property.

public orderDocumentPreview($documentId, $orderId, $orderAccessKey = null):string

Get a preview URL for an order document.

Parameters

Type

Name

Description

string | int

$documentId

Id of the order document to get order.

string | int

$orderId

Id of the order the document belongs to.

string

$orderAccessKey

Access key to authorize accessing the order. Required for guest accounts.

public tracking($orderId):string

Get tracking URL for a specific order id.

Parameters

Type

Name

Description

string | int

$orderId

Id of the order to get the tracking URL for.

public orderConfirmation($orderId):string

Get the URL of the order confirmation page for a specific order id.

Parameters

Type

Name

Description

string | int

$orderId

Id of the order to get the confirmation URL for.

public equals($urlA, $urlB):bool

Check if two routes are equal but ignore trailing slashes.

Parameters

Type

Name

Description

string

$urlA

First URL to compare.

string

$urlB

Second URL to compare.

public getTemplateType():string

Get type of the currently displayed page.

public setTemplateType($type)

Set the template type from a custom controller. If not defined the template type will fallback to {@see RouteConfig::CATEGORY} on custom routes.

Parameters

Type

Name

Description

string

$type

The type of the template.

public is($routeKey):bool

Check if current page is of a given type.

Parameters

Type

Name

Description

string

$routeKey

Type to check current page against.

public isLegalPage()

Check if current page is in the list of legal pages.

public fromMemoryCache()
public resetMemoryCache($key = null)
Parameters

Type

Name

Description

``

$key