Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 18 2016 23:56

    rickydazla on master

    Added "new" flag to Article tag… (compare)

  • Jan 18 2016 23:45

    rickydazla on master

    New(ish) Article tags cc/ @hug… (compare)

  • Dec 15 2015 03:14

    rickydazla on master

    Theme Settings Headers & Paragr… (compare)

  • Nov 24 2015 23:42

    rickydazla on master

    Move assets to base so can load… Update theme settings to reflec… (compare)

  • Nov 24 2015 23:31

    rickydazla on master

    M.Dunkley Updates (compare)

  • Sep 18 2015 19:14

    rickydazla on master

    M.Dunkley updates (compare)

  • May 07 2015 17:10

    rickydazla on master

    updates (compare)

  • Apr 07 2015 22:32
    rickydazla closed #2
  • Apr 07 2015 22:32

    rickydazla on master

    Added Gitter badge Merge pull request #3 from gitt… (compare)

  • Apr 07 2015 22:32
    rickydazla closed #3
  • Apr 07 2015 22:31
    gitter-badger opened #3
  • Apr 07 2015 22:30
    gitter-badger opened #2
Ray Anthony
@radmedov
I'm tried
It doesn't work. Probably i did something wrong
Rick Davies
@rickydazla
filter-products();
infiniteScroll({
  options…
  CallBackOnPageLoad{
    filter-products();
  }
});
Ray Anthony
@radmedov
Sorry, i really don't understand what you mean
Rick Davies
@rickydazla
When the next page’s products get added to the dom by the infinite scroll plugin, there is a callback where you can execute more functions at that time. Whatever fn you are using to filter products in the first place, you can call it again for the next page of products in that callback
Ray Anthony
@radmedov
Yep, I understand the idea however, I don't get how to implement
Sorry, I don't get your code what is the filter-products?
Rick Davies
@rickydazla
idk, it’s pseudo-code, whatever your function it
Ray Anthony
@radmedov
CallBackOnPageLoad - never saw that
Rick Davies
@rickydazla
I have mentioned it a few times ;)
Ray Anthony
@radmedov
Yes you did )
Ray Anthony
@radmedov
I'm totally confused
Rick Davies
@rickydazla
You do some things here: $('.filters').on( 'click', '.button', function() {
do all of that again
Ray Anthony
@radmedov
Probably i'm too stupid
Give mr the answer please :smile: I'm tired of myself
Ray Anthony
@radmedov
No) Don't, I have an idea
Ray Anthony
@radmedov
So I got it
Thank you for your help! I appreciate it!
Thanks for your patience as well :smile:
Rick Davies
@rickydazla
NP. Let’s see it! :eyes:
Ray Anthony
@radmedov
Isotope.Item.prototype._create = function() {
    // assign id, used for original-order sorting
    this.id = this.layout.itemGUID++;
    // transition objects
    this._transn = {
        ingProperties: {},
        clean: {},
        onEnd: {}
    };
    this.sortData = {};
};

Isotope.Item.prototype.layoutPosition = function() {
    this.emitEvent( 'layout', [ this ] );
};

Isotope.prototype.arrange = function( opts ) {
    // set any options pass
    this.option( opts );
    this._getIsInstant();
    // just filter
    this.filteredItems = this._filter( this.items );
    // flag for initalized
    this._isLayoutInited = true;
};

// layout mode that does not position items
Isotope.LayoutMode.create('none');


// init Isotope
var $grid = $('.grid-1').isotope({
    itemSelector: '.color-shape',
    layoutMode: 'none'
});

// store filter for each group
var filters = {};

$('.filters').on( 'click', '.button', function() {
    var $this = $(this);
    // get group key
    var $buttonGroup = $this.parents('.button-group');
    var filterGroup = $buttonGroup.attr('data-filter-group');
    // set filter for group
    filters[ filterGroup ] = $this.attr('data-filter');
    // combine filters
    var filterValue = concatValues( filters );
    // set filter for Isotope
    $grid.isotope({ filter: filterValue });
});

// change is-checked class on buttons
$('.button-group').each( function( i, buttonGroup ) {
    var $buttonGroup = $( buttonGroup );
    $buttonGroup.on( 'click', 'button', function() {
        $buttonGroup.find('.is-checked').removeClass('is-checked');
        $( this ).addClass('is-checked');
    });
});

// flatten object by concatting values
function concatValues( obj ) {
    var value = '';
    for ( var prop in obj ) {
        value += obj[ prop ];
    }
    return value;
}

// init Infinite Scroll
$grid.infiniteScroll({
    // Infinite Scroll options
    path: '.pagination__next',
    button: '.view-more-button',
    status: '.page-load-status',
});

// append items on load
$grid.on( 'load.infiniteScroll', function( event, response, path ) {
    var $items = $( response ).find('.color-shape');
    // append items after images loaded
    $items.imagesLoaded( function() {
        $grid.append( $items );
        $grid.isotope( 'insert', $items );
        $grid.isotope();
    });
});

var $viewMoreButton = $('.view-more-button');

// get Infinite Scroll instance
var infScroll = $grid.data('infiniteScroll');

$grid.on( 'load.infiniteScroll', onPageLoad );


function onPageLoad() {
    if ( infScroll.loadCount == 1 ) {
        // after 2nd page loaded
        // disable loading on scroll
        $grid.infiniteScroll( 'option', {
            loadOnScroll: false,
        });
        // show button
        $viewMoreButton.show();
        // remove event listener
        $grid.off( 'load.infiniteScroll', onPageLoad );
    }
}
Rick Davies
@rickydazla
The Link the link THE LINK
I'm thinking about how to remove "View more" button when the next page is empty
Any idea?
Sorry, that link is wrong probably
Go to the women or bottoms
Rick Davies
@rickydazla
:+1:
Ray Anthony
@radmedov
Do you know how to determine that next page is empty?
Rick Davies
@rickydazla
if the next page pagination element does not exist
Ray Anthony
@radmedov
So how to implement it in the liquid
?
I need to hide the view more button when the last page is loade
Loaded
Ray Anthony
@radmedov
Hi @rickydazla ! Do you have an experience how to force working Variant.js(slate) with color swatches: https://help.shopify.com/themes/customization/showcase-products/add-color-swatches
Rick Davies
@rickydazla
I haven't used slate or variant.js - I've worked with option selectors a lot obv. Plenty of swatch-type UI
carrow
@carrowheap
Hi everyOne
Rick Davies
@rickydazla
oi oi
Pankaj-Sakariya
@Pankaj-Sakariya
HI anyone there?
what if I want to make varient sold out through programming?
Rick Davies
@rickydazla
can you explain?
lovep34
@lovep34
Hello, I am showing related products on product page, but I need that it will exclude all the products from current product collection. anyone, please help me out.
Rick Davies
@rickydazla
@lovep34 so assuming your loop is something like {% for recommendation in collection.products %} then do this inside it:
{% for recommendation in collection.products %}
  {% unless recommendation.id == product.id %}
   … render your product recommendation
  {% endless %}
{% endfor %}
Checking that the ID of the Product Recommendation is not equal to the current Product ID. You could also match Title or Handle or anything else but I like ID :smile:
ellemaker
@ellemaker
hi @all
Rick Davies
@rickydazla
hello @ellemaker
Sabbar
@sabbarbutt
Hey everyone
Can Anyone know how to hide entire hidden category from search?
Rick Davies
@rickydazla
@sabbarbutt from internal site search?