Sha256: 21ce5ed6e7572b56b670fae7973870699206ec751eb3f41011a49967e6a98548

Contents?: true

Size: 1.22 KB

Versions: 5

Compression:

Stored size: 1.22 KB

Contents

// собирает данные для строки после
// нажатия мелкой кнопки "в корзину"

var CollectDataForRowSm = function(item_id) {
    this.call = function() {
        // console.log("<CollectDataForRowSm.call> item_id = " + item_id);

        var $item_show = $('.li_item.i_'+item_id);

        var q = 1;
        var price_per_item = Number($item_show.find('.price_props p.cur span.pvalue').text().split(',').join('.'));
        var price = q * price_per_item;
        var title = $item_show.data('title');
        var color = '';
        var color_title = 'не указан';
        var options = {delivery:false, super_colors:false, metallic:false};

        return {
            id: item_id,
            title: title,
            q: q,
            color: color,
            color_title: color_title,
            price: price,
            price_per_item: price_per_item,
            image_url: $item_show.data('image_url'),
            item_url: $item_show.data('item_url'),
            options: {
                mark_delivery: options['delivery'],
                mark_super_colors: options['super_colors'],
                mark_metallic: options['metallic']
            }
        }

    }

};

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
c80_yax-0.1.0.25 engines/co/app/assets/javascripts/co/add_to_cart_sm/service/collect_data_for_row_sm.js
c80_yax-0.1.0.24 engines/co/app/assets/javascripts/co/add_to_cart_sm/service/collect_data_for_row_sm.js
c80_yax-0.1.0.23 engines/co/app/assets/javascripts/co/add_to_cart_sm/service/collect_data_for_row_sm.js
c80_yax-0.1.0.22 engines/co/app/assets/javascripts/co/add_to_cart_sm/service/collect_data_for_row_sm.js
c80_yax-0.1.0.21 engines/co/app/assets/javascripts/co/add_to_cart_sm/service/collect_data_for_row_sm.js