Tuesday, 31 July 2018

New filtered Zazzle rss feed tool, pin-for-pin compatible

Edit: See next post for one you can use for real

Yaay! Happy dance - I've got the pin-for-pin compatible filtered Zazzle rss feed working without resorting to YQL at all. I am using YQL to in the widget to actually get the feed but the feed itself doesn't use it.

As an example, here it is in use.

This is a Nifty live product grid widget using it. It's filtering out all product designs with any of lawyer, red or crimson in their titles.

⚠️ NB For now, the filtered feed is limited to 10 product designs, so it's ok for playing with but can't be used for live websites.

For now, there's no set-up mechanism for it, so what I did was to use the Nifty Control Panel to set up things initially, selecting in Step 2 to make a new nIFTTTy scheduler. Here's the important part from the scheduler set-up page:

You can see I've selected a part of feed - it's the part needed to get everything for the widget's feed thingy. The whole thing looks like thi (note the s:

And I've pasted it into the relevant part of the widget's html code as shown here, replacing what was put there by the Nifty Promo Control Panel when I generated the widget.

click to see larger

Don't worry if none of this makes any sense, I'll be changing the Nifty Promo Control Panel to do it all for you with a few clicks.

Edit to add: I also had to take out the tracking code that was being added by the widget, as that's now done within the feed mechanism.

Monday, 30 July 2018

Nifty Filtered ZFeed Tool - major rewrite planned

Since my last post, I've been testing the Nifty Filtered ZFeed tool.

What I found:

Trying to use it on  a web page on:
  • http://kdl.to: blocked by browser due to mixed http and https
  • https://niftytoolz.com blocked due to CORS (cross origin resource sharing)
  • a blog post on Blogger, a blog post on niftytoolz and on jmarshall's html testbed and all experienced one or other of the above

Just to check, I used the existing live product grid nifty tool widget as is (it uses a different feed-pull method) and it was fine on all the above.


Using YQL to pull a feed that uses the new Nifty Zfeed tool solves the CORS and mixed http/https problems

Other insights: Also, I need to not create an Atom feed but to duplicate the Zazzle feed XML structure. Then it will be a near pin-for-pin replacement that can be used in the existing widgets.

I think the reason why my NiftyGridZ WordPress plugin works ok is because it doesn't use YQL at all. In using the new tool I tried to do it by using NiftyGridZ method but because YQL is used deep within the new tool's belly to do the intital pulls of the zazzle feed, it didn't work, I still got the CORS problem.

Possible ways forward

  • CORS & mixed http/https issues:
    • Use YQL to pull from my new tool's feed. Rubbish idea because it would mean anyone wanting to use it would need to do the same. 
    • Rewrite the tool so it uses CURL (the same method used by NiftyGridZ)
      Yes, do this.
  • Change it from producing an ATOM feed to one identical to the one Zazzle's feed mechanism produces.
    Yes, do this.
Don't hold your breath for this to be done!

Sunday, 29 July 2018

Filter Zazzle rss feeds with this new Nifty tool

EDIT: Major re-write planned - see next post 

In English: You can now exclude product designs from Zazzle feeds using filter terms.

In brief: I've stripped out the scheduler parts from the nIFTTTy Scheduler tool to make a filtered version of any Zazzle feed.

