diff --git a/admin/customers.php b/admin/customers.php index 6b9ab62a2..30d6149a6 100644 --- a/admin/customers.php +++ b/admin/customers.php @@ -41,7 +41,11 @@ } else { require 'includes/functions/password_funcs.php'; } - $customer_data->update($customer_details, ['id' => $customer_details['id']]); + + $customer_data->update($customer_details, [ + 'id' => $customer_details['id'], + 'address_book_id' => (int)$_POST['default_address_id'], + ]); tep_db_query("UPDATE customers_info SET customers_info_date_account_last_modified = NOW() WHERE customers_info_id = " . (int)$customer_details['id']); $OSCOM_Hooks->call('customers', 'updateAction'); @@ -89,7 +93,9 @@
'; echo '
'; @@ -100,9 +106,6 @@ echo tep_hide_session_id(); echo ''; } - else { - echo tep_draw_bootstrap_button(IMAGE_CANCEL, 'fas fa-angle-left', tep_href_link('customers.php', tep_get_all_get_params(array('action'))), null, null, 'btn-light'); - } ?>
@@ -112,7 +115,7 @@ $hooks =& $OSCOM_Hooks; $oscTemplate = new oscTemplate(); echo tep_draw_form('customers', 'customers.php', tep_get_all_get_params(['action']) . 'action=update', 'post'); - echo tep_draw_hidden_field('default_address_id', $customer_data->get('address_id', $customer_details)); + echo tep_draw_hidden_field('default_address_id', $customer_data->get('default_address_id', $customer_details)); $cwd = getcwd(); chdir(DIR_FS_CATALOG); diff --git a/admin/includes/classes/box.php b/admin/includes/classes/box.php index ccd18aa6b..bea482084 100644 --- a/admin/includes/classes/box.php +++ b/admin/includes/classes/box.php @@ -19,9 +19,6 @@ class box extends tableBlock { - //private $this->heading = []; - //private $this->contents = []; - function infoBox($heading, $contents) { if (is_array($heading)) { $heading = $heading[0]['text']; @@ -29,8 +26,14 @@ function infoBox($heading, $contents) { $parameters = ['heading' => &$heading, 'contents' => &$contents]; $GLOBALS['OSCOM_Hooks']->call(pathinfo($GLOBALS['PHP_SELF'], PATHINFO_FILENAME), 'infoBox', $parameters); - //$this->table_row_parameters = ''; - //$this->table_data_parameters = 'class="infoBoxContent"'; + if (isset($contents['form'])) { + $form_start = $contents['form'] . PHP_EOL; + $form_close = '' . PHP_EOL; + unset($contents['form']); + } else { + $form_start = ''; + $form_close = ''; + } $contents = $this->tableBlock($contents); ob_start(); diff --git a/admin/includes/classes/table_block.php b/admin/includes/classes/table_block.php index 18d66082f..aef9d2b86 100644 --- a/admin/includes/classes/table_block.php +++ b/admin/includes/classes/table_block.php @@ -11,30 +11,23 @@ */ class tableBlock { - var $table_parameters = ''; - var $table_row_parameters = ''; - var $table_data_parameters = ''; + + public $table_row_parameters = ''; + public $table_data_parameters = ''; function __construct() {} function tableBlock($contents) { $tableBox_string = ''; - $form_set = false; - if (isset($contents['form'])) { - $tableBox_string .= $contents['form'] . PHP_EOL; - $form_set = true; - array_shift($contents); - } - - for ($i=0, $n=sizeof($contents); $i<$n; $i++) { + for ($i=0, $n=count($contents); $i<$n; $i++) { $tableBox_string .= 'table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters; if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params']; $tableBox_string .= '>'; if (isset($contents[$i][0]) && is_array($contents[$i][0])) { - for ($x=0, $y=sizeof($contents[$i]); $x<$y; $x++) { + for ($x=0, $y=count($contents[$i]); $x<$y; $x++) { if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) { $tableBox_string .= 'table_data_parameters)) { $tableBox_string .= ' ' . $this->table_data_parameters; } - $tableBox_string .= '>' . $contents[$i]['text'] . ''; + $tableBox_string .= '>' . $contents[$i]['text'] . '' . PHP_EOL; } $tableBox_string .= ''; } - if ($form_set == true) $tableBox_string .= ''; - return $tableBox_string; } } diff --git a/admin/includes/classes/templates/tpl_box.php b/admin/includes/classes/templates/tpl_box.php index 955a4c512..c6d3f64bf 100644 --- a/admin/includes/classes/templates/tpl_box.php +++ b/admin/includes/classes/templates/tpl_box.php @@ -1,4 +1,9 @@
+ @@ -9,6 +14,11 @@
+
Catalog'); + define('BOX_HEADING_CATALOG', 'Catalog'); diff --git a/admin/includes/languages/english/modules/boxes/configuration.php b/admin/includes/languages/english/modules/boxes/configuration.php index 22d2a6e4c..6e4838eab 100644 --- a/admin/includes/languages/english/modules/boxes/configuration.php +++ b/admin/includes/languages/english/modules/boxes/configuration.php @@ -10,4 +10,4 @@ Released under the GNU General Public License */ - define('BOX_HEADING_CONFIGURATION', 'Configuration'); + define('BOX_HEADING_CONFIGURATION', 'Configuration'); diff --git a/admin/includes/languages/english/modules/boxes/customers.php b/admin/includes/languages/english/modules/boxes/customers.php index 231d644d2..1981697bd 100644 --- a/admin/includes/languages/english/modules/boxes/customers.php +++ b/admin/includes/languages/english/modules/boxes/customers.php @@ -10,4 +10,4 @@ Released under the GNU General Public License */ - define('BOX_HEADING_CUSTOMERS', 'Customers'); + define('BOX_HEADING_CUSTOMERS', 'Customers'); diff --git a/admin/includes/languages/english/modules/boxes/layout.php b/admin/includes/languages/english/modules/boxes/layout.php index e41ec5c7e..891b97c32 100644 --- a/admin/includes/languages/english/modules/boxes/layout.php +++ b/admin/includes/languages/english/modules/boxes/layout.php @@ -10,5 +10,5 @@ Released under the GNU General Public License */ - define('BOX_HEADING_LAYOUT', 'Layout Modules'); + define('BOX_HEADING_LAYOUT', 'Layout Modules'); \ No newline at end of file diff --git a/admin/includes/languages/english/modules/boxes/localization.php b/admin/includes/languages/english/modules/boxes/localization.php index 1552bf6f5..8f05a077e 100644 --- a/admin/includes/languages/english/modules/boxes/localization.php +++ b/admin/includes/languages/english/modules/boxes/localization.php @@ -10,5 +10,5 @@ Released under the GNU General Public License */ - define('BOX_HEADING_LOCALIZATION', 'Localization'); + define('BOX_HEADING_LOCALIZATION', 'Localization'); \ No newline at end of file diff --git a/admin/includes/languages/english/modules/boxes/modules.php b/admin/includes/languages/english/modules/boxes/modules.php index 227998fc7..b00f41ae1 100644 --- a/admin/includes/languages/english/modules/boxes/modules.php +++ b/admin/includes/languages/english/modules/boxes/modules.php @@ -10,5 +10,5 @@ Released under the GNU General Public License */ - define('BOX_HEADING_MODULES', 'Modules'); + define('BOX_HEADING_MODULES', 'Modules'); \ No newline at end of file diff --git a/admin/includes/languages/english/modules/boxes/orders.php b/admin/includes/languages/english/modules/boxes/orders.php index 2b8326f5f..a3bd63332 100644 --- a/admin/includes/languages/english/modules/boxes/orders.php +++ b/admin/includes/languages/english/modules/boxes/orders.php @@ -10,4 +10,4 @@ Released under the GNU General Public License */ - define('BOX_HEADING_ORDERS', 'Orders'); + define('BOX_HEADING_ORDERS', 'Orders'); diff --git a/admin/includes/languages/english/modules/boxes/paypal.php b/admin/includes/languages/english/modules/boxes/paypal.php index 559b758e0..777995877 100644 --- a/admin/includes/languages/english/modules/boxes/paypal.php +++ b/admin/includes/languages/english/modules/boxes/paypal.php @@ -10,7 +10,7 @@ Released under the GNU General Public License */ - define('MODULES_ADMIN_MENU_PAYPAL_HEADING', 'Paypal'); + define('MODULES_ADMIN_MENU_PAYPAL_HEADING', 'Paypal'); define('MODULES_ADMIN_MENU_PAYPAL_BALANCE', 'Balance'); define('MODULES_ADMIN_MENU_PAYPAL_CONFIGURE', 'Configure'); diff --git a/admin/includes/languages/english/modules/boxes/reports.php b/admin/includes/languages/english/modules/boxes/reports.php index eb33b4847..519f6518e 100644 --- a/admin/includes/languages/english/modules/boxes/reports.php +++ b/admin/includes/languages/english/modules/boxes/reports.php @@ -10,4 +10,4 @@ Released under the GNU General Public License */ - define('BOX_HEADING_REPORTS', 'Reports'); + define('BOX_HEADING_REPORTS', 'Reports'); diff --git a/admin/includes/languages/english/modules/boxes/taxes.php b/admin/includes/languages/english/modules/boxes/taxes.php index 2d0ba352f..01d5d9dd9 100644 --- a/admin/includes/languages/english/modules/boxes/taxes.php +++ b/admin/includes/languages/english/modules/boxes/taxes.php @@ -10,5 +10,5 @@ Released under the GNU General Public License */ - define('BOX_HEADING_LOCATION_AND_TAXES', 'Locations & Taxes'); + define('BOX_HEADING_LOCATION_AND_TAXES', 'Locations & Taxes'); \ No newline at end of file diff --git a/admin/includes/languages/english/modules/boxes/tools.php b/admin/includes/languages/english/modules/boxes/tools.php index 7f25c5965..7e35f7b0e 100644 --- a/admin/includes/languages/english/modules/boxes/tools.php +++ b/admin/includes/languages/english/modules/boxes/tools.php @@ -10,5 +10,5 @@ Released under the GNU General Public License */ - define('BOX_HEADING_TOOLS', 'Tools'); + define('BOX_HEADING_TOOLS', 'Tools'); \ No newline at end of file diff --git a/admin/modules_hooks.php b/admin/modules_hooks.php index 423230f3e..6fbac52f1 100644 --- a/admin/modules_hooks.php +++ b/admin/modules_hooks.php @@ -12,13 +12,11 @@ require 'includes/application_top.php'; - $admin_hooks = $OSCOM_Hooks; - $OSCOM_Hooks = new hooks('shop'); + $hooks = new hooks('shop'); $template_name = defined('TEMPLATE_SELECTION') ? TEMPLATE_SELECTION : 'default'; $template_name .= '_template'; $template = new $template_name(); - $directories = $OSCOM_Hooks->get_hook_directories(); - $OSCOM_Hooks = $admin_hooks; + $directories = $hooks->get_hook_directories(); function tep_find_contents($base, $test) { $contents = []; @@ -51,6 +49,7 @@ function tep_find_listeners($class) { return $listeners; } + $contents = []; foreach ($directories as $directory) { $directory = dirname($directory); foreach (tep_find_contents($directory, 'is_dir') as $site) { @@ -64,7 +63,7 @@ function tep_find_listeners($class) { $class = "hook_{$site}_{$group}_{$pathinfo['filename']}"; foreach (tep_find_listeners($class) as $listener) { tep_guarantee_all( - $hooks, + $contents, $site, $group, $listener, @@ -92,7 +91,7 @@ function tep_find_listeners($class) { } tep_guarantee_all( - $hooks, + $contents, $hook['hooks_site'], $hook['hooks_group'], $hook['hooks_action'], @@ -108,7 +107,7 @@ function tep_find_listeners($class) {
$groups ) { + foreach ( $contents as $site => $groups ) { ?> diff --git a/includes/hooks/admin/siteWide/popover.php b/includes/hooks/admin/siteWide/popover.php new file mode 100644 index 000000000..edf5411a8 --- /dev/null +++ b/includes/hooks/admin/siteWide/popover.php @@ -0,0 +1,30 @@ + +$(function () { + $('[data-toggle="popover"]').popover({ + container: 'body', + trigger: 'hover click' + }) +}) + +pp; + + return $popover; + } + +} diff --git a/includes/modules/boxes/bm_languages.php b/includes/modules/boxes/bm_languages.php index 5cf8c755e..6c7d5a782 100644 --- a/includes/modules/boxes/bm_languages.php +++ b/includes/modules/boxes/bm_languages.php @@ -10,67 +10,53 @@ Released under the GNU General Public License */ - class bm_languages { - var $code = 'bm_languages'; - var $group = 'boxes'; - var $title; - var $description; - var $sort_order; - var $enabled = false; + class bm_languages extends abstract_block_module { - function __construct() { - $this->title = MODULE_BOXES_LANGUAGES_TITLE; - $this->description = MODULE_BOXES_LANGUAGES_DESCRIPTION; + const CONFIG_KEY_BASE = 'MODULE_BOXES_LANGUAGES_'; - if ( defined('MODULE_BOXES_LANGUAGES_STATUS') ) { - $this->sort_order = MODULE_BOXES_LANGUAGES_SORT_ORDER; - $this->enabled = (MODULE_BOXES_LANGUAGES_STATUS == 'True'); + public function execute() { + global $PHP_SELF, $lng, $request_type; - $this->group = ((MODULE_BOXES_LANGUAGES_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); - } - } - - function execute() { - global $PHP_SELF, $lng, $request_type, $oscTemplate; - - if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { - if (!isset($lng) || (isset($lng) && !is_object($lng))) { - include('includes/classes/language.php'); - $lng = new language; + if (substr(basename($PHP_SELF), 0, 8) !== 'checkout') { + if (!isset($lng) || !($lng instanceof language)) { + $lng = new language(); } if (count($lng->catalog_languages) > 1) { $languages_string = ''; + $parameters = tep_get_all_get_params(['language', 'currency']) . 'language='; foreach($lng->catalog_languages as $key => $value) { - $languages_string .= ' ' .tep_image('includes/languages/' . $value['directory'] . '/images/' . $value['image'], htmlspecialchars($value['name']), NULL, NULL, NULL, false) . ' '; + $languages_string .= ' ' + . tep_image('includes/languages/' . $value['directory'] . '/images/' . $value['image'], htmlspecialchars($value['name']), null, null, null, false) + . ' '; } - + $tpl_data = ['group' => $this->group, 'file' => __FILE__]; include 'includes/modules/block_template.php'; } } } - function isEnabled() { - return $this->enabled; - } - - function check() { - return defined('MODULE_BOXES_LANGUAGES_STATUS'); - } - - function install() { - tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Languages Module', 'MODULE_BOXES_LANGUAGES_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); - tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_LANGUAGES_CONTENT_PLACEMENT', 'Right Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); - tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_LANGUAGES_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); + protected function get_parameters() { + return [ + 'MODULE_BOXES_LANGUAGES_STATUS' => [ + 'title' => 'Enable Languages Module', + 'value' => 'True', + 'desc' => 'Do you want to add the module to your shop?', + 'set_func' => "tep_cfg_select_option(['True', 'False'], ", + ], + 'MODULE_BOXES_LANGUAGES_CONTENT_PLACEMENT' => [ + 'title' => 'Content Placement', + 'value' => 'Right Column', + 'desc' => 'Should the module be loaded in the left or right column?', + 'set_func' => "tep_cfg_select_option(['Left Column', 'Right Column'], ", + ], + 'MODULE_BOXES_LANGUAGES_SORT_ORDER' => [ + 'title' => 'Sort Order', + 'value' => '0', + 'desc' => 'Sort order of display. Lowest is displayed first.', + ], + ]; } - function remove() { - tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); - } - - function keys() { - return array('MODULE_BOXES_LANGUAGES_STATUS', 'MODULE_BOXES_LANGUAGES_CONTENT_PLACEMENT', 'MODULE_BOXES_LANGUAGES_SORT_ORDER'); - } } -?> diff --git a/includes/modules/content/index/cm_i_card_products.php b/includes/modules/content/index/cm_i_card_products.php index ca3c68986..cbf3b49aa 100644 --- a/includes/modules/content/index/cm_i_card_products.php +++ b/includes/modules/content/index/cm_i_card_products.php @@ -22,7 +22,7 @@ public function execute() { global $new_products_category_id, $currencies, $PHP_SELF; $content_width = MODULE_CONTENT_CARD_PRODUCTS_CONTENT_WIDTH; - $card_layout = IS_PRODUCT_PRODUCTS_LAYOUT; + $card_layout = IS_PRODUCT_PRODUCTS_DISPLAY_ROW; if ( empty($new_products_category_id) ) { $card_products_query = tep_db_query(<<<'EOSQL' diff --git a/includes/modules/content/index/templates/tpl_cm_i_card_products.php b/includes/modules/content/index/templates/tpl_cm_i_card_products.php index 6e5e76640..af9c44b0d 100644 --- a/includes/modules/content/index/templates/tpl_cm_i_card_products.php +++ b/includes/modules/content/index/templates/tpl_cm_i_card_products.php @@ -3,42 +3,38 @@
-
- -
-
- -
-
- display_price($card_products['products_price'], tep_get_tax_rate($card_products['products_tax_class_id'])), $currencies->display_price($card_products['specials_new_products_price'], tep_get_tax_rate($card_products['products_tax_class_id']))); - } - else { - echo sprintf(IS_PRODUCT_SHOW_PRICE, $currencies->display_price($card_products['products_price'], tep_get_tax_rate($card_products['products_tax_class_id']))); - } - ?> -
-
- @@ -46,17 +42,13 @@ diff --git a/includes/modules/content/index_nested/cm_in_card_products.php b/includes/modules/content/index_nested/cm_in_card_products.php index 788b077e7..b403e3ac5 100644 --- a/includes/modules/content/index_nested/cm_in_card_products.php +++ b/includes/modules/content/index_nested/cm_in_card_products.php @@ -22,7 +22,7 @@ public function execute() { global $current_category_id, $currencies, $PHP_SELF; $content_width = MODULE_CONTENT_IN_CARD_PRODUCTS_CONTENT_WIDTH; - $card_layout = IS_PRODUCT_PRODUCTS_LAYOUT; + $card_layout = IS_PRODUCT_PRODUCTS_DISPLAY_ROW; $card_products_query = tep_db_query(<<<'EOSQL' SELECT DISTINCT p.*, pd.*, diff --git a/includes/modules/content/index_nested/cm_in_category_listing.php b/includes/modules/content/index_nested/cm_in_category_listing.php index e2e366e90..0c136e642 100644 --- a/includes/modules/content/index_nested/cm_in_category_listing.php +++ b/includes/modules/content/index_nested/cm_in_category_listing.php @@ -22,7 +22,7 @@ public function execute() { global $current_category_id, $OSCOM_category; $content_width = MODULE_CONTENT_IN_CATEGORY_LISTING_CONTENT_WIDTH; - $category_card_layout = MODULE_CONTENT_IN_CATEGORY_LISTING_LAYOUT; + $category_card_layout = MODULE_CONTENT_IN_CATEGORY_LISTING_DISPLAY_ROW; $category_name = $OSCOM_category->getData($current_category_id, 'name'); $category_level = $OSCOM_category->setMaximumLevel(1); @@ -46,38 +46,10 @@ protected function get_parameters() { 'desc' => 'What width container should the content be shown in?', 'set_func' => "tep_cfg_select_option(['12', '11', '10', '9', '8', '7', '6', '5', '4', '3', '2', '1'], ", ], - 'MODULE_CONTENT_IN_CATEGORY_LISTING_LAYOUT' => [ - 'title' => 'Category Card Layout', - 'value' => 'card-deck', - 'desc' => <<<'EOD' -What Layout suits your shop? See card/#card-layout
card-columns is a special use case that will not suit most shops as card-columns is very difficult to lay out and sort by...
-EOD - , - 'set_func' => "tep_cfg_select_option(['card-group', 'card-deck', 'card-columns'], ", - ], - 'MODULE_CONTENT_IN_CATEGORY_LISTING_DISPLAY_ROW_SM' => [ - 'title' => 'Items In Each Row (SM)', - 'value' => '2', - 'desc' => 'How many products should display per Row in SM (Small) viewport?', - 'set_func' => "tep_cfg_select_option(['12', '11', '10', '9', '8', '7', '6', '5', '4', '3', '2', '1'], ", - ], - 'MODULE_CONTENT_IN_CATEGORY_LISTING_DISPLAY_ROW_MD' => [ - 'title' => 'Items In Each Row (MD)', - 'value' => '3', - 'desc' => 'How many products should display per Row in MD (Medium) viewport?', - 'set_func' => "tep_cfg_select_option(['12', '11', '10', '9', '8', '7', '6', '5', '4', '3', '2', '1'], ", - ], - 'MODULE_CONTENT_IN_CATEGORY_LISTING_DISPLAY_ROW_LG' => [ - 'title' => 'Items In Each Row (LG)', - 'value' => '4', - 'desc' => 'How many products should display per Row in LG (Large) viewport?', - 'set_func' => "tep_cfg_select_option(['12', '11', '10', '9', '8', '7', '6', '5', '4', '3', '2', '1'], ", - ], - 'MODULE_CONTENT_IN_CATEGORY_LISTING_DISPLAY_ROW_XL' => [ - 'title' => 'Items In Each Row (XL)', - 'value' => '6', - 'desc' => 'How many products should display per Row in XL (Extra Large) viewport?', - 'set_func' => "tep_cfg_select_option(['12', '11', '10', '9', '8', '7', '6', '5', '4', '3', '2', '1'], ", + 'MODULE_CONTENT_IN_CATEGORY_LISTING_DISPLAY_ROW' => [ + 'title' => 'Categories Per Row', + 'value' => 'row-cols-2 row-cols-sm-3 row-cols-md-4', + 'desc' => 'How many categories should display per Row per viewport? Default: XS 2, SM 3, MD and above 4', ], 'MODULE_CONTENT_IN_CATEGORY_LISTING_SORT_ORDER' => [ 'title' => 'Sort Order', diff --git a/includes/modules/content/index_nested/templates/tpl_cm_in_card_products.php b/includes/modules/content/index_nested/templates/tpl_cm_in_card_products.php index 081ea3433..14d3bea9d 100644 --- a/includes/modules/content/index_nested/templates/tpl_cm_in_card_products.php +++ b/includes/modules/content/index_nested/templates/tpl_cm_in_card_products.php @@ -3,42 +3,38 @@
-
- -
-
- -
-
- display_price($card_products['products_price'], tep_get_tax_rate($card_products['products_tax_class_id'])), $currencies->display_price($card_products['specials_new_products_price'], tep_get_tax_rate($card_products['products_tax_class_id']))); - } - else { - echo sprintf(IS_PRODUCT_SHOW_PRICE, $currencies->display_price($card_products['products_price'], tep_get_tax_rate($card_products['products_tax_class_id']))); - } - ?> -
-
- @@ -46,17 +42,13 @@ diff --git a/includes/modules/content/index_nested/templates/tpl_cm_in_category_listing.php b/includes/modules/content/index_nested/templates/tpl_cm_in_category_listing.php index 3c2b5b4a6..0873be62c 100644 --- a/includes/modules/content/index_nested/templates/tpl_cm_in_category_listing.php +++ b/includes/modules/content/index_nested/templates/tpl_cm_in_category_listing.php @@ -1,21 +1,15 @@
$v) { - echo '
' . PHP_EOL; - echo '' . tep_image('images/' . $v['image'], htmlspecialchars($v['title'])) . ''; - echo ''; } ?>
@@ -23,17 +17,13 @@ diff --git a/includes/modules/content/login/cm_paypal_login.php b/includes/modules/content/login/cm_paypal_login.php index 4d1eb82c3..9dac9d3ae 100644 --- a/includes/modules/content/login/cm_paypal_login.php +++ b/includes/modules/content/login/cm_paypal_login.php @@ -98,7 +98,7 @@ function execute() { function guarantee_address($customer_id, $address) { $address['id'] = $customer_id; - $check_query = tep_db_query($GLOBALS['customer_data']->build_read(['address_book_id'], 'address_book', $address) . "' LIMIT 1"); + $check_query = tep_db_query($GLOBALS['customer_data']->build_read(['address_book_id'], 'address_book', $address) . " LIMIT 1"); if ($check = tep_db_fetch_array($check_query)) { $_SESSION['sendto'] = $check['address_book_id']; } else { diff --git a/includes/modules/content/product_info/cm_pi_also_purchased.php b/includes/modules/content/product_info/cm_pi_also_purchased.php index 91af74ada..4d59d9dca 100644 --- a/includes/modules/content/product_info/cm_pi_also_purchased.php +++ b/includes/modules/content/product_info/cm_pi_also_purchased.php @@ -22,7 +22,7 @@ function execute() { global $currencies, $PHP_SELF; $content_width = (int)MODULE_CONTENT_PRODUCT_INFO_ALSO_PURCHASED_CONTENT_WIDTH; - $card_layout = IS_PRODUCT_PRODUCTS_LAYOUT; + $card_layout = IS_PRODUCT_PRODUCTS_DISPLAY_ROW; $orders_query = tep_db_query(<<<'EOSQL' SELECT diff --git a/includes/modules/content/product_info/templates/tpl_cm_pi_also_purchased.php b/includes/modules/content/product_info/templates/tpl_cm_pi_also_purchased.php index 64822b5a0..ce6aa01e7 100644 --- a/includes/modules/content/product_info/templates/tpl_cm_pi_also_purchased.php +++ b/includes/modules/content/product_info/templates/tpl_cm_pi_also_purchased.php @@ -3,42 +3,38 @@
-
- -
-
- -
-
- display_price($orders['products_price'], tep_get_tax_rate($orders['products_tax_class_id'])), $currencies->display_price($orders['specials_new_products_price'], tep_get_tax_rate($orders['products_tax_class_id']))); - } - else { - echo sprintf(IS_PRODUCT_SHOW_PRICE, $currencies->display_price($orders['products_price'], tep_get_tax_rate($orders['products_tax_class_id']))); - } - ?> -
-
- @@ -46,17 +42,13 @@ diff --git a/includes/modules/order_total/ot_shipping.php b/includes/modules/order_total/ot_shipping.php index 5318f3338..544fe4057 100644 --- a/includes/modules/order_total/ot_shipping.php +++ b/includes/modules/order_total/ot_shipping.php @@ -79,7 +79,7 @@ public function get_parameters() { ], 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER' => [ 'title' => 'Sort Order', - 'value' => '2', + 'value' => '20', 'desc' => 'Sort order of display.', ], 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING' => [ diff --git a/includes/modules/order_total/ot_subtotal.php b/includes/modules/order_total/ot_subtotal.php index e9ca4cae2..93acdbbc6 100644 --- a/includes/modules/order_total/ot_subtotal.php +++ b/includes/modules/order_total/ot_subtotal.php @@ -49,7 +49,7 @@ function keys() { function install() { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Sub-Total', 'MODULE_ORDER_TOTAL_SUBTOTAL_STATUS', 'true', 'Do you want to display the order sub-total cost?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); - tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER', '1', 'Sort order of display.', '6', '2', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER', '10', 'Sort order of display.', '6', '2', now())"); } function remove() { diff --git a/includes/modules/order_total/ot_tax.php b/includes/modules/order_total/ot_tax.php index 6adfd1aa3..db18f233e 100644 --- a/includes/modules/order_total/ot_tax.php +++ b/includes/modules/order_total/ot_tax.php @@ -53,7 +53,7 @@ function keys() { function install() { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Tax', 'MODULE_ORDER_TOTAL_TAX_STATUS', 'true', 'Do you want to display the order tax value?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); - tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_TAX_SORT_ORDER', '3', 'Sort order of display.', '6', '2', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_TAX_SORT_ORDER', '30', 'Sort order of display.', '6', '2', now())"); } function remove() { diff --git a/includes/modules/order_total/ot_total.php b/includes/modules/order_total/ot_total.php index 43a5477bc..0ea5a81ab 100644 --- a/includes/modules/order_total/ot_total.php +++ b/includes/modules/order_total/ot_total.php @@ -49,7 +49,7 @@ function keys() { function install() { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Total', 'MODULE_ORDER_TOTAL_TOTAL_STATUS', 'true', 'Do you want to display the total order value?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); - tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now())"); + tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER', '40', 'Sort order of display.', '6', '2', now())"); } function remove() { diff --git a/includes/system/versioned/1.0.7.3/abstract_shipping_module.php b/includes/system/versioned/1.0.7.3/abstract_shipping_module.php index 100c9290a..08b50acdd 100644 --- a/includes/system/versioned/1.0.7.3/abstract_shipping_module.php +++ b/includes/system/versioned/1.0.7.3/abstract_shipping_module.php @@ -17,10 +17,14 @@ abstract class abstract_shipping_module extends abstract_zoneable_module { public $quotes; protected $country; + public function __construct() { + parent::__construct(); + $this->tax_class = $this->base_constant('TAX_CLASS') ?? 0; + } + public function quote_common() { global $order; - $this->tax_class = $this->base_constant('TAX_CLASS') ?? 0; if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } diff --git a/includes/version.php b/includes/version.php index 37577951d..6e0714f9c 100644 --- a/includes/version.php +++ b/includes/version.php @@ -1 +1 @@ -1.0.7.4 +1.0.7.5 diff --git a/install/phoenix.sql b/install/phoenix.sql index 4b82eb833..70ddf8088 100644 --- a/install/phoenix.sql +++ b/install/phoenix.sql @@ -705,7 +705,7 @@ INSERT INTO configuration (configuration_title, configuration_key, configuration INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Default Image', 'DEFAULT_IMAGE', '', 'The default image to show if the image is not a valid file. Leave blank not to show a default.', '4', '5', NOW()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Installed Modules', 'MODULE_PAYMENT_INSTALLED', 'cod.php', 'List of payment module filenames separated by a semi-colon. This is automatically updated. No need to edit. (Example: cod.php;paypal_express.php)', '6', '0', now()); -INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Installed Modules', 'MODULE_ORDER_TOTAL_INSTALLED', 'ot_subtotal.php;ot_tax.php;ot_shipping.php;ot_total.php', 'List of order_total module filenames separated by a semi-colon. This is automatically updated. No need to edit. (Example: ot_subtotal.php;ot_tax.php;ot_shipping.php;ot_total.php)', '6', '0', now()); +INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Installed Modules', 'MODULE_ORDER_TOTAL_INSTALLED', 'ot_subtotal.php;ot_shipping.php;ot_tax.php;ot_total.php', 'List of order_total module filenames separated by a semi-colon. This is automatically updated. No need to edit.', '6', '0', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Installed Modules', 'MODULE_SHIPPING_INSTALLED', 'flat.php', 'List of shipping module filenames separated by a semi-colon. This is automatically updated. No need to edit. (Example: ups.php;flat.php;item.php)', '6', '0', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Installed Modules', 'MODULE_ACTION_RECORDER_INSTALLED', 'ar_admin_login.php;ar_contact_us.php;ar_reset_password.php', 'List of action recorder module filenames separated by a semi-colon. This is automatically updated. No need to edit.', '6', '0', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Installed Modules', 'MODULE_CONTENT_NAVBAR_INSTALLED', 'nb_hamburger_button.php;nb_brand.php;nb_currencies.php;nb_account.php;nb_shopping_cart.php;nb_special_offers.php', 'List of navbar module filenames separated by a semi-colon. This is automatically updated. No need to edit.', '6', '0', now()); @@ -722,16 +722,16 @@ INSERT INTO configuration (configuration_title, configuration_key, configuration INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Default Language', 'DEFAULT_LANGUAGE', 'en', 'Default Language', '6', '0', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Default Order Status For New Orders', 'DEFAULT_ORDERS_STATUS_ID', '1', 'When a new order is created, this order status will be assigned to it.', '6', '0', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display Shipping', 'MODULE_ORDER_TOTAL_SHIPPING_STATUS', 'True', 'Do you want to display the order shipping cost?', '6', '1','tep_cfg_select_option([\'True\', \'False\'], ', NOW()); -INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Sort Order', 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', '2', 'Sort order of display.', '6', '2', now()); +INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Sort Order', 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', '20', 'Sort order of display.', '6', '2', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Allow Free Shipping', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING', 'False', 'Do you want to allow free shipping?', '6', '3', 'tep_cfg_select_option([\'True\', \'False\'], ', NOW()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) VALUES ('Free Shipping For Orders Over', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', '50', 'Provide free shipping for orders over the set amount.', '6', '4', 'currencies->format', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Provide Free Shipping For Orders Made', 'MODULE_ORDER_TOTAL_SHIPPING_DESTINATION', 'national', 'Provide free shipping for orders sent to the set destination.', '6', '5', 'tep_cfg_select_option([\'national\', \'international\', \'both\'], ', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display Sub-Total', 'MODULE_ORDER_TOTAL_SUBTOTAL_STATUS', 'true', 'Do you want to display the order sub-total cost?', '6', '1','tep_cfg_select_option([\'true\', \'false\'], ', now()); -INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Sort Order', 'MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER', '1', 'Sort order of display.', '6', '2', now()); +INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Sort Order', 'MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER', '10', 'Sort order of display.', '6', '2', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display Tax', 'MODULE_ORDER_TOTAL_TAX_STATUS', 'true', 'Do you want to display the order tax value?', '6', '1','tep_cfg_select_option([\'true\', \'false\'], ', now()); -INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Sort Order', 'MODULE_ORDER_TOTAL_TAX_SORT_ORDER', '3', 'Sort order of display.', '6', '2', now()); +INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Sort Order', 'MODULE_ORDER_TOTAL_TAX_SORT_ORDER', '30', 'Sort order of display.', '6', '2', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display Total', 'MODULE_ORDER_TOTAL_TOTAL_STATUS', 'true', 'Do you want to display the total order value?', '6', '1','tep_cfg_select_option([\'true\', \'false\'], ', now()); -INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Sort Order', 'MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now()); +INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Sort Order', 'MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER', '40', 'Sort order of display.', '6', '2', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Minimum Minutes Per E-Mail', 'MODULE_ACTION_RECORDER_CONTACT_US_EMAIL_MINUTES', '15', 'Minimum number of minutes to allow 1 e-mail to be sent (eg, 15 for 1 e-mail every 15 minutes)', '6', '0', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Allowed Minutes', 'MODULE_ACTION_RECORDER_ADMIN_LOGIN_MINUTES', '5', 'Number of minutes to allow login attempts to occur.', '6', '0', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Allowed Attempts', 'MODULE_ACTION_RECORDER_ADMIN_LOGIN_ATTEMPTS', '3', 'Number of login attempts to allow within the specified period.', '6', '0', now()); @@ -742,12 +742,7 @@ INSERT INTO configuration (configuration_title, configuration_key, configuration INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Larger packages - percentage increase.', 'SHIPPING_BOX_PADDING', '10', 'For 10% enter 10', '7', '5', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Allow Orders Not Matching Defined Shipping Zones ', 'SHIPPING_ALLOW_UNDEFINED_ZONES', 'False', 'Should orders be allowed to shipping addresses not matching defined shipping module shipping zones?', '7', '5', 'tep_cfg_select_option([\'True\', \'False\'], ', now()); -INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Product Card Layout', 'IS_PRODUCT_PRODUCTS_LAYOUT', 'card-deck', 'What Layout suits your shop? See card/#card-layout
card-columns is a special use case that will not suit most shops as card-columns is very difficult to layout and sort by...
', '8', '100', 'tep_cfg_select_option([\'card-group\', \'card-deck\', \'card-columns\'], ', now()); -INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Products In Each Row (SM)', 'IS_PRODUCT_PRODUCTS_DISPLAY_ROW_SM', '2', 'How many products should display per Row in SM (Small) viewport?', '8', '110', 'tep_cfg_select_option([\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'], ', now()); -INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Products In Each Row (MD)', 'IS_PRODUCT_PRODUCTS_DISPLAY_ROW_MD', '3', 'How many products should display per Row in MD (Medium) viewport?', '8', '120', 'tep_cfg_select_option([\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'], ', now()); -INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Products In Each Row (LG)', 'IS_PRODUCT_PRODUCTS_DISPLAY_ROW_LG', '4', 'How many products should display per Row in LG (Large) viewport?', '8', '130', 'tep_cfg_select_option([\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'], ', now()); -INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Products In Each Row (XL)', 'IS_PRODUCT_PRODUCTS_DISPLAY_ROW_XL', '4', 'How many products should display per Row in XL (Large) viewport?', '8', '140', 'tep_cfg_select_option([\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'], ', now()); - +INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Products Per Row', 'IS_PRODUCT_PRODUCTS_DISPLAY_ROW', 'row row-cols-2 row-cols-sm-3 row-cols-md-4', 'How many products should display per Row per viewport? Default: XS 2, SM 3, MD and above 4', '8', '110', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Sort Option: Manufacturer Name (0=disable; 1=enable)','PRODUCT_LIST_MANUFACTURER', '0', 'Allow sorting by Manufacturer Name?', '8', '200', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Sort Option: Model (0=disable; 1=enable)', 'PRODUCT_LIST_MODEL', '0', 'Allow sorting by Product Model?', '8', '210', now()); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Sort Option: Name (0=disable; 1=enable)', 'PRODUCT_LIST_NAME', '1', 'Allow sorting by Product Name?', '8', '220', now()); @@ -1563,12 +1558,8 @@ insert into configuration (configuration_title, configuration_key, configuration insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Category Listing Module', 'MODULE_CONTENT_IN_CATEGORY_LISTING_STATUS', 'True', 'Should this module be enabled?', '6', '1', 'tep_cfg_select_option([\'True\', \'False\'], ', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_CONTENT_IN_CATEGORY_LISTING_CONTENT_WIDTH', '12', 'What width container should the content be shown in?', '6', '2', 'tep_cfg_select_option([\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'], ', now()); -INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Category Card Layout', 'MODULE_CONTENT_IN_CATEGORY_LISTING_LAYOUT', 'card-deck', 'What Layout suits your shop? See card/#card-layout
card-columns is a special use case that will not suit most shops as card-columns is very difficult to layout and sort by...
', '6', '3', 'tep_cfg_select_option([\'card-group\', \'card-deck\', \'card-columns\'], ', now()); -insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Items In Each Row (SM)', 'MODULE_CONTENT_IN_CATEGORY_LISTING_DISPLAY_ROW_SM', '2', 'How many products should display per Row in SM (Small) viewport?', '6', '4', 'tep_cfg_select_option([\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'], ', now()); -insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Items In Each Row (MD)', 'MODULE_CONTENT_IN_CATEGORY_LISTING_DISPLAY_ROW_MD', '3', 'How many products should display per Row in MD (Medium) viewport?', '6', '4', 'tep_cfg_select_option([\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'], ', now()); -insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Items In Each Row (LG)', 'MODULE_CONTENT_IN_CATEGORY_LISTING_DISPLAY_ROW_LG', '4', 'How many products should display per Row in LG (Large) viewport?', '6', '4', 'tep_cfg_select_option([\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'], ', now()); -insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Items In Each Row (XL)', 'MODULE_CONTENT_IN_CATEGORY_LISTING_DISPLAY_ROW_XL', '6', 'How many products should display per Row in XL (Extra Large) viewport?', '6', '4', 'tep_cfg_select_option([\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'], ', now()); -insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CONTENT_IN_CATEGORY_LISTING_SORT_ORDER', '200', 'Sort order of display. Lowest is displayed first.', '6', '4', now()); +insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Categories Per Row', 'MODULE_CONTENT_IN_CATEGORY_LISTING_DISPLAY_ROW', 'row row-cols-2 row-cols-sm-3 row-cols-md-4', 'How many categories should display per Row per viewport? Default: XS 2, SM 3, MD and above 4', '6', '4', now()); +insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CONTENT_IN_CATEGORY_LISTING_SORT_ORDER', '200', 'Sort order of display. Lowest is displayed first.', '6', '8', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable New Products Module', 'MODULE_CONTENT_IN_CARD_PRODUCTS_STATUS', 'True', 'Do you want to enable this module?', '6', '1', 'tep_cfg_select_option([\'True\', \'False\'], ', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_CONTENT_IN_CARD_PRODUCTS_CONTENT_WIDTH', '12', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '2', 'tep_cfg_select_option([\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'], ', now()); diff --git a/templates/default/includes/components/product_listing.php b/templates/default/includes/components/product_listing.php index 663566eb5..2a41460b8 100644 --- a/templates/default/includes/components/product_listing.php +++ b/templates/default/includes/components/product_listing.php @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2018 osCommerce + Copyright (c) 2020 osCommerce Released under the GNU General Public License */ @@ -94,58 +94,53 @@ $prod_list_contents = NULL; - $item = 1; while ($listing = tep_db_fetch_array($listing_query)) { - $prod_list_contents .= '
' . PHP_EOL; - if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) { - $prod_list_contents .= '' . tep_image('images/' . $listing['products_image'], htmlspecialchars($listing['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '', true, 'card-img-top') . '' . PHP_EOL; - } else { - $prod_list_contents .= '' . tep_image('images/' . $listing['products_image'], htmlspecialchars($listing['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '', true, 'card-img-top') . '' . PHP_EOL; - } - - $prod_list_contents .= '
' . PHP_EOL; - $prod_list_contents .= '
'; - if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) { - $prod_list_contents .= '' . $listing['products_name'] . ''; + $prod_list_contents .= '
'; + $prod_list_contents .= '
' . PHP_EOL; - $prod_list_contents .= '
'; - if ($listing['is_special'] == 1) { - $prod_list_contents .= sprintf(IS_PRODUCT_SHOW_PRICE_SPECIAL, $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])), $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id']))); + + $prod_list_contents .= '
' . PHP_EOL; + $prod_list_contents .= '
'; + if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) { + $prod_list_contents .= '' . $listing['products_name'] . ''; + } else { + $prod_list_contents .= '' . $listing['products_name'] . ''; } - else { - $prod_list_contents .= sprintf(IS_PRODUCT_SHOW_PRICE, $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id']))); + $prod_list_contents .= '
' . PHP_EOL; + $prod_list_contents .= '
'; + if ($listing['is_special'] == 1) { + $prod_list_contents .= sprintf(IS_PRODUCT_SHOW_PRICE_SPECIAL, $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])), $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id']))); + } + else { + $prod_list_contents .= sprintf(IS_PRODUCT_SHOW_PRICE, $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id']))); + } + $prod_list_contents .= '
' . PHP_EOL; + if (tep_not_null($listing['products_seo_description'])) { + $prod_list_contents .= '
'; + $prod_list_contents .= $listing['products_seo_description']; + $prod_list_contents .= '
' . PHP_EOL; } - $prod_list_contents .= '
' . PHP_EOL; - if (tep_not_null($listing['products_seo_description'])) { - $prod_list_contents .= '
'; - $prod_list_contents .= $listing['products_seo_description']; - $prod_list_contents .= '
' . PHP_EOL; - } - $prod_list_contents .= '
' . PHP_EOL; + $prod_list_contents .= '
' . PHP_EOL; - $prod_list_contents .= '' . PHP_EOL; $prod_list_contents .= '
' . PHP_EOL; - - if ( $item%IS_PRODUCT_PRODUCTS_DISPLAY_ROW_SM == 0 ) $prod_list_contents .= '
' . PHP_EOL; - if ( $item%IS_PRODUCT_PRODUCTS_DISPLAY_ROW_MD == 0 ) $prod_list_contents .= '
' . PHP_EOL; - if ( $item%IS_PRODUCT_PRODUCTS_DISPLAY_ROW_LG == 0 ) $prod_list_contents .= '
' . PHP_EOL; - if ( $item%IS_PRODUCT_PRODUCTS_DISPLAY_ROW_XL == 0 ) $prod_list_contents .= '
' . PHP_EOL; - $item++; } echo $GLOBALS['OSCOM_Hooks']->call('filter', 'drawForm'); - echo '
' . PHP_EOL; + echo '
' . PHP_EOL; echo $prod_list_contents; echo '
' . PHP_EOL; diff --git a/templates/default/includes/hooks/shop/index/catCSS.php b/templates/default/includes/hooks/shop/index/catCSS.php deleted file mode 100644 index 20aa644e9..000000000 --- a/templates/default/includes/hooks/shop/index/catCSS.php +++ /dev/null @@ -1,35 +0,0 @@ -@media (min-width: 576px) {.cm-in-category-listing > .card-group > .card {max-width: {$sm}%;}.cm-in-category-listing > .card-deck > .card {max-width: calc({$sm}% - 30px);}.cm-in-category-listing > .card-columns {column-count: {$sm_count};}} @media (min-width: 768px) {.cm-in-category-listing > .card-group > .card {max-width: {$md}%;}.cm-in-category-listing > .card-deck > .card {max-width: calc({$md}% - 30px);}.cm-in-category-listing > .card-columns {column-count: {$md_count};}} @media (min-width: 992px) {.cm-in-category-listing > .card-group > .card {max-width: {$lg}%;}.cm-in-category-listing > .card-deck > .card {max-width: calc({$lg}% - 30px);}.cm-in-category-listing > .card-columns {column-count: {$lg_count};}} @media (min-width: 1200px) {.cm-in-category-listing > .card-group > .card {max-width: {$xl}%;}.cm-in-category-listing > .card-deck > .card {max-width: calc({$xl}% - 30px);}.cm-in-category-listing > .card-columns {column-count: {$xl_count};}} -eod; - - return $catCSS; - } - } - -} diff --git a/templates/default/includes/hooks/shop/siteWide/cardCSS.php b/templates/default/includes/hooks/shop/siteWide/cardCSS.php deleted file mode 100644 index 6e249ee47..000000000 --- a/templates/default/includes/hooks/shop/siteWide/cardCSS.php +++ /dev/null @@ -1,41 +0,0 @@ -@media (min-width: 576px) {.card-group > .card.is-product {max-width: {$sm}%;}.card-deck > .card.is-product {max-width: calc({$sm}% - 30px);}.card-columns {column-count: {$sm_count};}} @media (min-width: 768px) {.card-group > .card.is-product {max-width: {$md}%;}.card-deck > .card.is-product {max-width: calc({$md}% - 30px);}.card-columns {column-count: {$md_count};}} @media (min-width: 992px) {.card-group > .card.is-product {max-width: {$lg}%;}.card-deck > .card.is-product {max-width: calc({$lg}% - 30px);}.card-columns {column-count: {$lg_count};}} @media (min-width: 1200px) {.card-group > .card.is-product {max-width: {$xl}%;}.card-deck > .card.is-product {max-width: calc({$xl}% - 30px);}.card-columns {column-count: {$xl_count};}} -eod; - - $this->SiteStart .= $cardCSS . PHP_EOL; - - return $this->SiteStart; - } - -} diff --git a/templates/default/includes/pages/create_account.php b/templates/default/includes/pages/create_account.php index 8030b2aa8..d8ab11de1 100644 --- a/templates/default/includes/pages/create_account.php +++ b/templates/default/includes/pages/create_account.php @@ -33,7 +33,12 @@ 0; + }); + + if ([] === $modules) { continue; } ?> @@ -41,7 +46,7 @@

display_input($customer_details); } }