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.
Related
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?
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.
i have searched on google without succses. I whis to display a custom page when i publish my website on iis 7. I know about the Offline.html or something like this. But i whant the process to be automatic on publish. Display a page like : we are upgrading the website, it will be avaliable in a minute.
Now when i publish my mvc site, it can take up to 3 minutes, it only display an error.
Tanks.
Ps: sorry for my bad english, it's not my first language.
You can create a file called app_offline.htm in the root of your site. If this file exists then its contents will be displayed instead of your site. You can then deploy your site, and then just delete or rename the app_offline.htm file when you are done.
I have an ASP.NET MVC 4 app that runs in IIS 7.5 on Windows Server 2008 R2 the site loads fine images show, javascript & css link tags when click shows 403 - forbidden access.
I already tried lots of fix that I googled such as Installing the Static Content in the Role Service which is now installed also put in the runAllManagedModulesForAllRequests=true in the config. also set the folder security of my website in the wwwroot to Full Control for IIS_IUSR and Everyone and inherit them to subfolders and files but stil nothing.
dont know why it does not work in windows server 2008.
But in my windows 7 running iis 7 it works fine css & javascript renders just fine.
Please help..
I would like to suggest one thing.
As you have tried all possible option like aspnet_regiis -i
I would like to test one more option.
Add your site in internet explorer trusted site list.
Internet Option -> security -> trusted sites ( click buttion sites)
Add your site with domain name into that and access it.
Also it would be nice if you provide where you hosted your css and js file. ( Is it hosted on diffrent site on same site content ?)
My ASP.Net MVC app is an intranet app, and in the HTML, I put an anchor link to PDF files that are stored on our network. Chrome does not open these files in the browser if you click on the link, however if you copy the link off the webpage and make a new tab, paste the link in, it will open.
Now, both the app and the files are on the same domain so how can I get PDF to open automatically in a new tab? I have looked at the various Chrome extensions, but they don't seem to work. There must be a way to get local/network based files to open in your intranet using Chrome, please don't say I have to resort to awful Internet Explorer!
Any help much appreciated.
Have you tried to use HTML iframe tag to display the PDF?
Example:
<iframe id="frameID" style="border:1px solid #666CCC" title="PDF in an i-Frame" src="PDFData.pdf" frameborder="1" scrolling="auto" height="1100" width="850" ></iframe>
Out of date for you, but I recently solved this problem on an apache2 server on ubuntu. I believe it's a matter of security from the client browser- so that a webpage can't open client files maliciously
What solution was
mount the network share drive on my web server
html point to pdf inside the mounted drive
(Optional on Apache) use a .htaccess rule to prevent folder indexing (listing all files/folder)
therefore the webpage was opening its own file, not the clients; so firefox/chrome/et al will allow this to happen
The fix should be in your mvc project . Just make sure the action returns FileStreamResult . example:
return new FileStreamResult(new FileStream(filePath, FileMode.Open), MimeMapping.GetMimeMapping(filePath));