Page Templates |
Top Previous Next |
How AShop HTML Page Templates Work
If you have not already seen the tour of AShop, go back and look at the section about page templates. It describes how page templates are included by the program. The AShop page templates are simply HTML pages with the AShop start and stop tags inserted where the AShop content is to appear. They can include HTML, images, links, CSS, and JavaScript just like any other web page but they can not include PHP or any other server side code. If you are using a WYSIWYG HTML editor such as Dreamweaver, you can add the AShop script folders to your website and create the AShop templates just as you would any other page within your website.
AShop page templates are HTML web pages with comment tags <!-- AShopstart --> <!-- AShopend --> inserted into the HTML code. For the page templates, AShop's dynamically generated content appears between the two tags.
In addition to the start and end tags you will also need to add some code to make the templates use the right CSS file. Without this the layout and design elements of your AShop will not be activated and the shopping cart will be presented as unformatted text. Add the following line to the head tag of your templates to use the dynamic CSS file:
<link rel="stylesheet" href="<!-- AShopcss -->" type="text/css" />
A static CSS file is also included: css/ashop.css, which contains all the styles used by AShop. To get full control over the layout you can use this one instead or in combination with the dynamic CSS code above to override specific classes. Add this line to your templates below or instead of the previously mentioned line:
<link rel="stylesheet" href="css/ashop.css" type="text/css" />
Note: If a template is not present, AShop will generate a catalog page anyway and the default logo.gif image, which can be uploaded through the Layout menu, will appear at the top of the page above the dynamically generated content. When a page template is present, it's body tags, such as background, text, and link colors may override the default page settings made in Layout.
There are some other comment codes available that you can use in your page templates:
<!-- AShopname --> - displays the active Shop Name <!-- AShoplogo --> - displays the shop's Logo Image <!-- AShopcart --> - displays a shopping cart box <!-- AShopcategories --> - lists the product categories Note! Use this one with caution. It is not compatible with pages in subfolders, the delivery pages or the customer profile pages. <!-- AShopbgcolor --> - the page background color <!-- AShopmemberheader --> - a custom header defined by a shopping mall member
There are six templates used for the retail shopping cart and affiliate pages. If the wholesale shopping cart is activated, it has an additional 4 templates. The page templates can have the same or different content, depending on your needs.
Example templates are included in the distribution package for new installations. The template examples are not included in distribution of updates to avoid overwriting any customizations you have made, when you install the update.
Retail Shopping Cart & Affiliate Page Templates
The following templates are located in the templates directory of AShop. The <!-- AShopstart --> <!-- AShopend --> tags indicate where the shopping cart content is rendered on the page.
aboutus.html – used by the About Us page
affiliate.html – used by the affiliate sign up, login, and support pages
cart.html – used by the basket and shipping pages
checkout.html – used by the checkout page
payment.html – used by some payment gateways
customer.html – used by the customer profile and order history pages
delivery.html – used by the digital goods delivery pages
signup.html – used by the customer signup page
terms.html – used by the Terms & Conditions page
thankyou.html – used by the payment confirmation page
upsell.html – used by the upsell page
If you are not using the default advanced storefront (index.php) but prefer to use the simplified version (catalogue.php) you will also need to modify this template:
catalogue.html – used by the simplified product catalog and search pages
IMPORTANT! Many payment gateways will host your payment confirmation page through their SSL connection. When they do this, they take a snap shot of your page and nest it within their page at their URL. If this is the case, the hyperlinks within the thankyou.html template must use absolute URL's for links to work and for images to appear. In addition, image links should be https links so that browser secure/non-secure content warning messages won't appear for customers when the payment processor redirects to the thankyou (payment confirmation) page.
Wholesale Shopping Cart & Sign up Page Templates
These templates are used by the wholesale pages.
wscart.html - used by the wholesale basket and checkout pages
wscatalogue.html - used by the wholesale product catalog and search pages
wssignup.html - used by pages where wholesale customers sign up for an account
wsthankyou.html - used to display a thank you message page after a customer completes a wholesale order
Shopping Mall Page Templates
mall.html - used by mall.php, the member shop directory
membersignup.html - used by pages where members sign up for an account
|