Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit c977cad4811ba7881fe5e450562b28d5b79df5ff 2 parents f3c56fe + ea73825
@dannyhenderson dannyhenderson authored
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
12 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() ) {

0 comments on commit c977cad

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