From d267b214ea98d5096d0a5e0ad6a2a8c9f027011d Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Thu, 9 Jul 2009 03:58:47 +0000 Subject: [PATCH] Lotsa updates. git-svn-id: http://svn.cleancode.org/svn/pickles@139 4d10bc64-7434-11dc-a737-d2d0f8310089 --- classes/Config.php | 6 +- classes/Controller.php | 19 +- classes/Display/Smarty.php | 1 + common/modules/store/admin.php | 2 +- common/modules/store/admin/customers.php | 19 +- common/modules/store/admin/customers/edit.php | 59 +++++ common/modules/store/admin/customers/save.php | 147 ++++++++++++ common/modules/store/admin/discounts.php | 5 +- common/modules/store/admin/discounts/edit.php | 70 ++++++ common/modules/store/admin/discounts/save.php | 94 ++++++++ .../modules/store/admin/gift_certificates.php | 10 + common/modules/store/admin/products/edit.php | 59 +++++ common/modules/store/admin/reports.php | 10 + common/modules/store/admin/settings.php | 10 + common/static/js/ajax.js | 16 +- common/templates/store/admin/customers.tpl | 6 +- .../templates/store/admin/customers/edit.tpl | 215 ++++++++++++++++++ common/templates/store/admin/discounts.tpl | 2 +- .../templates/store/admin/discounts/edit.tpl | 195 ++++++++-------- .../store/admin/gift_certificates.tpl | 2 + .../templates/store/admin/products/edit.tpl | 115 ++++++++++ common/templates/store/admin/reports.tpl | 2 + common/templates/store/admin/settings.tpl | 2 + scripts/generate_docs | 6 + 24 files changed, 949 insertions(+), 123 deletions(-) create mode 100644 common/modules/store/admin/customers/edit.php create mode 100644 common/modules/store/admin/customers/save.php create mode 100644 common/modules/store/admin/discounts/edit.php create mode 100644 common/modules/store/admin/discounts/save.php create mode 100644 common/modules/store/admin/gift_certificates.php create mode 100644 common/modules/store/admin/products/edit.php create mode 100644 common/modules/store/admin/reports.php create mode 100644 common/modules/store/admin/settings.php create mode 100644 common/templates/store/admin/customers/edit.tpl create mode 100644 common/templates/store/admin/gift_certificates.tpl create mode 100644 common/templates/store/admin/products/edit.tpl create mode 100644 common/templates/store/admin/reports.tpl create mode 100644 common/templates/store/admin/settings.tpl create mode 100755 scripts/generate_docs diff --git a/classes/Config.php b/classes/Config.php index 6f3aeaa..d2fc7fc 100755 --- a/classes/Config.php +++ b/classes/Config.php @@ -208,9 +208,9 @@ class Config extends Object { $additional = null; - if (strpos($requested_module, '_') !== false) { - list($requested_module, $additional) = split('_', $requested_module, 2); - $additional = '_' . $additional; + if (strpos($requested_module, '/') !== false) { + list($requested_module, $additional) = split('/', $requested_module, 2); + $additional = '/' . $additional; } if (isset($this->modules->shared->module)) { diff --git a/classes/Controller.php b/classes/Controller.php index d242ade..88edc72 100644 --- a/classes/Controller.php +++ b/classes/Controller.php @@ -36,6 +36,8 @@ */ class Controller extends Object { + private $execute_tests = false; + /** * Constructor * @@ -116,6 +118,11 @@ class Controller extends Object { break; default: + // @todo Add conditional for the environment + if ($display_type == 'test') { + $this->execute_tests = true; + } + unset($display_type); break; } @@ -139,11 +146,10 @@ class Controller extends Object { $module['requested']['class_name'] = strtr($module['requested']['filename'], '/', '_'); // Establishes the shared module information - // @todo Bug with requested modules with a dash in the name (store-locator == shared module 'store') - $module['shared']['class_name'] = $config->getSharedModule($module['requested']['class_name']); - $module['shared']['filename'] = strtr($module['shared']['class_name'], '_', '/'); + $module['shared']['name'] = $config->getSharedModule($module['requested']['name']); + $module['shared']['filename'] = strtr($module['shared']['name'], '-', '_'); $module['shared']['php_file'] = PICKLES_PATH . 'common/modules/' . $module['shared']['filename'] . '.php'; - $module['shared']['name'] = $module['shared']['filename']; + $module['shared']['class_name'] = strtr($module['shared']['filename'], '/', '_'); // Tries to load the site level module if (file_exists($module['requested']['php_file'])) { @@ -238,6 +244,11 @@ class Controller extends Object { $display->shared_module_name = $module['shared']['name']; $display->shared_module_filename = $module['shared']['filename']; + if ($this->execute_tests == true) { + var_dump($module); + exit('caught test'); + } + // Loads the module data into the display to be rendered /** * @todo perhaps make this a passed variable diff --git a/classes/Display/Smarty.php b/classes/Display/Smarty.php index e955692..a58b70d 100644 --- a/classes/Display/Smarty.php +++ b/classes/Display/Smarty.php @@ -142,6 +142,7 @@ class Display_Smarty extends Display_Common { if (!$this->smarty->is_cached($template, $cache_id)) { // Build the combined module name array and assign it + $this->module_name = str_replace('-', '_', $this->module_name); $module_name = split('/', $this->module_name); array_unshift($module_name, $this->module_name); $this->smarty->assign('module_name', $module_name); diff --git a/common/modules/store/admin.php b/common/modules/store/admin.php index 6ddad30..45edda6 100644 --- a/common/modules/store/admin.php +++ b/common/modules/store/admin.php @@ -21,7 +21,7 @@ class store_admin extends Module { ); $this->setPublic('options', $options); - $this->template = 'store/admin'; + $this->shared_template = 'store/admin'; } public function __default() { diff --git a/common/modules/store/admin/customers.php b/common/modules/store/admin/customers.php index e28685d..e1a609a 100644 --- a/common/modules/store/admin/customers.php +++ b/common/modules/store/admin/customers.php @@ -9,18 +9,6 @@ class store_admin_customers extends store_admin { emails.email, - billing.company AS billing_company, - billing.first_name AS billing_first_name, - billing.last_name AS billing_last_name, - billing.address1 AS billing_address1, - billing.address2 AS billing_address2, - billing.city AS billing_city, - billing.state AS billing_state, - billing.zip_code AS billing_zip_code, - billing.country AS billing_country, - billing.phone AS billing_phone, - billing.fax AS billing_fax, - shipping.company AS shipping_company, shipping.first_name AS shipping_first_name, shipping.last_name AS shipping_last_name, @@ -40,10 +28,7 @@ class store_admin_customers extends store_admin { INNER JOIN emails ON emails.id = customers.email_id - INNER JOIN addresses AS billing - ON billing.id = customers.billing_address_id - - INNER JOIN addresses AS shipping + LEFT JOIN addresses AS shipping ON shipping.id = customers.shipping_address_id LEFT JOIN orders @@ -52,6 +37,8 @@ class store_admin_customers extends store_admin { GROUP BY customers.id + ORDER BY shipping.last_name, shipping.first_name + ; '; diff --git a/common/modules/store/admin/customers/edit.php b/common/modules/store/admin/customers/edit.php new file mode 100644 index 0000000..5ae7481 --- /dev/null +++ b/common/modules/store/admin/customers/edit.php @@ -0,0 +1,59 @@ +setPublic('customer', $this->db->getRow($sql)); + } + } +} + +?> diff --git a/common/modules/store/admin/customers/save.php b/common/modules/store/admin/customers/save.php new file mode 100644 index 0000000..6a3eb05 --- /dev/null +++ b/common/modules/store/admin/customers/save.php @@ -0,0 +1,147 @@ +setPublic('status', 'Error'); + $this->setPublic('message', 'The password and verification do not match.'); + return false; + } + else { + $update_password = true; + } + } + + // Adds the billing information into the database + if (isset($_REQUEST['billing_address1']) && trim($_REQUEST['billing_address1']) != '') { + $billing_address = array( + 'company' => $_REQUEST['billing_company'], + 'first_name' => $_REQUEST['billing_first_name'], + 'last_name' => $_REQUEST['billing_last_name'], + 'address1' => $_REQUEST['billing_address1'], + 'address2' => $_REQUEST['billing_address2'], + 'city' => $_REQUEST['billing_city'], + 'state' => $_REQUEST['billing_state'], + 'zip_code' => $_REQUEST['billing_zip_code'], + 'country' => 'US', + 'phone' => $_REQUEST['billing_phone'], + 'fax' => $_REQUEST['billing_fax'] + ); + + $billing_address['hash'] = md5(implode('', $billing_address)); + + if ($this->db->getField("SELECT COUNT(*) FROM addresses WHERE hash = '{$billing_address['hash']}';") == 0) { + $billing_address_id = $this->db->insert('addresses', $billing_address); + } + else { + $billing_address = $this->db->getRow("SELECT * FROM addresses WHERE hash = '{$billing_address['hash']}';"); + $billing_address_id = $billing_address['id']; + } + } + + // Adds the shipping information into the database + $shipping_address_id = null; + + if (isset($_REQUEST['shipping_same_as_billing']) && $_REQUEST['shipping_same_as_billing'] == 'on') { + $shipping_address_id = $billing_address_id; + $shipping_address = $billing_address; + } + else if (isset($_REQUEST['shipping_address1']) && trim($_REQUEST['shipping_address1']) != '') { + $shipping_address = array( + 'company' => $_REQUEST['shipping_company'], + 'first_name' => $_REQUEST['shipping_first_name'], + 'last_name' => $_REQUEST['shipping_last_name'], + 'address1' => $_REQUEST['shipping_address1'], + 'address2' => $_REQUEST['shipping_address2'], + 'city' => $_REQUEST['shipping_city'], + 'state' => $_REQUEST['shipping_state'], + 'zip_code' => $_REQUEST['shipping_zip_code'], + 'country' => 'US', + 'phone' => $_REQUEST['shipping_phone'], + 'fax' => $_REQUEST['shipping_fax'] + ); + + $shipping_address['hash'] = md5(implode('', $shipping_address)); + + if ($this->db->getField("SELECT COUNT(*) FROM addresses WHERE hash = '{$shipping_address['hash']}';") == 0) { + $shipping_address_id = $this->db->insert('addresses', $shipping_address); + } + else { + $shipping_address = $this->db->getRow("SELECT * FROM addresses WHERE hash = '{$shipping_address['hash']}';"); + $shipping_address_id = $shipping_address['id']; + } + } + + // Adds the customer's email into the email database + if (isset($_REQUEST['email']) && trim($_REQUEST['email']) != '') { + $email = $_REQUEST['email']; + + if ($this->db->getField("SELECT COUNT(*) FROM emails WHERE email = '{$email}';") == 0) { + $email_id = $this->db->insert('emails', array('email' => $email)); + } + else { + $email_id = $this->db->getField("SELECT id FROM emails WHERE email = '{$email}';"); + } + } + + // Updates the existing customer + if (isset($_REQUEST['id'])) { + + $customer = array( + 'email_id' => $email_id, + 'billing_address_id' => $billing_address_id, + 'shipping_address_id' => $shipping_address_id + ); + + if ($update_password == true) { + $customer['password'] = md5($_REQUEST['password']); + } + + $this->db->update('customers', $customer, array('id' => $_REQUEST['id'])); + + if ($this->error->getErrors()) { + $this->setPublic('status', 'Error'); + $this->setPublic('message', 'There was an error updating the customer account (' . implode('. ', $this->error->getErrors()) . '.)'); + return false; + } + else { + $this->setPublic('status', 'Success'); + $this->setPublic('message', 'The customer information has been updated successfully.'); + } + } + // Adds a brand new affiliate + else { + $customer = array( + 'email_id' => $email_id, + 'password' => md5($_REQUEST['password']), + 'billing_address_id' => $billing_address_id, + 'shipping_address_id' => $shipping_address_id, + 'created_at' => time() + ); + + $customer_id = $this->db->insert('customers', $customer); + + if ($this->error->getErrors()) { + $this->setPublic('status', 'Error'); + $this->setPublic('message', 'There was an error adding the customer account (' . implode('. ', $this->error->getErrors()) . '.)'); + return false; + } + else { + // @todo Leverage sign up code and reuse here + //mail($_REQUEST['email'], 'Welcome to the ' . $this->config->store->title . ' Affiliate Program', $customer_message, 'From: ' . $this->config->store->return_email); + + $this->setPublic('status', 'Success'); + $this->setPublic('message', 'The new customer has been added successfully.'); + } + } + } +} + +?> diff --git a/common/modules/store/admin/discounts.php b/common/modules/store/admin/discounts.php index 7b57220..ebc0174 100644 --- a/common/modules/store/admin/discounts.php +++ b/common/modules/store/admin/discounts.php @@ -4,8 +4,9 @@ class store_admin_discounts extends store_admin { public function __default() { $sql = ' - SELECT * - FROM discounts + SELECT d1.* + FROM discounts AS d1 + WHERE d1.sequence = (SELECT MAX(sequence) FROM discounts WHERE id = d1.id) ORDER BY valid_through; '; diff --git a/common/modules/store/admin/discounts/edit.php b/common/modules/store/admin/discounts/edit.php new file mode 100644 index 0000000..2078c71 --- /dev/null +++ b/common/modules/store/admin/discounts/edit.php @@ -0,0 +1,70 @@ +setPublic('customers', $this->flattenArray($this->db->getArray($sql))); + $this->setPublic('categories', $this->flattenArray($this->db->getArray('SELECT id, name FROM categories;'))); + $this->setPublic('products', $this->flattenArray($this->db->getArray('SELECT id, name FROM products;'))); + + $this->setPublic('applied_to_options', array('ORDER' => 'Order', 'PRODUCT' => 'Product', 'SHIPPING' => 'Shipping')); + $this->setPublic('amount_type_options', array('FLAT' => 'Flat $ Amount', 'PERCENT' => '% of Applied To' )); + + if (isset($_REQUEST['id'])) { + $discount = $this->db->getRow('SELECT * FROM discounts WHERE id = "' . $_REQUEST['id'] . '" ORDER BY sequence DESC LIMIT 1;'); + $this->setPublic('discount', $discount); + + $sql = ' + SELECT * + FROM discount_rules + WHERE discount_id = "' . $discount['id'] . '" + AND sequence = "' . $discount['sequence'] . '" + ORDER BY id; + '; + $this->setPublic('rules', $this->db->getArray($sql)); + + $sql = ' + SELECT * + FROM discount_xref + WHERE discount_id = "' . $discount['id'] . '" + AND sequence = "' . $discount['sequence'] . '" + ORDER BY id; + '; + $xrefs = $this->db->getArray($sql); + + $xrefs_grouped = array('CUSTOMER' => array(), 'CATEGORY' => array(), 'PRODUCT' => array()); + + if (is_array($xrefs)) { + foreach ($xrefs as $xref) { + // @todo There's currently no code to handle exclusions + if ($xref['eligible'] == 'Y') { + $xrefs_grouped[$xref['type']][] = $xref['xref_id']; + } + } + } + + $this->setPublic('xrefs', $xrefs_grouped); + } + } + + private function flattenArray($array) { + $formatted_array = array(); + + foreach ($array as $temp) { + $formatted_array[$temp['id']] = $temp['name']; + } + + return $formatted_array; + } +} + +?> diff --git a/common/modules/store/admin/discounts/save.php b/common/modules/store/admin/discounts/save.php new file mode 100644 index 0000000..60e9830 --- /dev/null +++ b/common/modules/store/admin/discounts/save.php @@ -0,0 +1,94 @@ + $_REQUEST['name'], + 'coupon' => $_REQUEST['coupon'], + 'description' => $_REQUEST['description'], + 'all_customers' => 'Y', + 'all_categories' => 'N', + 'all_products' => 'N', + 'combinable' => 'N', + 'valid_from' => $_REQUEST['valid_from_Year'] . '-' . $_REQUEST['valid_from_Month'] . '-' . $_REQUEST['valid_from_Day'], + 'valid_through' => $_REQUEST['valid_through_Year'] . '-' . $_REQUEST['valid_through_Month'] . '-' . $_REQUEST['valid_through_Day'], + 'max_customer_usage' => $_REQUEST['max_customer_usage'], + 'max_order_usage' => $_REQUEST['max_order_usage'], + 'usage_count' => $_REQUEST['usage_count'] == '' ? '0' : $_REQUEST['usage_count'], // @TODO zero is quoted to get around a bug. + 'remaining_usages' => $_REQUEST['remaining_usages'] == 'unlimited' ? null : $_REQUEST['remaining_usages_count'] + ); + + // Updates the existing discount + if (isset($_REQUEST['id'])) { + + // Checks for changes @todo + + // Increments the sequence number + $sequence = $this->db->getField('SELECT MAX(sequence) + 1 FROM discounts WHERE id = "' . $_REQUEST['id'] . '";'); + + // Inserts row into the discount table + $discount['id'] = $_REQUEST['id']; + $discount['sequence'] = $sequence; + $this->db->insert('discounts', $discount); + + $verb = 'updating'; + $past = 'updated'; + } + // Adds a brand new discount + else { + $discount['id'] = $this->db->insert('discounts', $discount); + $discount['sequence'] = '0'; + + $verb = 'adding'; + $past = 'added'; + } + + // Inserts one or more rows into the discount_rules table + $discount_rules = array( + 'discount_id' => $discount['id'], + 'sequence' => $discount['sequence'], + 'applied_to' => $_REQUEST['applied_to'], + 'amount' => $_REQUEST['amount'], + 'amount_type' => $_REQUEST['amount_type'], + 'min_subtotal' => $_REQUEST['min_subtotal'], + 'min_items' => $_REQUEST['min_items'], + 'max_discount' => $_REQUEST['max_discount'] + ); + $this->db->insert('discount_rules', $discount_rules); + + /* + $this->setPublic('status', 'Error'); + $this->setPublic('message', print_r($_REQUEST, true)); + return false; + */ + + // Inserts one or more rows into the discount_xref table + foreach ($_REQUEST['products'] as $product_id) { + $discount_xref = array( + 'discount_id' => $discount['id'], + 'sequence' => $discount['sequence'], + 'type' => 'PRODUCT', + 'xref_id' => $product_id, + 'eligible' => 'Y', + 'exclusion' => 'N' + ); + $this->db->insert('discount_xref', $discount_xref); + } + + if ($this->error->getErrors()) { + $this->setPublic('status', 'Error'); + $this->setPublic('message', 'There was an error ' . $verb . ' the discount (' . implode('. ', $this->error->getErrors()) . '.)'); + return false; + } + else { + $this->setPublic('status', 'Success'); + $this->setPublic('message', 'The new discount has been ' . $past . ' successfully.'); + } + } +} + +?> diff --git a/common/modules/store/admin/gift_certificates.php b/common/modules/store/admin/gift_certificates.php new file mode 100644 index 0000000..bbccc88 --- /dev/null +++ b/common/modules/store/admin/gift_certificates.php @@ -0,0 +1,10 @@ + diff --git a/common/modules/store/admin/products/edit.php b/common/modules/store/admin/products/edit.php new file mode 100644 index 0000000..a277650 --- /dev/null +++ b/common/modules/store/admin/products/edit.php @@ -0,0 +1,59 @@ +setPublic('customer', $this->db->getRow($sql)); + } + } +} + +?> diff --git a/common/modules/store/admin/reports.php b/common/modules/store/admin/reports.php new file mode 100644 index 0000000..83eb27e --- /dev/null +++ b/common/modules/store/admin/reports.php @@ -0,0 +1,10 @@ + diff --git a/common/modules/store/admin/settings.php b/common/modules/store/admin/settings.php new file mode 100644 index 0000000..efd341f --- /dev/null +++ b/common/modules/store/admin/settings.php @@ -0,0 +1,10 @@ + diff --git a/common/static/js/ajax.js b/common/static/js/ajax.js index 5cd2ce6..e0da6c6 100644 --- a/common/static/js/ajax.js +++ b/common/static/js/ajax.js @@ -47,7 +47,21 @@ function getForm(form) { break; case 'select-one': - params += '&' + element.name + "=" + element.options[element.selectedIndex].value; + params += '&' + element.name + '=' + element.options[element.selectedIndex].value; + break; + + case 'select-multiple': + var option_count = element.options.length; + + for (var j = 0; j < option_count; j++) { + if (element.options[j].selected == true) { + params += '&' + element.name + '[]=' + element.options[j].value; + } + } + break; + + default: + //alert(element.type); break; } } diff --git a/common/templates/store/admin/customers.tpl b/common/templates/store/admin/customers.tpl index 0ec14f2..c396498 100644 --- a/common/templates/store/admin/customers.tpl +++ b/common/templates/store/admin/customers.tpl @@ -13,13 +13,13 @@ {foreach from=$module.customers item=customer} - {$customer.billing_last_name}, {$customer.billing_first_name} - {$customer.billing_phone} + {$customer.shipping_last_name}, {$customer.shipping_first_name} + {$customer.shipping_phone} {mailto address=$customer.email} {$customer.order_count} Edit Customer - Delete Customer + Delete Customer {/foreach} diff --git a/common/templates/store/admin/customers/edit.tpl b/common/templates/store/admin/customers/edit.tpl new file mode 100644 index 0000000..4dc4ab6 --- /dev/null +++ b/common/templates/store/admin/customers/edit.tpl @@ -0,0 +1,215 @@ + + +{literal} + + +{/literal} +

