• Resolved Dan

    (@dangoodman)


    Hi,

    By default, WooCommerce fills in line_subtotal, line_subtotal_tax, line_total, line_tax of order line entries in $package['contents']. That’s what other plugins expect, especially plugins handling order on per-item basis.

    This plugin leaves all the fields zero making other plugins relying on the data incompatible.

    Do you see any reason against adding code to calculate those fields as well?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WPClever

    (@wpclever)

    Hi @dangoodman

    In our plugin, we have 2 ways to calculate the price (fixed and auto). For each way, we will set the price for bundles or bundled products are zero but not both at the same time. That is why you see these fields are zero.

    If you have any technical question, please contact us via this page. Thanks!

    Thread Starter Dan

    (@dangoodman)

    Hi,

    I am not sure I understand your reply.

    Are you talking about those 4 fields I mentioned? If so, they are always zero for bundle products making such items looking free for other plugins.

    Also, is my question technical or not?

    Plugin Author WPClever

    (@wpclever)

    Hi @dangoodman

    When you using the fixed price for the bundle, the price for bundled products are zero (and of course, line_subtotal, line_subtotal_tax, line_total, line_tax of bundled products are zero). You can set the price and tax for the bundle here https://prnt.sc/oj6zof

    You can try to use auto calculate the price for the bundle and see the difference of line_subtotal, line_subtotal_tax, line_total, line_tax fields.

    The bundle is the name of all bundled products and if we calculate the price for both bundle and bundled products, the total was duplicated.

    Could you please explain more about the issue with other plugins?

    Thread Starter Dan

    (@dangoodman)

    Thank you for getting back to me.

    I have prepared a couple of screenshots which hopefully explain my point better. But let me sum up before.

    The aforementioned fields are always zero for a smart bundle product, no matter if its price is calculated automatically or not. Check the screenshots below.

    The plugin ‘hides’ simple items which are parts of a smart bundle. They don’t appear in the $package. So they can’t duplicate total price of an order. Again, please check the screenshots below.

    Screenshots

    Cart contents.
    Auto price: product settings, code.
    Manual price: product settings, code.

    Does that make sense?

    • This reply was modified 5 years, 8 months ago by Dan.
    • This reply was modified 5 years, 8 months ago by Dan.
    Plugin Author WPClever

    (@wpclever)

    Here are the tests on our site, we only activate WooCommerce and WPC Product Bundles.

    The code https://prnt.sc/ojrd6t
    The result for fixed price bundle https://prnt.sc/ojrdzt
    The result for auto price bundle https://prnt.sc/ojregp

    This is a technical question, so please contact us via this page. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘line_subtotal, line_subtotal_tax, line_total, line_tax’ is closed to new replies.