Skip to content

Commit

Permalink
Merge pull request #14 from shophelfer/bugfixes
Browse files Browse the repository at this point in the history
Version 1.4.2
  • Loading branch information
Herr-Dante committed Apr 18, 2016
2 parents 7d0dd15 + 086dcb7 commit c0b34df
Show file tree
Hide file tree
Showing 24 changed files with 228 additions and 416 deletions.
1 change: 1 addition & 0 deletions _installer/sql/update_1.4.1_to_1.4.2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE database_version SET version = 'SH_1.4.2';
2 changes: 1 addition & 1 deletion admin/includes/application_top.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
--------------------------------------------------------------*/

// DB version, used for updates (_installer)
define('DB_VERSION', 'SH_1.4.1');
define('DB_VERSION', 'SH_1.4.2');
//Run Mode
define('RUN_MODE_ADMIN',true);

Expand Down
2 changes: 1 addition & 1 deletion admin/includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );

// Define the project version
define('PROJECT_VERSION', 'shophelfer 1.4.1');
define('PROJECT_VERSION', 'shophelfer 1.4.2');
170 changes: 0 additions & 170 deletions checkout_agree_download.php

This file was deleted.

44 changes: 33 additions & 11 deletions checkout_confirmation.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,45 @@
if (!isset ($_SESSION['shipping']))
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

if(($_SESSION['cart']->get_content_type() == 'mixed') || ($_SESSION['cart']->get_content_type() == 'virtual')) {
if (isset($_POST['agree_download']) && is_string($_POST['agree_download'])) {
if ($_POST['agree_download'] == 'agree_download') {
$_SESSION['agree_download'] = 'agree';
} else {
$_SESSION['agree_download'] = 'disagree';
}
} else {
$error = str_replace('\n', '<br />', ERROR_AGREE_DOWNLOAD_NOT_ACCEPTED);
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_AGREE_DOWNLOAD, 'error_message=' . urlencode($error), 'SSL', true, false));
//check if display conditions on checkout page is true

if (isset ($_POST['payment']))
$_SESSION['payment'] = xtc_db_prepare_input($_POST['payment']);

if ($_POST['comments_added'] != '')
$_SESSION['comments'] = xtc_db_prepare_input($_POST['comments']);

//-- TheMedia Begin check if display conditions on checkout page is true
if (isset ($_POST['cot_gv']))
$_SESSION['cot_gv'] = true;

// if conditions are not accepted, redirect the customer to the payment method selection page
if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
if ((!isset($_POST['conditions']) || $_POST['conditions'] == false) && !isset($_GET['conditions'])) {
$error = str_replace('\n', '<br />', ERROR_CONDITIONS_NOT_ACCEPTED);
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(utf8_decode($error)), 'SSL', true, false));
}
}

if(($_SESSION['cart']->get_content_type() == 'mixed') || ($_SESSION['cart']->get_content_type() == 'virtual')) {
if (isset($_POST['agree_download']) && is_string($_POST['agree_download'])) {
if ($_POST['agree_download'] == 'agree_download') {
$_SESSION['agree_download'] = 'agree';
} else {
$_SESSION['agree_download'] = 'disagree';
}
} else {
$error = str_replace('\n', '<br />', ERROR_AGREE_DOWNLOAD_NOT_ACCEPTED);
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(utf8_decode($error)), 'SSL', true, false));
}
}
$smarty->assign('agree_download', $_SESSION['agree_download']);

// load the selected payment module
require_once (DIR_WS_CLASSES . 'payment.php');
if (isset ($_SESSION['credit_covers']) || !isset($_SESSION['payment'])) { //DokuMan - 2010-10-14 - check that payment is not yet set
$_SESSION['payment'] = 'no_payment'; // GV Code Start/End ICW added for CREDIT CLASS
}

$payment_modules = new payment($_SESSION['payment']);

// GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
Expand All @@ -104,6 +123,9 @@
}
}