Summary: I've created a filterable version of Zazzle's rss feed mechanism (it's basically the nIFTTTy scheduler with the scheduling part stripped out). The feed it produces is identical in every respect to Zazzle's EXCEPT that it produces a valid Atom feed. This is for maximum interoperability.

You see, feeds produced by Zazzle don't validate and that can cause issues with some online services.

Feel free to play with it as per the below but note that I've limited the number of items it produces to a maximum of 10. This is so that peeps don't start using it for real!

Perfect for when Zazzle fixes pulling from the market place!

Because of a bug with Zazzle's feed mechanism when pulling from the marketplace, just like Zazzle, this new Nifty tool won't work properly.

So right now this new tool is little more than a novelty. That's because the filter feature only really comes into its own when pulling from the market place - you know, to remove create your own results, things like that.

But there might be other ways you can think of using it where pulling from the market place isn't needed. If that's you, you can get a licensed copy of the php code to put on your own server - just get in touch using highton.ridley @ g mail .com


Use is much like for a Zazzle feed request with these additions:

  • Set the store or the collection id using the additional parameter &storeid= like this:
    •  &storeid=hightonridley or &storeid=collections/119287424146492479
  • Another additional parameter: 
    • &uprn=1 means the Zazzle-supplied product name will appear in the product title
    • &uprn=0 means it won't.
  • The new filter parameters - they filter out, ie remove, matching product designs:
    • &trm1=trump
      Note that these terms (trm1, 2 & 3) can use either a word or phrase; use + to separate words in a phrase, like this:
      • &trm1=santa+claus
    • &trm2=
    • &trm3=
    • &lttls=
      • eg lttls=1 means look in titles when filtering
      • ltts=0 (or leaving it blank or leaving it out altogether) means don't look in titles
    • &ldscs= look in description - its use is as per lttls
    • &ltags= look in tags - its use is as per lttls

A full example


Go on, copy that and paste it into the address bar of a new browser tab. Firefox will show the feed output as intended for humans to read.

If you take out the filter term lawyer, you'll see some lawyer designs appear. Same for taking out the filter term red.

Nifty filtered feed output in Firefox
Click the image to see the feed in your browser

Chrome will display the feed's source as almost-unreadable XML.

See the available data for each item in a friendly display by visiting https://codebeautify.org/xmlviewer
and then hit the Load Url button and paste in:

⚠️ That viewer breaks if you include any parameters that don't have values, that's why I've taken any like that out of the url
🤓 Note that this feed mechanism uses YQL, an online service provided by Yahoo for retrieving feeds and standardising them. It's been around for years and is expected to be around for many more to come.

Even so, I'm going to work on a version that does away with using YQL, if there's enough interest.

Thursday, 26 July 2018

New nIFTTTy scheduler released - with filters!

As promised, I've updated the nIFTTTy scheduler so you can filter out designs you don't want to share / pin automatically. There's also a side-effect bonus - keep reading to find out about it.

Try it here

click to see larger

Using the filters

Here's the lowdown:
  • Remember, the filters remove items from your results
  • You can use one or more words for each filter term
  • You can have the filters apply to any combination of
    • Titles
    • Descriptions
    • Tags
Behind the scenes, nIFTTTy will keep pulling a 'page' of results from Zazzle and applying the filters until it's got the number of products you want. It'll give up and work with what it's got if:
  • it's tried a total of 9 pages to get them and it fell short
  • the last page tried gave 0 products
Once you've set the filter terms you want and where to look to do the filtering, hit the apply filter and recreate product grid button and you'll see the product grid update in line with your choices.

When you're happy, hit the make feed url for IFTTT button and use it in the normal way to make your IFTTT applet.

⚠️ As you probably know, all the Nifty tools rely on Zazzle's rss feed mechanism and right now, one aspect of that mechanism is broken - pulling designs straight from Zazzle's market place. For this reason I've specifically prevented this V2 release of the nIFTTTy scheduler from doing pulls directly from the market place. You'll get an error message if you try.

🙃 Bonus side effect of new version

In the old version of the nIFTTTy Scheduler, when you were pulling from a store, the maximum number of products you could get was 120. If you were pulling from a collection, that limit was 240.

In the new version, you can now get 240 from a store as well.

What does this side effect this mean to you?

It means your IFTTT applets using a nIFTTTy schedule can last twice as long before running out of items. How cool is that? 😎
⚠️ A side note about the side effect: it works because the method used is to keep pulling, advancing the page number each time until enough products are obtained. Zazzle's feed mechanism can only deliver a max of 120 at a time and so this has an effect on the page number you need to give it.
To get the first 240 designs, use a page number of 1. When they run out in your IFTTT applet and you need to get the second lot of 240 for your new applet, use a page number of 3. When it's time to get the third lot of 240, use a page number of 5 and so on.
Do remember that the most you can pull using Zazzle's feed mechanism is 1080 (9 pages at 120 per page).

What about the other Nifty tools - will they use filters?

Not yet - if at all. My reasoning is this. For the individual product sharers, where you pin/post/share using their streamlined processes, you can simply choose not to share what you don't want to.

Until Zazzle fixes pulling from the market place, all the other tools just don't need the filter capability. You'll be pulling from a store or category, perhaps with a search term, or from a collection - and that should be enough to get just what you're after without the need for filters.

For this reason I haven't updated the Nifty Promo Control Panel to use filters (besides, it's hard!😳).

