Support » Plugin: Markup by Attribute for WooCommerce » Markup by Multiplication

  • suporteparaarte

    (@suporteparaarte)


    Hey Mark! Awesome and simple plugin, really thank you for contributing this!
    Is almost everything i needed …

    Except, i need to – instead of increase or descrease the ammount (+ -), multiply the value in the markup (*).

    Can i change this somewhere in the functions?
    Is this possible to do?

    Thank you in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • suporteparaarte

    (@suporteparaarte)

    Found in product.php

    // Add markup to price
    $markup = (float) $markup_table[ $attribute_id ][ $term_id ][ “markup” ];
    $variation_price = $variation_price + $markup;

    If I change to:
    $variation_price = $variation_price * $markup;

    Would this do the trick?

    Plugin Author Mark Tomlinson

    (@marktomlinson)

    Yes, that should do it, but I’d check to ensure there are no ripple effect showing up elsewhere.

    I have a new release scheduled soon. So, I’ll explore adding multiplication and division operators.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.