-
Notifications
You must be signed in to change notification settings - Fork 61
Overriding Web Store home page with a custom index
By default, when a shopper visits your online store, Web Store will show the product grid with the first page of products. These are normally the first few products alphabetically (or in whatever order you've chosen under Tools->eCommerce->Admin Panel->Configuration->Appearance->Products->Product Sorting).
Web Store will allow you to override this and show a replacement page. The header and footer will remain (for example, the header image, tabs and bottom copyright bar), but the internal "viewport" will be overridden with your custom information.
To create a custom welcome or Intro page, here are the steps:
- Go to Tools->eCommerce->Admin Panel->Pages
- Create a new page (bottom link)
- For the Page Key, enter the word: index
- Enter a title such as your store name.
- Enter some in text in the large text entry blank. The large text box must have something in it (even if it's just a space) so you can Save these new settings.
- Below the large text entry blank, you have the Slide Show tags. You can optionally make a new keyword (such as "home") and put this in your products, as well as the Slideshow entry blank here, and the WebStore will then show any product marked with that keyword. See How to use Product Sliders for additional information on this feature.
As an alternative to the slideshow, you could create a large display graphic (see http://store.invertactionsports.com/index.php for an example of this). That would require uploading the display graphic to the site (normally in the "photos" folder where your banner graphic is) and then using an IMG SRC tag in the Text Entry box such as: <img src="/photos/homepagegraphic.jpg">
. (See the entry below on editing in Raw HTML Mode)
The fact you've used the keyword "index" means that the Web Store will use this page as the first default page instead of the normal product grid.
Normally the text entry box can be used for regular text, and the Web Store will format the text in proper HTML formatting. However you may also edit the HTML directly, which may be helpful for correcting mistakes or performing tasks which are a bit beyond the editor's capability.
To change to HTML mode, click on the small triangle above the editor box, then click the Source button as illustrated below:
If you wish to have a Web Store home page that is completely different than the template (not using the headers, tabs and footers), you can also modify the prepend.inc.php file to redirect to a different URL when going to the Web Store URL.
Edit the file /custom_includes/prepend.inc.php and add the code:
if(count($_GET) == 0 && count($_POST) == 0){
header('Location: http://yoururl/intro.html');
exit;
}
This will cause Web Store to redirect to a custom page upon a first visit. Note that your custom page must then contain links to Web Store that have GET information on the URL (for example, a category or product link such as http://www.webstore.site/index.php?c=28
), since any other URL will redirect back to your custom page in a circular fashion.