How to delete a file into the theme when the user uninstalls the app in the Shopify store.
I have tried to delete files and delete code into an existing file when the user uninstalls my Shopify app.
You are unable to delete a file. The reason is simple, Shopify has removed your API access token by the time you are made aware that they have uninstalled your App.
Better you do not litter a theme with your code. Instead, adapt to injecting content in sections and blocks using the new theme extensions. For older Apps, provide script tags for your JS, and instructions on what HTML or Liquid they might need.
Basically, injecting stuff into themes is bad news for themes in the Online Store 1.0. You cannot help it, but there is no recourse when they uninstall. You do leave a mess behind.
Related
I'm using this https://github.com/osiset/laravel-shopify package to develop Shopify public APP.
I tried to remove the code from the theme on uninstalling the app by overriding the AppUninstalledJob.
But, the function can't remove the code from the theme.
I have set the webhook for app uninstall, I getting the webhook response from shopify but API's are not getting call.
The similar issue I found here:
https://github.com/osiset/laravel-shopify/issues/188
I want to make an API call on app uninstall, can anyone help me with this?
Thank You.
You're not allowed to make any API calls when your app is uninstalled. Once this happens, you lose any rights to do so as your API access token received on installation is also deactivated.
Another point to be made here, if you are messing with a theme using your App, injected code into themes, you are doing it wrong. You should be ensuring that whatever you do, if a customer uninstalls your App, their theme is not destroyed by having a bunch of bad code in it. So that means you probably use script tags, proxy calls and as a last resort, create copies of theme files, and edit only those, so the merchant can replace your theme files with the originals.
In 2020 Shopify is allowing Apps to provide Theme Sections, so Apps that mess up themes should just disappear too.
Recently started work on a BigCommerce project and on the homepage I want to have a theme area where normal site admin users can upload their own images based on holidays (Xmas, halloween etc) in the theme editor.
I know how to add in some custom elements in the theme editor using the Schema and Config files (headings, text, font colours etc), and how to reference them in the homepage. I'm also fine with referencing set images in the assets folder which aren't going to change, and manually coding references to them.
However I can't quite seem to work out how to add a custom image upload to the theme editor, or how to reference it in a page. Can't seem to find any answers in the Stencil documentation or usual Google searches etc either.
The Stencil Theme Editor currently only supports the file upload data type in the Optimized One-Page Checkout customization settings, but there are a couple of possible workarounds to allow the user to upload their custom background image and then reference it in Theme Editor settings:
One option would be to have the user upload their image to WebDAV, making sure that their image followed a naming convention that you specified. For example, the Halloween image could be required to have the file name halloween.png. You could map that value to a Theme Editor dropdown setting for Holiday Background>Halloween.
Another solution might be to have the user upload their image to WebDAV as mentioned above, but instead of a dropdown menu, you could have the user type their file's name into a text input setting in the Theme Editor. Keep in mind though that there's a 64 character limit for input values.
Hope this helps!
There are 4 ways to get images into the BigCommerce store.
You can:
Upload into the content folder through webdav. Then the images would be referenced like url.com/content/image.jpg. This does require a webdav connection and while everything does point you to using file managers like cyberduck, you can actually map a drive to a network resource to make this super easy. This mean you can create a z drive that is actually your bigcommerce content upload through webdav. It's pretty easy to set up and for customers to use. The drawback is that these files do not get put on a CDN so there's a little loss of performance.
Upload into the theme's images folders. This is complex and would require your client to figure out the stencil local dev connection and push versions up to their store. This would allow the images to be CDN'd but is super complex and your clients won't figure it out... It could also expose you to some long-term version control issues as they may be overwriting you or vice versa.
You can use the media manager to upload images. If you're referring to them in code, an easy trick is when your clients want to replace an image, to delete it and upload a new one with the exact same name... then the reference doesn't break. This is the easiest way to deal with site-wide issues from the client-side. Images are CDN'd this way as well.
You can consider using the marketing banner function for semi-temporary marketing messages. This is what it is made for, the images will be CDN'd and it's full GUI with no techy connections for your clients to figure out. This is perfect for banners that span a single page, but I don't think there is currently a side-wide setting for locations.
Please I need some guidelines (or link of tutorials) in creating Joomla (3 - 3.5) website with the purchased template design. I wonder how professionals with experience are solving my doubts in practice.
Do you recommend the installation of the purchased blank template with a single installation and configuration of modules and components or installation of template with demo examples (Quickstart)? I know the differences but I was wondering how you are doing.
Till now I've almost always used the Quickstart installation.
I wonder if you clone the main menu (and other navigation and modules) and than you rename a copy for your needs and you change the content or you delete all navigation items except Home and than you are re-creating items according to your needs.
I'm not sure if I can copy the main menu or I copy only his necessary items and than delete overage of template.
It happens to me sometimes if I click on some of category it leads me to the main menu from original item, not to the desired custom copy, even though the path is set (the default items). Therefore, I am not sure which is better... copy main menu and items or to delete all navigation and content of the Quickstart installation and form my own navigation, content and modules.
In short, how to sort out all unnecessary items, and those that I am using should I copy and modify, modify existing, or delete all and make my own needed items.
I believe you will know my concerns.
Thank you and regards,
John
I have created several websites in Joomla with blank template and also with quickstart package.
Advantages with Blank Template
You will get the core theme without any unnecessary content and
basic modules and plugins. You dont have to delete any
contents/articles later.
You will be having authority to place modules at your desired positions. To check the modules position at the frontend simply do this http://example.com/?tp=1.
Disadvantage of Blank Template
There are some module style settings embedded in quickstart package that you wont be able to set yourself without going through full documentation. So sometimes your menu seems distorted.
Disadvantage of Quickstart Package
Deleteing unnecessary articles, removing unnecessary modules is a big headache.
Database size unnecessarily increases.
Steps I follow
I create a quickstart package in localhost and create a blank site with blank template in live site. Whatever settings I need I copy from the local website so that I am saved from removing unnecessary contents from live site. Also sometimes deleting some contents give rise to some other issues. Its better t go with a Blank template.
I am building a mobile app/mobile web solution in Appcelerator. I want the mobileweb to be capabable of going offline.
I am not using Alloy.
I want to be able to add the appcache statement to the index.html, I also want to be able to make other customisations to this document.
I am aware that I can make the changes after its automatically generated but these would be overwritten the next time I create the file.
Is there anyway to define elements that I want inserted into the index.html as it is auto-generated?
The only way to customize the index.html template is to do it in the Titanium SDK. This means you changes would affect all Mobile Web apps you build.
We wanted to allow you to customize the Mobile Web templates, but we never got around to actually doing it. :(
So, I recommend locating the installed Titanium SDK and copying it to something like 5.2.1.GA-MyApp, then customize the templates in mobileweb/src to meet your needs.
Yes, I know this is gross, but it's about the best workaround today.
I have 3 domains sharing the same Magento installation:
mobilmonster.com, mobilmonster.it and movilmonster.es
For some strange reason domains mobilmonster.com and movilmonster.es look ok but mobilmonster.it template is all messed up. (sorry I can´t be more technical than that)
I´m not sure if it´s a missconfiguration from my behalf or there´s actually something wrong in the code, a deleted file, etc.
All suggestions welcomed!
you are missing design to be set for the site. check attched screenshot.
After doing this delete the cache directory from var directory or FLUSH ALL MAGENTO CACHES.
Maybe you setup the addon domain incorrectly so its not inheriting the design.
Or in some cases, you have to select the store view, and resave the theme settings. Some themes generate settings based css, and has to be regenerated by resaving the settings, and flush cache.