blocks
4 weeks ago
options
4 weeks ago
template
4 weeks ago
google.php
4 weeks ago
index.php
4 weeks ago
options.php
4 weeks ago
process.php
4 weeks ago
success_page.php
4 weeks ago
template.php
4 weeks ago
variation_options.php
4 weeks ago
variation_options_common.php
3 years ago
variation_options_common.php
47 lines
| 1 | <?php |
| 2 | if(!defined('ABSPATH')) { |
| 3 | die(); |
| 4 | } |
| 5 | if(XmlExportEngine::get_addons_service()->isWooCommerceAddonActive()) { ?> |
| 6 | <script type="text/javascript"> |
| 7 | (function ($) { |
| 8 | $(function () { |
| 9 | |
| 10 | function updateCheckSelect() { |
| 11 | var exportVariations = $('#export_variations').val(); |
| 12 | var exportVariationsTitle = $('#export_variations_title').val(); |
| 13 | |
| 14 | //$('.sub-options-' + exportVariations).css('display', 'block'); |
| 15 | } |
| 16 | |
| 17 | $('.export_variations').on('change', function () { |
| 18 | |
| 19 | var inputName = $(this).attr('name'); |
| 20 | $('.sub-options').slideUp('fast'); |
| 21 | var value = $('input[name='+inputName+']:checked').val(); |
| 22 | var $thisInput = $('input.export_variations[value='+value +']'); |
| 23 | $thisInput.prop('checked', 'checked'); |
| 24 | $('#export_variations').val(value); |
| 25 | if (value <= 2) { |
| 26 | $thisInput.parent().parent().find('.sub-options').slideDown('fast'); |
| 27 | $thisInput.parent().parent().find('.sub-options').find('input').eq(0).attr('checked', 'checked'); |
| 28 | } |
| 29 | }); |
| 30 | |
| 31 | $('.export_variations_title').on('change', function(event){ |
| 32 | |
| 33 | var inputName = $(this).attr('name'); |
| 34 | var value = $('input[name='+inputName +']:checked').val(); |
| 35 | var $thisInput = $('.export_variations_title[value='+value +']'); |
| 36 | $thisInput.prop('checked', 'checked'); |
| 37 | |
| 38 | $('#export_variations_title').val(value); |
| 39 | }); |
| 40 | |
| 41 | updateCheckSelect(); |
| 42 | }); |
| 43 | })(jQuery); |
| 44 | </script> |
| 45 | <?php } ?> |
| 46 | <input type="hidden" id="export_variations" name="export_variations" value="<?php echo esc_attr(XmlExportEngine::getProductVariationMode()); ?>" /> |
| 47 | <input type="hidden" id="export_variations_title" name="export_variations_title" value="<?php echo esc_attr(XmlExportEngine::getProductVariationTitleMode());?>" /> |