The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

add an alternate price to single-product.php (FoxyShop)

mabbytacmabbytac Member
in Bugs & Feature Requests edited April 2012

I'm tring to print the Product's price a second time on the single-product page but I'd like it altered to display the wholesale price instead. Is there a way I can utilize php or jquery to perform division on the price and print it? Does it require grabbing the json price? I'm using the foxyshop plugin. Here's a sample page:

Apologies for my ignorance if this is easy, I'm a fairly green programmer.


  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    Hi Jonathan,

    Thanks for writing. It should be a pretty simple matter to do the math that you are looking for. This would go in the PHP code in your foxyshop-single-product.php:
    $wholesale_multiplier = 0.65;
    echo '<p><strong>Wholesale Price:</strong> ' . foxyshop_currency($product['price'] * $wholesale_multiplier) . '</p>';

    Just set your multiplication rate at the top. The foxyshop_currency function just makes sure that it will be formatted correctly with two decimal places and nice $ sign at the front.

    If you need a little pointer on editing the template, this is a good place to start:

    Write back if you run into any troubles,

  • David,

    Thanks for your help!

    Worked fine. I thought it might be something like that.



Sign In or Register to comment.