How to include custom javascript file to amazon webstore?
To include a custom js file in Amazon Webstore you:
1.From the homescreen click the customize url button
2.Select "use your own domain name" * Even if you dont plan to use your own you still must choose this.
3.In the custom url field it should say either example.webstorepowered.com or example.hostedbyamazon.com, change your domain name to example.hostedbywebstore.com
Where example is whatever your store would be named
4. check the confirm button and submit.
5. Go to "store design" "file library" from the dropdown and upload your js file to the appropriate folder.
Noe this file will appear with a red "x" over the top of it - this simply means you cannot use this file on any checkout or processing pages so amazon can ensure the integrity and security of the sales.
6.Next you will want to go to "store design" "merchandizing and layout"
7.click "properties" in the upper left corner
8.Choose "css and js" and select and the file so you custom js is loaded with all the other amazon required files.
That should be all you need. I just recently figured this out so post if you have any more questions.
Go to one of the main template pages under "Merchandising & Layout" click Properties on the top right and upload a js file to be included.
You can also place inline script tags within the widgets.
You can insert a script in the page with greasemonkey script, or userscript in the userscript folder in Chrome/Opera.
Related
I've installed a theme (that i bought) that's mainly made with Elementor.
Since I've been running into some issues with customizing this theme, (and still refuse to also pay money for Elementor Pro) I decided it would be easier to create a custom template myself.
I have done this before when I used a custom theme I made myself from scratch (I thought I was saving myself some time this time around...).
So my problem: I saved this template called page-home.php to my Child theme (that I made of the purchased Theme) in a folder called page templates.
It is not showing in the drop down menu when creating a new page.
I then just copied it to the main theme, activated that...and still not showing.
Is this because the Theme is using a page builder like Elementor?
Or do you think the creator of the theme somehow disabled this option?
Thanks in advance for any help.
As far as I know Elementor ignores the most of the standard theme file. It does so i.e. with the header.php for sure. The question is what do you want to put in a theme file what you couldn't do with Elementor. Have a look at the
"Hello Theme" https://github.com/elementor/elementor/issues/14283 - it's a plain theme.
If you don't want to pay for Pro, I recommand the plugin "Elementor – Header, Footer & Blocks Template" (and for better editor handling: "Flexible Elementor Panel")
I've got a multilanguage ModX site. And noticed that when changing languages, it displays a different logo. WHat I need to do is to setup same logo for both languages. Basically:
English side showing: logo.png
Other language side showing: logo-new.png
I don't want to replace logo-new.png file with the correct image file on server in case another part of the site uses that file. So I'm left with actually editing the site header to show the correct logo.
When I go to ModX's site template, I see this code for the header:
<img src="[[++site_logo_img]]" itemprop="logo" class="site-logo">
So my question would be, where do I go to edit the ++site_logo_img value?
For web context try to look in system settings, for other contexts in context settings - https://rtfm.modx.com/revolution/2.x/administering-your-site/contexts
[[++site_logo_img]]
This is a MODX setting, these can be found in settings or in context settings.
Lets say you need a different logo for 2 MODX contexts, you can set a site_logo_img different setting in each context.
In building on a previous question (Kentico v9 how can i detect when a user is in CMS desk with JavaScript), I have added a JavaScript webpart to load in my analytics.js file. Here's my code snippet:
<cms:JavaScript ID="js"
ViewMode="LiveSite"
LinkedFile="~/CMSPages/GetResource.ashx?scriptfile=/KFF/global/scripts/analytics.js"
LinkedFilePageLocation="beginning"
runat="server"></cms:JavaScript>
I can not figure out how to get this to load the JS file at the bottom of the page. What am i missing?
The Linked File Page Location is the key. There's one that renders it wherever the webpart is placed. You need to add a Web Part Zone at the bottom of the page and add them there, or if this is pure aspx then add this tag near the bottom, but the LInkedFilePageLocation should be Inline (i believe, see what the options are)
EDIT
The proper value is "startup" to make it render wherever you place it.
Currently I'm having trouble adding custom/my own css files to my SharePoint site. I add the custom/my own css files via the c# files (CssLink) as a web part and have them applied to my site's javascript files. Trouble is, whenever the css files were applied, my site goes back to the default blue-ish SharePoint theme color.
Is there any quick and simple way to avoid that from happening?
Thanks.
You can use this method to register a css file from a WebPart
Microsoft.SharePoint.WebControls.CssRegistration.Register("/.../mystyles.css")
or you can add the css file to the content place holder with the id "PlaceHolderAdditionalPageHead" which is present in the master page like this
var placeholder= Page.FindControl("PlaceHolderAdditionalPageHead");
var cssLink = new Literal();
cssLink.Text = "text";
placeholder.Controls.Add(cssLink);
Why don't you use, Site Settings, Master page and use the option "Specify a CSS file to be used by this publishing site and all sites that inherit from it." to specify your own CSS.
(Also, I have no idea what you mean with "via the c# files (CssLink) as a web part and have them applied to my site's javascript files". Are you missing some words in that sentence?)
You should have a very good reason to be adding CSSLink via C#. Have you considered packaging your CSS as your own theme?
SharePoint themes are easy to create and have many benefits such as:
a) Supported by Microsoft
b) Easy to create
c) Manageable by the end users.
d) You can apply different themes to different parts of the site.
e) etc etc...
The process of creating the theme can be found here:
http://sharepoint.microsoft.com/blogs/GetThePoint/Lists/Posts/Post.aspx?ID=122
I would recommend adding your theme via a feature only for adding and removing the theme. This would add a great deal of options for future tweaking.
Here is an example:
http://www.devexpertise.com/2009/02/11/installing-a-theme-as-a-sharepoint-feature/
I'm going to blog about this later this week so keep an eye out of you like. http://blog.zebsadiq.com
Upload your css in the syle library folder(or any library in side your site)
go to -->site actions-->site settings-->modify all site settings-->under look and feel tab-->click master page-->there is one option called alternate css url-->browse your custom css and click Ok.
I am using Sharepoint service to create a webpage. I have an image - the logo on the top-right of the homepage - and am wanting to put a hyperlink so when it is pressed it takes you to another site. How would I do that please?
UPDATE
Next time I'll read the question more carefully. I mixed up right with left and thought he want to change the logo in the top left next to the site's title.
The question is, should the link point always to the same target and should the logo be always the same one or will the link target and logo differ from site to site?
If it should be always the same logo then editing the master page would be the easiest solution.
For different link targets and logos you have to plan a little bit more. First you'll need a place where you could store the link target. I think the SPWeb's PropertyBag would be a good place therefore. Furthermore you need a place to store the you logo. In this case a library on the new site will do the job.
Finally I would implement a control that creates the HTML to display the logo with a link. The control retrieves the logo (logo's url) from the library and the link target form the actual site's PropertyBag. So the last step would be to replace the old logo control with your new one.