Mini Cart and Register and Login Links on More Info Pages

Questions and answers about ShopSite Custom Templates

Mini Cart and Register and Login Links on More Info Pages

Postby alexus2005 » Thu Jul 07, 2011 12:56 am

Hi,

I am new to ShopSite and have been working on my store for a week now. Here is a quick question:

I have an include file header.inc and it's working fine on regular pages, but when I use it from the More Info template, it doesn't let me publish and returns this:

Template Error: Page tag is Illegal for this type of template


Here is the code that is on that line:
Code: Select all
[-- RegistrationSignIn --] <img class="inline-img" src="/store/media/fff/spacer.gif" />


Why wouldn't it let me use registration links and minicart in the More Info page template?

Thanks in advance,
Alex
alexus2005
 
Posts: 14
Joined: Fri Jul 01, 2011 2:00 am

Re: Mini Cart and Register and Login Links on More Info Page

Postby Jim » Thu Jul 07, 2011 6:08 am

A [-- Page.... --] tag can only be used on a store page, that is a page that can be found in the Pages screen in the backoffice and use page templates. Moreinfo pages are not part of the pages they are part of a product and defined in the product template. So look for any tag that has [-- Page. ... --] and change that to be something that can be found in the product fields or one of the global tag. Note that the line number may not match up exactly because of empty or commented out lines and also may be affected by include statement.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Mini Cart and Register and Login Links on More Info Page

Postby alexus2005 » Thu Jul 07, 2011 10:56 pm

Hi Jim,

Thank you for your reply. I checked the template for any PAGE tags and it doesn't have any :/ Is there anything else I can do?

Below is the code:

Code: Select all
[-- DEFINE PRODUCT --]
<a href="[-- PRODUCT.MoreInfoURL --]">
    [-- IF PRODUCT.DisplayGraphic--]
        [-- IF PRODUCT.Graphic --]
            <img [-- PRODUCT.Graphic Remove_HTML --] alt="[-- PRODUCT.Name --]" />
        [-- END_IF --]
    [-- END_IF --]
    [-- IF PRODUCT.DisplayName --]
        <span class="product-title">
            [-- PRODUCT.Name --]
        </span>
    [-- END_IF --]
    [-- IF PRODUCT.DisplayPrice --]
        <span class="product-price">
            [-- PRODUCT.Price --]
        </span>
    [-- END_IF --]
</a>
[-- END_DEFINE PRODUCT --]

[-- DEFINE MORE_INFO_PAGE --]
<!DOCTYPE html>
<html>
    <head>
        <title>
            [-- PRODUCT.Name Remove_HTML --]
        </title>
        <meta name="description" content="[-- PRODUCT.MetaDescription --]" />
        <meta name="keywords" content="[-- PRODUCT.MetaKeywords --]" />
        [-- INCLUDE scripts-css.inc --]
    </head>
    <body>
        <div class="page pdp">
            <div class="header">
                [-- INCLUDE header.inc PROCESS --]
            </div>
            <div class="content clearfix">
                <div class="left-col">
                   
                </div>
                <div class="right-col">
                   
                    <table width="100%">
                        <tr>
                            <td class="prod-image" valign="top">
                                [-- PRODUCT.Graphic --]
                            </td>
                            <td class="product-details" valign="top">
                                <h1>
                                    [-- PRODUCT.Name --]
                                </h1>
                                <div class="prod-subtitle">
                                    [-- PRODUCT.MoreInformationTitle --]
                                </div>
                                <div class="prod-price">
                                    [-- PRODUCT.Price --]
                                </div>
                                <div class="prod-details-tabs">
                                    <div class="prod-details-tabs-top">
                                        <a href="#">
                                            <img src="/store/media/fff/ff-says.jpg" alt="" />
                                        </a>
                                        <a href="#" class="active">
                                            <img src="/store/media/fff/details-hover.jpg" alt="" />
                                        </a>
                                        <a href="#">
                                            <img src="/store/media/fff/size.jpg" alt="" />
                                        </a>
                                    </div>
                                    <div class="pdp-tabs-border"></div>
                                    <div class="prod-details-tab-areas">
                                        <div>
                                            Coming Soon
                                        </div>
                                        <div class="active">
                                            [-- PRODUCT.ProductDescription --]
                                        </div>
                                        <div>
                                            Coming Soon
                                        </div>
                                    </div>
                                </div>
                            </td>   
                        </tr>
                    </table>
                   
                </div>
            </div>
            <div class="offers clearfix">
                [-- INCLUDE offers.inc --]
            </div>
            <div class="footer clearfix">
                [-- INCLUDE footer.inc --]
            </div>
        </div>
        <div class="under-footer">
            [-- INCLUDE copyright.inc --]
        </div>
    </body>
