Support » Plugin: Ninja Shop - The Quickest Way to Start Selling » Price inclusive of tax

  • Resolved Katie

    (@greenpeadesign)


    How do I show a price that is inclusive of tax? I need to show the total price including tax (GST) on the product page and the tax component on checkout page.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Kyle B. Johnson

    (@kbjohnson90)

    Hey Katie,

    There is a filter for changing the display of the price on the product page:

    /**
     * Filter the output of the product's purchase price.
     *
     * @param string $price      The price ready for output. May contain HTML.
     * @param int    $product_id The product ID.
     * @param bool   $sale       Whether this is filtering the sale price amount or base price amount.
     * @param bool   $show_sale  Whether the sale price will be displayed.
     */
     $price = apply_filters( 'it_exchange_api_theme_product_base_price', $price, $product_id, false, $show_sale );

    Likewise, if you want to append to the output (ie “includes tax”):

    /**
     * Filter the entire output of the product's purchase price.
     *
     * This includes both the sale price and base price parts.
     *
     *
     * @param string $price      The price ready for output. May contain HTML.
     * @param int    $product_id The product ID.
     */
     $result .= apply_filters( 'it_exchange_api_theme_product_base_price_full', $price, $this->product->ID );

    We are working to build out developer documentation, but that is not yet available.

Viewing 1 replies (of 1 total)
  • The topic ‘Price inclusive of tax’ is closed to new replies.