Created
June 16, 2015 10:11
-
-
Save rvanweerd/8edada9245c9d2f940e0 to your computer and use it in GitHub Desktop.
Exchange: add "buy now" and/or "add to cart" to store view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function buy_now_in_store() { | |
echo "</br>Example 1: add to cart and buy now: <br />"; | |
it_exchange('product', 'purchase-options', array('add-to-cart-edit-quantity' => false, 'buy-now-edit-quantity' => false)); | |
echo "<br /><hr><br />"; | |
echo "Example 2: add to cart and buy now and edit quantities: <br />"; | |
it_exchange('product', 'purchase-options', array('add-to-cart-edit-quantity' => true, 'buy-now-edit-quantity' => true)); | |
echo "<br /><hr><br />"; | |
echo "Example 3: add to cart: <br />"; | |
it_exchange('product', 'purchase-options', array('add-to-cart-edit-quantity' => false)); | |
echo "<br /><hr><br />"; | |
echo "Example 4: buy now: <br />"; | |
it_exchange('product', 'purchase-options', array( 'buy-now-edit-quantity' => true)); | |
echo "<br /><hr><br />"; | |
} | |
add_filter('it_exchange_content_store_after_product_info_loop', 'buy_now_in_store'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment