Announcement

Collapse
No announcement yet.

Single Product per Page

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

    Single Product per Page

    I am beginning to adopt the Single Product per Page layout and have used the AUG page 24 Method 2 for help. I would like to ask to questions.

    1. There appears to be some PHP script which I believe takes the first 10 words from the product description and places them in the product section list. I have removed this script and it does remove the first bit of the description but does this script contain any thing else crucial that I need (my programing knoledge is very limited) This is the script:

    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++;
    }
    echo $sShort;
    </actinic:block>
    The reason why I wanted to remove this from the section layout is because the first line of my description is HTML linking to images (see here http://www.norfolkherbs.co.uk/images/screenshot.jpg)

    2. Whilst researching SPP layouts, I found a couple of posts regarding a mistake in the AUG and it was mentioned that it was to be changed but it doesn't appear to have been.

    Code:
    <span class="actrequired"><Actinic:Variable Name="QuantityPrompt"/></span><br>
    <input type="text" name="Q_<Actinic:Variable Name="ProductReference"/>" size="4"
    should be

    Code:
    <span class="actrequired"><Actinic:Variable Name="QuantityPrompt"/></span><br>
    <input type="text" name="Q_<Actinic:Variable Name="ProductID"/>" size="4"
    Is the latter then correct? I am using 8.5.3

    Cheers.

    Olly
    www.norfolkherbs.co.uk
    Online Shop at: www.homescentherbs.co.uk

    #2
    It is just for the first 10 words, you can get rid of it safely if not wanting those. The AUG has been wrong for around 9 months on this part, when notifications of this have reached 10+, i expect someone will take the 42 seconds out to change it.

    Comment


      #3
      Lovely, I just needed confirmation

      Cheers Lee.
      www.norfolkherbs.co.uk
      Online Shop at: www.homescentherbs.co.uk

      Comment


        #4
        As Lee says you'd remove that big lump of PHP that you posted and replace it with just:

        <actinic:variable name="ProductDescription" />

        I note that you're embedding HTML into the product description in order to display some images. Thee are probably much better ways of doing this. E.g. create a product level variable (or several) - feature1, feature2, etc that are a list of choices. Set each choice to the name of the image to show (leave the 1st choice as "none"). Then where you want these feature images to display put something like (pseudo code)
        Code:
        block if feature1 != "none"
          <img src="<actinic:variable name="feature1" />" />
        /block
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Norman,

          Yes , i see what you mean. That certainly would be a cleaner approach. I will have a go!

          Cheers
          www.norfolkherbs.co.uk
          Online Shop at: www.homescentherbs.co.uk

          Comment


            #6
            The AUG has been wrong for around 9 months on this part, when notifications of this have reached 10+, i expect someone will take the 42 seconds out to change it.
            Sorry, it has been updated in the v9 AUG but not the v8 one. I'll pass it onto the relevant person to get sorted.
            ********************
            Tracey
            SellerDeck

            Comment


              #7
              Nice one Tracey, while they are there, I think it would also be pertinent to mention that if these products have components or attributes, it is either not a good idea to implement the add to cart button (as it will fail) or they will also need to add in the component/attribute layouts also.

              Comment


                #8
                Thanks Lee, I'll pass that on too.
                ********************
                Tracey
                SellerDeck

                Comment


                  #9
                  The v8 AUG has now been updated with the ProductID variable and the layout code will now work for product with or without components and attributes.
                  ********************
                  Tracey
                  SellerDeck

                  Comment

                  Working...
                  X