Where is the shopify editable html? - shopify

In a traditional website I would simply open the 'contact' page and add the line then upload. But i'm having difficulty understand the multiple components of shopify's theme, sections, snippets.
So my question is if I want to add a simple text line say in the homepage, where would I add this html?

It depends entirely on the theme you are using. A lot of modern themes have draggable sections which can be accessed via Themes - Customize.
If your theme doesn't have this functionality, or any functionality to add text to the homepage, I'd be surprised. But if you need to edit it by editing the code directly you can access the pages via Themes - Actions - Edit Code. The homepage will usually have a name of index.liquid.
Rather than just adding your text in there, though, I recommend you learn how to add snippets and sections to your website. It makes future edits much easier and doesn't take long at all to learn.
The beginner's guide to building shopify themes with sections
Shopify: Theme Sections

Related

Customize Shopware 6 invoice PDF

I'll change the template of the invoice pdf template in shopware 6.
The template self seems to be stored in the database in the table "document".
The pdf is generated by php.
Anyone knows, how to get a complete own customized template ?
The configuration in the backend is not enough.
Thank you.
I wrote an example Theme some time ago, that is extending the basic template: https://github.com/mnaczenski/SwagDocumentTemplate
The core template is located here:https://github.com/shopware/platform/blob/trunk/src/Core/Framework/Resources/views/documents/base.html.twig
So you can overwrite the file in your own theme like described in the documentation by extending the twig file and placing it in the right folder: https://developer.shopware.com/docs/guides/plugins/themes/theme-base-guide
Extend in Twig: {% sw_extends '#Framework/documents/base.html.twig' %}
Folder structure: /src/Resources/views/documents/base.html.twig
Generated PDFs are stored in the database due to German law, they can't be changed after generation. But new generated PDFs are based on the template.
The easiest way to customize your invoice templates is to use the WYSIWYG Document Editor. You can either customize an existing document or create a completely new document. Using one of the predefined document templates provides a good starting point for you to apply your customizations. But you can also start with a blank page.
With the visual editor, you can easily add new elements and variables and see your changes in the live preview. This will save you a lot of time in comparison to going back and forth hundreds of times between making adjustments in your Twig Files and generating new PDFs for testing.
Here is a YouTube Video, which shows you how easy and fast you can edit all your documents: https://youtu.be/fGBMDmVMPvA
I am the developer, which created the WYSIWYG Document Editor Shopware 6 App. Feel free to ask me any questions about the App. I am happy to help you.

Where does the code for the About page for my shopify site live?

I am trying to simply edit the format (float from left to center and remove two column layout into one column) of my about page on my Shopify site.
I have edited the html of the page directly using chrome dev tools (to confirm what I am doing is going to make the page look like I want it to).
My issue is that Shopify has a specific global section in the admin where you can edit just the content of the about page. Unfortunately, I cannot seem to find anything on that page that allows me to edit the pages code directly.
And when I look at the theme code for the main site, I cannot find any .liquid files that seem to be related to the about page.
Anybody with Shopify coding experience able to point me in the right direction?

How to change in template through the Shopify application

I am trying to write a Shopify application and I want to add a section to the product page when the store owner installed my app. I tried this by adding a custom script tag in the shop template and this tag will load and inject my desired HTML into the page. It's work but it needs to force the store owner to change the product page template and its not user-friendly.
I see some apps in the Shopify app store that can change the product page after you install them without needs add any part to the product page template. How they do this work? I can't find the correct way in the Shopify documents.
You can change the Shopify theme of the shop using The API for Assets:
However as drip mentioned this is not a good idea:
If you change the theme auto-magically via code, you are looking for trouble. A lot of things can go wrong - simply you cannot cater for all themes and their changes over time! So you could possibly leave a broken page after the change. The e-shop owner won't be impressed! Actually a lot of the 1* reviews of apps are for that reason!
What would happen if the eshop owner removes your app? He won't know what code to remove.
So, most apps ask the user to add the app code. They provide detailed instructions of course.
Fyi, another problematic approach is the following:
Some apps may attempt to change the DOM "on the fly", by first locating an existing DOM element (a lot of theme-specific if statements to do that with any degree of success) and, then insert the app's DOM elements.
That's very messy and problematic as well, but at least you do not risk ruining the owner's theme files. In the worst case he can uninstall your app and he 'll be ok.

Prestashop how to customize theme

I have bought leo_chopin theme (because client asked for it). My question is how to customize a theme from html/php/css editor and not from admin panel (it's too constricting). I wouldn't hardcode, but use hooks. This is the first time I'm using Prestashop and that style of programing... For example, where to call my own header.tpl, footer.tpl, content.tpl?
Thank you in advance for your help.
Go to your_site_folder/themes/leo_chopin/ and you will find header.tpl, footer.tpl.
You can modify these templates there or make a copy of a theme into another folder and modify it.
All content between header and footer depends on a page controller. All controllers for the front are in a folder your_site_folder/controllers/front/. ProductController.php is for product pages, CategoryController.php is for category pages, IndexController.php is for the home page etc.
You can find more in Prestashop documentation: http://doc.prestashop.com/display/PS16/Laying+the+Theme's+Foundations.

How to customize the page?

I'm attempting to customize the Piranha CMS system. I'm interested in changing the layout, setting up my own styled menu and tweaking where the content on the page shows up.
Is the intent that I modify the _Layout.cshtml file to my liking?
If there's a page in the documentation that covers this, please helpfully provide the link. :)
Piranha CMS is just a framework for content management, not a website template with widgets, themes and stuff like that :) With that said, a basic Piranha CMS project is basically a standard MVC project with two included controllers, one that loads the model for a requested page, and one that loads the model for a requested post.
This means you can do anything that you can do with any normal MVC application when it comes to styling and modification.
There exists some helpers for rendering Menus, Breadcrumbs and so on. Documentation for the helpers can found here:
http://piranhacms.org/docs/api-reference/site-helper
http://piranhacms.org/docs/api-reference/ui-helper
For the helper methods that render html there are hooks for overriding all content rendered so that you can change the standard menu to your own style of html if you need. Documentation for the hooks available can be found here:
http://piranhacms.org/docs/api-reference/hooks
Regarding what can be achieved with Page types and creating templates with different regions you can check the following pages:
http://piranhacms.org/docs/pages/page-types
http://piranhacms.org/docs/pages/page-model
http://piranhacms.org/docs/pages/regions
http://piranhacms.org/docs/extend/extensions
I hope this helps you a bit.
Regards!
HÃ¥kan