Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install cartridge-tax

How to install cartridge-tax

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install cartridge-tax
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
0.0.3 Available View build log
0.0.2 Available View build log
0.0.1b Available View build log
Linux (64-bit)
0.0.3 Available View build log
0.0.2 Available View build log
0.0.1b Available View build log
 
License
LICENSE.txt
Lastest release
version 0.0.3 on Nov 28th, 2012

#cartridge_tax

An implementation of sales tax for [Cartridge](http://cartridge.jupo.org/).

A flat sales or value-added tax can be applied to in-state or all sales. Tax can optionally be applied to shipping costs.

For US-based sites, [TaxCloud.net](http://taxcloud.net/)'s tax lookup web service is optional.

## DISCLAIMER

This should work out-of-the-box for simple cases. However, your particular implementation of Cartridge may require rewriting this or merging components into or out of other projects.

## Installation

Working in your project's [virtualenv](http://www.virtualenv.org/en/latest/index.html): ` pip install cartridge-tax ` or ` git clone https://github.com/kenbolton/cartridge-tax.git cd cartridge-tax python setup.py install `

Add 'cartridge_tax' to your settings.INSTALLED_APPS before 'cartridge.shop'.

Set up your tax information in the admin configuration settings, /admin/conf/setting/. Note the value you put in 'Shop State'. You will need to inject a "choices" dict into cartridge.shop.forms.OrderForm['fields']['shipping_detail_state']. The values in that dict should match the style in 'Shop State'. See the example below in Custom OrderForm.

### Billing/Shipping and Order Handlers

Add the following to your settings: ``` SHOP_HANDLER_BILLING_SHIPPING =

System Message: WARNING/2 (<string>, line 39); backlink

Inline literal start-string without end-string.

System Message: ERROR/3 (<string>, line 42)

Unexpected indentation.
"cartridge_tax.checkout.tax_billship_handler"

SHOP_HANDLER_ORDER = "cartridge_tax.checkout.tax_order_handler" ```

System Message: WARNING/2 (<string>, line 44); backlink

Inline literal start-string without end-string.

System Message: WARNING/2 (<string>, line 44); backlink

Inline interpreted text or phrase reference start-string without end-string.

### Extra model fields

Below is an example of settings.EXTRA_MODEL_FIELDS. Be sure to add these tuples to your own EXTRA_MODEL_FIELDS.

``` EXTRA_MODEL_FIELDS = (

System Message: WARNING/2 (<string>, line 52); backlink

Inline literal start-string without end-string.

System Message: ERROR/3 (<string>, line 54)

Unexpected indentation.
(
"cartridge.shop.models.Product.tic", "CharField", (u"Taxability Information Code",), {"max_length":"5", "blank": True, "default":"00000", }, ),

System Message: WARNING/2 (<string>, line 60)

Definition list ends without a blank line; unexpected unindent.
(

"cartridge.shop.models.Order.tax_total", "DecimalField", (u"Tax Total",), {"null": True, "blank": True, "max_digits": 10,

System Message: ERROR/3 (<string>, line 65)

Unexpected indentation.
"decimal_places": 2},

System Message: WARNING/2 (<string>, line 66)

Block quote ends without a blank line; unexpected unindent.

),

System Message: WARNING/2 (<string>, line 67)

Definition list ends without a blank line; unexpected unindent.
(
"cartridge.shop.models.Order.tax_type", "CharField", (u"Tax Type",), {"blank": True, "max_length": "20", "default":"Flat sales tax"}, ),

System Message: WARNING/2 (<string>, line 73)

Block quote ends without a blank line; unexpected unindent.

)

### Custom OrderForm

An example for the US is at cartridge_tax.forms.USOrderForm. This implementation uses the two-letter state abbreviation, so put e.g. NY as the value of TAX_SHOP_STATE in /admin/conf/settings/. Add to your settings.py: SHOP_CHECKOUT_FORM_CLASS = 'cartridge_tax.forms.USOrderForm'

USOrderForm can be used as an example for developing OrderForm subclasses for other tax jurisdictions.

## Registered Settings

  • TAX_SHOP_ADDRESS
  • TAX_SHOP_ADDRESS2
  • TAX_SHOP_CITY
  • TAX_SHOP_STATE
  • TAX_SHOP_POSTCODE
  • TAX_SHOP_POSTCODE_PLUS4
  • TAX_OUT_OF_STATE
  • TAX_FLAT_RATE
  • TAX_SHIPPING_ADDRESS
  • TAX_SHIPPING
  • TAX_USE_TAXCLOUD
  • TAX_USE_TAXCLOUD_AUTHORIZATION
  • TAX_TAXCLOUD_API_ID
  • TAX_TAXCLOUD_API_KEY

Subscribe to package updates

Last updated Nov 28th, 2012

Download Stats

Last month:7

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.