Въпрос относно автоматично изчисляване на сума

roskata

Registered
Здравейте! Имам следният код, който изкарва сума от woocommerce на продукт. Някой може ли да ми каже как тази (автоматична сума) да се умножава примерно по 35,19%?

Пример: 300 * 35,19% = ...

Код:
<?php if ( $price_html = $product->get_price_html() ) : ?>
<span class="price"><?php echo $price_html; ?></span>
<?php endif; ?>

Благодарско. :)
 
deam0n каза:
Дай дефиницията на get_price_html()

По принцип ми трябва само в определена таблица да изчислява лихвен процент, не генерално на всичките цени да се променя в woocommerce.

P.S. мисля, че е това:

<?php

public function get_price_html( $deprecated = '' ) {


if ( '' === $this->get_price() ) {


$price = apply_filters( 'woocommerce_empty_price_html', '', $this );


} elseif ( $this->is_on_sale() ) {


$price = wc_format_sale_price( wc_get_price_to_display( $this, array( 'price' => $this->get_regular_price() ) ), wc_get_price_to_display( $this ) ) . $this->get_price_suffix();


} else {


$price = wc_price( wc_get_price_to_display( $this ) ) . $this->get_price_suffix();


}


return apply_filters( 'woocommerce_get_price_html', $price, $this );


}
[/quote]
 

Горе