Skip to content
Browse files

Merge branch 'master' of git://github.com/osCommerce/oscommerce

  • Loading branch information...
2 parents 1f55a41 + ea73825 commit 70bb24a6b848a79425b55b0e88dfee4ae19654a7 @tgely committed
View
14 osCommerce/OM/Core/ErrorHandler.php
@@ -8,6 +8,7 @@
namespace osCommerce\OM\Core;
+ use osCommerce\OM\Core\DateTime;
use osCommerce\OM\Core\OSCOM;
use osCommerce\OM\Core\PDO;
@@ -66,9 +67,18 @@ public static function execute($errno, $errstr, $errfile, $errline) {
}
public static function connect() {
- self::$_dbh = PDO::initialize(OSCOM::BASE_DIRECTORY . 'Work/Database/errors.sqlite3', null, null, null, null, 'SQLite3');
+ $result = false;
- return self::$_dbh->exec('create table if not exists error_log ( timestamp int, message text );');
+ try {
+ self::$_dbh = PDO::initialize(OSCOM::BASE_DIRECTORY . 'Work/Database/errors.sqlite3', null, null, null, null, 'SQLite3');
+ self::$_dbh->exec('create table if not exists error_log ( timestamp int, message text );');
+
+ $result = true;
+ } catch ( \Exception $e ) {
+ trigger_error($e->getMessage());
+ }
+
+ return $result;
}
public static function getAll($limit = null, $pageset = null) {
View
42 osCommerce/OM/Core/MessageStack.php
@@ -14,6 +14,8 @@
* The MessageStack class manages information messages to be displayed.
* Messages shown are automatically removed from the stack.
* Core message types: info, success, warning, error
+ *
+ * @since v3.0.0
*/
class MessageStack {
@@ -22,7 +24,7 @@ class MessageStack {
* The storage handler for the messages
*
* @var array
- * @access protected
+ * @since v3.0.0
*/
protected $_data = array();
@@ -31,7 +33,7 @@ class MessageStack {
* Constructor, registers a shutdown function to store the remaining messages
* in the session
*
- * @access public
+ * @since v3.0.0
*/
public function __construct() {
@@ -41,7 +43,7 @@ public function __construct() {
/**
* Loads messages stored in the session into the stack
*
- * @access public
+ * @since v3.0.0
*/
public function loadFromSession() {
@@ -59,7 +61,7 @@ public function loadFromSession() {
/**
* Stores remaining messages in the session
*
- * @access public
+ * @since v3.0.0
*/
public function saveInSession() {
@@ -74,18 +76,18 @@ public function saveInSession() {
* @param string $group The group the message belongs to
* @param string $message The message information text
* @param string $type The type of message: info, error, warning, success
- * @access public
+ * @since v3.0.0
*/
public function add($group = null, $message, $type = 'error') {
- if ( empty($group) ) {
+ if ( !isset($group) ) {
$group = OSCOM::getSiteApplication();
}
$stack = array('text' => $message,
'type' => $type);
- if ( !in_array($stack, $this->_data[$group]) ) {
+ if ( !$this->exists($group) || !in_array($stack, $this->_data[$group]) ) {
$this->_data[$group][] = $stack;
}
}
@@ -93,7 +95,7 @@ public function add($group = null, $message, $type = 'error') {
/**
* Reset the message stack
*
- * @access public
+ * @since v3.0.0
*/
public function reset() {
@@ -104,21 +106,21 @@ public function reset() {
* Checks to see if a group in the stack contains messages
*
* @param string $group The name of the group to check
- * @access public
+ * @since v3.0.0
*/
public function exists($group = null) {
- if ( empty($group) ) {
+ if ( !isset($group) ) {
$group = OSCOM::getSiteApplication();
}
- return ( isset($this->_data[$group]) && !empty($this->_data[$group]) );
+ return array_key_exists($group, $this->_data);
}
/**
* Checks to see if the message stack contains messages
*
- * @access public
+ * @since v3.0.0
*/
public function hasContent() {
@@ -131,11 +133,11 @@ public function hasContent() {
* class.
*
* @param string $group The name of the group to get the messages from
- * @access public
+ * @since v3.0.0
*/
public function get($group = null) {
- if ( empty($group) ) {
+ if ( !isset($group) ) {
$group = OSCOM::getSiteApplication();
}
@@ -176,11 +178,11 @@ public function get($group = null) {
* line character.
*
* @param string $group The name of the group to get the messages from
- * @access public
+ * @since v3.0.0
*/
public function getRaw($group = null) {
- if ( empty($group) ) {
+ if ( !isset($group) ) {
$group = OSCOM::getSiteApplication();
}
@@ -202,7 +204,7 @@ public function getRaw($group = null) {
/**
* Get the message stack array data set
*
- * @access public
+ * @since v3.0.0
*/
public function getAll() {
@@ -213,18 +215,18 @@ public function getAll() {
* Get the number of messages belonging to a group
*
* @param string $group The name of the group to check
- * @access public
+ * @since v3.0.0
*/
public function size($group = null) {
- if ( empty($group) ) {
+ if ( !isset($group) ) {
$group = OSCOM::getSiteApplication();
}
$size = 0;
if ( $this->exists($group) ) {
- $size = sizeof($this->_data[$group]);
+ $size = count($this->_data[$group]);
}
return $size;
View
8 osCommerce/OM/Core/Site/Admin/Application/Login/Action/Process.php
@@ -8,11 +8,11 @@
namespace osCommerce\OM\Core\Site\Admin\Application\Login\Action;
- use osCommerce\OM\Core\ApplicationAbstract;
- use osCommerce\OM\Core\Site\Admin\Application\Login\Login;
- use osCommerce\OM\Core\Registry;
use osCommerce\OM\Core\Access;
+ use osCommerce\OM\Core\ApplicationAbstract;
use osCommerce\OM\Core\OSCOM;
+ use osCommerce\OM\Core\Registry;
+ use osCommerce\OM\Core\Site\Admin\Application\Login\Login;
class Process {
public static function execute(ApplicationAbstract $application) {
@@ -20,6 +20,8 @@ public static function execute(ApplicationAbstract $application) {
'password' => $_POST['user_password']);
if ( Login::isValidCredentials($data) ) {
+ Registry::get('Session')->recreate();
+
$admin = Login::getAdmin($data['username']);
$_SESSION[OSCOM::getSite()]['id'] = (int)$admin['id'];
View
2 osCommerce/OM/Core/Site/Shop/Application/Products/Controller.php
@@ -55,7 +55,7 @@ protected function process() {
$OSCOM_Template->addPageTags('keywords', $OSCOM_Product->getTags());
}
- $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/Products/info.js'));
+ $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/products/info.js'));
// HPDL osC_Services_category_path::process($osC_Product->getCategoryID());
View
8 osCommerce/OM/Core/Site/Shop/Currencies.php
@@ -81,6 +81,14 @@ public function displayPrice($price, $tax_class_id, $quantity = 1, $currency_cod
public function displayPriceRaw($price, $tax_class_id, $quantity = 1, $currency_code = null, $currency_value = null) {
$OSCOM_Tax = Registry::get('Tax');
+ if ( !isset($currency_code) ) {
+ $currency_code = DEFAULT_CURRENCY;
+ }
+
+ if ( !isset($currency_value) ) {
+ $currency_value = $this->currencies[DEFAULT_CURRENCY]['value'];
+ }
+
$price = round($price, $this->currencies[DEFAULT_CURRENCY]['decimal_places']);
if ( (DISPLAY_PRICE_WITH_TAX == '1') && ($tax_class_id > 0) ) {
View
200 osCommerce/OM/Core/Site/Shop/NavigationHistory.php
@@ -11,17 +11,35 @@
use osCommerce\OM\Core\OSCOM;
use osCommerce\OM\Core\Registry;
+/**
+ * @since v3.0.0
+ */
+
class NavigationHistory {
+
+/**
+ * @since v3.0.0
+ */
+
protected $_data = array();
+
+/**
+ * @since v3.0.0
+ */
+
protected $_snapshot = array();
+/**
+ * @since v3.0.0
+ */
+
public function __construct($add_current_page = false) {
- if ( isset($_SESSION['osC_NavigationHistory_data']) && is_array($_SESSION['osC_NavigationHistory_data']) && !empty($_SESSION['osC_NavigationHistory_data']) ) {
- $this->_data =& $_SESSION['osC_NavigationHistory_data'];
+ if ( isset($_SESSION[OSCOM::getSite()]['NavigationHistory']['data']) && is_array($_SESSION[OSCOM::getSite()]['NavigationHistory']['data']) && !empty($_SESSION[OSCOM::getSite()]['NavigationHistory']['data']) ) {
+ $this->_data =& $_SESSION[OSCOM::getSite()]['NavigationHistory']['data'];
}
- if ( isset($_SESSION['osC_NavigationHistory_snapshot']) && is_array($_SESSION['osC_NavigationHistory_snapshot']) && !empty($_SESSION['osC_NavigationHistory_snapshot']) ) {
- $this->_snapshot =& $_SESSION['osC_NavigationHistory_snapshot'];
+ if ( isset($_SESSION[OSCOM::getSite()]['NavigationHistory']['snapshot']) && is_array($_SESSION[OSCOM::getSite()]['NavigationHistory']['snapshot']) && !empty($_SESSION[OSCOM::getSite()]['NavigationHistory']['snapshot']) ) {
+ $this->_snapshot =& $_SESSION[OSCOM::getSite()]['NavigationHistory']['snapshot'];
}
if ( $add_current_page === true ) {
@@ -29,94 +47,138 @@ public function __construct($add_current_page = false) {
}
}
+/**
+ * @since v3.0.0
+ */
+
public function addCurrentPage() {
- $set = 'true';
+ $action_counter = 0;
+ $application_key = null;
+ $action = array();
+
+ foreach ( $_GET as $key => $value ) {
+ if ( !isset($application_key) && ($key == OSCOM::getSiteApplication()) ) {
+ $application_key = $action_counter;
+
+ $action_counter++;
+
+ continue;
+ }
+
+ $action[] = array($key => $value);
+
+ if ( $this->siteApplicationActionExists(implode('\\', array_keys($action))) === false ) {
+ array_pop($action);
+
+ break;
+ }
+
+ $action_counter++;
+ }
+
+ $action_get = http_build_query($action);
for ( $i=0, $n=sizeof($this->_data); $i<$n; $i++ ) {
- if ( $this->_data[$i]['page'] == basename($_SERVER['SCRIPT_FILENAME']) ) {
+ if ( ($this->_data[$i]['application'] == OSCOM::getSiteApplication()) && ($this->_data[$i]['action'] == $action_get) ) {
array_splice($this->_data, $i);
- $set = 'true';
break;
}
}
- if ( $set == 'true' ) {
- $this->_data[] = array('page' => basename($_SERVER['SCRIPT_FILENAME']),
- 'mode' => OSCOM::getRequestType(),
- 'get' => $_GET,
- 'post' => $_POST);
+ $this->_data[] = array('application' => OSCOM::getSiteApplication(),
+ 'action' => $action_get,
+ 'mode' => OSCOM::getRequestType(),
+ 'get' => array_slice($_GET, $action_counter),
+ 'post' => $_POST);
- if ( !isset($_SESSION['osC_NavigationHistory_data']) ) {
- $_SESSION['osC_NavigationHistory_data'] = $this->_data;
- }
+ if ( !isset($_SESSION[OSCOM::getSite()]['NavigationHistory']['data']) ) {
+ $_SESSION[OSCOM::getSite()]['NavigationHistory']['data'] = $this->_data;
}
}
- function removeCurrentPage() {
- $last_entry_position = sizeof($this->_data) - 1;
+/**
+ * @since v3.0.0
+ */
- if ( $this->_data[$last_entry_position]['page'] == basename($_SERVER['SCRIPT_FILENAME']) ) {
- unset($this->_data[$last_entry_position]);
+ public function removeCurrentPage() {
+ array_pop($this->_data);
- if ( sizeof($this->_data) > 0 ) {
- if ( !isset($_SESSION['osC_NavigationHistory_data']) ) {
- $_SESSION['osC_NavigationHistory_data'] = $this->_data;
- }
- } else {
- $this->resetPath();
- }
+ if ( empty($this->_data) ) {
+ $this->resetPath();
}
}
- function hasPath($back = 1) {
+/**
+ * @since v3.0.0
+ */
+
+ public function hasPath($back = 1) {
if ( (is_numeric($back) === false) || (is_numeric($back) && ($back < 1)) ) {
$back = 1;
}
- return isset($this->_data[sizeof($this->_data) - $back]);
+ return isset($this->_data[count($this->_data) - $back]);
}
- function getPathURL($back = 1, $exclude = array()) {
+/**
+ * @since v3.0.0
+ */
+
+ public function getPathURL($back = 1, $exclude = array()) {
if ( (is_numeric($back) === false) || (is_numeric($back) && ($back < 1)) ) {
$back = 1;
}
- $back = sizeof($this->_data) - $back;
+ $back = count($this->_data) - $back;
- return OSCOM::getLink(null, null, $this->_parseParameters($this->_data[$back]['get'], $exclude), $this->_data[$back]['mode']);
+ return OSCOM::getLink(null, $this->_data[$back]['application'], $this->_data[$back]['action'] . '&' . $this->parseParameters($this->_data[$back]['get'], $exclude), $this->_data[$back]['mode']);
}
- function setSnapshot($page = '') {
- if ( is_array($page) ) {
- $this->_snapshot = array('page' => $page['page'],
+/**
+ * @since v3.0.0
+ */
+
+ public function setSnapshot($page = null) {
+ if ( isset($page) && is_array($page) ) {
+ $this->_snapshot = array('application' => $page['application'],
+ 'action' => $page['action'],
'mode' => $page['mode'],
'get' => $page['get'],
'post' => $page['post']);
} else {
- $this->_snapshot = array('page' => basename($_SERVER['SCRIPT_FILENAME']),
- 'mode' => OSCOM::getRequestType(),
- 'get' => $_GET,
- 'post' => $_POST);
+ $this->_snapshot = $this->_data[count($this->_data) - 1];
}
- if ( !isset($_SESSION['osC_NavigationHistory_snapshot']) ) {
- $_SESSION['osC_NavigationHistory_snapshot'] = $this->_snapshot;
+ if ( !isset($_SESSION[OSCOM::getSite()]['NavigationHistory']['snapshot']) ) {
+ $_SESSION[OSCOM::getSite()]['NavigationHistory']['snapshot'] = $this->_snapshot;
}
}
- function hasSnapshot() {
+/**
+ * @since v3.0.0
+ */
+
+ public function hasSnapshot() {
return !empty($this->_snapshot);
}
- function getSnapshot($key) {
+/**
+ * @since v3.0.0
+ */
+
+ public function getSnapshot($key) {
if ( isset($this->_snapshot[$key]) ) {
return $this->_snapshot[$key];
}
}
- function getSnapshotURL($auto_mode = false) {
+/**
+ * @since v3.0.0
+ */
+
+ public function getSnapshotURL($auto_mode = false) {
if ( $this->hasSnapshot() ) {
- $target = OSCOM::getLink(null, null, $this->_parseParameters($this->_snapshot['get']), ($auto_mode === true) ? 'AUTO' : $this->_snapshot['mode']);
+ $target = OSCOM::getLink(null, $this->_snapshot['application'], $this->_snapshot['action'] . '&' . $this->parseParameters($this->_snapshot['get']), ($auto_mode === true) ? 'AUTO' : $this->_snapshot['mode']);
} else {
$target = OSCOM::getLink(null, null, null, ($auto_mode === true) ? 'AUTO' : $this->_snapshot['mode']);
}
@@ -124,7 +186,11 @@ function getSnapshotURL($auto_mode = false) {
return $target;
}
- function redirectToSnapshot() {
+/**
+ * @since v3.0.0
+ */
+
+ public function redirectToSnapshot() {
$target = $this->getSnapshotURL(true);
$this->resetSnapshot();
@@ -132,28 +198,48 @@ function redirectToSnapshot() {
OSCOM::redirect($target);
}
- function resetPath() {
+/**
+ * @since v3.0.0
+ */
+
+ public function resetPath() {
$this->_data = array();
- if ( isset($_SESSION['osC_NavigationHistory_data']) ) {
- unset($_SESSION['osC_NavigationHistory_data']);
+ if ( isset($_SESSION[OSCOM::getSite()]['NavigationHistory']['data']) ) {
+ unset($_SESSION[OSCOM::getSite()]['NavigationHistory']['data']);
}
}
- function resetSnapshot() {
+/**
+ * @since v3.0.0
+ */
+
+ public function resetSnapshot() {
$this->_snapshot = array();
- if ( isset($_SESSION['osC_NavigationHistory_snapshot']) ) {
- unset($_SESSION['osC_NavigationHistory_snapshot']);
+ if ( isset($_SESSION[OSCOM::getSite()]['NavigationHistory']['snapshot']) ) {
+ unset($_SESSION[OSCOM::getSite()]['NavigationHistory']['snapshot']);
}
}
- function reset() {
+/**
+ * @since v3.0.0
+ */
+
+ public function reset() {
$this->resetPath();
$this->resetSnapshot();
+
+ if ( isset($_SESSION[OSCOM::getSite()]['NavigationHistory']) ) {
+ unset($_SESSION[OSCOM::getSite()]['NavigationHistory']);
+ }
}
- function _parseParameters($array, $additional_exclude = array()) {
+/**
+ * @since v3.0.1
+ */
+
+ protected function parseParameters($array, $additional_exclude = array()) {
$exclude = array('x', 'y', Registry::get('Session')->getName());
if ( is_array($additional_exclude) && !empty($additional_exclude) ) {
@@ -174,5 +260,13 @@ function _parseParameters($array, $additional_exclude = array()) {
return $string;
}
+
+/**
+ * @since v3.0.1
+ */
+
+ protected function siteApplicationActionExists($action) {
+ return class_exists('osCommerce\\OM\\Core\\Site\\Shop\\Application\\' . OSCOM::getSiteApplication() . '\\Action\\' . $action);
+ }
}
?>
View
33 osCommerce/OM/Core/Site/Shop/Product.php
@@ -26,24 +26,19 @@ public function __construct($id) {
$Qproduct->bindInt(':products_status', 1);
$Qproduct->execute();
- $result = $Qproduct->fetch();
+ if ( $Qproduct->fetch() !== false ) {
+ $this->_data = $Qproduct->toArray();
- if ( !empty($result) ) {
- $this->_data = $result;
+ $this->_data['master_id'] = $Qproduct->valueInt('id');
- $this->_data['master_id'] = $result['id'];
-
- if ( $result['parent_id'] > 0 ) {
+ if ( $Qproduct->valueInt('parent_id') > 0 ) {
$Qmaster = $OSCOM_PDO->prepare('select products_id, has_children from :table_products where products_id = :products_id and products_status = :products_status');
- $Qmaster->bindInt(':products_id', $result['parent_id']);
+ $Qmaster->bindInt(':products_id', $Qproduct->valueInt('parent_id'));
$Qmaster->bindInt(':products_status', 1);
$Qmaster->execute();
- $result = $Qmaster->fetch();
-
- if ( !empty($result) ) {
- $this->_data['master_id'] = $result['products_id'];
- $this->_data['has_children'] = $result['has_children'];
+ if ( $Qmaster->fetch() !== false ) {
+ $this->_data['master_id'] = $Qmaster->valueInt('products_id');
} else { // master product is disabled so invalidate the product variant
$this->_data = array();
}
@@ -65,12 +60,10 @@ public function __construct($id) {
$Qproduct->bindInt(':products_status', 1);
$Qproduct->execute();
- $result = $Qproduct->fetch();
-
- if ( !empty($result) ) {
- $this->_data = $result;
+ if ( $Qproduct->fetch() !== false ) {
+ $this->_data = $Qproduct->toArray();
- $this->_data['master_id'] = $result['id'];
+ $this->_data['master_id'] = $Qproduct->valueInt('id');
}
}
@@ -116,10 +109,10 @@ public function __construct($id) {
'weight_class_id' => $Qsubproducts->valueInt('products_weight_class'),
'availability_shipping' => 1);
- $Qvariants = $OSCOM_PDO->prepare('select pv.default_combo, pvg.id as group_id, pvg.title as group_title, pvg.module, pvv.id as value_id, pvv.title as value_title, pvv.sort_order as value_sort_order from :table_products_variants pv, :table_products_variants_groups pvg, :table_products_variants_values pvv where pv.products_id = :products_id and pv.products_variants_values_id = pvv.id and pvv.languages_id = :languages_id and pvv.products_variants_groups_id = pvg.id and pvg.languages_id = :languages_id order by pvg.sort_order, pvg.title');
+ $Qvariants = $OSCOM_PDO->prepare('select pv.default_combo, pvg.id as group_id, pvg.title as group_title, pvg.module, pvv.id as value_id, pvv.title as value_title, pvv.sort_order as value_sort_order from :table_products_variants pv, :table_products_variants_groups pvg, :table_products_variants_values pvv where pv.products_id = :products_id and pv.products_variants_values_id = pvv.id and pvv.languages_id = :languages_id_pvv and pvv.products_variants_groups_id = pvg.id and pvg.languages_id = :languages_id_pvg order by pvg.sort_order, pvg.title');
$Qvariants->bindInt(':products_id', $Qsubproducts->valueInt('products_id'));
- $Qvariants->bindInt(':languages_id', $OSCOM_Language->getID());
- $Qvariants->bindInt(':languages_id', $OSCOM_Language->getID());
+ $Qvariants->bindInt(':languages_id_pvv', $OSCOM_Language->getID());
+ $Qvariants->bindInt(':languages_id_pvg', $OSCOM_Language->getID());
$Qvariants->execute();
while ( $Qvariants->fetch() ) {
View
14 osCommerce/OM/Core/Site/Shop/ShoppingCart.php
@@ -192,10 +192,10 @@ public function synchronizeWithDatabase() {
$Qcheck->execute();
if ( $Qcheck->valueInt('products_status') === 1 ) {
- $Qvariant = $OSCOM_PDO->prepare('select pvg.id as group_id, pvg.title as group_title, pvg.module, pvv.id as value_id, pvv.title as value_title from :table_products_variants pv, :table_products_variants_values pvv, :table_products_variants_groups pvg where pv.products_id = :products_id and pv.products_variants_values_id = pvv.id and pvv.languages_id = :languages_id and pvv.products_variants_groups_id = pvg.id and pvg.languages_id = :languages_id');
+ $Qvariant = $OSCOM_PDO->prepare('select pvg.id as group_id, pvg.title as group_title, pvg.module, pvv.id as value_id, pvv.title as value_title from :table_products_variants pv, :table_products_variants_values pvv, :table_products_variants_groups pvg where pv.products_id = :products_id and pv.products_variants_values_id = pvv.id and pvv.languages_id = :languages_id_pvv and pvv.products_variants_groups_id = pvg.id and pvg.languages_id = :languages_id_pvg');
$Qvariant->bindInt(':products_id', $Qproducts->valueInt('products_id'));
- $Qvariant->bindInt(':languages_id', $OSCOM_Language->getID());
- $Qvariant->bindInt(':languages_id', $OSCOM_Language->getID());
+ $Qvariant->bindInt(':languages_id_pvv', $OSCOM_Language->getID());
+ $Qvariant->bindInt(':languages_id_pvg', $OSCOM_Language->getID());
$Qvariant->execute();
$variants = $Qvariant->fetchAll();
@@ -357,10 +357,10 @@ public function add($product_id, $quantity = null) {
}
if ( $OSCOM_Product->getData('parent_id') > 0 ) {
- $Qvariant = $OSCOM_PDO->prepare('select pvg.id as group_id, pvg.title as group_title, pvg.module, pvv.id as value_id, pvv.title as value_title from :table_products_variants pv, :table_products_variants_values pvv, :table_products_variants_groups pvg where pv.products_id = :products_id and pv.products_variants_values_id = pvv.id and pvv.languages_id = :languages_id and pvv.products_variants_groups_id = pvg.id and pvg.languages_id = :languages_id');
+ $Qvariant = $OSCOM_PDO->prepare('select pvg.id as group_id, pvg.title as group_title, pvg.module, pvv.id as value_id, pvv.title as value_title from :table_products_variants pv, :table_products_variants_values pvv, :table_products_variants_groups pvg where pv.products_id = :products_id and pv.products_variants_values_id = pvv.id and pvv.languages_id = :languages_id_pvv and pvv.products_variants_groups_id = pvg.id and pvg.languages_id = :languages_id_pvg');
$Qvariant->bindInt(':products_id', $product_id);
- $Qvariant->bindInt(':languages_id', $OSCOM_Language->getID());
- $Qvariant->bindInt(':languages_id', $OSCOM_Language->getID());
+ $Qvariant->bindInt(':languages_id_pvv', $OSCOM_Language->getID());
+ $Qvariant->bindInt(':languages_id_pvg', $OSCOM_Language->getID());
$Qvariant->execute();
while ( $Qvariant->fetch() ) {
@@ -416,7 +416,7 @@ public function getQuantity($item_id) {
public function exists($product_id) {
foreach ( $this->_contents as $product ) {
- if ( $product['id'] === $product_id ) {
+ if ( $product['id'] == $product_id ) {
if ( isset($product['variants']) ) {
foreach ( $product['variants'] as $variant ) {
if ( $variant['has_custom_value'] === true ) {

0 comments on commit 70bb24a

Please sign in to comment.
Something went wrong with that request. Please try again.