Does the Shopify template system have an admin only variable? - shopify

I want to be able to show product edit links on the product pages of a Shopify site.
But I only want the link to appear to users who are logged in as admins.
Is this possible in the Liquid syntax?

As far as I am aware, this is still not possible.
See here for more info:
Currently there isn't [a way to do this with liquid]. You could perhaps try inspecting cookies and stuff
to see if there's some identifying information that would let you know
if the user is an admin, but it would be fragile...
An alternative option is to use customer accounts with an 'admin' tag.

Related

How to Configure Permissions in 2sxc News App

I'm using the 2sxc News App for DNN and I'm trying to figure out how to grant users the ability to add/edit/delete news posts without also granting them the ability to change the layout or edit the module.
I tried to add the "2sxc Designers" role I've read about:
But having that role doesn't seem to change anything.
Am I doing something wrong in setting the "2sxc Designers" role and is this what I need to allow only post manipulation?
This is an advanced use case, and I can't give you the full answer, but basically what you want to do is this:
On the content-type, give the group custom permissions - so that the UI accepts changes by them https://github.com/2sic/2sxc/wiki/concept-permissions
Since the toolbars won't appear for non-editors, you'll have to make this happen in the template. So add some razor to check if people of this role. Then enable edit with Edit.Enable https://github.com/2sic/2sxc/wiki/razor-edit.enable
These blog-posts may also help you: https://2sxc.org/en/blog/post/recipe-create-public-forms-with-2sxc

Is there a way to save search filters between sessions per user account on Shopify?

So (for example) if a user selects their gender and pant size while searching on Shopify store, could those selections be saved and be in place when they visit again?
I'm open to switching to a new Shopify search app that would support this feature.
There a few approaches that you can achieve this.
Using cookies
You can save their choices as cookies and refer to them once they search modifying the search URL before redirecting or appending hidden files in the form so that they submit them as well.
Creating a custom app
You can create a custom app with only one purpose to save the information to the customer metafields or tags.
Once you have this information you will be able to use the same logic as the cookie one but instead of relying on a cookie you will have access to the metafields directly.
App
I don't think that there is an App that meets these criteria, but you can look it up. Yet it may be possible to hack up the Apps in a such way that you may be able to pass this information.

Confusion about Foursquare's Attribution & Linking policy: what other ways can I attribute them besides creating a link?

I see either link them directly or visual attribute them. Example: say my website provides a recommendation directly to a user based on their submitted interest, do I just make sure "powered by Foursquare" shows underneath?
Any help would be appreciated! I'm new to tech development
These policies are generally more vague on purpose. Rule of thumb: If you're showing any data to users that isn't your own, it should be clear to them where it's coming from. This is done so the data provider gets proper attribution but also can protect yourself against content being displayed on in your app/site.
For Foursquare specifically, it seems like you would need to include a "Powered by Foursquare" icon and optionally provide a link to the venue if the user may need more information about the place.

Shopify [Plus] Liquid to Retrieve Orders & Customers, or Include App Proxy Snippets

I'm looking for a way in Liquid to retrieve all Customers, or all Orders. I know it's targeted from a Client POV so probably not, but I just wanted to double check if there are any undocumented handles anyone has come across? Its for a protected page for staff user only access.
If the only solution to fetch this data is to use the App Proxy (for API access), is there a tidy way of including the output in a template? I gather there is no way to simply include an App Proxy liquid file into a Page as you can with Snippets, so does that purely leave either having the webpage at a proxy url or to pull in the contents with a jQuery call?
Your question is confusing. If you're on the front-end of a store, using Liquid, it seems pretty obvious you cannot easily access all customers. That would not be a front-end store thing. If you were logged in as a customer, with Liquid you'd have all that customer's order data.
With a clearer question, maybe you might get more help. What are you trying to do, and why?

Google+ Company pages

I am trying to access my company pages in Google+ via its API. However, I can find an endpoint that would return my company page?
I've looked at this endpoint, but I don't see a way of listing all of my companies.
https://www.googleapis.com/plus/v1/people/me
Any ideas?
Instead of the "me", you should be able to use the 21 digit code you'll find in the URL if you look at a page's profile.
You cannot currently determine what pages are owned or managed by a user. You may wish to star this bug to indicate your interest in having this implemented.