I have a shopify test app (written in rails) here:
http://csiga-second-shopify.herokuapp.com/
How can I make a very easy app, that is includable by a store owner.
I'd like to do it similar to AddThis app.
( http://www.addthis.com/shopify/preferences#.UCPF28ge6CU )
How to connect {% include 'foo' %} function to my deployed app?
If you want to add an Asset to a Shop when your App is installed, you have to first have the merchant approve your App for adding assets to the shop. Second, you have to install your asset, in this case 'foo.liquid'. Once it is an Asset in the shop, you could have the theme reference the asset, using include.
Note that this is a little tricky since when the merchant uninstalls the App, any assets you installed are not automatically removed. That could be considered litter.
Where you want to add {% include 'foo' %} in your deployed app??
And AddThis link does nothing but just redirects to the login page of Shopify. If you want to publish your app first built it then get it tested on the Shopify Test Commpunity present on google groups and then send it for publishing. After 15 days they will reply with the message saying your app has been published.
You cannot add with current APIs what Shopify provides any liquid code into their page. You can add Javascripts which can even act as stylesheets to it.
Related
I have a website and it's domain name is
doiniqbazar.com
I developed this site using laravel framework.When i send a link "doiniqbazar.com" to my friends in facebook messenger it show the applicaation name "Laravel".
I changed both .env file and config/app.php file but still not
working.
Is there any procedure to change laravel app name??
This display has nothing necessarily to do with your app name.
It'll grab this from the <title> or og:title meta tags in your HTML. (You may be outputting the APP_NAME value here.)
Facebook has a handy tool for debugging this sort of sharing metadata issue.
Note: It may also be cached. Facebook's debugger reported the same Laravel title in your title tag; when I did a re-scrape it picked up your new title. Apple will likely do the same after a while; I'm not aware of a re-scrape API on their end.
See also: Best Practices for Link Previews in Messages
I am new to shopify, I want to create a public app which can communicate with store.
I have created a shopify partner account, an app and setup a Codeigniter project. Also added app url using ngrok.
Can anyone guide me with what should be the next step?
When you say public app I believe that you want to set a view or functionality available to your customers, and that will communicate with your store. Let's say your store is:
https://mystore.myshopify.com
Your App should consider an URL for backend and frontend. Probably the App that you have now is the backend and will be embedded in your Admin Dashboard after you have installed. By now, I'm assuming that you got it done.
Backend: https://4b67b991.ngrok.io/backend
Frontend: https://4b67b991.ngrok.io/frontend
The App you created should have the scope "Online Store" so that you can set up a Proxy App.
Once you set up a Proxy app, with let's say:
Sub path prefix: apps
Subpath: myapp
Proxy URL: https://4b67b991.ngrok.io/frontend
Now, when you go to: https://mystore.myshopify.com/apps/myapp, the proxy URL will be embedded in your store using the header and footer of your theme and in the middle area, you can create your custom functionality using the Shopify API.
Before your app can be embedded in the frontend (with header and footer), you should change the content type of your document. In Laravel I use the following code:
$response = Response::make($contents, 200);
$response->header('Content-Type', 'application/liquid');
Your question is quite general and I'm 100% sure about what you want to achieve, but I believe that it's a starting point.
In a Django Project of Django-allath, I'm overriding the Django confirmed email template and HTML shows correctly.
My question is how to add a personal image in it?
I put the image into the Django app static path:static/images/imn0.png and I add the image by this way: <img src={% static 'images/img0.png' %},
-------What I have done for the issue ------
I also added the tags {% load account %}{% user_display user as user_display %}{% load static i18n %}
-------What I think in this issue ------
Actually,I have seen the difference between the urls:I can get the images of Django in the static file by:'0.0.0.0:8000/static/images'.However, when I open the email template in allauth ,it tries to get the images in '0.0.0.0:8025/static/images'.This is the reason why I failed.But I don't know how to fix it.
I can't understand the existing problem that prevents this to work.
Yes!!! I can solve it.
If you want to add some personal images(icons) to your custom template, you can byte image .(http://imgbase64.duoshitong.com/).and use the src = "". It will be work.
I'm developing an application where users can create their own web pages. For this, they can create static HTML pages from their admin panel. Then this pages can be published on their web pages.
The fields of a page are: id, title, content, url.
The functionality is the next:
Users has their own templates, this template includes a file called base.html where are the header, body, etc.. and all pages that they create inside the admin panel will be displayed inside this base.html file. So that "pages" they create in the backend only includes the content of the page, not the header, footer, etc..
Also, the application allows users other functionality like a blog, and users can use some variables to display content inside their pages. Eg:
{% for post in last_post %}
{{ post.title }}
{{ post.content|slice(0,255) }}
{% endfor %}
Nowadays I'm saving this pages in MySQL and when a page is requested I search into MySql by the url field. The traffic has increased and I want to speed up the reads from the database and I have thought in use ElasticSearch for this.
My question is if could be a good idea, continue saving this HTML pages in MySQL and also in ElasticSearch. Then when a page is requested from the web page of the user make reads from ElasticSearch.
Thanks in advance for help
You can use elasticsearch - but just for a Key-Value lookup, it may be overkill - It makes more sense if your query is more than a key value lookup.
Have you considered using redis to speedup things ?
Ok so I’m trying to implement social media into the footer. However, they are images that change color when hovered over that I’m working into the CSS.
But my question is, if the end user changed their Facebook URL, how will they update the url? I obviously can’t just put it directly into the theme because then the end-user will know how to program and where to look just to change the URL.
How do I go about implementing this the right way so the end-user can update their social media URLs to their Facebook/Twitter/YouTube/Etc easily..?
What do you mean by saying "user changed their Facebook URL"?
You talking about customer or administrator?
If you mean administrator, then the you can create custom settings for social media links
For customers store theirs social uids
In order to do this, you will need to create an extension, albeit not a very complicated one. If you've never done this before, Alan storm wrote an excellent tutorial.
One file that is often included in extensions (but seems not to be mentioned in the above mentioned tutorial) is etc/system.xml. This file lets you define a new page in the System->Configuration section of the Magento admin panel. Magento provides a good tutorial on writing those.
Any fields you put in etc/system.xml will be modifiable in the Magento admin panel, and you can access them anywhere in your code with Mage::getStoreConfig('your extension's name/the name of the field'), e.g., Mage::getStoreConfig('facebook/enabled');