Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560 [2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85 [3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50 [4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13 [5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
| Server IP : 94.177.8.99 / Your IP : 216.73.217.165 Web Server : Apache/2.4.58 (Ubuntu) System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/theyoungdesigners_com/modules/store/ |
Upload File : |
<?php
namespace modules\store;
class module_info extends \module {
function __info() {
return [
'version' => '2026.7.2',
'class' => 'modules\\store\\main',
'depends' => ['input', 'output', 'database', 'googleAddress', 'geoIp', 'crontab', 'tabs'],
'name' => 'Online Store',
'email' => [ // internal name => entrypoint
'seller' => 'modules\\store\\view\\storeclient_view::template_seller',
'buyer' => 'modules\\store\\view\\storeclient_view::template_buyer',
'track' => 'modules\\store\\view\\storeclient_view::template_track', // tracking is now available
],
'settings' => [
[
'name' => 'sales',
'caption' => 'Sales Email Address',
'type' => 'string',
],[
'name' => 'currency', //USD, CAD, EUR, GBP (symbol will change based on currency
'caption' => 'Currency',
'placeholder' => 'USD',
'type' => 'string',
],[
'name' => 'priceformat',
'caption' => 'Price Format',
'type' => 'select',
'options' => [
'0' => '100.00',
'1' => '100⁰⁰',
'2' => '100[⁰⁰] (drop ⁰⁰ for whole dollars)',
],
'default' => '0',
],[
'name' => 'originzip',
'caption' => 'Your ZIP Code',
'type' => 'string',
],[
'name' => 'origintz',
'caption' => 'Your Time Zone',
'type' => 'select',
'options' => '{timezone}',
],[
'name' => 'homepage',
'caption' => 'Home Page',
'type' => 'select',
'filter' => 'url.key.select',
],[
'name' => 'physical',
'caption' => 'New Products',
'type' => 'checkbox',
'hint' => 'Default value for "Physical Stock" field',
],[
'name' => 'packingslip',
'caption' => 'Packing Slip Template',
'type' => 'select',
'options' => '{register.packingslip}',
],[
'name' => 'pslip_print',
'caption' => 'Packing Slip Printer',
'type' => 'string',
'placeholder' => 'xxxxxxxxxxxxxx@hpeprint.com', // use "screen" as a special value to display what would be emailed
],
],
'user_settings' => [
[
'name' => 'default_address',
'caption' => 'Default Delivery Address',
'type' => 'string',
'default' => '',
],
],
'database' => [
'store_category' => [
'engine' => 'auto',
'charset' => 'utf-8',
'comment' => 'Store Categories', // product categories
'fields' => [
[
'name' => 'sc_id',
'type' => 'integer',
'size' => 11,
'unsigned' => TRUE,
'autoinc' => TRUE,
'null' => FALSE,
],[
'name' => 'sc_parent',
'type' => 'integer',
'size' => 11,
'unsigned' => TRUE,
'null' => TRUE,
],[
'name' => 'sc_caption',
'type' => 'string',
'size' => 80,
],[
'name' => 'sc_tag',
'type' => 'string',
'size' => 80,
]
],
'index' => [
'PRIMARY' => [ 'type' => 'primary',
'fields' => ['sc_id'],
],
],
],
'store_manu' => [
'engine' => 'auto',
'charset' => 'utf-8',
'comment' => 'Manufacturers',
'fields' => [
[
'name' => 'sm_id',
'type' => 'integer',
'size' => 11,
'unsigned' => TRUE,
'autoinc' => TRUE,
'null' => FALSE,
],[
'name' => 'sm_caption',
'type' => 'string',
'size' => 80,
]
],
'index' => [
'PRIMARY' => [ 'type' => 'primary',
'fields' => ['sm_id'],
],
],
],
'store_delivery' => [
'engine' => 'auto',
'charset' => 'utf-8',
'comment' => 'Delivery Addresses',
'fields' => [
[
'name' => 'sd_id',
'type' => 'integer',
'size' => 11,
'unsigned' => TRUE,
'autoinc' => TRUE,
'null' => FALSE,
],[
'name' => 'sd_guid',
'type' => 'string',
'size' => 36,
'null' => FALSE,
],[
'name' => 'sd_user_id',
'type' => 'int',
'size' => 11,
'null' => FALSE,
],[
'name' => 'sd_name',
'type' => 'string',
'size' => 200,
],[
'name' => 'sd_addr1',
'type' => 'string',
'size' => 200,
],[
'name' => 'sd_addr2',
'type' => 'string',
'size' => 200,
],[
'name' => 'sd_town',
'type' => 'string',
'size' => 100,
],[
'name' => 'sd_state',
'type' => 'string',
'size' => 50,
],[
'name' => 'sd_postcode',
'type' => 'string',
'size' => 15,
],[
'name' => 'sd_country',
'type' => 'string',
'size' => 2,
]
],
'index' => [
'PRIMARY' => [ 'type' => 'primary',
'fields' => ['sd_id'],
],
'byGuid' => [ 'type' => 'unique',
'fields' => ['sd_guid'],
],
'byUser' => [ 'type' => 'index',
'fields' => ['sd_user_id', 'sd_id'],
],
],
],
'store_product' => [
'engine' => 'auto',
'charset' => 'utf-8',
'comment' => 'Products',
'fields' => [
[
'name' => 'sp_id',
'type' => 'integer',
'size' => 11,
'unsigned' => TRUE,
'autoinc' => TRUE,
],[
'name' => 'sp_product', //product title
'type' => 'string',
'size' => 200,
'null' => FALSE,
],[
'name' => 'sp_manu', //manufacturer
'type' => 'integer',
'size' => 11,
'unsigned' => TRUE,
'null' => TRUE,
],[
'name' => 'sp_desc', //description/about this product
'type' => 'text',
'default' => '',
],[
'name' => 'sp_category', // product category
'type' => 'integer',
'unsigned' => TRUE,
'size' => 11,
],[
'name' => 'sp_sku',
'type' => 'string',
'size' => 80,
],[
'name' => 'sp_model',
'type' => 'string',
'size' => 80,
],[
'name' => 'sp_upc',
'type' => 'string',
'size' => 80,
],[
'name' => 'sp_usestock',
'type' => 'boolean',
'default' => 0,
],[
'name' => 'sp_stock', // available stock
'type' => 'double',
],[
'name' => 'sp_allocated', // stock assigned to active orders
'type' => 'double',
'default' => 0,
],[
'name' => 'sp_price',
'type' => 'double',
],[
'name' => 'sp_weight', // in grams
'type' => 'integer',
'size' => 11,
],[
'name' => 'sp_lithium', // has lithium battery; is lithium battery
'type' => 'string',
'size' => 4,
'default' => '',
],[
'name' => 'sp_media', // is this media item? book/booklet/cd/magazine
'type' => 'boolean',
'default' => 0,
],[
'name' => 'sp_feature', // featured product?
'type' => 'boolean',
'default' => 0,
],[
'name' => 'sp_featuretext', // override product title
'type' => 'string',
'size' => 200,
'default' => '',
],[
'name' => 'sp_active', // display in Store?
'type' => 'boolean',
'default' => 1,
]
// dimensions
],
'index' => [
'PRIMARY' => [ 'type' => 'primary',
'fields' => ['sp_id'],
],
'bySku' => [ 'type' => 'index',
'fields' => ['sp_sku'],
],
'byCategory' => [ 'type' => 'index',
'fields' => ['sp_category', 'sp_feature', 'sp_active'],
],
'byUpc' => [ 'type' => 'index',
'fields' => ['sp_upc'],
],
],
],
'store_order' => [
'engine' => 'auto',
'charset' => 'utf-8',
'comment' => 'Orders',
'fields' => [
[
'name' => 'so_order', // order number
'type' => 'integer',
'size' => 11,
'unsigned' => TRUE,
'autoinc' => TRUE,
],[
'name' => 'so_ordernum', // this is the final (random) Order Id for the client
'type' => 'string',
'size' => 12,
'default' => '',
],[
'name' => 'so_date', // date/time of order
'type' => 'integer',
'size' => 11,
],[
'name' => 'so_test', // a test order?
'type' => 'boolean',
'default' => 0,
],[
'name' => 'so_user_id',
'type' => 'int',
'size' => 11,
],[
'name' => 'so_status', // draft / paid / packed / shipped / invoiced / complete / canceled
'type' => 'string',
'size' => 20,
],[
'name' => 'so_paymeth', // payment method = paypal / stripe / etc
'type' => 'string',
'size' => 20,
],[
'name' => 'so_name',
'type' => 'string',
'size' => 200,
],[
'name' => 'so_email',
'type' => 'string',
'size' => 513,
],[
'name' => 'so_country', // only used for digital orders
'type' => 'string',
'size' => 2,
],[
'name' => 'so_postcode', // used for digital and physical taxes. Also Used to calculate freight
'type' => 'string',
'size' => 15,
],[
'name' => 'so_delivery', // guid. only used for physical orders, or combined digital/physical
'type' => 'string',
'size' => 36,
'null' => TRUE,
],[
'name' => 'so_json', // delivery address json
'type' => 'text',
'default' => '',
],[
'name' => 'so_freight', // freight option
'type' => 'string',
'size' => 8,
'null' => TRUE,
],[
'name' => 'so_freight_json', // freight options
'type' => 'text', // description, price, taxable
'default' => '',
],[
'name' => 'so_total', // order total
'type' => 'double',
'default' => 0,
],[
'name' => 'so_est_ship', // estimated shipping date
'type' => 'int',
'size' => 11,
'null' => TRUE,
],[
'name' => 'so_est_delivery', // estimated delivery date
'type' => 'int',
'size' => 11,
'null' => TRUE,
],[
'name' => 'so_useragent',
'type' => 'string',
'size' => 200,
],[
'name' => 'so_ipaddress',
'type' => 'string',
'size' => 40,
],[
'name' => 'so_orderstatus', // Ordered, Preparing for Shipment, In Transit, Out for Delivery, Delivered
'type' => 'string',
'size' => 80,
'default' => 'Ordered',
],[
'name' => 'so_cancelreason',
'type' => 'string',
'size' => 10,
'null' => TRUE,
],[
'name' => 'so_refund', // what has been refunded?
'type' => 'string',
'size' => 10,
'null' => TRUE,
],[
'name' => 'so_cancelrequest', // cancellation requested by customer?
'type' => 'boolean',
'default' => 0,
],[
'name' => 'so_edited', // last edit
'type' => 'int',
'size' => 11,
'null' => TRUE,
],[
'name' => 'so_printed', // last pslip print
'type' => 'int',
'size' => 11,
'null' => TRUE,
],[
'name' => 'so_extras', // extras - discounts/fees/etc
'type' => 'text',
'null' => TRUE,
]
],
'index' => [
'PRIMARY' => [ 'type' => 'primary',
'fields' => ['so_order'],
],
'byUser' => [ 'type' => 'index',
'fields' => ['so_user_id', 'so_order'],
],
'byOrder' => [ 'type' => 'index',
'fields' => ['so_ordernum'],
],
],
],
'store_order_detail' => [
'engine' => 'auto',
'charset' => 'utf-8',
'comment' => 'Order Details',
'fields' => [
[
'name' => 'sod_id',
'type' => 'integer',
'size' => 11,
'unsigned' => TRUE,
'autoinc' => TRUE,
],[
'name' => 'sod_order', // order number
'type' => 'integer',
'size' => 11,
'unsigned' => TRUE,
],[
'name' => 'sod_product', // sp_id
'type' => 'integer',
'size' => 11,
'unsigned' => TRUE,
],[
'name' => 'sod_description', // sp_product
'type' => 'string',
'size' => 200,
],[
'name' => 'sod_quantity',
'type' => 'double',
],[
'name' => 'sod_taxrate',
'type' => 'double',
'null' => TRUE,
],[
'name' => 'sod_usestock',
'type' => 'boolean',
'default' => 0,
],[
'name' => 'sod_weight',
'type' => 'integer',
'size' => 11,
],[
'name' => 'sod_lithium',
'type' => 'string',
'size' => 4,
'default' => '',
],[
'name' => 'sod_customization',
'type' => 'string',
'size' => 36,
'default' => '',
],[
'name' => 'sod_sell', // sell price
'type' => 'double',
]
// taxable? for freight
],
'index' => [
'PRIMARY' => [ 'type' => 'primary',
'fields' => ['sod_id'],
],
'byUser' => [ 'type' => 'index',
'fields' => ['sod_order', 'sod_id'],
],
],
],
'store_order_custom' => [
'engine' => 'auto',
'charset' => 'utf-8',
'comment' => 'Order Customizations', // special requirements for an item in an order
'fields' => [
[
'name' => 'soc_guid',
'type' => 'string',
'size' => 36,
],[
'name' => 'soc_order', // order number (if a sale)... otherwise it was from an incomplete cart, and will be 0. Those can be deleted
'type' => 'integer',
'size' => 11,
'unsigned' => TRUE,
],[
'name' => 'soc_type', // color selections
'type' => 'string',
'size' => 20,
],[
'name' => 'soc_content',
'type' => 'text',
'default' => '',
], [
'name' => 'soc_modified',
'type' => 'time',
'null' => FALSE,
'default' => 'NOW'
]
],
'index' => [
'PRIMARY' => [
'type' => 'primary',
'fields' => ['soc_guid'],
],
'byDate' => [
'type' => 'index',
'fields' => ['soc_modified', 'soc_order'],
],
],
],
'store_order_tracking' => [
'engine' => 'auto',
'charset' => 'utf-8',
'comment' => 'Order Details',
'fields' => [
[
'name' => 'sot_id',
'type' => 'integer',
'size' => 11,
'unsigned' => TRUE,
'autoinc' => TRUE,
],[
'name' => 'sot_order', // order number
'type' => 'integer',
'size' => 11,
'unsigned' => TRUE,
],[
'name' => 'sot_tracking', // tracking number
'type' => 'string',
'size' => 50,
'default' => '',
],[
'name' => 'sot_status',
'type' => 'string',
'size' => 200,
],[
'name' => 'sot_status_id', // numeric equiv of sot_status
'type' => 'integer',
'size' => 11,
'default' => 0,
],[
'name' => 'sot_expected', // estimated delivery date
'type' => 'integer',
'size' => 11,
],[ // tracking details, in track123 format
'name' => 'sot_detail',
'type' => 'text',
'default' => '',
]
],
'index' => [
'PRIMARY' => [ 'type' => 'primary',
'fields' => ['sot_id'],
],
'byOrder' => [ 'type' => 'index',
'fields' => ['sot_order', 'sot_id'],
],
],
],
],
];
}
}