• Resolved kullar

    (@kullar)


    I have product with variations and one variation has wrong price. I have set that all products have 10% discount but in 1 variantion has wrong price(-88%) shown, but when I open product then price is shown correctly.

    
    $variations = $product->get_available_variations();
    
    foreach ($variations as $variation){
     $variation_id       = $variation['variation_id'];		
     $product_variation  = new WC_Product_Variation($variation_id);
     $price              = $product_variation->get_price();
    }
    
    • This topic was modified 4 years, 11 months ago by kullar.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Support ijas

    (@ijasacodez)

    Please make sure there is no sales / any other discounts active for the same. Also can you please share the screenshots of the variations and discount rules.

    Thread Starter kullar

    (@kullar)

    There are no other sales going on.

    https://photos.app.goo.gl/aLbdyubpuKPwmsiu5

    I’ve got the same problem.

    Plugin Support ijas

    (@ijasacodez)

    Can you please share a screenshot, we have checked the same on our local system couldn’t find any issues. Also if possible please share a screenshot of the plugin list so that we can check if there is any plugin conflicts.

    Plugin Support ijas

    (@ijasacodez)

    @kullar we can see that the detail page is showing the correct discount, seems like some conflict the theme or plugins. If you are using any plugin or theme for variation listing (shared url) please share the details of the same, so that we can test the same on our local server.

    Thread Starter kullar

    (@kullar)

    I have custom theme and I have tried several discount plugins before that(when I install back these plugins then settings are remembered – might there be an issue?), but it affects only this 1 variation. Other products are in the same loop. Product Id is correct, variation id is correct, but price is wrong.

    Plugins list: https://photos.app.goo.gl/ti1uK77ij4KX7cre7

    
    $product_variation  = new WC_Product_Variation($variation_id);
    

    This gives back price with wrong price(print_r(product_variation)) and also I have wrong price in products list(admin side).

    I is possible me to print_r some results and paste here?

    Plugin Support ijas

    (@ijasacodez)

    We can see that both cart and detail page shows the correct discount value. Also other products / category (Liitmikud etc) seems to be working fine. Can you please check if it getting the correct variation price on ‘woocommerce_get_price_html’ hook.

    Thread Starter kullar

    (@kullar)

    Hi!

    I updated code and added some print_r to code.

    https://testshop.telescope.ee/product-category/kanalisatsioon-tarvikud/valiskanalisatsioon/vk-torud/

    Variation_id:2342
    new WC_Product_Variation(2342)
    get_price_html():2.30 € 2.07 €
    get_price():2.07
    get_regular_price(‘edit’):17.50
    get_regular_price():2.07
    get_sale_price():

    https://photos.app.goo.gl/aLbdyubpuKPwmsiu5

    Thread Starter kullar

    (@kullar)

    Hi! Can I do something more to help you with this issue?

    Plugin Support ijas

    (@ijasacodez)

    If please can you s h a r e a backup zip or something. So that we can configure and check the same on our local server,

    Thread Starter kullar

    (@kullar)

    @ijasacodez Could you give me your email where I can send private link with theme and db backup?

    Thread Starter kullar

    (@kullar)

    Are there any updates?

    Plugin Support ijas

    (@ijasacodez)

    Our team is working on it, seems the cart calculations and all are working fine, just the custom percentage display is wrong. We will get back to you with the updates.

    Thread Starter kullar

    (@kullar)

    Do you have any timeplan when it would be fixed? We would like to launch shop beginning in march, but this plugin is major fallback.

    Thread Starter kullar

    (@kullar)

    Any updates?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘1 variation price is wrong’ is closed to new replies.