Announcement

Collapse
No announcement yet.

Product Descriptions in Section Layout

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

    Product Descriptions in Section Layout

    Hi All,

    I found this piece of code on the forum (which i cant seem to find again) which displays product descriptions , price , qty , add to cart details into our section layout.

    My problem is that the add to cart button does not disappear if the item is out of stock , is this possible ? Could someone help me with this please ?
    Also is it possible to show RTS info aswell ?

    Or would anyone have a different section layout ?

    Thanks,

    Eck

    <!--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>
    </div>
    <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>



    <actinic:block type="PriceList" >

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

    </actinic:block>

    <actinic:block php="true" >

    $sShort = "";

    $nCount = 0;

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

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

    {

    if ($nCount > 10)

    {

    $sShort .= "...";

    break;

    }

    $sShort .= $sWord . " ";

    $nCount ;

    }

    echo $sShort;

    </actinic:block>

    </actinic:block>

    <br><span class ="actlargepink"><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...</span></a>

    </div>

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

    </form>

    </actinic:block>
    <img src="dot.png" height="1" width="600">
    <!--HTML End -->

    #2
    Here's a cleaner way:

    Go to Design / Library / Layouts / Products. Right-click Compact Layout Using CSS and choose Copy. Rename that copy to be Section Link Product Details Using CSS.

    Now in your Section List layout put the following:
    Code:
    <actinic:block type="ProductList">
    	<actinic:block if="%3cactinic%3avariable%20name%3d%22ListCount%22%20%2f%3e%20%3d%3d%201">
    		<actinic:variable name="ProductLayout" value="Section Link Product Details Using CSS" />
    	</actinic:block>
    </actinic:block>
    Which will display the product in that Section only if there's a single one there.

    Alter the code in Section Link Product Details Using CSS to get the display you want.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment

    Working...
    X