• Hi again
    I’m still testing you free version before adopting the pro one, but I’m now stuck because I’m experiencing an issue when using product custom input fields. I’m using another plugin to add to cart (and to order) some product input data that a customer must fill in product page [ = Extra Product Options (Product Addons) for WooCommerce ], but i presume the issue is not dependent on that secondary plugin (it simply adds in a fast way some custom input fields I could anyway add in “coding way”).

    I try to explain the problem.

    I have a product having some price x quantity settings (50-> 99, 100->199 and so on) and some text input custom fields the user MUST fill to provide us important product related additional info.
    In this situation, the customer can add several times the same product to the cart if he fills the custom fields with different custom fields content. This is ok: same products with different custom fields have to be treated as different cart item and processed separately.

    But here I have an issue with quantity price calculation in cart, as hereafter detailed.

    Let’s say we have a product X having 1 custom field and 2 price ranges, 20€ for qty 0 -> 100 and 10€ for qty 101 -> 200.
    The first time I add to the cart 150 pcs of that product, setting it’s custom field to a value ‘A’: the cart correctly displays “Product X – custom field A – 150pcs – 1500€ (=150 x 10€)”
    Now I add again the same product to the cart: this time the qty is 20 pcs but the custom field contains a different value ‘B’. The cart correctly displays this second separated item instance as “Product X – custom field B – 20pcs – 400€ (=20 x 20€)” BUT ALSO CHANGES THE PRICE FOR THE FIRST ITEM INSTANCE PREVIOULSY ADDED from the above correct one ( = “Product X – custom field A – 150pcs – 1500€ (=150 x 10€)”) to “Product X – custom field A – 150pcs – 3000€ (=150 x 20€)”

    Practically when I add a further instance of the same product but having a different custom field, the cart always uses the price detected for the quantity I have set for the last inserted instance recalculating the whole list of the same product instances in the cart (cart items having the same SKU but different custom fields), regardless the quantity each instance really has: in the above case, it uses the 20€ price also for the other item instance having 150 pcs in the cart (instead of the correct 10 € value)

    Resuming:
    I add twice the same product, but using different custom field values: in that way I get two separate items in cart, having the same sku but different custom field values.

    In this situation should have these prices in the cart:
    1 instance ->> “Product X – custom field A – 150pcs – 1500€ (=150 x 10€)
    2 instance ->> “Product X – custom field B – 20pcs – 400€ (=20 x 20€)

    BUT right now I have these ones:
    1 instance ->> “Product X – custom field A – 150pcs – 3000€ (=150 x 20€)
    2 instance ->> “Product X – custom field B – 20pcs – 400€ (=20 x 20€)

    As you can see, your plugin uses the last detected price, matched between qty (20pcs) and price (20€) derived from the last instance, to recalculate all previously inserted instances, also when the price should be different

    The question now is: is there a way to avoid this, and get the current calculation when using product custom fields??? I understand this is NOT a WC standard, but many time a custom field is used in product enchantment, so it could be interesting to sove that issue.
    I’m sorry, but I have not a live site to show you that live……. I hope you can understand my long explaining and help me addressing to a possible solution.
    Waiting for you kindly reply

    • This topic was modified 4 years, 8 months ago by MMC Edizioni.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Hermann LAHAMI

    (@mano88)

    Hello,
    I understand the issue but i’m afraid that currently fixing it will require that we take a day or two to understand the pricing code of the extra options plugin before trying to adjust ours. I cannot promise that this will be handled quickly but I can add it to the todo list. Currently we’re working on implementing some popular requests so once we handle them, we’ll get to this issue.

    Thread Starter MMC Edizioni

    (@mmcedizioni)

    Just for your information, I have further checked this issue adding product custom input fields by php snippets (and not by external plugin), and the result is exactly the same: so I think the issue is not strictly related to the other plugin, but to the way you calculate the price to be applied in cart (probably you don’t make distinct counts “per cart item” when multiple instances of the same product are in the cart). This is NOT dependent on external plugin. You can check that simply adding one custom input field to the product by using a php snippet, then adding twice the same product the cart only changing the custom input text field content: in that way you’ll be able to add two separate instances of the same product to the cart, and see the issue.
    In the meantime I’ll abandon your plugin and use variable products. May be I’ll recheck it later, but I can’t use it while the issue is still present.
    Thank you anyway. Regards

    • This reply was modified 4 years, 8 months ago by MMC Edizioni.
    • This reply was modified 4 years, 8 months ago by MMC Edizioni.
    Plugin Author Hermann LAHAMI

    (@mano88)

    Ok thank you

    Thread Starter MMC Edizioni

    (@mmcedizioni)

    ..any news about when this will be fixed?
    regards

    Plugin Author Hermann LAHAMI

    (@mano88)

    It’s on our todo list. WooCommerce considers the different instances as different products in the cart and that’s why our plugin is confused. I cannot say when but I can promise you that it will be taken care of.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Wrong calculation when using custom product fields’ is closed to new replies.