Snipcart v3 and 'data-item-stackable' attribute - snipcart

I'm banging my head against the wall with this for a month. Setting data-item-stackable="never" in Snipcart V3 does absolutely nothing for me.
But there's more weird things going on:
On my dashboard, I'm getting this message saying:
It seems you’re not using the latest version of our shopping cart.
Would you like to switch to the v3.0 ?
Needless to say, I'm using at my site the latest (at the time of writing this) snipcart.js v3.0.31. What is dashboard detecting as Snipcart v2? I've never used Snipcart v2 on the site in question and I didn't migrate from v2 to v3.
In Snipcart v3 documentation, it says that data-item-stackable attribute is enum type. However, in v3 migration guide, it is stated
The data-item-stackable attribute isn't boolean anymore, but a string
that describes the different possible behaviors
So is it a string or is it an enum?
I'd like to know if anyone else had an issue with correct version detecting and/or data-item-stackable doing absolutely nothing? Are those two just different manifestations of the same problem I'm having?
Has anyone succeeded in getting items "non-stacked" with Snipcart v3, without using Javascript SDK, as intended?
Thank you for your time and effort.
Cheers.

Just got the answer from nice guys at Snipcart. It seems that the problem is that data-item-stackable="never" is not working if data-item-quantity has been set on the snipcart button. Here's their answer:
Even if a product isn't stackable, if you specify the quantity on the
product, this value will be used as "default" value, this is why when
you click on the buy button it uses the value you set as quantity.
For your use case, I'd recommend adding the items programmatically,
please take a look at our JavaScript SDK documentation
They even provided a small example here:
https://codesandbox.io/s/crimson-tree-7tffo?file=/index.html

Related

how to get twitter feeds in shopify

I am trying to get twitter feeds in to my shopify site. I want to get the feeds and style them as I want and thus cant use a app.
I know how to do it using PHP but can not use that code in shopify and looking for a way I can use OAuth in shopify and get the feeds. I tried the shopify docs but without an example its kinda hard to actually get my head around it.
http://docs.shopify.com/api/tutorials/oauth
Thats the link I am using as a guide. If anyone can direct me to an example which might be similar that would be awesome. (google didnt seem to be that helpful this time either)
Cheers
I know you said you didn't want to use an app, but can I suggest taking a look at Twitify? You can use custom CSS to style your tweets. Also see discussions about Twitify here and here.
Twitter changed their display guidelines and policies on embedding of tweets on websites in June 2013. One of the themes I used for a client earlier in the year had custom styling of tweets, and they have now changed it to use the official Twitter widget to meet the new guidelines. In fact, the images on the Shopify theme store show how it used to look before Twitter changed things:
And after:
I think using an app like Twitify would be the easiest way to deal with these changes to embedding tweets.
Thanx for the suggestion. I did take a look at that before I posted this question. This is a project for a client and I dont think getting a plug in is a viable option. Anyways I found a work around.
Hosted the file on a server and then accessed it. So that resolved the problem. :)
I used node.js to write the script and get the posts as required.
Cheers.
you can use the app for that Twitify https://apps.shopify.com/twitify or you can Embed a Twitter feed in your online store
Go to your Twitter settings.
Click Widgets to open the widgets menu.
Create a new widget, following Twitter's instructions.
Copy the embed code.

google image search API for iOS app

I am creating an application in which I am trying to implement google image search using Google- image-search API. I refer this [google API link] (https://developers.google.com/image-search/v1/) . But I have one problem, on that page, mentioned (DEPRECATED). So can I use this API or I should use other API? Can anyone knows about this?
Thank you in advance
If APIs are deprecated they may work for now but not with full features and may go offline in near future.
If you go to https://developers.google.com/image-search/
It says its Deprecated and the number of requests are limited now.
Important: The Google Image Search API has been officially deprecated as of May 26, 2011.
It will continue to work as per our deprecation policy, but the number of requests you may make per day may be limited. We encourage you to upgrade to the Custom Search API, which now supports image search.
Here is the link to Custom Search API
https://developers.google.com/custom-search/
Hope it helps
Deprecated means it is older one also it means that there exist new version code for that. Check this out.
Example:
For example, in order to change our search engine from webresults-based to image-based, we can utilize the defaultToImageSearch attribute.

Facebook Graph API changed results from /posts today?

I have an iOS app that has been fetching the user's Facebook status updates and location checkins using "/me/posts" for several months. After today's "breaking changes" update, "/me/posts" only returns recent "Like"s. It looks like "/me/statuses" and "/me/checkins" are the new proper places to check for these things. I guess that makes sense, but I saw no documentation anywhere describing these changes or saying that they would happen today. The original documentation about what is specifically returned from the graph API also seems pretty slim.
So my questions are: is this an official change to the API? Where was it specified? Where should I look so I can stay on top of these things and not have my app break for hundreds of users?
Perhaps more importantly: are "/me/statuses" and "/me/checkins" the new proper ways to get this information? Or is there something else?
Always good to keep a (sharp) eye on the Developer Roadmap. These types of changes happen often, but FB usually does a good job of calling them out ahead of time. You've answered your own question as far as whether or not it's an "official" change - you're seeing it in the wild - insofar as how Facebook works, it's official.
Try using the Graph API Explorer. It could be an access token issue.
FYI: I see a similar issue with my application, and I am able retrieve the posts only when I use the Graph API Explorer and the token I get from there.
Update: I found where some of the problems lived. In the app profile in Facebook, pick "Edit Settings" and then go to "Advanced" where you'll see a section called "Migrations". This is mostly switches to show compatibility for various "breaking changes" updates, but it also includes an option for "Include Checkins with Statuses".
Now I know where to look, things are making a bit more sense.

Disqus API - Post -> What does highlight do?

I'm currently comparing commenting systems and try to find out which comment system allows anything close to "editors picks" - that is admins can flag a post/comment as valuable and once a discussion is closed the valuable posts can be fetched via API.
So far the only system that seems to do it is disqus though it seems to be not clear because I find no explanations for the following method: http://disqus.com/api/docs/posts/highlight/
Does anybody know what exactly highlighting in disqus means?
Highlighting was a feature a sort order in the embed; it allowed moderators to highlight certain comments. It has been deprecated in favor of more organic discovery systems, namely the Best Rating and Popular Now sort orders. The API endpoint still exists as a legacy method for backwards compatibility.

Display twitter feeds

For an event in a couple of weeks I'd like to make an web page/app which display tweets from a specific user, a specific hashtag and all #reply's at the first user in 3 boxes on the screen.
However I've never tried this. I want to use either .NET (C#) or HTML/CSS/JS since I'm proficient in those. Are there any libraries/API's I can use? Or is there an readily available freeware/open-source app I can use?
Have you seen TweetSharp?
Use Twitter's profile and search widgets. Profile for the first box, a search of the hash tag for the second box, and a search of to:username for the third box.
I actually just posted this as an answer to another question:
I just updated a plugin to work with the Twitter 1.1 API. Unfortunately, per Twitter's urging, you will have to perform the actual request from server-side code. However, you can pass the response to the plugin and it will take care of the rest. I don't know what framework you are running, but I have already added sample code for making the request in C#, and will be adding sample code for PHP, shortly.
The plugin makes a call to statuses/user_timeline, but you will likely want to look at statuses/filter or statuses/search, instead. All you will have to do is add your desired parameters (hashtag, replies, etc.) to the server-side code and it should work (with the addition of your security keys and tokens, of course).
Good luck! :)

Resources