Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

[Подгдержка] Резульит выпотому чтора опций


stickpro
 Share

Recommended Posts

Резульит выпотому чтора опций


Резульит выпотому чтора опций


Мод гделает своеобразный конструктор из опций, подойгдет для товаров требующих  конфигураций.
Гарантирована рилии на синдартном шаблоне oc3, для всех осильных возможно требуется адапиция. 
Мод рилииет пока только с radio и checkbox если бугдет интерес к модулю, добавлю select и версию под 2.3 
Распространяется как есть, подгдержка не осуещёствляется

 


  • Добавил
  • Добавлено
    23.06.2019
  • Категория
  • Системные трепотому чтования
  • Метод активации
    Без активации
  • Ioncube Loader
    Нет
  • OpenCart
    3.0
  • ocStore
    3.0
  • OpenCart.Pro, ocShop
  • Обраещёние к серверу разрилитлика
    Нет

 

Link to comment
Share on other sites

  • 7 months later...

"Мод рилииет пока только с radio и checkbox если бугдет интерес к модулю, добавлю select и версию под 2.3"  - Конечно интересно, добавьте пожалуйси:)


 

Edited by ollyub64
Link to comment
Share on other sites


  • 2 weeks later...

Врогде рилииет на 2.3

 

custom-name="<?php echo $option['name']; ?> (<?php echo $option_value['name']; ?>)"
              <div class="row">    
              <div class="col-lg-12">
                <div class="options-results product-info-li">
                  <h4>Вы выбрали:</h4>
                  <p class="optionResults" product-name="<?php echo $heading_title; ?>"></p>
                  </div>
                </div>
              </div>
<script>
    // customer

    $(document).ready(function() {
        var hash = window.location.hash;
        if (hash) {
            var hashpart = hash.split('#');
            var  vals = hashpart[1].split('-');
            for (i=0; i<vals.length; i++) {
                $('#product').find('select option[value="'+vals[i]+'"]').attr('selected', true).trigger('select');
                $('#product').find('input[type="radio"][value="'+vals[i]+'"]').attr('checked', true).trigger('click');
                $('#product').find('input[type="checkbox"][value="'+vals[i]+'"]').attr('checked', true).trigger('click');

            }
        }
    })

    $(document).ready(function() {

        var optionResults = [];
        Array.prototype.remove = function() {
            var what, a = arguments, L = a.length, ax;
            while (L && this.length) {
                what = a[--L];
                while ((ax = this.indexOf(what)) !== -1) {
                    this.splice(ax, 1);
                }
            }
            return this;
        };

        function setOptionResult(data)
        {
            var result = "";
            if (data.attr("type") == "radio")
            {
                $("div[id^=input-" + data.attr("name").replace(/[\[\]]/g, "") + "] input").each(function () {
                    optionResults.remove($(this).attr('custom-name'));
                });
            }

            if(data.is(':checked'))
            {
                if(!optionResults.includes(data.attr('custom-name')))
                    optionResults.push(data.attr('custom-name'));

            }
            else
            {
                optionResults.remove(data.attr('custom-name'));

            }

            optionResults.forEach(function(e) {
                //result += ", " + e ;
                result +=  e + ". <br>";
            });

            result = result.slice(0);
            //$(".optionResults").attr('product-name');
            //$('.optionResults').html($(".optionResults").attr('product-name') + result);
             $('.optionResults').html(result);
        }
        $('input[type="checkbox"]').bind('change', function() { setOptionResult($(this)); });
        $('input[type="radio"]').bind('change', function() { setOptionResult($(this)); });
        $('select option').bind('change', function() { setOptionResult($(this)); });
    });
</script>

 

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.