</html>
[-- END_DEFINE MORE_INFO_PAGE --]
alexus2005
 
Posts: 14
Joined: Fri Jul 01, 2011 2:00 am

Re: Mini Cart and Register and Login Links on More Info Page

Postby Jim » Fri Jul 08, 2011 6:32 am

Did you check the include files that have a PROCESS in the tag like
[-- INCLUDE header.inc PROCESS --]

Note that if any of your other INCLUDE files contain ShopSite template tags they must have the PROCESS or the tags in the included file will not be evaluated and will display as text on your pages.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Mini Cart and Register and Login Links on More Info Page

Postby alexus2005 » Sat Jul 09, 2011 1:01 am

Hi Jim,

Yes I checked theinclude as well and there is no PAGE tag. Before I used to have 2 error messages.

I pointed out to the [-- RegistrationSignIn --] tag saying that it's illegal and another one pointed to [-- MiniCart --]. I have replaced minicart with just javascript, and it's not an issue anymore, however, [-- RegistrationSignIn --] still tells me that PAGE tag is illegal :?

Could that be a bug?
alexus2005
 
Posts: 14
Joined: Fri Jul 01, 2011 2:00 am

Re: Mini Cart and Register and Login Links on More Info Page

Postby Jim » Sun Jul 10, 2011 7:19 am

What version of ShopSite do you have? In the current version 11 the minicart is displayed on moreinfo pages. Here is the code from the 3Column.css include file. This loads the necessary javascript on the page.
[-- IF MiniCart --]
<script type="text/javascript" language="javascript" src="[-- IF VAR.Secure "yes" --][-- IF SC_USE_SECURITY --][-- STORE.SC_Secure_Image_URL --][-- ELSE --][-- OUTPUT_DIRECTORY_URL --][-- END_IF --][-- ELSE --][-- OUTPUT_DIRECTORY_URL --][-- END_IF --]/publish/MiniCart.js"></script>
[-- END_IF --]

And the 3Column-Product.sst contains, This actually displays the minicart.
[-- IF MiniCart --]
<script type="text/JavaScript" language="JavaScript">DisplayMiniCart("ss_cart_[-- STORE_Serial_Number --]","Detail","black");</script>
[-- END_IF --]

I don't know if this was the same in ShopSite Version 10 or the 10sp1 or 10sp2 templates or not.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Mini Cart and Register and Login Links on More Info Page

Postby alexus2005 » Sun Jul 10, 2011 1:15 pm

Hi Jim,

It's v11 R1. I got minicar tto work with just pasting javascript on the page, but [-- RegisterLoginLinks --] is my main error source now. For some reason it wouldn't want to compile on More info pages :/
alexus2005
 
Posts: 14
Joined: Fri Jul 01, 2011 2:00 am

Re: Mini Cart and Register and Login Links on More Info Page

Postby Jim » Sun Jul 10, 2011 1:29 pm

In the 3Column_Product.sst the define moreinfo section contains [-- INCLUDE 3Column-LeftBart.sst PROCESS ] which includes the following for the "Your Account" link
[-- IF SC_Registration --]<a class="cr_link" href="[-- SHOPPING_CART_URL BASE --]/order.cgi?func=3&amp;storeid=[-- STORE.ID --]&amp;html_reg=html">[-- STORE.289 --]</a>[-- END_IF --]

So you might try that code for the registration link in your moreinfo template.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Mini Cart and Register and Login Links on More Info Page

Postby alexus2005 » Sun Jul 10, 2011 2:52 pm

Sure I will try that and let you know how it worked.

Thanks.
alexus2005
 
Posts: 14
Joined: Fri Jul 01, 2011 2:00 am


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 38 guests