How Do I Get MetaObject Values On Single MetaObject Page In Shopify - shopify

I am using metaObjects in shopify. I have created a metaObject name "Projects" . I created a page "Projects" to display those saved projects through liquid code. It is working as per the requirement on Projects page but now i want to display each project detail on single page. How do i approach this ? Like should i create a page and set a template on it and in that template , fetch the metaobject handle to display its details . I am facing issue like how do i call the same single page for all projects details and display its details. Can someone please guide what is the possible way to get each metaObject values on single project page .
Thanks

Related

How to access code of a specific page in shopify?

I am building a Shopify website https://fone-kase-plus.myshopify.com/.
For example, I want to modify code of this page only: https://fone-kase-plus.myshopify.com/pages/iphone-6 .
How is it possible to do it?
If you go in the admin, and to that page (from Online Store/Pages) on the right you will see "Theme Template" and a name. That's the template that is applied to that page.
That name is a file in your theme under templates with a name like page.your-template-name.liquid.
If you copy that file and create another one like page.another-template-name.liquid you can then apply that template only to the pages you want. Then you modify that template file to make a page as you like.

Liquid - get product ID and display custom/specific information dynamically

I am trying to add a small 'lockup' / promo to a page that loads information dynamically based on page.metafield information. Replacing images, video ID's etc. Which all works just fine.
My client is asking for a small area to display a product that relates to this dynamically changing content and I am struggling to come up with a good way to do this.
The current setup is that we have 30 pages with a set of 8 metafields each page. Each one of these pages must show a different , single product with an image, title, price, buy button and another button that links out to a partner site.
I can create snippet and load almost all of this info through metafields manually (price, title etc the client could just add to another metafield) but I would prefer to load a product to pull this info so it can be added to cart. Although I can add product data manually, I still don't actually know which product will get added to the cart, because I'm on a 'page' not a 'product'.
The products themselves are using a custom template that is different to the rest of the site so that seems like its not an option. The template for this content page is just 'page' but surely I can call the product object someway? If the client entered a product ID in the metafields, is there a way of pulling that IDs data easily?
Whatever you mean by pulling ID's, but there are a couple of ways of dealing with this. One, you have a Storefront API token, allowing you to freely and securely call Shopify with JS and get back all the data about the ID you're interested in. Or, you have an App installed in the store, in which case you can setup and callback an App Proxy, providing that ID, and getting back all the info you need. Lots of options!

How to get data in dashboard with Scrapy?

I'm scraping some data about car renting from getaround.com. I recently saw that it was possible to get cars availability with scrapy-splash from a calendar rendered with Javascript. An example is given in this url :
https://fr.getaround.com/location-voiture/liege/ford-fiesta-533656
The information I need is contained in the div tag with class owner_calendar_month. However, I saw that some data seem to be accessible in the div tag with class js_car_calendar calendar_large, in which the attribute data-path specify /dashboard/cars/533656/calendar. Do you know how to access this path ? And to scrape the data within it using Scrapy ?
If you visit https://fr.getaround.com/dashboard/cars/533656/calendar you get an error saying you have to be logged in to view the data. So first of all you would have to create a method in Scrapy to sign in to the website if you want to be able to scrape that data.

How do you generate a URL with custom variables on each product page?

I need to generate a URL link on each product page. Each URL needs to contain custom variables specific to that product.
Like so : www.example.com/{{keywords}}/{{productID}}
My understanding is that any custom variables must be saved as metaTags.
My logic to generate the URL is as follows
Create an Embedded App.
Display a dropdown list containing all products.
Display input fields for the user to populate with the text for "keywords" and "productID"
Save this information as Meta Tags so it can be accessible within the Liquid templeting.
Example Mockup of Embedded App : https://imgur.com/D9Grv4m
Example Mockup of Generated URL: https://imgur.com/yjUb9JU
How do I solve the following issues?
How do i save "keywords" and "productID" variables for each individual product.
How do I generate a URL with these variables and populate them on each product page?(I can do it manually through editing the theme but there has to be a way to do this programmatically)
You cannot generate an URL like:
www.example.com/{{keywords}}/{{productID}}
With Shopify you instead use
www.example.com/products/product-handle
And on that product page, you can do as you please with the product ID, and any metafields you choose to maintain and create.

Querystring filter for PerformancePoint

Keep in my I am using Dashboard Designer, SharePoint 2010 and PerformancePoint Server 2010.
I have a dashboard homepage showing a KPI for sales, by brand. I added a custom property "View detailed report" on my KPI. When I click on that, I want to be able to go to a second dashboard page featuring 5 scorecards and 2 reports for my sales, by brand. The brand needs to be a filter.
Obviously, what I wanted to do is to tell my second page on which brand to filter by using a querystring parameter, something like ?BrandFilter=[Brand].[X].[Y] ...
But, in Dashboard Designer, you cannot (?) have querystring based parameters. I know I can do it directly in SharePoint (with the corresponding web part), but then when I deploy my dashboard again, I lose custom changes I do to my pages.
I tried to create a custom transform for scorecards that would read the querystring and add PageFilters, but I faced two problems:
1. I cannot access the HttpContext from there (of couse!)
2. That would not do it for reports.
What should I do? Drop Dashboard Designer and work directly in SharePoint? I wish there is a solution with Dashboard Designer!
Thanks!
I found a way to do that. I customized my scorecard generation (using C#) and added a javascript method to my master page to handle all the links that are clicked. When I click on a link in a scorecard, I get the parameter from the current URL and update a filter inside the page with that. I can share more details on request...