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
Также необходимо внести правки в catalog/view/javascript/common.js | |
найти функцию cart.add | |
после if (json['success']) { | |
добавить sendYandexEcommerce(json, "add"); | |
найти функцию cart.remove после success: function(json) { | |
добавить sendYandexEcommerce(json, "remove"); |
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
//Для простых товаров поля и сохранение | |
function wc_uahprice_product_field() { | |
woocommerce_wp_text_input( array( 'id' => '_uah_price', 'class' => 'wc_input_price short', 'label' => __( 'UAH', 'woocommerce' ) ) ); | |
woocommerce_wp_text_input( array( 'id' => '_usd_price', 'class' => 'wc_input_price short', 'label' => __( 'USD', 'woocommerce' ) ) ); | |
woocommerce_wp_text_input( array( 'id' => '_euro_price', 'class' => 'wc_input_price short', 'label' => __( 'EUR', 'woocommerce' ) ) ); | |
} | |
add_action( 'woocommerce_product_options_pricing', 'wc_uahprice_product_field' ); | |
function wc_myprice_save_product( $product_id ) { |