Announcement

Collapse
No announcement yet.

SPP description

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

    SPP description

    Hi all

    I've forgotten something I used to know how to do....

    I'm using SPP to display my products, what I can't remember is how to display the first few words of the product description shown in the Sections....

    Any help would be appreciated.

    Thanks.

    #2
    It's in the AUG page 65.

    Comment


      #3
      Details and code in the AUG.

      Comment


        #4
        Second's away round 2.

        Comment


          #5
          lol thanks guys.

          Comment


            #6
            Ok so I'm using this code:


            <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++;


            It says in the user guide click on the product description in the design tab, is this is the Design > Library etc .... or is it in that actual Design tab of the UI?

            I've had a look inside the UI Design tab and can't find a 'ProductDescription' variable anywhere, what am I doing wrong? Cheers

            Comment


              #7
              Make sure you can see a product with the description you want to tweak in the Page Preview pane.

              Click the design Tab (part of Content Design Orders...).

              Then click some product description text in the Page Preview pane.

              The Layout Code window should now be showing the ProductDescription variable.

              Tutorials on this sort of thing in the Starter Guide.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Thanks this has shortened it in the production description however up a level on the sections it's still showing the full description. Is there a variable I'm missing for the section description?

                Comment


                  #9
                  If you want to display the Product Description in the Section Link layout, then use 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="ProductDescription" />
                  	</actinic:block>
                  </actinic:block>
                  And to shorten it to ten words, replace the line:

                  <actinic:variable name="ProductDescription" />

                  With your Advanced Guide code.
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    This is what I'm using but it's giving me 2 errors "missing close tag of Block" and "a PHP error has been found...." that also takes me to the 'block' above the new code, not sure why this is?

                    <table width="100%" cellspacing="0" cellpadding="10" border="0">
                    <tr>
                    <td width="25%" align="center" valign="top">
                    <a name="<Actinic:Variable Name="EncodedProductAnchor"/>"></a>
                    <b><Actinic:Variable Name="ProductName"/></b>
                    <br /><br />
                    <actinic:variable name="ProductImageLayout" />
                    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductReferenceVisible%22%20%2f%3e" >
                    <br />Ref: <actinic:variable name="ProductReference" />
                    </actinic:block
                    > </td>
                    <td align="left" width="75%" valign="top">

                    <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++;


                    <actinic:variable name="ExtendedInformationLinks" /><br />
                    <actinic:variable name="RealTimeStockDisplay" />

                    <actinic:block if="%3cactinic%3avariable%20name%3d%22FileURLNotEmpty%22%20%2f%3e">
                    <br />
                    <a href="<Actinic:Variable Name="ProductLinkInfo"/>">
                    <Actinic:Variable Name="ProductLinkText"/>
                    </a>
                    </actinic:block>

                    Comment


                      #11
                      The Advanced Guide article lump of code continues onto another page. You've only copy/pasted the first bit.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        Thanks for that. It's working now, however I still can't get the first 10 words of description in the section to show using your code. It shows the whole description in the section and then the first 10 words of the description on the actual product on the next page. Ideally it needs to be the other way round, brief description on the section link then full description in the actual product. How do I go about doing this? Thanks

                        Comment


                          #13
                          Sounds to me that you have made the changes in the 'product' layout and not the 'section link' layout. It makes no sense that product description woudl shorten itself to 10 words unless you had wrongly added the code into that area, check both those layouts, they are independent of each other.

                          Comment


                            #14
                            Hi Leehack, where do I find the section layout? I found the layout I'm using in the Design tree on the side (Section Page With Section Name At The Top) but can't find a variable to change a description...

                            Thanks

                            Comment


                              #15
                              As I said in my post #9, you have to edit the Section Link layout.

                              Click a Section in the Content Tree, then look in the Layout pane to see what Section Link layout it's using.

                              Amend that layout as per my #9.
                              Norman - www.drillpine.biz
                              Edinburgh, U K / Bitez, Turkey

                              Comment

                              Working...
                              X