Skip to content

Instantly share code, notes, and snippets.

@cosmomill
Created July 17, 2014 17:46
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 cosmomill/55396584a383618fbe4e to your computer and use it in GitHub Desktop.
Save cosmomill/55396584a383618fbe4e to your computer and use it in GitHub Desktop.
Shopware 4.2.3 - Fix incorrect tax calculation if tax rules are used.
--- sArticles.php.orig 2014-07-17 19:30:46.000000000 +0200
+++ sArticles.php 2014-07-17 19:35:31.000000000 +0200
@@ -3345,6 +3345,9 @@
$getArticle["sDescriptionKeywords"] = htmlspecialchars(implode(", ", array_slice(array_keys($words), 0, 20)), ENT_QUOTES, 'UTF-8', false);
}
+ // Support tax rate defined by certain conditions
+ $getTaxByConditions = $this->getTaxRateByConditions($getArticle["taxID"]);
+ if ($getTaxByConditions === false) $getArticle["tax"] = (float) $getArticle["tax"]; else $getArticle["tax"] = (float) $getTaxByConditions;
// Deactivate bundle displaying
$getArticle['crossbundlelook'] = false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment