|
9886ab482258e3724ed7b49ccca7f08e
|
tag problem with new collectionsby Christina - Miss Manners - 08:27PM, Sep 28, 2006 |
|
hi tobi &co, the following code doesn’t seem to work properly anymore with the new collections:
on the regular collection page, everything’s fine, and all the tags show up. but when i click on a tag, that sub-collection appears, but the only tag remaining is the one belonging to the sub-collection. all the others disappear. example: click on tag scary: collection: HATS i’ve checked it on my site; and have been looking for other shops using tags – there don’t seem to be many, but misofunky’s one, & her tags disappear too. |
|
|
Hi Tobi, After racking my brains & trying to figure out how to fix this, I finally noticed that you posted an update to the “collection.tags” specification on the wiki – just about at the same time I was asking this question. So, “collection.tags” doesn’t behave as it used to; and I now realize this was a deliberate choice on your part. Would there be any way to replicate past behaviour? I’ve tried at random:
and in desperation: I had a nice little tag-driven navigation system set up, but it no longer works. Any quick answer – even monosyllabic – would be much appreciated.
|
|
|
Hi, I was in same boat.. checked out my collections, which pre-collection fix were all nice, and some were blotto.. my fix, was to remove hyphens in the product types that should not have been there… maybe that was the only screwup introduced?? I had no need to pagination so I guess that’s what took me so long to check in on my inventory. BTW: Shopify Dudes… Pagination is very passé when you can make a LiveGrid scroller for items… how about one of those… hahahaha. We have Prototype, and Rico runs on Prototype… so… haahaha.. let’s go. Actually, I dislike Rico and run on Yahoo YUI exclusively… it rocks.. although Prototype is still the king… for $() and A() and bind().. and, and, and…. I wish the back end would NOT be tinkered with to the point of crushing client data. My billable hours to Shopify for re-doing my inventory, plus everyone elses might just dent the cashflow ;) That’s the price of progress we all risk I guess… hope that helps… ---
Implement the Logic. — Last edited 12:04AM, Oct 03, 2006 |
|
|
Christina: there is HunkyBill: You should be able to implement livegrid once the ajax api is formalized. There are already a good deal of methods in shopify which you can call by ajax and get results as JSON back ( e.g. /cart/add ). I was working on this a few months ago but got interrupted so the current behavior will definitely break in the future when I revist these parts and make them public and stable. ---
Tobias Lütke
|
|
|
That works beautifully, Tobi; thanks for the quick answer! As to reverting back, I don’t think you should: if there’s the possibility of using 2 different kinds of behaviour, so much the better. The new one might come in handy for other purposes. Would be useful to document collection.all_tags in the wiki, though. @HunkyBill: nothing passé about pagination. What’s hot is graceful degradation, which means you don’t do it ALL only client-side. Some of my best friends have javascript OFF… As to shopify – the way I see it is we’re all working on the same construction site. Sometimes things get broken, & I admit, I’ve been quite frustrated on occasion, but the flip side to that is that the shopify crew is very willing to listen to our input & put in lots of hours of work to get us what we want, & the system is just getting better & better. On two occasions, I had a bit of a scare and thought I’d have to redo my inventory, but that has actually never happened thanks to the elegant fixes that Tobi & co. came up with. & while I’m on this topic – I just noticed last night, Tobi, that you turned the images on the searchresults page into links, so people can click to the product. I had put that on my wishlist a loooong time ago; don’t know when this unannounced fix happened, but thanks!
|
|
|
Hi, Ok.. right on the graceful degradation. That is important, and pagination is workable even in Lynx. As for your best friends not using Javascript? That’s like saying my best friends listen to monophonic sound, instead of stereo and watch TV on Black and White Cathode Ray TV’s! Of course it is a user preference.. but knowing what you can gain with Javascript, it’s hard to imagine why you would want to keep it OFF.. unless of course you are purposely engaging in random surfing the nebulous side of the WWW.. everyone has and makes choices… :) ---
Implement the Logic.
|
|
|
ya, well, my best friends – I take ‘em as they come; even when they do it with their javascript off :)
|
|
|
tobi, about that recent tag fix…are you working on tags right now as we speak? mine have just apparently changed behaviour right under my very eyes – unless i’m suffering from delusions here. in any case, i just don’t understand what the tags do anymore. check this page (click on version four) for an investigation into the differences between collection.tags, collection.all_tags, and just simple tags – there don’t seem to be any anymore (i.e. no differences) as of 5 minutes ago. also “highlight_active_tag” has stopped working – unless i just forgot to close a bracket somewhere, but i checked with the validator & the page is ok. what i’d like to do is get the active tag – i.e. the one that was the link to the tagged collection. i had that going for a while on my site, but it’s gone since the fix. Any way to get a new variable “active_tag”? – i figure if you can highlight it, it exists, so that must be easy.
|
|
|
I have not worked on tags since the “fix”. There are two things:
then there is tags directly which is just an alias to collection.tags. Great work on funkydemo! ---
Tobias Lütke — Last edited 02:56AM, Feb 08, 2007 |
|
|
gracefull degradation is passe. fault-tolerance. it’s better to design bottom-up, content as first citizen, then design (css) then behaviour (js). in my company i try really hard to make ppl to create pages that work without using JS or CSS, then we’ll worry about design/behaviour. but… they resist… long live Progressive Enhancement hmmm… i’m having flashbacks ---
Turn on TV, turn off your Brain — Last edited 08:38AM, Oct 06, 2007 |
|
|
well we better progressively enhance you then!
|
|
|
Tobi, There are two things: collection.tags – This shows tags of all products after taking current url filter tags into account. collection.all_tags – This shows all tags ignoring current tags in the url. Is there a way to access the active tag if a tag is used to filter the collection shown on the page? Something like…
All I see now is this filter: ---
Caroline from http://11heavens.com
|
|
|
also,
|
|
|
Hi Christina, I think that collection.tags, or the alias ‘tags”, give you the current tags, as opposed to collection.all_tags. What did you have in mind? ---
Caroline from http://11heavens.com
|
|
|
no. i.e. if you’re on page your current_tags will be lime,electric,unforgettable, whereas you could have more in collection.tags and collection.all_tags.
|
|
|
Thank you for clarifying. I dit not even know that we could filter with more than one tag, separating these with a plus sign. So current_tags is definitely an array, sometimes empty, or sometimes containing only one element. Thank you again, Christina. You’ve just saved me a lot of work. I did well to sleep on my problem last night. An elegant solution came up, not from my head, but from your hands on keyboard. ---
Caroline from http://11heavens.com
|
Christina
Miss Manners
09:58PM, Oct 02, 2006