Once Zazzle fixes pulling from the market place, I'll reconsider all options.

Monday, 23 July 2018

Zazzlers: Exciting new Nifty pulling approach - filtering!

This really is exciting news for Zazzlers who use Nifty to help them promote their or other's designs.

The new approach will let you filter out results you don't want and still get the number of products you want. It goes like this:

  • You get up to three filter terms, each can use one or more words
  • You get three places you can tell nIFTTTy where to look to do the filtering
    • Titles
    • Descriptions
    • Tags
The special part is that once all filtered items are removed, the next page of results are requested from Zazzle and, after filtering, the remaining ones are added to your results. This repeats until you have the number you want.

It'll try pulling up to 9 pages of Zazzle results to get the number of products you want.

Next project is to update the Nifty Promo Control Panel - initially filtering will be just for the nIFTTTy scheduler

The first one I've converted to use the new approach is the nIFTTTy scheduler but I haven't yet decided which of the other various Nifty tools should use this approach - hopefully I'll be able to do all of them given enough time!

Although I've done the scheduler now (to see if I could do it in php, the programming language the scheduler is written in), there's not much use for it until Zazzle fixes their rss feed mechanism when it's pulling from the market place.

I haven't yet updated Nifty itself to allow for filtering when you use it to set up the scheduling, so only the brave can use it (see end).

The reason I say that is when you're pulling from your own store, you can easily arrange to get just the products you want - by using a category and / or department or a collection.

The one use for it right now could be pulling from someone else's store, where you love some of their designs but others aren't what your after. With the ability to filter out products, you could find it easy to only get what you're after and not what you're not!

There's one other additional feature that could prove to be really useful - the ability to see the entire feed of items the scheduler is working with - sort of like a sense-check before you use it for real in an IFTTT (If This Then That) applet.

If you want to see the entire feed it's working with (this works right now):
  1. Copy the feed url as usual (ready for pasting into a new IFTTT applet)
  2. Instead, paste it into the address bar of a new browser tab /window
  3. Put &sef=1 immediately after your referral id in the address bar
  4. Hit return to see the entire feed it will be working with
🔺 Don't ever use &sef=1 in an IFTTT applet because it could end up sharing / posting / pinning the lot and you won't be popular or could get rate-limited!

⚠️ Oh, one last thing - you'll only see the entire feed when one of your chosen time slots is active.

Coming next

Don't hold your breath but next on the cards is:
  • Update the Nifty Promo Control Panel to allow the filtering parameters to be set up - just for the nIFTTTy scheduler, initially
  • Possibly some of the widgets after that?


Technical bits

🤓 For the curious, the new parameters that nIFTTTy uses for filtering purposes are:
  • &trm1= - the first filter term (single or multiple words - if multiple, use + between words)
  • &trm2= - the second filtering terms (single or multiple words - if multiple, use + between words)
  • &trm3= - the third filtering terms (single or multiple words - if multiple, use + between words)
  • &lttls=1 - apply the filter term(s) to each product title
  • &ldscs=1 - apply the filter term(s) to each product description
  • &ltags=1 - apply the filter term(s) to each product's tags 
If you don't want to use any parameters, either don't mention them or put nothing after the = sign.

An example

To get a feed of items while filtering out any postage stamps and any nebula designs, add the following, just after your referral id in the feed url the nIFTTTy scheduler gives.


Saturday, 7 July 2018

Horizontal scroller test for a Zazzler

Here's the scroller:

Thursday, 5 July 2018

nIFTTTy Schedulers now show current GMT/Internet time

I've updated the nIFTTTy scheduler tools (the one available from the Bifty Promo Control Panel) and the nIFTTTy scheduler tool available via the NiftyZPids bookmarklet.

They now both show the current time in GMT/Internet Time so you'll find it easier to choose your scheduling times where you live. Remember that those times are also interpreted as GMT/Internet Time.

Enjoy 😎