How to inspect html code in Prestashop to link to the PHP TPL files - prestashop-1.6

It is my understanding (prob completely wrong) that the php/tpl/etc files of a Prestashop site create the html page(s) of my website (see image).
Im using Developer tools on Firefox Quantum Dev edition. I can see how my page is displayed in the code (and how it links to my webpage) but I can’t see how this relates to the addresses.tpl file (opened in Notepad++ (set to php language)) and how i work backwards to comment stuff out.
How do you work back from the html code in Prestashop to find where to alter the PHP TPL files/code?

Related

Why does my electron app display the source code in the browser window?

I made an electron app, and when it opens, it shows the actual contents of the php file (it's not just php, there's html of course). I was wondering how I can get it to display the html in the browser window and not just the source code of it.
Edit: I just fixed it by making it an html file and not a php file, but is there any way to make the electron app execute php code?
In Short. No.
Php needs a php interpreter which is part of a large number of web servers, whereas Electron is using Node.js - a server side JavaScript environment. So there is no way I know of you can execute php in Electron. (Beside bundling a complete web server like Apache inside your Application, but that would take a lot of effort)

Joomla base URL incorrectly formulated

Somehow my Joomla after an upgrade from 3.4.7 to 3.4.8 is not formulating the base URL properly. The base is supposed to be "www.domain.com/en-us/" for the English version of the site. It renders the following as the base url "www.domain.comhttp://www.domain.com/en-us/www.domain.com/"
further rendering the following url for resources, such as for "green_leaf.png": "www.domain.comhttp://www.domain.com/en-us/www.domain.com/images/green_leaf.png". Consequently, the pages full missing page elements.
SEF is enabled. Multi Language Filter Plugin is enabled. Any ideas what could be the cause of this besides, the configuration and the htaccess files? Those file are pretty standard.
The first things I would confirm are
- in system > global configuration > site -- is URL rewriting set to yes and have you renamed htaccess to .htaccess?
- if yes then ftp to your site, open configuration.php in a text editor, locate the line setting the $live_site variable and change to
public $live_site = 'http://www.domain.com';
Good luck!
I have tried your suggestion, to specify the $live_site variable in the configuration.php file as you indicate, even though I have also been recommended to leave it empty. The results were the same, the issue remains.
Here is the latest on this matter:
I have created a local copy of the site on my machine from a backup that was still Joomla 3.4.7. The same issue appears. I have reverted back to an earlier backup with Joomla 3.4.6 version of the site, and the site's page was restored to normal. This is with the same exact .htaccess and configuration.php across the 3 Joomla versions.
I have also tried with "Options +FollowSymLinks" commented out in the .htaccess file that came with J3.4.8. On both the live hosted site and a locally hosted copy, same exact results, namely:
Using Google Chrome (with Language Filter Enabled and set to Remove URL Language Code)
On the live hosted site:
www.domain . comhttp://www.domain.com/www.domain.com/
On the localhost copy of the site: localhost/domainfolder/localhost/domainfolder/http://localhost/domainfolder/localhost/domainfolder/domainfolder
So this issue might be pertaining to Joomla versions 3.4.7 and 3.4.8. The challenge is that 3.4.6 also has critical security vulnerabilities.
Also tried with Language Filter Disabled - Same result (Base URL formulated as above) with the difference that all the languages are displayed at the same time on the home page with the resources that are not found because of the faulty base url.

Mathjax not working in browser when hosted on Google Drive

This is first time I'm driving to use Mathjax, the maths is written in LaTeX, it works fine when I open the page locally, but when I host the same page on Google Drive, Mathjax no longer works, I only see the LaTeX code.
Here is the link to the webpage.
https://googledrive.com/host/0B6DfW2X25tuNck9yLTFSX2hiTEE/Group%20challenge%20Topic%206.html
And here is my code.
https://drive.google.com/folderview?id=0B6DfW2X25tuNck9yLTFSX2hiTEE&usp=sharing
I have tried everything, I'm using latest Chrome, so it shouldn't have any issues loading Mathjax
Since Google Drive is using a https:// URL, you need to load all your resources via https as well or you will get a security violation (check the browsers console for these). So that means you need to use an https: URL for MathJax. The MathJax CDN provides an alternate URL for that: https://c328740.ssl.cf1.rackcdn.com/. See the MathJax FAQ for details.

How to edit OpenCart themes offline?

I'm new to OpenCart. Unlike normal websites where you can edit the index.html offline and view your changes on a browser, OpenCart has no index.html. Since they work by combining "parts" of html using php, how do I edit my themes offline instead of editing them over my ftp?
My browser does not open OpenCart's index.php file too.
Opencart uses PHP to generate HTML files. To 'view opencart in your browser offline' you need to run a localhost. This means running apache with PHP and a mysql database on your computer so that the PHP will 'run' and generate your output HTML files that you can view in your browser.
If you're on a windows computer look up XAMPP or if you're on a MAC look up MAMP.
Windows Instructions
Mac Instructions
This is how developers create and edit templates for a range of PHP based CMS and eCommerce systems offline.
Opencart does not have an index.html instead it has index.php, so first of all you need to install PHP xampp or apache server and mysql to run opencart on your localhost. Opencart uses templates And if you want to edit pages and see the changes you can edit the templates. Or if you want to change the default page after opening the site, you can create a page and a controller for it and change in the index.php in the end of the file there is a
$action = new Action('common/home');
you can give your page here.

Dynamically built word document (.docx) is corrupt when saved and opened from an asp.net page

I have built a basic website for a company where I build a word document(.docx) file dynamically by using a template word doc and content controls and Open XML SDK. Its an ASP.NET MVC 2. I used the same code shown in this link where they build a Sales Contract document using Open XML. You can find it at almost the last section of the page seen in the following link:
http://msdn.microsoft.com/en-us/library/dd469465(v=office.12).aspx
My problem is everything works fine on my development system. But when I host the application on GoDaddy servers and at the end when the Word Document is saved, Microsoft Word says the document is corrupt and has to be recovered.
I saw a similar question in the following link:
Why are .docx files being corrupted when downloading from an ASP.NET page?
I tried the same and it did not work for me and I get the same error and now I am clueless as to where the error actually is.
Any help would be greatly appreciated.

Resources