Sales Tax added and calculated to each product, not the total

Permalink Browser Info Environment
Hello there,

I have a request for a german eCommerce site.

Tax law requires that different tax rates are displayed correctly on the invoice. We have two different tax rates there, that apply to all regions: 19% on any products, 7% on books.

So if a online store sells as well books as other products, the invoice must contain both tax rates separately.

So for example the invoice contains 2 books for 10€ (7% tax) and another product for 20€ (19% tax), the invoice must contain:


Product 1: Book, 10€, including 7% tax: 0.66€
Product 2: Book, 10€, including 7% tax: 0.66€
Product 3: OtherProduct, 20€, including 19% tax: 3.20€

Total of 7% tax: 1.32€
Total of 19% tax: 3.20€

Total: 40€

Thats a requirement for correct billing documentation.

I have created two product sets for which the two tax types apply and when only products of one specific set are added to the cart, it works out well.

Once there are both types in the cart, it mixes up and uses only the 19% tax for all products. I have found the "other_tax" attribute but it does not apply to only the 7%-specific products but is calculated for the whole cart - which fakes the tax amount in the end.

So - am I missing something there or does this require coding?

It is much much preferred to get this all done within concerete5, as user management, discounts and group-products are much used in the shop.

thank you a lot!

Type: Discussion
Status: In Progress
Cahueya
View Replies:
Korvin replied on at Permalink Reply
Korvin
Looking at the code, we support up to two different taxes applied to one order. I was able to add another tax spot by overridding CoreCommerceSalesTaxRate::setupEnabledRate and duplicating the code at the bottom for populating "other_tax". A developer should be able to easily add as many as you need.

Best wishes,
Korvin

concrete5 Environment Information

# concrete5 Version
5.6.3.3

# concrete5 Packages
Address Vcard (1.0), Bitcoin eCommerce Payment Provider (0.9.3), Calendar Nav (1.0.8), Concrete Bricks Game (1.1.1), Concrete Paving Game (1.1.1), Currency Converter (1.1), Designer Content (3.1.1), Dynamic Iframe (1.61), Easy Tables (2.0.1), eCommerce (2.8.16), eCommerce - Special Instructions (0.9.8.3), eCommerce Gateway: Sofortueberweisung (0.9.4), Ecommerce Reports (0.9.22), eLearning Quiz (2.1), Expand / Collapse (1.2.6), Fancybox links (1.0), Flowplayer Free (1.2.1), Formidable (2.1.1), Formigo Cookies Disclosure (1.0), Google Plus One (1.0), Html5 Video (1.0.3), Iframe (1.0), JeRo Bank Transfer (0.9.5), Lat/Long Updater (0.9.1), Lerteco Membership (2.2.2.1), Like Button (1.0), List files from set (1.0.2), Logging Error Pages (1.1), Login (1.1.1), Login Redirect (1.3), Long Story Short (1.0.3), Magic Data (2.10.2), Magic Data Symbols1 (2.7.9), Magic Data Templates1 (2.2), Mailing List (2.54), Major Marketing (2.0.4.5), MindNet Optimize MySQL database (1.11), Miser OptiMIZER (1.1.0), Next & Previous (1.02), NM-Webinar (1.9), Page Auto Redirect (2.0), Page password (1.1.4), Page Properties (1.0.1), Page Redirect (1.4), Page Selector Attribute (1.1), Paypal Cart System Pro (1.0), Paypal Donations Box (1.0.1), Paypal Website Payment Pro Gateway (2.1), PC5 Custom Templates (3.0), PHP block by ND (1.0), Picturefill Image (1.1), Piwik Iframe (0.9.6), Popup Login (1.0.5), Register User Pro (1.3.16), Registrant Group (1.1), Search Block Templates (1.0), SEO Analyzer (1.2), Sisimizi's Download Folder (1.0), Social Icons Reloaded (1.3), Social Share Privacy (1.2.2), Sorcerer's Map (1.3), SQL Info (1.1), The Void theme (1.0), tnSpacer (1.2), VideoJS Player (1.0.2), Who's Online (2.2), Zoom Image Dual (1.1).

# concrete5 Overrides
blocks/formidable, blocks/product, blocks/form, blocks/autonav, blocks/page_list, blocks/product_list, blocks/rss_displayer, blocks/content, blocks/jb_register, blocks/next_previous, blocks/tony_mailinglist, elements/orders, elements/registry_item_list.php, elements/share_social.php, elements/product, elements/cart_item_list.php, elements/wishlist_sidebar.php, elements/checkout, elements/wishlist_item_list.php, elements/shipping, elements/discount, elements/payment, elements/dashboard, elements/sales, elements/header_required.php, elements/attribute, helpers/form, helpers/miser.php, helpers/miser_support, js/ccm.core.commerce.cart.js, css/onepagecheckout.css, css/ccm.core.commerce.checkout.css, css/style.css, css/ccm.core.commerce.order-print.css, css/ccm.core.commerce.singlepage.checkout.css, css/tabs.css, css/ccm.core.commerce.cart.css, languages/de_DE, libraries/_view.php, mail/order.php, mail/receipt.php, models/attribute, single_pages/register.php, single_pages/checkout, single_pages/login.php, single_pages/dashboard, single_pages/finish.php, single_pages/complete_order.php, single_pages/page_not_found.php, single_pages/page_forbidden.php, single_pages/cart.php, themes/major_marketing, tools/order_print_multiple.php

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - On - If blocks on the particular page allow it.
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
apache2handler

# PHP Version
5.3.3

# PHP Extensions
apache2handler, apc, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, ionCube Loader, json, libxml, mbstring, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, Reflection, session, shmop, SimpleXML, sockets, SPL, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, zlib.

# PHP Settings
max_execution_time - 60
apc.max_file_size - 2M
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 2000
memory_limit - 1024M
post_max_size - 32M
safe_mode - Off
safe_mode_exec_dir - <i>no value</i>
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
upload_max_filesize - 128M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 100000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.