Hi,
I noticed today that if I add an item to the basket and then click the shop logo to return to the main page or if I click another custom links, the cart gets emptied, also if I visit a page that doesn’t have the session id in the end the cart gets emptied.
I did few modifications last few days but I don’t think is because of them because initially I undone everything and the problem was still present. What I did in the end was clear the cookies, and all the private data and now its working fine, I even done all the modifications again and its still working, I cant recreate the error anymore, but I think it wasn’t only me, because all the orders from yesterday only had 1 item, one customer placed 2 orders one after another both with only 1 item.
What I changed, well first I fixed the timezone on the server and sql, see my post here for the modifications:
In admin/includes/languages/englis.php ~line 75 and after includes/languages/englis.php ~line 32 after:
Code:
define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');
ADD:
Code:
date_default_timezone_set('Europe/London');
- In admin/includes/languages/espanol.php after ~line 76 and includes/languages/espanol.php after ~line 20:
Code:
@setlocale(LC_TIME, 'Spanish');
ADD:
Code:
date_default_timezone_set('Europe/Madrid');
- In admin/includes/configure.php and /includes/configure.php in the end add:
Code:
define('CONFIG_TIME_ZONE', '+00:00');
- In admin/includes/functions/database.php and /includes/functions/database.php ~ line 22 changed:
Code:
if ($$link) mysql_select_db($database);
WITH:
Code:
if ($$link) {
mysql_select_db($database);
tep_db_query('SET time_zone=\'' . CONFIG_TIME_ZONE . '\'');
}
Then because I have products (Gifts) for £0 that I offer free with the order and I wanted a way to stop people to buy only the gift, I change the shopping_cart.tpl.php, footer.php, header.php so when the total amount of the products from the basket is <1 the checkout button and links are hidden:
In /httpdocs/templates/cre63_ats/header.php change:
Code:
<?php echo tep_image(DIR_WS_TEMPLATE_IMAGES . 'top_link_arrow.png');?><a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo MENU_TEXT_CHECKOUT;?></a>
WITH:
Code:
<?php
if ($cart->show_total() >= 1){
?>
<?php echo tep_image(DIR_WS_TEMPLATE_IMAGES . 'top_link_arrow.png');?><a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo MENU_TEXT_CHECKOUT;?></a>
<?php } ?>
In /httpdocs/templates/cre63_ats/footer.php Changed:
Code:
<a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo MENU_TEXT_CHECKOUT; ?></a> |
With:
Code:
<?php
if ($cart->show_total() >= 1)
?>
<a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo MENU_TEXT_CHECKOUT; ?></a> |
<?php } ?>
Anybody find any problem with any of the modifications, after I cleared the cookies, even with all this modifications its working ok, for now.