• Resolved bermand

    (@bermand)


    When I price increases I want rounded whole numbers. I want to round my pricing up to to the next 10. I need $304.95 to be $310. Similarly $306.95 to be $310.

    Any code I could use to achieve?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi there. I don’t know of a way to round a price up to the nearest multiple of 10, but you can round prices to the nearest dollar by setting the number of decimals in WooCommerce > Settings > General to 0.

    Thread Starter bermand

    (@bermand)

    I am hoping someone has a css or php code to assist me.

    Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    Hi @bermand,

    Is there something preventing you from entering the prices that you want?

    I’m asking as I’m unsure why you’re looking to approach pricing in this manner. If you’re increasing the price on a product, you can change the price to whatever you want instead of entering one price and relying on code to change it to something else.

    Thread Starter bermand

    (@bermand)

    I need to do a price increase across over 400 products. On 2 domains.

    Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    @bermand,

    You can export your products to a CSV document, open the document in Excel or some other spreadsheet application, update the pricing, and then re-import the CSV document to update the pricing on your sites.

    Thread Starter bermand

    (@bermand)

    Thanks everyone for your input appreciate however I am looking for someone who can code to assist me.

    Export csv file as suggested by Luminus (@luminus).
    Create an new column for revised prices in Excel that references the old price in cell A1 and calculates a new price using =ROUNDUP(A1,-1). Copy the VALUE from the new column to the old price column, delete the new column, and import as a csv file.
    Boom!

    Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    @bermand,

    You can follow the advice provided by @rcemory, or if you’re looking to hire a developer, you can contact one of the services on our customizations page: https://woocommerce.com/customizations/.

    You’ve got solid options to go with here, so I’m going to go ahead and mark this as resolved.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘code for $304.95 to be $310’ is closed to new replies.