Skip to content

Commit

Permalink
Products were not translated in cart and other collections (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Nov 14, 2012
1 parent 5bc9ce0 commit 7715ab7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions system/modules/isotope/CHANGELOG-1.3.md
Expand Up @@ -8,6 +8,7 @@ Version 1.3.10 stable (2012-??-??)
- Filter limits were not applied in pagination (#56)
- Spelling mistakes in german language files (#62)
- Exception if a product without price is added to the cart
- Products were not translated in cart and other collections (#55)


Version 1.3.9 stable (2012-11-05)
Expand Down
20 changes: 12 additions & 8 deletions system/modules/isotope/IsotopeProductCollection.php
Expand Up @@ -31,7 +31,7 @@

/**
* Class IsotopeProductCollection
*
*
* Provide methods to handle Isotope product collections.
* @copyright Isotope eCommerce Workgroup 2009-2012
* @author Andreas Schempp <andreas@schempp.ch>
Expand Down Expand Up @@ -211,7 +211,7 @@ public function __get($strKey)

$this->arrCache[$strKey] = $fltTotal;
break;

case 'taxFreeSubTotal':
$fltTotal = 0;
$arrProducts = $this->getProducts();
Expand Down Expand Up @@ -471,7 +471,11 @@ public function getProducts($strTemplate='', $blnNoCache=false)

while ($objItems->next())
{
$objProductData = $this->Database->execute("SELECT *, (SELECT class FROM tl_iso_producttypes WHERE tl_iso_products.type=tl_iso_producttypes.id) AS product_class FROM tl_iso_products WHERE id={$objItems->product_id}");
$objProductData = $this->Database->prepare(IsotopeProduct::getSelectStatement() . "
WHERE p1.language='' AND p1.id=?")
->limit(1)
->execute($objItems->product_id);

$strClass = $GLOBALS['ISO_PRODUCT'][$objProductData->product_class]['class'];

if ($objProductData->numRows && $strClass != '')
Expand Down Expand Up @@ -518,7 +522,7 @@ public function getProducts($strTemplate='', $blnNoCache=false)
{
$this->import('Isotope');
$objTemplate = new IsotopeTemplate($strTemplate);

$objTemplate->products = $this->arrProducts;
$objTemplate->surcharges = IsotopeFrontend::formatSurcharges($this->getSurcharges());
$objTemplate->subTotalLabel = $GLOBALS['TL_LANG']['MSC']['subTotalLabel'];
Expand Down Expand Up @@ -762,7 +766,7 @@ public function transferFromCollection(IsotopeProductCollection $objCollection,
{
$this->modified = true;
}

// HOOK for adding additional functionality when adding product to collection
if (isset($GLOBALS['ISO_HOOKS']['transferredCollection']) && is_array($GLOBALS['ISO_HOOKS']['transferredCollection']))
{
Expand Down Expand Up @@ -833,7 +837,7 @@ public function generate($strTemplate=null, $blnResetConfig=true)

if ($this->Isotope->Config->invoiceLogo != '' && is_file(TL_ROOT . '/' . $this->Isotope->Config->invoiceLogo))
{

$objTemplate->logoImage = '<img src="' . $this->Environment->base . '/' . $this->Isotope->Config->invoiceLogo . '" alt="" />';
}

Expand All @@ -855,8 +859,8 @@ public function generate($strTemplate=null, $blnResetConfig=true)
'tax_id' => $objProduct->tax_id,
);
}
$objTemplate->config = $this->Isotope->Config->getData();

$objTemplate->config = $this->Isotope->Config->getData();
$objTemplate->info = deserialize($this->checkout_info);
$objTemplate->items = $arrItems;
$objTemplate->raw = $this->arrData;
Expand Down

0 comments on commit 7715ab7

Please sign in to comment.