{if isset($module.customer.id)}Update{else}Add{/if} Customer

+
+
+ Same as billing information? + +
+
+ Billing Information: +
+
Company:
+
+
*First Name:
+
+
*Last Name:
+
+
*Address:
+
+
+ +
+
*City:
+
+
*State:
+
{html_select_state prefix="billing_" title="required"}
+
*ZIP Code:
+
+
*Phone:
+
+
Fax:
+
+
+
+
+ Shipping Information: +
+
Company:
+
+
*First Name:
+
+
*Last Name:
+
+
*Address:
+
+
+ +
+
*City:
+
+
*State:
+
{html_select_state prefix="shipping_" title="required"}
+
*ZIP Code:
+
+
*Phone:
+
+
Fax:
+
+
+
+

+
+ Email Address:
+ This is what the customer uses as their login ID +
+
*Email:
+
+
+
+
+ Password Change?
+ If you do not wish to update the customer's password, leave blank. +
+
Password:
+
+
Verify:
+
+
+
+

+
+ {if isset($module.customer.id)}{/if} + +
+
+ diff --git a/common/templates/store/admin/discounts.tpl b/common/templates/store/admin/discounts.tpl index 99e19da..4161746 100644 --- a/common/templates/store/admin/discounts.tpl +++ b/common/templates/store/admin/discounts.tpl @@ -25,7 +25,7 @@ {if $discount.valid_through == null}Never{else}{$discount.valid_through}{/if} Edit Discount - Delete Discount + Delete Discount {/foreach} diff --git a/common/templates/store/admin/discounts/edit.tpl b/common/templates/store/admin/discounts/edit.tpl index be88f48..db0738e 100644 --- a/common/templates/store/admin/discounts/edit.tpl +++ b/common/templates/store/admin/discounts/edit.tpl @@ -7,6 +7,7 @@ if (responseObject != null) { switch (responseObject.status) { case 'Success': + /* document.getElementById('contact_company').value = ''; document.getElementById('contact_first_name').value = ''; document.getElementById('contact_last_name').value = ''; @@ -33,6 +34,7 @@ document.getElementById('tax_id').value = ''; document.getElementById('tax_class').value = ''; document.getElementById('commission_rate').value = ''; + */ break; @@ -75,6 +77,13 @@ width: 500px; height: 50px; } + + table#applicable, table#rules { + margin-top: 0px + } + table#applicable td, table#rules td { + padding: 0px; + } {/literal}

{if isset($module.discount.id)}Update{else}Add{/if} Discount

@@ -83,115 +92,117 @@
*Name:
- + Coupon Code: - +
Description:
-
-
Valid From:
+
+
*Valid From:
{html_select_date prefix='valid_from_'} to - {html_select_date prefix='valid_to_'} + {html_select_date prefix='valid_through_'}
-
- -
-
- -
- + All Products + + + (CTRL + click to select multiple) + + (CTRL + click to select multiple) + + + + + + + + + + + -
*City:
-
-
*State:
-
{html_select_state prefix="contact_" title="required"}
-
*ZIP Code:
-
-
*Phone:
-
-
Fax:
-
- -

-
-
Email:
-
-
- -
- Payee Information: -
-
Company:
-
-
*First Name:
-
-
*Last Name:
-
-
*Address:
+
Max Usage:
-
- + + Per Customer + + Per Order
-
*City:
-
-
*State:
-
{html_select_state prefix="payee_" title="required"}
-
*ZIP Code:
-
-
*Phone:
-
-
Fax:
-
-
-
-

-
- Tax Information: -
-
*Tax ID:
-
-
*Tax Class:
+
*Remaining:
- + Unlimited Other Uses Already Used {$module.discount.usage_count} times + +
+
*Rules:
+
+ + + + + + + + + + + + + + + +
Applied To + AmountMin SubtotalMin ItemsMax Discount + +
+ + + + + $$
-
- Commission: -
-
*Rate:
-
%
-
-
-
+

- {if isset($module.discount.id)}{/if} + {if isset($module.discount.id)} + + + {/if} - +
+{literal} +{/literal} diff --git a/common/templates/store/admin/gift_certificates.tpl b/common/templates/store/admin/gift_certificates.tpl new file mode 100644 index 0000000..664f9e4 --- /dev/null +++ b/common/templates/store/admin/gift_certificates.tpl @@ -0,0 +1,2 @@ +

Gift Certificates

+Gift certificates are currently unavailable. diff --git a/common/templates/store/admin/products/edit.tpl b/common/templates/store/admin/products/edit.tpl new file mode 100644 index 0000000..a007888 --- /dev/null +++ b/common/templates/store/admin/products/edit.tpl @@ -0,0 +1,115 @@ + + +{literal} + + +{/literal} +

{if isset($module.product.id)}Update{else}Add{/if} Product

+
+
+
+
SKU:
+
+
Name:
+
+
Teaser:
+
+
Description:
+
+
MSRP:
+
$
+
Price:
+
$
+
Size:
+
+
In Stock?
+
+
Limit Per Customer:
+
+
+
+
+
+
SKU:
+
+
+
+

+
+ {if isset($module.product.id)}{/if} + +
+
+ diff --git a/common/templates/store/admin/reports.tpl b/common/templates/store/admin/reports.tpl new file mode 100644 index 0000000..e0c9283 --- /dev/null +++ b/common/templates/store/admin/reports.tpl @@ -0,0 +1,2 @@ +

Reports

+Reports are currently unavailable. diff --git a/common/templates/store/admin/settings.tpl b/common/templates/store/admin/settings.tpl new file mode 100644 index 0000000..647889e --- /dev/null +++ b/common/templates/store/admin/settings.tpl @@ -0,0 +1,2 @@ +

Settings

+Settings are currently unavailable. diff --git a/scripts/generate_docs b/scripts/generate_docs new file mode 100755 index 0000000..58d93b2 --- /dev/null +++ b/scripts/generate_docs @@ -0,0 +1,6 @@ +#!/bin/bash + +phpdoc -o HTML:frames:l0l33t -d ../ -t ../docs -dn Miscellaneous -po PICKLES -ct usage -s + +#-dc PICKLES +#-ti "PHP Interface Collection of Killer Libraries to Enhance Stuff"