WordPress.org

Forums

WooCommerce - excelling eCommerce
Price box & price in dashboard disappears after editing a product (16 posts)

  1. JenniferEklund
    Member
    Posted 1 year ago #

    After update to 2.1.4:

    If I edit the price on a product the pricing disappears altogether.

    #1 - Price box doesn't show up on the product page

    #2 - Price field is blank in the product dashboard

    https://www.pianopronto.com/shop/radetzky-march-sheet/

    This is not happening on products that have been left alone like this one:

    https://www.pianopronto.com/shop/home-run/

    https://wordpress.org/plugins/woocommerce/

  2. JenniferEklund
    Member
    Posted 1 year ago #

    Just to add: when creating a new product the pricing box is also absent:

    https://www.pianopronto.com/shop/test-product/

  3. CharlyIBC
    Member
    Posted 1 year ago #

    I can see on the example w/o price showing that the div class for single variation is empty. This is the div that puts in the code for prices on your site.

    Have you put in an special .css or function/action related to prices on your site?

  4. JenniferEklund
    Member
    Posted 1 year ago #

    Yes I did actually!

    After the new WooCommerce was rolled out it was by default showing a "price range" so the developers suggested adding the following to the functions.php file so that on variable products the lowest price shows (i.e. "from $2.88" instead of $2.88-9.88) Here's what I added in my child theme:

    // Use WC 2.0 variable price format, now include sale price strikeout
    add_filter( 'woocommerce_variable_sale_price_html', 'wc_wc20_variation_price_format', 10, 2 );
    add_filter( 'woocommerce_variable_price_html', 'wc_wc20_variation_price_format', 10, 2 );
    function wc_wc20_variation_price_format( $price, $product ) {
    // Main Price
    $prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) );
    $price = $prices[0] !== $prices[1] ? sprintf( __( 'From: %1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
    // Sale Price
    $prices = array( $product->get_variation_regular_price( 'min', true ), $product->get_variation_regular_price( 'max', true ) );
    sort( $prices );
    $saleprice = $prices[0] !== $prices[1] ? sprintf( __( 'From: %1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
    
    if ( $price !== $saleprice ) {
    $price = '<del>' . $saleprice . '</del> <ins>' . $price . '</ins>';
    }
    return $price;
    }
    ?>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

  5. JenniferEklund
    Member
    Posted 1 year ago #

    And sure enough - the price box disappearing is only happening on "variable" products, not "simple" products.

    So any idea how to fix this?

  6. CharlyIBC
    Member
    Posted 1 year ago #

    Let me preface by saying I'm not a coder by any means. But what I do know is I had one function stopped working after updating to 2.1.2 and the reason was they changed woocommerce to wc in that particular function. So I'd look for the function code to see what they changed, if anything, and fix code with what you find. Or you might have a look here:

    http://develop.woothemes.com/woocommerce/2014/02/solving-common-issues-after-updating-to-woocommerce-2-1/

    Hope you get things worked out.

  7. JenniferEklund
    Member
    Posted 1 year ago #

    Well that link you gave is where I got that functions.php code from to revert to the old style of pricing.

    Weird this is it didn't effect all of my products (i.e. the price box didn't disappear on all my variable products) it's only disappearing if I:

    1 - try to add a new variable product

    or

    2 - edit the price of an existing variable product

  8. CharlyIBC
    Member
    Posted 1 year ago #

    Personally I think it was a bad idea to not give the option for users to use old or new variation in price. That said, I wish I was better at code to help you out.

    But I will say that I find it strange why that much code is needed. If this was my issue, I'd set my Coming Soon plugin saying I was doing maintenance so no one would see if I took my site to white screen or not and I'd remove that code; cut/paste somewhere safe. Then I'd play with .css and/or function/action to get what I wanted. Of course within my custom .css and theme functions, as I don't use a child.

    Although I hope someone else can help you out. Good luck!

  9. JenniferEklund
    Member
    Posted 1 year ago #

    Even removing this code (I tried that on my staging site) the issue still occurs. :-(

  10. WebshopTrombach
    Member
    Posted 1 year ago #

    after update 2.1.3 and 2.1.4: my website is in 4 languages. When I login on the Dutch page (my account), the welcome-text is in English, but the text beneath about my orders and addresses is in Dutch. I edited the Dutch .po file, but there are no changes to be seen.

    #: templates/myaccount/my-account.php:24
    msgid "From your account dashboard you can view your recent orders, manage your "
    "shipping and billing addresses and <a href=\"%s\">edit your password and "
    "account details</a>."
    msgstr ”Vanaf uw account dashboard kunt u uw recente bestellingen bekijken, uw "
    ”verzend- en factuuradressen regelen en <a href=\"%s\">uw wachtwoord en "
    "accountdetails</a> wijzigen.”

    I deleted all caches via a plugin, the browser and flush cache without any result. Furthermore, when I'm not logged in and I click on the link 'lost password' on the French and German 'my account'-pages, the 'lost password'-page is redirected to the Dutch page instead of the French or German. This is, I suppose, because some pages in the menu are deleted in the wc-update.
    Can, please!, anyone help me?

  11. WebshopTrombach
    Member
    Posted 1 year ago #

    sorry, the wrong post ...

  12. CharlyIBC
    Member
    Posted 1 year ago #

    Jennifer - Have you tried another theme, like Twenty Fourteen to see if you can save a product with price? If that works then you know it's your theme causing the issue. Have you tried deactivating plugins to see if one of them is the cause?

    If you still cannot find what is causing the issue after the above, I'd suggest contacting the Ninja's by submitting a ticket.

  13. JenniferEklund
    Member
    Posted 1 year ago #

    Yes, I've done all of that. Switched themes, disabled all plugins and the problem still remains.

    When you add a variable product the price doesn't show up. I've submitted a ticket with Woo - just waiting.... This is obviously a pretty big problem since customers like to see the purchase price of different options before adding items to the cart.

  14. JenniferEklund
    Member
    Posted 1 year ago #

    Just heard from WOO. They are releasing an update soon - there is a bug in the plugin that is effecting variable pricing.

  15. Rachelleigh472
    Member
    Posted 1 year ago #

    I'm having the same problem. Let me know if you have any luck.

  16. alemarengo84
    Member
    Posted 10 months ago #

    Hi guys!
    I'd like to have your help regarding the piece of code that show the lowest price of a range: how can I add a sort of "VAT incl." text?
    Hope someone may help me.
    Many thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.