Do you have some feature in mind that you'd love to see in Couch? Let us know.
21 posts Page 1 of 3
Hello all,

As far as products go, the taxing happens after all discounts are applied - not talking about shipping.

Sometimes, taxes on the full value of certain discounted products need to be charged, and sometimes there are items that don't require taxes to be charged.

Is there any way to create an option for each product that is something along the lines of "full tax / tax-discount / no-tax" to be taken into consideration during the tax calculations?

I do realize this is a big ask. I can create the option box itself, but I wouldn't know how to manipulate the get_taxes() function.

AS ALWAYS yall really are amazing with COUCH. I am in awe at it's power!
Not possible out of the box, neighter with minimal edit of get_taxes(). Let me explain this a little further.

Requested modification should be configurable per product (as you said), while the current implementation now applies taxes via global config.php ($pp['tax_excludes_shipping'] = '1'; $pp['tax_percent'] = '10';).

Even if you modify config.php to have there something along the $pp['tax_excludes_discount'] = '1'; this line wouldn't work without modifying cart_ex.php and even so, would be global and not per-product.

Thus, the desired mod should work the same as coupons — have a dedicated editable field (selector as you suggested) and have that value appear in session (this might involve modifying cart.php itself).

It is a certain amount of work which would only be possible with a dedicated effort by KK or someone you trust to code it for you.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Donate to support my efforts to help the community https://boosty.to/trendo/donate
Thank you for that explanation, Anton, I greatly appreciate it!

What if the % of tax was chosen at the product level? We keep the set percentage in the config file, but what if there was an option at the product level to either take that option, or choose another value (which then the user could set to 0% if needed)?
At this moment the Tax is applied to the whole cart towards the subtotal after discount. This means that the tax function is not aware of any items per se and as such it reads the single numeric value — subtotal. It is definitely a rework of the Cart Module in essense to make a tax apply to a product before it is subtotaled with other items in cart.

I therefore presume it is easier to give customers a discount coupon at the amount of expected tax or apply discount coupon automatically. Do you think it would be easier and more transparent? If you know that tax is 10% on the cart, then it's an additional 10% discount for the item that needs the tax 'zeroed'. You can have that logic alleviated by adding more pp_* variables e.g. pp_notax which would be available for reading.

I agree that Cart Module is best to operate per product, but unfortunately right now it operates a cart as a whole. Custom coding of cart has never been easy, so I suggest you seek some help from KK, if possible.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Donate to support my efforts to help the community https://boosty.to/trendo/donate
Hello Anton,

Thank you so much for your explanation.

This means that the tax function is not aware of any items per se and as such it reads the single numeric value — subtotal


With that in mind, I wonder if there can be 2 subtotals per cart (for now forgetting about the full-price-range option and just focusing on these 2):

At the product level:
1) taxable item
2) non-taxable item

This option will chose which 'subtotal' the product price goes into.
-the normal one as is presently
OR
- a separate subtotal ignored by the tax function
Then, Grand Total adds/subtracts everything.

Does creating a 2nd subtotal, maybe pp_notax sound like a more streamlined solution?
I think get_taxes() has access to the full KCart object, where all items are stored.
So, a coder should go through all items in cart (aka lines), check the 'notax' flag and keep separate books. Then return the tax number only on subtotal of taxable line totals.

Does it sound like a plan to you?
Join COUCH:TALK channel here https://t.me/couchcms_chat
Donate to support my efforts to help the community https://boosty.to/trendo/donate
Does it sound like a plan to you?


I believe what you're describing is the solution! By "separate books" I assume that means 2 distinct 'subtotals':
the regualr (or taxable) subtotal, and,
the 'notax' subtotal.

Then get_tax would only calculate from the taxable subtotal. Grand Total takes all into account.
scratz wrote:
Does it sound like a plan to you?


I believe what you're describing is the solution! By "separate books" I assume that means 2 distinct 'subtotals':
the regualr (or taxable) subtotal, and,
the 'notax' subtotal.

Then get_tax would only calculate from the taxable subtotal. Grand Total takes all into account.


Yes. The calculations of a separate subtotal are to be done in PHP inside get_taxes() if my assumption is correct.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Donate to support my efforts to help the community https://boosty.to/trendo/donate
Hello All,

Has anyone been able to figure a way to create the separate taxable/non-taxable subtotals on the backend? Or even the 3rd subtotal of full-price taxable (where the tax comes on the price before coupon) ?
If you need to deliver this product asap, I recommend to make two instances of couch with the second one dedicated to 'tax-free' products, on a dedicated html page, borrowing designs. :) Obvious downside is a separate login for registered customers and separate payment process. Instances do not 'share' baskets or products and know nothing about each other.

Having a separate backend with different cart addon configuration would make things doable quickly without custom coding. However small or easy the addition you ask for, any custom coding demands attention which only people like @KK can spare nowadays.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Donate to support my efforts to help the community https://boosty.to/trendo/donate
21 posts Page 1 of 3
cron