Help with the formula

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #99094
    SAMUEL MENDEZ
    Guest

    Hi how are you? I need to make this formula on my web page, could you help me?

    Product cost x 2 = retail price any thing from .01 to.98 should be rounded up to .99 + $2 = retail price displayed on site
    10.20 x 2 = 20.40 rounded up to .99 + $2 = $22.99

    #99095
    Tom Anbinder
    Moderator
    Plugin Support

    Hi Samuel,

    That depends on how “product cost” is saved on your site.

    If you mean that you set this “product cost” as standard WooCommerce price, then you need to set Formula to:

    [math_ceil]x*2[/math_ceil]-0.01+2

    And if you mean that you are using some additional plugin to set this “product cost”, then you need to know product meta key in which cost is stored in product. For example, if you are using our Cost of Goods for WooCommerce plugin, then cost will be saved in _alg_wc_cog_cost meta key, so you need to set Formula to:

    [math_ceil][product_meta key="_alg_wc_cog_cost"]*2[/math_ceil]-0.01+2

    Hope that helps. Please let me know if something is not working as expected or if you have any questions. And if you like the plugin, please consider leaving us a rating.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Product Price by Formula for WooCommerce’ is closed to new topics and replies.