Documentation

ShopSettings
in package

Shop settings

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Ivan Schmid ivan.schmid@comvation.com

author

Reto Kohli reto.kohli@comvation.com

subpackage

module_shop

version
3.0.0

Table of Contents

Properties

$changed  : bool
This flag is set to true as soon as any changed setting is detected and stored. Only used by new methods that support it.
$success  : bool
This flag is set to false as soon as storing any setting fails.

Methods

deleteVat()  : mixed
Delete VAT entry
errorHandler()  : bool
Fixes database errors.
setProductsVat()  : mixed
Apply default VAT rate
storeCurrencies()  : mixed
Stores the Currencies as present in the POST request
storeGeneral()  : bool
Store general settings
storePayments()  : mixed
Stores the Payments as present in the POST request
storeSettings()  : mixed
Runs all the methods to store the various settings from the shop admin zone.
storeShipping()  : mixed
Stores any changes made to any shipper or shipment
storeVat()  : mixed
Stores all VAT settings
update_vat()  : mixed
Add and/or update VAT entries
storeCountries()  : bool
Stores countries settings

Properties

$changed

This flag is set to true as soon as any changed setting is detected and stored. Only used by new methods that support it.

private static bool $changed = null
Tags
access

private

$success

This flag is set to false as soon as storing any setting fails.

private static bool $success = null

Only used by new methods that support it.

Tags
access

private

Methods

deleteVat()

Delete VAT entry

public static deleteVat() : mixed

Takes the ID of the record to be deleted from $_GET['vatid'] and passes it on the static method.

Tags
static

errorHandler()

Fixes database errors.

public static errorHandler() : bool

Also migrates settings from the old Shop settings table to \Cx\Core\Setting.

Tags
throws
Update_DatabaseException
Return values
bool

False. Always.

setProductsVat()

Apply default VAT rate

public static setProductsVat() : mixed

If the get request array field "setVatAll" is present, sets the VAT ID to the ID found therein for all the products. If the get request array field "setVatUnset" is present, sets the VAT ID to the ID found therein for all products having a zero or NULL VAT ID.

Tags
todo

Add possibility to choose some products to change, and add a parameter for this list of IDs

global

ADONewConnection

static

storeGeneral()

Store general settings

public static storeGeneral() : bool
Tags
static
Return values
bool

true on success, false otherwise.

storeSettings()

Runs all the methods to store the various settings from the shop admin zone.

public static storeSettings() : mixed

Note that not all of the methods report their success or failure back here (yet), so you should not rely on the result of this method.

Tags
static
Return values
mixed

True on success, false on failure, null if no change is detected.

storeShipping()

Stores any changes made to any shipper or shipment

public static storeShipping() : mixed

storeVat()

Stores all VAT settings

public static storeVat() : mixed

Takes all values from the POST array.

Tags
static

update_vat()

Add and/or update VAT entries

public static update_vat() : mixed

Takes the class and rate of the VAT to be added from the $_POST array variable and passes them on to . Takes the IDs, classes and rates of the records to be updated from the $_POST array variable and passes them on to .

Tags
static

storeCountries()

Stores countries settings

private static storeCountries() : bool

Returns null if nothing is changed.

Return values
bool

True on success, false on failure, or null on noop.


        
On this page

Search results