Skip to content

Instantly share code, notes, and snippets.

@fusco
Created August 2, 2012 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fusco/3235478 to your computer and use it in GitHub Desktop.
Save fusco/3235478 to your computer and use it in GitHub Desktop.
<?php
class Cart extends CartCore
{
public function __construct($id = NULL, $id_lang = NULL)
{
parent::__construct($id, $id_lang);
/* Oleacorner : Optimization of producst cache management in case several cart objects with same IDs are created */
if (isset(self::$_carts_list[$id.'_'.$id_lang]))
$this->_products = self::$_carts_list[$id.'_'.$id_lang]->_products;
else
self::$_carts_list[$id.'_'.$id_lang] = $this;
/* End Oleacorner */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment