[TomatoCart] Solution for Two Issues in the Admin Panel!

In this article, I will give you solution for two issues reported in the github:

Issue 1. Throw timezone Warning message in admin panel

Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone.

This issue will also result in the error thrown in the ajax response from server in the admin  panel. For example, when you access the orders grid in the admin panel, you will see an empty grid.

Snip20141120_4

Although there are the orders in the database, you can’t see the data in the grid because there is timezone error thrown in the response.

Solution for issue 1

Step 1. Open admin/includes/application_top.php with your favourite editor.

Step 2. Find following code snippet:

// define our general functions used application-wide
require('../includes/functions/general.php');

Then, add following code before it:

// set the default timezone
  if (defined('STORE_TIME_ZONE') && STORE_TIME_ZONE) {
  	if (!date_default_timezone_set(STORE_TIME_ZONE)) {
  		date_default_timezone_set('UTC');
  	}
  }

Step 3. Go to admin panel > start menu > Configuration > Configuration > My store to set your own timezone.

Snip20141123_1

Note, the default timezone is UTC. You could find your own timezone from http://www.php.net/manual/en/timezones.php.

Issue 2. Variants can’t be deleted if they are assigned to a product

Sometimes you want to reorganize your variants. I’ve had this problem years ago in oscommerce too and sometimes it was hard to find them. You had to go through each product to see if your variant was present there.

68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f343435313435352f3536333237352f62383635386233342d633463392d313165322d383136332d3632343331323065333135662e6a7067

Solution for issue 2

We could show which products the variants are assigned to directly in the alert window.

Step 1. Backup following two files for safety:

  • admin/includes/classes/product_variants.php
  • admin/includes/jsons/product_variants.php

Step 2. Download a package from https://www.dropbox.com/s/7nc8yw5mary8vbl/issue%2356.zip?dl=0

Step 3. Unzip the package into your local computer and then copy the admin fold into your TomatoCart root directory to override the original ones.

That’s it. In this way, you will see the products linked with the current variants.

Like:

Snip20141121_3

Deleting variants group

Snip20141121_1

Deleting variants entry

Final Words

If you need help, drop me a message via email or Skype. I’d be glad to help.

Email: support@tomatocart.com 

Skype: tocjack

Looking for quality TomatoCart Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , | Posted under TomatoCart | RSS 2.0

Author Spotlight

Jack Yin

TomatoCart Developer & Co Founder - Arvixe Web Hosting / TomatoCart Community Liaison

3 Comments on [TomatoCart] Solution for Two Issues in the Admin Panel!

  1. Annette says:

    can you make a module of the new css slider that can be installed on older versions of tomato-cart please

    • Jack Yin says:

      Hi Annette,

      Of course. I prefer to arrange time to implement a new css slider. But, could you describe your requirement in great detail? Do you mean the slider show module in the store front?

  2. Annette says:

    its ok i fixed that issue. but i have one with the facebook login module you wrote

Leave a Reply

Your email address will not be published. Required fields are marked *