Support » Plugin: FoxyShop » Change the HTML that functions output

  • Resolved c-m

    (@c-m)


    How do I change the actual HTML outputted by the functions?

    For example foxyshop_product_variations() will show the variations and quantity dropdowns. But I want to amend the code to include prepends.

    Likewise I want to separate out the main product image, from the product thumbnails, and place them in different containers on my page.

    http://wordpress.org/extend/plugins/foxyshop/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author sparkweb

    (@sparkweb)

    You’ll want to inspect helperfunctions.php. In some cases you can just make your own function in functions.php as a copy. In other cases you may be able to use WordPress hooks to change the code.

    Thanks for the response.

    I can see in helperfunctions.php that the line below writes “Quantity”

    $quantity_title = apply_filters("foxyshop_quantity_title", "Quantity");

    Now I want to change this to read “QTY” which is simple enough, but how to do that using my themes custom functions.php as oppose to editing helperfunctions.php

    Presumably isn’t just as simple as copying that one line and adding it to my themes functions.php?

    Plugin Author sparkweb

    (@sparkweb)

    See this page for a lot of examples of how to write the FoxyShop hooks: http://www.foxy-shop.com/documentation/advanced-customization/

    And this: http://wp.tutsplus.com/tutorials/the-beginners-guide-to-wordpress-actions-and-filters/

    Here’s the specific sample you need: http://pastebin.com/Bbw5Ua50 – the function would just say “QTY”

    Cool.

    In your sample the line:

    if ($product['code'] == "code1") {

    Did you mean != instead of == ? As “code1” would be a single specific product code as oppose to a placeholder that automatically pulls in the code of the product in that particular Foxycart form.

    Plugin Author sparkweb

    (@sparkweb)

    This is just a sample that says “if the product code is ‘code’ do this”

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change the HTML that functions output’ is closed to new replies.