Changeset 1777704
- Timestamp:
- 11/29/2017 01:40:08 PM (8 years ago)
- Location:
- fastdee/trunk
- Files:
-
- 3 edited
-
assets/js/import-page.js (modified) (1 diff)
-
includes/core/class-fd-util.php (modified) (2 diffs)
-
includes/pages/class-fd-import-page.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fastdee/trunk/assets/js/import-page.js
r1771929 r1777704 24 24 jQuery('#fd-atual-page').on('change', function () { 25 25 fd_get_offers(jQuery(this).val()); 26 }); 27 28 jQuery('#fd_btnLimparFiltros').on('click', function () { 29 jQuery('#fd_categoria').val('').trigger('change'); 30 jQuery('#fd_loja').val('').trigger('change'); 31 jQuery('#fd_palavra-chave').val(''); 32 jQuery('.fd_offers_preview').hide(); 26 33 }); 27 34 -
fastdee/trunk/includes/core/class-fd-util.php
r1773961 r1777704 13 13 add_action( 'wp_enqueue_scripts', array( $this, 'fd_public_site_add_scripts' ) ); 14 14 15 add_filter( 'woocommerce_product_single_add_to_cart_text', array( $this, 'fd_wc_add_to_cart_custom_text' ), 9 );16 add_filter( 'woocommerce_product_add_to_cart_text', array( $this, 'fd_wc_add_to_cart_custom_text' ), 9 );15 add_filter( 'woocommerce_product_single_add_to_cart_text', array( $this, 'fd_wc_add_to_cart_custom_text' ), 9, 2 ); 16 add_filter( 'woocommerce_product_add_to_cart_text', array( $this, 'fd_wc_add_to_cart_custom_text' ), 9, 2 ); 17 17 18 18 //product - botao de compra _blank substituir btn … … 86 86 } 87 87 88 function fd_wc_add_to_cart_custom_text( $text ) { 89 // tem texto no botao e nao é o default 90 if ( $text && ! in_array( strtolower( $text ), array( 'add to cart', 'buy product', 'comprar produto', 'adicionar ao carrinho' ) ) ) { 91 return $text; 92 } 93 94 $options = get_option( 'fd_settings' ); 95 if ( isset( $options['fd_btn_woocomerce_text'] ) && $options['fd_btn_woocomerce_text'] ) { 96 return $options['fd_btn_woocomerce_text']; 88 function fd_wc_add_to_cart_custom_text( $text, $product ) { 89 90 if ( 'external' === $product->get_type() ) { 91 92 $options = get_option( 'fd_settings' ); 93 if ( isset( $options['fd_btn_woocomerce_text'] ) && $options['fd_btn_woocomerce_text'] ) { 94 $text = $options['fd_btn_woocomerce_text']; 95 } 96 97 // se tem texto no botao 98 if ( $product->button_text ) { 99 $text = $product->button_text; 100 } 97 101 } 98 102 -
fastdee/trunk/includes/pages/class-fd-import-page.php
r1762707 r1777704 91 91 <!-- .end --> 92 92 93 <div class="" style="text-align: right;padding-right: 374px;"> 94 <input type="button" id="fd_btnLimparFiltros" class="button button-primary fd-btn-red" value="Limpar Filtros"> 95 </div> 96 93 97 <p class="submit"> 94 98 <input type="button" id="fd_btnGetOffers" class="button button-primary fd-btn-red" value="Buscar Ofertas">
Note: See TracChangeset
for help on using the changeset viewer.