Skip to content

Commit

Permalink
Merge pull request #471 from haraldpdl/cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
haraldpdl committed Nov 11, 2016
2 parents cb6ae86 + 355bcdc commit 5ae7ffb
Show file tree
Hide file tree
Showing 12 changed files with 574 additions and 265 deletions.
2 changes: 1 addition & 1 deletion catalog/admin/online_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@

if (FileSystem::isWritable(OSCOM::BASE_DIR . 'Work/OnlineUpdates', true)) {
if (!is_dir(OSCOM::BASE_DIR . 'Work/OnlineUpdates')) {
mkdir(OSCOM::BASE_DIR . 'Work/OnlineUdates', 0777, true);
mkdir(OSCOM::BASE_DIR . 'Work/OnlineUpdates', 0777, true);
}

$filepath = OSCOM::BASE_DIR . 'Work/OnlineUpdates/' . $_POST['version'] . '-update.zip';
Expand Down
15 changes: 12 additions & 3 deletions catalog/admin/specials.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,23 @@

$contents[] = array('align' => 'center', 'text' => HTML::button(OSCOM::getDef('image_edit'), 'fa fa-edit', OSCOM::link(FILENAME_SPECIALS, 'page=' . $_GET['page'] . '&sID=' . $sInfo->specials_id . '&action=edit')) . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', OSCOM::link(FILENAME_SPECIALS, 'page=' . $_GET['page'] . '&sID=' . $sInfo->specials_id . '&action=delete')));
$contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_date_added') . ' ' . DateTime::toShort($sInfo->specials_date_added));
$contents[] = array('text' => '' . OSCOM::getDef('text_info_last_modified') . ' ' . DateTime::toShort($sInfo->specials_last_modified));

if (isset($sInfo->specials_last_modified)) {
$contents[] = array('text' => '' . OSCOM::getDef('text_info_last_modified') . ' ' . DateTime::toShort($sInfo->specials_last_modified));
}

$contents[] = array('align' => 'center', 'text' => '<br />' . tep_info_image($sInfo->products_image, $sInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT));
$contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_original_price') . ' ' . $currencies->format($sInfo->products_price));
$contents[] = array('text' => '' . OSCOM::getDef('text_info_new_price') . ' ' . $currencies->format($sInfo->specials_new_products_price));
$contents[] = array('text' => '' . OSCOM::getDef('text_info_percentage') . ' ' . number_format(100 - (($sInfo->specials_new_products_price / $sInfo->products_price) * 100)) . '%');

$contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_expires_date') . ' <strong>' . DateTime::toShort($sInfo->expires_date) . '</strong>');
$contents[] = array('text' => '' . OSCOM::getDef('text_info_status_change') . ' ' . DateTime::toShort($sInfo->date_status_change));
if (isset($sInfo->expires_date)) {
$contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_expires_date') . ' <strong>' . DateTime::toShort($sInfo->expires_date) . '</strong>');
}

if (isset($sInfo->date_status_change)) {
$contents[] = array('text' => '' . OSCOM::getDef('text_info_status_change') . ' ' . DateTime::toShort($sInfo->date_status_change));
}
}
break;
}
Expand Down
6 changes: 3 additions & 3 deletions catalog/includes/modules/shipping/flat.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ function __construct() {
$this->code = 'flat';
$this->title = OSCOM::getDef('module_shipping_flat_text_title');
$this->description = OSCOM::getDef('module_shipping_flat_text_description');
$this->sort_order = MODULE_SHIPPING_FLAT_SORT_ORDER;
$this->sort_order = defined('MODULE_SHIPPING_FLAT_SORT_ORDER') ? (int)MODULE_SHIPPING_FLAT_SORT_ORDER : 0;
$this->icon = '';
$this->tax_class = MODULE_SHIPPING_FLAT_TAX_CLASS;
$this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
$this->tax_class = defined('MODULE_SHIPPING_FLAT_TAX_CLASS') ? MODULE_SHIPPING_FLAT_TAX_CLASS : 0;
$this->enabled = (defined('MODULE_SHIPPING_FLAT_STATUS') && (MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);

if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) {
$check_flag = false;
Expand Down
6 changes: 3 additions & 3 deletions catalog/includes/modules/shipping/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ function __construct() {
$this->code = 'item';
$this->title = OSCOM::getDef('module_shipping_item_text_title');
$this->description = OSCOM::getDef('module_shipping_item_text_description');
$this->sort_order = MODULE_SHIPPING_ITEM_SORT_ORDER;
$this->sort_order = defined('MODULE_SHIPPING_ITEM_SORT_ORDER') ? (int)MODULE_SHIPPING_ITEM_SORT_ORDER : 0;
$this->icon = '';
$this->tax_class = MODULE_SHIPPING_ITEM_TAX_CLASS;
$this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true : false);
$this->tax_class = defined('MODULE_SHIPPING_ITEM_TAX_CLASS') ? MODULE_SHIPPING_ITEM_TAX_CLASS : 0;
$this->enabled = (defined('MODULE_SHIPPING_ITEM_STATUS') && (MODULE_SHIPPING_ITEM_STATUS == 'True') ? true : false);

if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_ITEM_ZONE > 0) ) {
$check_flag = false;
Expand Down
6 changes: 3 additions & 3 deletions catalog/includes/modules/shipping/table.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ function __construct() {
$this->code = 'table';
$this->title = OSCOM::getDef('module_shipping_table_text_title');
$this->description = OSCOM::getDef('module_shipping_table_text_description');
$this->sort_order = MODULE_SHIPPING_TABLE_SORT_ORDER;
$this->sort_order = defined('MODULE_SHIPPING_TABLE_SORT_ORDER') ? (int)MODULE_SHIPPING_TABLE_SORT_ORDER : 0;
$this->icon = '';
$this->tax_class = MODULE_SHIPPING_TABLE_TAX_CLASS;
$this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false);
$this->tax_class = defined('MODULE_SHIPPING_TABLE_TAX_CLASS') ? MODULE_SHIPPING_TABLE_TAX_CLASS : 0;
$this->enabled = (defined('MODULE_SHIPPING_TABLE_STATUS') && (MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false);

if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_TABLE_ZONE > 0) ) {
$check_flag = false;
Expand Down
6 changes: 3 additions & 3 deletions catalog/includes/modules/shipping/zones.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ function __construct() {
$this->code = 'zones';
$this->title = OSCOM::getDef('module_shipping_zones_text_title');
$this->description = OSCOM::getDef('module_shipping_zones_text_description');
$this->sort_order = MODULE_SHIPPING_ZONES_SORT_ORDER;
$this->sort_order = defined('MODULE_SHIPPING_ZONES_SORT_ORDER') ? (int)MODULE_SHIPPING_ZONES_SORT_ORDER : 0;
$this->icon = '';
$this->tax_class = MODULE_SHIPPING_ZONES_TAX_CLASS;
$this->enabled = ((MODULE_SHIPPING_ZONES_STATUS == 'True') ? true : false);
$this->tax_class = defined('MODULE_SHIPPING_ZONES_TAX_CLASS') ? MODULE_SHIPPING_ZONES_TAX_CLASS : 0;
$this->enabled = (defined('MODULE_SHIPPING_ZONES_STATUS') && (MODULE_SHIPPING_ZONES_STATUS == 'True') ? true : false);

// CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
$this->num_zones = 1;
Expand Down

0 comments on commit 5ae7ffb

Please sign in to comment.