I've added the module - added the price table field to the product type in content types. I then create a product display, reference the correct SKU and enter price table information but see absolutely no sign of a formatted price table, just the original product price. If I add a display field for the price table then I get an error screen (attached) as soon as I add some values and the page breaks. Clearly I must be missing something major as others seem to have this working. Any chance of a bit more documentation as I just don't understand what I need to do to get this to play?

Only local images are allowed.

Comments

pcambra’s picture

Priority: Major » Normal
SpudEater’s picture

Ah - wonderful!. Many thanks. I was trying to configure Price Table in content types instead of product types.

The only think now is that the prices have tax added in the table automatically and I can't seem to turn it off. Changing the original tax setting on the price field makes no difference.

pcambra’s picture

Could you elaborate more on this tax behavior?

If you've got an inclusive VAT, it will probably be applied to the prices as there's no setting to mark it as included for the price table itself, it may be a good thing to add, but I'd need a step by step on how to reproduce this.

pcambra’s picture

Status: Active » Postponed (maintainer needs more info)
malbrecht’s picture

Hi,

I ran into the same problem, which is:
A "normal" product (without pricetable) can be configured to have its price given including or excluding VAT. Pricetable products do not have this choice, their prices are always "inclusive" the given tax rate (I guess this is where a choice is missing).
For my site I solved the problem by changing the rule that does the price calculation (to be more precise: The component that checks for the TAX rate). I have components for every TAX rate I am using that each only give a "true" or "false" as result, while the rule that calculates the actual TAX rate checks these components.
Now for pricetable products I just put a negated(!) check if "entity has field" looking for field "pricetable" in the product. This results in the component returning FALSE if the product checked has a pricetable, so, after all, calculations are correct again.

I know this is more than dirty, but, alas, Drupal Commerce IS DIRTY when it comes to taxes, VAT, invoices etc.

pcambra’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

I'm calling this a work as designed. Price table doesn't have normally to do with taxes or discounts calculation, it just replaces the price by the right one from the table and everything related with price calculation is executed afterwards if the weights are correctly set.

malbrecht’s picture

@pcambra: If this is "working as designed", then the design seems a bit flawed to me, since a "real" price would always be the product's price WITHOUT any tax added.
In pricetabled products the price is "including VAT", from wich your statement "everything related with price calculation is executed afterwards" is proven wrong, since the product's price should be without tax/vat etc, which is not possible with pricetables (again: Pricetables are fixed to prices INC tax/VAT).
VAT/TAX is something that is not product related, but law related and will CHANGE according to the destination the product is shipped to, while the product's price itself will always remain the same.

Again: Handling taxes is a real pain with Drupal Commerce in general, so I do not call this a bug in pricetables! But calling a serious problem (which this situation is) in a certain module "working as designed" does not seem very solution-oriented to me.

My suggestion for a solution works, but in fact it negates a (based on your words "wrong") tax-calculation within pricetables afterwards. This cannot be "clean", no matter if it works "as designed" :-)

pcambra’s picture

Both issue title and your last comments help little in solving any real problem, if you're referring to the select box that normally appears in commerce prices to mark if VAT is included or not, I suggest to add a issue specifically for this, any other general problem should be reported to Commerce issue queue itself

malbrecht’s picture

Sorry, pcambra, it seems you are taking this personally. My intention never was to say that you made a mistake.
So in order to calm you down I am trying to sum it up:

- this thread wasn't started by me, please don't mix up someone who has presented a solution to a problem with someone who has a problem entitled "don't get it". I am merely trying to help.

- I have presented a solution that works to get around a "designed" problem in pricetables, which, again, do calculate prices including tax settings, NOT without them as you claimed.

- I understand this is due to a problemous design of tax handling in drupal commerce in general, not due to a problem in your module

It would be nice to have a pricetables version that took care of the tax problem, but, again, I understand that this is not as simple as it seems.

Currently I am trying to solve another problem in pricetables, maybe, if you want to, we could try to figure this out in a constructive, productive way in a new thread? But, of course, if you conside me a dumb ass stupid idiot, I'll solve this by myself as well :-)

pcambra’s picture

It would be nice to have a pricetables version that took care of the tax problem, but, again, I understand that this is not as simple as it seems.

Please describe a way to reproduce, step by step this issue.

MrPaulDriver’s picture

It would be great to see a solution for this.

T.Mardi’s picture

malbrecht, could you provide more info on how you did this with your rule please?

Currently, I've edited the standard VAT rate rule of 20% by add a condition to check if entity has a price table field, negated this but the change doesn't happen on the price table.

Cheers.

T.Mardi’s picture

Issue summary: View changes

Add a picture