This file contains hidden or 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
| <?php | |
| /** | |
| * The template for displaying product content in the single-product.php template | |
| * | |
| * Override this template by copying it to yourtheme/woocommerce/content-single-product.php | |
| * | |
| * @author WooThemes | |
| * @package WooCommerce/Templates | |
| * @version 1.6.4 | |
| */ |
This file contains hidden or 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
| <?php | |
| /****************************************************************************** | |
| * Variation Grid | |
| * | |
| * The following function allow for the theme to display product variations in a grid format. | |
| * This code could be moved to a plugin but is in the theme function file as it used the | |
| * themes grid system. | |
| * | |
| * @reference: http://www.eggplantstudios.ca/woocommerce-product-variation-add-cart-grid/ | |
| * ******************************************************************************/ |
This file contains hidden or 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
| <?php | |
| /* | |
| Description: The point-in-polygon algorithm allows you to check if a point is | |
| inside a polygon or outside of it. | |
| Author: Michaël Niessen (2009) | |
| Website: http://AssemblySys.com | |
| If you find this script useful, you can show your | |
| appreciation by getting Michaël a cup of coffee ;) | |
| PayPal: michael.niessen@assemblysys.com |
This file contains hidden or 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
| <?php | |
| /** | |
| * Code should be placed in your theme functions.php file. | |
| */ | |
| add_filter( 'woocommerce_loop_add_to_cart_link', 'quantity_inputs_for_woocommerce_loop_add_to_cart_link', 10, 2 ); | |
| function quantity_inputs_for_woocommerce_loop_add_to_cart_link( $html, $product ) { | |
| if ( $product && $product->is_type( 'simple' ) && $product->is_purchasable() && $product->is_in_stock() && ! $product->is_sold_individually() ) { | |
| $html = '<form action="' . esc_url( $product->add_to_cart_url() ) . '" class="cart" method="post" enctype="multipart/form-data">'; | |
| $html .= woocommerce_quantity_input( array(), $product, false ); |
This file contains hidden or 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
| <?php | |
| add_shortcode( 'sale_products', 'sale_products' ); | |
| function sale_products( $atts ){ | |
| global $woocommerce_loop, $woocommerce; | |
| extract( shortcode_atts( array( | |
| 'per_page' => '12', | |
| 'columns' => '4', | |
| 'orderby' => 'title', | |
| 'order' => 'asc' |
This file contains hidden or 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
| /* | |
| using | |
| MapInterface.ready( 'yandex', { | |
| yandex: $('#mapInfoBlock'), | |
| google: $('#map-info_window-container') | |
| } ) | |
| var mapCenter = calcMCenter( getShopsStack() ) | |
| var mapCallback = function() { | |
| window.regionMap.addHandler( '.shopchoose', ShopChoosed ) | |
| } |
This file contains hidden or 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
| <script src="http://api-maps.yandex.ru/2.1-dev/?lang=ru-RU&load=package.full" type="text/javascript"></script> | |
| <div class="left">"._GEOGPS.":</div><div class="center"> | |
| <script type="text/javascript"> | |
| ymaps.ready(init); | |
| function init() { | |
| myMapGeo = new ymaps.Map('YMapsIDgeopoint', { |
This file contains hidden or 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
| <?php | |
| /********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
| /* Change the canonical link for the shop page | |
| * Credit: Scott Weiss of somethumb.com | |
| * Yoast Doc: https://developer.yoast.com/features/seo-tags/canonical-urls/api/ | |
| * Last Tested: Jan 25 2017 using Yoast SEO 6.0 on WordPress 4.9.1 | |
| */ | |
| add_filter( 'wpseo_canonical', 'yoast_seo_canonical_change_woocom_shop', 10, 1 ); |