http://drupal.org/cvs?commit=411924 shows that uc_price() was removed a while ago in the Drupal 7 branch, but what was the reasoning behind this? I can't find any discussion about this either here or at ubercart.org. How do you intend to allow European users to show tax inclusive prices in D7?

Comments

Island Usurper’s picture

Category: bug » support
Status: Active » Needs review

Taxes now have an option to be added to product prices before they are displayed. This carries over all the way to the checkout page where the taxes are separated into their own line items. I understand that this still won't work for some shops because even listing those prices without VAT included is incorrect, even when the value of VAT is listed. However, I think that can be worked around, though it may mean that no customers would be exempt from VAT. I haven't completely thought that through yet.

uc_price() is gone because it wasn't performant, made development harder, and prone to confusion when more than 0 modules wanted to implement it. Half the time it was called, the context argument prevented anything useful from happening anyway. I think we can do better with the tools Drupal already provides for us.

xibun’s picture

subscribing

horuskol’s picture

Is there any documentation on how to include GST/VAT into prices? How about configuring where and when it applies (some people are exempt - overseas orders sometimes are exempt for certain values of orders - etc)?

Island Usurper’s picture

Not any documentation as such, yet, but the tax edit form should be self-explanatory (in my opinion, though I'm usually wrong about that). The tax edit form also includes the Rules conditions form that is associated with that tax, so you can specify who in particular is exempt from that tax.

particlegirl’s picture

subscribe

particlegirl’s picture

For anyone who is wondering, it is not to hard to set this up in the 7x3x ubercart. Rules is incorporated into the new tax edit form and from there you just need to add the tax rate, save it and then select conditions to see if the delivery address is Australia.
eg:
Data comparison
Parameter: Data to compare: [order:delivery-address..., Data value: Australia

longwave’s picture

Status: Needs review » Fixed
peter_of_stirling’s picture

Tried this and killed Drupal.
Re-installed 7x3 and problem persisted.
Please be more specific or provide amended modules

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

designcrs’s picture

subscribing

CodeInject’s picture

tahiticlic’s picture

If this is fixed, can someone explain how we can show price inclusive of tax in product page or on options prices?

wodenx’s picture

On the tax edit page there is a checkbox labelled "Include this tax when displaying product prices." Checking that should take care of the product page. Tax-inclusive option prices will be supported once #1301430: Inclusive tax implementation is not flexible (attribute options) is completed. Please test that patch if you can.

mgifford’s picture

Where is the documentation to deal with upgrading modules that relied on uc_price()?

wodenx’s picture

uc_price has essentially been replaced by hook_uc_product_alter() -- please see uc_product.api.php for documentation.

mgifford’s picture

Ok, so best place to go for that is hook_uc_product_alter()

Hard to see how to easily transition from uc_price() mind you.

wodenx’s picture

What is it exactly you want to do? There are no more price alterers in UC3. If you want to alter the price of a product you do it:

(a) in hook_node_load() (or hook_entity_load()) - if the alteration always affects that product,
(b) in hook_uc_product_alter() - if it depends on information added to the product's data array (e.g. attributes),
(c) in hook_node_view() (or hook_entity_view() or hook_entity_view_alter()) - if it's purely display related (e.g. inclusive VAT).

If you want to get the modified price of a product before display you'd call uc_product_get_variant() (see uc_product.module for doc). If you want to get the price of a product as altered for display (e.g. with included VAT), you'd call entity_view and look at the '#value' of the 'display_price' field.

mgifford’s picture

This is useful, thanks.

LEKSHMY’s picture

Title: How can we support VAT in Ubercart 7.x-3.x now uc_price() has been removed? » Is there any module or patches avail for getting sales tax for different states in USA??
Status: Closed (fixed) » Active

Hi, Im working on a US project and my customer needs to add sales tax seperately for each stated in US.The sales tax varies in the various states in US ..I aded the taxes for states using the "Add a tax rate" link in the STORE/TAX and selected the country as USA from my dropdown list box.Bt the problem is that all the taxes are getting added up to the total amount!!
Pls help me!!!Thanks in advance!!

TR’s picture

Title: Is there any module or patches avail for getting sales tax for different states in USA?? » How can we support VAT in Ubercart 7.x-3.x now uc_price() has been removed?
Status: Active » Closed (fixed)

Please do NOT hijack existing issues.

Your question has nothing to do with this thread.

If you have a new question, open a new issue. But please read the documentation first. Setting up multiple tax rates has been documented and is discussed many times in the forums on ubercart.org.