Adjust order time on LiteCommerce

One of our customers, Robin, sent in this great tip. Thanks Robin!

If you want to change the date of the orders, then please try to perform the following modification of the 'classes/kernel/Cart.php' file :

Find the part of code :

function create()
{
$this->set("date", time());
$this->set("status", "T");
parent::create();
$this->session->set("order_id", $this->get("order_id")); }

function update()
{
$this->set("date", time());
parent::update();
}

Modify it as it's shown below :-

function create()
{
$this->set("date", time() + 3600*); $this->set("status", "T"); parent::create(); $this->session->set("order_id", $this->get("order_id")); }

function update()
{
$this->set("date", time() + 3600*); parent::update(); }

where replace the with the time difference.



So for UK GMT it would look like this with 8 hours:-

function create()
{
$this->set("date", time() + 3600*8);
$this->set("status", "T");
parent::create();
$this->session->set("order_id", $this->get("order_id")); }

function update()
{
$this->set("date", time() + 3600*8);
parent::update();
}

Please note that we as a web host don't support coding changes, and are passing this tip along without liability. Proceed at your own risk, and be sure to back up your files first, just in case.
  • Email, SSL
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How do I install IonCube with a custom php.ini file?

If you create a custom php.ini file, you lose access to ioncube. Litecommerce and x-cart both...

Memory Allocation Error. Create a custom php.ini for PHP 5.2

Some programs produce errors in which it says the memory allocation is limited to 32MB and that...

How to install X-Cart

So you want to install X-cart. We think x-cart is a great choice; its highly customizable and...

Is there a limit to the number of emails (mailing lists and newsletters) that X-cart can send?

There are limits on the emails. We have a server imposed limit of a maximum of 400 emails sent...

Is my x-cart license actually mine? What if I choose to host elsewhere?

Yes. The software is 100% yours. If you choose to move to an alternate host, just be sure to...