Announcement

Collapse
No announcement yet.

I want to create a listing page that links through to full details of the products

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I want to create a listing page that links through to full details of the products

    There are two methods for doing this - see the other method here

    In this method of creating listing pages that link through to full details pages, you need to manually create a sub-section for each product in your store. In other words, instead of listing products like this:

    Section
    --Product
    --Product
    --Product

    ... you need to list your products like this:

    Section
    --Sub-section
    -----Product
    --Sub-section
    -----Product
    --Sub-section
    -----Product

    Once you've done that, you can use the following code to include the product price, description and add to cart button within the section-link that leads through to the sub-section.

    To do this:

    1. Go to 'Design | Library | Layouts' and expand the 'Section Link' group.

    2. Right-click on 'CSS Section Link Layout' and select 'New Layout'.

    3. Give it a name of 'Section Link With Product Details' and click 'OK'.
    4. Double-click on it and replace the entire code of the link with the following HTML:

    <!--HTML Begin -->

    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductFormUsed%22%20%2f%3e">

    <form method="post" action="<actinic:variable name="OnlineScriptURL" value="Shopping Cart Script URL" />">

    <input type="hidden" name="SID" value="<Actinic:Variable Name="SectionID"/>" />

    <input type="hidden" name="PAGE" value="PRODUCT" />

    <input type="hidden" name="PAGEFILENAME" value="<actinic:variable name="SectionPageName" />" />

    <Actinic:SECTION BLOB='<Actinic:Variable Name="SectionCatFile"/>'/>

    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">

    <!-- Hidden field when in trial mode -->

    <input type="hidden" name="SHOP" value="<Actinic:Variable Name="HiddenFields"/>" />

    </actinic:block>

    </actinic:block>

    <div class="product_list">

    <div class="image_product"><a href="<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>" target="_self"><img alt="<actinic:variable name="SectionName" encoding="strip"/>" src="<actinic:variable Name="SectionImageFileName"/>" border="0" /></a></div>

    <div><h3 class="product"><a href="<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>" target="_self"><span style="color:<actinic:variable name="Palette2" />"><actinic:variable name='SectionName'/></span></a></h3></div>

    <actinic:block type="ProductList" >

    <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductType%22%20%2f%3e%20%21%3d%202" >

    <div style="float: right;">

    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsAddToCartButtonShown%22%20%2f%3e%20AND%20%0d%28%3cactinic%3avariable%20name%3d%22NumberAttributesInPushButtonGrid%22%20%2f%3e%20%3d%3d%200%29" >

    <actinic:variable name="AddToCartButton" /><br>

    <span class="actrequired"><Actinic:Variable Name="QuantityPrompt"/></span><br>

    <input type="text" name="Q_<Actinic:Variable Name="ProductID"/>" size="4" value="<Actinic:Variable Name="DefaultQuantity"/>" class="form_input_general" />

    </actinic:block>

    </actinic:block>

    </div>

    <actinic:block type="PriceList" >

    <b><actinic:variable name="PriceLayout" /></b><br><br>

    </actinic:block>

    <actinic:block php="true" >

    $sShort = "";

    $nCount = 0;

    $sOriginal = '<actinic:variable encoding="perl" name="ProductDescription" selectable="false" />';

    foreach(explode(" ", $sOriginal) as $sWord)

    {

    if ($nCount > 10)

    {

    $sShort .= "...";

    break;

    }

    $sShort .= $sWord . " ";

    $nCount ;

    }

    echo $sShort;

    </actinic:block>

    </actinic:block>

    <br><a href="<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>" target="_self">More Info...</a>

    </div>

    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductFormUsed%22%20%2f%3e">

    </form>

    </actinic:block>

    <!--HTML End -->

    You can now select this layout for any section link where you want to include the product details as part of the section link.
    Disclaimer: This code was provided by an SellerDeck user via the SellerDeck Community (http://community.sellerdeck.com/) and so can't be supported by the SellerDeck Technical Support team.
Working...
X