if (is_array($payment_modules->modules)) {
$payment_modules->pre_confirmation_check();
}
// load the selected shipping module
require (DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping($_SESSION['shipping']);
Expand Down
24 changes: 14 additions & 10 deletions checkout_payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
require_once (DIR_FS_INC . 'xtc_check_stock.inc.php');
unset ($_SESSION['tmp_oID']);
unset ($_SESSION['transaction_id']); //Dokuman - 2009-10-02 - added moneybookers payment module version 2.4
unset ($_SESSION['conditions']);

// if the customer is not logged on, redirect them to the login page
if (!isset ($_SESSION['customer_id'])) {
Expand Down Expand Up @@ -143,7 +142,7 @@
$breadcrumb->add(NAVBAR_TITLE_1_CHECKOUT_PAYMENT, xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2_CHECKOUT_PAYMENT, xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

$smarty->assign('FORM_ACTION', xtc_draw_form('checkout_agree_download', xtc_href_link(FILENAME_CHECKOUT_AGREE_DOWNLOAD, '', 'SSL'), 'post', 'onSubmit="return check_form();"'));
$smarty->assign('FORM_ACTION', xtc_draw_form('checkout_payment', xtc_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onSubmit="return check_form();"'));
$smarty->assign('ADDRESS_LABEL', xtc_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, ' ', '<br />'));
$smarty->assign('BUTTON_ADDRESS', '<a href="' . xtc_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . xtc_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>');
$smarty->assign('BUTTON_CONTINUE', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
Expand All @@ -161,11 +160,6 @@
$smarty->assign('error', $_SESSION['reshash']['FORMATED_ERRORS']);
}
// EOF - Tomcraft - 2009-10-03 - Paypal Express Modul

if (isset($_GET['error_message']) && xtc_not_null($_GET['error_message'])) {
$smarty->assign('error', utf8_encode(urldecode($_GET['error_message'])));
}

$selection = $payment_modules->selection();

$radio_buttons = 0;
Expand Down Expand Up @@ -195,14 +189,15 @@
$module_smarty->assign('module_content', $selection);
} else {
$smarty->assign('GV_COVER', 'true');
if (isset ($_GET['error_message']) ) {
$smarty->assign('error', utf8_encode($_GET['error_message']));
}
if (isset ($_SESSION['payment'])){
unset ($_SESSION['payment']); //web28 - 2012-04-27 - Fix for order_total <= 0
}
}

if (isset ($_GET['error_message']) ) {
$smarty->assign('error', utf8_encode($_GET['error_message']));
}

// BOF - Tomcraft - 2009-10-03 - Paypal Express Modul
unset($_SESSION['reshash']);
unset($_SESSION['nvpReqArray']);
Expand Down Expand Up @@ -230,6 +225,15 @@
}
}

// downloads withdrawl
if (count($order->downloads) > 0) {
$smarty->assign('DOWNLOADS_ARRAY', $order->downloads);
$smarty->assign('GOODS_ARRAY', $order->goods);
$smarty->assign('GOODS_COUNT', count($order->goods));
$smarty->assign('RADIO_AGREE_DOWNLOAD', '<input type="radio" value="agree_download" name="agree_download" id="agree_download" />');
$smarty->assign('RADIO_DISAGREE_DOWNLOAD', '<input type="radio" value="disagree_download" name="agree_download" id="disagree_download" />');
}

//BOF - Dokuman - 2012-06-19 - BILLSAFE payment module
if ($_GET['billsafe_close'] == 'true' || $_GET['payment_error'] == 'billsafe_2' || $_GET['payment_error'] == 'billsafe_2hp') echo '<script type="text/javascript"> if (top.lpg) top.lpg.close("'.xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message='.stripslashes(urlencode(html_entity_decode($_GET['error_message']))), 'SSL').'"); </script>';
//EOF - Dokuman - 2012-06-19 - BILLSAFE payment module
Expand Down
6 changes: 3 additions & 3 deletions includes/classes/shopping_cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,15 +389,15 @@ function calculate() {
}
}

// $this->total hat netto * Stück in der 1. Runde
// Artikel Rabatt berücksichtigt
// $this->total hat netto * Stück in der 1. Runde
// Artikel Rabatt berücksichtigt
// Gesamt Rabatt auf Bestellung nicht
// Nur weiterrechnen, falls Product nicht ohne Steuer
// $this->total + $this->tax wird berechnet
if ($product['products_tax_class_id'] != 0) {

if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == 1) {
// Rabatt für die Steuerberechnung
// Rabatt für die Steuerberechnung
// der eigentliche Rabatt wird im order-details_cart abgezogen
$products_price_tax = $products_price - ($products_price / 100 * $_SESSION['customers_status']['customers_status_ot_discount']);
$attribute_price_tax = $attribute_price - ($attribute_price / 100 * $_SESSION['customers_status']['customers_status_ot_discount']);
Expand Down
1 change: 0 additions & 1 deletion includes/filenames.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
define('FILENAME_ADVANCED_SEARCH', 'advanced_search.php');
define('FILENAME_ADVANCED_SEARCH_RESULT', 'advanced_search_result.php');
define('FILENAME_ALSO_PURCHASED_PRODUCTS', 'also_purchased_products.php');
define('FILENAME_CHECKOUT_AGREE_DOWNLOAD', 'checkout_agree_download.php');
define('FILENAME_CHECKOUT_CONFIRMATION', 'checkout_confirmation.php');
define('FILENAME_CHECKOUT_PAYMENT', 'checkout_payment.php');
define('FILENAME_CHECKOUT_PAYMENT_ADDRESS', 'checkout_payment_address.php');
Expand Down
12 changes: 6 additions & 6 deletions includes/modules/metatags.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,10 +604,10 @@ function metaKeyWords($Text) {
echo '<meta http-equiv="cache-control" content="no-cache" />'."\n";
}
if (metaClean($meta_keyw) != '') {
echo '<meta name="keywords" content="'. utf8_encode(metaClean($meta_keyw)) .'" />'."\n";
echo '<meta name="keywords" content="'. metaClean($meta_keyw) .'" />'."\n";
}
if (metaClean($meta_descr,$metaDesLength) != '') {
echo '<meta name="description" content="'. utf8_encode(metaClean($meta_descr,$metaDesLength)) .'" />'."\n";
echo '<meta name="description" content="'. metaClean($meta_descr,$metaDesLength) .'" />'."\n";
}
if (USE_BOOTSTRAP != "true") {
if ($_SESSION['language_code'] != '') {
Expand All @@ -618,17 +618,17 @@ function metaKeyWords($Text) {
echo '<meta name="robots" content="'. $meta_robots .'" />'."\n";
}
if (metaClean(META_AUTHOR) != '') {
echo '<meta name="author" content="'.utf8_encode(metaClean(META_AUTHOR)) .'" />'."\n";
echo '<meta name="author" content="'.metaClean(META_AUTHOR) .'" />'."\n";
}
if (metaClean(META_PUBLISHER) != '') {
echo '<meta name="publisher" content="'. utf8_encode(metaClean(META_PUBLISHER)) .'" />'."\n";
echo '<meta name="publisher" content="'. metaClean(META_PUBLISHER) .'" />'."\n";
}
if (metaClean(META_COMPANY) != '') {
echo '<meta name="company" content="'. utf8_encode(metaClean(META_COMPANY)) .'" />'."\n";
echo '<meta name="company" content="'. metaClean(META_COMPANY) .'" />'."\n";
}
if (USE_BOOTSTRAP != "true") {
if (metaClean(META_TOPIC) != '') {
echo '<meta name="page-topic" content="'. utf8_encode(metaClean(META_TOPIC)) .'" />'."\n";
echo '<meta name="page-topic" content="'. metaClean(META_TOPIC) .'" />'."\n";
}
}
if (USE_BOOTSTRAP != "true") {
Expand Down
Loading

0 comments on commit c0b34df

Please sign in to comment.